diff --git a/1988/applin/.gitignore b/1988/applin/.gitignore index a612d2239..ee1f628c6 100644 --- a/1988/applin/.gitignore +++ b/1988/applin/.gitignore @@ -1,3 +1,4 @@ applin large.c zsmall +applin.alt diff --git a/1988/applin/Makefile b/1988/applin/Makefile index d95d493bb..67be2771f 100644 --- a/1988/applin/Makefile +++ b/1988/applin/Makefile @@ -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 diff --git a/1988/applin/README.md b/1988/applin/README.md index a9b7c1f1f..187729cdf 100644 --- a/1988/applin/README.md +++ b/1988/applin/README.md @@ -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: diff --git a/1988/applin/zsmall.c b/1988/applin/applin.alt.c similarity index 100% rename from 1988/applin/zsmall.c rename to 1988/applin/applin.alt.c