Make 1985/sicherman even more like original

By changing some macros to what they used to expand to more of the code
can be used / not commented out. For instance now subr() no longer is
commented out. It cannot be used but it now is uncommented to make it
more like the original, even using the C macro as the arg (albeit
without a type specified as it actually just translates to /**/). The
macro that C used to use, 'b' (which is '*'), is still used just not in
C as doing so will cause compilation problems.

The single arg of main() was commented out because some versions of
clang do not only allow one arg to main().

There might have been other things to make it more like the original as
well.
This commit is contained in:
Cody Boone Ferguson committed 2023-10-27 05:57:55 -07:00
1 parent f5f8ddd92e
commit 8d4ce3b843
3 files changed
+18 -17

No files matched your search

+3 -2
View File
@@ -39,7 +39,8 @@ include ../../var.mk
# Common C compiler warnings to silence
#
CSILENCE= -Wno-comment -Wno-deprecated-non-prototype -Wno-main -Wno-pedantic \
-Wno-return-type -Wno-strict-prototypes -Wno-unused-parameter -Wno-implicit-int
-Wno-return-type -Wno-strict-prototypes -Wno-unused-parameter -Wno-implicit-int \
-Wno-implicit-function-declaration -Wno-unused-value -Wno-multichar
# Common C compiler warning flags
#
@@ -62,7 +63,7 @@ CDEFINE=
# Include files that are needed to compile
#
CINCLUDE= -include unistd.h
CINCLUDE=
# Optimization
#
+7 -10
View File
@@ -2,28 +2,25 @@
#define _C_C(_)('\b'b'\b'>=C_C>'\t'b'\n')
#define C_C _|_
#define b *
#define C /b b/
#define C /**/
#define V _C_C(
char _,__;
main(/*C,V)
char **V;*/
/* C program. (If you don't
* understand it look it
* up.) (In the C */manual)
* up.) (In the C manual*/)
{
char _,__;
while (read(0,&__,1) & write((_=(_=~' '&__,/*/)),
_C_,1)) _=/*/-('\b'*'\b'>=_|_>'\t'*'\n'))?__:__-_+
'\b'*'\b'|((_-52)%('\b'*'\b'+~' '&'\t'*'\n')+1),1),&_,1));
'\b'*'\b'|((_-52)%('\b'*'\b'+~' '&'\t'*'\n')+1),1),
&_,1))/*_=C-V+subr(&V)*/;
}
#if 0
subr(C)
char *C;
{
C="Lint says "argument Manual isn't used." What's that
mean?"; while (write((read(C_C('"'-'/*"'/*"*/))?__:__-_+
"Lint says argument Manual isn't used." "What's that\
mean?"; while (write((read(('"'-'/*"'/*"*/))?__:__-_+
'\b'b'\b'|((_-52)%('\b'b'\b'+C_C_('\t'b'\n'))+1),1),&_,1));
}
#endif
+8 -5
View File
@@ -11,15 +11,17 @@ contributed thousands, that we wish to thank.
We call out the extensive contributions of [Cody Boone
Ferguson](https://www.ioccc.org/winners.html#Cody_Boone_Ferguson) who is
responsible for most of the improvements and fixes including many **very
responsible for most of the improvements and fixes including many **extremely
complicated bug fixes** like
[1988/phillipps](/thanks-for-fixes.md#1988phillipps-readmemd),
[2001/anonymous](/thanks-for-fixes.md#2001anonymous-readmemd) and
[2004/burley](/thanks-for-fixes.md#2004burley-readmemd), making entries like
[1985/sicherman](/thanks-for-fixes.md#1985sicherman-readmemd) and
[1986/wall](/thanks-for-fixes.md#1986wall-readmemd) not need `-traditional-cpp`
(all **very complicated fixes**), fixing entries to work with clang (some being
**very complicated** like [1991/dds](/thanks-for-fixes.md#1991dds-readmemd)),
porting entries to macOS (some being **very complicated** like
(all **extremely complicated fixes**), fixing entries to work with clang (some
being **extremely complicated** like
[1991/dds](/thanks-for-fixes.md#1991dds-readmemd)), porting entries to macOS
(some being **very complicated** like
[1998/schweikh1](/thanks-for-fixes.md#1998schweikh1-readmemd)), fixing code like
[2001/herrmann2](/thanks-for-fixes.md#2001herrmann2-readmemd) to work in both
32-bit/64-bit which *can be* **very complicated**, providing alternate code
@@ -237,7 +239,8 @@ 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](1985/sicherman/sicherman.c).
entry](1985/sicherman/sicherman.c). He did this one more time and it's about as
close to the original as one can get without causing a compilation error.
## [1986/hague](1986/hague/hague.c) ([README.md](1986/hague/README.md]))