Make 1985/sicherman close to original as possible

... I think :-)

The thanks file gives much more details on how this works and as I am
very tired and want to get this in so I can do other things I will not
duplicate it here. It might become clear in that file why I believe it
cannot be made any more like the original without breaking it though I
left some questions for the reader to answer for themselves.

The Makefile also had a fix: the 'alt' rule was in error so that running
'make alt' in the directory would compile it to 'alt', not
'sicherman.alt'.
This commit is contained in:
Cody Boone Ferguson committed 2023-11-18 04:20:24 -08:00
1 parent 4d0e146b8f
commit 824ad34200
3 files changed
+69 -46

No files matched your search

+6 -2
View File
@@ -41,7 +41,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-uninitialized -Wno-unused-but-set-parameter
-Wno-uninitialized -Wno-unused-but-set-parameter -Wno-parentheses \
-Wno-int-conversion
# Common C compiler warning flags
#
@@ -136,7 +137,10 @@ ${PROG}: ${PROG}.c
# alternative executable
#
alt: ${PROG}.alt.c
alt: data ${ALT_TARGET}
@${TRUE}
${PROG}.alt: ${PROG}.alt.c
${CC} ${CFLAGS} -traditional-cpp $< -o $@ ${LDFLAGS}
# data files
+11 -12
View File
@@ -2,25 +2,24 @@
#define _C_C(_)('\b'b'\b'>=C_C>'\t'b'\n')
#define C_C _|_
#define b *
#define c /b/
#define v _C_C(
#define C /**/
#define V _C_C(
char _,__;
main(C,V)
char **V;
main(
/* 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_C_(__),
('\b'b'\b'>=C_C>'\t'b'\n'))?__:__-_+'\b'b'\b'|
((_-52)%('\b'b'\b'+~' '&'\t'b'\n')+1),1),&_,1))_=V+subr(&V);
V))?__:__-_+'\b'b'\b'|((_-52)%('\b'b'\b'+~
' '&'\t'b'\n')+1),1),&_,1))_=C-V+subr(&V));
}
subr(C)
char *C;
subr(c)
char *c;
{
C="Lint says \"argument Manual isn't used.\" What's that\
mean?"; write((read(('"'-'/*"'/*"*/))?__:__-_+
'\b'b'\b'|((_-52)%('\b'b'\b'+C_C_('\t'b'\n'))+1),1),&_,1);
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));
}