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

+7 -3
View File
@@ -1,12 +1,14 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#define X
#define Y {}
#define C }
#define o {
#undef main
char m[500][99],v[99],R;
int*a,b,n,i,j,W,A;
char m[500][99],v[99],R,*a;
int b,n,i,j,W,A;
float Q,G,D,M,T,B,O,U,V,N,y,e();
P(g,R,u)float*g,R,u;{int c;for(*g=1,c=u;c--;*g*=R);}
X
@@ -77,7 +79,7 @@ for(j=0;j<n;puts(j++[m]));
e("",O,O,a);
n=j-(O=1);
while(gets(j++[m]));
if(!strcmp(*++a,"-r"))S();
if(!strcmp(++a,"-r"))S();
C
/**/main(A,a)int A;char*a[];
Y
@@ -90,4 +92,6 @@ float Q,G,D,M,T,O,B,U,V,N,e();
#define o }
#define C {
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>