Undo NULL file check in 1993/schnitzi
As part of the redefinition of INABIAF the NULL file check has been removed. Instead it's noted in the README.md and Makefile.
This commit is contained in:
1 parent
28624ca43f
commit
4e6630575c
3 files changed
+12
-10
No files matched your search
@@ -128,6 +128,7 @@ all: data ${TARGET}
|
|||||||
supernova deep_magic magic charon pluto
|
supernova deep_magic magic charon pluto
|
||||||
|
|
||||||
${PROG}: ${PROG}.c
|
${PROG}: ${PROG}.c
|
||||||
|
@echo "NOTE: this entry will segfault if the file cannot be opened."
|
||||||
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||||
|
|
||||||
# alternative executable
|
# alternative executable
|
||||||
|
|||||||
@@ -1,18 +1,17 @@
|
|||||||
# Obfuscated Intelligence Award:
|
# Obfuscated Intelligence Award:
|
||||||
|
|
||||||
Mark Schnitzius
|
Mark Schnitzius
|
||||||
1700 Woodbury Rd. #1208
|
1700 Woodbury Rd. #1208
|
||||||
Orlando, FL 32828
|
Orlando, FL 32828
|
||||||
USA
|
USA
|
||||||
|
|
||||||
## To build:
|
## To build:
|
||||||
|
|
||||||
make all
|
make all
|
||||||
|
|
||||||
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this to not
|
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) made this use `fgets()`
|
||||||
segfault when no file is specified or the file cannot be opened for reading. He
|
not `gets()` to make it safer and to prevent a warning with linking or at
|
||||||
also made this use `fgets()` not `gets()` to make it safer. Thank you Cody for
|
runtime. Thank you Cody for your assistance!
|
||||||
your assistance!
|
|
||||||
|
|
||||||
## To run:
|
## To run:
|
||||||
|
|
||||||
@@ -22,6 +21,8 @@ where:
|
|||||||
|
|
||||||
file a file containing some text
|
file a file containing some text
|
||||||
|
|
||||||
|
NOTE: this entry will segfault if the file cannot be opened.
|
||||||
|
|
||||||
## Try:
|
## Try:
|
||||||
|
|
||||||
./schnitzi schnitzi.info
|
./schnitzi schnitzi.info
|
||||||
|
|||||||
@@ -13,9 +13,9 @@
|
|||||||
( lll>l1 ) li|=! ( l[3*l1+++3
|
( lll>l1 ) li|=! ( l[3*l1+++3
|
||||||
] -ll[strlen ( ll)-1] ) ;return
|
] -ll[strlen ( ll)-1] ) ;return
|
||||||
( li ) ;}main ( ll,lll
|
( li ) ;}main ( ll,lll
|
||||||
) char*lll[];{if(ll<2)return 1;char l1 [111][21], li1[111][21],il1[111],i1l
|
) char*lll[];{char l1 [ 111][21],li1[111][21 ] ,il1[111],i1l
|
||||||
[ 111 ] ;int lli,l11,l1l,li/* ( */,ll1,il,l;FILE*f;if(ll-2
|
[ 111 ] ;int lli,l11,l1l,li/* ( */,ll1,il,l;FILE*f;if(ll-2
|
||||||
) {f=fopen ( lll[1],"r" );if(!f)return 1;lli=l=ll1=il=!1;while
|
) {f=fopen ( lll[1],"r" ) ;lli=l=ll1=il=!1;while
|
||||||
( fscanf(f,"%s",l1[lli] ) +1){li=ii ( l1[lli],3
|
( fscanf(f,"%s",l1[lli] ) +1){li=ii ( l1[lli],3
|
||||||
) ;iii ( l1[lli] ) ;l1l=l11=!1;while
|
) ;iii ( l1[lli] ) ;l1l=l11=!1;while
|
||||||
( l1l>-ll ) {iii ( lll[-l1l]
|
( l1l>-ll ) {iii ( lll[-l1l]
|
||||||
|
|||||||
Reference in new issue
Block a user