C Source ANAlyser

-- Why --

Sometimes while writing and debugging more complex tools, I create temporary
functions and variables while "figuring things out", and occasionally some
get "left behind", taking up unnecessary space in the final executable.

Also, sometimes I replace standard functions with names differing only in
case - this might be because I want to track them during debugging, but
often it's because I have a more suitable implementation for this program.

Eg: 'Printf' replacing 'printf' is common because many of my tools don't use
many of 'printf's extensive "standard" capabilities and I don't want the code
space overhead of having the "full on" 'printf'. -- This can cause waste if I
have forgotten and used 'printf' in some places.

---------

To help deal with cleaning up these kinds of things, I wrote these tools.

NOTE: These are NOT "perfect", they were very "Quick and Dirty" creations,
will sometimes show unnecessary things, and may not "do well" with other
peoples style. They have worked quite well for me, and do help draw attention
to things that should be fixed... but you do "get what you pay for"...
hopefully they will be at least somewhat useful to others.

----------

CFL - C Function List

This simply lists the functions which are defined and referenced within a C
program. The resolts are shown in four catagories:
    Functions which are Defined
    Functions which are Referenced
    Functions which are defined and Not referenced
    Function names differing only in Case

Each report line cunsists of:
    #1'name'#2.
 #1 = Unique number identifying function
 #2 = Number of times function name is referenced
    (This maxes at 127, 127 means 127 or more times!)

CFL does not have a complete/extensive C parser:
    It assumed the code compiles correctly.
    It assumes it sees the whole source file    *1
    It assumed comments have been removed       *1
    It counts {}, [] and () to determine some aspects of
        "where it is in the code"
    The sequence 'name(' is taken to be a function,
        If outside of {} it is a definition
        If inside () it is a reference
        The sequence &name is taken to be a reference.

*1  To get the complete source file with #included sections, without comments
    CFL creates a temporary file by running the specified source through the
    Micro-C Preprocessor (MCP).
 ** This is a two-step process, the original source is first written to
    CflTmp.C with '#include <file>' lines disabled .. CFL only wants to
    see your source code, NOT system/header files!
    This file is then run through MCP to get: CflOut.C

For command details, use: CFL ?

You can patch certain "features" of CFL with my ESP utility:
    -1  OutPut file                                         [CflOut.c]
    -2  Log file                                            [Cfl.txt]
    -3  Temporary file                                      [CflTmp.c]
        If these do not contain '\/:' they are assumed to be in the
        location specified by environment variable TEMP
    -4  MCP executable file                                 [C:\MC\MCP.EXE]
        This should indicate the Micro-C home directory
        If CFL needs other changes to accomodate your source style, replace
        this with a program which adjusts the source then calls MCP!
    -5  Lead-in for file change line                        [#file]             
----------

VSS - View Source Symbols

Views a source file, letting you select symbol names, Then you can easily
find and see references to that name.

I use this mainly to check/track global variables etc.

For command details, use: VSS ?

You can patch colors used with ESP (use -H):
    1st char: Main screen
    2nd char: LeftBar (Select)
    3rd char: LeftBar (View)
    4th char: EOF/Hilight
    5th char: Selected symbol hilight


----------
Dave Dunfield   -   https://dunfield.themindfactory.com
 Download and see my product CATALOG!       Another way to find me:
 Search "Dave's Old Computers" and see my "personal" link at bottom.
