diff --git a/1986/wall/.entry.json b/1986/wall/.entry.json index 2d2e86a25..ca1f6d177 100644 --- a/1986/wall/.entry.json +++ b/1986/wall/.entry.json @@ -25,6 +25,14 @@ "display_via_github" : true, "entry_text" : "entry Makefile" }, + { + "file_path" : "wall.alt.c", + "inventory_order" : 40, + "OK_to_edit" : true, + "display_as" : "c", + "display_via_github" : true, + "entry_text" : "alternate source code" + }, { "file_path" : "wall.orig.c", "inventory_order" : 50, diff --git a/1986/wall/.gitignore b/1986/wall/.gitignore index 059a8223d..97c6c8045 100644 --- a/1986/wall/.gitignore +++ b/1986/wall/.gitignore @@ -6,4 +6,5 @@ indent.c indent.o prog.orig wall +wall.alt wall.orig diff --git a/1986/wall/Makefile b/1986/wall/Makefile index eab2e08ed..57efcdace 100644 --- a/1986/wall/Makefile +++ b/1986/wall/Makefile @@ -121,8 +121,8 @@ OBJ= ${PROG}.o DATA= TARGET= ${PROG} # -ALT_OBJ= -ALT_TARGET= +ALT_OBJ= wall.alt.o +ALT_TARGET= ${PROG}.alt ################# # build the entry @@ -144,6 +144,9 @@ ${PROG}: ${PROG}.c alt: ${ALT_TARGET} @${TRUE} +${PROG}.alt: ${PROG}.alt.c + ${CC} ${CFLAGS} -traditional-cpp $< -o $@ ${LDFLAGS} + # data files # data: ${DATA} diff --git a/1986/wall/README.md b/1986/wall/README.md index 6846abf8e..1f423df72 100644 --- a/1986/wall/README.md +++ b/1986/wall/README.md @@ -4,6 +4,9 @@ make all ``` +There is an alternate version for those with a compiler that support +`-traditional-cpp`. See [Alternate code](#alternate-code) below. + ## To use: @@ -12,6 +15,23 @@ ``` +## Alternate code: + +This version is the original but which can be used if you have a compiler that +supports the `-traditional-cpp` option. + + +### Alternate build: + +``` + make alt +``` + +### Alternate use: + +Use `wall.alt` as you would `wall` above. + + ## Judges' remarks: The original version did not have a ';' character in the first line. diff --git a/1986/wall/index.html b/1986/wall/index.html index 2137c1079..559c63dd9 100644 --- a/1986/wall/index.html +++ b/1986/wall/index.html @@ -403,8 +403,17 @@ Location: US - United States of America

To build:

    make all
+

There is an alternate version for those with a compiler that support +-traditional-cpp. See Alternate code below.

To use:

    ./wall
+

Alternate code:

+

This version is the original but which can be used if you have a compiler that +supports the -traditional-cpp option.

+

Alternate build:

+
        make alt
+

Alternate use:

+

Use wall.alt as you would wall above.

Judges’ remarks:

The original version did not have a ‘;’ character in the first line. This caused a number of System V C pre-preprocessors to gripe about a @@ -444,6 +453,7 @@ compiler documents the program.

Secondary files

diff --git a/1986/wall/wall.alt.c b/1986/wall/wall.alt.c new file mode 100644 index 000000000..836cb51d5 --- /dev/null +++ b/1986/wall/wall.alt.c @@ -0,0 +1,78 @@ +#define _c(C)_ (C)&('|'+3):c_()(C)>>('\n'-3) __; /**/ +#define C char* +#define keyboard ",,B3-u;.(&*5., /(b*(1\036!a%\031m,,,,,\r\n" +#define main(o,oo)oo(o){ +#define _ ;case +C +#define c_(cc)c cc= +#define C_(sand)_O(sand)witch +o=keyboard; +#define __ ;break; +C +ccc( +cc) +C +cc; +{ +C +cccc= +cc;int +#ifndef lint +#define keyboard "dijs QH.soav Vdtnsaoh DmfpaksoQz;kkt oa, -dijs" +#endif +c; +main(;c_(=(*cc);*cc++)c,for); +#define _O(s)s +main(0xb+(c>>5),C_(s)) +_'\v' +:__ _'\f': +main(c,C_(s)); +_c(8098)_c(6055)_c(14779)_c(10682) +#define O_(O)_O(O)stem(ccc( +_c(15276)_c(11196)_c(15150) +#define _C ;return +_c(11070)_c(15663)_c(11583) +} +__ +default +:c_(+)o[c&__LINE__-007]; +main(c_(-)'-'-1,C_(s))_ +0214 +:_ +0216 +:c_(+)025 _ +0207 +:c_(-)4 _ +0233 +:c_(+)' '-1; +}}c_(&)'z'+5; +}_C cccc; +}main(,cc) +C +#define O write(1, +c="O"; +O_(sy) keyboard)); +main(;;,for); +read(0, +c,1);* +c_(&)'~'+1 +;O ccc( +c), +'\0'); +main(*c, +C_(s));_ +4 +:O_(sy)";kkt -oa, dijszdijs QQ"))_C +_ +13 +:O o+' ', +3 +) +#undef main +__ _ 127:O"\b \b",3)__ +default +:O +c,1) +__}}}main(){ +cc(); +} diff --git a/tmp/manifest.csv b/tmp/manifest.csv index 7f9398779..42281c11e 100644 --- a/tmp/manifest.csv +++ b/tmp/manifest.csv @@ -177,6 +177,7 @@ 1986,stein,index.html,4294967295,false,html,false,this web page 1986,wall,wall.c,20,true,c,true,entry source code 1986,wall,Makefile,30,true,makefile,true,entry Makefile +1986,wall,wall.alt.c,40,true,c,true,alternate source code 1986,wall,wall.orig.c,50,true,c,true,original source code 1986,wall,1986_wall.tar.bz2,1415926535,false,tbz2,false,download entry tarball 1986,wall,README.md,4000000000,true,markdown,true,markdown source for this web page diff --git a/tmp/manifest.numbers b/tmp/manifest.numbers index 17b41672e..35c9d12a8 100644 Binary files a/tmp/manifest.numbers and b/tmp/manifest.numbers differ diff --git a/tmp/path_list.found.txt b/tmp/path_list.found.txt index 5ad2dbe1f..4168dfcb4 100644 --- a/tmp/path_list.found.txt +++ b/tmp/path_list.found.txt @@ -181,6 +181,7 @@ 1986/wall/Makefile 1986/wall/README.md 1986/wall/index.html +1986/wall/wall.alt.c 1986/wall/wall.c 1986/wall/wall.orig.c 1987/biggar/.entry.json diff --git a/tmp/path_list.manifest.txt b/tmp/path_list.manifest.txt index 5ad2dbe1f..4168dfcb4 100644 --- a/tmp/path_list.manifest.txt +++ b/tmp/path_list.manifest.txt @@ -181,6 +181,7 @@ 1986/wall/Makefile 1986/wall/README.md 1986/wall/index.html +1986/wall/wall.alt.c 1986/wall/wall.c 1986/wall/wall.orig.c 1987/biggar/.entry.json diff --git a/tmp/path_list.required.txt b/tmp/path_list.required.txt index b065419ce..585de2283 100644 --- a/tmp/path_list.required.txt +++ b/tmp/path_list.required.txt @@ -112,6 +112,7 @@ 1986/wall/.gitignore 1986/wall/Makefile 1986/wall/README.md +1986/wall/wall.alt.c 1986/wall/wall.c 1986/wall/wall.orig.c 1987/biggar/.entry.json