Merge pull request #287 from xexyl/1985-sicherman

This commit is contained in:
Landon Curt Noll authored and GitHub committed 2023-04-05 11:16:07 -07:00
commit b9b7123967
6 files changed
+65 -45

No files matched your search

+1
View File
@@ -1 +1,2 @@
sicherman
sicherman.alt
+5 -9
View File
@@ -61,7 +61,7 @@ CDEFINE=
# Include files that are needed to compile
#
CINCLUDE=
CINCLUDE= -include unistd.h
# Optimization
#
@@ -111,12 +111,9 @@ OBJ= ${PROG}.o
DATA=
TARGET= ${PROG}
#
ALT_OBJ=
ALT_TARGET=
ALT_OBJ= ${PROG}.alt.o
ALT_TARGET= ${PROG}.alt
# FORCE use of -traditional-cpp
#
CFLAGS+= -traditional-cpp
#################
# build the entry
@@ -130,13 +127,12 @@ all: data ${TARGET}
supernova deep_magic magic charon pluto
${PROG}: ${PROG}.c
@echo "NOTE: NOTE: this entry requires a compiler that supports -traditional-cpp."
${CC} ${CFLAGS} $< -o $@ ${LIBS}
# alternative executable
#
alt: data ${ALT_TARGET}
@${TRUE}
alt: ${PROG}.alt.c
${CC} ${CFLAGS} -traditional-cpp $< -o $@ ${LIBS}
# data files
#
+25 -3
View File
@@ -4,13 +4,35 @@ Col. G. L. Sicherman
## To build:
make all
```sh
make all
```
NOTE: This entry requires a compiler that support `-traditional-cpp`.
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this very twisted
entry to not require `-traditional-cpp`. He'd like to refer you to the original
file in [sicherman.alt.c](sicherman.alt.c) and he suggests that you then compare
it to [sicherman.c](sicherman.c) for some good old C-fashioned fun! Thank you
Cody for your assistance!
## Try:
./sicherman < sicherman.c
```sh
./sicherman < sicherman.c
echo IOCCC | ./sicherman
```
### Alternate code:
If you do have a compiler that supports `-traditional-cpp` you may compile the
original like:
```sh
make alt
```
Use `sicherman.alt` as you would `sicherman`.
## Judges' comments:
+23
View File
@@ -0,0 +1,23 @@
#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(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((_=(_=C_C_(__),C)),
_C_,1)) _=C-V+subr(&V);
}
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));
}
+11 -20
View File
@@ -1,23 +1,14 @@
#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(C,V)
char **V;
/* C program. (If you don't
* understand it look it
*/ up.) (In the C Manual)
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)
{
char _,__;
while (read(0,&__,1) & write((_=(_=C_C_(__),C)),
_C_,1)) _=C-V+subr(&V);
}
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));
while (read(0,&__,1) & write((_=(_=~' '&__,/*/)),
_C_,1)) _=/*/-('\b'*'\b'>=_|_>'\t'*'\n'))?__:__-_+
'\b'*'\b'|((_-52)%('\b'*'\b'+~' '&'\t'*'\n')+1),1),&_,1));
}
-13
View File
@@ -247,19 +247,6 @@ continues to run.
We have not had a chance to try and fix this yet.
## [1985/sicherman](1985/sicherman/sicherman.c) ([README.md](1985/sicherman/README.md))
## STATUS: Requires a compiler supporting `-traditional-cpp` - alternate code requested
This entry needs a compiler that support `-traditional-cpp`. `gcc`
supports this but `clang` does not. Please be advised that `gcc` under macOS is
actually gcc if it looks like it's gcc (two different binaries).
If you do wish to provide an alternate version of the program that does not need
compiler supporting we welcome you to summit such code via a
[GitHub pull request](https://github.com/ioccc-src/temp-test-ioccc/pulls) and we
will be happy to credit you in the entry's _README.md_ file.
# 1986