Dec 062017
Surprisingly good PD source code print utility. Set indent, select from a number of options, menu driven, function/symbol cross referencing, line numbering, page numbering, etc.
File CSOURCE.ZIP from The Programmer’s Corner in
Category C Source Code
Surprisingly good PD source code print utility. Set indent, select from a number of options, menu driven, function/symbol cross referencing, line numbering, page numbering, etc.
File Name File Size Zip Size Zip Type
CSOURCE.DOC 7390 2945 deflated
CSOURCE.EXE 68996 32334 deflated
SCREEN.EXE 15694 9227 deflated
TAB.EXE 8228 5141 deflated
VERSION.DOC 2946 1211 deflated

Download File CSOURCE.ZIP Here

Contents of the CSOURCE.DOC file


Thanks for using CSOURCE. I'm sure it will prove as useful to you
as it does for me. CSOURCE requires very little printed documentation.
Most of the help you will need can be obtained through CSOURCE itself. The
following is a brief summary of how to start CSOURCE and a few other pieces
of information that you may find useful.


A stand alone tab removing function has been added ( tab.exe ). See
the version.doc file for details and other changes from version 1.0.


Three important features have been added. CSOURCE now writes to file
all of the files that were just processed. That file ( named "c.fls" )
can be used as input for CSOURCE as follows: c:> CSOURCE C.FLS

CSOURCE now also writes to file the options you last selected from the
main menu. The file is named "csource.dat" but you never need bother
with it. When CSOURCE is next used, the options you selected last time
now become the current default options. Thanks to David Morgenlender for
this suggestion.

Users now have the ability to select files via the view directory
option. This is described below.

Old users may notice another new feature. CSOURCE now displays the
memory available to it as the program is running. This should help
you determine how many source files or the size of one source file
CSOURCE can handle given the memory available in your system.
Displaying the available memory slows CSOURCE down. Therefore, you
can toggle the display on and off by pressing the . This
is only applicable when CSOURCE is generating a list of identifiers.


To get started, type CSOURCE at the DOS prompt. You will be presented
with an input screen. Pressing F2 displays a help screen. Before the help
screen is displayed, the shareware nature of this product and certain
restrictions are explained. THIS MUST BE READ BEFORE CSOURCE IS USED. The
help screen shows the various ways possible to enter source files. There
are basically four ways to enter files:

--- No command line parameters. When CSOURCE sees that there are
no command line parameters, you are taken directly to the
input screen where source files are entered manually.

--- A file name is passed as a command line parameter. Since there
are no wildcard characters in the file name, CSOURCE assumes
that all the files you wish entered are contained in file
FILES.LST. Note that this file name could have contained a full
drive and path name. For example, "c:\directory\files.lst"
would have been perfectly ok.

3. C> CSOURCE *.c
--- The command line parameter contains wildcard characters. CSOURCE
will therefore include all files with a ".c" extension. A drive
and path name could be included. For example, "c:\directory\*.c"
will include all ".c" files in the "directory" directory.

4. View Directory Option. At the input screen, press the key to
view the directory. The left hand window contains the directory
listing and the right hand window contains the files already choosen.
Move the highlite bar over the source file you wish included and
press . If you've choosen more files than can be shown in
one window, press to switch windows. The keys can
be used to scroll through the already selected files. Press
again to return to the original window. Pressing enables you
to change the directory.


Only the first method listed above takes you to the input screen. The
next two cause the input screen to be bypassed. Once here, entering files
is simple. If a file name is entered without a drive letter or path name,
the current working directory is searched. Otherwise, the path name is
Wildcard characters are permitted. Entering "*.c" causes the current
working directory to be searched for all ".c" files. Entering "c:\*.c"
causes the root directory to be searched for all ".c" files. When entering
wildcard characters, after the search for files is completed, a message will
be displayed telling you how many files were found.
If a file cannot be found or a subdirectory does not exist, a message
will pop up informing you of a problem. Once the message disappears, you
are free to make any changes you wish to the file name. You can edit the
line of input using the arrow keys and backspace and delete keys.
You should also notice a status line on the bottom of the screen giving
more directions.
The limit on the number of source files that can be entered is 500.


After the input screen is completed or if you chose to enter files by
either the second or third method listed above, you are taken to the main menu
screen. All the help you will need can be obtained by positioning the cursor
over a particular field of input and pressing the F1 key. CSOURCE keeps
track of where you are in the menu and will display the appropiate help
One area that may not be clear is extractions. CSOURCE lets you extract
portions of you code to the screen, printer or a file of your choice.
After you press the F10 key to tell CSOURCE that you are done, you will be
given the chance to extract portions of your source code (assuming you
selected the extract option). It will look as follows:

Source File: c:\directory\filename.ext

Extraction #1:

You are allowed 10 extractions. Enter extractions as follows (where the
numbers are line numbers):

Extraction #1: 45:90 (or) 45-90
Extraction #2: 121:209 (or) 121-209
Extraction #3: 300:415 (or) 300-415
Extraction #4: (Press to tell CSOURCE you're done)

If you entered more than one source file, you will be given the chance to
extract code from each file.


CSOURCE does some error checking on your source code. It will tell
you if you have mismatched braces, mismatched single or double quotation
marks and mismatched comment symbols. Since most compilers do not allow
nested comments, CSOURCE will not allow it either. If you have mismatched
braces, CSOURCE will display a message telling you so but will keep going.
Any other error causes CSOURCE to stop and tell you the problem and the line
number(s) of occurrence. You will then be taken back to the DOS prompt to
correct the error and to try again.


CSOURCE was written almost entirely in C and contains approximately 3,700
lines of code. One function which handles screen display was written using
inline assembly. No windowing package was used and approximatly 95% of the
functions used in CSOURCE are either my own or Turbo C's (the compiler used).

 December 6, 2017  Add comments

Leave a Reply