Brain Phrye

code cooking diy fiction personal photos politics reviews tools 


APC to fpc - notes

Some notes on the conversion:

My coding style was far less consistent back then and that makes it harder to read the code. In this first pass I’ve made one-line summaries of the code as I’ve ported them and my style back then has made some programs a bit unscrutible.

Indenting varied so following program flow is a bit harder. Pascal is not case-sensitive and my capitalisation varied which makes it hard to find variables and include files. Even things like a space after commas and consistent spacing around operators would have been nice.

DOS conversions go beyond linefeeds. I used the upper part of the DOS characters for various ascii art reasons. Specifically I was using code page 437 (news to me) and that needed to be converted as well. Files that looked fine in dosbox looked like garbage on Linux.

There were several options - dos2unix, iconv and recode which is the one I went with in the end. Converting the files was as simple as recode cp437..utf8 *.pas