data2inc(1)
πΎ data2inc(1) β the manual, but make it cute
okay so bestie, gather round, because we're talking about data2inc from the Free Pascal crew β it's a binary-to-pascal-include-file converter and it's genuinely so useful, no cap. π
β¨ NAME β¨
data2inc β Free Pascal binary to pascal include file converter. that's the whole vibe. π
πΈ SYNOPSIS πΈ
data2inc [-ABSVH] msgfile [incfile] [constname]
look at her. three optional positional args, five lil flags, living her best life. π¦
π DESCRIPTION π
so here's the tea: data2inc reads a binary or text file and converts it to a pascal typed constant declaration. that's the whole main character moment.
the constant it makes is an array of characters (zero based), and like β each character's ascii value is the value of the byte at the offset index in the binary file. (and index is just the index in the array, iykyk.) so byte 0 β array slot 0, byte 1 β array slot 1, etc etc, it's giving "mirror". β¨
and if the input file is a text file? then options will be read from the file itself, and an output file will be generated according to the options encountered. cute, right? the file tells you what to do. π
π«Ά USAGE π«Ά
two whole modes, bestie, pick your fighter:
mode one β -B (binary mode): data2inc with the -B option accepts a filename of a binary file, and it needs the name of an include file and a constant name. the output gets written to incfile. and the name of the constant constname is mandatory for a binary file β like, you cannot skip it, she will not let you. π
mode two β no -B (message file mode): data2inc without the -B option takes the name of a message description file as input. it will process the message file and write the output as described in the message file to incfile. the file is basically the boss here. π
π OPTIONS π
data2inc has a small number of options to control its behaviour β small but mighty, fr fr:
-Aβ write bytes instead of characters. the constant array will be an array ofbyteinstead of an array ofchar. little type glow-up. π-Bβ if this option is given, themsgfilewill be treated as a binary file. π§-Hβ emit a small helptext. tiny help, big heart. πΈ-Sβdata2incwill write the output as an array of strings, or a 2 dimensional array of characters. two-dimensional?? she contains multitudes. π-Vβ show the version number and exit. that's it, that's the whole job, and she ate. β
π₯ SEE ALSO π₯
go read those too, they're iconic in their own right. π
ngl, if you're feeding her a binary file and you forget constname, that's on you β it's mandatory, remember? π«Ά
okay that's the whole page!! this lil manual came from the Free Pascal fam, dated 12 November 2004, and it lives in section 1 of the manual β so yeah, data2inc(1), we love her, we stan, bye bestie!! π
β¨ππ¦π
π¦ where this page comes from
- debian bookworm: fp-utils-3.2.2 3.2.2+dfsg-20 Β· GPL-2.0-or-later
- debian trixie: fp-utils-3.2.2 3.2.2+dfsg-46 Β· GPL-2.0-or-later
- ubuntu jammy: fp-utils-3.2.2 3.2.2+dfsg-9ubuntu1 Β· GPL-2.0-or-later
- ubuntu noble: fp-utils-3.2.2 3.2.2+dfsg-32 Β· GPL-2.0-or-later
- ubuntu questing: fp-utils-3.2.2 3.2.2+dfsg-46
- ubuntu resolute: fp-utils-3.2.2 3.2.2+dfsg-49 Β· GPL-2.0-or-later
- ubuntu stonking: fp-utils-3.2.2 3.2.2+dfsg-51 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms