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
+14
-11
@@ -10,34 +10,37 @@
|
||||
|
||||
make all
|
||||
|
||||
NOTE: This entry might not compile when using modern compilers.
|
||||
|
||||
### To run
|
||||
### To run:
|
||||
|
||||
echo foo bar | ./dg
|
||||
|
||||
### Try:
|
||||
|
||||
echo "to C or not to C" | ./dg
|
||||
|
||||
## Judges' comments
|
||||
|
||||
Some C preprocessors got confused about single quotes in certain cases.
|
||||
In particular, the following source line:
|
||||
Some C preprocessors got confused about single quotes in certain cases.
|
||||
In particular, the following source line:
|
||||
|
||||
b12(ase(bco(acp(bi(acp(bcp(acp(bpl(aqu(bqu(A))))))))))))))))))))))))))))))
|
||||
|
||||
sometimes has to be changed to:
|
||||
sometimes has to be changed to:
|
||||
|
||||
b12(ase(bco(acp(bi(acp(bcp(acp(bpl('A'))))))))))))))))))))))))))))
|
||||
|
||||
if the C preprocessor botches single quotes in cpp expansions, which we have
|
||||
done for the wider audience.
|
||||
if the C preprocessor botches single quotes in cpp expansions, which we have
|
||||
done for the wider audience.
|
||||
|
||||
|
||||
## Author's comments
|
||||
|
||||
If my preprocessor could hack it, I could write this as one single
|
||||
line rather than 4, but when I do that I get a complaint "defines
|
||||
nested too deeply".
|
||||
If my preprocessor could hack it, I could write this as one single
|
||||
line rather than 4, but when I do that I get a complaint "defines
|
||||
nested too deeply".
|
||||
|
||||
Spoiler: (rot13 to read)
|
||||
Spoiler: (rot13 to read)
|
||||
|
||||
Guvf vf nabgure ebg13 wbo (oryvrir vg be abg) - gur #qrsvarf ner n
|
||||
abiry jnl bs nqqvat gbxraf: '#qrsvar o12(k) 12 k' zrnaf gung ng
|
||||
|
||||
Reference in new issue
Block a user