diff --git a/2012/zeitak/README.md b/2012/zeitak/README.md index 34505ee19..1ab51af20 100644 --- a/2012/zeitak/README.md +++ b/2012/zeitak/README.md @@ -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 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: diff --git a/2012/zeitak/index.html b/2012/zeitak/index.html index 29ce4f3b5..3c5255e2b 100644 --- a/2012/zeitak/index.html +++ b/2012/zeitak/index.html @@ -438,7 +438,7 @@ just to understand 18 key characters of this code.

NOTE: if you use vim to view the code, make sure to do:

    :set tabstop=4

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)?

Author’s remarks:

Nesting Errors Detector

diff --git a/faq.html b/faq.html index eec2650a3..5c2946c60 100644 --- a/faq.html +++ b/faq.html @@ -788,7 +788,7 @@ with your submission. If the IOCCC judges truly need m 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 others are wondering about as well!

-

See also FAQ about making suggestions.

+

See also FAQ about making suggestions.

FAQ 0.7: - What are the IOCCC best practices for using markdown?

@@ -1898,8 +1898,10 @@ winning entries page.

Section 3: Compiling and running IOCCC entries

+

FAQ 3.0: What Makefile rules are available to build or clean up IOCCC entries?

+

In general the best way to compile everything in an entry directory is to run:

    make clobber all

If you wish to compile every entry for every year you should go to the top level @@ -2650,7 +2652,7 @@ then do:

./mullender.alt

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 -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?.

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 @@ -2690,7 +2692,7 @@ extract it and then switch to the directory and compile everything of each entry:

        cd 1984
         make everything
-

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?.

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 @@ -2885,8 +2887,10 @@ as well, for fun.

In some cases it might be better to not have them but as noted this is a judgement call.

+

FAQ 4.6: Why was arg count and/or type changed in main() in some older entries?

+

There are a number of reasons this was done but they usually come down to a mis-feature or defect in the clang compiler.

