home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ##### #### #### #######
- # # # # # #
- # # # # # #
- # #### #### #
- # # # # #
- ##### # # # #
- ============================
- Users Guide and Reference
-
-
-
-
- ---------------------------------------------------------------
- A C code printing system
- for IBM compatable computers
- and most any printer
- ---------------------------------------------------------------
-
-
- Shareware
-
- by
-
- Harry K. Malsch
-
-
-
-
- Version 1.02
- MARCH 1992
-
-
-
- Support via EXEC-PC BBS
-
-
-
-
-
- Table of Contents
-
-
- Features....................................................1
-
- Introduction to CPRT........................................2
-
- Quick Start.................................................3
-
- Defaults....................................................3
-
- Options.....................................................4
-
- Environment Usage...........................................5
-
- Printer Configuration File..................................6
-
- Key Words...................................................8
-
- Future Plans................................................9
-
- Disclaimer..................................................9
-
- Licensing Agreement and Share Ware philosophy...............10
-
- Order Form..................................................11
-
-
-
- CPRT Operators manual Page 1
- ---------------------------------------------------------------
-
-
-
-
- Features:
- =========
-
- First of all you must know CPRT does not reformat C code as
- some pretty-print programs!
-
- CPRT can be used as a general purpose print utility, but was
- designed for printing C source code and especially for
- larger C code projects.
-
-
- CPRT's most notable features:
-
- * Designate file to print from com-
- mand line or file list.
-
- * Track file dates and compare date
- to determine if listing needs to be
- updated.
-
- * User configurable printer configu-
- ration gives the ability to print
- to most any printer.
-
- * Print to file.
-
- * Highlights comments in C source
- code.
-
- * Numbers files for easy reference.
-
- * Runs in DOS or OS/2.
-
- * Can be called from Microsoft C's
- Programmers Workbench.
-
- * Adjustable margins in
- characters/line or inches.
-
- * Prints Headers & Footers.
-
- * Adjustable tab length.
-
- * Supports the following WordStar
- control codes:
- ^B for bold print toggle.
- ^D for double print toggle.
- ^Y for italics print toggle.
- ^S for underscore toggle.
-
- CPRT Operators manual Page 2
- ---------------------------------------------------------------
-
-
-
- Introduction to CPRT
- ====================
-
- I had a shareware print utility which had some nice feathures,
- like the ability to add headers & footers and add line numbers to
- my listings. But it was missing something. I had the following
- problems.
-
- Problem 1)
- Most of the projects I work on are made up of several C
- source files. I find the need to update my listings of
- these files many times during development. The problem
- is keeping track of which files have changed and need
- to be re-printed, and which ones haven't changed since
- the last printing. Normally this can take a lot of
- time to check file dates and printing individual files.
-
- Problem 2)
- The print utility I was using for printing had some
- nice features for controlling the pitch, line length,
- and margins. However when setting character pitch, I
- also had to change the line length and the margin
- settings to keep them where I wanted them. If I could
- set the line length in inches instead of number-of-
- characters (like a word processor), the character pitch
- setting would be independent of margins and line
- length. The same goes for lines-per-inch and page
- length.
-
- Problem 3)
- The print utility I was using was DOS only. Which
- meant I had to wait for it to complete printing before
- I could do anything else. I really hated that!
-
- Problem 4)
- This really wasn't a problem but I thought it would be
- nice if the comments would be highlighted in some way.
-
- So I began writing my own print utility with the features I
- needed and some I thought others could use.
-
- One of the most unique features of CPRT is its ability to create
- and use log files. The log file is simply a text file containing
- a list of file names and their date & times. The log file can be
- created with any text editor. You do not have to enter the file
- date & time. These we be added automatically the first time CPRT
- uses the log file. Another way to create the log file is to use
- the following command at the command line:
-
- CPRT *.c /lf:<logfilename>
-
- If <logfilename> doesn't exist it will be created and contain all
-
- CPRT Operators manual Page 3
- ---------------------------------------------------------------
-
-
-
- the C file names & dates found in the current directory.
-
- Print orientation commands can be set in either number-of-charac-
- ters or inches. The switch /lm:10 sets a left margin to 10
- characters. The switch /lm:1i set the left margin to 1 inch. At
- 10CPI both switches do the same thing, however at 12CPI the
- results differ.
-
- Highlighting comments is done by specifying the /hc switch. CPRT
- will highlight both the standard '/*...*/' comment and comments
- designated by '//' to end of the line.
-
-
-
- Quick Start
- ===========
-
- Some of the more popular printer configurations have been includ-
- ed. Copy the one that best fits your needs to CPRT.CFG. Now you
- can use CPRT simply by typing CPRT <filename>. By default CPRT
- prints to the PRN device. Typing CPRT<cr> displays the correct
- usage and the list of options. The options list is a text file
- called CPRT.USG. If certain options don't apply to your printer
- you can edit this file to give you the correct help information.
- In order for CPRT to find this file you must either be in the
- same directory as CPRT.USG or it must be in your path.
-
- Defaults
- ========
-
- Unless you specify otherwise the default settings are:
- Tab length = 8 characters
- Left Margin = 0
- Line length = 8"
- Top Margin = 0.333" (2 line at 6lpi)
- Bottom margin = 0.5"
- Page Length = 11"
- Print Device = PRN:
-
- Printer configuration file = CPRT.CFG
- Options help file = CPRT.USG
-
- If CPRT.EXE is renamed it will expect its associated files to be
- renamed also. In other words if CPRT.EXE is renamed to PRT.EXE,
- than PRT.EXE will, by default, look for PRT.CFG and PRT.USG. It
- will not look for CPRT.CFG & CPRT.USG.
-
- TIP: CPRT can be copied to a different name for different print-
- ers, which will use different printer configuration files.
-
- CPRT Operators manual Page 4
- ---------------------------------------------------------------
-
-
-
- Options
- =======
-
- To select what and where to print.
- /D:[()=MM-DD-YY] Print according to date.
- Note: () must be used instead of <> since <> are
- DOS redirect symbols.
- /D:)10-31-91 prints files dated after Oct. 31, 91
- /D:=12-25-91 prints files dated on Dec. 25, 91
- /D:(1/1/92 prints files dated before Jan. 1, 92
-
- /PF:filenameAlternate printer configuration file.
- Default = CPRT.CFG.
-
- /PD:filenameAlternate print device.
- To redirect output. Can be LPT<n>, COM<n>,
- <filename>.
- /PD:COM1 prints to COM1 port.
-
- /F:logfile Print files listed in this log file.
- Format: CPRT /F:filename [options]
- This is the only command option that can be used
- in place of a filespec to print!
- Log file is updated when printing is completed.
-
- /LF:logfile Log file.
- Format: CPRT <filename> /lf:<logfile>
- Checks if <filename> is in <logfile>. If not, the
- <filename> is printed and added to the <logfile>.
- Otherwise the dates are compared and only changed
- files are printed. Then the <logfile> is updated
- as needed.
-
- Functions which are set at beginning of print job only.
-
- /S6 Lines per inch. (Default)
- /S8 Lines per inch.
-
- /CP Compressed print.
-
- /10 \
- /12 \
- /15 --- Set characters per inch
- /17 / (Printer must be capable of this)
- /20 /
-
- /Fn Font #. (n = 1-9)
- /DB Double Strike mode. (Entire file)
-
- CPRT Operators manual Page 5
- ---------------------------------------------------------------
-
-
-
- Functions which are checked & set at each page.
-
- /HD Header.
- Contains file name, file date, and page number.
- /FT Footer.
- Contains file name, file date, and page number.
- If both headers & footers are specified then the header will
- contain file name and file date while the footer contains the
- page number.
-
- /TM:n * Top margin in lines or inches.
- /BM:n * Bottom margin in lines or inches.
- /PL:n * Page length in lines or inches.
-
- Functions which are checked & set at beginning of each line.
-
- /LL:n * Line length in characters or inches.
- *
- /LM:n Left margin in character or inches.
- /N Number lines. This will increase the line length.
-
- Functions which are checked & set at each character.
-
- /TL Tab length in characters.
- /HC Highlight comments. The type of highlighting used
- is defined in the printer configuration file.
-
- /WS Translate the following WordStar print commands.
-
- ^B Bold print
- ^D Double print
- ^Y Italics
- ^S Underscore
-
-
- Environment Usage
- ================
-
- Default settings can be put in to the environment using the
- following format:
-
- SET CPRT=/tm:1i /bm:1i /lm:.75i
-
- This line would set default margins for CPRT.EXE. Command
- line switches will override the environment settings.
- However there is no way to override certain switches such as
- /hd, /ft, /n, etc. since these do not have any values passed
- with them.
- --------------------
-
- * To specify inches end the option with the letter 'i', as in
- /ll:8i.
-
- CPRT Operators manual Page 6
- ---------------------------------------------------------------
-
-
-
- If you rename CPRT.EXE the environment variable name must
- also change to correspond to the program name.
-
- TIP: By coping CPRT.EXE to another name, multiple default
- environment settings can be used. For instance: Copy
- CPRT.EXE to PRT.EXE and use the following to set the
- environment variable:
-
- SET CPRT /n /hc /hd /lm:.5i
- SET PRT /lm:.5i /hd /ft
-
- Now CPRT has default settings for printing C source
- code. While PRT can be used as a general purpose print
- program.
-
-
- Printer Configuration File
- ==========================
-
- Most shareware print programs are specifically for one or two
- printers. The reason for this is that the control codes which
- set the different printer features vary from printer to printer.
- CPRT allows the end user to change the printer configuration to
- match which ever printer they have. CPRT's printer configuration
- file can be edited to define the control codes of your printer.
-
- When started, CPRT always checks for the printer configuration
- file in the current directory. It then searches the path as
- defined in the environment. This printer configuration file
- contains control codes to activate the different features of your
- printer.
-
- Control codes can be defined in decimal, hex or ascii.
-
- The default printer configuration file read by CPRT is named
- CPRT.CFG. CPRT supports environments where multiple printers are
- connected to your computer, and even allows you to specify dyna-
- mic printer configuration when you have printers connected to
- your computer using switch boxes. No matter what printer is
- attached you can still get the same results with CPRT. Use the
- /PF: command to specify different printer configuration files to
- CPRT.
-
- The printer configuration file is a standard text file that may
- be edited by any text editor. I've provided a few common printer
- configuration files along with CPRT. All you need to do is copy
- one to your disk, and give it the correct name. A description is
- included at the beginning of each file. You can use the DOS type
- command to view the printer configuration files.
-
- Copy the existing printer configuration file for the printer that
- resembles your printer closest. Then edit that file for your
-
- CPRT Operators manual Page 7
- ---------------------------------------------------------------
-
-
-
- printers characteristics.
-
- Each definition begins with a keyword identifier followed by
- printer codes to be sent to the printer when the related feature
- is activated.
-
- Printer codes are specified as decimal numbers, hex numbers, or
- ascii characters. These numbers are the same numbers defined in
- your printer manual.
-
- The following rules must be followed when creating a printer
- configuration file:
-
- Comments must be the last thing on a line and start with an *
- Control codes must be separated by spaces.
- Codes in decimal must end with a 'd'. e.i. 27d 72d
- Codes in Hex must end with a 'h'. e.i. 1Bh 48h
- Ascii is assumed. e.i. ^[ H
- '^' indicates the following character is a control character.
- ^[ = Esc.
-
- In order to use an * as part of a printer control code, specify
- the character in decimal (42d) or hex (2Ah).
-
-
- Decimal numbers must be 2 characters followed by a 'd', as in 27d
- or 07d.
-
- Hex numbers must be 2 characters followed by a 'h', as in 1Bh or
- 07h. (Not case sensitive).
-
- Ascii codes are straight forward. Just enter the character.
- Control characters are proceeded by a '^'.
-
- +-------------- Ascii definition
- | +--------- Decimal definition
- | | +--- Hex definition
- | | |
- ^[ = 27d = 1Bh.
-
- Note: 1) The '/',and '^' characters are researved in ascii
- notation. Use hex notation when these characters are
- needed.
-
- 2) A 0d or 0h is invalid. Although many printers specifiy
- this character, I've found that an assci 0 also works.
- The only exception to this was in the IBM industial
- graphics printer. ~~~~~~~~~
- This printer is no longer being manufactured.
-
- CPRT Operators manual Page 8
- ---------------------------------------------------------------
-
-
-
- Key Words
- =========
-
- Destination * Defines the print destination, as in
- LPT1, COM1, etc.. Therefore you can
- have multiple printer configuration
- files for printers on different ports.
- CPRT will automatically direct output to
- the correct port.
- Init * Codes sent before printing begins.
- Restore * Codes sent when printing is complete to
- restore the printer to default settings
- DoubleStrikeOn * Code to activate double strike print.
- DoubleStrikeOff * Code to de-activate double strike print.
- CompressedOn * Code to activate compressed print.
- CompressedOff * Code to de-activate compressed print.
- 10CPI * Code to change to 10 CPI pitch.
- 12CPI * Code to change to 12 CPI pitch.
- 15CPI * Code to change to 15 CPI pitch.
- 17CPI * Code to change to 17 CPI pitch.
- 20CPI * Code to change to 20 CPI pitch.
- 6LPI * Code to change to 6 LPI.
- 8LPI * Code to change to 8 LPI.
- BoldOn * Code to activate Bold print
- BoldOff * Code to de-activate Bold print
- ItalicOn * Code to activate italics print
- ItalicOff * Code to de-activate italics print
- UnderscoreOn * Code to activate underscore print
- UnderscoreOff * Code to de-activate underscore print
- HighlightOn * Code to start highlighting of comments
- HighlightOff * Code to end highlighting of comments
- Font1 * Code to change to Font 1
- Font2 * Code to change to Font 2
- Font3 * Code to change to Font 3
- Font4 * Code to change to Font 4
- Font5 * Code to change to Font 5
- Font6 * Code to change to Font 6
- Font7 * Code to change to Font 7
- Font8 * Code to change to Font 8
- Font9 * Code to change to Font 9
- Nlq * Code to activate near letter quality
- mode. Sent prior to font code.
- Draft * Code to activate draft mode. Not used at
- this time.
-
- CPRT Operators manual Page 9
- ---------------------------------------------------------------
-
-
-
- Future Plans
- ============
-
- I've got a few thoughts on how to improve CPRT in the future.
- Here are few that I am sure will make it in to the next release.
-
- 1) Modify DESTINATION key word in printer configuration
- file. Add port setup information if destination is a
- COM port. This will set baud rate, stop bit, data bits
- and parity.
-
- 2) Postscript support: I have an immediate need for this
- option. So it is high on my list of requirements.
-
- 3) "As is" command line switch (/AS). To print file
- without any formatting. Can be used to print README
- files which already have margins, headers, etc..
-
- 4) Add default setup options in printer configuration
- file.
-
- 5) Allow the initialzation string in the printer configu-
- ration file to be a file name. The specified file
- would be sent to the printer before printing begins.
-
- 6) More printer definition file. Since I only have a
- limit number of printers at my access I appreciate any
- input with this.
-
- 7) ??? I could use more input here. Regardless if you
- plan to register your copy, please send me any ideas on
- improving this program.
-
-
- Disclaimer
- ==========
-
- The CPRT program and all accompanying documentation are provided
- on an "AS IS" basis. This means that Harry K. Malsch does not
- warrant, guarantee, or make any other representations regarding
- the use, or results of use, of CPRT or the documentation in terms
- of accuracy, reliability, correctness, currentness, or otherwise.
- Harry K. Malsch will not be held responsible for any direct,
- indirect, incidental, or consequential damages including damages
- for loss of business profits, business interruption, loss of
- business information, or otherwise arising from the use or in-
- ability to use CPRT, even if Harry K. Malsch has been advised of
- the possibility of such damages. The use of this product is on
- an "AT YOUR OWN RISK" basis.
-
- CPRT Operators manual Page 10
- ---------------------------------------------------------------
-
-
-
- Licensing Agreement and Share Ware philosophy
- =============================================
-
- The CPRT program is provided for evaluation use under the Share-
- ware concept. What this means is that you are granted permission
- to use this program for a reasonable period after which you are
- required to register your copy using the Licensing document.
- There is no formal definition of what is implied by "a reasonable
- period" but if you find that you are relying on this product,
- then you SHOULD register.
-
- This will allow for continued support and maintenance of the
- program and will help to encourage that more quality software be
- made available through this channel. I ask all corporate and
- government users of this utility register their copies.
-
- To simply register the program, $20 is requested. For $25 I'll
- send an update copy of CPRT as soon as it is available. In ether
- case I'll send out notifications when the new release is avail-
- able.
-
- If you've downloaded this program after 1992 and can't find a
- later copy than ver 1.02, you can request the current version by
- mail or through EXEC-PC BBS, (414) 789-4210
-
- Mail on EXEC-PC should be sent to HARRY MALSCH.
-
- Address registration requests to:
-
- Harry K. Malsch
- W165 S7391 Bellview Dr.
- Muskego, WI 53150
-
- Following this section is a form that may be used to register
- CPRT.
-
- You are encouraged to distribute CPRT to electronic bulletin
- boards (BBS's), and to your friends and associates as long as all
- files remain unchanged and packaged in the same form as it was
- received.
-
- You are not allowed to profit from the distrubution of CPRT
- without writen permission from the author, Harry K. Malsch.
-
-
- HELP SUPPORT THE SHAREWARE CONCEPT.
-
- Registered CPRT 1.02 Order Form
- ---------------------------------------------------------------
-
-
-
-
- --------------------------------------------------------------------
- --------------------------------------------------------------------
- QTY Description US Dollars
- --------------------------------------------------------------------
- ____ CPRT print utility w/special C code formats .............$20.00
- DOS & OS/2 version.
-
- ____ For advance purchase of the next release, add ...........$ 5.00
-
- ____ Shipping/Handling for orders outside USA, add ...........$ 5.00
-
- Total amount of my order is: $________
-
- Check or money Order (US FUNDS)!
-
- Disk Size (circle one)? 5 1/4 3 1/2
-
- ===================================================================
-
- Name: __________________________________________________
-
- Company: _______________________________________________
-
- Address: _______________________________________________
-
- _______________________________________________
-
- City: ________________________ State: ________ Zip: __________
-
-
- I learned about CPRT from: ____________________________________
-
- Suggestions & requests: _______________________________________
-
- _______________________________________________________________
-
- _______________________________________________________________
-
- _______________________________________________________________
-
- _______________________________________________________________
-
- Make check payable to Harry K. Malsch
- W165 S7391 Bellview Dr.
- Muskego, WI 53150
-
- IF YOU HAVE CREATED A PRINTER CONFIGURATION FILE FOR A PRINTER OTHER
- THAN THE ONES INCLUDED. PLEASE SEND ME A COPY. IT MAY BE INCLUDE
- WITH THE NEXT RELEASE.
-