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:
Cody Boone Ferguson committed 2023-03-11 10:07:14 -08:00
1 parent e5ef2978f6
commit 0ae55de0b8
17 files changed
+420 -347

No files matched your search

+26 -22
View File
@@ -13,39 +13,43 @@
make all
NOTE: that's not a typo but one can also do:
./o
## Judges' comments
We changed the alias that the author's suggested alias from a
C-shell alias to a zsh alias.
We changed the alias that the author's suggested alias from a
C-shell alias to a zsh alias.
Note that shst.c is renamed to stig.c in the distribution.
Note that shst.c is renamed to stig.c in the distribution.
WARNING: This program's 'how to compile' is too specific to a particular
shell. The obfuscation of this program to more related to
shell obfuscation than C obfuscation. This type of entry will
not be permitted in future contests.
shell. The obfuscation of this program to more related to
shell obfuscation than C obfuscation. This type of entry will
not be permitted in future contests.
## Author's comments
If you like shell programming you may also admire my
creative quoting. (I use echo to create an alias
which when run calls cc with the -D option to create a
C macro with double quotes in it. ARRRRRGGGHHH!)
If you like shell programming you may also admire my
creative quoting. (I use echo to create an alias
which when run calls cc with the -D option to create a
C macro with double quotes in it. ARRRRRGGGHHH!)
The program is totally portable, but the compile
commands are very shell specific so don't be TOO mad
at me if they don't work for you.
The program is totally portable, but the compile
commands are very shell specific so don't be TOO mad
at me if they don't work for you.
If you want to put these commands in a Makefile you
must add 4 - four - backslashes at the end on first
line. (At least that's what works here.)
If you want to put these commands in a Makefile you
must add 4 - four - backslashes at the end on first
line. (At least that's what works here.)
If everything works correctly it create an executable
named c which checks whether your compiler supports
nested comments. I've stolen the "/*/*/0*/**/1" from
somewhere so don't give me any points for it. Of
course neither ANSI nor K&R support nested comments
when properly implemented, but what the heck.
If everything works correctly it create an executable
named c which checks whether your compiler supports
nested comments. I've stolen the `"/*/*/0*/**/1"` from
somewhere so don't give me any points for it. Of
course neither ANSI nor K&R support nested comments
when properly implemented, but what the heck.
Copyright (c) 1990, Landon Curt Noll & Larry Bassel.
All Rights Reserved. Permission for personal, educational or non-profit use is