From 4836ed462265105cf380715f674c122ac9b6d99f Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Wed, 4 Oct 2023 03:17:00 -0700 Subject: [PATCH] Greatly improve my 1985/sicherman fix My original fix that made it not require -traditional-cpp translated some macros that rather made the entry not look as good by which I mean it did not look like it used to but now much less is commented out because the macro is left as is (though in use it is commented out .. does that mean it's not used or used? :-) ). But now the main() function type and args looks like it originally did except for one difference. It originally looked like: main(C,V) char **V; /* C program. (If you don't * understand it look it */ up.) (In the C Manual) and it was changed to: main(/*/,('\b'*'\b'>=_|_>'\t'*'\n') char **('\b'*'\b'>=_|_>'\t'*'\n') * C program. (If you don't * understand it look it * up.) (In the /*/ /*C*/ manual) but now it looks like: main(/*C,V) char **V;*/ /* C program. (If you don't * understand it look it * up.) (In the C */manual) which is much better and much more like the original entry. --- 1985/sicherman/sicherman.c | 21 +++++++++++---------- thanks-for-fixes.md | 4 ++++ 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/1985/sicherman/sicherman.c b/1985/sicherman/sicherman.c index d3c01accc..442d97158 100644 --- a/1985/sicherman/sicherman.c +++ b/1985/sicherman/sicherman.c @@ -2,13 +2,13 @@ #define _C_C(_)('\b'b'\b'>=C_C>'\t'b'\n') #define C_C _|_ #define b * -#define C /b/ +#define C /b b/ #define V _C_C( -main(/*/,('\b'*'\b'>=_|_>'\t'*'\n') -char **('\b'*'\b'>=_|_>'\t'*'\n') -* C program. (If you don't -* understand it look it -* up.) (In the /*/ /*C*/ manual) +main(/*C,V) +char **V;*/ +/* C program. (If you don't + * understand it look it + * up.) (In the C */manual) { char _,__; while (read(0,&__,1) & write((_=(_=~' '&__,/*/)), @@ -17,12 +17,13 @@ char **('\b'*'\b'>=_|_>'\t'*'\n') '\b'*'\b'|((_-52)%('\b'*'\b'+~' '&'\t'*'\n')+1),1),&_,1)); } -subr(/*C*/) -/*char *C;*/ -{ + #if 0 +subr(C) +char *C; +{ C="Lint says "argument Manual isn't used." What's that mean?"; while (write((read(C_C('"'-'/*"'/*"*/))?__:__-_+ '\b'b'\b'|((_-52)%('\b'b'\b'+C_C_('\t'b'\n'))+1),1),&_,1)); -#endif } +#endif diff --git a/thanks-for-fixes.md b/thanks-for-fixes.md index 821319ee3..c4bb9563c 100644 --- a/thanks-for-fixes.md +++ b/thanks-for-fixes.md @@ -133,6 +133,10 @@ like to refer you to the original file in [sicherman.alt.c](1985/sicherman/sicherman.alt.c) and he suggests that you then compare it to [sicherman.c](1985/sicherman/sicherman.c) for some good old C-fashioned fun! +Later on Cody improved the fix so that it looks much more like the original +entry which can be found in +[1985/sicherman/sicherman.orig.c](1985/sicherman/sicherman.orig.c). + ## [1986/holloway](1986/holloway/holloway.c) ([README.md](1986/holloway/README.md]))