home *** CD-ROM | disk | FTP | other *** search
- (* Cross reference generator Version 2.10, 8/23/86
- ------> REQUIRES TURBO PASCAL 3.0 <------
- *************************************************************
- This program, in its original form, was downloaded off of some bulletin
- board somewhere. At that point, it only listed a Pascal program to the
- LST device and generated a cross reference of whatever reserved words
- were in the list in function rsvdword, with those reserved boldfaced in
- the printout. I have made numerous improvements.
-
- The program now optionally lists include files within the source listing.
- At any point during listing, printing may be interrupted by pressing any
- key, at which point you can either resume the listing or abort.
- The listing can be sent to the printer, the screen, or a disk file.
- If sent to the screen, reserved appear in reverse video. If output is
- to the printer or a file, the screen displays the name of the file being
- listed, with include files indented, and the line number of output.
- File names supplied by the user, i.e. the file to be listed and optional
- output file, are checked by function Exist , which is cool in that
- it does not need to open the file. In fact, there are several subroutines
- within this program which would be useful for general purpose TURBO Pascal
- programming.
-
- You should note that many of the new functions of XREF use TURBO features
- which are specific to the IBM-PC version, such as the reverse video and
- use of wherex and wherey.
-
- I can't think of anything else one would need in a source listing program.
- If someone else can, or has any questions about the program, please contact
- me at this address:
-
- Larry Jay Seltzer
- 657 Seventh Street
- Lakewood, NJ 08701
-
- I can and I am not familiar with mailing updates of programs or ideas across
- country either. So I have modified this program and willing to share it with
- you. If you could get the program one BBS closer great.
-
- * No longer will you have to deal with blank pages or lines of text wrapping
- around making your programs listings hard to read. With this version of
- XREF chars per line is auto sized on a page by page basis. You can spool
- off odd and even pages to files. So what you say why not print the odd
- pages tear off the paper feed it back in with the blank side up and print
- the even pages, and presto a book.
-
- This program works with Gemini 10X and any compatible printer. The codes
- are stored in constants contained in the file printer.cst, so as to be
- easily changeable for any printer with this capacity. There are three
- basic ways to invoke the program:
-
- 1) XREF from command line. You will be prompted for everything.
- 2) XREF [pathname][File_Name].[ext]
- You will be prompted for all applicable parameters.
- 3) XREF [pathname][File_Name].[ext] [/ { B,C,D,E,F,I,N,O,S,T } ]
- *B means delete back up versions of source files.
- *C means compressed more than one procedure per page if
- they both fit on page
- *D means double strike printing
- *E means spool even pages to disk to print later
- File_Spec.EVE
- F means print out to disk file
- I means list include files within the main
- *M means output only modified files eg ones with backup files
- N means include the cross reference
- *O means spool odd pages to disk to print later File_Spec.ODD
- S means send output to the screen instead of printer.
- *T means top down program listing valid only with switch I
- the original way bottom up sucks and I claim no responsibility
- for it. I recommend top down listing.
- 4) future features for those who need ideas
- rewrite reserve word so that it returns an index
- this would allow you to check for var const for local vars
- they would not take up memory on big programs or clog xref listing
- keep track of procedure depth and include nesting level in print
- out listing
- add pretty print feature to just rewrite file with enhancements
- like upper/lower case reserved words
- first letters in vars capitalized
- matching begin end comments
- var declarations aligned
- * auto size for page if no line exceeds 80 chars then set
- cpl to 80 else 96 else 136
- * add no new page if both procedures or more fit on same page
- ADD GATHER FILES FUNCTION THAT WILL MOVE ALL THE FILES TO
- ONE DIRECTORY AND REMOVE DIRECTORIES FROM INCLUDED
- STATEMENTS
- Add xref all files in a directory modified afterì
- a certain date.ì
- Add feature to omit library procedures in print outs
- this would reduce the amount of printing.
- ******************************************************************************
- Note that the recursive nature of the actual listing procedure (do_listing)
- allows for any nesting level of INCLUDEs, even though TURBO Pascal does not
- allow INCLUDEs to be nested. So this is nice, but of questionable value.
- * you can create list files that are nothing more than a file of included
- statements for dealing with a subject rather than programing order
-
- The program requires TURBO 3.0 because it uses TURBO FIBs, which have been
- altered for version 3.0. The FIB no longer contains the file's date of
- creation, so the file handle is passed to DOS function call $57, which
- returns the date.
-
- When I first use this code it was great. But then my programs were only 10
- or 15 pages. now just this program is 35 + pages and I am currently working
- on a terminal program that is 200 + pages that is 200 blank pages since you
- can't print on both sides, that is until now!
-
- The above asterisked features and modular breakdown enhancements have
- been add by
-
- ARNO A. KARNER
- 9149 5th AVE. SO.
- BLOOMINGTON MN 55420
-
- If you find this program of value and wish to contribute to myì
- college education it will be appreciated. Please feel free toì
- share this program with other people.ì
-
- *)