Make my fix to 1985/sicherman more like original

Yet again I was able to make it more like the original. This was done by
changing the 'C' macro to be 'c' and 'V' macro to 'v' so that I could
use 'C' and 'V' in main(). A minor downside is that the ')' at the end
of the line

     *	up.) (In the C Manual)*/

had to be commented out but since main() can now have both 'C' and 'V'
as parameters of the same type this seems well worth it.

Notice how the 'c' macro is now what the 'C' originally was, /b/! The
'V' to 'v' macro did not change its definition but now 'V' can be used.

Also the variable _ can be assigned to in main() it's just that the
subr() function cannot be called (previously both parts were commented
out).

Since C is now free we can have in subr() C be a char * which is what it
was originally.

Finally instead of having pairs of '"'s in subr() for the string
(assigned to C) we just escape the inner quotes.

The only difference from the original, besides the macro names and the
look it up in the C Manual part (I think in my tired head), is that some
of the macros have to be expanded and the subr() cannot be called. If I
can later on (that I am working on this is circumstantial, seeing an
untracked file when trying to clean up git status as it's too messy now)
figure out how to not have to expand the macros that would be great but
it's very possible that this is as close to the original as possible.
But since I said that before who knows.
This commit is contained in:
Cody Boone Ferguson committed 2023-11-17 03:39:24 -08:00
1 parent 578d96a00e
commit e8eec65f9b
3 files changed
+43 -30

No files matched your search

+2 -1
View File
@@ -40,7 +40,8 @@ include ../../var.mk
#
CSILENCE= -Wno-comment -Wno-deprecated-non-prototype -Wno-main -Wno-pedantic \
-Wno-return-type -Wno-strict-prototypes -Wno-unused-parameter -Wno-implicit-int \
-Wno-implicit-function-declaration -Wno-unused-value -Wno-multichar
-Wno-implicit-function-declaration -Wno-unused-value -Wno-multichar \
-Wno-uninitialized -Wno-unused-but-set-parameter
# Common C compiler warning flags
#