ptop(1)

πŸ“¦
version 3.2.4~rc1 Β· 3 versions
, in arch rolling, epel 10, epel 9, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0

πŸ’… ptop(1) β€” the FPC Pascal source beautifier, bestie edition ✨

okay so like. <rainbow>ptop</rainbow> is the FPC Pascal configurable source beautifier. That's the whole name. And its origin? Probably Pascal-TO-Pascal, which is honestly such a glow-up story. πŸ¦‹


✨ SYNOPSIS ✨

ptop[-v][-iindent][-bbufsize][-coptsfile]<infile><outfile>

like yes that's a lot of brackets, we'll get through it together, breathe 🫢


🌸 DESCRIPTION 🌸

So <pink>ptop</pink> is a more-or-less configurable source beautifier for Pascal sources, and especially the ones that FPC supports β€” which are more or less Turbo Pascal or Delphi 2.0 compatible. So basically if your code is giving chaos gremlin energy, ptop is the friend who shows up with a hairbrush. πŸ’–

ptop belongs to the FPC utils package, which currently also contains ppdep, h2pas, ppudump and ppumove. it's a whole friend group, they're all iconic in their own way. πŸ‘‘


πŸ’« Usage πŸ’«

ptop basically reformats infile and outputs the result to outfile. It uses a configuration file explained further below, and it can generate a default configuration file for you to edit. (not needed if you use the defaults β€” lowkey just run it, bestie) 😌


πŸŽ€ Options πŸŽ€

  • -h β€” writes a short description of these switches. a little "hi hello here's what I do" moment. πŸ‘‹
  • -c β€” read options from the configuration file. a configuration file is not needed tho; ptop will revert to internal defaults then. See also -g.
  • -i ident β€” sets the number of indent spaces used for BEGIN END; and other blocks. this is where you decide how much breathing room your code gets. 🫁
  • -b bufsize β€” sets the buffersize to bufsize. Default 255. And heads up: 0 is considered non-valid and ignored. so don't try it, it will simply not be the moment. πŸ’€
  • -v β€” be verbose. Currently only outputs the number of lines read/written and some error messages. she's chatty but only a little. πŸ—£οΈ
  • -g ptop.cfg β€” writes a default configuration file to be edited to the file ptop.cfg. go ahead, customize, make it yours. 🎨

Try to play with ptop and its configfile until you find the effect you desire. The configurability and possibilities of ptop are quite large compared to shareware source beautifiers found on e.g. SIMTEL. like genuinely, she has range. πŸ’…


🫢 Acknowledgements 🫢

The writer of the program, Michael van Canneyt, who also helped out explaining the format of ptop.cfg. literal king behavior, no cap. πŸ‘‘

Questions/corrections can be mailed to fpc-devel@vekoll.saturnus.vein.hu β€” slide into the inbox if something's off. πŸ“¬

Also thanks to the rest of the FPC development team. the whole squad. πŸ«‚

The program is a modernized (OOP, Streams, Delphi extensions) version based on a program by Peter Grogono, who in turn based his program on a Pascal pretty-printer written by Ledgard, Hueras, and Singer. See SIGPLAN Notices, Vol. 12, No. 7, July 1977, pages 101-105, and PP.DOC/HLP. This version of PP developed under Pascal/Z V4.0 or later. Very minor modifications for Turbo Pascal made by Willett Kempton March 1984 and Oct 84. Runs under 8-bit Turbo or 16-bit Turbo. Toad Hall tweak, rewrite for TP 5, 28 Nov 89. it's giving ancestry.com for compilers, honestly. 🌳✨


πŸ¦‹ SEE ALSO πŸ¦‹


and that's the whole page, bestie!! this one came from Free Pascal, dated 30 may 1999 β€” vintage but still serving, we love to see it. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from