unitdiff(1)

πŸ’– unitdiff(1) β€” the FPC unit difference viewer, bestie edition πŸ’–

okay so you know how you've got two versions of a Free Pascal unit and you're squinting at them like πŸ‘€ trying to spot what changed? yeah. that's this. welcome to unitdiff, a whole little tool from the Free Pascal family that reads your unit source files and tells you what's different. she's niche, she's specific, and honestly? she ate. ✨


🌸 NAME 🌸

unitdiff β€” describes the differences in the interface of a FPC unit. that's it, that's the job, no cap. πŸ¦‹


✨ SYNOPSIS ✨

unitdiff [ --disable-arguments] [ --disable-private] [ --disable-protected] [ --help] [ --lang=language] [ --list] [ --output=filename] [ --sparse] file1 file2

πŸ’… Description πŸ’…

okay so basically: unitdiff scans one or two Free Pascal unit source files, and then does one of two things β€” either it lists every available identifier, or it tells you the differences in identifiers between the two units. that's the whole vibe. pick your adventure. πŸŽ€


🫢 Usage 🫢

you can invoke unitdiff with just one required argument, a single input filename. do that and it'll simply list all the available identifiers for you. cute, simple, low-effort. πŸ’–

but the regular use β€” the main character usage, if you will β€” is calling unitdiff with input1 input2 arguments. then it shows you the difference in the interface between the two units, or lists the available identifiers in both of them. iconic behavior. πŸ‘‘

by default, the output of unitdiff goes to standard output. so like, it just shows up on your screen. no extra steps. πŸ¦‹


πŸ”₯ Options πŸ”₯

unitdiff has some options, most of them optional (the audacity, the nerve, the gall πŸ’€) β€” and in most cases the defaults will be used, so don't stress if you ignore them.

  • --disable-arguments β€” if you specify this, unitdiff will not check the arguments of functions and procedures. by default? yeah, those get checked too. so this is you telling her to mind her own business about the args. πŸ™ˆ
  • --disable-private β€” by default, private methods of classes are checked. but if you specify this option, private fields or methods are not checked. your private business stays private, periodt. πŸ’…
  • --disable-protected β€” by default, protected methods of classes are checked. if you specify this option, then protected and private fields or methods are not checked. it's giving "don't look at me" energy. 🫣
  • --help β€” emits a short help text and exits. the "just tell me what to do" button. πŸŽ€
  • *--lang=language* β€” sets the language for the output file. this mainly sets the strings used for the headers in various parts of the documentation files (by default they're in english). currently, the valid options are:
    • de β€” German. πŸ‡©πŸ‡ͺ
    • fr β€” French. πŸ‡«πŸ‡·
    • nl β€” Dutch. πŸ‡³πŸ‡±
  • --list β€” if this option is specified, only the list of available identifiers will be specified for the unit or units. and heads up bestie: if only 1 unit is specified, this option is automatically assumed. no take-backs. ✨
  • *--output=filename* β€” this option tells unitdiff where the output should go. if you don't specify it, the output is sent to standard output (the screen). so like, filename = where it goes, nothing = your eyeballs. πŸ‘€
  • --sparse β€” turns on sparse mode. in this mode, the output will not contain the types of the identifiers β€” only the names of the identifiers get written to the output. by default, type descriptions are written too. minimalism era. πŸ“

🌈 SEE ALSO 🌈

go read those too, they're the supporting cast and they're lowkey essential. πŸ’œ


real talk: this is a documentation-ish tool, so when you point it at files, make sure you actually know which files you're pointing it at. it reads and compares, it doesn't judge (much). 🧚

okay that's the whole page!! this one came from Free Pascal and it's dated 14 November 2004 β€” an absolute vintage baddie, older than most of us and still doing her thing. mwah. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from