diff --git a/2004/newbern/Makefile b/2004/newbern/Makefile index 9346e6764..79d8d0e67 100644 --- a/2004/newbern/Makefile +++ b/2004/newbern/Makefile @@ -63,7 +63,7 @@ X11_INCDIR= /opt/X11/include # Common C compiler warnings to silence # #CSILENCE= -CSILENCE= -Wno-parentheses -Wno-pointer-sign +CSILENCE= -Wno-parentheses -Wno-pointer-sign -Wno-incompatible-pointer-types # Common C compiler warning flags # @@ -101,7 +101,7 @@ CINCLUDE= #CINCLUDE= -include stdlib.h #CINCLUDE= -include stdio.h #CINCLUDE= -include stdlib.h -include stdio.h -#CINCLUDE= -I ${X11_INCDIR} +#CINCLUDE= -I ${X11_INCDIR} -I ${X11_INCDIR}/X11 #CINCLUDE= `${SDL2_CONFIG} --cflags` # Optimization @@ -140,7 +140,7 @@ ifeq ($(CC),clang) # CSILENCE+= -Wno-array-bounds-pointer-arithmetic -Wno-missing-prototypes \ -Wno-missing-variable-declarations -Wno-poison-system-directories \ - -Wno-sign-conversion -Wno-strict-prototypes + -Wno-sign-conversion -Wno-strict-prototypes -Wno-conditional-uninitialized # CWARN+= -Weverything # diff --git a/2004/newbern/README.md b/2004/newbern/README.md index 3f711a002..df4af0d23 100644 --- a/2004/newbern/README.md +++ b/2004/newbern/README.md @@ -4,46 +4,57 @@ 28 Jeanette Ave. #1 Belmont, MA 02478 -## To build: +# To build: - make all +```sh +make +``` -### To run +### To run: - ./newbern newbern.dat "IOCCC 2004" +```sh +./newbern [file.dat arg] +``` ### Try: - echo SOS | ./newbern +```sh +./newbern newbern.dat "IOCCC 2004" +echo SOS | ./newbern +``` -## Judges' comments +## Judges' comments: - The program is formatted using the same font glyphs as the example - data file. +The program is formatted using the same font glyphs as the example +data file. -## Author's comments +## Author's comments: - This is a configurable banner-like program. +This is a configurable banner-like program. - Examples: +### Examples: - - To convert a character glyph into a data file +- To convert a character glyph into a data file - ./newbern char < some_nicely_shaped_text >> data_file +```sh +./newbern char < some_nicely_shaped_text >> data_file +``` - - To print a string using glyphs from a data file +- To print a string using glyphs from a data file - ./newbern data_file a_string +```sh +./newbern data_file a_string +``` - Extra functionality: +### Extra functionality: - The program can also act as a Morse encoder, unarguably. +The program can also act as a Morse encoder, unarguably. - It also has double-super-secret encryption capabilities. - Decryption is left as an exercise for the reader. +It also has double-super-secret encryption capabilities. +Decryption is left as an exercise for the reader. - Portability: +### Portability: - The program assumes an ASCII operating environment. +The program assumes an ASCII operating environment. - The program is best viewed with tab-stops set to 8. +The program is best viewed with tab-stops set to 8. diff --git a/2004/newbern/newbern.c b/2004/newbern/newbern.c index 36031c125..2593f6108 100644 --- a/2004/newbern/newbern.c +++ b/2004/newbern/newbern.c @@ -11,7 +11,7 @@ #define y fclose #define end static -t(signed)char U;t(struct) b(O,); +t(signed)char U;t(struct) b(O,); typedef char** A; t( U*) H; t(O @@ -29,7 +29,7 @@ isspace(g); } H D(H s){H p,r;if(!s)G 0;for(p=(H)s;*p && { m(D(d)); l(f++, q); Z(*d && !P(*d )) d++; Z(*d && P(*d)) d++; } G b(,0);} void k() { static U b(c,;) ?R(c):(c='\n'); } - i main (i Q, H *l){static o + i main (i Q, A la) {H*l=la;static o X;i t,j; switch (Q ){ case 1: { H *p, I [] ={