I've had an adventure and a half compiling fortune-mod. First, I tried Windows. Gave up on that, decided to go for Linux. There were some dependencies I had to install, including some Perl stuff, docbooks (which I eventually realized could be installed by just installing docbook-xsl and docbook-xsl-ns, available at all your favorite package managers).
And then the, er, "special" fortune file I was making just would not work. Here's the output:
"special.dat" created
There was 1 string
Longest string: 1731 bytes
Shortest string: 1731 bytes
I can tell you right now that the file is not, in fact, one long 1731-byte quote.
I BSed around in this using strfile to check if it's doing anything funky, then I copied in the contents of a different fortune file, and it actually just broke like this too. I realized that if opened it in Nano, it was saving my "special" file in DOS format.
So what if: DOS format is breaking the file? So I went into Nano, went to save it, and deselected DOS format while saving. And only now it works.
"special.dat" created
There were 7 strings
Longest string: 484 bytes
Shortest string: 42 bytes
WTF, strfile? Aren't you supposed to be portable? Why should a little bit of Carriage Return mess so badly with a program that looks for percent symbols as delimiters? I think it's because it's using a single char instead of a char[2] array, hence why CR-LF breaks it so bad. I can now confirm that it works properly, thank fuck.
Hey, if anyone wants to patch Windows and Mac format support into strfile and commit it into the official repo, be my guest.