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