ptop is a source beauti er written by Peter Grogono based on the ancient pretty-printer by
Ledgard, Hueras, and Singer, modernized by the Free Pascal team (objects, streams, con gurability
etc).
This con gurability, and the thorough bottom-up design are the advantages of this program over
the diverse Turbo Pascal source beauti ers on e.g. SIMTEL.
The program is quite simple to operate:
ptop "[-v] [-i indent] [-b bufsize ][-c opts le] in le out le"
The in le parameter is the Pascal le to be processed, and will be written to out le, overwriting an
existing out le if it exists.
Some options modify the behaviour of ptop:
-
-h
- Write an overview of the possible parameters and command line syntax.
-
-c ptop.cfg
- Read some con guration data from con guration le instead of using the
internal defaults then. A con g le is not required, the program can operate without
one. See also -g.
-
-i ident
- Set the number of indent spaces used for BEGIN END; and other blocks.
-
-b bufsize
- Set the streaming bu ersize to bufsize. The default is 255; 0 is considered
non-valid and ignored.
-
-v
- Be verbose. Currently only outputs the number of lines read/written and some error
messages.
-
-g ptop.cfg
- Write ptop con guration defaults to the le "ptop.cfg". The contents of this le
can be changed to your liking, and it can be used with the -c option.