Meh, a dozen lines of perl would have done as much.
Printable View
Meh, a dozen lines of perl would have done as much.
I would test the code on something trivial first if you are going to use what I wrote. I just slapped it together really quick and didn't exactly test it or compile it or even do much with it. It wouldn't hurt to put the FAR_POINTER thing into its own header with LOTS of precompiler directives determining the correct OS and whatnot. And simply change
toCode:fputs("#ifndef FAR_POINTER\n# ifdef OLD_OS\n# define FAR_POINTER @far\n# else\n# define FAR_POINTER\n# endif\n#endif\n\n", ofile);
But how you do it is entirely up to you :) I am glad we didn't scare you off or anything. I am known to be a bit of a smart alec.Code:fputs("#include \"the_afore_mentioned_header.h\"\n", ofile);