diff --git a/1989/fubar/README.md b/1989/fubar/README.md index 3c274babf..3a5055c76 100644 --- a/1989/fubar/README.md +++ b/1989/fubar/README.md @@ -33,10 +33,13 @@ Run this with a single digit argument (or wait a long time). The blank line at the beginning of the source is mandatory. Do you know why? -NOTE: don't try running [ouroboros.c](ouroboros.c) (note that it's executable) +NOTE: don't try running `ouroboros.c` (note that it's executable) directly with an arg as it'll turn into an infinite loop. The same will happen with larger numbers. +NOTE: the file `ouroboros.c` is created by the program itself so this is why it +is not in the repository. + ## Author's remarks: In a nutshell, this is probably the slowest and most diff --git a/1992/lush/Makefile b/1992/lush/Makefile index 5fbb21498..569f712e6 100644 --- a/1992/lush/Makefile +++ b/1992/lush/Makefile @@ -38,7 +38,7 @@ include ../../var.mk # Common C compiler warnings to silence # -CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-macro-redefined \ +CSILENCE= -Wno-error -Wno-implicit-function-declaration \ -Wno-strict-prototypes # Common C compiler warning flags diff --git a/2000/thadgavin/README.md b/2000/thadgavin/README.md index b335a4c5a..eaad2a6c0 100644 --- a/2000/thadgavin/README.md +++ b/2000/thadgavin/README.md @@ -1,16 +1,10 @@ # Most Portable Output Thaddaeus Frogley -Creature Labs -164 Hornbeams -Harlow, Essex UK Gavin Buttimore -Creature Labs -9 Elizabeth Way -Cambridge -UK, CB4 1DE +UK ## To build: diff --git a/2011/fredriksson/README.md b/2011/fredriksson/README.md index 5c1c2ec15..39ccf5d54 100644 --- a/2011/fredriksson/README.md +++ b/2011/fredriksson/README.md @@ -208,7 +208,7 @@ Just say * Algorithmically, it incorporates the following - (inverse) Burrows-Wheeler transform (used also e.g. in bzip2) - - data compression (really expansion :-), run-lenght-encoding, + - data compression (really expansion :-), run-length-encoding, unary coding (this is why it is expansion rather than compression) - approximate string matching - dynamic programming to compute the edit distance diff --git a/bugs.md b/bugs.md index 4d797ca63..8909091ba 100644 --- a/bugs.md +++ b/bugs.md @@ -736,7 +736,69 @@ work but it only works with gcc. Cody removed the warnings of `gets()`. Unfortunately due to the way the entry works and the fact that other compilers like clang have different warnings and errors this simply does not work with -them. Can you help us? +them. + +Some tips from Cody: + +This entry relies on specific compiler warnings. With gcc it will look something +like: + +``` +[...] +lush.c: In function 'main': +lush.c:40: warning: "f" redefined + 40 | main + | +lush.c:1: note: this is the location of the previous definition + 1 | #define gets(_) fgets((_),999,stdin) + | +lush.c:42: warning: "f" redefined + 42 | #define f 001: + | +lush.c:40: note: this is the location of the previous definition + 40 | main + | +lush.c:44: warning: "f" redefined + 44 | #define f 100: + | +lush.c:42: note: this is the location of the previous definition + 42 | #define f 001: + | +lush.c:45: warning: "f" redefined + 45 | _[i-- + | +lush.c:44: note: this is the location of the previous definition + 44 | #define f 100: + | +lush.c:46: warning: "f" redefined + 46 | #define f 126: + | +lush.c:45: note: this is the location of the previous definition + 45 | _[i-- + | +``` + +Now one can use `sed` to get the `warning:` line correct but there is more to it +than that. For instance this is what it looks like with clang: + +``` +lush.c:40:9: warning: 'f' macro redefined [-Wmacro-redefined] +#define f 001: + ^ +lush.c:1:9: note: previous definition is here +#define f 000: + ^ +lush.c:42:9: warning: 'f' macro redefined [-Wmacro-redefined] +#define f 100: + ^ +lush.c:40:9: note: previous definition is here +#define f 001: + ^ +``` + +As you might see the part under the `warning:` line is different. + +Can you help us? ## [1992/westley](1992/westley/westley.c) ([README.md](1992/westley/README.md)) ## STATUS: INABIAF - please **DO NOT** fix diff --git a/thanks-for-fixes.md b/thanks-for-fixes.md index 953a14ba8..3a839e0dc 100644 --- a/thanks-for-fixes.md +++ b/thanks-for-fixes.md @@ -642,6 +642,9 @@ it moves towards the right but if you click the mouse it goes back. Yusuke supplied a patch which makes this work with gcc. Due to how it works (see Judges' remarks in the README.md file) this will not work with clang. +Cody also provided the `runme.sh` script to demonstrate it as using make was +problematic. + Cody made it use `fgets()` instead of `gets()` to prevent annoying warnings getting in the way (in linux linking in a binary with `gets()` produces a warning that might get in the way with this entry and in macOS at runtime it @@ -652,8 +655,10 @@ with clang due to different compiler messages. Cody later improved the `fgets()` change to look more like the original i.e. it now uses a redefined `gets()`. This did require modifying the line number with -`#line 1` under the macro `gets()`. Still this cannot work with clang due to -different compiler messages. See [bugs.md](/bugs.md) for details. +`#line 1` under the macro `gets()`. + +Still this cannot work with clang due to different compiler messages. See +[bugs.md](/bugs.md) for details. ## [1992/nathan](1992/nathan/nathan.c) ([README.md](1992/nathan/README.md)) @@ -795,7 +800,9 @@ Cody fixed this so that it would work with macOS. Once it could compile it additionally segfaulted under macOS which he also fixed. Cody also provided the [Alternate code](1995/cdua/cdua.alt.c) for fun :-) ) (in particular to make it easier to see the program do what it does in systems that are too fast ... if -there is such a thing anyway :-) ). +there is such a thing anyway :-) ). See the README.md for details on this. + + ## [1995/garry](1995/garry/garry.c) ([README.md](1995/garry/README.md]))