Revisit 1990 entries
Although I previously got them to all compile they did not all work. Now they do except that jaw does not work properly in macOS (I have noticed something odd in linux too but it appears to work mostly if not entirely). Yusuke Endoh pointed out for 1990/theorem that atof() nowadays needs include stdlib.h so this was added to the file. As well I added the inclusion of string.h for strcmp(). I also fixed some segfaults in this entry (even though the judges pointed out that for NULL pointer one needs the four '0 0 0 0' it still segfaulted under those conditions) so that everything should work now under both linux and macOS. There were iirc two parts to this: one the NULL pointer is no longer dereferenced but also the type being passed to strcmp() was a int * and not a char *. This prevented 1990/theorem/sorter from working at all (segfault) and as I recall it there was another segfault I encountered as well. For 1990/jaw Yusuke Endoh provided a ruby implementation of btoa as it's not always available in modern systems. Thank you Yusuke! In 1990/jaw shark.sh had to be modified as well. This had to do with '.' not being in the default PATH. As well I had previously made a mistake about btoa versus atob as both were referenced in 1990/jaw/README.md. I believe I have this correct now. Many if not all the README files were modified with various changes including formatting (like turning them into markdown) and section titles amongst other things. I seem to recall I'm missing something here but I can't recall what I recall :-) so this will have to suffice this time round (maybe it was the btoa/atob issue that I just remembered and added above but I'm not sure).
This commit is contained in:
1 parent
e5ef2978f6
commit
0ae55de0b8
17 files changed
+420
-347
No files matched your search
+34
-33
@@ -11,7 +11,7 @@
|
||||
make all
|
||||
|
||||
|
||||
Modern compilers might fail to compile this entry:
|
||||
Modern compilers might fail to compile this entry:
|
||||
|
||||
scjones.c:1:7: error: expected ';' after top level declarator
|
||||
char*a??(??)=??<
|
||||
@@ -19,49 +19,50 @@
|
||||
;
|
||||
|
||||
|
||||
but we were able to get it to compile with modern compilers by specifying the
|
||||
`-ansi` flag with a tip from Yusuke Endoh. Thank you Yusuke!
|
||||
but we were able to get it to compile with modern compilers by specifying the
|
||||
`-ansi` flag with a tip from Yusuke Endoh. Thank you Yusuke!
|
||||
|
||||
|
||||
### To run
|
||||
### To run:
|
||||
|
||||
./scjones
|
||||
|
||||
## Judges' comments
|
||||
## Judges' comments:
|
||||
|
||||
The addition of trigraphs has made it easier to make programs
|
||||
hard to read. It was a dark and stormy night for C when the
|
||||
ANSI C committee added trigraphs to the standard. Too bad
|
||||
that they didn't just simply require a more reasonable ISO
|
||||
character set.
|
||||
The addition of trigraphs has made it easier to make programs
|
||||
hard to read. It was a dark and stormy night for C when the
|
||||
ANSI C committee added trigraphs to the standard. Too bad
|
||||
that they didn't just simply require a more reasonable ISO
|
||||
character set.
|
||||
|
||||
## Author's comments
|
||||
## Author's comments:
|
||||
|
||||
Since this year's contest is dedicated to ANSI C, here is a
|
||||
strictly conforming entry. In accordance with the ANSI
|
||||
definition of a strictly conforming program it does not produce
|
||||
output dependent on any unspecified, undefined, or implementation
|
||||
defined behavior, and it does not exceed any of the minimum
|
||||
implementation limits. It adheres to all of the syntactic and
|
||||
semantic constraints of the standard, #includes the relevant
|
||||
headers for the functions it uses, and uses the EXIT_SUCCESS and
|
||||
EXIT_FAILURE macros to return a correct success/fail status to
|
||||
the invoking program. It also uses trigraphs for characters
|
||||
which are not in the Invariant Code Set of ISO 646:1983, so it
|
||||
will be portable to machines with deficient (from C's standpoint)
|
||||
character sets. In short, it should be very widely portable. As
|
||||
an extra added attraction, all of the lines are under 72
|
||||
characters long, which would allow for sequence numbers to be
|
||||
punched in columns 73-80 :-).
|
||||
Since this year's contest is dedicated to ANSI C, here is a
|
||||
strictly conforming entry. In accordance with the ANSI
|
||||
definition of a strictly conforming program it does not produce
|
||||
output dependent on any unspecified, undefined, or implementation
|
||||
defined behavior, and it does not exceed any of the minimum
|
||||
implementation limits. It adheres to all of the syntactic and
|
||||
semantic constraints of the standard, #includes the relevant
|
||||
headers for the functions it uses, and uses the EXIT_SUCCESS and
|
||||
EXIT_FAILURE macros to return a correct success/fail status to
|
||||
the invoking program. It also uses trigraphs for characters
|
||||
which are not in the Invariant Code Set of ISO 646:1983, so it
|
||||
will be portable to machines with deficient (from C's standpoint)
|
||||
character sets. In short, it should be very widely portable. As
|
||||
an extra added attraction, all of the lines are under 72
|
||||
characters long, which would allow for sequence numbers to be
|
||||
punched in columns 73-80 :-).
|
||||
|
||||
[[ The Author sent us this note after he was informed that he won ]]
|
||||
[[ The Author sent us this note after he was informed that he won ]]
|
||||
|
||||
Although I am quite grateful for the "ANSI Committee's Worst Abuse
|
||||
of C" title (were you aware that I am a member of the committee or
|
||||
is the double meaning unintentional?), I was really hoping for
|
||||
something more along the lines of "Closest Resemblance to Line Noise." :-)
|
||||
> Although I am quite grateful for the "ANSI Committee's Worst Abuse of C" title
|
||||
(were you aware that I am a member of the committee or is the double meaning
|
||||
unintentional?), I was really hoping for something more along the lines of
|
||||
"Closest Resemblance to Line Noise." :-)
|
||||
|
||||
[[ ... it was unintentional ]]
|
||||
|
||||
[[ ... it was unintentional ]]
|
||||
|
||||
Copyright (c) 1990, Landon Curt Noll & Larry Bassel.
|
||||
All Rights Reserved. Permission for personal, educational or non-profit use is
|
||||
|
||||
Reference in new issue
Block a user