Announcement

Collapse
No announcement yet.

Log combiner / Statistics comments

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Log combiner / Statistics comments

    Thread for any comments on either the Log file combiner, project statistics, PBUtil, Theme Color Browser or System Color utilties.

    Log file combiner combines the top of log files into a single log file and optionally displays it.

    FileStats gives some basic stats on your projects.

    Both small utilities were written for use with automated builds I do.


    PBUtil formats mutliple files for posting on forums and creates a skeleton class or interface. Small stuff I use while editing.

    Theme Color Browser allows you to find and see the ~6k theme colors out of the possible ~54k entries that could be defined.

    System Colors allows you to see the system color palette.

    Edit: Added link to PBUtil. Moved links to text of title.
    Edit: Added link to Color Theme Browser
    Edit: Added System Color viewer
    Last edited by Larry Charlton; 11 Aug 2011, 07:29 PM.
    LarryC
    Website
    Sometimes life's a dream, sometimes it's a scream

  • #2
    Probabbly worth a small sample of how I use them. You may need to edit the paths at the top of build.cmd.

    build.cmd
    Code:
    Rem @Echo off
    SET WINAPI=.\;c:\pbwin10\winapi
    SET COMPILER="c:\pbwin10\bin\pbwin.exe"
    SET LIBRARIAN="c:\pbwin10\bin\PLib.exe"
     
    %COMPILER% /q /L /I%WINAPI% FileStats.bas
    %COMPILER% /q /L /I%WINAPI% ViewLogs.bas
     
    FileStats.exe /nv
    ViewLogs.exe
     
    Copy /Y FileStats.exe c:\pbwin10\bin
    Copy /Y ViewLogs.exe c:\pbwin10\bin
     
    Echo Finished building
    LarryC
    Website
    Sometimes life's a dream, sometimes it's a scream

    Comment


    • #3
      Hi Larry,

      Uber-cool! I was thinking of a utility like this for some time (the project stats thingie), but never got around to writing it.

      I'll tinker with the code to be able to use it (I have PB/Win 9) when I get some time, but the idea is really, really cool.

      Thanks for sharing,
      Jaime de los Hoyos, MD
      aka Dr. Code (not the Exult guy!)

      Comment


      • #4
        You can drop the following in to replace the MEMORY FILL and it should compile just fine in prior compilers. Couldn't remember how to access a UDT as a string so something like REPEAT$( sizeof(file), $NUL ) would work.

        Code:
        file.lines = 0
        file.subs = 0
        file.functions = 0
        file.classes = 0
        file.interfaces = 0
        file.properties = 0
        file.methods = 0
        file.types = 0
        file.enums = 0
        file.macros = 0
        LarryC
        Website
        Sometimes life's a dream, sometimes it's a scream

        Comment


        • #5
          Initialize a UDT to Binary zeroes:
          Code:
             RESET UDtVar
          Initialize a UDT to any single char/byte value:
          Code:
           TYPE SET UdtVar = "" USING  CHR$(ascii_value_of_char)

          Comment


          • #6
            Originally posted by Michael Mattias View Post
            Initialize a UDT to Binary zeroes:...
            Who's da man, thanks!
            LarryC
            Website
            Sometimes life's a dream, sometimes it's a scream

            Comment


            • #7
              I've taken Larry's Class Builder and modified it to allow you to define the Property Type and also create Method skeletons:

              http://www.powerbasic.com/support/pb...ad.php?t=48273

              Comment


              • #8
                Hi Larry,

                Is there supposed to be an XML file in the ThemeColors zip - "theme.xml" - or am I supposed to create it. The *.bas fails compile without it.

                Comment


                • #9
                  Thanks, I've uploaded a modified zip with the theme.xml file.
                  LarryC
                  Website
                  Sometimes life's a dream, sometimes it's a scream

                  Comment


                  • #10
                    Updated to include generating headers from source. i.e. it Declares subs and functions, and extracts interface definitions. I presume Enums, Types, and Macros are already in a different include file somewhere.

                    Edit: Updated so it only writes unique interfaces (i.e. the first implementation of an interface)

                    Note, couldn't edit original post so updated source is in Post #8.
                    Last edited by Larry Charlton; 22 Aug 2011, 04:35 PM.
                    LarryC
                    Website
                    Sometimes life's a dream, sometimes it's a scream

                    Comment


                    • #11
                      Few minor updates. Note the update is in Post #8.
                      • Updated write headers to handle multi-line declarations.
                      • removes COMMON and EXPORT from declaration.
                      • If function was EXPORT will add LIB if it was missing, defaults to export.dll which needs to be changed to your library name.
                      • If function was EXPORT will add ALIAS if missing.
                      LarryC
                      Website
                      Sometimes life's a dream, sometimes it's a scream

                      Comment


                      • #12
                        Updated, includes zip. Has several changes I've made over time since I couldn't update the original post, mostly fixing annoyances and bugs. You can get the file here.
                        LarryC
                        Website
                        Sometimes life's a dream, sometimes it's a scream

                        Comment

                        Working...
                        X