From dad330d67131653697fb4eaa7103c349e9942588 Mon Sep 17 00:00:00 2001
From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com>
Date: Tue, 11 Apr 2023 13:27:13 -0700
Subject: [PATCH 1/2] Fix 1995/garry
Formatting fixes.
Remove address as there was a formatting issue. Besides it's probably
inaccurate by now. Kept the country.
There was a stray partial sentence in the judges' remarks that strayed
in (or to be more correct it was never moved properly) when I added the
try section. It's now been removed.
URL is dead so used the Internet Wayback Machine. Updated the URL in the
winners.csv file too. That might need to be done with others that I've
recently fixed but that will have to be checked on another time.
---
1995/garry/README.md | 29 ++++++++++++++++-------------
tmp/winners.csv | 2 +-
2 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/1995/garry/README.md b/1995/garry/README.md
index b7f10648b..fac3078bd 100644
--- a/1995/garry/README.md
+++ b/1995/garry/README.md
@@ -1,28 +1,31 @@
# Best Utility
- Garry Glendown
- G\"uldene Kammer 35
- 36251 Bad Hersfeld
- Germany
+Garry Glendown
+Germany
+
## To build:
- make all
+```sh
+make all
+```
## To run:
-
- ./garry output_file
+```sh
+./garry output_file
+```
## Try:
- ./garry.test.sh
+```sh
- ./garry < README.md
+./garry.test.sh
-## Judges' remarks
+./garry < README.md
+```
-In general, try:
+## Judges' remarks:
While it may not have been the intention of the submitter, the
@@ -33,9 +36,9 @@ left intact) looked very much like a rat "dropping core". See
The author was kind enough to provide a less obfuscated version of
the source called `garry.fmt.c`.
-## Author's remarks
+## Author's remarks:
-This program is a file filter, designed to do environment-expansion and
+This program is a file filter, designed to do environment-expansion and
incorporating the ability to create binary from escaped data in the
environment variables.
diff --git a/tmp/winners.csv b/tmp/winners.csv
index 7ec5dd0c8..c37133f89 100644
--- a/tmp/winners.csv
+++ b/tmp/winners.csv
@@ -74,7 +74,7 @@ Ferenc Deak,Ferenc_Deak,null,null,null,null,null);
Francois Boutines,Francois_Boutines,null,null,francois.boutines@gmail.com,Toulouse, France
Frans van Dorsselaer,Frans van Dorsselaer,null,null,frans@biabv.com,null,null);
Freek Wiedijk,Freek_Wiedijk,null,null,null,null,null);
-Garry Glendown,Garry_Glendown,http://insider.regio.net/~garry,null,garry@insider.regio.net,null,null);
+Garry Glendown,Garry_Glendown,https://web.archive.org/web/20011221120305/http://insider.regio.net/~garry/,null,garry@insider.regio.net,null,null);
Gavin Barraclough,Gavin_Barraclough,null,null,gavin@barraclough.name,null,null);
Gavin Buttimore,Gavin_Buttimore,null,null,gavin.buttimore@creaturelabs.com,null,null);
Gil Dogon,Gil_Dogon,null,null,gil.jade@gmail.com,null,null);
From 0de314508406ead890be6579820e2ab36737630b Mon Sep 17 00:00:00 2001
From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com>
Date: Tue, 11 Apr 2023 14:00:16 -0700
Subject: [PATCH 2/2] Rename garry.cpp to garry.alt.c and fix it
The reason I fixed it is indeed exactly as I said: I felt it has to work
because of the layout; it does indeed look like what the judges noted -
a rat dropping core.
Now one can use make alt and use garry.alt for the same results.
But why not garry.cpp? Because compilers will think it's C++ and besides
that these types of files are meant to be called .alt.c. The formatted
version provided by the author is still there of course.
---
1995/garry/.gitignore | 1 +
1995/garry/Makefile | 4 ++--
1995/garry/README.md | 29 +++++++++++++++++++++------
1995/garry/{garry.cpp => garry.alt.c} | 2 +-
4 files changed, 27 insertions(+), 9 deletions(-)
rename 1995/garry/{garry.cpp => garry.alt.c} (94%)
diff --git a/1995/garry/.gitignore b/1995/garry/.gitignore
index 49349a9ab..114af9271 100644
--- a/1995/garry/.gitignore
+++ b/1995/garry/.gitignore
@@ -1 +1,2 @@
garry
+garry.alt
diff --git a/1995/garry/Makefile b/1995/garry/Makefile
index 02c7ed5e1..be0af1e81 100644
--- a/1995/garry/Makefile
+++ b/1995/garry/Makefile
@@ -114,8 +114,8 @@ OBJ= ${PROG}.o
DATA=
TARGET= ${PROG}
#
-ALT_OBJ=
-ALT_TARGET=
+ALT_OBJ= ${PROG}.alt.o
+ALT_TARGET= ${PROG}.alt
#################
diff --git a/1995/garry/README.md b/1995/garry/README.md
index fac3078bd..32d4a9e83 100644
--- a/1995/garry/README.md
+++ b/1995/garry/README.md
@@ -10,6 +10,7 @@ Germany
make all
```
+
## To run:
```sh
@@ -25,16 +26,32 @@ make all
./garry < README.md
```
+### Alternate code:
+
+While it may not have been the intention of the author, the
+judges noted that the C pre-processed version (with the `#include`s
+left intact) looked very much like a rat "dropping core". See
+[garry.alt.c](garry.alt.c) and judge for yourself!
+
+[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed it
+so that it will compile with modern compilers. The problem was a missing `int` for
+the `f` variable. He felt it was important that it works because the layout does
+indeed look to him like a rat is dropping core. Thank you Cody!
+
+To use try:
+
+```sh
+make alt
+```
+
+Use `garry.alt` as you would `garry` above.
+
+
## Judges' remarks:
-While it may not have been the intention of the submitter, the
-judges noted that the C pre-processed version (with the `#include`s
-left intact) looked very much like a rat "dropping core". See
-`garry.cpp` and judge for yourself!
-
The author was kind enough to provide a less obfuscated version of
-the source called `garry.fmt.c`.
+the source called [garry.fmt.c](garry.fmt.c).
## Author's remarks:
diff --git a/1995/garry/garry.cpp b/1995/garry/garry.alt.c
similarity index 94%
rename from 1995/garry/garry.cpp
rename to 1995/garry/garry.alt.c
index c97098d53..84501c055 100644
--- a/1995/garry/garry.cpp
+++ b/1995/garry/garry.alt.c
@@ -16,7 +16,7 @@
!c){return(y);}a=y;b=z;while(*a){if(*a!=D) *b++=*a
++;else{a++;c=strchr(a,D);if(c){*c=0;;if(strchr(a,32
)){*c=D;*b++=D;}else{;v=getenv(a);if(v){while(*v){if(*
- v!=92)*b++=*v++;else{f=0;v++;if(*v<48||*v>57
+ v!=92)*b++=*v++;else{int f=0;v++;if(*v<48||*v>57
)*b++=92;else{f=(*v++)-48;;if(*v<48||*v
>57)*b++=f;else{f=(f<<3)+(*v++)-48;;*b++=(
(*v<48||*v>57)?f:((f<<3)+(*v++)-48));}}}