From 9b0153d4cfe43c032403155dd248ec3ca834283f Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Mon, 22 May 2023 04:43:26 -0700 Subject: [PATCH 1/3] Make 1985/sicherman more like original wrt CPP Although the no longer valid code is commented out the macros and the extra function (subr()) now exist to make it look more like it used to before the fix. I have another version to make it even more like the original but a question that has to be answered is which should be the sicherman.c. This can be decided at another time but I see it both ways: the way it is now provides more educational value but it seems less 'authentic' too. But on the other hand having it closer to the original with commented out code could also be an issue - maybe. Even so the working version might have some code that can be replaced with the macros to make it more like before (this has yet to be determined). --- 1985/sicherman/sicherman.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/1985/sicherman/sicherman.c b/1985/sicherman/sicherman.c index dee59b753..ff0512fac 100644 --- a/1985/sicherman/sicherman.c +++ b/1985/sicherman/sicherman.c @@ -1,3 +1,9 @@ +#define C_C_(_)~' '&_ +#define _C_C(_)('\b'b'\b'>=C_C>'\t'b'\n') +#define C_C _|_ +#define b * +#define C /b/ +#define V _C_C( main(/*/,('\b'*'\b'>=_|_>'\t'*'\n') char **('\b'*'\b'>=_|_>'\t'*'\n') * C program. (If you don't @@ -11,4 +17,11 @@ char **('\b'*'\b'>=_|_>'\t'*'\n') '\b'*'\b'|((_-52)%('\b'*'\b'+~' '&'\t'*'\n')+1),1),&_,1)); } - +/* +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)); +}*/ From 137d441beb2e40822d9cae211617a352ebc80764 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Mon, 22 May 2023 04:48:36 -0700 Subject: [PATCH 2/3] Slight improvement on 9b0153d4cfe43c032403155dd248 --- 1985/sicherman/sicherman.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/1985/sicherman/sicherman.c b/1985/sicherman/sicherman.c index ff0512fac..7bb9e17ea 100644 --- a/1985/sicherman/sicherman.c +++ b/1985/sicherman/sicherman.c @@ -17,11 +17,12 @@ char **('\b'*'\b'>=_|_>'\t'*'\n') '\b'*'\b'|((_-52)%('\b'*'\b'+~' '&'\t'*'\n')+1),1),&_,1)); } -/* +#if 0 subr(C) char *C; { C="Lint says "argument Manual isn't used." What's that - mean?"; while (write((read(C_C('"'-'*"'/*"/))?__:__-_+ + mean?"; while (write((read(C_C('"'-'/*"'/*"*/))?__:__-_+ '\b'b'\b'|((_-52)%('\b'b'\b'+C_C_('\t'b'\n'))+1),1),&_,1)); -}*/ +} +#endif From d691a693555babb8e89a9b8a15642f4c39c723e5 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Mon, 22 May 2023 05:00:09 -0700 Subject: [PATCH 3/3] Slight improvement on 137d441beb2e40822d9cae211617 --- 1985/sicherman/sicherman.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/1985/sicherman/sicherman.c b/1985/sicherman/sicherman.c index 7bb9e17ea..d3c01accc 100644 --- a/1985/sicherman/sicherman.c +++ b/1985/sicherman/sicherman.c @@ -17,12 +17,12 @@ char **('\b'*'\b'>=_|_>'\t'*'\n') '\b'*'\b'|((_-52)%('\b'*'\b'+~' '&'\t'*'\n')+1),1),&_,1)); } -#if 0 -subr(C) -char *C; +subr(/*C*/) +/*char *C;*/ { +#if 0 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 +}