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
+19 -18

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
#
+8 -11
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 _,__;
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