improve word flow around FAQ references

This commit is contained in:
Landon Curt Noll committed 2024-07-21 16:17:20 -07:00
1 parent f7e7610370
commit 89e66b96c5
41 files changed
+289 -213

No files matched your search

+87 -40
View File
@@ -217,7 +217,9 @@ returning to the shell. The original code does not have this change.
versions of `clang` object to the number of args of `main()`, saying that it 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 (that's not
needed and is unused) has been added just in case. See
needed and is unused) has been added just in case.
See the
FAQ on "[main function args](faq.html#arg_count)"
for more details.
@@ -403,12 +405,14 @@ Cody also added the [try.sh](%%REPO_URL%%/1985/sicherman/try.sh) and
### Winning entry source code: [hague.c](%%REPO_URL%%/1986/hague/hague.c)
</div>
[Cody](#cody) made this use `fgets()`. See
FAQ on "[gets and fgets](faq.html#gets)"
for why this was done.
[Cody](#cody) made this use `fgets()`.
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.
See the
FAQ on "[gets and fgets](faq.html#gets)"
for why this was done.
<div id="1986_holloway">
## Winning entry: [1986/holloway](1986/holloway/index.html)
@@ -723,7 +727,9 @@ size constraints of the contest).
### Winning entry source code: [wall.c](%%REPO_URL%%/1987/wall/wall.c)
</div>
[Cody](#cody) made this use `fgets(3)`. See
[Cody](#cody) made this use `fgets(3)`.
See the
FAQ on "[gets and fgets](faq.html#gets)"
for why this was done.
@@ -889,12 +895,13 @@ same code, just a `p` instead of an `m` in the name. Additionally, `main()` retu
### Winning entry source code: [reddy.c](%%REPO_URL%%/1988/reddy/reddy.c)
</div>
[Cody](#cody) made this use `fgets(3)`. See
[Cody](#cody) made this use `fgets(3)`.
See the
FAQ on "[gets and fgets](faq.html#gets)"
for why this was done.
<div id="1988_spinellis">
## Winning entry: [1988/spinellis](1988/spinellis/index.html)
### Winning entry source code: [spinellis.c](%%REPO_URL%%/1988/spinellis/spinellis.c)
@@ -1246,7 +1253,9 @@ judges was retained.
[Yusuke](#yusuke) got this to work in modern systems (it previously resulted in a bus
error).
[Cody](#cody) made this use `fgets(3)`. See
[Cody](#cody) made this use `fgets(3)`.
See the
FAQ on "[gets and fgets](faq.html#gets)"
for why this was done.
@@ -1269,7 +1278,9 @@ Cody fixed another compiler error by removing the erroneous prototype to
`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).
Cody also made this use `fgets(3)`. See
Cody also made this use `fgets(3)`.
See the
FAQ on "[gets and fgets](faq.html#gets)"
for why this was done.
@@ -1360,7 +1371,9 @@ author.
Cody also changed the code (in both versions) to use `fgets(3)` instead of
`gets(3)` so one would not get a warning about the use of `gets(3)` at linking
time or execution, the latter of which was causing confusing output due to the
warning being interspersed with the program's interactive output. See
warning being interspersed with the program's interactive output.
See the
FAQ on "[gets and fgets](faq.html#gets)"
for more details on why this change was
done more generally.
@@ -1393,7 +1406,9 @@ BTW: why can't the fix:
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
Cody also changed the code to use `fgets(3)`.
See the
FAQ on "[gets and fgets](faq.html#gets)"
for why this was done.
@@ -1544,7 +1559,9 @@ condition (the `char *s` had to be changed to `char s[]`) and he also made it
and the generated code work for `clang`.
Furthermore Cody changed it so that the C from the BASIC uses `fgets()`, not
`gets()`. See
`gets()`.
See the
FAQ on "[gets and fgets](faq.html#gets)"
for why this was done.
@@ -1798,9 +1815,11 @@ Cody also restored a slightly more obscure line of code that had been changed:
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)`.
See
See the
FAQ on "[gets and fgets](faq.html#gets)"
for why this was done.
for general information about to why this was done.
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
made other files fail to compile (for this example specifically, see below).
@@ -1969,7 +1988,9 @@ Cody made `main()` have two args, not one, as some versions of `clang` have a
defect with the number of args to `main()` 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
caution as it's quite possible that `clang` or the ANSI C committee end up further
changing this. See
changing this.
See the
FAQ on "[main function args](faq.html#arg_count)"
for more details.
@@ -1991,7 +2012,9 @@ file](1992/lush/index.html#judges-remarks)) this will not work with `clang`.
[Cody](#cody) also provided the [lush.sh](%%REPO_URL%%/1992/lush/lush.sh) script to
demonstrate it as using make was problematic.
Cody made it use `fgets()` instead of `gets()`. See
Cody made it use `fgets()` instead of `gets()`.
See the
FAQ on "[gets and fgets](faq.html#gets)"
for why this was done.
@@ -2231,7 +2254,9 @@ compile time. See the index.html for details.
### Winning entry source code: [schnitzi.c](%%REPO_URL%%/1993/schnitzi/schnitzi.c)
</div>
[Cody](#cody) made this use `fgets(3)` not `gets(3)`. See
[Cody](#cody) made this use `fgets(3)` not `gets(3)`.
See the
FAQ on "[gets and fgets](faq.html#gets)"
for why this was done.
@@ -2358,9 +2383,10 @@ type (because `time(2)` takes a `time_t *` which in some systems is a `long *`
but what was being passed to it is an `int`).
Cody also changed the entry to use `fgets(3)` instead of `gets(3)`.
(See
See the
FAQ on "[gets and fgets](faq.html#gets)"
for why this was done.)
for why this was done.
This one has
a minor annoyance in that it now prints a newline after the output but this
@@ -2439,15 +2465,17 @@ 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).
Cody also made this use `fgets(3)` instead of `gets(3)`.
See
FAQ on "[gets and fgets](faq.html#gets)"
]for why this was done.
In this case the newline had
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
more like the original entry this was done in the Makefile. The alternate code was
also changed to use `fgets(3)`.
See the
FAQ on "[gets and fgets](faq.html#gets)"
for why this was done.
<div id="1994_weisberg">
## Winning entry: [1994/weisberg](1994/weisberg/index.html)
@@ -2505,12 +2533,13 @@ Out of an abundance of caution with `clang`, Cody also added a second arg to
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
an error but it's entirely possible that they will eventually make the defect
function as the error message claims. See
function as the error message claims.
See the
FAQ on "[main function args](faq.html#arg_count)"
for more details.
<div id="1995_dodsond1">
## Winning entry: [1995/dodsond1](1995/dodsond1/index.html)
### Winning entry source code: [dodsond1.c](%%REPO_URL%%/1995/dodsond1/dodsond1.c)
@@ -2807,7 +2836,9 @@ versions of `clang` whine about the number of args on top of what type they are
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
quite possible they will 'fix' this defect it would be better to have this not
be a problem at such a time. See
be a problem at such a time.
See the
FAQ on "[main function args](faq.html#arg_count)"
for more details.
@@ -2905,7 +2936,9 @@ versions of `clang` complain about the number of args to `main()`. These version
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
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
code look like the original with just an extra arg.
See the
FAQ on "[main function args](faq.html#arg_count)"
for more details.
@@ -3045,7 +3078,9 @@ occurs.
Cody made `main()` have two args out of an abundance of caution as some versions
of `clang` say that `main()` 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
from breaking if that happens. See
from breaking if that happens.
See the
FAQ on "[main function args](faq.html#arg_count)"
for more details.
@@ -3103,12 +3138,12 @@ commands that we recommended.
</div>
[Cody](#cody) changed this entry to use `fgets(3)` instead of `gets(3)`.
See
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.
See the
FAQ on "[gets and fgets](faq.html#gets)"
for why this was done.
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.
<div id="2000_bmeyer">
@@ -3797,7 +3832,9 @@ discovered it will not work otherwise.
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
is entirely possible it will eventually be that they don't. See
is entirely possible it will eventually be that they don't.
See the
FAQ on "[main function args](faq.html#arg_count)"
for more details.
@@ -3833,7 +3870,9 @@ chose the word `IOCCC` instead of `AAA`).
### Winning entry source code: [schnitzi.c](%%REPO_URL%%/2004/schnitzi//schnitzi.c)
</div>
[Cody](#cody) made this use `fgets(3)`. See
[Cody](#cody) made this use `fgets(3)`.
See the
FAQ on "[gets and fgets](faq.html#gets)"
for why this was done.
@@ -4353,7 +4392,9 @@ it to the repo as well.
[Cody](#cody), out of an abundance of caution for `clang`'s defects, made `main()` have
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
args, even though at least one of those versions allows 1 arg only.
See the
FAQ on "[main function args](faq.html#arg_count)"
for more details.
@@ -4437,7 +4478,9 @@ We're not able to test this.
[Cody](#cody), out of an abundance of caution, added a second arg to `main()` as some
versions of `clang` complain about not only the type of each arg to `main()` but
the number of args as well. See
the number of args as well.
See the
FAQ on "[main function args](faq.html#arg_count)"
for more details.
@@ -4678,7 +4721,9 @@ Cody also fixed a typo in the ruby script
Cody also changed `argv` to be not `const char **` but `char **`, mostly out of an
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
restrict them. See
restrict them.
See the
FAQ on "[main function args](faq.html#arg_count)"
for more details.
@@ -4972,13 +5017,13 @@ The entry can still be enjoyed if you do not have these tools, however.
[Cody](#cody) added the [try.sh](%%REPO_URL%%/2013/endoh3/try.sh) script.
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 the
FAQ on "[main function args](faq.html#arg_count)"
for more details.
<div id="2013_endoh4">
## Winning entry: [2013/endoh4](2013/endoh4/index.html)
### Winning entry source code: [endoh4.c](%%REPO_URL%%/2013/endoh4//endoh4.c)
@@ -5488,7 +5533,9 @@ Cody also, out of abundance of caution, added a second arg to `main()` because
some versions of `clang` object to the number of args of `main()`, saying that it
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
(that's not needed and is unused) has been added just in case. See
(that's not needed and is unused) has been added just in case.
See the
FAQ on "[main function args](faq.html#arg_count)"
for more details.