home *** CD-ROM | disk | FTP | other *** search
-
-
-
- C Source X-Ref Generator
-
-
- The extension to CPRINT was a C tutorial for me. I had two
- objectives in mind.
-
- 1. I needed to gain some experience with a new DataLight C
- compiler. This program was my first conversion effort
- with DataLight.
-
- 2. While working on another C program I needed an old
- crutch, the Cross-Reference. After looking for one in
- the Public Domain I concluded there wasn't one available.
-
- The source contained in this archive is a simple extension
- to one of the CPRINT programs offered on several BBS. It
- was a fun program for me to get some experience with C
- pointers. Perhaps you will enjoy extending it to support
- new features.
-
- While working on the program I realized I needed a more
- sophisticated C language parser. The one contained in this
- source is almost identical to the original CPRINT and is
- basically a simple word identifier. For this reason the
- program does not support the cross-reference of internal and
- external variables for subroutines contained in one input
- file. All unique variables found in the source file will be
- lumped into one cross-reference listing. This would be a
- good challenge for another needing some C fun.
-
- I did change the interface to CPRINT significantly. All
- controls are entered in the command line:
-
- CPRINT filename [/L] [/Q] [/X] [/D] [/Pprintfile]
-
- The filename can be entered without extensions. The
- extension 'C' will be assumed as is common with several C
- compilers. The filename and options can be entered in any
- order on the command line. The filename is the one required
- argument.
-
- OPTION DESCRIPTION
-
- /L No listing of the input source file will be
- provided if this option is present in the
- command line. If not present a listing of the
- input source will be provided.
-
- /Q Standard C reserved words will not be include in
- the cross-reference. All other word variables
- including single and double quote items will be
- handled by the cross-reference. If this option
- is detected in the command line single and
- double quote words will not be included in the
- cross-reference.
-
-
-
-
-
- Page: 1
-
-
-
-
-
- C Source X-Ref Generator
-
-
- /X The cross-reference is normally generated by the
- program. If this option is detected in the
- command line the cross-reference will not be
- developed. The program will run much faster and
- will still produce the balancing report of
- quotes and parentheses.
-
- /D The program will normally produce a simple
- directory report of each function found in the
- input source. The line number corresponding to
- the source listing (see /L) will be printed
- adjacent to the function's name. If this option
- is found in the command line the directory will
- not be printed.
-
- /P Normally the program will print all output to
- the PRN (standard output) name. If you require
- the output to be sent to another destination use
- this option. Immediately after the /P key in
- the destination. For example, if you wanted the
- output to go to file XREF.LST you would submit
- the following command line:
-
- CPRINT source_name /Pxref.lst
-
- I hope you have fun with this program, and perhaps it will
- save a few hours while debugging a silly mistake
-
- GOOD PROGRAMMING
-
- Bud Curtis
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page: 2
-
-
-