Fixes in 1998/tomtorfs, add try.sh & format fixes
The author stated that the program assumes EOF is -1 but for systems that do not have this it will fail. This is indeed a valid concern as the standard mandates that it's a value < 0 but it doesn't require it to be -1. The author also stated that the program could fail if 1 is not a return value that indicates error so this was changed to EXIT_FAILURE as the suggested was made. It is possible of course that I missed a place where this should have been updated but I don't believe so. I am unaware of any system where this would be a problem and I don't know why it matters anyway but I made the change as the author stated it could be a problem with portability. The README.md file has been formatted and typo checked. Added try.sh script. This should complete this entry's review.
This commit is contained in:
1 parent
e791883029
commit
3141392cc1
4 files changed
+74
-21
No files matched your search
@@ -1,11 +1,12 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#define exit(a) return EXIT_FAILURE
|
||||
|
||||
int main(int a,char **A){FILE*B;typedef unsigned long C;C b
|
||||
[8]; if(!(a==7&&(B= fopen(1[A],"rb")))) return 1;for(7[b]=0
|
||||
[8]; if(!(a==7&&(B= fopen(1[A],"rb")))) exit(1); for(7[b]=0
|
||||
;7[b]<5;7[b]++)b[7[ b]]=strtoul(A[2+7[b ]],0,16-!7[b]*6);5[
|
||||
b]=3[b] ; while ((6[b]= getc(B)
|
||||
)!=(C)- 1){if(2 [b])for (7[b]=0
|
||||
) !=EOF ){if(2 [b])for (7[b]=0
|
||||
;7[b]<4 ;7[b]++ )if(((6 [b]>>7[
|
||||
b])^(6[ b]>>(7-7[b])))&1)6[ b] ^=(1
|
||||
<<7[b]) ^(1<<(7-7[b]));5[b] ^= 6[b]
|
||||
|
||||
Reference in new issue
Block a user