home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programming
/
powerprogramming1994.iso
/
progtool
/
turbopas
/
tlist23.arc
/
TLIST.DOC
< prev
next >
Wrap
Text File
|
1987-12-20
|
30KB
|
768 lines
TLIST.EXE Version 2.3 12/18/87
Turbo Pascal Source Code Lister
TLIST.EXE
Version 2.3
A Turbo Pascal Source Code Lister
Copyright (c) 1987 Omni Software Associates
All Rights Reserved
Written By
R.C. Ascheri
GENIE: AMIGAMAN
BBS: RANDOM ACCESS
(714) 521-6386
PC EXCHANGE
(714) 956-5468
Copyright (c) 1987 Omni Software Associates
TLIST.EXE Version 2.3 12/18/87
Turbo Pascal Source Code Lister
NO-NONSENSE LICENSE
All versions of TLIST.EXE, starting with version 2.0, are
placed in the public domain and are hence known as free
software. This shall include the actual program TLIST.EXE
and the corresponding documentation TLIST.DOC along with any
trouble reports.
No fee, charge or other compensation may be accepted or
requested for any version of TLIST.EXE (it is free!).
TLIST.EXE may not be distributed in conjunction with any
other product where a charge exists for the original
product.
The TLIST package shall consist of TLIST.EXE, TLIST.DOC,
TEST.PAS, TEST.LIB, README, RUNME.BAT and any update
notices, bug reports etc..
The source code for TLIST.EXE can be obtained from the
author for the minimal cost of $25.00. This shall include
one diskette with the Turbo Pascal 4.0 Source Code,
any and all libraries required, along with the
documentation, etc.. To order the source code, fill out the
order blank and mail it to the addressee according to the
instructions at the end of this documentation.
WARRANTY
Omni Software Associates makes no warranty of any kind,
express or implied, including without limitation, any
warranties of merchantability and/or fitness for a
particular purpose. Omni Software Associates shall not be
liable for any damages, whether direct, indirect, special or
consequential arising from a failure of this program to
operate in the manner desired by the user. Omni Software
Associates shall not be liable for any damage to data or
property which may be caused directly or indirectly by use
of the program.
IN NO EVENT WILL Omni Software Associates BE LIABLE TO YOU
FOR ANY DAMAGES, INCLUDING ANY LOST PROFITS, LOST SAVINGS OR
OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF
YOUR USE OR INABILITY TO USE THE PROGRAM, OR FOR ANY CLAIM
BY ANY OTHER PARTY.
Copyright (c) 1987 Omni Software Associates
TLIST.EXE Version 2.3 12/18/87
Turbo Pascal Source Code Lister
1.0 INTRODUCTION
What is TLIST.EXE? TLIST is a Turbo Pascal Source Code
Listing utility that produces nice listings of Turbo Pascal
Source Code. The utility itself was thought of by Borland
International with their LISTER.PAS utility that has
accompanied all of their Turbo Pascal Compilers since
version 2.0. However, LISTER.PAS was just a simple listing
generator. It didn't have any special formatting commands
of any kind.
TLIST.EXE has many different formatting capabilities as well
as some special functions for including the page number,
current date, and current time in either the heading or the
footing margins. TLIST.EXE also supports four different
kinds of printers HP2000, EPSON, OTC and TOSHIBA. Other
printer types can be added easily upon request.
Copyright (c) 1987 Omni Software Associates
TLIST.EXE Version 2.3 12/18/87
Turbo Pascal Source Code Lister
2.0 OPERATION
TLIST is basically a command line driven utility. It has
three forms of entry that are recognized. They are as
follows:
d:> TLIST <RETURN>
d:> TLIST ? <RETURN>
d:> TLIST filename.ext [-I] <RETURN>
The first form above will display the syntax of how TLIST
must be called, much like the above information. The second
form will display all of the information relating to dot
commands, with a general description of each dot command.
The final form is the normal method used to format and
display a turbo pascal source file. This final method
requires the filename of the file to be printed. Naturally,
the filename can begin with a drive and path. The [-I] is
an opttional parameter which is used to disable the
inclusion of any include files. The output from TLIST is
normally sent to the screen. You must redirect the output
to the printer to actually get a hardcopy of the formatted
output. As an example to format and print the source for
TLIST.PAS, you would enter:
d:> TLIST TLIST.PAS >PRN
Since Turbo Pascal 4.0 allows nested include files TLIST was
written to automatically include the source code from
normal and nested include files using the Turbo Pascal
include directives. The include directive MUST begin in
column number one for the files to be included, otherwise
the include directive is ignored. Remember that the turbo
pascal include directive has the form:
{$I filename.ext}
^
Must start in column number one.
Copyright (c) 1987 Omni Software Associates
TLIST.EXE Version 2.3 12/18/87
Turbo Pascal Source Code Lister
3.0 DOT COMMANDS
What is a dot command? A dot command is a string of
characters that is placed between the turbo pascal comment
braces. All dot commands must begin in the first column.
The form of a dot command is "{.XXYYYYYYYY}". The XX
represents the two character command to be executed. The
YYYYYY represents the parameters for the command XX. Most
of the dot commands should always appear at the beginning
of the source code so that proper initialization can occur.
The following paragraphs will describe each of the dot
commands in full detail, where they should be placed, and
what function they perform. None of the dot commands will
be executed if they do NOT start in column number one.
3.1.1 Set Page Length - .PL
The set page length dot command sets the maximum number of
lines per page to the value specified. The format is .PLnn
where nn is an integer number. The number should be based
upon the number of lines per inch of the character font
being used and the actual paper size. With the standard 6
lines per inch characters and an 8.5 X 11 inch letter size
paper, the maximum number of lines per page would be 66.
The .PL command should be placed at the beginning of the
source code. This value can automatically be set by the .PT
dot command.
3.1.2 Page Check - .PC
The page check dot command will generate a new page break if
the value specified in the dot command is larger than the
current line number minus four (the bottom footer). The
format of the page check command is .PCnn, where nn is a
value between zero and the maximum number of lines per page.
The maximum number of lines per page should have been
initialized accordingly, prior to the use of the conditional
page command. This dot command may appear anywhere within
the source code.
3.1.3 Immediate Page Break - .PA
The immediate page break dot command will start a new page
immediately. A new page consists of printing the footer for
the previous page followed by a new page (form feed) and
then the heading information for the new page. The format
of the new page dot command is .PA. No other parameters are
required. This dot command may appear anywhere within the
source code.
Copyright (c) 1987 Omni Software Associates
TLIST.EXE Version 2.3 12/18/87
Turbo Pascal Source Code Lister
3.1.4 Set Left Margin Offset - .PO
The set left margin offset dot command will add a series of
blank characters to the left side of the turbo pascal source
code. The format of the set left margin is .POnn, where nn
represents the number of spaces to be inserted on the left
side of the turbo pascal source code. This dot command
should appear at the beginning of the source code, unless
for some reason you want to unindent the left margin for a
piece of source code.
3.1.5 Set Current Page Number - .PN
The set current page number dot command will change the
current page number variable to the value specified in the
dot command. The format of the command is .PNnn, where nn
represents the new current page number. This dot command
may appear anywhere within the source code, but is usually
placed at the beginning of the source code if required at
all. The starting page number will always be zero (0),
therefore all source code should contain an immediate page
break after initializing all of the variables. See the test
source file for an example.
3.1.6 Set Printer Defaults According To Type - .PT
The set printer defaults type dot command is a command that
will change all of the printer control variables to their
default values according to the printer name specified in
the dot command. The format of this command is .PT<name>,
where <name> represents one of the following names, HP2000,
EPSON, OTC or TOSHIBA. When a specific printer is selected,
the page offset, number of lines per page, normal, bold,
initialization and de-initialization strings are all set to
their corresponding values for that specific printer type.
Using this command to set all of the printer defaults is
much easier than setting each of these printer controls
separately. This command should always appear at the
beginning of the source code because the printer is
initialized immediately after selecting the printer type.
This command will only be processed once. By only
processing this command once, include files may also contain
the printer type dot command. When the include file is
listed by itself the printer type will be processed, when it
is listed from the main file the printer type will NOT be
processed.
Copyright (c) 1987 Omni Software Associates
TLIST.EXE Version 2.3 12/18/87
Turbo Pascal Source Code Lister
3.1.7 Turn Listing Generation OFF - .L-
The turn listing generation off dot command is used to turn
off the physical listing (output) of the source code. Once
the listing generation has been turned off, NO text is sent
to the output file until a turn listing generation on dot
command is processed. The format of this command is .L-.
No other parameters are required. This command may appear
anywhere within the source file to turn the listing
generation off.
3.1.8 Turn Listing Generation ON - .L+
The turn listing generation on dot command is used to turn
on the physical listing (output) of the source code. This
must be done to start listing source code once it has been
turned off with the listing generation off command. The
format of this command is .L+. No other parameters are
required. This command may appear anywhere within the
source file to turn the listing generation back on, after
having it turned off with the listing off command.
3.1.9 Set Start Of Heading String - .SH
The set start of heading string dot command will set the
start of string variable to the specified string found in
the line. The start of heading string is written to the
output device prior to the actual heading string. This
allows the heading to be printed in any font desired because
the string may be changed to any string desired. This dot
command should normally be placed at the beginning of the
source file.
3.1.10 Set Start Of Footing String - .SF
The set start of footing string dot command will set the
start of footing variable to the specified string found in
the line. The start of footing string is written to the
output device prior to the actual footing string. This
allows the footing to be printed in any font desired because
the string may be changed to any string desired. This dot
command should normally be placed at the beginning of the
source file.
Copyright (c) 1987 Omni Software Associates
TLIST.EXE Version 2.3 12/18/87
Turbo Pascal Source Code Lister
3.1.11 Set Heading Text - .MH
The set heading dot command is used to place a specific
string of text characters at the beginning of each and every
page. The format of this command is .MH<text>, where <text>
can be any character string. Two types of control
characters are allowed in the string. The first type can
consist of the imbedded control characters ^N and ^T. These
controls represent the turn bold on string and turn bold off
strings. When either of these controls are contained in the
string the strings are expanded to the necessary characters
to select BOLD or NORMAL text mode. If neither of these
controls are present in the string then all string control
characters of the form ^X and ( ) are packed into actual
control characters and placed in the heading variable. Note
that the ( ) sequence is used to generate characters in the
range $80 - $FF range.
This next example contains string control characters which
will be converted to actual control characters. The other
alternative would be to imbed the control characters ^N and
^T for bold and normal text mode into the heading string.
{.MH^[!8Turbo Pascal Source Code Lister^[!^D}
This would have been converted to something like:
<ESC><!><8>Turbo Pascal Source Code Lister<ESC>!<EOT>
The set heading dot command may also contain three special
function character strings, #, @D and @T. The # will always
be replaced with the current page number. To get the actual
# character in the heading use ##. The @D will always be
replaced with the current date in form MM/DD/YY, and the @T
will always be replaced with the starting time of the
listing in the form HH:MM:SS.
This dot command may appear anywhere within the source code,
BUT it will only be processed one time. Use the .CH command
to actually change the heading to some other text string.
3.1.12 Change Heading Text - .CH
The change heading dot command is used to change the heading
that appears at the beginning of each and every page. This
command is exactly the same as the .MH dot command (section
3.1.11), except that this dot command may appear anywhere
within the source file, and it will be processed each and
everytime it appears. The .MH dot command is only processed
one time.
Copyright (c) 1987 Omni Software Associates
TLIST.EXE Version 2.3 12/18/87
Turbo Pascal Source Code Lister
3.1.13 Set Footing Text - .MF
The set footing dot command is used to place a specific
string of text characters at the end of each and every page.
The format of this command is .MF<text>, where <text> can be
any character string. Two types of control characters are
allowed in the string. The first type can consist of the
imbedded control characters ^N and ^T. These controls
represent the turn bold on string and turn bold off strings.
When either of these controls are contained in the string
the strings are expanded to the necessary characters to
select BOLD or NORMAL text mode. If neither of these
controls are present in the string then all string control
characters of the form ^X and ( ) are packed into actual
control characters and placed in the footing variable. Note
that the ( ) sequence is used to generate characters in the
range $80 - $FF range. See the heading description above or
the test source file for an example.
The set footing dot command may also contain three special
function character strings, # (as shown above), @D and @T.
The # will always be replaced with the current page number.
To get the actual # character in the footing use the ##
sequence. The @D will always be replaced with the current
date in form MM/DD/YY, and the @T will always be replaced
with the starting time of the listing in the form HH:MM:SS.
This dot command may appear anywhere within the source code,
however it is usually set once at the beginning of the
source code.
3.1.14 Change Footing Text - .CF
The change footing dot command is used to change the footing
that appears at the bottom of each and every page. This
command is exactly the same as the .MF dot command (section
3.1.13), except that this dot command may appear anywhere
within the source file, and it will be processed each and
everytime it appears. The .MF dot command is only processed
one time.
3.1.15 Set End Of Heading/Footing String - .SE
The set end of heading/footing string dot command will set
the end of heading/footing variable to the specified string
found in the line. The end of heading/footing string is
written to the output device after the actual heading or
footing have been written. This allows the heading and
footing to be printed in one type of font and then continue
with the normal type of font. This dot command should
normally be placed at the beginning of the source file.
Copyright (c) 1987 Omni Software Associates
TLIST.EXE Version 2.3 12/18/87
Turbo Pascal Source Code Lister
3.1.16 Set Printer Initialization String - .SI
The set printer initialization string dot command is used to
set the printer initialization string to a series of text
characters. The format of this command is .SI<text>, where
<text> can be any character string. Special string control
characters can be placed in the string. These special
string control characters have the form ^X or ( ), where X
represents any character between A..Z. The ( ) sequence is
used to generate characters in the range $80..$FF.
As an example the string: {.SI^[E^[%(^A)}
Would be converted to: <ESC><E><ESC><%><$81>
Where $81 represents the character $81 and not the three
characters $,8 and 1.
This dot command may appear anywhere within the source code,
however it is usually set once at the beginning of the
source code. It is not required when the printer type
command is used.
Copyright (c) 1987 Omni Software Associates
TLIST.EXE Version 2.3 12/18/87
Turbo Pascal Source Code Lister
3.1.17 Set Printer De-initialization String - .SD
The set printer de-initialization string dot command is used
to set the printer de-initialization string to a series of
text characters. The format of this command is .SD<text>,
where <text> can be any character string. Special string
control characters can be placed in the string. These
special string control characters have the form ^X or ( ),
where X represents any character between A..Z. The ( )
sequence is used to generate characters in the range
$80..$FF.
This dot command may appear anywhere within the source code,
however it is usually set once at the beginning of the
source code. It is not required when the printer type
command is used.
3.1.18 Set Bold Text Mode String (^N) - .SB
The set bold text mode string dot command is used to set the
bold text mode string variable to a series of text
characters. The format of this command is SB<text>, where
<text> can be any character string. Special string control
characters can be placed in the string. These special
string control characters have the form ^X or ( ), where X
represents any character between A..Z. The ( ) sequence is
used to generate characters in the range $80..$FF.
This dot command may appear anywhere within the source code,
however it is usually set once at the beginning of the
source code. It is not required when the printer type
command is used.
3.1.19 Normal Text Mode String (^T) - .SN
The set normal text mode string dot command is used to set
the normal text mode string variable to a series of text
characters. The format of this command is SN<text>, where
<text> can be any character string. Special string control
characters can be placed in the string. These special
string control characters have the form ^X or ( ), where X
represents any character between A..Z. The ( ) sequence is
used to generate characters in the range $80..$FF.
This dot command may appear anywhere within the source code,
however it is usually set once at the beginning of the
source code. It is not required when the printer type
command is used.
Copyright (c) 1987 Omni Software Associates
TLIST.EXE Version 2.3 12/18/87
Turbo Pascal Source Code Lister
4.0 CONCLUSIONS
The turbo pascal lister was written to clean up listings and
make them look real nice. "If there's anything I can't
stand, it's a messy listing that is hard to read". I hope
that everyone will find it as useful as I have, and as fun
using it as I had writing it! If you have any comments or
recommendations regarding this listing utility, or bug
reports, please send them to Richard Ascheri via:
GENIE: AMIGAMAN
BBS: RANDOM ACCESS, SYSOP
(714) 521-6386
PC EXCHANGE, Rick Ascheri
(714) 956-5468
Also, if you find the program useful why NOT go ahead and
order the source code for it, especially if you've just
purchased your Turbo Pascal 4.0 Compiler.
Copyright (c) 1987 Omni Software Associates
TLIST.EXE Version 2.3 12/18/87
Turbo Pascal Source Code Lister
ORDERING INFORMATION
To order the source code for TLIST.EXE include $25.00 with
the order form and mail to the appropriate mailing address
as listed below:
Attn: Richard Ascheri
Omni Software Associates
15027 Watkins,
La Mirada, CA. 90638
You will receive an IBM formatted 360K diskette containing
the source code and all library files necessary to compile
the source code and create a new TLIST.EXE file.
Payment by: ( ) Check ( ) MoneyOrder
Make Checks & Money Orders Payable To: Richard Ascheri
Name: ____________________________________________________
Company: ____________________________________________________
Address: ____________________________________________________
: ____________________________________________________
: ____________________________________________________
Day Phone: ______________________ Eve: ________________________
Copyright (c) 1987 Omni Software Associates