Files
Cody Boone Ferguson 1b65c59cd4 Improve my fixes to 1998/schweikh1
To make this slightly more portable still I have removed the hard-coding
of gcc to make it just be cc. In modern systems this should be fine.
This involved updating the magic numbers by subtracting one from each,
making them (in the primary version 43 and 45 and 94 and 96 in the
alternate code for macOS) but since one of the purposes of the fixes of
code include making them work in more systems I have made it use cc as
it should work (gcc is most likely in all systems anyway but it seemed
like a better idea for 2023).

I previously noted in the thanks-for-fixes.md that the mode in fopen()
could remain 44+__FILE__ (though as noted above it's now 43) but that I
had changed it to "r". This was a mistake and it is now restored though
again it is now 43 not 44.

The FILE * which was renamed to G has been changed back to H. Observe
how there is a macro with the same name. There was actually no need to
change it.

I have restored some of the control codes in the C preprocessor
directives. Unfortunately that is only prior to the #define because some
systems will give an annoying warning otherwise. For instance fedora
linux shows:

    schweikh1.c:6:8: warning: form feed in preprocessing directive
	6 | #define
		   x
		    )
		     ==
		       0
			?__LINE__:0){O
				      =__LINE__;break;}
						       }
	  |

and possibly vertical tab too.

So although it would be ideal to have them closer to the original I deem
that preventing warnings that cannot be, for whatever reason, disabled.

The thanks-for-fixes.md was updated for these changes and now includes
more details on the fixes to match the rest of the other entries (though
some might also be lacking in details).
2023-10-15 05:39:49 -07:00

2.1 KiB