In all versions of clang the first arg must be an int and the rest must be a diff --git a/faq.md b/faq.md index dcf91f4d2..d96be3ea4 100644 --- a/faq.md +++ b/faq.md @@ -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 others are wondering about as well! -See also [FAQ about making suggestions](#faq0_5). +See also [FAQ about making suggestions](#feedback).

@@ -1757,8 +1757,10 @@ winning entries page](years.html).
+
### FAQ 3.0: What Makefile rules are available to build or clean up IOCCC entries?
+
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 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 -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 `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 -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 `index.html` file (or any other file in the entry) and try out the entries that @@ -3325,8 +3327,10 @@ judgement call.
+
### FAQ 4.6: Why was arg count and/or type changed in main() in some older entries?
+
There are a number of reasons this was done but they usually come down to a mis-feature or defect in the `clang` compiler. diff --git a/status.html b/status.html index 038d26087..2d3a03dda 100644 --- a/status.html +++ b/status.html @@ -438,7 +438,7 @@ for any changes that may have been made while the IOCCC “pending”.

“judging”

The IOCCC is closed to new submissions. The IOCCC judges -are in the process of judging the submissions they received while +are in the process of judging the submissions they received while the IOCCC was open.

Watch the @IOCCC mastodon feed for updates.

Once the IOCCC closes, the judges will:

diff --git a/status.md b/status.md index 17aa802c5..635c5b32b 100644 --- a/status.md +++ b/status.md @@ -67,7 +67,7 @@ for any changes that may have been made while the [IOCCC](index.html) was
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. Watch the [@IOCCC mastodon feed](https://fosstodon.org/@ioccc) for updates. diff --git a/thanks-for-help.html b/thanks-for-help.html index a048be0d9..4da166988 100644 --- a/thanks-for-help.html +++ b/thanks-for-help.html @@ -549,7 +549,7 @@ 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 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 entries? for more details.

Cody also added the script primes.sh which allows one @@ -682,7 +682,7 @@ should they object to main() having only one arg.

Winning entry: 1986/hague

Winning entry source code: hague.c

-

Cody made this use fgets(). See FAQ 4.1 - Why were some calls to +

Cody made this use fgets(). See FAQ 4.1 - Why were some calls to the libc function gets(3) changed to use fgets(3)? for why this was done.

Cody also added the try.sh script which also feeds to the @@ -894,7 +894,7 @@ size constraints of the contest).

Winning entry: 1987/wall

Winning entry source code: wall.c

-

Cody made this use fgets(3). See FAQ 4.1 - Why were some calls to +

Cody made this use fgets(3). See FAQ 4.1 - Why were some calls to the libc function gets(3) changed to use fgets(3)? for why this was done.

Cody also added the try.sh script.

@@ -1009,7 +1009,7 @@ same code, just a p instead of an m in the name. Addit

Winning entry: 1988/reddy

Winning entry source code: reddy.c

-

Cody made this use fgets(3). See FAQ 4.1 - Why were some calls to +

Cody made this use fgets(3). See FAQ 4.1 - Why were some calls to the libc function gets(3) changed to use fgets(3)? for why this was done.

@@ -1270,7 +1270,7 @@ judges was retained.

Yusuke got this to work in modern systems (it previously resulted in a bus error).

-

Cody made this use fgets(3). See FAQ 4.1 - Why were some calls to +

Cody made this use fgets(3). See FAQ 4.1 - Why were some calls to the libc function gets(3) changed to use fgets(3)? for why this was done.

@@ -1285,7 +1285,7 @@ more like the original in this way by redefining free to have the c operator itself.

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.

-

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 fgets(3)? for why this was done.

@@ -1347,7 +1347,7 @@ 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 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 fgets(3)? for more details on why this change was done more generally.

@@ -1370,7 +1370,7 @@ but as he was testing the fibonacci.c bug he ended up changing it a
    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? 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(3) changed to use fgets(3)? for why this was done.

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.

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 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 fgets(3)? for why this was done.

For the magic of clang (which was done manually except the returning a value @@ -1643,7 +1643,7 @@ true of another change as further below.

+ putc(i["}|uutsrq`_^bji`[Zkediml[PO]a_M__]ISOYIRGTNR"]+i-9,stderr);

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 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 fgets(3)? for why this was done. This was complicated because of how the other source files are generated (as @@ -1770,7 +1770,7 @@ start and end character.

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 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 entries? for more details.

Yusuke also noted that there is a bug in the program where right after starting @@ -1785,7 +1785,7 @@ it works (see Judges’ remarks in file) this will not work with clang.

Cody also provided the lush.sh script to 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 fgets(3)? for why this was done.

NOTE: this entry cannot work with clang due to different compiler messages (it @@ -1959,7 +1959,7 @@ compile time. See the index.html for details.

Winning entry: 1993/schnitzi

Winning entry source code: schnitzi.c

-

Cody made this use fgets(3) not gets(3). See FAQ 4.1 - Why were some calls to +

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 fgets(3)? for why this was done.

@@ -2050,7 +2050,7 @@ comma operator was needed.

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 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 fgets(3)? for why this was done.)

This one has @@ -2113,7 +2113,7 @@ remarks), 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 fgets(3)? for why this was done. In this case the newline had @@ -2164,7 +2164,7 @@ details on this.

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 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 entries? for more details.

@@ -2381,7 +2381,7 @@ versions of clang 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 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 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 entries? for more details.

Cody also added the bas1.sh script to simplify running the @@ -2451,7 +2451,7 @@ versions of clang complain about the number of args to main() 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 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 entries? for more details.

In some versions of clang -Wno-int-conversion had to be added to the @@ -2550,7 +2550,7 @@ 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 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 entries? for more details.

Cody added the try.sh script to make it easier to try @@ -2589,7 +2589,7 @@ commands that we recommended.

Winning entry source code: anderson.c

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 fgets(3)? for why this was done. This involved changing the K arg to gets(3) to &K in fgets(3).

@@ -3082,7 +3082,7 @@ a lot of numbers this will be harder to see).

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 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 entries? for more details.

Cody also added the try.sh script and various data @@ -3107,7 +3107,7 @@ chose the word IOCCC instead of AAA).

Winning entry: 2004/schnitzi

Winning entry source code: schnitzi.c

-

Cody made this use fgets(3). See FAQ 4.1 - Why were some calls to +

Cody made this use fgets(3). See FAQ 4.1 - Why were some calls to the libc function gets(3) changed to use fgets(3)? for why this was done.

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.

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 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 entries? for more details.

Cody also added the try.sh script for easier use of the @@ -3530,7 +3530,7 @@ We’re not able to test this.

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 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 entries? for more details.

Cody also added the try.sh script.

@@ -3702,7 +3702,7 @@ everything, filtered through less.

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 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 entries? for more details.

Cody also restored the original code from the archive.

@@ -3918,7 +3918,7 @@ also appear to be an issue with the script even if you know of convertCody added the 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 -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? for more details.

Winning entry: 2013/endoh4

@@ -4272,7 +4272,7 @@ the repo.

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 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 entries? for more details.

Cody also added explicit linking of libm (-lm) for systems that do not do this diff --git a/thanks-for-help.md b/thanks-for-help.md index 549e44779..ba6575530 100644 --- a/thanks-for-help.md +++ b/thanks-for-help.md @@ -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 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 -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 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 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 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 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. @@ -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 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 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 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 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 -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. @@ -1396,7 +1396,7 @@ tell us! 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 -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 @@ -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 `gets()`. See [FAQ 4.1 - Why were some calls to 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 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)`. See [FAQ 4.1 - Why were some calls to 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 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). @@ -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 changing this. See [FAQ 4.6 - 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. 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 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 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 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)`. (See [FAQ 4.1 - Why were some calls to 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 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)`. See [FAQ 4.1 - Why were some calls to 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 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 @@ -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 function as the error message claims. See [FAQ 4.6 - 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. @@ -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 be a problem at such a time. See [FAQ 4.6 - 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 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 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 -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 @@ -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 from breaking if that happens. See [FAQ 4.6 - 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 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)`. See [FAQ 4.1 - Why were some calls to 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)`. 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 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 -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 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 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 @@ -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 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 -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 @@ -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 the number of args as well. See [FAQ 4.6 - 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 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 restrict them. See [FAQ 4.6 - 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 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 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 -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 (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 -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