Cody Boone Ferguson 56b31286d1 Fix 1991/dds
This was a fun one! There were up to three segfaults fixed and with
clang the generated file could not be compiled. The latter part was
fixed with (unfortunately) something of a hack. I explain below and in
the README.md how to change that part to use just cc if you have gcc
(macOS gcc is actually clang).

The first segfault which was always triggered was due to the code

     *q>' '&&(*q)--;

This seems odd at first glance but it's pointing to 's' which was
read-only memory as a char *s.  It's now a char s[]. The second and
third segfaults were caused if a file was not specified (or it the one
specified did not exist or couldn't be opened for some reason) and if
the output file could not be opened for writing. The allowing the
generated code to compile with clang is something of a hack
unfortunately. The code return system(q-6); ended up doing return
system("cc a.c"); but depending on the compiler this would trigger
errors due to no function prototype specified and also a case where
main() had a return; without any return value. Because the string s
is complicated and because I did not want to inadvertently mess
something up I changed that code to system("make a"); and then added
the right rule to the Makefile. Thus you now need both make and cc.
If you use gcc you may change the system() call to what was given in
this description to get a more authentic feel. If you do this you must
then run ./a.out not ./a!
2023-03-27 12:30:04 -07:00
2023-03-27 10:05:01 -07:00
2023-03-27 10:38:46 -07:00
2023-03-27 12:30:04 -07:00
2023-03-05 05:20:47 -08:00
2023-03-17 10:04:12 -07:00
2020-12-30 16:57:03 -08:00
2023-03-25 05:38:28 -07:00
2023-03-27 10:05:01 -07:00
2021-12-27 13:42:23 -08:00
2021-12-27 15:23:23 -08:00
2023-02-18 07:43:12 -08:00
2020-12-30 16:57:03 -08:00
2020-12-30 16:57:03 -08:00
2023-03-26 03:08:56 -07:00
2023-03-26 20:09:58 -07:00
2023-02-20 07:13:06 -08:00
2023-03-26 03:28:27 -07:00
2023-03-17 08:27:55 -07:00

This is NOT the official IOCCC web site!

Please visit www.ioccc.org for the official IOCCC web site.

Please do NOT bookmark or link to this experimental web site.

When this experiment is finished, this site will go away!

This test web tree is part of the temp-test-ioccc GitHub repo.

This web site will be undergoing major changes, so expect many broken links, typos and other problems. If you wish to recommend changes (understanding that things may be rapidly changing out from under your copy), then consider making pull requests against the temp-test-ioccc GitHub repo.

XXX - The text from the top down to the What follows is the actual README.md file line will be removed when this web site becomes official - XXX

What follows is the actual README.md file

About the IOCCC winner GitHub repository

The IOCCC winners GitHub repository are the official winners of the International Obfuscated C Code Contest (IOCCC), the Internet's oldest ongoing contest.

For information about the IOCCC, see the goals of the contest.

We, the IOCCC Judges, recommend that you view this information via the Official IOCCC web site.

S
Description
No description provided
Readme CC-BY-SA-4.0
2 GiB
0 Stars 1 Watchers 0 Forks
Languages
HTML 71.5%
C 11.6%
Makefile 7.1%
Shell 6.9%
M4 1.1%
Other 1.6%