Fix how 1988/applin/zsmall.c is built
To match the rest of the repository with alternate code (where possible) the file is now applin.alt.c. However the rule in the Makefile copies the file to zsmall.c and builds it accordingly, compiling into applin.alt. .gitignore has had applin.alt added to it.
This commit is contained in:
1 parent
c96be96a98
commit
2ef3c9c39c
4 files changed
+23
-5
No files matched your search
@@ -1,3 +1,4 @@
|
||||
applin
|
||||
large.c
|
||||
zsmall
|
||||
applin.alt
|
||||
@@ -111,8 +111,8 @@ OBJ= ${PROG}.o
|
||||
DATA=
|
||||
TARGET= ${PROG}
|
||||
#
|
||||
ALT_OBJ= zsmall.o
|
||||
ALT_TARGET= zsmall
|
||||
ALT_OBJ= applin.alt.o
|
||||
ALT_TARGET= applin.alt
|
||||
|
||||
|
||||
#################
|
||||
@@ -147,6 +147,10 @@ ${PROG}: ${PROG}.c
|
||||
alt: data ${ALT_TARGET}
|
||||
@${TRUE}
|
||||
|
||||
${ALT_TARGET}: ${PROG}.alt.c
|
||||
${CP} -f ${PROG}.alt.c zsmall.c
|
||||
${CC} ${CFLAGS} zsmall.c -o $@
|
||||
|
||||
# not an official entry
|
||||
#
|
||||
# The 'zsmall.c' program was obtained from 'applin.c' by reducing its recursion
|
||||
|
||||
+16
-3
@@ -10,12 +10,28 @@ US
|
||||
make all
|
||||
```
|
||||
|
||||
A smaller version, originally called `zsmall.c`, of [applin.c](applin.c) can be
|
||||
found in [applin.alt.c](applin.alt.c). Your machine may have an easier time
|
||||
with this program. See the Alternate code section below for details.
|
||||
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
./applin
|
||||
```
|
||||
|
||||
### Alternate code:
|
||||
|
||||
As noted above a smaller version can be used in case your cpp has a hard time
|
||||
with this entry. To use:
|
||||
|
||||
```sh
|
||||
make alt
|
||||
```
|
||||
|
||||
Use `applin.alt` as you would `applin` above.
|
||||
|
||||
|
||||
## Judges' remarks:
|
||||
|
||||
This entry is by far the most unusual abuse of the C preprocessor that
|
||||
@@ -34,9 +50,6 @@ on the Amdahl 5890-300E. But due to the ANSI-likeness of GNU cpp (v. 1-21),
|
||||
it was not able to cleanly substitute a symbol that began with a '#'.
|
||||
Clearly the GNU C preprocessor is faster.
|
||||
|
||||
A smaller version of [applin.c](applin.c) can be found in [zsmall.c](zsmall.c).
|
||||
Your machine may have an easier time with this program. See the Makefile for
|
||||
details.
|
||||
|
||||
## Author's remarks:
|
||||
|
||||
|
||||
File renamed without changes.
Reference in new issue
Block a user