fix faq link URLs what used faq numbers
This commit is contained in:
1 parent
b27e07c27e
commit
d852734d98
8 files changed
+72
-64
No files matched your search
@@ -66,7 +66,7 @@ NOTE: if you use vim to view the code, make sure to do:
|
|||||||
|
|
||||||
in command mode, before looking at the code, to see the correct layout. For more
|
in command mode, before looking at the code, to see the correct layout. For more
|
||||||
help see [[6.14 - How do I set certain tabstops for viewing source code in
|
help see [[6.14 - How do I set certain tabstops for viewing source code in
|
||||||
vi(m)?](../../faq.html#faq6_14)
|
vi(m)?](../../faq.html#tabstops)
|
||||||
|
|
||||||
|
|
||||||
## Author's remarks:
|
## Author's remarks:
|
||||||
|
|||||||
@@ -438,7 +438,7 @@ just to understand <em>18 key <strong>characters</strong></em> of this code.</p>
|
|||||||
<p>NOTE: if you use vim to view the code, make sure to do:</p>
|
<p>NOTE: if you use vim to view the code, make sure to do:</p>
|
||||||
<pre><code> :set tabstop=4</code></pre>
|
<pre><code> :set tabstop=4</code></pre>
|
||||||
<p>in command mode, before looking at the code, to see the correct layout. For more
|
<p>in command mode, before looking at the code, to see the correct layout. For more
|
||||||
help see [<a href="../../faq.html#faq6_14">6.14 - How do I set certain tabstops for viewing source code in
|
help see [<a href="../../faq.html#tabstops">6.14 - How do I set certain tabstops for viewing source code in
|
||||||
vi(m)?</a></p>
|
vi(m)?</a></p>
|
||||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||||
<h3 id="nesting-errors-detector">Nesting Errors Detector</h3>
|
<h3 id="nesting-errors-detector">Nesting Errors Detector</h3>
|
||||||
|
|||||||
@@ -788,7 +788,7 @@ with your submission. If the <a href="judges.html">IOCCC judges</a> truly need m
|
|||||||
information, they will ask (either in public or suggest a private conversation).</p>
|
information, they will ask (either in public or suggest a private conversation).</p>
|
||||||
<p>Again, <strong>please</strong> don’t hesitate to ask: Your question may be something that
|
<p>Again, <strong>please</strong> don’t hesitate to ask: Your question may be something that
|
||||||
others are wondering about as well!</p>
|
others are wondering about as well!</p>
|
||||||
<p>See also <a href="#faq0_5">FAQ about making suggestions</a>.</p>
|
<p>See also <a href="#feedback">FAQ about making suggestions</a>.</p>
|
||||||
<div id="faq0_7">
|
<div id="faq0_7">
|
||||||
<div id="markdown">
|
<div id="markdown">
|
||||||
<h3 id="faq-0.7---what-are-the-ioccc-best-practices-for-using-markdown">FAQ 0.7: - What are the IOCCC best practices for using markdown?</h3>
|
<h3 id="faq-0.7---what-are-the-ioccc-best-practices-for-using-markdown">FAQ 0.7: - What are the IOCCC best practices for using markdown?</h3>
|
||||||
@@ -1898,8 +1898,10 @@ winning entries page</a>.</p></li>
|
|||||||
<h2 id="section-3-compiling-and-running-ioccc-entries">Section 3: Compiling and running IOCCC entries</h2>
|
<h2 id="section-3-compiling-and-running-ioccc-entries">Section 3: Compiling and running IOCCC entries</h2>
|
||||||
</div>
|
</div>
|
||||||
<div id="faq3_0">
|
<div id="faq3_0">
|
||||||
|
<div id="make_rules">
|
||||||
<h3 id="faq-3.0-what-makefile-rules-are-available-to-build-or-clean-up-ioccc-entries">FAQ 3.0: What Makefile rules are available to build or clean up IOCCC entries?</h3>
|
<h3 id="faq-3.0-what-makefile-rules-are-available-to-build-or-clean-up-ioccc-entries">FAQ 3.0: What Makefile rules are available to build or clean up IOCCC entries?</h3>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<p>In general the best way to compile everything in an entry directory is to run:</p>
|
<p>In general the best way to compile everything in an entry directory is to run:</p>
|
||||||
<pre><code> make clobber all</code></pre>
|
<pre><code> make clobber all</code></pre>
|
||||||
<p>If you wish to compile every entry for every year you should go to the top level
|
<p>If you wish to compile every entry for every year you should go to the top level
|
||||||
@@ -2650,7 +2652,7 @@ then do:</p>
|
|||||||
<span id="cb59-3"><a href="#cb59-3" aria-hidden="true" tabindex="-1"></a> <span class="ex">./mullender.alt</span></span></code></pre></div>
|
<span id="cb59-3"><a href="#cb59-3" aria-hidden="true" tabindex="-1"></a> <span class="ex">./mullender.alt</span></span></code></pre></div>
|
||||||
<p>to compile all versions and then run the alternate version (if you have
|
<p>to compile all versions and then run the alternate version (if you have
|
||||||
a PDP-11 or VAX-11 you would be able to run the original version). For more help
|
a PDP-11 or VAX-11 you would be able to run the original version). For more help
|
||||||
on compiling entries, see also <a href="#faq3_0">3.0 - What Makefile rules are available to
|
on compiling entries, see also <a href="#make_rules">3.0 - What Makefile rules are available to
|
||||||
build or clean up IOCCC entries?</a>.</p>
|
build or clean up IOCCC entries?</a>.</p>
|
||||||
<p>If you want to view the <code>index.html</code> file you can point your browser to the
|
<p>If you want to view the <code>index.html</code> file you can point your browser to the
|
||||||
<code>index.html</code> file of the winning entry (e.g. <code>1984/mullender/index.html</code>) with the
|
<code>index.html</code> file of the winning entry (e.g. <code>1984/mullender/index.html</code>) with the
|
||||||
@@ -2690,7 +2692,7 @@ extract it and then switch to the directory and compile everything of each
|
|||||||
entry:</p>
|
entry:</p>
|
||||||
<div class="sourceCode" id="cb60"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb60-1"><a href="#cb60-1" aria-hidden="true" tabindex="-1"></a> <span class="bu">cd</span> 1984</span>
|
<div class="sourceCode" id="cb60"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb60-1"><a href="#cb60-1" aria-hidden="true" tabindex="-1"></a> <span class="bu">cd</span> 1984</span>
|
||||||
<span id="cb60-2"><a href="#cb60-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span> everything</span></code></pre></div>
|
<span id="cb60-2"><a href="#cb60-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span> everything</span></code></pre></div>
|
||||||
<p>For more help on compiling entries, see also <a href="#faq3_0">3.0 - What Makefile rules are
|
<p>For more help on compiling entries, see also <a href="#make_rules">3.0 - What Makefile rules are
|
||||||
available to build or clean up IOCCC entries?</a>.</p>
|
available to build or clean up IOCCC entries?</a>.</p>
|
||||||
<p>Of course in this case you can also switch to individual entries and look at the
|
<p>Of course in this case you can also switch to individual entries and look at the
|
||||||
<code>index.html</code> file (or any other file in the entry) and try out the entries that
|
<code>index.html</code> file (or any other file in the entry) and try out the entries that
|
||||||
@@ -2885,8 +2887,10 @@ as well, for fun.</p>
|
|||||||
<p>In some cases it might be better to not have them but as noted this is a
|
<p>In some cases it might be better to not have them but as noted this is a
|
||||||
judgement call.</p>
|
judgement call.</p>
|
||||||
<div id="faq4_6">
|
<div id="faq4_6">
|
||||||
|
<div id="arg_count">
|
||||||
<h3 id="faq-4.6-why-was-arg-count-andor-type-changed-in-main-in-some-older-entries">FAQ 4.6: Why was arg count and/or type changed in main() in some older entries?</h3>
|
<h3 id="faq-4.6-why-was-arg-count-andor-type-changed-in-main-in-some-older-entries">FAQ 4.6: Why was arg count and/or type changed in main() in some older entries?</h3>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<p>There are a number of reasons this was done but they usually come down to a
|
<p>There are a number of reasons this was done but they usually come down to a
|
||||||
mis-feature or defect in the <code>clang</code> compiler.</p>
|
mis-feature or defect in the <code>clang</code> compiler.</p>
|
||||||
<p>In all versions of <code>clang</code> the first arg must be an <code>int</code> and the rest must be a
|
<p>In all versions of <code>clang</code> the first arg must be an <code>int</code> and the rest must be a
|
||||||
|
|||||||
@@ -523,7 +523,7 @@ information, they will ask (either in public or suggest a private conversation).
|
|||||||
Again, **please** don't hesitate to ask: Your question may be something that
|
Again, **please** don't hesitate to ask: Your question may be something that
|
||||||
others are wondering about as well!
|
others are wondering about as well!
|
||||||
|
|
||||||
See also [FAQ about making suggestions](#faq0_5).
|
See also [FAQ about making suggestions](#feedback).
|
||||||
|
|
||||||
|
|
||||||
<div id="faq0_7">
|
<div id="faq0_7">
|
||||||
@@ -1757,8 +1757,10 @@ winning entries page](years.html).
|
|||||||
|
|
||||||
|
|
||||||
<div id="faq3_0">
|
<div id="faq3_0">
|
||||||
|
<div id="make_rules">
|
||||||
### FAQ 3.0: What Makefile rules are available to build or clean up IOCCC entries?
|
### FAQ 3.0: What Makefile rules are available to build or clean up IOCCC entries?
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
In general the best way to compile everything in an entry directory is to run:
|
In general the best way to compile everything in an entry directory is to run:
|
||||||
|
|
||||||
@@ -3013,7 +3015,7 @@ then do:
|
|||||||
to compile all versions and then run the alternate version (if you have
|
to compile all versions and then run the alternate version (if you have
|
||||||
a PDP-11 or VAX-11 you would be able to run the original version). For more help
|
a PDP-11 or VAX-11 you would be able to run the original version). For more help
|
||||||
on compiling entries, see also [3.0 - What Makefile rules are available to
|
on compiling entries, see also [3.0 - What Makefile rules are available to
|
||||||
build or clean up IOCCC entries?](#faq3_0).
|
build or clean up IOCCC entries?](#make_rules).
|
||||||
|
|
||||||
If you want to view the `index.html` file you can point your browser to the
|
If you want to view the `index.html` file you can point your browser to the
|
||||||
`index.html` file of the winning entry (e.g. `1984/mullender/index.html`) with the
|
`index.html` file of the winning entry (e.g. `1984/mullender/index.html`) with the
|
||||||
@@ -3065,7 +3067,7 @@ entry:
|
|||||||
```
|
```
|
||||||
|
|
||||||
For more help on compiling entries, see also [3.0 - What Makefile rules are
|
For more help on compiling entries, see also [3.0 - What Makefile rules are
|
||||||
available to build or clean up IOCCC entries?](#faq3_0).
|
available to build or clean up IOCCC entries?](#make_rules).
|
||||||
|
|
||||||
Of course in this case you can also switch to individual entries and look at the
|
Of course in this case you can also switch to individual entries and look at the
|
||||||
`index.html` file (or any other file in the entry) and try out the entries that
|
`index.html` file (or any other file in the entry) and try out the entries that
|
||||||
@@ -3325,8 +3327,10 @@ judgement call.
|
|||||||
|
|
||||||
|
|
||||||
<div id="faq4_6">
|
<div id="faq4_6">
|
||||||
|
<div id="arg_count">
|
||||||
### FAQ 4.6: Why was arg count and/or type changed in main() in some older entries?
|
### FAQ 4.6: Why was arg count and/or type changed in main() in some older entries?
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
There are a number of reasons this was done but they usually come down to a
|
There are a number of reasons this was done but they usually come down to a
|
||||||
mis-feature or defect in the `clang` compiler.
|
mis-feature or defect in the `clang` compiler.
|
||||||
|
|||||||
+1
-1
@@ -438,7 +438,7 @@ for any changes that may have been made while the <a href="index.html">IOCCC</a>
|
|||||||
“<strong><a href="#pending">pending</a></strong>”.</p>
|
“<strong><a href="#pending">pending</a></strong>”.</p>
|
||||||
<h4 id="judging">“<strong>judging</strong>”</h4>
|
<h4 id="judging">“<strong>judging</strong>”</h4>
|
||||||
<p>The <a href="index.html">IOCCC</a> is <a href="#closed">closed</a> to new submissions. The <a href="judges.html">IOCCC judges</a>
|
<p>The <a href="index.html">IOCCC</a> is <a href="#closed">closed</a> to new submissions. The <a href="judges.html">IOCCC judges</a>
|
||||||
are in the process of judging the <a href="faq.html#faq2_0">submissions</a> they received while
|
are in the process of judging the <a href="faq.html#how_many">submissions</a> they received while
|
||||||
the <a href="index.html">IOCCC</a> was open.</p>
|
the <a href="index.html">IOCCC</a> was open.</p>
|
||||||
<p>Watch the <a href="https://fosstodon.org/@ioccc"><span class="citation" data-cites="IOCCC">@IOCCC</span> mastodon feed</a> for updates.</p>
|
<p>Watch the <a href="https://fosstodon.org/@ioccc"><span class="citation" data-cites="IOCCC">@IOCCC</span> mastodon feed</a> for updates.</p>
|
||||||
<p>Once the <a href="index.html">IOCCC</a> <a href="#closed">closes</a>, the judges will:</p>
|
<p>Once the <a href="index.html">IOCCC</a> <a href="#closed">closes</a>, the judges will:</p>
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ for any changes that may have been made while the [IOCCC](index.html) was
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
The [IOCCC](index.html) is [closed](#closed) to new submissions. The [IOCCC judges](judges.html)
|
The [IOCCC](index.html) is [closed](#closed) to new submissions. The [IOCCC judges](judges.html)
|
||||||
are in the process of judging the [submissions](faq.html#faq2_0) they received while
|
are in the process of judging the [submissions](faq.html#how_many) they received while
|
||||||
the [IOCCC](index.html) was open.
|
the [IOCCC](index.html) was open.
|
||||||
|
|
||||||
Watch the [@IOCCC mastodon feed](https://fosstodon.org/@ioccc) for updates.
|
Watch the [@IOCCC mastodon feed](https://fosstodon.org/@ioccc) for updates.
|
||||||
|
|||||||
+27
-27
@@ -549,7 +549,7 @@ returning to the shell. The original code does not have this change.</p>
|
|||||||
versions of <code>clang</code> object to the number of args of <code>main()</code>, saying that it must
|
versions of <code>clang</code> object to the number of args of <code>main()</code>, saying that it must
|
||||||
be 0, 2 or 3. The version this has been observed in does not actually object to
|
be 0, 2 or 3. The version this has been observed in does not actually object to
|
||||||
1 arg but it is entirely possible that this changes so a second arg (that’s not
|
1 arg but it is entirely possible that this changes so a second arg (that’s not
|
||||||
needed and is unused) has been added just in case. See <a href="faq.html#faq4_6">FAQ 4.6 - Why was arg
|
needed and is unused) has been added just in case. See <a href="faq.html#arg_count">FAQ 4.6 - Why was arg
|
||||||
count and/or type changed in main() in some older
|
count and/or type changed in main() in some older
|
||||||
entries?</a> for more details.</p>
|
entries?</a> for more details.</p>
|
||||||
<p>Cody also added the script <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/august/primes.sh">primes.sh</a> which allows one
|
<p>Cody also added the script <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/august/primes.sh">primes.sh</a> which allows one
|
||||||
@@ -682,7 +682,7 @@ should they object to <code>main()</code> having only one arg.</p>
|
|||||||
<h2 id="winning-entry-1986hague">Winning entry: <a href="1986/hague/index.html">1986/hague</a></h2>
|
<h2 id="winning-entry-1986hague">Winning entry: <a href="1986/hague/index.html">1986/hague</a></h2>
|
||||||
<h3 id="winning-entry-source-code-hague.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1986/hague/hague.c">hague.c</a></h3>
|
<h3 id="winning-entry-source-code-hague.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1986/hague/hague.c">hague.c</a></h3>
|
||||||
</div>
|
</div>
|
||||||
<p><a href="#cody">Cody</a> made this use <code>fgets()</code>. See <a href="faq.html#faq4_1">FAQ 4.1 - Why were some calls to
|
<p><a href="#cody">Cody</a> made this use <code>fgets()</code>. See <a href="faq.html#gets">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>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1986/hague/try.sh">try.sh</a> script which also feeds to the
|
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1986/hague/try.sh">try.sh</a> script which also feeds to the
|
||||||
@@ -894,7 +894,7 @@ size constraints of the contest).</p>
|
|||||||
<h2 id="winning-entry-1987wall">Winning entry: <a href="1987/wall/index.html">1987/wall</a></h2>
|
<h2 id="winning-entry-1987wall">Winning entry: <a href="1987/wall/index.html">1987/wall</a></h2>
|
||||||
<h3 id="winning-entry-source-code-wall.c-1">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1987/wall/wall.c">wall.c</a></h3>
|
<h3 id="winning-entry-source-code-wall.c-1">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1987/wall/wall.c">wall.c</a></h3>
|
||||||
</div>
|
</div>
|
||||||
<p><a href="#cody">Cody</a> made this use <code>fgets(3)</code>. See <a href="faq.html#faq4_1">FAQ 4.1 - Why were some calls to
|
<p><a href="#cody">Cody</a> made this use <code>fgets(3)</code>. See <a href="faq.html#gets">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>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1987/wall/try.sh">try.sh</a> script.</p>
|
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1987/wall/try.sh">try.sh</a> script.</p>
|
||||||
@@ -1009,7 +1009,7 @@ same code, just a <code>p</code> instead of an <code>m</code> in the name. Addit
|
|||||||
<h2 id="winning-entry-1988reddy">Winning entry: <a href="1988/reddy/index.html">1988/reddy</a></h2>
|
<h2 id="winning-entry-1988reddy">Winning entry: <a href="1988/reddy/index.html">1988/reddy</a></h2>
|
||||||
<h3 id="winning-entry-source-code-reddy.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1988/reddy/reddy.c">reddy.c</a></h3>
|
<h3 id="winning-entry-source-code-reddy.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1988/reddy/reddy.c">reddy.c</a></h3>
|
||||||
</div>
|
</div>
|
||||||
<p><a href="#cody">Cody</a> made this use <code>fgets(3)</code>. See <a href="faq.html#faq4_1">FAQ 4.1 - Why were some calls to
|
<p><a href="#cody">Cody</a> made this use <code>fgets(3)</code>. See <a href="faq.html#gets">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>
|
||||||
<div id="1988_spinellis">
|
<div id="1988_spinellis">
|
||||||
@@ -1270,7 +1270,7 @@ judges was retained.</p>
|
|||||||
</div>
|
</div>
|
||||||
<p><a href="#yusuke">Yusuke</a> got this to work in modern systems (it previously resulted in a bus
|
<p><a href="#yusuke">Yusuke</a> got this to work in modern systems (it previously resulted in a bus
|
||||||
error).</p>
|
error).</p>
|
||||||
<p><a href="#cody">Cody</a> made this use <code>fgets(3)</code>. See <a href="faq.html#faq4_1">FAQ 4.1 - Why were some calls to
|
<p><a href="#cody">Cody</a> made this use <code>fgets(3)</code>. See <a href="faq.html#gets">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>
|
||||||
<div id="1990_dds">
|
<div id="1990_dds">
|
||||||
@@ -1285,7 +1285,7 @@ more like the original in this way by redefining <code>free</code> to have the c
|
|||||||
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(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>
|
<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#gets">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>
|
||||||
<div id="1990_dg">
|
<div id="1990_dg">
|
||||||
@@ -1347,7 +1347,7 @@ author.</p>
|
|||||||
<p>Cody also changed the code (in both versions) to use <code>fgets(3)</code> instead of
|
<p>Cody also changed the code (in both versions) to use <code>fgets(3)</code> instead of
|
||||||
<code>gets(3)</code> so one would not get a warning about the use of <code>gets(3)</code> at linking
|
<code>gets(3)</code> so one would not get a warning about the use of <code>gets(3)</code> at linking
|
||||||
time or execution, the latter of which was causing confusing output due to the
|
time or execution, the latter of which was causing confusing output due to the
|
||||||
warning being interspersed with the program’s interactive output. See <a href="faq.html#faq4_1">FAQ 4.1
|
warning being interspersed with the program’s interactive output. See <a href="faq.html#gets">FAQ 4.1
|
||||||
- Why were some calls to the libc function gets(3) changed to use
|
- Why were some calls to the libc function gets(3) changed to use
|
||||||
fgets(3)?</a> for more details on why this change was
|
fgets(3)?</a> for more details on why this change was
|
||||||
done more generally.</p>
|
done more generally.</p>
|
||||||
@@ -1370,7 +1370,7 @@ but as he was testing the <code>fibonacci.c</code> bug he ended up changing it a
|
|||||||
<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? You
|
<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>
|
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#gets">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
|
||||||
@@ -1481,7 +1481,7 @@ being a problem not being declared first, to hopefully future-proof it.</p>
|
|||||||
condition (the <code>char *s</code> had to be changed to <code>char s[]</code>) and he also made it
|
condition (the <code>char *s</code> had to be changed to <code>char s[]</code>) and he also made it
|
||||||
and the generated code work for <code>clang</code>.</p>
|
and the generated code work for <code>clang</code>.</p>
|
||||||
<p>Furthermore Cody changed it so that the C from the BASIC uses <code>fgets()</code>, not
|
<p>Furthermore Cody changed it so that the C from the BASIC uses <code>fgets()</code>, not
|
||||||
<code>gets()</code>. See <a href="faq.html#faq4_1">FAQ 4.1 - Why were some calls to
|
<code>gets()</code>. See <a href="faq.html#gets">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>For the magic of <code>clang</code> (which was done manually except the returning a value
|
<p>For the magic of <code>clang</code> (which was done manually except the returning a value
|
||||||
@@ -1643,7 +1643,7 @@ true of another change as further below.</p>
|
|||||||
+ putc(i["}|uutsrq`_^bji`[Zkediml[PO]a_M__]ISOYIRGTNR"]+i-9,stderr);</code></pre>
|
+ putc(i["}|uutsrq`_^bji`[Zkediml[PO]a_M__]ISOYIRGTNR"]+i-9,stderr);</code></pre>
|
||||||
<p>though it’s questionable how much more (if at all) obscure that is :-)</p>
|
<p>though it’s questionable how much more (if at all) obscure that is :-)</p>
|
||||||
<p>Cody also changed the location that it used <code>gets()</code> to be <code>fgets(3)</code>.
|
<p>Cody also changed the location that it used <code>gets()</code> to be <code>fgets(3)</code>.
|
||||||
See <a href="faq.html#faq4_1">FAQ 4.1 - Why were some calls to
|
See <a href="faq.html#gets">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.
|
fgets(3)?</a> for why this was done.
|
||||||
This was complicated because of how the other source files are generated (as
|
This was complicated because of how the other source files are generated (as
|
||||||
@@ -1770,7 +1770,7 @@ start and end character.</p>
|
|||||||
defect with the number of args to <code>main()</code> though when it comes to 1 arg it is
|
defect with the number of args to <code>main()</code> though when it comes to 1 arg it is
|
||||||
only in an error message if say 4 args are used. This is out of an abundance of
|
only in an error message if say 4 args are used. This is out of an abundance of
|
||||||
caution as it’s quite possible that <code>clang</code> or the ANSI C committee end up further
|
caution as it’s quite possible that <code>clang</code> or the ANSI C committee end up further
|
||||||
changing this. See <a href="faq.html#faq4_6">FAQ 4.6 - Why was arg
|
changing this. See <a href="faq.html#arg_count">FAQ 4.6 - Why was arg
|
||||||
count and/or type changed in main() in some older
|
count and/or type changed in main() in some older
|
||||||
entries?</a> for more details.</p>
|
entries?</a> for more details.</p>
|
||||||
<p>Yusuke also noted that there is a bug in the program where right after starting
|
<p>Yusuke also noted that there is a bug in the program where right after starting
|
||||||
@@ -1785,7 +1785,7 @@ it works (see <a href="1992/lush/index.html#judges-remarks">Judges’ remarks in
|
|||||||
file</a>) this will not work with <code>clang</code>.</p>
|
file</a>) this will not work with <code>clang</code>.</p>
|
||||||
<p><a href="#cody">Cody</a> also provided the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/lush/lush.sh">lush.sh</a> script to
|
<p><a href="#cody">Cody</a> also provided the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/lush/lush.sh">lush.sh</a> script to
|
||||||
demonstrate it as using make was problematic.</p>
|
demonstrate it as using make was problematic.</p>
|
||||||
<p>Cody made it use <code>fgets()</code> instead of <code>gets()</code>. See <a href="faq.html#faq4_1">FAQ 4.1 - Why were some calls to
|
<p>Cody made it use <code>fgets()</code> instead of <code>gets()</code>. See <a href="faq.html#gets">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>NOTE: this entry cannot work with <code>clang</code> due to different compiler messages (it
|
<p>NOTE: this entry cannot work with <code>clang</code> due to different compiler messages (it
|
||||||
@@ -1959,7 +1959,7 @@ compile time. See the index.html for details.</p>
|
|||||||
<h2 id="winning-entry-1993schnitzi">Winning entry: <a href="1993/schnitzi/index.html">1993/schnitzi</a></h2>
|
<h2 id="winning-entry-1993schnitzi">Winning entry: <a href="1993/schnitzi/index.html">1993/schnitzi</a></h2>
|
||||||
<h3 id="winning-entry-source-code-schnitzi.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/schnitzi/schnitzi.c">schnitzi.c</a></h3>
|
<h3 id="winning-entry-source-code-schnitzi.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/schnitzi/schnitzi.c">schnitzi.c</a></h3>
|
||||||
</div>
|
</div>
|
||||||
<p><a href="#cody">Cody</a> made this use <code>fgets(3)</code> not <code>gets(3)</code>. See <a href="faq.html#faq4_1">FAQ 4.1 - Why were some calls to
|
<p><a href="#cody">Cody</a> made this use <code>fgets(3)</code> not <code>gets(3)</code>. See <a href="faq.html#gets">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>
|
||||||
<div id="1993_vanb">
|
<div id="1993_vanb">
|
||||||
@@ -2050,7 +2050,7 @@ comma operator was needed.</p>
|
|||||||
type (because <code>time(2)</code> takes a <code>time_t *</code> which in some systems is a <code>long *</code>
|
type (because <code>time(2)</code> takes a <code>time_t *</code> which in some systems is a <code>long *</code>
|
||||||
but what was being passed to it is an <code>int</code>).</p>
|
but what was being passed to it is an <code>int</code>).</p>
|
||||||
<p>Cody also changed the entry to use <code>fgets(3)</code> instead of <code>gets(3)</code>.
|
<p>Cody also changed the entry to use <code>fgets(3)</code> instead of <code>gets(3)</code>.
|
||||||
(See <a href="faq.html#faq4_1">FAQ 4.1 - Why were some calls to
|
(See <a href="faq.html#gets">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>This one has
|
<p>This one has
|
||||||
@@ -2113,7 +2113,7 @@ remarks), <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994
|
|||||||
each mode allowed with two sizes, 128 and 256, allowing one to quit or skip each
|
each mode allowed with two sizes, 128 and 256, allowing one to quit or skip each
|
||||||
(given that there are a lot of invocations this seemed like a good idea).</p>
|
(given that there are a lot of invocations this seemed like a good idea).</p>
|
||||||
<p>Cody also made this use <code>fgets(3)</code> instead of <code>gets(3)</code>.
|
<p>Cody also made this use <code>fgets(3)</code> instead of <code>gets(3)</code>.
|
||||||
See <a href="faq.html#faq4_1">FAQ 4.1 - Why were some calls to
|
See <a href="faq.html#gets">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.
|
fgets(3)?</a> for why this was done.
|
||||||
In this case the newline had
|
In this case the newline had
|
||||||
@@ -2164,7 +2164,7 @@ details on this.</p>
|
|||||||
type of args. In particular some versions supposedly only allow 0, 2 or 3 args.
|
type of args. In particular some versions supposedly only allow 0, 2 or 3 args.
|
||||||
It actually appears to allow 1 but if you specify 4 it says 0, 2 or 3 and it is
|
It actually appears to allow 1 but if you specify 4 it says 0, 2 or 3 and it is
|
||||||
an error but it’s entirely possible that they will eventually make the defect
|
an error but it’s entirely possible that they will eventually make the defect
|
||||||
function as the error message claims. See <a href="faq.html#faq4_6">FAQ 4.6 - Why was arg
|
function as the error message claims. See <a href="faq.html#arg_count">FAQ 4.6 - Why was arg
|
||||||
count and/or type changed in main() in some older
|
count and/or type changed in main() in some older
|
||||||
entries?</a> for more details.</p>
|
entries?</a> for more details.</p>
|
||||||
<div id="1995_dodsond1">
|
<div id="1995_dodsond1">
|
||||||
@@ -2381,7 +2381,7 @@ versions of <code>clang</code> whine about the number of args on top of what typ
|
|||||||
In particular some versions claim that they only allow 0, 2 or 3 args. It
|
In particular some versions claim that they only allow 0, 2 or 3 args. It
|
||||||
appears that they do allow 1 but for instance 4 is not allowed. However as it’s
|
appears that they do allow 1 but for instance 4 is not allowed. However as it’s
|
||||||
quite possible they will ‘fix’ this defect it would be better to have this not
|
quite possible they will ‘fix’ this defect it would be better to have this not
|
||||||
be a problem at such a time. See <a href="faq.html#faq4_6">FAQ 4.6 - Why was arg
|
be a problem at such a time. See <a href="faq.html#arg_count">FAQ 4.6 - Why was arg
|
||||||
count and/or type changed in main() in some older
|
count and/or type changed in main() in some older
|
||||||
entries?</a> for more details.</p>
|
entries?</a> for more details.</p>
|
||||||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/bas1/bas1.sh">bas1.sh</a> script to simplify running the
|
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/bas1/bas1.sh">bas1.sh</a> script to simplify running the
|
||||||
@@ -2451,7 +2451,7 @@ versions of <code>clang</code> complain about the number of args to <code>main()
|
|||||||
claim that only 0, 2 or 3 are allowed but it does allow 1 anyway. It is quite
|
claim that only 0, 2 or 3 are allowed but it does allow 1 anyway. It is quite
|
||||||
possible though that this will change so it is fixed in case this happens. As it
|
possible though that this will change so it is fixed in case this happens. As it
|
||||||
is mostly just through the C pre-processor Cody added a new macro to make the
|
is mostly just through the C pre-processor Cody added a new macro to make the
|
||||||
code look like the original with just an extra arg. See <a href="faq.html#faq4_6">FAQ 4.6 - Why was arg
|
code look like the original with just an extra arg. See <a href="faq.html#arg_count">FAQ 4.6 - Why was arg
|
||||||
count and/or type changed in main() in some older
|
count and/or type changed in main() in some older
|
||||||
entries?</a> for more details.</p>
|
entries?</a> for more details.</p>
|
||||||
<p>In some versions of <code>clang</code> <code>-Wno-int-conversion</code> had to be added to the
|
<p>In some versions of <code>clang</code> <code>-Wno-int-conversion</code> had to be added to the
|
||||||
@@ -2550,7 +2550,7 @@ occurs.</p>
|
|||||||
<p>Cody made <code>main()</code> have two args out of an abundance of caution as some versions
|
<p>Cody made <code>main()</code> have two args out of an abundance of caution as some versions
|
||||||
of <code>clang</code> say that <code>main()</code> can only have 0, 2 or 3 args. These versions accept 1
|
of <code>clang</code> say that <code>main()</code> can only have 0, 2 or 3 args. These versions accept 1
|
||||||
arg but it is entirely possible that they fix this so this should prevent it
|
arg but it is entirely possible that they fix this so this should prevent it
|
||||||
from breaking if that happens. See <a href="faq.html#faq4_6">FAQ 4.6 - Why was arg
|
from breaking if that happens. See <a href="faq.html#arg_count">FAQ 4.6 - Why was arg
|
||||||
count and/or type changed in main() in some older
|
count and/or type changed in main() in some older
|
||||||
entries?</a> for more details.</p>
|
entries?</a> for more details.</p>
|
||||||
<p>Cody added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh3/try.sh">try.sh</a> script to make it easier to try
|
<p>Cody added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh3/try.sh">try.sh</a> script to make it easier to try
|
||||||
@@ -2589,7 +2589,7 @@ commands that we recommended.</p>
|
|||||||
<h3 id="winning-entry-source-code-anderson.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/anderson//anderson.c">anderson.c</a></h3>
|
<h3 id="winning-entry-source-code-anderson.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/anderson//anderson.c">anderson.c</a></h3>
|
||||||
</div>
|
</div>
|
||||||
<p><a href="#cody">Cody</a> changed this entry to use <code>fgets(3)</code> instead of <code>gets(3)</code>.
|
<p><a href="#cody">Cody</a> changed this entry to use <code>fgets(3)</code> instead of <code>gets(3)</code>.
|
||||||
See <a href="faq.html#faq4_1">FAQ 4.1 - Why were some calls to
|
See <a href="faq.html#gets">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.
|
fgets(3)?</a> for why this was done.
|
||||||
This involved changing the <code>K</code> arg to <code>gets(3)</code> to <code>&K</code> in <code>fgets(3)</code>.</p>
|
This involved changing the <code>K</code> arg to <code>gets(3)</code> to <code>&K</code> in <code>fgets(3)</code>.</p>
|
||||||
@@ -3082,7 +3082,7 @@ a lot of numbers this will be harder to see).</p>
|
|||||||
discovered it will not work otherwise.</p>
|
discovered it will not work otherwise.</p>
|
||||||
<p>Cody, out of an abundance of caution for <code>clang</code>, added a second arg to <code>main()</code>
|
<p>Cody, out of an abundance of caution for <code>clang</code>, added a second arg to <code>main()</code>
|
||||||
as some versions complain about the number of args and although they accept 1 it
|
as some versions complain about the number of args and although they accept 1 it
|
||||||
is entirely possible it will eventually be that they don’t. See <a href="faq.html#faq4_6">FAQ 4.6 - Why was arg
|
is entirely possible it will eventually be that they don’t. See <a href="faq.html#arg_count">FAQ 4.6 - Why was arg
|
||||||
count and/or type changed in main() in some older
|
count and/or type changed in main() in some older
|
||||||
entries?</a> for more details.</p>
|
entries?</a> for more details.</p>
|
||||||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/kopczynski/try.sh">try.sh</a> script and various data
|
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/kopczynski/try.sh">try.sh</a> script and various data
|
||||||
@@ -3107,7 +3107,7 @@ chose the word <code>IOCCC</code> instead of <code>AAA</code>).</p>
|
|||||||
<h2 id="winning-entry-2004schnitzi">Winning entry: <a href="2004/schnitzi/index.html">2004/schnitzi</a></h2>
|
<h2 id="winning-entry-2004schnitzi">Winning entry: <a href="2004/schnitzi/index.html">2004/schnitzi</a></h2>
|
||||||
<h3 id="winning-entry-source-code-schnitzi.c-4">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/schnitzi//schnitzi.c">schnitzi.c</a></h3>
|
<h3 id="winning-entry-source-code-schnitzi.c-4">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/schnitzi//schnitzi.c">schnitzi.c</a></h3>
|
||||||
</div>
|
</div>
|
||||||
<p><a href="#cody">Cody</a> made this use <code>fgets(3)</code>. See <a href="faq.html#faq4_1">FAQ 4.1 - Why were some calls to
|
<p><a href="#cody">Cody</a> made this use <code>fgets(3)</code>. See <a href="faq.html#gets">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>He also changed the time factor in the data files as the animations went too
|
<p>He also changed the time factor in the data files as the animations went too
|
||||||
@@ -3472,7 +3472,7 @@ it to the repo as well.</p>
|
|||||||
</div>
|
</div>
|
||||||
<p><a href="#cody">Cody</a>, out of an abundance of caution for <code>clang</code>’s defects, made <code>main()</code> have
|
<p><a href="#cody">Cody</a>, out of an abundance of caution for <code>clang</code>’s defects, made <code>main()</code> have
|
||||||
2 args instead of 1 as some versions report that <code>main()</code> must have 0, 2 or 3
|
2 args instead of 1 as some versions report that <code>main()</code> must have 0, 2 or 3
|
||||||
args, even though at least one of those versions allows 1 arg only. See <a href="faq.html#faq4_6">FAQ 4.6 - Why was arg
|
args, even though at least one of those versions allows 1 arg only. See <a href="faq.html#arg_count">FAQ 4.6 - Why was arg
|
||||||
count and/or type changed in main() in some older
|
count and/or type changed in main() in some older
|
||||||
entries?</a> for more details.</p>
|
entries?</a> for more details.</p>
|
||||||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/sykes2/try.sh">try.sh</a> script for easier use of the
|
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/sykes2/try.sh">try.sh</a> script for easier use of the
|
||||||
@@ -3530,7 +3530,7 @@ We’re not able to test this.</p>
|
|||||||
</div>
|
</div>
|
||||||
<p><a href="#cody">Cody</a>, out of an abundance of caution, added a second arg to <code>main()</code> as some
|
<p><a href="#cody">Cody</a>, out of an abundance of caution, added a second arg to <code>main()</code> as some
|
||||||
versions of <code>clang</code> complain about not only the type of each arg to <code>main()</code> but
|
versions of <code>clang</code> complain about not only the type of each arg to <code>main()</code> but
|
||||||
the number of args as well. See <a href="faq.html#faq4_6">FAQ 4.6 - Why was arg
|
the number of args as well. See <a href="faq.html#arg_count">FAQ 4.6 - Why was arg
|
||||||
count and/or type changed in main() in some older
|
count and/or type changed in main() in some older
|
||||||
entries?</a> for more details.</p>
|
entries?</a> for more details.</p>
|
||||||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/borsanyi/try.sh">try.sh</a> script.</p>
|
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/borsanyi/try.sh">try.sh</a> script.</p>
|
||||||
@@ -3702,7 +3702,7 @@ everything, filtered through less.</p>
|
|||||||
<p>Cody also changed <code>argv</code> to be not <code>const char **</code> but <code>char **</code>, mostly out of an
|
<p>Cody also changed <code>argv</code> to be not <code>const char **</code> but <code>char **</code>, mostly out of an
|
||||||
abundance of caution in case <code>clang</code>, which already imposes restrictions on the
|
abundance of caution in case <code>clang</code>, which already imposes restrictions on the
|
||||||
types of args to <code>main()</code> including to do with <code>char **</code>, decides to further
|
types of args to <code>main()</code> including to do with <code>char **</code>, decides to further
|
||||||
restrict them. See <a href="faq.html#faq4_6">FAQ 4.6 - Why was arg
|
restrict them. See <a href="faq.html#arg_count">FAQ 4.6 - Why was arg
|
||||||
count and/or type changed in main() in some older
|
count and/or type changed in main() in some older
|
||||||
entries?</a> for more details.</p>
|
entries?</a> for more details.</p>
|
||||||
<p>Cody also restored the original code from the archive.</p>
|
<p>Cody also restored the original code from the archive.</p>
|
||||||
@@ -3918,7 +3918,7 @@ also appear to be an issue with the script even if you know of <code>convert</co
|
|||||||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/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/2013/endoh3/try.sh">try.sh</a> script.</p>
|
||||||
<p>Cody also (out of an abundance of caution for <code>clang(1)</code> which is strict with
|
<p>Cody also (out of an abundance of caution for <code>clang(1)</code> which is strict with
|
||||||
arg type and count to <code>main()</code>) added a second (unused) arg to <code>main()</code>. See
|
arg type and count to <code>main()</code>) added a second (unused) arg to <code>main()</code>. See
|
||||||
<a href="faq.html#faq4_6">FAQ 4.6 - Why was arg count and/or type changed in main() in some
|
<a href="faq.html#arg_count">FAQ 4.6 - Why was arg count and/or type changed in main() in some
|
||||||
older entries?</a> for more details.</p>
|
older entries?</a> for more details.</p>
|
||||||
<div id="2013_endoh4">
|
<div id="2013_endoh4">
|
||||||
<h2 id="winning-entry-2013endoh4">Winning entry: <a href="2013/endoh4/index.html">2013/endoh4</a></h2>
|
<h2 id="winning-entry-2013endoh4">Winning entry: <a href="2013/endoh4/index.html">2013/endoh4</a></h2>
|
||||||
@@ -4272,7 +4272,7 @@ the repo.</p>
|
|||||||
some versions of <code>clang</code> object to the number of args of <code>main()</code>, saying that it
|
some versions of <code>clang</code> object to the number of args of <code>main()</code>, saying that it
|
||||||
must be 0, 2 or 3. The version this has been observed in does not actually
|
must be 0, 2 or 3. The version this has been observed in does not actually
|
||||||
object to 1 arg but it is entirely possible that this changes so a second arg
|
object to 1 arg but it is entirely possible that this changes so a second arg
|
||||||
(that’s not needed and is unused) has been added just in case. See <a href="faq.html#faq4_6">FAQ 4.6 -
|
(that’s not needed and is unused) has been added just in case. See <a href="faq.html#arg_count">FAQ 4.6 -
|
||||||
Why was arg count and/or type changed in main() in some older
|
Why was arg count and/or type changed in main() in some older
|
||||||
entries?</a> for more details.</p>
|
entries?</a> for more details.</p>
|
||||||
<p>Cody also added explicit linking of libm (<code>-lm</code>) for systems that do not do this
|
<p>Cody also added explicit linking of libm (<code>-lm</code>) for systems that do not do this
|
||||||
|
|||||||
+27
-27
@@ -219,7 +219,7 @@ be 0, 2 or 3. The version this has been observed in does not actually object to
|
|||||||
1 arg but it is entirely possible that this changes so a second arg (that's not
|
1 arg but it is entirely possible that this changes so a second arg (that's not
|
||||||
needed and is unused) has been added just in case. See [FAQ 4.6 - Why was arg
|
needed and is unused) has been added just in case. See [FAQ 4.6 - Why was arg
|
||||||
count and/or type changed in main() in some older
|
count and/or type changed in main() in some older
|
||||||
entries?](faq.html#faq4_6) for more details.
|
entries?](faq.html#arg_count) for more details.
|
||||||
|
|
||||||
Cody also added the script [primes.sh](%%REPO_URL%%/1985/august/primes.sh) which allows one
|
Cody also added the script [primes.sh](%%REPO_URL%%/1985/august/primes.sh) which allows one
|
||||||
to check the output for the first `N` prime numbers of the output, where `N` is
|
to check the output for the first `N` prime numbers of the output, where `N` is
|
||||||
@@ -405,7 +405,7 @@ Cody also added the [try.sh](%%REPO_URL%%/1985/sicherman/try.sh) and
|
|||||||
|
|
||||||
[Cody](#cody) made this use `fgets()`. See [FAQ 4.1 - Why were some calls to
|
[Cody](#cody) made this use `fgets()`. See [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)?](faq.html#faq4_1) for why this was done.
|
fgets(3)?](faq.html#gets) for why this was done.
|
||||||
|
|
||||||
Cody also added the [try.sh](%%REPO_URL%%/1986/hague/try.sh) script which also feeds to the
|
Cody also added the [try.sh](%%REPO_URL%%/1986/hague/try.sh) script which also feeds to the
|
||||||
program the `input.txt` text file that Cody added.
|
program the `input.txt` text file that Cody added.
|
||||||
@@ -726,7 +726,7 @@ size constraints of the contest).
|
|||||||
|
|
||||||
[Cody](#cody) made this use `fgets(3)`. See [FAQ 4.1 - Why were some calls to
|
[Cody](#cody) made this use `fgets(3)`. See [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)?](faq.html#faq4_1) for why this was done.
|
fgets(3)?](faq.html#gets) for why this was done.
|
||||||
|
|
||||||
|
|
||||||
Cody also added the [try.sh](%%REPO_URL%%/1987/wall/try.sh) script.
|
Cody also added the [try.sh](%%REPO_URL%%/1987/wall/try.sh) script.
|
||||||
@@ -892,7 +892,7 @@ same code, just a `p` instead of an `m` in the name. Additionally, `main()` retu
|
|||||||
|
|
||||||
[Cody](#cody) made this use `fgets(3)`. See [FAQ 4.1 - Why were some calls to
|
[Cody](#cody) made this use `fgets(3)`. See [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)?](faq.html#faq4_1) for why this was done.
|
fgets(3)?](faq.html#gets) for why this was done.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1249,7 +1249,7 @@ error).
|
|||||||
|
|
||||||
[Cody](#cody) made this use `fgets(3)`. See [FAQ 4.1 - Why were some calls to
|
[Cody](#cody) made this use `fgets(3)`. See [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)?](faq.html#faq4_1) for why this was done.
|
fgets(3)?](faq.html#gets) for why this was done.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1272,7 +1272,7 @@ Cody fixed another compiler error by removing the erroneous prototype to
|
|||||||
|
|
||||||
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
|
||||||
the libc function gets(3) changed to use
|
the libc function gets(3) changed to use
|
||||||
fgets(3)?](faq.html#faq4_1) for why this was done.
|
fgets(3)?](faq.html#gets) for why this was done.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1363,7 +1363,7 @@ Cody also changed the code (in both versions) to use `fgets(3)` instead of
|
|||||||
time or execution, the latter of which was causing confusing output due to the
|
time or execution, the latter of which was causing confusing output due to the
|
||||||
warning being interspersed with the program's interactive output. See [FAQ 4.1
|
warning being interspersed with the program's interactive output. See [FAQ 4.1
|
||||||
- Why were some calls to the libc function gets(3) changed to use
|
- Why were some calls to the libc function gets(3) changed to use
|
||||||
fgets(3)?](faq.html#faq4_1) for more details on why this change was
|
fgets(3)?](faq.html#gets) for more details on why this change was
|
||||||
done more generally.
|
done more generally.
|
||||||
|
|
||||||
|
|
||||||
@@ -1396,7 +1396,7 @@ 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(3) changed to use
|
the libc function gets(3) changed to use
|
||||||
fgets(3)?](faq.html#faq4_1) for why this was done.
|
fgets(3)?](faq.html#gets) 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
|
||||||
@@ -1547,7 +1547,7 @@ and the generated code work for `clang`.
|
|||||||
Furthermore Cody changed it so that the C from the BASIC uses `fgets()`, not
|
Furthermore Cody changed it so that the C from the BASIC uses `fgets()`, not
|
||||||
`gets()`. See [FAQ 4.1 - Why were some calls to
|
`gets()`. See [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)?](faq.html#faq4_1) for why this was done.
|
fgets(3)?](faq.html#gets) for why this was done.
|
||||||
|
|
||||||
For the magic of `clang` (which was done manually except the returning a value
|
For the magic of `clang` (which was done manually except the returning a value
|
||||||
in `main()` in the generated code and possibly `fgets(3)`) and `fgets(3)`, see
|
in `main()` in the generated code and possibly `fgets(3)`) and `fgets(3)`, see
|
||||||
@@ -1801,7 +1801,7 @@ though it's questionable how much more (if at all) obscure that is :-)
|
|||||||
Cody also changed the location that it used `gets()` to be `fgets(3)`.
|
Cody also changed the location that it used `gets()` to be `fgets(3)`.
|
||||||
See [FAQ 4.1 - Why were some calls to
|
See [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)?](faq.html#faq4_1) for why this was done.
|
fgets(3)?](faq.html#gets) for why this was done.
|
||||||
This was complicated because of how the other source files are generated (as
|
This was complicated because of how the other source files are generated (as
|
||||||
above); simply changing the code could cause invalid output in the program which
|
above); simply changing the code could cause invalid output in the program which
|
||||||
made other files fail to compile (for this example specifically, see below).
|
made other files fail to compile (for this example specifically, see below).
|
||||||
@@ -1972,7 +1972,7 @@ only in an error message if say 4 args are used. This is out of an abundance of
|
|||||||
caution as it's quite possible that `clang` or the ANSI C committee end up further
|
caution as it's quite possible that `clang` or the ANSI C committee end up further
|
||||||
changing this. See [FAQ 4.6 - Why was arg
|
changing this. See [FAQ 4.6 - Why was arg
|
||||||
count and/or type changed in main() in some older
|
count and/or type changed in main() in some older
|
||||||
entries?](faq.html#faq4_6) for more details.
|
entries?](faq.html#arg_count) for more details.
|
||||||
|
|
||||||
|
|
||||||
Yusuke also noted that there is a bug in the program where right after starting
|
Yusuke also noted that there is a bug in the program where right after starting
|
||||||
@@ -1994,7 +1994,7 @@ demonstrate it as using make was problematic.
|
|||||||
|
|
||||||
Cody made it use `fgets()` instead of `gets()`. See [FAQ 4.1 - Why were some calls to
|
Cody made it use `fgets()` instead of `gets()`. See [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)?](faq.html#faq4_1) for why this was done.
|
fgets(3)?](faq.html#gets) for why this was done.
|
||||||
|
|
||||||
NOTE: this entry cannot work with `clang` due to different compiler messages (it
|
NOTE: this entry cannot work with `clang` due to different compiler messages (it
|
||||||
will compile fine but it won't work). See [1992/lush in
|
will compile fine but it won't work). See [1992/lush in
|
||||||
@@ -2234,7 +2234,7 @@ compile time. See the index.html for details.
|
|||||||
|
|
||||||
[Cody](#cody) made this use `fgets(3)` not `gets(3)`. See [FAQ 4.1 - Why were some calls to
|
[Cody](#cody) made this use `fgets(3)` not `gets(3)`. See [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)?](faq.html#faq4_1) for why this was done.
|
fgets(3)?](faq.html#gets) for why this was done.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -2361,7 +2361,7 @@ but what was being passed to it is an `int`).
|
|||||||
Cody also changed the entry to use `fgets(3)` instead of `gets(3)`.
|
Cody also changed the entry to use `fgets(3)` instead of `gets(3)`.
|
||||||
(See [FAQ 4.1 - Why were some calls to
|
(See [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)?](faq.html#faq4_1) for why this was done.)
|
fgets(3)?](faq.html#gets) for why this was done.)
|
||||||
|
|
||||||
This one has
|
This one has
|
||||||
a minor annoyance in that it now prints a newline after the output but this
|
a minor annoyance in that it now prints a newline after the output but this
|
||||||
@@ -2442,7 +2442,7 @@ each mode allowed with two sizes, 128 and 256, allowing one to quit or skip each
|
|||||||
Cody also made this use `fgets(3)` instead of `gets(3)`.
|
Cody also made this use `fgets(3)` instead of `gets(3)`.
|
||||||
See [FAQ 4.1 - Why were some calls to
|
See [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)?](faq.html#faq4_1) for why this was done.
|
fgets(3)?](faq.html#gets) for why this was done.
|
||||||
In this case the newline had
|
In this case the newline had
|
||||||
to be terminated but it was a pretty straightforward fix. `gets()` was defined
|
to be terminated but it was a pretty straightforward fix. `gets()` was defined
|
||||||
to use `fgets()` and the inclusion of `stdio.h` had to be added but to make it
|
to use `fgets()` and the inclusion of `stdio.h` had to be added but to make it
|
||||||
@@ -2508,7 +2508,7 @@ It actually appears to allow 1 but if you specify 4 it says 0, 2 or 3 and it is
|
|||||||
an error but it's entirely possible that they will eventually make the defect
|
an error but it's entirely possible that they will eventually make the defect
|
||||||
function as the error message claims. See [FAQ 4.6 - Why was arg
|
function as the error message claims. See [FAQ 4.6 - Why was arg
|
||||||
count and/or type changed in main() in some older
|
count and/or type changed in main() in some older
|
||||||
entries?](faq.html#faq4_6) for more details.
|
entries?](faq.html#arg_count) for more details.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -2810,7 +2810,7 @@ appears that they do allow 1 but for instance 4 is not allowed. However as it's
|
|||||||
quite possible they will 'fix' this defect it would be better to have this not
|
quite possible they will 'fix' this defect it would be better to have this not
|
||||||
be a problem at such a time. See [FAQ 4.6 - Why was arg
|
be a problem at such a time. See [FAQ 4.6 - Why was arg
|
||||||
count and/or type changed in main() in some older
|
count and/or type changed in main() in some older
|
||||||
entries?](faq.html#faq4_6) for more details.
|
entries?](faq.html#arg_count) for more details.
|
||||||
|
|
||||||
|
|
||||||
Cody also added the [bas1.sh](%%REPO_URL%%/1998/bas1/bas1.sh) script to simplify running the
|
Cody also added the [bas1.sh](%%REPO_URL%%/1998/bas1/bas1.sh) script to simplify running the
|
||||||
@@ -2908,7 +2908,7 @@ possible though that this will change so it is fixed in case this happens. As it
|
|||||||
is mostly just through the C pre-processor Cody added a new macro to make the
|
is mostly just through the C pre-processor Cody added a new macro to make the
|
||||||
code look like the original with just an extra arg. See [FAQ 4.6 - Why was arg
|
code look like the original with just an extra arg. See [FAQ 4.6 - Why was arg
|
||||||
count and/or type changed in main() in some older
|
count and/or type changed in main() in some older
|
||||||
entries?](faq.html#faq4_6) for more details.
|
entries?](faq.html#arg_count) for more details.
|
||||||
|
|
||||||
|
|
||||||
In some versions of `clang` `-Wno-int-conversion` had to be added to the
|
In some versions of `clang` `-Wno-int-conversion` had to be added to the
|
||||||
@@ -3048,7 +3048,7 @@ of `clang` say that `main()` can only have 0, 2 or 3 args. These versions accept
|
|||||||
arg but it is entirely possible that they fix this so this should prevent it
|
arg but it is entirely possible that they fix this so this should prevent it
|
||||||
from breaking if that happens. See [FAQ 4.6 - Why was arg
|
from breaking if that happens. See [FAQ 4.6 - Why was arg
|
||||||
count and/or type changed in main() in some older
|
count and/or type changed in main() in some older
|
||||||
entries?](faq.html#faq4_6) for more details.
|
entries?](faq.html#arg_count) for more details.
|
||||||
|
|
||||||
|
|
||||||
Cody added the [try.sh](%%REPO_URL%%/1998/schweikh3/try.sh) script to make it easier to try
|
Cody added the [try.sh](%%REPO_URL%%/1998/schweikh3/try.sh) script to make it easier to try
|
||||||
@@ -3106,7 +3106,7 @@ commands that we recommended.
|
|||||||
[Cody](#cody) changed this entry to use `fgets(3)` instead of `gets(3)`.
|
[Cody](#cody) changed this entry to use `fgets(3)` instead of `gets(3)`.
|
||||||
See [FAQ 4.1 - Why were some calls to
|
See [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)?](faq.html#faq4_1) for why this was done.
|
fgets(3)?](faq.html#gets) for why this was done.
|
||||||
This involved changing the `K` arg to `gets(3)` to `&K` in `fgets(3)`.
|
This involved changing the `K` arg to `gets(3)` to `&K` in `fgets(3)`.
|
||||||
|
|
||||||
Cody also added the [try.sh](%%REPO_URL%%/2000/anderson/try.sh) script.
|
Cody also added the [try.sh](%%REPO_URL%%/2000/anderson/try.sh) script.
|
||||||
@@ -3800,7 +3800,7 @@ Cody, out of an abundance of caution for `clang`, added a second arg to `main()`
|
|||||||
as some versions complain about the number of args and although they accept 1 it
|
as some versions complain about the number of args and although they accept 1 it
|
||||||
is entirely possible it will eventually be that they don't. See [FAQ 4.6 - Why was arg
|
is entirely possible it will eventually be that they don't. See [FAQ 4.6 - Why was arg
|
||||||
count and/or type changed in main() in some older
|
count and/or type changed in main() in some older
|
||||||
entries?](faq.html#faq4_6) for more details.
|
entries?](faq.html#arg_count) for more details.
|
||||||
|
|
||||||
Cody also added the [try.sh](%%REPO_URL%%/2004/kopczynski/try.sh) script and various data
|
Cody also added the [try.sh](%%REPO_URL%%/2004/kopczynski/try.sh) script and various data
|
||||||
files: [kopczynski-a](%%REPO_URL%%/2004/kopczynski/kopczynski-a) to demonstrate what happens when art more
|
files: [kopczynski-a](%%REPO_URL%%/2004/kopczynski/kopczynski-a) to demonstrate what happens when art more
|
||||||
@@ -3836,7 +3836,7 @@ chose the word `IOCCC` instead of `AAA`).
|
|||||||
|
|
||||||
[Cody](#cody) made this use `fgets(3)`. See [FAQ 4.1 - Why were some calls to
|
[Cody](#cody) made this use `fgets(3)`. See [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)?](faq.html#faq4_1) for why this was done.
|
fgets(3)?](faq.html#gets) for why this was done.
|
||||||
|
|
||||||
|
|
||||||
He also changed the time factor in the data files as the animations went too
|
He also changed the time factor in the data files as the animations went too
|
||||||
@@ -4356,7 +4356,7 @@ it to the repo as well.
|
|||||||
2 args instead of 1 as some versions report that `main()` must have 0, 2 or 3
|
2 args instead of 1 as some versions report that `main()` must have 0, 2 or 3
|
||||||
args, even though at least one of those versions allows 1 arg only. See [FAQ 4.6 - Why was arg
|
args, even though at least one of those versions allows 1 arg only. See [FAQ 4.6 - Why was arg
|
||||||
count and/or type changed in main() in some older
|
count and/or type changed in main() in some older
|
||||||
entries?](faq.html#faq4_6) for more details.
|
entries?](faq.html#arg_count) for more details.
|
||||||
|
|
||||||
|
|
||||||
Cody also added the [try.sh](%%REPO_URL%%/2006/sykes2/try.sh) script for easier use of the
|
Cody also added the [try.sh](%%REPO_URL%%/2006/sykes2/try.sh) script for easier use of the
|
||||||
@@ -4440,7 +4440,7 @@ We're not able to test this.
|
|||||||
versions of `clang` complain about not only the type of each arg to `main()` but
|
versions of `clang` complain about not only the type of each arg to `main()` but
|
||||||
the number of args as well. See [FAQ 4.6 - Why was arg
|
the number of args as well. See [FAQ 4.6 - Why was arg
|
||||||
count and/or type changed in main() in some older
|
count and/or type changed in main() in some older
|
||||||
entries?](faq.html#faq4_6) for more details.
|
entries?](faq.html#arg_count) for more details.
|
||||||
|
|
||||||
|
|
||||||
Cody also added the [try.sh](%%REPO_URL%%/2011/borsanyi/try.sh) script.
|
Cody also added the [try.sh](%%REPO_URL%%/2011/borsanyi/try.sh) script.
|
||||||
@@ -4681,7 +4681,7 @@ abundance of caution in case `clang`, which already imposes restrictions on the
|
|||||||
types of args to `main()` including to do with `char **`, decides to further
|
types of args to `main()` including to do with `char **`, decides to further
|
||||||
restrict them. See [FAQ 4.6 - Why was arg
|
restrict them. See [FAQ 4.6 - Why was arg
|
||||||
count and/or type changed in main() in some older
|
count and/or type changed in main() in some older
|
||||||
entries?](faq.html#faq4_6) for more details.
|
entries?](faq.html#arg_count) for more details.
|
||||||
|
|
||||||
|
|
||||||
Cody also restored the original code from the archive.
|
Cody also restored the original code from the archive.
|
||||||
@@ -4975,7 +4975,7 @@ The entry can still be enjoyed if you do not have these tools, however.
|
|||||||
Cody also (out of an abundance of caution for `clang(1)` which is strict with
|
Cody also (out of an abundance of caution for `clang(1)` which is strict with
|
||||||
arg type and count to `main()`) added a second (unused) arg to `main()`. See
|
arg type and count to `main()`) added a second (unused) arg to `main()`. See
|
||||||
[FAQ 4.6 - Why was arg count and/or type changed in main() in some
|
[FAQ 4.6 - Why was arg count and/or type changed in main() in some
|
||||||
older entries?](faq.html#faq4_6) for more details.
|
older entries?](faq.html#arg_count) for more details.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -5491,7 +5491,7 @@ must be 0, 2 or 3. The version this has been observed in does not actually
|
|||||||
object to 1 arg but it is entirely possible that this changes so a second arg
|
object to 1 arg but it is entirely possible that this changes so a second arg
|
||||||
(that's not needed and is unused) has been added just in case. See [FAQ 4.6 -
|
(that's not needed and is unused) has been added just in case. See [FAQ 4.6 -
|
||||||
Why was arg count and/or type changed in main() in some older
|
Why was arg count and/or type changed in main() in some older
|
||||||
entries?](faq.html#faq4_6) for more details.
|
entries?](faq.html#arg_count) for more details.
|
||||||
|
|
||||||
|
|
||||||
Cody also added explicit linking of libm (`-lm`) for systems that do not do this
|
Cody also added explicit linking of libm (`-lm`) for systems that do not do this
|
||||||
|
|||||||
Reference in new issue
Block a user