Format, typo & link fix thanks file through 1990

Both thanks-for-help.md and thanks-for-help.html updated.
This commit is contained in:
Cody Boone Ferguson committed 2024-05-13 07:50:44 -07:00
1 parent 0706662c99
commit 318f4f80eb
2 files changed
+79 -77

No files matched your search

+39 -38
View File
@@ -1235,16 +1235,16 @@ environmental variable; see the index.html for details.</p>
<h3 id="source-code-baruch.c">Source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/baruch/baruch.c">baruch.c</a></h3> <h3 id="source-code-baruch.c">Source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/baruch/baruch.c">baruch.c</a></h3>
</div> </div>
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/baruch/try.sh">try.sh</a> script.</p> <p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/baruch/try.sh">try.sh</a> script.</p>
<p>Cody also added an <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/baruch/baruch.alt.c">alternate version</a> which allows Turbo-C <p>Cody also added an <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/baruch/baruch.alt.c">alternate version</a>, which allows Turbo-C
and MSC to compile this code, based on the authors’ remarks, except that Cody and MSC to compile this code, based on the authors’ remarks, except that Cody
did not change the <code>" #Q"</code> string as that showed worse looking output did not change the <code>" #Q"</code> string as that appeared to show worse looking output
instead of improved output though he has no way to test the compilers in instead of improved output though he has no way to test the compilers in
question (i.e. it was only tested in the original entry). YMMV.</p> question (i.e. it was only tested in the original entry). YMMV.</p>
<p>Although this is appreciated we agree with him that <del>no one</del> <p>Although this is appreciated we agree with him that <del>no one</del>
<a href="https://en.wikipedia.org/wiki/0">very few</a> <a href="https://en.wikipedia.org/wiki/0">very few</a>
<a href="https://en.wikipedia.org/wiki/Microsoft_Windows">users</a> <a href="https://en.wikipedia.org/wiki/Microsoft_Windows">users</a>
<a href="https://www.ioccc.org">here</a> will need it! :-)</p> <a href="https://www.ioccc.org">here</a> will need it! :-)</p>
<p>Cody also made the code look more like the original, removing the <code>int</code> from <p>Cody made the code look more like the original, removing the <code>int</code> from
the variables, adding instead <code>-Wno-implicit-int</code>. The newline added by the the variables, adding instead <code>-Wno-implicit-int</code>. The newline added by the
judges was retained.</p> judges was retained.</p>
<div id="1990_cmills"> <div id="1990_cmills">
@@ -1263,11 +1263,11 @@ fgets(3)?</a> for why this was done.</p>
<p><a href="#yusuke">Yusuke</a> and <a href="#cody">Cody</a> in conjunction fixed this for modern systems (both fixed a <p><a href="#yusuke">Yusuke</a> and <a href="#cody">Cody</a> in conjunction fixed this for modern systems (both fixed a
different compiler error but more fixes were also made).</p> different compiler error but more fixes were also made).</p>
<p>Yusuke added the comma operator for a binary expression with <code>free(3)</code> which is <p>Yusuke added the comma operator for a binary expression with <code>free(3)</code> which is
is a compiler error because <code>free()</code> returns void. Cody then made it slightly a compiler error because <code>free()</code> returns <code>void</code>. Cody then made it slightly
more like the original in this way by redefining <code>free</code> to have the comma more like the original in this way by redefining <code>free</code> to have the comma
operator itself.</p> operator itself.</p>
<p>Cody fixed another compiler error by removing the erroneous prototype to <p>Cody fixed another compiler error by removing the erroneous prototype to
<code>fopen()</code>. Cody also changed a <code>char *</code> used for file I/O to be a proper <code>FILE *</code> and fixed a typo in <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/dds/LANDER.BAS">LANDER.BAS</a>.</p> <code>fopen(3)</code>. Cody also changed a <code>char *</code> used for file I/O to be a proper <code>FILE *</code> and fixed a typo in <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/dds/LANDER.BAS">LANDER.BAS</a>.</p>
<p>Cody also made this use <code>fgets(3)</code>. See <a href="faq.html#faq4_1">FAQ 4.1 - Why were some calls to <p>Cody also made this use <code>fgets(3)</code>. See <a href="faq.html#faq4_1">FAQ 4.1 - Why were some calls to
the libc function gets(3) changed to use the libc function gets(3) changed to use
fgets(3)?</a> for why this was done.</p> fgets(3)?</a> for why this was done.</p>
@@ -1294,13 +1294,14 @@ with if the C preprocessor botches single quotes in cpp expansion.</p>
<p><a href="#cody">Cody</a> fixed the script to work properly in modern environments including writing <p><a href="#cody">Cody</a> fixed the script to work properly in modern environments including writing
to and extracting from <code>stdout</code> and relying on the exit code in the commands to to and extracting from <code>stdout</code> and relying on the exit code in the commands to
allow for <code>&amp;&amp; ...</code>.</p> allow for <code>&amp;&amp; ...</code>.</p>
<p>He also changed the <code>perror(3)</code> call to <code>fprintf(3)</code> because in macOS when errno <p>Cody also changed the <code>perror(3)</code> call to <code>fprintf(3)</code> because in macOS when errno
is 0 it shows what looks like an error.</p> is 0 it shows what looks like an error. However, see <a href="bugs.html#1990_jaw">1990/jaw in
<p>He added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/jaw/try.sh">try.sh</a> to run the commands that we suggested at bugs.html</a>.</p>
the time.</p> <p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/jaw/try.sh">try.sh</a> to run the commands that we suggested at
the time of releasing the winning entries of 1990.</p>
<p>NOTE: as <code>btoa</code> is not common we used a ruby script from <a href="#yusuke">Yusuke</a> but with a minor <p>NOTE: as <code>btoa</code> is not common we used a ruby script from <a href="#yusuke">Yusuke</a> but with a minor
fix applied by Cody that made the program just show <code>oops</code> twice from invalid fix applied by Cody that made the program just show <code>oops</code> twice (twice is not
input but which now works.</p> an error here) from invalid input but which now works.</p>
<div id="1990_pjr"> <div id="1990_pjr">
<h2 id="pjr"><a href="1990/pjr/index.html">1990/pjr</a></h2> <h2 id="pjr"><a href="1990/pjr/index.html">1990/pjr</a></h2>
<h3 id="source-code-pjr.c">Source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/pjr/pjr.c">pjr.c</a></h3> <h3 id="source-code-pjr.c">Source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/pjr/pjr.c">pjr.c</a></h3>
@@ -1320,20 +1321,18 @@ entry does.</p>
<h2 id="tbr"><a href="1990/tbr/index.html">1990/tbr</a></h2> <h2 id="tbr"><a href="1990/tbr/index.html">1990/tbr</a></h2>
<h3 id="source-code-tbr.c">Source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/tbr/tbr.c">tbr.c</a></h3> <h3 id="source-code-tbr.c">Source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/tbr/tbr.c">tbr.c</a></h3>
</div> </div>
<p><a href="#cody">Cody</a> fixed this to work with modern compilers; <code>exit(3)</code> returns void but the <p><a href="#cody">Cody</a> fixed this to work with modern compilers; <code>exit(3)</code> returns <code>void</code> but the
function was used in a binary expression so this wouldn’t even compile.</p> function was used in a binary expression so this wouldn’t even compile.</p>
<p>Cody also changed the code to use <code>fgets()</code> instead of <code>gets()</code> so one would not get <p>Cody fixed (as above) and added the shortened version as <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/tbr/tbr.alt.c">alt
a warning about the use of <code>gets(3)</code> at linking time or execution, the latter of code</a> which originally comes from the
which was causing confusing output due to the warning being interspersed with author.</p>
the program’s interactive output. See <a href="faq.html#faq4_1">FAQ 4.1 - Why were some calls to <p>Cody also changed the code (in both versions) to use <code>fgets(3)</code> instead of
the libc function gets(3) changed to use <code>gets(3)</code> so one would not get a warning about the use of <code>gets(3)</code> at linking
fgets(3)?</a> for more details.</p> time or execution, the latter of which was causing confusing output due to the
<p>Additionally, Cody fixed the shortened version provided by the author in the warning being interspersed with the program’s interactive output. See <a href="faq.html#faq4_1">FAQ 4.1
same way as the original entry, first the compile fix and then later on making - Why were some calls to the libc function gets(3) changed to use
it look more like the original by redefining <code>exit</code> and also redefining <code>gets()</code> fgets(3)?</a> for more details on why this change was
to be <code>fgets()</code> in the same way that the original entry is. This way the <a href="1990/tbr/index.html#alternate-code">alt done more generally.</p>
version</a> is equivalent in function, like the
author intended, but more compact.</p>
<div id="1990_theorem"> <div id="1990_theorem">
<h2 id="theorem"><a href="1990/theorem/index.html">1990/theorem</a></h2> <h2 id="theorem"><a href="1990/theorem/index.html">1990/theorem</a></h2>
<h3 id="source-code-theorem.c">Source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/theorem/theorem.c">theorem.c</a></h3> <h3 id="source-code-theorem.c">Source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/theorem/theorem.c">theorem.c</a></h3>
@@ -1341,9 +1340,9 @@ author intended, but more compact.</p>
<p><a href="#cody">Cody</a> fixed this to compile with modern systems.</p> <p><a href="#cody">Cody</a> fixed this to compile with modern systems.</p>
<p>He also fixed some bugs that impacted the usability of this program including some <p>He also fixed some bugs that impacted the usability of this program including some
segfaults under modern systems (and possibly in some cases earlier systems) with segfaults under modern systems (and possibly in some cases earlier systems) with
this entry. Originally we noted that the 4 trailing args ‘0 0 0 0’ were this entry. Originally we noted that 4 trailing args, <code>0 0 0 0</code>, were
required on systems that dump core when NULL is dereferenced but this problem required on systems that dump core when <code>NULL</code> is dereferenced but the problem
showed itself in modern systems even with the 4 ‘0 0 0 0’. He also fixed a this was meant to fix showed itself in modern systems even with the 4 <code>0</code>s. He also fixed a
segfault if not enough args are specified and fixed the code so that the segfault if not enough args are specified and fixed the code so that the
generated <code>fibonacci.c</code> actually works; before it just printed <code>0</code> over and over generated <code>fibonacci.c</code> actually works; before it just printed <code>0</code> over and over
again (since it did not work anyway a segfault prevention was added here). He again (since it did not work anyway a segfault prevention was added here). He
@@ -1351,29 +1350,30 @@ also fixed some array addressing (some of which might not be strictly necessary
but as he was testing the <code>fibonacci.c</code> bug he ended up changing it anyway).</p> but as he was testing the <code>fibonacci.c</code> bug he ended up changing it anyway).</p>
<p>BTW: why can’t the fix:</p> <p>BTW: why can’t the fix:</p>
<pre><code> if (a[1]==NULL||a[2]==NULL||a[3]==NULL||a[4]==NULL||a[5]==NULL) return 1;</code></pre> <pre><code> if (a[1]==NULL||a[2]==NULL||a[3]==NULL||a[4]==NULL||a[5]==NULL) return 1;</code></pre>
<p>be changed to just test the value of <code>A</code> when <code>a</code> is argv and <code>A</code> is argc?</p> <p>be changed to just test the value of <code>A</code> when <code>a</code> is argv and <code>A</code> is argc? You
tell us!</p>
<p>Cody also changed the code to use <code>fgets(3)</code>. See <a href="faq.html#faq4_1">FAQ 4.1 - Why were some calls to <p>Cody also changed the code to use <code>fgets(3)</code>. See <a href="faq.html#faq4_1">FAQ 4.1 - Why were some calls to
the libc function gets(3) changed to use the libc function gets(3) changed to use
fgets(3)?</a> for why this was done.</p> fgets(3)?</a> for why this was done.</p>
<p>Since this program is so incredible the extra fixes were deemed worth having and <p>Since this program is so incredible the extra fixes were deemed worth having and
this is why it was done.</p> this is why they were done.</p>
<p>Cody later disabled a warning in the Makefile that proved to be a problem only <p>Cody later disabled a warning in the <code>Makefile</code> that proved to be a problem only
with <code>clang</code> in Linux but which was defaulting to an error. This way was the with <code>clang</code> in Linux but which was defaulting to an error. This way was the
simplest way to deal with the problem in question due to the way the entry simplest way to deal with the problem in question due to the way the entry
works.</p> works.</p>
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/theorem/try.sh">try.sh</a> script which shows the <p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/theorem/try.sh">try.sh</a> script which shows the
original program and some of the programs it generates.</p> original program and some of the programs it generates.</p>
<p><a href="#yusuke">Yusuke</a> pointed out that <code>atof</code> nowadays needs <code>#include &lt;stdlib.h&gt;</code> which was <p><a href="#yusuke">Yusuke</a> pointed out that <code>atof(3)</code> nowadays needs <code>#include &lt;stdlib.h&gt;</code> which was
used in order to get this to work initially (prior to this output was there but used in order to get this to work initially (prior to this output was there but
incomplete).</p> incomplete).</p>
<div id="1990_stig"> <div id="1990_stig">
<h2 id="stig"><a href="1990/stig/index.html">1990/stig</a></h2> <h2 id="stig"><a href="1990/stig/index.html">1990/stig</a></h2>
<h3 id="source-code-stig.c">Source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/stig/stig.c">stig.c</a></h3> <h3 id="source-code-stig.c">Source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/stig/stig.c">stig.c</a></h3>
</div> </div>
<p><a href="#cody">Cody</a> fixed the paths in the Makefile so that this would build in Linux (it <p><a href="#cody">Cody</a> fixed the paths in the <code>Makefile</code> so that this would build in Linux (it
worked fine in macOS).</p> worked fine in macOS).</p>
<p>He also changed the Makefile to use <code>bash</code> not <code>zsh</code> as not all systems have <p>He also changed the <code>Makefile</code> to use <code>bash</code> not <code>zsh</code> as not all systems have
<code>zsh</code> and the Makefile actually sets <code>SHELL</code> to <code>bash</code>.</p> <code>zsh</code> and the <code>Makefile</code> actually sets <code>SHELL</code> to <code>bash</code>.</p>
<div id="1990_westley"> <div id="1990_westley">
<h2 id="westley-3"><a href="1990/westley/index.html">1990/westley</a></h2> <h2 id="westley-3"><a href="1990/westley/index.html">1990/westley</a></h2>
<h3 id="source-code-westley.c-3">Source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/westley/westley.c">westley.c</a></h3> <h3 id="source-code-westley.c-3">Source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/westley/westley.c">westley.c</a></h3>
@@ -1382,12 +1382,13 @@ worked fine in macOS).</p>
differences he has provided an alternate version, differences he has provided an alternate version,
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/westley/westley.alt.c">westley.alt.c</a>, which is the original code.</p> <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/westley/westley.alt.c">westley.alt.c</a>, which is the original code.</p>
<p>He also changed the <code>argc</code> to be an <code>int</code>, not a <code>char</code>, even though it might <p>He also changed the <code>argc</code> to be an <code>int</code>, not a <code>char</code>, even though it might
often be the same (for the purpose of <code>clang</code>?).</p> often be the same (this in particular was done for <code>clang</code>).</p>
<p>He also fixed the code to not enter an infinite loop if arg is a number not &gt; 0 <p>He also fixed the code to not enter an infinite loop if arg is a number not &gt; 0
and to not crash if no arg is specified.</p> and to not crash if no arg is specified. This was done during a time it was
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/westley/try.sh">try.sh</a> script.</p> deemed a problem to be fixed.</p>
<p>The alt code did NOT have arg checks added as it is actually a copy of the <p>NOTE: the alt code did NOT have arg checks added as it is actually a copy of the
original code.</p> original code.</p>
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/westley/try.sh">try.sh</a> script.</p>
<div id="1991"> <div id="1991">
<h1 id="section-7"><a href="1991/index.html">1991</a></h1> <h1 id="section-7"><a href="1991/index.html">1991</a></h1>
</div> </div>
+40 -39
View File
@@ -1214,9 +1214,9 @@ environmental variable; see the index.html for details.
[Cody](#cody) added the [try.sh](%%REPO_URL%%/1990/baruch/try.sh) script. [Cody](#cody) added the [try.sh](%%REPO_URL%%/1990/baruch/try.sh) script.
Cody also added an [alternate version](%%REPO_URL%%/1990/baruch/baruch.alt.c) which allows Turbo-C Cody also added an [alternate version](%%REPO_URL%%/1990/baruch/baruch.alt.c), which allows Turbo-C
and MSC to compile this code, based on the authors' remarks, except that Cody and MSC to compile this code, based on the authors' remarks, except that Cody
did not change the `" #Q"` string as that showed worse looking output did not change the `" #Q"` string as that appeared to show worse looking output
instead of improved output though he has no way to test the compilers in instead of improved output though he has no way to test the compilers in
question (i.e. it was only tested in the original entry). YMMV. question (i.e. it was only tested in the original entry). YMMV.
@@ -1225,7 +1225,7 @@ Although this is appreciated we agree with him that <del>no one</del>
[users](https://en.wikipedia.org/wiki/Microsoft_Windows) [users](https://en.wikipedia.org/wiki/Microsoft_Windows)
[here](https://www.ioccc.org) will need it! :-) [here](https://www.ioccc.org) will need it! :-)
Cody also made the code look more like the original, removing the `int` from Cody made the code look more like the original, removing the `int` from
the variables, adding instead `-Wno-implicit-int`. The newline added by the the variables, adding instead `-Wno-implicit-int`. The newline added by the
judges was retained. judges was retained.
@@ -1253,12 +1253,12 @@ fgets&#x28;3&#x29;?](faq.html#faq4_1) for why this was done.
different compiler error but more fixes were also made). different compiler error but more fixes were also made).
Yusuke added the comma operator for a binary expression with `free(3)` which is Yusuke added the comma operator for a binary expression with `free(3)` which is
is a compiler error because `free()` returns void. Cody then made it slightly a compiler error because `free()` returns `void`. Cody then made it slightly
more like the original in this way by redefining `free` to have the comma more like the original in this way by redefining `free` to have the comma
operator itself. operator itself.
Cody fixed another compiler error by removing the erroneous prototype to Cody fixed another compiler error by removing the erroneous prototype to
`fopen()`. Cody also changed a `char *` used for file I/O to be a proper `FILE `fopen(3)`. Cody also changed a `char *` used for file I/O to be a proper `FILE
*` and fixed a typo in [LANDER.BAS](%%REPO_URL%%/1990/dds/LANDER.BAS). *` and fixed a typo in [LANDER.BAS](%%REPO_URL%%/1990/dds/LANDER.BAS).
Cody also made this use `fgets(3)`. See [FAQ 4.1 - Why were some calls to Cody also made this use `fgets(3)`. See [FAQ 4.1 - Why were some calls to
@@ -1302,15 +1302,16 @@ Cody also added the [try.sh](%%REPO_URL%%/1990/dg/try.sh) script.
to and extracting from `stdout` and relying on the exit code in the commands to to and extracting from `stdout` and relying on the exit code in the commands to
allow for `&& ...`. allow for `&& ...`.
He also changed the `perror(3)` call to `fprintf(3)` because in macOS when errno Cody also changed the `perror(3)` call to `fprintf(3)` because in macOS when errno
is 0 it shows what looks like an error. is 0 it shows what looks like an error. However, see [1990/jaw in
bugs.html](bugs.html#1990_jaw).
He added the [try.sh](%%REPO_URL%%/1990/jaw/try.sh) to run the commands that we suggested at Cody also added the [try.sh](%%REPO_URL%%/1990/jaw/try.sh) to run the commands that we suggested at
the time. the time of releasing the winning entries of 1990.
NOTE: as `btoa` is not common we used a ruby script from [Yusuke](#yusuke) but with a minor NOTE: as `btoa` is not common we used a ruby script from [Yusuke](#yusuke) but with a minor
fix applied by Cody that made the program just show `oops` twice from invalid fix applied by Cody that made the program just show `oops` twice (twice is not
input but which now works. an error here) from invalid input but which now works.
<div id="1990_pjr"> <div id="1990_pjr">
@@ -1340,23 +1341,20 @@ entry does.
### Source code: [tbr.c](%%REPO_URL%%/1990/tbr/tbr.c) ### Source code: [tbr.c](%%REPO_URL%%/1990/tbr/tbr.c)
</div> </div>
[Cody](#cody) fixed this to work with modern compilers; `exit(3)` returns void but the [Cody](#cody) fixed this to work with modern compilers; `exit(3)` returns `void` but the
function was used in a binary expression so this wouldn't even compile. function was used in a binary expression so this wouldn't even compile.
Cody also changed the code to use `fgets()` instead of `gets()` so one would not get Cody fixed (as above) and added the shortened version as [alt
a warning about the use of `gets(3)` at linking time or execution, the latter of code](%%REPO_URL%%/1990/tbr/tbr.alt.c) which originally comes from the
which was causing confusing output due to the warning being interspersed with author.
the program's interactive output. See [FAQ 4.1 - Why were some calls to
the libc function gets&#x28;3&#x29; changed to use
fgets&#x28;3&#x29;?](faq.html#faq4_1) for more details.
Cody also changed the code (in both versions) to use `fgets(3)` instead of
Additionally, Cody fixed the shortened version provided by the author in the `gets(3)` so one would not get a warning about the use of `gets(3)` at linking
same way as the original entry, first the compile fix and then later on making time or execution, the latter of which was causing confusing output due to the
it look more like the original by redefining `exit` and also redefining `gets()` warning being interspersed with the program's interactive output. See [FAQ 4.1
to be `fgets()` in the same way that the original entry is. This way the [alt - Why were some calls to the libc function gets&#x28;3&#x29; changed to use
version](1990/tbr/index.html#alternate-code) is equivalent in function, like the fgets&#x28;3&#x29;?](faq.html#faq4_1) for more details on why this change was
author intended, but more compact. done more generally.
<div id="1990_theorem"> <div id="1990_theorem">
@@ -1368,9 +1366,9 @@ author intended, but more compact.
He also fixed some bugs that impacted the usability of this program including some He also fixed some bugs that impacted the usability of this program including some
segfaults under modern systems (and possibly in some cases earlier systems) with segfaults under modern systems (and possibly in some cases earlier systems) with
this entry. Originally we noted that the 4 trailing args '0 0 0 0' were this entry. Originally we noted that 4 trailing args, `0 0 0 0`, were
required on systems that dump core when NULL is dereferenced but this problem required on systems that dump core when `NULL` is dereferenced but the problem
showed itself in modern systems even with the 4 '0 0 0 0'. He also fixed a this was meant to fix showed itself in modern systems even with the 4 `0`s. He also fixed a
segfault if not enough args are specified and fixed the code so that the segfault if not enough args are specified and fixed the code so that the
generated `fibonacci.c` actually works; before it just printed `0` over and over generated `fibonacci.c` actually works; before it just printed `0` over and over
again (since it did not work anyway a segfault prevention was added here). He again (since it did not work anyway a segfault prevention was added here). He
@@ -1383,7 +1381,8 @@ BTW: why can't the fix:
if (a[1]==NULL||a[2]==NULL||a[3]==NULL||a[4]==NULL||a[5]==NULL) return 1; if (a[1]==NULL||a[2]==NULL||a[3]==NULL||a[4]==NULL||a[5]==NULL) return 1;
``` ```
be changed to just test the value of `A` when `a` is argv and `A` is argc? be changed to just test the value of `A` when `a` is argv and `A` is argc? You
tell us!
Cody also changed the code to use `fgets(3)`. See [FAQ 4.1 - Why were some calls to Cody also changed the code to use `fgets(3)`. See [FAQ 4.1 - Why were some calls to
the libc function gets&#x28;3&#x29; changed to use the libc function gets&#x28;3&#x29; changed to use
@@ -1391,9 +1390,9 @@ fgets&#x28;3&#x29;?](faq.html#faq4_1) for why this was done.
Since this program is so incredible the extra fixes were deemed worth having and Since this program is so incredible the extra fixes were deemed worth having and
this is why it was done. this is why they were done.
Cody later disabled a warning in the Makefile that proved to be a problem only Cody later disabled a warning in the `Makefile` that proved to be a problem only
with `clang` in Linux but which was defaulting to an error. This way was the with `clang` in Linux but which was defaulting to an error. This way was the
simplest way to deal with the problem in question due to the way the entry simplest way to deal with the problem in question due to the way the entry
works. works.
@@ -1401,7 +1400,7 @@ works.
Cody also added the [try.sh](%%REPO_URL%%/1990/theorem/try.sh) script which shows the Cody also added the [try.sh](%%REPO_URL%%/1990/theorem/try.sh) script which shows the
original program and some of the programs it generates. original program and some of the programs it generates.
[Yusuke](#yusuke) pointed out that `atof` nowadays needs `#include <stdlib.h>` which was [Yusuke](#yusuke) pointed out that `atof(3)` nowadays needs `#include <stdlib.h>` which was
used in order to get this to work initially (prior to this output was there but used in order to get this to work initially (prior to this output was there but
incomplete). incomplete).
@@ -1411,11 +1410,11 @@ incomplete).
### Source code: [stig.c](%%REPO_URL%%/1990/stig/stig.c) ### Source code: [stig.c](%%REPO_URL%%/1990/stig/stig.c)
</div> </div>
[Cody](#cody) fixed the paths in the Makefile so that this would build in Linux (it [Cody](#cody) fixed the paths in the `Makefile` so that this would build in Linux (it
worked fine in macOS). worked fine in macOS).
He also changed the Makefile to use `bash` not `zsh` as not all systems have He also changed the `Makefile` to use `bash` not `zsh` as not all systems have
`zsh` and the Makefile actually sets `SHELL` to `bash`. `zsh` and the `Makefile` actually sets `SHELL` to `bash`.
<div id="1990_westley"> <div id="1990_westley">
@@ -1429,15 +1428,17 @@ differences he has provided an alternate version,
[westley.alt.c](%%REPO_URL%%/1990/westley/westley.alt.c), which is the original code. [westley.alt.c](%%REPO_URL%%/1990/westley/westley.alt.c), which is the original code.
He also changed the `argc` to be an `int`, not a `char`, even though it might He also changed the `argc` to be an `int`, not a `char`, even though it might
often be the same (for the purpose of `clang`?). often be the same (this in particular was done for `clang`).
He also fixed the code to not enter an infinite loop if arg is a number not > 0 He also fixed the code to not enter an infinite loop if arg is a number not > 0
and to not crash if no arg is specified. and to not crash if no arg is specified. This was done during a time it was
deemed a problem to be fixed.
NOTE: the alt code did NOT have arg checks added as it is actually a copy of the
original code.
Cody also added the [try.sh](%%REPO_URL%%/1990/westley/try.sh) script. Cody also added the [try.sh](%%REPO_URL%%/1990/westley/try.sh) script.
The alt code did NOT have arg checks added as it is actually a copy of the
original code.
<div id="1991"> <div id="1991">