A few page names were changed and menu link (titles) were changed too. By page names it means either DESCRIPTION or HEADER_2 in bin/md2html.cfg. Although it looks better and is more consistent, there might be one or two that can be further improved. Naturally every html file that is markdown based was updated.
4874 lines
361 KiB
HTML
4874 lines
361 KiB
HTML
<!DOCTYPE html>
|
||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||
<!-- START: two lines up starts content from: inc/top.default.html -->
|
||
|
||
<!-- END: this line ends content from: inc/top.default.html -->
|
||
<!-- START: this line starts content from: inc/head.default.html -->
|
||
|
||
<head>
|
||
<link rel="stylesheet" href="./ioccc.css">
|
||
<link href="https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap" rel="stylesheet">
|
||
<meta charset="utf-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||
<title>The International Obfuscated C Code Contest</title>
|
||
<link rel="icon" type="image/x-icon" href="./favicon.ico">
|
||
<meta name="description" content="Thanks for all the fixes of IOCCC winning entries">
|
||
<meta name="keywords" content="IOCCC, thanks, thanx, thank you, ta">
|
||
</head>
|
||
|
||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||
|
||
<!-- END: this line ends content from: inc/head.default.html -->
|
||
|
||
<!-- -->
|
||
<!-- This web page was formed via the tool: bin/gen-top-html.sh -->
|
||
<!-- The content of main section of this web page came from: thanks-for-help.md -->
|
||
<!-- -->
|
||
|
||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||
<!-- !!! Do not modify this web page, instead modify the file: thanks-for-help.md !!! -->
|
||
<!-- !!! Do not modify this web page, instead modify the file: thanks-for-help.md !!! -->
|
||
<!-- !!! Do not modify this web page, instead modify the file: thanks-for-help.md !!! -->
|
||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||
|
||
<!-- Markdown content was converted into HTML via the tool: bin/md2html.sh -->
|
||
|
||
<!-- START: this line starts content from: inc/body.default.html -->
|
||
|
||
<body>
|
||
|
||
<!-- END: this line ends content from: inc/body.default.html -->
|
||
<!-- START: this line starts content from: inc/topbar.default.html -->
|
||
|
||
<div class="theader">
|
||
<nav class="topbar">
|
||
<div class="container">
|
||
<div class="logo">
|
||
<a href="./index.html" class="logo-link">
|
||
IOCCC
|
||
</a>
|
||
</div>
|
||
|
||
<div class="topbar-items">
|
||
<div class="item">
|
||
<span class="item-header">
|
||
Entries
|
||
</span>
|
||
|
||
<div class="sub-item">
|
||
<div class="outfit-font">
|
||
<a href="./years.html" class="sub-item-link">
|
||
Winning Entries
|
||
</a>
|
||
</div>
|
||
|
||
<div class="outfit-font">
|
||
<a href="./authors.html" class="sub-item-link">
|
||
Winning Authors
|
||
</a>
|
||
</div>
|
||
|
||
<div class="outfit-font">
|
||
<a href="./location.html" class="sub-item-link">
|
||
Location of winning authors
|
||
</a>
|
||
</div>
|
||
|
||
<div class="outfit-font">
|
||
<a href="./bugs.html" class="sub-item-link">
|
||
Bugs and (mis)features
|
||
</a>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="item">
|
||
<span class="item-header">
|
||
Status
|
||
</span>
|
||
|
||
<div class="sub-item">
|
||
<div class="outfit-font">
|
||
<a href="./news.html" class="sub-item-link">
|
||
IOCCC News
|
||
</a>
|
||
</div>
|
||
|
||
<div class="outfit-font">
|
||
<a href="./status.html" class="sub-item-link">
|
||
Contest status
|
||
</a>
|
||
</div>
|
||
|
||
<div class="outfit-font">
|
||
<a href="./next/index.html" class="sub-item-link">
|
||
Rules and Guidelines
|
||
</a>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="item">
|
||
<span class="item-header">
|
||
FAQ
|
||
</span>
|
||
|
||
<div class="sub-item">
|
||
<div class="outfit-font">
|
||
<a href="./faq.html" class="sub-item-link">
|
||
FAQ
|
||
</a>
|
||
</div>
|
||
|
||
<div class="outfit-font">
|
||
<a href="./faq.html#submit" class="sub-item-link">
|
||
How to enter the IOCCC
|
||
</a>
|
||
</div>
|
||
|
||
<div class="outfit-font">
|
||
<a href="./faq.html#fix_an_entry" class="sub-item-link">
|
||
Fixing IOCCC entries
|
||
</a>
|
||
</div>
|
||
|
||
<div class="outfit-font">
|
||
<a href="./faq.html#fix_web_site" class="sub-item-link">
|
||
Fixing the website
|
||
</a>
|
||
</div>
|
||
|
||
<div class="outfit-font">
|
||
<a href="./faq.html#fix_author" class="sub-item-link">
|
||
Updating author info
|
||
</a>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="item">
|
||
<span class="item-header">
|
||
About
|
||
</span>
|
||
|
||
<div class="sub-item">
|
||
<div class="outfit-font">
|
||
<a href="./index.html" class="sub-item-link">
|
||
IOCCC Home
|
||
</a>
|
||
</div>
|
||
|
||
<div class="outfit-font">
|
||
<a href="./judges.html" class="sub-item-link">
|
||
The IOCCC Judges
|
||
</a>
|
||
</div>
|
||
|
||
<div class="outfit-font">
|
||
<a href="./contact.html" class="sub-item-link">
|
||
Contacting the IOCCC
|
||
</a>
|
||
</div>
|
||
|
||
<div class="outfit-font">
|
||
<a href="./thanks-for-help.html" class="sub-item-link">
|
||
Thanks for the help
|
||
</a>
|
||
</div>
|
||
|
||
<div class="outfit-font">
|
||
<a href="./markdown.html" class="sub-item-link">
|
||
IOCCC markdown guidelines
|
||
</a>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</nav>
|
||
|
||
<div class="header-mobile-menu">
|
||
<noscript>
|
||
<a href="./nojs-menu.html" class="topbar-js-label">
|
||
Please Enable JavaScript
|
||
</a>
|
||
</noscript>
|
||
|
||
<button id="header-open-menu-button" class="topbar-mobile-menu">
|
||
<img
|
||
src="./png/hamburger-icon-open.png"
|
||
alt="hamburger style menu icon - open state"
|
||
width=48
|
||
height=48>
|
||
</button>
|
||
|
||
<button id="header-close-menu-button" class="hide-content">
|
||
<img
|
||
src="./png/hamburger-icon-closed.png"
|
||
alt="hamburger style menu icon - closed state"
|
||
width=48
|
||
height=48>
|
||
</button>
|
||
|
||
<div id="mobile-menu-panel" class="hide-content">
|
||
<div class="mobile-menu-container">
|
||
|
||
<div class="mobile-menu-wrapper">
|
||
<div class="mobile-menu-item">
|
||
Entries
|
||
</div>
|
||
<div class="mobile-submenu-wrapper">
|
||
|
||
<a class="mobile-submenu-item" href="./years.html">
|
||
Winning Entries
|
||
</a>
|
||
|
||
<a class="mobile-submenu-item" href="./authors.html">
|
||
Authors of winning IOCCC entries
|
||
</a>
|
||
|
||
<a class="mobile-submenu-item" href="./location.html">
|
||
Location of authors
|
||
</a>
|
||
|
||
<a class="mobile-submenu-item" href="./bugs.html">
|
||
Bugs and (mis)features
|
||
</a>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="mobile-menu-wrapper">
|
||
|
||
<div class="mobile-menu-item">
|
||
Status
|
||
</div>
|
||
<div class="mobile-submenu-wrapper">
|
||
|
||
<a class="mobile-submenu-item" href="./status.html">
|
||
Contest status
|
||
</a>
|
||
|
||
<a class="mobile-submenu-item" href="./next/index.html">
|
||
Rules and Guidelines
|
||
</a>
|
||
|
||
<a class="mobile-submenu-item" href="./news.html">
|
||
IOCCC News
|
||
</a>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="mobile-menu-wrapper">
|
||
<div class="mobile-menu-item">
|
||
FAQ
|
||
</div>
|
||
<div class="mobile-submenu-wrapper">
|
||
|
||
<a class="mobile-submenu-item" href="./faq.html">
|
||
Frequently Asked Questions
|
||
</a>
|
||
|
||
<a class="mobile-submenu-item" href="./faq.html#submit">
|
||
How to enter the IOCCC
|
||
</a>
|
||
|
||
<a class="mobile-submenu-item" href="./faq.html#fix_an_entry">
|
||
Fixing IOCCC entries
|
||
</a>
|
||
|
||
<a class="mobile-submenu-item" href="./faq.html#fix_web_site">
|
||
Fixing the website
|
||
</a>
|
||
|
||
<a class="mobile-submenu-item" href="./faq.html#fix_author">
|
||
Fixing author info
|
||
</a>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="mobile-menu-wrapper">
|
||
<div class="mobile-menu-item">
|
||
About
|
||
</div>
|
||
<div class="mobile-submenu-wrapper">
|
||
|
||
<a class="mobile-submenu-item" href="./index.html">
|
||
IOCCC Home
|
||
</a>
|
||
|
||
<a class="mobile-submenu-item" href="./judges.html">
|
||
The IOCCC Judges
|
||
</a>
|
||
|
||
<a class="mobile-submenu-item" href="./contact.html">
|
||
Contacting the IOCCC
|
||
</a>
|
||
|
||
<a class="mobile-submenu-item" href="./thanks-for-help.html">
|
||
Thanks for the help
|
||
</a>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<script>
|
||
var headerOpenMenuButton = document.getElementById("header-open-menu-button");
|
||
var headerCloseMenuButton = document.getElementById("header-close-menu-button");
|
||
var mobileMenuPanel = document.getElementById("mobile-menu-panel");
|
||
|
||
headerOpenMenuButton.addEventListener("click", () => {
|
||
headerOpenMenuButton.classList.remove("topbar-mobile-menu");
|
||
headerOpenMenuButton.classList.add("hide-content");
|
||
|
||
headerCloseMenuButton.classList.remove("hide-content");
|
||
headerCloseMenuButton.classList.add("topbar-mobile-menu");
|
||
|
||
mobileMenuPanel.classList.remove("hide-content");
|
||
mobileMenuPanel.classList.add("topbar-mobile-panel");
|
||
});
|
||
|
||
headerCloseMenuButton.addEventListener("click", () => {
|
||
headerCloseMenuButton.classList.remove("topbar-mobile-menu");
|
||
headerCloseMenuButton.classList.add("hide-content");
|
||
|
||
mobileMenuPanel.classList.add("hide-content");
|
||
mobileMenuPanel.classList.remove("topbar-mobile-panel");
|
||
|
||
headerOpenMenuButton.classList.add("topbar-mobile-menu");
|
||
headerOpenMenuButton.classList.remove("hide-content");
|
||
});
|
||
</script>
|
||
|
||
<!-- END: this line ends content from: inc/topbar.default.html -->
|
||
<!-- START: this line starts content from: inc/header.default.html -->
|
||
|
||
<div class="header">
|
||
<a href="./2011/zucker/index.html">
|
||
<img src="./png/ioccc.png"
|
||
alt="IOCCC image by Matt Zucker"
|
||
width=300
|
||
height=110>
|
||
</a>
|
||
<h1>The International Obfuscated C Code Contest</h1>
|
||
<h2>Thanking people for their help</h2>
|
||
</div>
|
||
|
||
<!-- END: this line ends content from: inc/header.default.html -->
|
||
<!-- START: this line starts content from: inc/navbar.empty.html -->
|
||
|
||
<div class="navbar">
|
||
<a class="Right" href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2Fthanks-for-help.html">✓</a>
|
||
</div>
|
||
|
||
<!-- END: this line ends content from: inc/navbar.empty.html -->
|
||
<!-- START: this line starts content from: inc/before-content.default.html -->
|
||
|
||
<div class="content" id="content">
|
||
|
||
<!-- END: this line ends content from: inc/before-content.default.html -->
|
||
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||
|
||
<!-- BEFORE: 1st line of markdown file: thanks-for-help.md -->
|
||
<h1 id="thanks-for-all-the-help">Thanks for all the help</h1>
|
||
<h2 id="and-thanks-for-all-the-fish.--">.. and <a href="https://hitchhikers.fandom.com/wiki/So_Long,_and_Thanks_for_All_the_Fish">thanks for all the fish</a>. :-)</h2>
|
||
<p>To avoid having to change numerous “<em>index.html</em>” files to add thank you notes,
|
||
we centralize them below.</p>
|
||
<p>The <a href="judges.html">IOCCC judges</a> wish to recognize the many
|
||
important contributions to the IOCCC presentation of past IOCCC entries.
|
||
We are pleased to note the many contributions, <strong>made since 2021 Jan 01</strong>,
|
||
on an IOCCC entry by entry basis.</p>
|
||
<h2 id="ioccc-thank-you-table-of-contents">IOCCC thank you table of contents</h2>
|
||
<ul>
|
||
<li><a href="#1984">1984 entries</a> | <a href="#1985">1985 entries</a> | <a href="#1986">1986 entries</a> | <a href="#1987">1987 entries</a></li>
|
||
<li><a href="#1988">1988 entries</a> | <a href="#1989">1989 entries</a> | <a href="#1990">1990 entries</a> | <a href="#1991">1991 entries</a></li>
|
||
<li><a href="#1992">1992 entries</a> | <a href="#1993">1993 entries</a> | <a href="#1994">1994 entries</a> | <a href="#1995">1995 entries</a></li>
|
||
<li><a href="#1996">1996 entries</a> | <a href="#1998">1998 entries</a> | <a href="#2000">2000 entries</a> | <a href="#2001">2001 entries</a></li>
|
||
<li><a href="#2004">2004 entries</a> | <a href="#2005">2005 entries</a> | <a href="#2006">2006 entries</a> | <a href="#2011">2011 entries</a></li>
|
||
<li><a href="#2012">2012 entries</a> | <a href="#2013">2013 entries</a> | <a href="#2014">2014 entries</a> | <a href="#2015">2015 entries</a></li>
|
||
<li><a href="#2018">2018 entries</a> | <a href="#2019">2019 entries</a> | <a href="#2020">2020 entries</a></li>
|
||
<li><a href="#general_thanks">General thanks</a></li>
|
||
<li><a href="#makefiles_fixes_improvements">Makefiles fixes and improvements</a></li>
|
||
<li><a href="#consistency_improvements">Consistency improvements</a></li>
|
||
<li><a href="#manifest_improvements">Manifest improvements</a></li>
|
||
<li><a href="#thank_you_honor_roll">Thank you honor roll</a></li>
|
||
<li><a href="#neglect">Did we neglect to credit you?</a></li>
|
||
</ul>
|
||
<div id="1984">
|
||
<h1 id="the-1st-ioccc"><a href="1984/index.html">1984 - The 1st IOCCC</a></h1>
|
||
</div>
|
||
<div id="1984_anonymous">
|
||
<h2 id="winning-entry-1984anonymous">Winning entry: <a href="1984/anonymous/index.html">1984/anonymous</a></h2>
|
||
<h3 id="winning-entry-source-code-anonymous.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1984/anonymous/anonymous.c">anonymous.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this to work for macOS.</p>
|
||
<p>The problem was to do with the way that the <code>read(2)</code> function was redefined.
|
||
With macOS the second arg needs to be a <code>void *</code> and this also necessitated some
|
||
casts to <code>int</code> (on the second arg) in the call to <code>write(2)</code> (in <code>read()</code>).</p>
|
||
<p>Later Cody corrected the mistake where the <code>"hello, world!"</code> string was on one
|
||
line rather than two lines which the author told us (Landon) that they liked.
|
||
Thus now it is like the original where the first line ends with <code>"hell\</code> and
|
||
the second line starts with <code>o, world!\n"</code>.</p>
|
||
<p>By request, the original code is provided as
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1984/anonymous/anonymous.alt.c">anonymous.alt.c</a> so that one can
|
||
look at it and the famous tattoo which we also include here, together as a
|
||
single image that Cody added (locating the missing tattoo image and putting the
|
||
source code and the tattoo together as an image):</p>
|
||
<p><img src="1984/anonymous/1984-anonymous-tattoo.jpg"
|
||
alt="image of a tattoo of the 1984 anonymous C code"
|
||
width=600 height=401></p>
|
||
<p>The tattoo was done in 2005 by <a href="https://web.archive.org/web/20070120220721/https://thomasscovell.com/tattoo.php">Thomas
|
||
Scovell</a>.</p>
|
||
<div id="1984_decot">
|
||
<h2 id="winning-entry-1984decot">Winning entry: <a href="1984/decot/index.html">1984/decot</a></h2>
|
||
<h3 id="winning-entry-source-code-decot.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1984/decot/decot.c">decot.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this to not require <code>-traditional-cpp</code> which some compilers like
|
||
<code>clang</code> do not support. Fixing <code>-traditional-cpp</code> is, as noted later on, very
|
||
complicated, but we encourage you to look at the alternate code (which is the
|
||
original code with a minor modification made by the judges) and the fixed
|
||
code, to see what had to be done.</p>
|
||
<p><code>Clang</code> is also more strict about the type of args in <code>main()</code> and this was also a
|
||
problem that Cody fixed, making it work with both <code>clang</code> and <code>gcc</code>.</p>
|
||
<p>These fixes worked fine in macOS but it turned out that in some cases with
|
||
<code>clang</code>
|
||
in Linux it did not work so this had to be further fixed which Cody also did. It
|
||
is no longer clear what the problem was as in fedora 38 with <code>clang</code> 16.0.6; the
|
||
only difference is it causes additional warnings but it seems to work just fine.
|
||
It seems unlikely that a fix was made just for warnings so it is presumed that
|
||
there was another problem and thus the change is kept in place.</p>
|
||
<p>A note about the fix is that the <code>#define</code>d macros that were used still exist
|
||
but most are not used; they are left in just to make it look more like the
|
||
original entry. Nevertheless those cannot be used.</p>
|
||
<p>Later on Cody improved the fix to make it look rather more like the original by
|
||
bringing back an extern declaration (slightly changing it to match the symbol
|
||
that it is i.e. <code>extern double floor(double);</code> instead of <code>extern int floor;</code>)
|
||
and also bringing back <code>double (x1, y1) b;</code> and even this funny code that could
|
||
be kept in:</p>
|
||
<pre><code> #define char k['a']
|
||
char x {sizeof(
|
||
double(%s,%D)(*)())</code></pre>
|
||
<p>This does mean that there cannot be a second arg to <code>main()</code>
|
||
as <code>clang</code> requires that to be a <code>char **</code> and the <code>char</code> redefined would not
|
||
allow this. Some versions of <code>clang</code> say that <code>main()</code> must have either 0, 2 or 3
|
||
args but these versions do not object to 1 arg. However as the <code>char</code> macro
|
||
seems more obscure and it is possible that a new version of <code>clang</code> will be even
|
||
more strict the <code>int i</code> parameter in <code>main()</code> was moved to be inside <code>main()</code>,
|
||
set to non-zero (setting <code>i</code> to 0 will not work). This is why <code>main()</code> has zero
|
||
args.</p>
|
||
<p>Observe how on line 29 there is a call to <code>main()</code> which does pass in a
|
||
parameter. It has never been observed to be an error to pass in too many
|
||
parameters to a function (<code>main()</code> or otherwise - it warns with other functions
|
||
but does not appear to with <code>main()</code>) but only that <code>main()</code> itself has a
|
||
certain number of args (in some versions) and that the first arg is an <code>int</code> and
|
||
the others are <code>char **</code>s. This is why the arg was removed and the call to
|
||
<code>main()</code> was not updated beyond what had to be done to fix it for compilers that
|
||
do not support <code>-traditional-cpp</code>.</p>
|
||
<p>If the ANSI C committee or a new version of <code>clang</code> messes this up (both of which
|
||
seem possible) it is easy to fix but it is hoped that this won’t happen.</p>
|
||
<p>Originally <a href="#yusuke">Yusuke</a> supplied a patch so that this entry would compile with <code>gcc</code> -
|
||
but not <code>clang</code> - or at least some versions.</p>
|
||
<p>To see the difference from start to fixed:</p>
|
||
<pre><code> cd 1984/decot ; make diff_orig_prog</code></pre>
|
||
<div id="1984_laman">
|
||
<h2 id="winning-entry-1984laman">Winning entry: <a href="1984/laman/index.html">1984/laman</a></h2>
|
||
<h3 id="winning-entry-source-code-laman.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1984/laman/laman.c">laman.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1984/laman/try.sh">try.sh</a> script.</p>
|
||
<div id="1984_mullender">
|
||
<h2 id="winning-entry-1984mullender">Winning entry: <a href="1984/mullender/index.html">1984/mullender</a></h2>
|
||
<h3 id="winning-entry-source-code-mullender.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1984/mullender/mullender.c">mullender.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> provided an <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1984/mullender/mullender.alt.c">alternate version</a>,
|
||
an improved version of the judges, so that everyone can enjoy it with systems
|
||
that are not VAX/PDP. It moves at approximately the same speed as the original
|
||
did. By using one or more of the other entries that actually let one enjoy this entry as
|
||
originally written, Cody was able to find, with trial and error, approximately
|
||
the correct speed.</p>
|
||
<p>The difference between the original is that it will start over after it times
|
||
out but that might not happen with the original (might need you to press a key
|
||
though this is not known for sure).</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1984/mullender/gentab.c">gentab.c</a> file, fixed to compile
|
||
(and work, though see <a href="bugs.html#1984_mullender">1984/mullender in bugs.html</a>) with modern systems
|
||
and so that it would create the proper array (it had unbalanced <code>}</code>s), which the
|
||
author noted in their remarks (which Cody also found). As this file uses the old
|
||
header file <code>a.out.h</code> that is not available in all modern systems, Cody found a
|
||
copy of it as to what it should have been at the time, in the fabulous <a href="https://github.com/dspinellis/unix-history-repo/tree/Research-Release">Unix
|
||
History
|
||
Repo</a>.</p>
|
||
<div id="1985">
|
||
<h1 id="the-2nd-ioccc"><a href="1985/index.html">1985 - The 2nd IOCCC</a></h1>
|
||
</div>
|
||
<div id="1985_applin">
|
||
<h2 id="winning-entry-1984applin">Winning entry: <a href="1985/applin/index.html">1984/applin</a></h2>
|
||
<h3 id="winning-entry-source-code-applin.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/applin/applin.c">applin.c</a></h3>
|
||
</div>
|
||
<p>Both <a href="#cody">Cody</a> and <a href="#yusuke">Yusuke</a> fixed this; Yusuke got this to not crash and Cody fixed it
|
||
to work with macOS.</p>
|
||
<p>The crash was because it destructively rewrites string literals. However with
|
||
<code>strdup(3)</code> it’s safe.</p>
|
||
<p>The problem with macOS is that although it didn’t crash, it printed <code>H????</code> in a
|
||
seemingly infinite loop, each time printing another <code>?</code>, and it probably would
|
||
have until it ran out of memory.</p>
|
||
<p>The fix for macOS is that there was no prototype for <code>execlp(3)</code> and macOS has
|
||
problems with missing prototypes for some functions (this was also seen when
|
||
Cody fixed <a href="1984/anonymous/index.html">1984/anonymous</a> for macOS as well). As
|
||
this is a one-liner the include of <code>unistd.h</code> was done in the Makefile.
|
||
Ironically this fix was discovered through Linux!</p>
|
||
<p>NOTE: originally this entry did not print a newline prior to returning to the
|
||
shell, after the output (despite having <code>\n</code> in the string - can you figure out
|
||
why?) but to make it more friendly to users Cody made it print a <code>\n</code> prior to
|
||
returning to the shell. The original code does not have this change.</p>
|
||
<div id="1985_august">
|
||
<h2 id="winning-entry-1985august">Winning entry: <a href="1985/august/index.html">1985/august</a></h2>
|
||
<h3 id="winning-entry-source-code-august.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/august/august.c">august.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a>, out of abundance of caution, added a second arg to <code>main()</code> because 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 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 - Why was arg
|
||
count and/or type changed in main() in some older
|
||
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
|
||
to check the output for the first <code>N</code> prime numbers of the output, where <code>N</code> is
|
||
either the default or user specified. The inspiration was the previous <code>try</code>
|
||
command he gave to have fun with finding primes that might seem unusual in a
|
||
way.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/august/try.sh">try.sh</a> script (which runs <code>primes.sh</code>
|
||
whether <code>primes(6)</code> is installed or not, but it only does it once with the
|
||
default value).</p>
|
||
<div id="1985_lycklama">
|
||
<h2 id="winning-entry-1985lycklama">Winning entry: <a href="1985/lycklama/index.html">1985/lycklama</a></h2>
|
||
<h3 id="winning-entry-source-code-lycklama.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/lycklama/lycklama.c">lycklama.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this to compile with modern compilers. In the past one could get away
|
||
with defining some macro to <code>#define</code> and then use <code>#foo</code> to have the same
|
||
effect as using <code>#define</code> but this does not work in modern systems so Cody
|
||
changed the <code>#o</code> lines to <code>#define</code>. Also <code>unistd.h</code> had to be <code>#include</code>d.</p>
|
||
<p><a href="#yusuke">Yusuke</a> provided some useful information that amounts to an alternate version
|
||
that Cody added. See the <a href="1985/lycklama/index.html">index.html</a> for details.</p>
|
||
<p>Cody also provided the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/lycklama/try.alt.sh">try.alt.sh</a> script.</p>
|
||
<div id="1985_shapiro">
|
||
<h2 id="winning-entry-1985shapiro">Winning entry: <a href="1985/shapiro/index.html">1985/shapiro</a></h2>
|
||
<h3 id="winning-entry-source-code-shapiro.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/shapiro/shapiro.c">shapiro.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/shapiro/shapiro.alt.c">alternate code</a>
|
||
which allows one to resize the maze and he also added the
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/shapiro/try.alt.sh">try.alt.sh</a> script that randomly selects
|
||
sizes (five times) and then compiles and runs it. After the five runs it prompts
|
||
you to enter a number, in an infinite loop, exiting if any non-digits are in
|
||
input (this includes negative numbers which in the code actually sets it back to
|
||
39, the default).</p>
|
||
<div id="1985_sicherman">
|
||
<h2 id="winning-entry-1985sicherman">Winning entry: <a href="1985/sicherman/index.html">1985/sicherman</a></h2>
|
||
<h3 id="winning-entry-source-code-1985sicherman">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/sicherman/sicherman.c">1985/sicherman</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this <em>very twisted entry</em> to not require <code>-traditional-cpp</code>. Fixing
|
||
<code>-traditional-cpp</code> is, as noted later on, very complicated, but Cody would like
|
||
to refer you to the original file
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/sicherman/sicherman.orig.c">sicherman.orig.c</a> and he suggests that you
|
||
then compare it to <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/sicherman/sicherman.c">sicherman.c</a> for some good old
|
||
C-fashioned fun (alternatively, see below explanation)!</p>
|
||
<p>Later on Cody improved the fix so that it looks much more like the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/sicherman/sicherman.c">original
|
||
entry</a>. He did this several more times and it’s
|
||
as close to the original as one can get without causing compiler errors.</p>
|
||
<p>To get this to all work the following changes were made. If you really want to
|
||
understand this Cody provides the following. First run the following command
|
||
from the directory:</p>
|
||
<pre><code> make diff_orig_prog</code></pre>
|
||
<p>and then read the following (you might also wish to look at the code in an
|
||
editor with syntax highlighting):</p>
|
||
<ul>
|
||
<li>Because of the macros <code>C</code> and <code>V</code> in the original code, the args to <code>main()</code>
|
||
were actually not what they appear: the only arg that existed in <code>main()</code> was
|
||
<code>Manual</code>. Thus it now looks like:</li>
|
||
</ul>
|
||
<pre><code> main(
|
||
/* C program. (If you don't
|
||
* understand it look it
|
||
* up.) (In the C*/ Manual)
|
||
{</code></pre>
|
||
<ul>
|
||
<li><p>The macros <code>C</code> and <code>V</code> were changed to lower case. This is because it felt
|
||
like the <code>C=" ..</code>’ part in <code>subr()</code> would be better to be upper case as it talks
|
||
about the language. Also in the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/sicherman/sicherman.alt.c">alternate
|
||
version</a> which is in case a new
|
||
version of <code>clang</code> ever objects to only one arg in <code>main()</code> (which is not out of
|
||
the realm of possibility), <code>main()</code>, <code>argc</code> of <code>main()</code> is <code>C</code> so it
|
||
would read like it once did: <code>C manual</code> albeit with a <code>,</code> separating the two.
|
||
The <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/sicherman/sicherman.alt.c">alternate version</a> can be
|
||
compiled in case the first does not. Originally the macros were kept the same
|
||
and the <code>C</code> in <code>subr()</code> was <code>c</code>. It feels better (in some ways) to make it so
|
||
that the <code>C</code> for the language is upper case though, and since it actually
|
||
translated to <code>/**/</code> it can just be <code>c</code>, not <code>C</code>. The <code>V</code> was changed to <code>v</code> to
|
||
be the same case as <code>c</code>.</p></li>
|
||
<li><p>The code:</p></li>
|
||
</ul>
|
||
<pre><code> C="Lint says "argument Manual isn't used." What's that
|
||
mean?"; while (write((read(C_C('"'-'/*"'/*"*/))?__:__-_+
|
||
'\b'b'\b'|((_-52)%('\b'b'\b'+C_C_('\t'b'\n'))+1),1),&_,1));</code></pre>
|
||
<p>had to be changed to:</p>
|
||
<pre><code> C="Lint says \"argument Manual isn't used.\" What's that\
|
||
mean?"; while (write((read(('"'-'/*"'))?__:__-_+
|
||
'\b'b'\b'|((_-52)%('\b'b'\b'+C_C_('\t'b'\n'))+1),1),&_,1));</code></pre>
|
||
<p>because of the missing <code>"</code> at the end of the line and because <code>_|_</code> is not a
|
||
function call.</p>
|
||
<p>The <code>\"</code> had to be done to keep the <code>"</code>s there though the string could be
|
||
broken up into multiple <code>"</code> pairs instead; that seemed less authentic,
|
||
however. Notice how the last line of code in that function is the same as
|
||
before and actually that there aren’t that many changes in the function at
|
||
all!</p>
|
||
<p>Notice also that the parameter <code>C</code> remained the same due to the macro <code>C</code>
|
||
rename to <code>c</code>.</p>
|
||
<p>The <code>char</code>s <code>_</code> and <code>__</code> in <code>main()</code> were copied to file scope so that
|
||
<code>subr()</code> could actually compile but this does not affect the ones in
|
||
<code>main()</code>. Why is this? You tell us!</p>
|
||
<ul>
|
||
<li>The code in <code>main()</code> is where there are significant changes, changing from:</li>
|
||
</ul>
|
||
<pre><code> while (read(0,&__,1) & write((_=(_=C_C_(__),C)),
|
||
_C_,1)) _=C-V+subr(&V);</code></pre>
|
||
<p>to:</p>
|
||
<pre><code> while (read(0,&__,1) & write((_=(_=C_C_(__),
|
||
V))?__:__-_+'\b'b'\b'|((_-52)%('\b'b'\b'+~
|
||
' '&'\t'b'\n')+1),1),&_,1))_=c-v+subr(&v));</code></pre>
|
||
<p>Note how several of the macros (though two changed in case) can still be
|
||
used but some cannot be. Can you figure out why? Why too is it that the
|
||
<code>subr()</code> function is called but it appears that some of the code in that
|
||
function is also in <code>main()</code> in the <code>while</code> condition? What happens if you
|
||
remove it from <code>main()</code>? What happens if you remove it from <code>subr()</code> or
|
||
don’t even bother calling <code>subr()</code>?</p>
|
||
<p><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/sicherman/sicherman.alt.c">Additional code</a> was added in case the fix cannot be compiled by some compilers
|
||
should they object to <code>main()</code> having only one arg.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/sicherman/try.sh">try.sh</a> and
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/sicherman/try.alt.sh">try.alt.sh</a> scripts.</p>
|
||
<div id="1986">
|
||
<h1 id="the-3rd-ioccc"><a href="1986/index.html">1986 - The 3rd IOCCC</a></h1>
|
||
</div>
|
||
<div id="1986_applin">
|
||
<h2 id="winning-entry-1986applin">Winning entry: <a href="1986/applin/index.html">1986/applin</a></h2>
|
||
<h3 id="winning-entry-source-code-applin.c-1">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1986/applin/applin.c">applin.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> made the C file executable so one does not have to do <code>sh ./applin.c</code> or <code>./applin</code>; they can do either <code>./applin.c</code> or <code>./applin</code>.</p>
|
||
<div id="1986_bright">
|
||
<h2 id="winning-entry-1986bright">Winning entry: <a href="1986/bright/index.html">1986/bright</a></h2>
|
||
<h3 id="winning-entry-source-code-bright.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1986/bright/bright.c">bright.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1986/bright/try.sh">try.sh</a> script.</p>
|
||
<div id="1986_hague">
|
||
<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>
|
||
</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
|
||
the libc function gets(3) changed to use
|
||
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
|
||
program the <code>input.txt</code> text file that Cody added.</p>
|
||
<div id="1986_holloway">
|
||
<h2 id="winning-entry-1986holloway">Winning entry: <a href="1986/holloway/index.html">1986/holloway</a></h2>
|
||
<h3 id="winning-entry-source-code-holloway.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1986/holloway/holloway.c">holloway.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this to compile and work with <code>clang</code> (it already worked with <code>gcc</code>).
|
||
The problem was that <code>clang</code> is more strict about the types of args to
|
||
<code>main()</code>. However simply changing the second arg (that <code>clang</code> insists on being
|
||
a <code>char **</code>) to a <code>char **</code> and updating the <code>*s</code> to <code>**s</code>
|
||
caused a segfault. By adding a new variable, <code>char *t</code>, initialising it to <code>s</code>
|
||
and then using <code>t</code> instead of <code>s</code> it compiles and runs successfully under
|
||
<code>clang</code> and <code>gcc</code>.</p>
|
||
<div id="1986_marshall">
|
||
<h2 id="winning-entry-1986marshall">Winning entry: <a href="1986/marshall/index.html">1986/marshall</a></h2>
|
||
<h3 id="winning-entry-source-code-marshall.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1986/marshall/marshall.c">marshall.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> got this to compile and work with <code>clang</code> and <code>gcc</code>. He noted that he tried to
|
||
keep the ASCII art as close to the original as possible. The line lengths are
|
||
the same but some spaces had to be changed to non-spaces.</p>
|
||
<p>This fix was very interesting and quite amusing, showing up problems with two
|
||
different compilers (different problems with different compilers in different
|
||
systems and also depending on optimisation with those compilers in those
|
||
systems).</p>
|
||
<p>Cody gives more details in the <a href="1986/marshall/compilers.html">compilers.html</a>
|
||
file: which compilers had which problems in which systems: the optimiser being
|
||
enabled in one compiler let it work but broke it in the other; and disabling it
|
||
would let it work in the one that didn’t work but suddenly the one that worked
|
||
wouldn’t work. And by ‘not working’ it did not work in more than one way and for
|
||
different platforms it had other problems as well.</p>
|
||
<p>This problem was only after getting <code>clang</code> to compile, of course. It did not
|
||
compile it because it is more strict about the arg types of <code>main()</code> and in this case
|
||
particularly the second and third args to <code>main()</code>, which must be a <code>char **</code>.
|
||
As the third arg was an <code>int</code> the code had to be modified.</p>
|
||
<p>We encourage you to read the <a href="1986/marshall/compilers.html">compilers.html</a> file to
|
||
see how odd this problem was and what Cody did to fix it, if nothing else but
|
||
for entertainment!</p>
|
||
<p>Also, after all warnings but one that could not be silenced were disabled, Cody
|
||
changed the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1986/marshall/marshall.alt.c">alternate code</a> (which was not
|
||
the same as the original - see above for details or try <code>make diff_orig_alt</code> in
|
||
the directory) slightly so that it was possible to silence it. In particular:</p>
|
||
<pre><code> P ( a ) char a ; { a ; while( a > " B "</code></pre>
|
||
<p>which gave:</p>
|
||
<pre><code> marshall.alt.c:13:55: warning: ordered comparison between pointer and integer ('char' and 'char *')
|
||
P ( a ) char a ; { a ; while( a > " B "
|
||
~ ^ ~~~~~~~~
|
||
1 warning generated.</code></pre>
|
||
<p>This was changed to:</p>
|
||
<pre><code> P ( a ) char a ; { a ; while((char *)a > " B "</code></pre>
|
||
<p>which gave:</p>
|
||
<pre><code> marshall.alt.c:13:48: warning: cast to 'char *' from smaller integer type 'char' [-Wint-to-pointer-cast]
|
||
P ( a ) char a ; { a ; while((char *)a > " B "
|
||
^~~~~~~~~
|
||
1 warning generated.</code></pre>
|
||
<p>which can be disabled. It results in the same behaviour but this way no warnings
|
||
are produced.</p>
|
||
<div id="1986_pawka">
|
||
<h2 id="winning-entry-1986pawka">Winning entry: <a href="1986/pawka/index.html">1986/pawka</a></h2>
|
||
<h3 id="winning-entry-source-code-pawka.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1986/pawka/pawka.c">pawka.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> noticed and fixed a funny mistake in the <code>Makefile</code> where a
|
||
<code>-Wno-strict-prototypes</code> was in the wrong location, suggesting that there is a
|
||
<code>-D</code> needed to compile the entry but this is not actually so.</p>
|
||
<div id="1986_stein">
|
||
<h2 id="winning-entry-1986stein">Winning entry: <a href="1986/stein/index.html">1986/stein</a></h2>
|
||
<h3 id="winning-entry-source-code-stein.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1986/stein/stein.c">stein.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> restored the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1986/stein/stein.orig.c">original
|
||
entry</a> which was a single line. The code
|
||
being longer (in 1986 a one liner could be longer) had been split to three lines to
|
||
avoid problems with news and mail but as it is the <strong>Best one liner</strong> the original
|
||
code is now one line.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1986/stein/stein.sh">stein.sh</a> script which runs the two
|
||
commands that we suggest in order to get it to show clean output.</p>
|
||
<div id="1986_wall">
|
||
<h2 id="winning-entry-1986wall">Winning entry: <a href="1986/wall/index.html">1986/wall</a></h2>
|
||
<h3 id="winning-entry-source-code-wall.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1986/wall/wall.c">wall.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this so that it does not require <code>-traditional-cpp</code>. This took a fair
|
||
bit of tinkering as this entry <em>very twisted</em>; fixing <code>-traditional-cpp</code> is, as
|
||
noted later on, very complicated, but we encourage you to look at <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1986/wall/wall.orig.c">original
|
||
code</a>, as well as below, to see how
|
||
different C was in 1986.</p>
|
||
<p><a href="#yusuke">Yusuke</a> originally patched this to use <code>strdup(3)</code> on two strings and this let it
|
||
work with <code>gcc</code> - but it still required <code>-traditional-cpp</code>.</p>
|
||
<p>If you’d like to see the difference between the version that requires
|
||
<code>-traditional-cpp</code> and the fixed version, try:</p>
|
||
<pre><code> cd 1986/wall ; make diff_orig_prog</code></pre>
|
||
<p>Some of the changes required:</p>
|
||
<ul>
|
||
<li>Instead of using the <code>c_</code>, defined as <code>c_(cc)c cc=</code>, like:</li>
|
||
</ul>
|
||
<pre><code> c_(+)o
|
||
|
||
/* ... */
|
||
|
||
:c_(+)' '-1;
|
||
}}c_(&)'z'+5;</code></pre>
|
||
<p>use:</p>
|
||
<pre><code> :c +=o[c&__LINE__-007];
|
||
|
||
/* ... */
|
||
|
||
:c+=' '-1;
|
||
}}c&='z'+5;</code></pre>
|
||
<p>Observe however that this macro is still used in the code like:</p>
|
||
<pre><code> main(;c_(=(*cc);*cc++)c,for);</code></pre>
|
||
<ul>
|
||
<li>Instead of code like:</li>
|
||
</ul>
|
||
<pre><code> main(0xb+(c>>5),C_(s))
|
||
_'\v'
|
||
:__ _'\f':
|
||
main(c,C_(s));</code></pre>
|
||
<p>use instead:</p>
|
||
<pre><code> main(;c_(=(*cc);*cc++)c,for);
|
||
#define _O(s)s
|
||
switch(0xb+(c>>5)){
|
||
_'\v'
|
||
:__ _'\f':
|
||
switch(c){;</code></pre>
|
||
<ul>
|
||
<li>The macro:</li>
|
||
</ul>
|
||
<pre><code> #define C_(sand)_O(sand)witch</code></pre>
|
||
<p>could not be used like:</p>
|
||
<pre><code> C_(s));_</code></pre>
|
||
<p>to create:</p>
|
||
<pre><code> switch);_</code></pre>
|
||
<p>and neither could the macro:</p>
|
||
<pre><code> #define O_(O)_O(O)stem(ccc(</code></pre>
|
||
<p>be used like:</p>
|
||
<pre><code> :O_(sy)";kkt -oa, dijszdijs QQ"))_C</code></pre>
|
||
<p>to create:</p>
|
||
<pre><code> :system(ccc(";kkt -oa, dijszdijs QQ"));return</code></pre>
|
||
<ul>
|
||
<li>And of course as noted two strings had to be <code>strdup()</code>d.</li>
|
||
</ul>
|
||
<p>There might have been other changes as well.</p>
|
||
<div id="1987">
|
||
<h1 id="the-4th-ioccc"><a href="1987/index.html">1987 - The 4th IOCCC</a></h1>
|
||
</div>
|
||
<div id="1987_biggar">
|
||
<h2 id="winning-entry-1987biggar">Winning entry: <a href="1987/biggar/index.html">1987/biggar</a></h2>
|
||
<h3 id="winning-entry-source-code-biggar.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1987/biggar/biggar.c">biggar.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1987/biggar/try.sh">try.sh</a> script.</p>
|
||
<div id="1987_heckbert">
|
||
<h2 id="winning-entry-1987heckbert">Winning entry: <a href="1987/heckbert/index.html">1987/heckbert</a></h2>
|
||
<h3 id="winning-entry-source-code-heckbert.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1987/heckbert/heckbert.c">heckbert.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> made this look more like the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1987/heckbert/heckbert.orig.c">original
|
||
entry</a> by restoring the <code>#define _ define</code>. It’s not used but it now looks closer to the original.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1987/heckbert/try.sh">try.sh</a> script which shows how the
|
||
program works but also how the folded code can recreate the original.</p>
|
||
<p>Also because <code>index(3)</code> is deprecated and in some systems requires the inclusion
|
||
of <code>strings.h</code> and because it’s identical in use to <code>strchr(3)</code> (and we noted
|
||
that for System V we had to do this) Cody added to the Makefile
|
||
<code>-Dindex=strchr</code>.</p>
|
||
<div id="1987_hines">
|
||
<h2 id="winning-entry-1987hines">Winning entry: <a href="1987/hines/index.html">1987/hines</a></h2>
|
||
<h3 id="winning-entry-source-code-hines.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1987/hines/hines.c">hines.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1987/hines/try.sh">try.sh</a> script, the C file
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1987/hines/goto.c">goto.c</a> and the text file <a href="1987/hines/goto.txt">goto.txt</a>
|
||
for demonstration purposes. Notice that the program is case sensitive which
|
||
running the program on the text file demonstrates.</p>
|
||
<div id="1987_lievaart">
|
||
<h2 id="winning-entry-1987lievaart">Winning entry: <a href="1987/lievaart/index.html">1987/lievaart</a></h2>
|
||
<h3 id="winning-entry-source-code-lievaart.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1987/lievaart/lievaart.c">lievaart.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added back the documented checks for invalid input which no longer worked
|
||
and instead resulted in accepting the level, whether or not it was a
|
||
number or out of range (see below on range). For the move it entered an infinite
|
||
loop, prompting the player with <code>"You:"</code> but not letting the player input
|
||
anything so that the screen was flooded and the game could not be played.</p>
|
||
<p>For both the level and move it did a <code>scanf()</code> with a <code>%d</code> specifier but this
|
||
resulted in, if invalid input, either proceeding (for the level), presumably
|
||
incorrectly done as it might not even be a number (see below) or printing
|
||
<code>"You:"</code> in an infinite loop, expecting input again but not letting the player
|
||
input anything, both as noted above.</p>
|
||
<p>The fix is that now the specifier is a <code>%2s</code> for a <code>char A[100]</code> (yes 100 is
|
||
overkill; there’s no good reason for it here: it was just arbitrarily selected).</p>
|
||
<p>For the level if <code>atoi(A)>10||<0</code> (see next part) or <code>!isdigit(*A)</code> it goes back
|
||
and prompts again. The level is checked for <code>>=0||<=10</code>, perhaps incorrectly or
|
||
perhaps not, because in the code that variable is checked for <code><10</code> and if that
|
||
is the case it is incremented by 2. Cody does not know the rules of the game and
|
||
neither does he know what the author had in mind so he chosen 10 as the maximum.</p>
|
||
<p>As for the move the <code>do..while</code> loop works properly now that it does it in two
|
||
steps (<code>scanf("%2s", A); m=atoi(A);</code>) so there’s no need to check the value
|
||
explicitly, again. Thus it will prompt until valid input is entered, but only
|
||
showing <code>"You:"</code> once per prompting.</p>
|
||
<p>In the case of the level prior to prompting for the level it does a <code>*A='\0';</code>
|
||
and in the case of the move it does it after the <code>m=atoi(A);</code>. This is done this
|
||
way because the check for the value of the level (<code>atoi(A)</code>) is done in the
|
||
<code>if()</code> that also checks for a digit (though it does <code>(u=atoi(A))>10||u<0</code> first,
|
||
thus checking the level, and <code>|| !isdigit(*A)</code>). Of course since <code>-</code> is not a
|
||
digit the <code><0</code> is superfluous but it’s done anyway. If that <code>if</code> is 1 then it
|
||
immediately goes back to the prompting of the level.</p>
|
||
<p>But for the move it can happen after due to the fact the condition of the
|
||
<code>do..while</code> loop will take care of things.</p>
|
||
<p>Cody also made this ever so slightly like the original code by adding back the
|
||
<code>#define D define</code> even though it’s unused. This was done for both versions as
|
||
well (the one with the board and the one without, the entry itself with the
|
||
size constraints of the contest).</p>
|
||
<div id="1987_wall">
|
||
<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>
|
||
</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
|
||
the libc function gets(3) changed to use
|
||
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>
|
||
<div id="1987_westley">
|
||
<h2 id="winning-entry-1987westley">Winning entry: <a href="1987/westley/index.html">1987/westley</a></h2>
|
||
<h3 id="winning-entry-source-code-westley.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1987/westley/westley.c">westley.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this for modern systems. The problem was <code>'assignment to cast is illegal, lvalue casts are not supported'</code>. For details on the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1987/westley/westley.orig.c">original
|
||
code</a> see the
|
||
<a href="1987/westley/index.html">index.html</a> file. Unfortunately this fix ruins some symmetry.</p>
|
||
<p>To try and resolve this as much as possible at first code was commented out but
|
||
later on the commented out code was removed and another part changed so that,
|
||
although it has some code no longer there, it has a closer match in symmetry and
|
||
since the code was commented out it’s probably not a big deal to have it removed
|
||
instead as it does look more symmetrical now.</p>
|
||
<p>Cody also added to the <code>Makefile</code> <code>-include stdio.h</code> in the nowadays very
|
||
unlikely(?) but nevertheless suggested case that <code>putchar(3)</code> is not available.</p>
|
||
<div id="1988">
|
||
<h1 id="the-5th-ioccc"><a href="1988/index.html">1988 - The 5th IOCCC</a></h1>
|
||
</div>
|
||
<div id="1988_dale">
|
||
<h2 id="winning-entry-1988dale">Winning entry: <a href="1988/dale/index.html">1988/dale</a></h2>
|
||
<h3 id="winning-entry-source-code-dale.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1988/dale/dale.c">dale.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this twisted entry (as we called it :-) ) for modern compilers,
|
||
including making it no longer require <code>-traditional-cpp</code>. Fixing
|
||
<code>-traditional-cpp</code> is, as noted later on, very complicated, but we encourage you
|
||
to compare the fix from the original entry. There was another problem to resolve
|
||
as well, however.</p>
|
||
<p>First of all, as noted above, the entry required <code>-traditional-cpp</code> (which
|
||
<code>clang</code> does not support). It needed that option in modern systems because of
|
||
two things it did:</p>
|
||
<pre><code> #define a(x)get/***/x/***/id())
|
||
|
||
/* ... */
|
||
|
||
p Z=chroot("/");L(!a(u)execv((q(v="/ipu6ljov"),v),C);Z-=kill(l);
|
||
|
||
/* ... */
|
||
|
||
case_2:L(!--V){O/*/*/c*c+c);wait(A+c*c-c);L(!Z)f(A,"\n",c);return(A*getgid());};C++;</code></pre>
|
||
<p>This macro, <code>a</code>, formed the function names <code>getuid()</code> and <code>getgid()</code>, but
|
||
this no longer works. The code still uses the macro <code>a</code> to form the names but
|
||
it’s done differently, using the C token paste operator <code>##</code>. It’s done like
|
||
this:</p>
|
||
<pre><code> --- i/1988/dale/dale.c
|
||
+++ w/1988/dale/dale.c
|
||
@@ -9,18 +9,18 @@
|
||
#define L if
|
||
#define I goto
|
||
#define l 1
|
||
#define f write
|
||
#define J else
|
||
-#define a(x)get/***/x/***/id())
|
||
+#define a(x)get##x##id())</code></pre>
|
||
<p>The second is that</p>
|
||
<pre><code> for/*/(;;);/*/k()){O/*/*/c);</code></pre>
|
||
<p>cannot form <code>fork())</code> in modern C compilers. Since it was not done through a
|
||
macro it was simply changed to be <code>fork()</code>, rather than adding a new macro.</p>
|
||
<p>The other problem that could not be resolved by the <code>-traditional-cpp</code> was that
|
||
modern compilers do not allow directives like:</p>
|
||
<pre><code> #define _ define
|
||
#_ P char
|
||
#_ p int
|
||
#_ O close(
|
||
/* ... */</code></pre>
|
||
<p>so Cody changed the lines to be in the form of:</p>
|
||
<pre><code> #define P char
|
||
#define p int
|
||
#define O close(
|
||
/* ... */</code></pre>
|
||
<p>However, to keep the entry as close to as possible in look, Cody kept the <code>_</code>
|
||
macro in place but it’s no longer used.</p>
|
||
<p>Cody also provided the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1988/dale/try.sh">try.sh</a> script.</p>
|
||
<div id="1988_isaak">
|
||
<h2 id="winning-entry-1988isaak">Winning entry: <a href="1988/isaak/index.html">1988/isaak</a></h2>
|
||
<h3 id="winning-entry-source-code-isaak.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1988/isaak/isaak.c">isaak.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this to work for modern systems. The problem was that the important
|
||
function, a redefinition of <code>exit(3)</code>, was not being called in <code>main()</code>. Earlier
|
||
fixes that let it compile, but not work with modern systems, can be found in
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1988/isaak/isaak.alt.c">isaak.alt.c</a>. See the
|
||
index.html file for more details.</p>
|
||
<p>Cody also uudecoded and removed the file <code>isaak.encode</code>, putting the output in
|
||
<code>isaak.output.txt</code>. This was done strictly for historical remarks that can be
|
||
found in the index.html file.</p>
|
||
<div id="1988_litmaath">
|
||
<h2 id="winning-entry-1988litmaath">Winning entry: <a href="1988/litmaath/index.html">1988/litmaath</a></h2>
|
||
<h3 id="winning-entry-source-code-litmaath.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1988/litmaath/litmaath.c">litmaath.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1988/litmaath/litmaath.alt.c">alternate code</a>
|
||
which is code that we suggested at the time of publication, in the remarks, to
|
||
help understand the entry, and for fun.</p>
|
||
<div id="1988_phillipps">
|
||
<h2 id="winning-entry-1988phillipps">Winning entry: <a href="1988/phillipps/index.html">1988/phillipps</a></h2>
|
||
<h3 id="winning-entry-source-code-phillipps.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1988/phillipps/phillipps.c">phillipps.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this for modern systems. It did not compile with <code>clang</code> because it
|
||
requires the second and third args of <code>main()</code> to be <code>char **</code> but even before
|
||
that with <code>gcc</code> it printed garbage and then crashed.</p>
|
||
<p>After fixing it for <code>clang</code> by changing the <strong>very recursive</strong> <code>main()</code> (<strong>it called
|
||
itself up to <em>12</em> times!</strong>) to call the new function <code>pain()</code> (named such because it’s a
|
||
pain that <code>clang</code> requires these args to be <code>char **</code> :-) ), which is just as
|
||
recursive, with the correct args, it now works with both <code>gcc</code> and <code>clang</code>.</p>
|
||
<p>To make it look as close to the original as possible, Cody made it K&R style
|
||
functions and tried to match the format as best as possible of what
|
||
<code>main()</code> used to look like but without the full body as that cannot exist as it
|
||
once did; instead, the format of <code>pain()</code> is exactly like how <code>main()</code> was as it’s the
|
||
same code, just a <code>p</code> instead of an <code>m</code> in the name. Additionally, <code>main()</code> returns
|
||
<code>!pain(...)</code> like <code>main()</code> used to do to itself (<code>pain()</code> does as well).</p>
|
||
<div id="1988_reddy">
|
||
<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>
|
||
</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
|
||
the libc function gets(3) changed to use
|
||
fgets(3)?</a> for why this was done.</p>
|
||
<div id="1988_spinellis">
|
||
<h2 id="winning-entry-1988spinellis">Winning entry: <a href="1988/spinellis/index.html">1988/spinellis</a></h2>
|
||
<h3 id="winning-entry-source-code-spinellis.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1988/spinellis/spinellis.c">spinellis.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> provided an <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1988/spinellis/spinellis.alt.c">alternate version</a> so that
|
||
this will work with compilers like <code>clang</code>. An alternate version had to be
|
||
provided because not doing so would be tampering with the entry too much. It
|
||
would work but it would not show the same creativity and cleverness.</p>
|
||
<p>The original entry exploits a fun mis-feature that works with <code>gcc</code> but not <code>clang</code>.
|
||
This resulted in a change of rules which is another reason to not modify the
|
||
original. See the index.html file for details on the alternate code.</p>
|
||
<p>Meanwhile Cody was twisted enough to point out (though to be fair he felt sick
|
||
doing this) that with a slight modification this entry can be C++ instead. We don’t
|
||
thank him for this ghastly point! :-)</p>
|
||
<div id="1988_westley">
|
||
<h2 id="winning-entry-1988westley">Winning entry: <a href="1988/westley/index.html">1988/westley</a></h2>
|
||
<h3 id="winning-entry-source-code-westley.c-1">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1988/westley/westley.c">westley.c</a></h3>
|
||
</div>
|
||
<p>The <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1988/westley/westley.alt.c">original version</a>, provided as alternate code,
|
||
was fixed by Misha Dynin, based on the judges’ remarks, so that this would work
|
||
with modern C compilers. We encourage you to try the alternate version to see
|
||
what happens with current compilers! See the index.html files for details.</p>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1988/westley/try.sh">try.sh</a> script to show the magic of the
|
||
entry as seeing the code with the result at once is far more beautiful.</p>
|
||
<p>Cody also changed the <code>int</code>s to be <code>float</code> as that’s what they are printed as:
|
||
not strictly necessary but nonetheless more correct, even if not warned against.</p>
|
||
<div id="1989">
|
||
<h1 id="the-6th-ioccc"><a href="1989/index.html">1989 - The 6th IOCCC</a></h1>
|
||
</div>
|
||
<div id="1989_fubar">
|
||
<h2 id="winning-entry-1989fubar">Winning entry: <a href="1989/fubar/index.html">1989/fubar</a></h2>
|
||
<h3 id="winning-entry-source-code-fubar.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/fubar/fubar.c">fubar.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> got this to work with modern systems. The main issues were that an
|
||
<code>#include</code> had to be added along with fixing the path (due to <code>.</code> not being in
|
||
<code>$PATH</code>) to files referred to in the code. The path problem was also fixed in
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/fubar/fubar.sh">fubar.sh</a>.</p>
|
||
<p>A strange problem occurred where if one made modifications to the C file it
|
||
might end up failing to work even after changing it back. This was resolved by:</p>
|
||
<pre><code> --- i/1989/fubar/fubar.sh
|
||
+++ w/1989/fubar/fubar.sh
|
||
@@ -7,13 +7,12 @@ if [[ $# -ne 1 ]]; then
|
||
exit 1
|
||
fi
|
||
|
||
# run/compile it
|
||
rm -f ouroboros.c x1 x
|
||
-ex - <<EOF
|
||
-r fubar.c
|
||
+ex fubar.c <<EOF
|
||
8,9j
|
||
w ouroboros.c
|
||
EOF
|
||
chmod +x ouroboros.c</code></pre>
|
||
<p>Cody also ‘modernised’ the script to use <code>bash</code> and fixed for ShellCheck. The
|
||
<code>if [ .. ]</code> was changed in the C code as well as the script.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/fubar/try.sh">try.sh</a> script.</p>
|
||
<div id="1989_jar.1">
|
||
<h2 id="winning-entry-1989jar.1">Winning entry: <a href="1989/jar.1/index.html">1989/jar.1</a></h2>
|
||
<h3 id="winning-entry-source-code-jar.1.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/jar.1/jar.1.c">jar.1.c</a></h3>
|
||
</div>
|
||
<p>To prevent annoying output to <code>/dev/tty</code> we changed the code to simulate the
|
||
output via <code>strings(1)</code> but <a href="#cody">Cody</a> removed the ill-famed <code>useless use of cat</code> to
|
||
shut <a href="https://github.com/koalaman/shellcheck">ShellCheck</a> up.
|
||
Why is it ill-famed? Because there is no such thing as a
|
||
useless cat, that’s why! For instance, the fact they even exist is proof that
|
||
the Earth is <strong>NOT</strong> flat: because if it was they would have pushed everything
|
||
off it by now! :-) They’re also a great joy to all ailurophiles and yes they
|
||
most certainly do have a personality and they can be very sociable.</p>
|
||
<p>Whilst he was at it, Cody made it so that one need not run the alt script or
|
||
alternate code directly, to match that of the main entry. As we simulate the
|
||
functionality anyway, and since one may still run the code or the script (for
|
||
the original entry and the alternate code) anyway, it works out well.</p>
|
||
<div id="1989_jar.2">
|
||
<h2 id="winning-entry-1989jar.2">Winning entry: <a href="1989/jar.2/index.html">1989/jar.2</a></h2>
|
||
<h3 id="winning-entry-source-code-jar.2.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/jar.2/jar.2.c">jar.2.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this to work with modern compilers. Modern compilers do not allow
|
||
code like:</p>
|
||
<pre><code> #define d define
|
||
#define a include
|
||
|
||
#d foo bar
|
||
#a <stdio.h></code></pre>
|
||
<p>Cody notes that there <em>is</em> a way to get it (or something close to it) to work. Do
|
||
you know how?</p>
|
||
<p>The old <code>#define</code>s are left in to make it look like the original as much as
|
||
possible but they are not used.</p>
|
||
<p>Cody also provided the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/jar.2/try.sh">try.sh</a> script and the
|
||
supplementary files <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/jar.2/try.lisp">try.lisp</a>,
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/jar.2/fib.lisp">fib.lisp</a> and
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/jar.2/chocolate_cake.lisp">chocolate_cake.lisp</a>. The
|
||
<code>try.lisp</code> comes from the author and the <code>fib.lisp</code> comes from
|
||
<a href="#yusuke">Yusuke</a>. Cody wrote the script and offered us some chocolate cake :-)
|
||
See index.html for details on how to use the script.</p>
|
||
<p>Cody also fixed the <code>Makefile</code> where typing <code>make everything</code> or <code>make alt</code> would
|
||
result in:</p>
|
||
<pre><code> `clang`: error: no such file or directory: 'data'
|
||
`clang`: error: no input files
|
||
make: *** [Makefile:143: alt] Error 1
|
||
|
||
shell returned 2</code></pre>
|
||
<p>because the <code>alt</code> rule had what normally is in the <code>${PROG}.alt</code> rule.</p>
|
||
<div id="1989_ovdluhe">
|
||
<h2 id="winning-entry-1989ovdluhe">Winning entry: <a href="1989/ovdluhe/index.html">1989/ovdluhe</a></h2>
|
||
<h3 id="winning-entry-source-code-ovdluhe.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/ovdluhe/ovdluhe.c">ovdluhe.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed an infinite loop where the program would print the same thing over
|
||
and over again, flooding the screen. The problem is that there was a <code>for</code> loop
|
||
that by necessity had to not have an increment stage but the pointer only got
|
||
updated in the <code>if</code> path (in the loop itself).</p>
|
||
<p>Cody also provided the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/ovdluhe/try.sh">try.sh</a> script which runs the
|
||
program four times on three files to show the different output. It doesn’t run
|
||
the program on each file four times in a row but rather does it on each file
|
||
and starts over, doing it four times, to help with hopefully allowing different
|
||
output.</p>
|
||
<p>Cody also provided an <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/ovdluhe/ovdluhe.alt.c">alternate version</a> based on
|
||
the author’s remarks and the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/ovdluhe/try.alt.sh">try.alt.sh</a> script that
|
||
uses the alternate code, allowing one to configure the alt build. See the index.html
|
||
for details. The fix described above was fixed in this version too, after it was
|
||
discovered and fixed.</p>
|
||
<div id="1989_paul">
|
||
<h2 id="winning-entry-1989paul">Winning entry: <a href="1989/paul/index.html">1989/paul</a></h2>
|
||
<h3 id="winning-entry-source-code-paul.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/paul/paul.c">paul.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed a segfault under macOS that prevented it from working. The problem
|
||
was that the int (from <code>#define f</code>) should be a <code>long</code>. This became apparent when
|
||
he was using lldb and saw that the type of a pointer was too <code>long</code> :-)</p>
|
||
<p>Cody also provided the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/paul/paul.alt.c">alternate version</a>
|
||
which has the trace function that the author included but commented out. See the
|
||
index.html for details.</p>
|
||
<div id="1989_robison">
|
||
<h2 id="winning-entry-1989robison">Winning entry: <a href="1989/robison/index.html">1989/robison</a></h2>
|
||
<h3 id="winning-entry-source-code-robison.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/robison/robison.c">robison.c</a></h3>
|
||
</div>
|
||
<p><a href="#yusuke">Yusuke Endoh</a> fixed this to compile under modern systems. To see the changes
|
||
made, try:</p>
|
||
<pre><code> cd 1989/robison ; make diff_orig_prog</code></pre>
|
||
<p>(It adds the C token pasting operator <code>##</code> instead of <code>/**/</code>.)</p>
|
||
<p>Cody added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/robison/try.sh">try.sh</a> script.</p>
|
||
<div id="1989_tromp">
|
||
<h2 id="winning-entry-1989tromp">Winning entry: <a href="1989/tromp/index.html">1989/tromp</a></h2>
|
||
<h3 id="winning-entry-source-code-tromp.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/tromp/tromp.c">tromp.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> and <a href="#yusuke">Yusuke</a> fixed this entry: Yusuke fixed this to compile with <code>gcc</code> and Cody
|
||
fixed it for <code>clang</code> and made some other fixes as well.</p>
|
||
<p>To get it to work with <code>clang</code> the variable <code>a</code> had to not be the third argument
|
||
to <code>main()</code> but instead be a variable in <code>main()</code>.</p>
|
||
<p>Cody also fixed a segfault and made it so the that the high score file would
|
||
work (it was not even being created but it was supposed to be). This was
|
||
happening due to a file pointer being declared as a <code>long</code> and more
|
||
significantly the command in <code>popen(3)</code> was not correct.</p>
|
||
<p>Another problem Cody fixed was that the terminal was left in an insane state where you
|
||
could not type ‘<code>u</code>’ and echo was completely disabled.</p>
|
||
<p>Cody later on fixed the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/tromp/tromp.alt.c">alt version</a>, provided by the author, so that it would
|
||
compile with <code>clang</code>, not abort (with an alarm), would have the tetriminos fall,
|
||
it would write to the high score file (the command to <code>popen(3)</code> was incorrect
|
||
here too but as can be seen it differs from the submitted version), could use
|
||
<code>stty</code> properly (and thus turn on echo again - it did not work because it was in
|
||
the <code>popen(3)</code> call rather than using <code>system(3)</code>), a couple compiler errors and
|
||
various other things, so that now the alt version, which is better, can be used.</p>
|
||
<p>Although we appreciate the help here, he cynically noted that he had to have an
|
||
IOCCC <a href="https://en.wikipedia.org/wiki/Tetris">Tetris</a> working (this of course was
|
||
not his only reason :-) )</p>
|
||
<div id="1989_vanb">
|
||
<h2 id="winning-entry-1989vanb">Winning entry: <a href="1989/vanb/index.html">1989/vanb</a></h2>
|
||
<h3 id="winning-entry-source-code-vanb.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/vanb/vanb.c">vanb.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/vanb/try.sh">try.sh</a> script.</p>
|
||
<div id="1989_westley">
|
||
<h2 id="winning-entry-1989westley">Winning entry: <a href="1989/westley/index.html">1989/westley</a></h2>
|
||
<h3 id="winning-entry-source-code-westley.c-2">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/westley/westley.c">westley.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this for <code>clang</code>, except that two versions generated by the
|
||
program cannot be compiled by <code>clang</code> due to inherent defects in the compiler
|
||
and how the entry works. This is an <strong>incredibly hard</strong> one to fix for <code>clang</code>
|
||
whilst still being compilable with <code>gcc</code> (<code>gcc</code> can compile every generated
|
||
version with the fix but if one fixes all to compile with <code>clang</code>, which was
|
||
attempted, it introduced compile errors for <code>gcc</code>) and even if one fixes it to
|
||
compile with <code>clang</code> it does not, depending on how it’s done, mean that any
|
||
other version will compile!</p>
|
||
<p>It is, however, possible to get <code>clang</code> to work with
|
||
two versions generated, <code>ver0</code> and <code>ver1</code>, though <code>ver0</code> is actually just the
|
||
main entry (but still generated by the program itself).</p>
|
||
<p>Unfortunately due to the way this entry works if it is even possible to get all
|
||
versions to compile with <code>clang</code> it will take heavy modifications to get all
|
||
versions to compile with <code>clang</code>. Cody almost got it and knows how it functions
|
||
but even getting it just about there caused compilation errors in <code>gcc</code> so it
|
||
might just not be possible.</p>
|
||
<p>The way it was fixed might be hard to see and describe but this is an attempt.
|
||
Because <code>main()</code>’s args were all <code>int</code>s, <code>main()</code> had to call a new function
|
||
which is allowed to have args as <code>int</code> (instead of <code>main()</code>’s args being <code>int</code> and
|
||
the rest being <code>char **</code>) but this is not as straight forward as it is for other
|
||
entries (if you look at the code you might see what is meant; the function called
|
||
is <code>pain()</code>).</p>
|
||
<p>The args of <code>main()</code> had to be set to the right type but only three args, <strong>not
|
||
four</strong>, even though the original program has four args. This is because not all
|
||
versions of <code>clang</code> support four args and that is one of the issues with version 2
|
||
and 3 as it generates <code>main()</code> to have four args and the wrong type, all <code>int</code>s.</p>
|
||
<p>In the call to the new function, <code>pain()</code>, from <code>main()</code>, one of the <code>char **</code>s
|
||
is used twice, once as <code>argc</code> with bitwise AND with 2, naturally first being
|
||
cast to an <code>int</code> (<code>(int)ABBA&2</code>), and once as a <code>char **</code>, the fourth arg to
|
||
<code>pain()</code> (yes even though <code>pain()</code> takes all <code>int</code>s).</p>
|
||
<p>The argc, meanwhile, <code>tang</code>, is used once and the second arg, <code>char **gnat</code> is
|
||
used once (observe how <code>tang</code> is <code>gnat</code> spelt backwards as this is one of the
|
||
things that makes this a masterpiece and very hard if not impossible to fix
|
||
completely). Fortunately it is not actually necessary to use all four args (of
|
||
<code>main()</code>) in the call which might or might not be surprising, especially as it
|
||
uses one of the args, a <code>char **</code>, instead of an <code>int</code> (through casts), twice
|
||
rather than just passing in for the fourth arg (the fourth arg passed in is the
|
||
third arg to <code>main()</code>).</p>
|
||
<p>This program heavily uses recursion and depending on the number of args it will
|
||
print out output normally, ROT13 it, show it backwards or both. Along with the
|
||
ROT13 and reversed output of the code, it is the <strong>comments that create the
|
||
names and the rest of the code!</strong>: sometimes it is the word backwards, other
|
||
times it is the ROT13 of it and other times it is both, both for comments and
|
||
otherwise. Trying to change comments can be very difficult though it was done
|
||
when <code>clang</code> could almost compile every version if not actually compile all
|
||
versions. Unfortunately when this was done it caused other systems to have
|
||
additional compilation errors so it seems highly unlikely that version 2 and 3
|
||
can work for <code>clang</code> (versions 0 and 1 can).</p>
|
||
<p>Despite the risks of changing names this was done and indeed by necessity.
|
||
Comments might have been changed but it is no longer known if that happened only
|
||
in the working on version 2 and 3 or if in the fix for <code>clang</code> as well as version
|
||
0 and 1.</p>
|
||
<p>To make use of this several scripts were added by Cody. The
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/westley/compile.sh">compile.sh</a> script that removes the
|
||
generated code, rebuilds the program and regenerates the other code and then
|
||
compiles it will work for compilers like <code>gcc</code> and one can then use the
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/westley/try.sh">try.sh</a> script to see example input and
|
||
output.</p>
|
||
<p>The <code>compile.sh</code> script allows one to specify the compiler with the <code>CC</code>
|
||
environmental variable; see the index.html for details.</p>
|
||
<div id="1990">
|
||
<h1 id="the-7th-ioccc"><a href="1990/index.html">1990 - The 7th IOCCC</a></h1>
|
||
</div>
|
||
<div id="1990_baruch">
|
||
<h2 id="winning-entry-1990baruch">Winning entry: <a href="1990/baruch/index.html">1990/baruch</a></h2>
|
||
<h3 id="winning-entry-source-code-baruch.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/baruch/baruch.c">baruch.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/baruch/try.sh">try.sh</a> script.</p>
|
||
<p>Cody also added an <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/baruch/baruch.alt.c">alternate version</a>, which allows Turbo-C
|
||
and MSC to compile this code, based on the authors’ remarks, except that Cody
|
||
did not change the <code>" #Q"</code> string as that appeared to show worse looking output
|
||
instead of improved output though he has no way to test the compilers in
|
||
question (i.e. it was only tested in the original entry). YMMV.</p>
|
||
<p>Cody also made the code look more like the original, removing the <code>int</code> from
|
||
the variables, adding instead <code>-Wno-implicit-int</code>. The newline added by the
|
||
judges was retained.</p>
|
||
<div id="1990_cmills">
|
||
<h2 id="winning-entry-1990cmills">Winning entry: <a href="1990/cmills/index.html">1990/cmills</a></h2>
|
||
<h3 id="winning-entry-source-code-cmills.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/cmills/cmills.c">cmills.c</a></h3>
|
||
</div>
|
||
<p><a href="#yusuke">Yusuke</a> got this to work in modern systems (it previously resulted in a bus
|
||
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
|
||
the libc function gets(3) changed to use
|
||
fgets(3)?</a> for why this was done.</p>
|
||
<div id="1990_dds">
|
||
<h2 id="winning-entry-1990dds">Winning entry: <a href="1990/dds/index.html">1990/dds</a></h2>
|
||
<h3 id="winning-entry-source-code-dds.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/dds/dds.c">dds.c</a></h3>
|
||
</div>
|
||
<p><a href="#yusuke">Yusuke</a> and <a href="#cody">Cody</a> in conjunction fixed this for modern systems (both fixed a
|
||
different compiler error but more fixes were also made).</p>
|
||
<p>Yusuke added the comma operator for a binary expression with <code>free(3)</code> which is
|
||
a compiler error because <code>free(3)</code> returns <code>void</code>. Cody then made it slightly
|
||
more like the original in this way by redefining <code>free</code> to have the comma
|
||
operator itself.</p>
|
||
<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>
|
||
<p>Cody also made this use <code>fgets(3)</code>. See <a href="faq.html#faq4_1">FAQ 4.1 - Why were some calls to
|
||
the libc function gets(3) changed to use
|
||
fgets(3)?</a> for why this was done.</p>
|
||
<div id="1990_dg">
|
||
<h2 id="winning-entry-1990dg">Winning entry: <a href="1990/dg/index.html">1990/dg</a></h2>
|
||
<h3 id="winning-entry-source-code-dg.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/dg/dg.c">dg.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this for modern systems. There were two problems to be resolved.</p>
|
||
<p>One can no longer do:</p>
|
||
<pre><code> #define d define
|
||
|
||
#d b12(x) 12 x
|
||
|
||
/* etc. */</code></pre>
|
||
<p>so the use of <code>#d</code> is now instead <code>#define</code> (the macro was originally deleted
|
||
but later Cody added it back to make it more like the original).</p>
|
||
<p>The second problem was suggested by the judges at the time of judging, to do
|
||
with if the C preprocessor botches single quotes in <code>cpp</code> expansion.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/dg/try.sh">try.sh</a> script.</p>
|
||
<div id="1990_jaw">
|
||
<h2 id="winning-entry-1990jaw">Winning entry: <a href="1990/jaw/index.html">1990/jaw</a></h2>
|
||
<h3 id="winning-entry-source-code-jaw.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/jaw/jaw.c">jaw.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed the script to work properly in modern environments including writing
|
||
to and extracting from <code>stdout</code> and relying on the exit code in the commands to
|
||
allow for <code>&& ...</code>.</p>
|
||
<p>Cody also changed the <code>perror(3)</code> call to <code>fprintf(3)</code> because in macOS when errno
|
||
is 0 it shows what looks like an error. However, see <a href="bugs.html#1990_jaw">1990/jaw in
|
||
bugs.html</a>.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/jaw/try.sh">try.sh</a> to run the commands that we suggested at
|
||
the time of releasing the winning entries of 1990.</p>
|
||
<p>NOTE: as <code>btoa</code> is not common we used a ruby script from <a href="#yusuke">Yusuke</a> but with a minor
|
||
fix applied by Cody that made the program just show <code>oops</code> twice (twice is not
|
||
a typo here) from invalid input but which now works.</p>
|
||
<div id="1990_pjr">
|
||
<h2 id="winning-entry-1990pjr">Winning entry: <a href="1990/pjr/index.html">1990/pjr</a></h2>
|
||
<h3 id="winning-entry-source-code-pjr.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/pjr/pjr.c">pjr.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/pjr/pjr.alt.c">alternate code</a> which was suggested by the judges
|
||
in the case that your compiler cannot compile <code>X=g()...</code> but it actually does
|
||
something else and is recommended by the author as well.</p>
|
||
<div id="1990_scjones">
|
||
<h2 id="winning-entry-1990scjones">Winning entry: <a href="1990/scjones/index.html">1990/scjones</a></h2>
|
||
<h3 id="winning-entry-source-code-scjones.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/scjones/scjones.c">scjones.c</a></h3>
|
||
</div>
|
||
<p><a href="#yusuke">Yusuke</a> suggested <code>-ansi</code> to get the entry to compile due to trigraphs and <a href="#cody">Cody</a>
|
||
suggested <code>-trigraphs</code>. Both work but we used Yusuke’s idea as this was seen
|
||
first.</p>
|
||
<p>Cody added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/scjones/try.sh">try.sh</a> script to show exactly what the
|
||
entry does.</p>
|
||
<div id="1990_tbr">
|
||
<h2 id="winning-entry-1990tbr">Winning entry: <a href="1990/tbr/index.html">1990/tbr</a></h2>
|
||
<h3 id="winning-entry-source-code-tbr.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/tbr/tbr.c">tbr.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this to work with modern compilers; <code>exit(3)</code> returns <code>void</code> but the
|
||
function was used in a binary expression so this wouldn’t even compile.</p>
|
||
<p>Cody fixed (as above) and added the shortened version as <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/tbr/tbr.alt.c">alternate
|
||
code</a> which originally comes from the
|
||
author.</p>
|
||
<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
|
||
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
|
||
- Why were some calls to the libc function gets(3) changed to use
|
||
fgets(3)?</a> for more details on why this change was
|
||
done more generally.</p>
|
||
<div id="1990_theorem">
|
||
<h2 id="winning-entry-1990theorem">Winning entry: <a href="1990/theorem/index.html">1990/theorem</a></h2>
|
||
<h3 id="winning-entry-source-code-theorem.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/theorem/theorem.c">theorem.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this to compile with modern systems.</p>
|
||
<p>He also fixed some bugs that impacted the usability of this program including some
|
||
segfaults under modern systems (and possibly in some cases earlier systems) with
|
||
this entry. Originally we noted that 4 trailing args, <code>0 0 0 0</code>, were
|
||
required on systems that dump core when <code>NULL</code> is dereferenced but the problem
|
||
this was meant to fix showed itself in modern systems even with the 4 <code>0</code>s. He also fixed a
|
||
segfault if not enough args are specified and fixed the code so that the
|
||
generated <code>fibonacci.c</code> actually works; before it just printed <code>0</code> over and over
|
||
again (since it did not work anyway a segfault prevention was added here). He
|
||
also fixed some array addressing (some of which might not be strictly necessary
|
||
but as he was testing the <code>fibonacci.c</code> bug he ended up changing it anyway).</p>
|
||
<p>BTW: why can’t the fix:</p>
|
||
<pre><code> if (a[1]==NULL||a[2]==NULL||a[3]==NULL||a[4]==NULL||a[5]==NULL) return 1;</code></pre>
|
||
<p>be changed to just test the value of <code>A</code> when <code>a</code> is argv and <code>A</code> is argc? You
|
||
tell us!</p>
|
||
<p>Cody also changed the code to use <code>fgets(3)</code>. See <a href="faq.html#faq4_1">FAQ 4.1 - Why were some calls to
|
||
the libc function gets(3) changed to use
|
||
fgets(3)?</a> for why this was done.</p>
|
||
<p>Since this program is so incredible the extra fixes were deemed worth having and
|
||
this is why they were done.</p>
|
||
<p>Cody later disabled a warning in the <code>Makefile</code> that proved to be a problem only
|
||
with <code>clang</code> in Linux but which was defaulting to an error. This way was the
|
||
simplest way to deal with the problem in question due to the way the entry
|
||
works.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/theorem/try.sh">try.sh</a> script which shows the
|
||
original program and some of the programs it generates.</p>
|
||
<p><a href="#yusuke">Yusuke</a> pointed out that <code>atof(3)</code> nowadays needs <code>#include <stdlib.h></code> which was
|
||
used in order to get this to work initially (prior to this output was there but
|
||
incomplete).</p>
|
||
<div id="1990_stig">
|
||
<h2 id="winning-entry-1990stig">Winning entry: <a href="1990/stig/index.html">1990/stig</a></h2>
|
||
<h3 id="winning-entry-source-code-stig.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/stig/stig.c">stig.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed the paths in the <code>Makefile</code> so that this would build in Linux (it
|
||
worked fine in macOS).</p>
|
||
<p>He also changed the <code>Makefile</code> to use <code>bash</code> not <code>zsh</code> as not all systems have
|
||
<code>zsh</code> and the <code>Makefile</code> actually sets <code>SHELL</code> to <code>bash</code>.</p>
|
||
<div id="1990_westley">
|
||
<h2 id="winning-entry-1990westley">Winning entry: <a href="1990/westley/index.html">1990/westley</a></h2>
|
||
<h3 id="winning-entry-source-code-westley.c-3">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/westley/westley.c">westley.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this for modern systems. It had <code>1s</code> (digit one, letter s)
|
||
in places for a <code>short int</code> which was changed to just <code>1</code>. Since it’s
|
||
instructional to see the differences he has provided an alternate version,
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/westley/westley.alt.c">westley.alt.c</a>, which is the original
|
||
code.</p>
|
||
<p>He also changed the <code>argc</code> to be an <code>int</code>, not a <code>char</code>, even though it might
|
||
often be the same (this in particular was done for <code>clang</code>).</p>
|
||
<p>He also fixed the code to not enter an infinite loop if arg is a number not > 0.
|
||
To be more like the original the number of args passed to the program has not
|
||
been fixed so that if one passes no arg it will still likely crash.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/westley/try.sh">try.sh</a> script.</p>
|
||
<div id="1991">
|
||
<h1 id="the-8th-ioccc"><a href="1991/index.html">1991 - The 8th IOCCC</a></h1>
|
||
</div>
|
||
<div id="1991_ant">
|
||
<h2 id="winning-entry-1991ant">Winning entry: <a href="1991/ant/index.html">1991/ant</a></h2>
|
||
<h3 id="winning-entry-source-code-ant.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/ant/ant.c">ant.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/ant/ant.alt.c">alternate code</a> that will be a bit easier to use for
|
||
those familiar with vim in the following ways (we don’t want vi users to also
|
||
not be able to use it or exit it, now do we ? :-) ):</p>
|
||
<ul>
|
||
<li>Use <code>0</code> to go to first column.</li>
|
||
<li>Use <code>$</code> to go to last column.</li>
|
||
<li>Hit ESC to go back to command mode (instead of form-feed, ctrl-L).</li>
|
||
<li>Use <code>w</code> to go forwards one word.</li>
|
||
<li>Use <code>b</code> to go backwards one word.</li>
|
||
<li>Use <code>q</code> to exit.</li>
|
||
</ul>
|
||
<p>The other keys were left unchanged.</p>
|
||
<div id="1991_brnstnd">
|
||
<h2 id="winning-entry-1991brnstnd">Winning entry: <a href="1991/brnstnd/index.html">1991/brnstnd</a></h2>
|
||
<h3 id="winning-entry-source-code-brnstnd.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/brnstnd.c">brnstnd.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this for modern systems. There were two invalid operands to binary
|
||
expression (<code>char *</code>, <code>void</code> and <code>int</code>, <code>void</code>) to resolve and
|
||
additionally a mis-feature of the C pre-processor which no longer works had to
|
||
be changed as well in order to get this to compile. In particular the macro <code>C</code>,
|
||
defined as <code>C =G</code> to make <code>+=</code> and similar operators no longer works. The
|
||
invalid operands to binary expressions were resolved with the comma operator.</p>
|
||
<p>Later on, Cody added back the macro <code>#define D define</code> to make it look ever so
|
||
slightly more like the original, even though it’s unused.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/try.sh">try.sh</a> script and
|
||
<a href="1991/brnstnd/try.txt">try.txt</a> which the script uses.</p>
|
||
<p>Cody also fixed the make clobber rule which left a symbolic link in the
|
||
directory even after the target file was deleted (from make clobber).</p>
|
||
<div id="1991_buzzard">
|
||
<h2 id="winning-entry-1991buzzard">Winning entry: <a href="1991/buzzard/index.html">1991/buzzard</a></h2>
|
||
<h3 id="winning-entry-source-code-buzzard.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/buzzard/buzzard.c">buzzard.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this so that the coordinates being specified, a documented
|
||
feature, would not crash the program. This happened because the function that
|
||
calls <code>atoi(3)</code> took an arg without any type specified and as an implicit <code>int</code>
|
||
it was not a <code>char *</code> which crashed the program in modern systems.</p>
|
||
<p>Cody also made the file name in the code (which is the default maze file) not
|
||
hard-coded but instead be <code>__FILE__</code>.</p>
|
||
<p>Finally Cody added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/buzzard/buzzard.alt.c">alternate
|
||
version</a> which will possibly feel more
|
||
at home with those familiar with vi(m): <code>k</code> for forward, <code>h</code> for left and <code>l</code>
|
||
for right. This version also has a more useful way to exit, just entering <code>q</code>
|
||
followed by enter, rather than completing (and it’s a maze) or killing the
|
||
program. We still recommend you try the original version first, of course.</p>
|
||
<div id="1991_davidguy">
|
||
<h2 id="winning-entry-1991davidguy">Winning entry: <a href="1991/davidguy/index.html">1991/davidguy</a></h2>
|
||
<h3 id="winning-entry-source-code-davidguy.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/davidguy/davidguy.c">davidguy.c</a></h3>
|
||
</div>
|
||
<p>As some systems like macOS can be particular about not declaring functions
|
||
<a href="#cody">Cody</a> added to the <code>Makefile</code> some <code>-include</code> options. These appear to
|
||
not be strictly necessary (currently) but it was done due to other syscalls
|
||
being a problem not being declared first, to hopefully future-proof it.</p>
|
||
<div id="1991_dds">
|
||
<h2 id="winning-entry-1991dds">Winning entry: <a href="1991/dds/index.html">1991/dds</a></h2>
|
||
<h3 id="winning-entry-source-code-dds.c-1">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/dds/dds.c">dds.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed a segfault that prevented this entry from working in any
|
||
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>
|
||
<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
|
||
the libc function gets(3) changed to use
|
||
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
|
||
in <code>main()</code> in the generated code and possibly <code>fgets(3)</code>) and <code>fgets(3)</code>, see
|
||
below. The problem with <code>clang</code> can be described simply as: <code>clang</code> (at least in
|
||
some systems?) defaults to having <code>-Werror</code> and the code that the entry
|
||
generates had some warnings that were causing compilation to fail if <code>cc</code> is
|
||
<code>clang</code> (the entry runs <code>cc a.c</code>). An example problem that had to be fixed is
|
||
that the generated code returned from <code>main()</code> no value but rather just had
|
||
<code>return;</code>.</p>
|
||
<p>The code used to run <code>cc a.c</code> by what was once <code>system(q-6);</code> but if <code>cc</code> is <code>clang</code>
|
||
like in macOS this is not enough.</p>
|
||
<p>If you have the time and interest and you wish to follow the below a bit better,
|
||
see the author’s remarks for the way the string works. The following had to be
|
||
added to the string <code>s</code>:</p>
|
||
<pre><code> !.Xop.fssps!.Xop.sfuvso.uzqf!.Xop.jnqmjdju.gvodujpo.efdmbsbujpo</code></pre>
|
||
<p>and then the call to <code>system(3)</code> had to be changed to:</p>
|
||
<pre><code> system(q-69);</code></pre>
|
||
<p>An important point is that the placement of this string in the <code>s</code> array
|
||
<strong><em>does</em> matter</strong>. This is because of the code:</p>
|
||
<pre><code> *o=fopen(q-3,"w");</code></pre>
|
||
<p>which means the file name that translates to <code>a.c</code> has to be at the end of the
|
||
string. Thus the end of the string actually looks like:</p>
|
||
<pre><code> !.Xop.fssps!.Xop.sfuvso.uzqf!.Xop.jnqmjdju.gvodujpo.efdmbsbujpo!b/d</code></pre>
|
||
<p>But then there is the matter of getting the C to use <code>fgets(3)</code>. As can be seen
|
||
above it’s not as simple as changing <code>gets(3)</code> to <code>fgets(3)</code>. This involved more magic
|
||
characters that had to be updated and some added. The C code:</p>
|
||
<pre><code> atoi(gets(b))</code></pre>
|
||
<p>is in the string:</p>
|
||
<pre><code> bupj)hfut)c**</code></pre>
|
||
<p>which was changed to be (in C):</p>
|
||
<pre><code> atoi(fgets(b,99,stdin))</code></pre>
|
||
<p>which in the program is:</p>
|
||
<pre><code> bupj)ghfut)c-::-tuejo**</code></pre>
|
||
<p>That’s fine and well but since the code does not include <code>stdio.h</code> there
|
||
obviously would be a compilation error. Thus the compiler line had to updated to
|
||
have <code>-include stdio.h</code> which in this rotated string is:</p>
|
||
<pre><code> .jodmvef!tuejp/i</code></pre>
|
||
<p>which had to be added after:</p>
|
||
<pre><code> efdmbsbujpo!</code></pre>
|
||
<p>which is the end of the warning disabled for <code>clang</code> (as described above).</p>
|
||
<p>But now the <code>system(q-69);</code> had to be changed to <code>system(q-86);</code>.</p>
|
||
<p>Then, later on, Cody discovered that in some systems, <code>clang</code> triggers even more
|
||
warnings so this had to be corrected too so the string was updated again and
|
||
the <code>system(q-86)</code> had to be changed to <code>system(q-104)</code>.</p>
|
||
<p>But then to prevent the need for disabling a warning and to be more correct
|
||
code, the generated code was changed to <code>return 1;</code> rather than just <code>return;</code>.
|
||
Thus in full the string became:</p>
|
||
<pre><code> char s[]="Qjou!s\\311^-g\\311^-n\\311^-c\\::^-q-ma%mO1JBHm%BQ-aP1J[O1HB%[Q<n\
|
||
bjo)*|gps)<<*txjudi)m*|aQdbtf!::::;sfuvso!2<aQefgbvmu;aQ<m,,a%CQ<csfbla%bQ<a\
|
||
N2!Q\ndbtf!aP2Q;m>aP2Q<a%!D12J!JGJHJOJQJFJSJJJMHS%HD12D12N3!N4\nJUJT%UQm>aP4\
|
||
HC%TQs\\q,,^>m,2<m>aP4HC%SD12N1\nJNQm>s\\..q^aHC%NHb%GN1!D32P3%RN1UP1D12JPQU\
|
||
aP1HR%PN4\nQ<g\\(aP3Q(^>aP2Q,2<n\\(aP3Q(^>aP4Hb%OD12D12N2!N3\nJVP3Q,,<jg)aP3\
|
||
Q=>n\\(aP3Q(^*m>g\\(aP3Q(^<fmtf!m,,aHC%QN1!N1\nJ#Qqsjoug)#&e]o#-aP1Q*aHb%#Qq\
|
||
vut)aP1Q*aHb%FN1\nQm>::::aHC%VP3Q>bupj)ghfut)c-::-tuejo**aHb%JD12JON1!Qjg)a%\
|
||
LN1UP1D12JIQUaP1HL%IQ*m>aN2!N2\nP2Q<fmtf!m,,aHC%MN1!N2>P2Q>aN2\nP2Hbdd!.Xop.\
|
||
fssps!.Xop.jnqmjdju.gvodujpo.efdmbsbujpo!.Xop.jnqmjdju.jou!.jodmvef!tuejp/i!\
|
||
b/d";</code></pre>
|
||
<p>and it now is <code>system(q-87);</code>.</p>
|
||
<p>It is hoped that this is the last time the string has to be updated to work with
|
||
all versions of <code>clang</code>, but if not the above is how it works.</p>
|
||
<p>With these changes in place it will compile and work with both <code>gcc</code> and <code>clang</code> and
|
||
the C code generated will use <code>fgets(3)</code>, not <code>gets(3)</code>, therefore removing the
|
||
annoying warnings. Note that the array passed to <code>fgets(3)</code> is an <code>int</code> but that
|
||
was the same for <code>gets()</code> and is not necessary to update to a <code>char[]</code>. Thus you
|
||
might still get some warnings there.</p>
|
||
<p>The key to the string is that it rotates the character by <code>+1</code>. This was not
|
||
immediately clear until reading the author’s remarks so there was an alt version
|
||
that was something of a kludge, running <code>make a</code> instead, but after the proper
|
||
fix was implemented the alternate code was removed.</p>
|
||
<p>Cody also fixed a typo in <code>LANDER.BAS</code> and made it so that if a file could not be
|
||
opened for reading or a file could not be opened for writing it would not crash.
|
||
The definition of whether that should be a bug to fix or a feature to not fix
|
||
was pondered and changed numerous times and ultimately that problem with this
|
||
entry was fixed. It has not been done in all.</p>
|
||
<div id="1991_fine">
|
||
<h2 id="winning-entry-1991fine">Winning entry: <a href="1991/fine/index.html">1991/fine</a></h2>
|
||
<h3 id="winning-entry-source-code-fine.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/fine/fine.c">fine.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> made it look much more like the original entry even after the fix
|
||
for <code>clang</code> (made by the judges) that increased the count in characters from 80 to
|
||
106, getting it back down to just 85 (and later back down to the original 80,
|
||
see below).</p>
|
||
<p>This was done by redefining <code>main</code> at the compiler line so that it looks like
|
||
the original where one didn’t have to worry about the type of args of <code>main()</code>
|
||
(when there were fewer restrictions), and also by removing a cast that was
|
||
not strictly necessary (this created a new warning: <code>ordered comparison between pointer and integer ('char **' and 'int')</code> but it’s no longer there, as
|
||
described below).</p>
|
||
<p>That was <code>fine</code> as well but Cody decided to drop it back down to its original 80
|
||
characters which also resolved the warning described above. This was by more clever use of
|
||
the <code>Makefile</code> which now has a <code>-DB=(int)b</code> so that <code>B</code> can be used in place where
|
||
<code>(int)b</code> used to be necessary.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/fine/try.sh">try.sh</a> script which feeds the program
|
||
some fun input for fun but mostly different output. He added a great string from
|
||
Brian Westley and Cody also added several of his own (can you figure out exactly
|
||
which ones? :-) )</p>
|
||
<div id="1991_rince">
|
||
<h2 id="winning-entry-1991rince">Winning entry: <a href="1991/rince/index.html">1991/rince</a></h2>
|
||
<h3 id="winning-entry-source-code-rince.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/rince/rince.c">rince.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed it so that the messages that show if you won or lost will be seen
|
||
after the end of the game. The reason it did not work before is curses was ended
|
||
at the end of the program which clears the screen. To make it look most like the
|
||
original entry Cody left the message before ending curses in and printed another
|
||
message of the same kind after <code>endwin()</code> was called with the exception that he
|
||
added a newline at the end of the screen to be more user friendly.</p>
|
||
<p>Cody also added <a href="1991/rince/index.html#alternate-code">two alt versions</a>, one to
|
||
remove the maximum number of moves you may make and another to let you configure
|
||
the maximum number of moves, even if that is making it harder to win. Naturally
|
||
the above fix was applied to these versions too.</p>
|
||
<div id="1991_westley">
|
||
<h2 id="winning-entry-1991westley">Winning entry: <a href="1991/westley/index.html">1991/westley</a></h2>
|
||
<h3 id="winning-entry-source-code-westley.c-4">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/westley/westley.c">westley.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed a segfault in this program which prevented it from working. The
|
||
problem was that the read-only <code>char</code> array <code>char *z[]</code> was being written to. The
|
||
fix was to change it to <code>char z[][100]</code> in two spots (see if you can determine
|
||
why two places, not one!). Why 100 when the longest string is < 100? Because a
|
||
shorter value caused strange output and it’s easier to just choose a larger
|
||
value that works without having to find the correct value.</p>
|
||
<p>Cody also fixed the <code>ttt.sh</code> script that prevented the game from working and he
|
||
also improved it so that warnings/errors/about to compile messages are not shown
|
||
unless the <code>-e</code> option is used. This is because the errors being shown kind of
|
||
ruins the experience. Finally he made it pass
|
||
<a href="https://www.shellcheck.net">ShellCheck</a>.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/westley/westley.alt.c">alt version</a> which
|
||
is based on the author’s remarks, a version that supposedly (:-) ) always wins.</p>
|
||
<p>Cody also fixed the make clobber rule where a file was left lying about when it
|
||
should have been removed.</p>
|
||
<div id="1992">
|
||
<h1 id="the-9th-ioccc"><a href="1992/index.html">1992 - The 9th IOCCC</a></h1>
|
||
</div>
|
||
<div id="1992_adrian">
|
||
<h2 id="winning-entry-1992adrian">Winning entry: <a href="1992/adrian/index.html">1992/adrian</a></h2>
|
||
<h3 id="winning-entry-source-code-adrian.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/adrian/adrian.c">adrian.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed the code so that it will try opening the file the code was compiled
|
||
from (<code>__FILE__</code>), not <code>adgrep.c</code>, as the latter does not exist: <code>adgrep</code> is
|
||
simply a link to <code>adrian</code> as <code>adgrep</code> is what the program was submitted as but
|
||
the entry’s winning source file is <code>adrian.c</code>.</p>
|
||
<p>Not fixing the above problem would have also caused the program to crash if no
|
||
arg was specified as the file doesn’t exist. In making the above fix, at first
|
||
the change to check for a <code>NULL</code> file was added. Then it was noticed that the
|
||
problem is that <code>adgrep.c</code> was an incorrect reference that never existed and it
|
||
was never fixed in any of the files, not the code or the documentation, and thus
|
||
was entirely incorrect code. A fun fact is that one can do:</p>
|
||
<pre><code> W= fopen(wc>= 2 ? V[1] : __FILE__,"rt");if(!W)exit(1);</code></pre>
|
||
<p>but one <em>CANNOT</em> do:</p>
|
||
<pre><code> W= fopen(wc>= 2 ? V[1] : __FILE__,"rt");if(!W)exit(1);
|
||
if (W==NULL)exit(1);</code></pre>
|
||
<p>because <code>adwc.c</code> will be empty! The difference is it is on a newline, the check.
|
||
This is an example of how a simple change in code can break it and this is also
|
||
true of another change as further below.</p>
|
||
<p>Cody also restored a slightly more obscure line of code that had been changed:</p>
|
||
<pre><code> - putc("}|uutsrq`_^bji`[Zkediml[PO]a_M__]ISOYIRGTNR"[i]+i-9,stderr);
|
||
+ 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>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
|
||
the libc function gets(3) changed to use
|
||
fgets(3)?</a> 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).</p>
|
||
<p>One might think that simply changing the <code>gets(3)</code> to <code>fgets(3)</code> (with <code>stdin</code>)
|
||
would work but it did not because <code>fgets(3)</code> stores the newline and <code>gets(3)</code> does
|
||
not. That is well known but this code was relying on not having this newline in
|
||
a different way (see also above).</p>
|
||
<p>With <code>fgets(3)</code> the code <code>if(A(Y)) puts(Y);</code> ended up printing an extra line
|
||
which made the generation of some files (like <code>adhead.c</code>) fail to compile. Why?
|
||
There was a blank line after a <code>\</code> at the end of the first line of a <em>macro
|
||
definition</em>! Thus the code now first trims off the last character of the buffer
|
||
read to get the same correct functionality but in a safe and non obnoxious way.</p>
|
||
<p>In this case the macro for <code>gets</code> could not be changed to have the macro do the
|
||
removal of the extra line (as in with a comma operator or a <code>&&</code>) as this, as
|
||
might be expected from the above, caused compilation errors with another
|
||
generated file (<code>adwc.c</code>)! Thus after the <code>gets(3)</code> call in the line that looks
|
||
like:</p>
|
||
<pre><code> while( gets(Y) ){ Y[strlen(Y)-1]='\0'; if(A(Y)) puts(Y); }</code></pre>
|
||
<p>one must keep the <code>Y[strlen(Y)-1]='\0';</code> part and keep it there.</p>
|
||
<p>These fixes are complex changes due to the way the program and <code>Makefile</code> generate
|
||
the additional tools.</p>
|
||
<p>Cody finally added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/adrian/try.sh">try.sh</a> script that shows the entry
|
||
and some of the tools this entry generates. Unlike other scripts, it does not
|
||
clear the screen after compilation so that one can see how the other files are
|
||
generated.</p>
|
||
<div id="1992_albert">
|
||
<h2 id="winning-entry-1992albert">Winning entry: <a href="1992/albert/index.html">1992/albert</a></h2>
|
||
<h3 id="winning-entry-source-code-albert.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/albert/albert.c">albert.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this to compile with modern systems. Note that in 1996 a bug fix was
|
||
applied to the code, provided as the alternate code as that version is not obfuscated.
|
||
Thus Cody’s fix applies to the original entry. The problems were that <code>malloc.h</code>
|
||
is not the correct header file now (at least in some systems) and a non-void
|
||
(implicit <code>int</code>) function returning without a value. That function was changed to
|
||
return <code>void</code>.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/albert/try.sh">try.sh</a> and
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/albert/try.alt.sh">try.alt.sh</a> scripts that correspond to the entry and
|
||
the alternate code.</p>
|
||
<div id="1992_ant">
|
||
<h2 id="winning-entry-1992ant">Winning entry: <a href="1992/ant/index.html">1992/ant</a></h2>
|
||
<h3 id="winning-entry-source-code-ant.c-1">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/ant/ant.c">ant.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed the <code>Makefile</code> so that the program will actually work with it (or at
|
||
least the rule to clobber files and link <code>am</code> to <code>ant</code>). The issue was that the
|
||
variables in the <code>Makefile</code> could not be evaluated in the same way as it’s not as
|
||
feature-rich as other implementations of <code>make(1)</code>. Thus the use of <code>${RM}</code> and
|
||
<code>${CP}</code> were in the respective rules changed to <code>rm</code> and <code>cp</code>, for two examples.
|
||
A new rule had to be added as well. The variable situation might be because they
|
||
are obtained from the root variable <code>Makefile</code> <code>var.mk</code> via <code>include</code> which the
|
||
program might not support (this has not been tested, however) and also because
|
||
it appears that the syntax for this program is to use <code>$()</code> rather than <code>${}</code>.</p>
|
||
<p>Cody also fixed another problem, unrelated, in the <code>Makefile</code> with the <code>.PHONY</code>
|
||
rule where a line was not ended with a <code>\</code> but should have been.</p>
|
||
<p>The author stated that in some systems like DOS with Turbo C, it might be
|
||
necessary to include <code>time.h</code> so Cody did this as well as this exists in other
|
||
systems too.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/ant/try.sh">try.sh</a> script.</p>
|
||
<div id="1992_buzzard.1">
|
||
<h2 id="winning-entry-1992buzzard.1">Winning entry: <a href="1992/buzzard.1/index.html">1992/buzzard.1</a></h2>
|
||
<h3 id="winning-entry-source-code-buzzard.1.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/buzzard.1/buzzard.1.c">buzzard.1.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added a check for the right number of args, exiting 1 if not enough (2)
|
||
used. This was not originally done but at a time it was changed to be considered
|
||
a bug so it was fixed at that point as it only took a few seconds and had to be
|
||
verified that it was consistent with the <a href="bugs.html">bugs.html</a> file.</p>
|
||
<p>He also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/buzzard.1/try.sh">try.sh</a> script to try out some
|
||
commands that we suggested and some additional ones that he provide for some fun.</p>
|
||
<div id="1992_buzzard.2">
|
||
<h2 id="winning-entry-1992buzzard.2">Winning entry: <a href="1992/buzzard.2/index.html">1992/buzzard.2</a></h2>
|
||
<h3 id="winning-entry-source-code-buzzard.2.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/buzzard.2/buzzard.2.c">buzzard.2.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed the alternate code to compile. The problem was it assumed that
|
||
<code>exit(3)</code> returns a value, not <code>void</code>. This was fixed with a <code>,0</code>.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/buzzard.2/try.sh">try.sh</a> and
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/buzzard.2/try.alt.sh">try.alt.sh</a> scripts that correspond to the entry
|
||
and its alternate code.</p>
|
||
<div id="1992_gson">
|
||
<h2 id="winning-entry-1992gson">Winning entry: <a href="1992/gson/index.html">1992/gson</a></h2>
|
||
<h3 id="winning-entry-source-code-gson.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/gson/gson.c">gson.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed a crash that prevented this entry from working in some cases in some
|
||
systems (like macOS) by disabling the optimiser in the Makefile.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/gson/try.sh">try.sh</a> script.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/gson/mkdict.sh">mkdict.sh</a> script that the author
|
||
included in their remarks. See the index.html for its purpose. It was NOT fixed
|
||
for <a href="https://www.shellcheck.net">ShellCheck</a>
|
||
because the author deliberately obfuscated it so <strong>PLEASE <em>DO NOT</em> FIX THIS OR
|
||
MODERNISE IT</strong>.</p>
|
||
<p>Cody also changed the buffer size in such a way that <code>gets(3)</code> should be safe
|
||
(well, theoretically) as it comes from the command line (though it can also read input
|
||
from <code>stdin</code> after starting the program). Ideally <code>fgets(3)</code> would be used but this
|
||
is a more problematic. See <a href="bugs.html#1992_gson">1992/gson in bugs.html</a> for more
|
||
details if you’re interested in trying to understand it (or fix?).</p>
|
||
<div id="1992_imc">
|
||
<h2 id="winning-entry-1992imc">Winning entry: <a href="1992/imc/index.html">1992/imc</a></h2>
|
||
<h3 id="winning-entry-source-code-imc.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/imc/imc.c">imc.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> provided the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/imc/try.sh">try.sh</a> script.</p>
|
||
<p>The original code, <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/imc/imc.orig.c">imc.orig.c</a>, assumed that <code>exit(3)</code>
|
||
returned a value but this will cause problems where <code>exit(3)</code> returns <code>void</code>. The
|
||
source code was modified to avoid this problem but like Cody did with other fixes
|
||
he made this more like the original by redefining <code>exit</code> to use the comma
|
||
operator so that it could be used in binary expressions.</p>
|
||
<div id="1992_kivinen">
|
||
<h2 id="winning-entry-1992kivinen">Winning entry: <a href="1992/kivinen/index.html">1992/kivinen</a></h2>
|
||
<h3 id="winning-entry-source-code-kivinen.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/kivinen/kivinen.c">kivinen.c</a></h3>
|
||
</div>
|
||
<p>It was observed that on modern systems this goes much too quick. <a href="#yusuke">Yusuke</a> created
|
||
a patch that calls <code>usleep(3)</code> but <a href="#cody">Cody</a> thought the value was too slow so he
|
||
made it a macro in the <code>Makefile</code> <code>Z</code> (which can be redefined with <code>make SLEEP=...</code>), defaulting at 15000. This was made an <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/kivinen/kivinen.alt.c">alternate
|
||
version</a> and it is recommended one use
|
||
the alternate version first. See the index.html file to see how to reconfigure it.</p>
|
||
<p>Cody also made the fixed version (the code relied on <code>exit(3)</code> returning to use
|
||
in binary expressions) (and alternate code from it) more like the original by renaming
|
||
the <code>ext</code> macro to be <code>exit</code> which uses the comma operator. He made it so the
|
||
line lengths match the original code, at least as best as possible (if not
|
||
perfectly), including start and end columns, often (if not all) with the same
|
||
start and end character.</p>
|
||
<p>Cody made <code>main()</code> have two args, not one, as some versions of <code>clang</code> have a
|
||
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
|
||
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
|
||
count and/or type changed in main() in some older
|
||
entries?</a> for more details.</p>
|
||
<p>Yusuke also noted that there is a bug in the program where right after starting
|
||
it moves towards the right but if you click the mouse it goes back.</p>
|
||
<div id="1992_lush">
|
||
<h2 id="winning-entry-1992lush">Winning entry: <a href="1992/lush/index.html">1992/lush</a></h2>
|
||
<h3 id="winning-entry-source-code-lush.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/lush/lush.c">lush.c</a></h3>
|
||
</div>
|
||
<p><a href="#yusuke">Yusuke</a> supplied a patch which makes this work with <code>gcc</code>. Due to how
|
||
it works (see <a href="1992/lush/index.html#judges-remarks">Judges’ remarks in the index.html
|
||
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
|
||
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
|
||
the libc function gets)3( changed to use
|
||
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
|
||
will compile fine but it won’t work). See <a href="bugs.html#1992_lush">1992/lush in
|
||
bugs.html</a> for details.</p>
|
||
<div id="1992_marangon">
|
||
<h2 id="winning-entry-1992marangon">Winning entry: <a href="1992/marangon/index.html">1992/marangon</a></h2>
|
||
<h3 id="winning-entry-source-code-marangon.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/marangon/marangon.c">marangon.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> made this more portable by changing the <code>void main()</code> to be <code>int main()</code>.</p>
|
||
<div id="1992_nathan">
|
||
<h2 id="winning-entry-1992nathan">Winning entry: <a href="1992/nathan/index.html">1992/nathan</a></h2>
|
||
<h3 id="winning-entry-source-code-nathan.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/nathan/nathan.c">nathan.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the original file back as it was deemed that the export restrictions
|
||
should no longer be a cause of concern for this entry. Doing this did require a
|
||
change to Cody’s <a href="2020/ferguson2/index.html">2020/ferguson2</a> entry as it’s
|
||
referenced.</p>
|
||
<p>Cody cynically noted that if he goes quiet, for instance if he no longer
|
||
participates in the IOCCC, that it must be our fault! :-)</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/nathan/try.sh">try.sh</a> script that runs a few commands
|
||
that we suggested as well as one he provided.</p>
|
||
<div id="1992_vern">
|
||
<h2 id="winning-entry-1992vern">Winning entry: <a href="1992/vern/index.html">1992/vern</a></h2>
|
||
<h3 id="winning-entry-source-code-vern.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/vern/vern.c">vern.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed an infinite loop if one were to input numbers < <code>0</code> or > <code>077</code>. The
|
||
problem was that it tried to use <code>scanf(3)</code> with the format specifier <code>"%o %o"</code> in a
|
||
loop, reading again if <code>scanf(3)</code> did not return 2 (that was not a problem in
|
||
that <code>scanf(2)</code> will not return until the number of specifiers have been
|
||
processed or some error occurs) or a function it called returned non-zero.</p>
|
||
<p>Instead the fix involves the <code>scanf(3)</code> specifiers being <code>"%4s %4s"</code> on two
|
||
new char arrays (always cleared in the beginning of the loop) and then using
|
||
<code>strtol(3)</code> with a base of <code>8</code> (as it’s octal), checking for <code>< 0 || > 077</code> on
|
||
both numbers (using <code>"%o %o"</code> does not solve the problem).</p>
|
||
<p>This was deemed a problem to fix as the Judges’ remarks hinted that this was how
|
||
it used to be.</p>
|
||
<div id="1992_westley">
|
||
<h2 id="winning-entry-1992westley">Winning entry: <a href="1992/westley/index.html">1992/westley</a></h2>
|
||
<h3 id="winning-entry-source-code-westley.c-5">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/westley/westley.c">westley.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this to work for <code>clang</code> by changing the third and fourth arg of
|
||
<code>main()</code> to be <code>char ** inside</code>main()<code>;</code>clang<code>requires args 2 - 4 to be</code>char
|
||
** and some versions do not even allow a fourth arg.</p>
|
||
<p>He also added the alternate version that the author gave in the remarks that is
|
||
specifically for the USA rather than the world. This had to be fixed for <code>clang</code>
|
||
as well to make the args of <code>main()</code> be the correct type and by moving the body
|
||
of main() to another function, <code>pain()</code>, which does the work since not all
|
||
versions of <code>clang</code> support four args to <code>main()</code>.</p>
|
||
<p>Cody also removed the restriction that one has to have a terminal that wraps at
|
||
80 columns so that as long as the terminal’s columns (try <code>echo $COLUMNS</code>) is >=
|
||
80 it should work. As most people have wider terminals than back in 1992 this
|
||
should help make it much easier to use. Note that if the number of columns is <
|
||
80 it will not work right. The way this was done is that every 80 iterations in
|
||
the final loop it prints another newline. This fix has another bonus in that
|
||
resizing the terminal after running it should not mess up the display either,
|
||
unless of course it becomes too small.</p>
|
||
<p>Cody added the scripts <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/westley/whereami.sh">whereami.sh</a> and
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/westley/whereami.alt.sh">whereami.alt.sh</a> which correspond to the entry and
|
||
the alternate code but first check that the number of columns is at least 80 and if
|
||
not it is an error.</p>
|
||
<p>Cody added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/westley/try.sh">try.sh</a> script that shows the different
|
||
cities that the author recommended one try as well as the one recommended by the
|
||
judges (approximate judging location), labelling each city and printing a
|
||
newline before the next city. The try.sh script uses the <code>whereami.sh</code> and
|
||
<code>whereami.alt.sh</code> scripts, as long as they’re executable (if they’re not it
|
||
first tries to make it executable and if it fails to do so it just uses
|
||
<code>westley</code> or <code>westley.alt</code>. The scripts can be deceived by <code>COLUMNS=80 ./try.sh</code>
|
||
(or <code>COLUMNS=80 ./whereami.sh</code> etc.) but this is a feature, not a bug.</p>
|
||
<p>Cody also added an arg check because the program and the
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/westley/westley.alt.c">alternate version</a> might have crashed or
|
||
<a href="https://en.wikipedia.org/wiki/Nuclear_weapon">nuked</a> the <a href="https://en.wikipedia.org/wiki/Earth">entire
|
||
world</a> or just the
|
||
<a href="https://en.wikipedia.org/wiki/United_States">USA</a>, respectively, without enough
|
||
args (2). And not that we need the help or anything for this :-) but we
|
||
encourage you to try the original without two args :-)</p>
|
||
<div id="1993">
|
||
<h1 id="the-10th-ioccc"><a href="1993/index.html">1993 - The 10th IOCCC</a></h1>
|
||
</div>
|
||
<div id="1993_ant">
|
||
<h2 id="winning-entry-1993ant">Winning entry: <a href="1993/ant/index.html">1993/ant</a></h2>
|
||
<h3 id="winning-entry-source-code-ant.c-2">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ant/ant.c">ant.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ant/try.sh">try.sh</a> script and a data file,
|
||
<a href="1993/ant/ants.txt">ants.txt</a>, full of ants for the script.</p>
|
||
<div id="1993_cmills">
|
||
<h2 id="winning-entry-1993cmills">Winning entry: <a href="1993/cmills/index.html">1993/cmills</a></h2>
|
||
<h3 id="winning-entry-source-code-cmills.c-1">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/cmills/cmills.c">cmills.c</a></h3>
|
||
</div>
|
||
<p><a href="#yusuke">Yusuke</a> suggested that with modern systems this goes too fast so he added a call
|
||
to <code>usleep(3)</code> in a patch he made. <a href="#cody">Cody</a> made it configurable at compilation by
|
||
using a macro. This is in the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/cmills/cmills.alt.c">alternate
|
||
version</a> which is the recommended one to try
|
||
first.</p>
|
||
<div id="1993_dgibson">
|
||
<h2 id="winning-entry-1993dgibson">Winning entry: <a href="1993/dgibson/index.html">1993/dgibson</a></h2>
|
||
<h3 id="winning-entry-source-code-dgibson.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/dgibson.c">dgibson.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/dgibson.sh">dgibson.sh</a> script to work
|
||
which assumed that <code>.</code> is in the path.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/try.sh">try.sh</a> script which runs the above
|
||
mentioned script on all the data files.</p>
|
||
<div id="1993_ejb">
|
||
<h2 id="winning-entry-1993ejb">Winning entry: <a href="1993/ejb/index.html">1993/ejb</a></h2>
|
||
<h3 id="winning-entry-source-code-ejb.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ejb/ejb.c">ejb.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ejb/try.sh">try.sh</a> script.</p>
|
||
<div id="1993_jonth">
|
||
<h2 id="winning-entry-1993jonth">Winning entry: <a href="1993/jonth/index.html">1993/jonth</a></h2>
|
||
<h3 id="winning-entry-source-code-jonth.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/jonth/jonth.c">jonth.c</a></h3>
|
||
</div>
|
||
<p>Both <a href="#cody">Cody</a> and <a href="#yusuke">Yusuke</a> fixed this so that it will work with modern systems. Yusuke
|
||
provided some fixes of the X code (it is not known at the time of writing this
|
||
what changed) and Cody fixed the C pre-processor directives
|
||
so that it would compile. It used to be that you could get away with code like:</p>
|
||
<pre><code> G int i,j
|
||
K case</code></pre>
|
||
<p>and expect <code>G;</code> to equate to <code>int i, j;</code> (though it’s now a long) and <code>K</code> to mean
|
||
<code>case</code> but that’s no longer the case so the offending lines had <code>#define</code>
|
||
prepended to them.</p>
|
||
<div id="1993_leo">
|
||
<h2 id="winning-entry-1993leo">Winning entry: <a href="1993/leo/index.html">1993/leo</a></h2>
|
||
<h3 id="winning-entry-source-code-leo.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/leo/leo.c">leo.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this to work with modern compilers. This involved different header
|
||
files for functions.</p>
|
||
<div id="1993_lmfjyh">
|
||
<h2 id="winning-entry-1993lmfjyh">Winning entry: <a href="1993/lmfjyh/index.html">1993/lmfjyh</a></h2>
|
||
<h3 id="winning-entry-source-code-lmfjyh.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/lmfjyh/lmfjyh.c">lmfjyh.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added an <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/lmfjyh/lmfjyh.alt.c">alternate
|
||
version</a> which does what the program did
|
||
with <code>gcc</code> < 2.3.3. See the index.html file for details and for why this was made
|
||
the alternate version, not the actual entry.</p>
|
||
<p>Cody also made the <code>Makefile</code> delete the very unsafe filename that is compiled (or
|
||
would be compiled if <code>gcc</code> < 2.3.3) whether or not compilation succeeds (which is
|
||
highly unlikely).</p>
|
||
<div id="1993_plummer">
|
||
<h2 id="winning-entry-1993plummer">Winning entry: <a href="1993/plummer/index.html">1993/plummer</a></h2>
|
||
<h3 id="winning-entry-source-code-plummer.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/plummer/plummer.c">plummer.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added check for two args during a time that this was considered a
|
||
bug to fix.</p>
|
||
<p>Cody also added an <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/plummer/plummer.alt.c">alternate version</a>
|
||
which uses <code>usleep(3)</code> so you can see how this entry used to look, if you’re
|
||
using a more modern system. This version also checks for two args and it is the
|
||
one we recommend one try first. See the index.html files for details.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/plummer/try.sh">try.sh</a> and
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/plummer/try.alt.sh">try.alt.sh</a> scripts that correspond to the original
|
||
entry and the alt version, both allowing one to change the args (and in the case
|
||
of the alt one allowing one to change the amount to sleep).</p>
|
||
<div id="1993_rince">
|
||
<h2 id="winning-entry-1993rince">Winning entry: <a href="1993/rince/index.html">1993/rince</a></h2>
|
||
<h3 id="winning-entry-source-code-rince.c-1">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/rince.c">rince.c</a></h3>
|
||
</div>
|
||
<p><a href="#yusuke">Yusuke</a> supplied a patch to get this to work in modern systems. This fix also
|
||
applies the compatibility issue of <code>select(2)</code> described in the index.html file.</p>
|
||
<p><a href="#cody">Cody</a> added a call to <code>endwin()</code> to help with terminal sanity after the program
|
||
ends.</p>
|
||
<p>Cody provided two alternate versions to simplify slowing the game down and, for
|
||
the second one, to make movement keys (of the default game) more familiar to vi
|
||
users. The slowing down was based on our suggestion that it might be desired to
|
||
slow down but Cody did it in such a way that makes it easy to configure at
|
||
compile time. See the index.html for details.</p>
|
||
<div id="1993_schnitzi">
|
||
<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>
|
||
</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
|
||
the libc function gets(3) changed to use
|
||
fgets(3)?</a> for why this was done.</p>
|
||
<div id="1993_vanb">
|
||
<h2 id="winning-entry-1993vanb">Winning entry: <a href="1993/vanb/index.html">1993/vanb</a></h2>
|
||
<h3 id="winning-entry-source-code-vanb.c-1">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/vanb/vanb.c">vanb.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this to work with <code>clang</code>. The problem was that the third arg to main()
|
||
was not a <code>char **. Instead</code>O5()<code>(which was</code>main()<code>via</code>-DO5=main`) is now
|
||
its own function which main() calls with the right parameters.</p>
|
||
<p>Later Cody fixed it again to look much more like the original where only a
|
||
single line is added, that of <code>main()</code>, which calls <code>O5()</code>. This was done through
|
||
<code>-include stdio.h</code> at the compiler (in the <code>Makefile</code>) and by removing the <code>O3</code>
|
||
variable (an int) at the top of the file, instead making it a <code>char ** in</code>main()<code>(</code>O5()<code>had three args) but then passing in</code>0<code>to</code>O5()` for the third
|
||
arg (as it was 0 at file scope already this is perfectly fine and it means
|
||
there’s no need to cast it to an int in the function call though that would also
|
||
work).</p>
|
||
<p>Cody also added the alternate code, provided by the author, which is:</p>
|
||
<pre><code> ... a version of the program before it got formatted into the VIII,
|
||
augmented with comments showing where each state begins. N1 and N2 are
|
||
notes.</code></pre>
|
||
<p>but fixed to work with <code>clang</code> as well.</p>
|
||
<p>NOTE: the <code>N1</code> and <code>N2</code> are provided as notes in the index.html file describing
|
||
this code. Other code is also described there.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/vanb/try.sh">try.sh</a> script.</p>
|
||
<div id="1994">
|
||
<h1 id="the-11th-ioccc"><a href="1994/index.html">1994 - The 11th IOCCC</a></h1>
|
||
</div>
|
||
<div id="1994_dodsond2">
|
||
<h2 id="winning-entry-1994dodsond2">Winning entry: <a href="1994/dodsond2/index.html">1994/dodsond2</a></h2>
|
||
<h3 id="winning-entry-source-code-1994dodsond2">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/dodsond2/dodsond2.c">1994/dodsond2</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed an infinite loop that could happen when you shoot an arrow
|
||
and end up having no arrows, thus making one force quit the game. The problem
|
||
was in a condition in the outer loop it would repeatedly get input (if
|
||
<code>getchar()</code> returned <code>'\n'</code>), only if one has more than one arrow, returning
|
||
after that. But if there were 0 arrows left it did not return and so the loop
|
||
started over, doing nothing. This fix also seems to have fixed a problem where
|
||
if you shoot your last arrow it would not move you to the room you shoot into
|
||
(whereas if you had more arrows it would).</p>
|
||
<p>Cody added an alt version that allows one to cheat by specifying how many arrows
|
||
to start with (this does make for fun but it allowed to easily debug the above
|
||
mentioned infinite loop which hanged the program).</p>
|
||
<p>As in some places it would properly say that you have ‘1 arrow’ or else, if you
|
||
have any other number of arrows (including 0), it would say ‘arrows’, Cody fixed
|
||
a place where it always said ‘arrows’. A minor fix and not that important.</p>
|
||
<p>Cody also fixed the problem where one could only get the arrows back from the
|
||
robber if the robber stole as many arrows as you ever found rather than that
|
||
minus how many you have shot. In other words if you had three arrows and shot
|
||
one and found no more you could never get the arrows back from the robber
|
||
because you could never lose all three since you spent one. This bug manifested
|
||
itself in another way too: once you got the arrows back the counter was not
|
||
reset so you could only get the arrows back once even if the robber stole more.
|
||
Now the counters are reset. The way this bug was fixed is that there is now a
|
||
counter for how many you have found and how many you shot in addition to the two
|
||
that already existed, how many you had and how many were stolen.</p>
|
||
<div id="1994_horton">
|
||
<h2 id="winning-entry-1994horton">Winning entry: <a href="1994/horton/index.html">1994/horton</a></h2>
|
||
<h3 id="winning-entry-source-code-1994horton">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/horton/horton.c">1994/horton</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this to check that four args were specified (at a time it
|
||
was considered a bug to fix). With the use of the C pre-processor macro and
|
||
inclusion of <code>stdlib.h</code> in the <code>Makefile</code> the layout of the source is exactly the
|
||
same column width and no additional lines were added. This was done during one
|
||
of the times where this was changed to bug to fix status, for better or worse.</p>
|
||
<p>Cody also fixed the <code>Makefile</code> which was causing alternate code to be compiled when it
|
||
shouldn’t be.</p>
|
||
<p>Cody also added the scripts <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/horton/try.sh">try.sh</a> and
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/horton/try.alt.sh">try.alt.sh</a>.</p>
|
||
<p>Finally he added the article (written by the entry’s author) cited in
|
||
<a href="1994/horton/login_sept92-pp28-31.pdf">login_sept92-pp28-31.pdf</a>.</p>
|
||
<div id="1994_imc">
|
||
<h2 id="winning-entry-1994imc">Winning entry: <a href="1994/imc/index.html">1994/imc</a></h2>
|
||
<h3 id="winning-entry-source-code-imc.c-1">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/imc/imc.c">imc.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/imc/try.sh">try.sh</a> script.</p>
|
||
<p>Cody also added inclusion of <code>unistd.h</code> for <code>getpid(2)</code>. While strictly speaking
|
||
this was not necessary (in multiple systems) it can sometimes be a problem and
|
||
as it was noticed it was changed (the only case this was done except in the
|
||
entries that actually did not work because of missing or incorrect prototypes).</p>
|
||
<div id="1994_ldb">
|
||
<h2 id="winning-entry-1994ldb">Winning entry: <a href="1994/ldb/index.html">1994/ldb</a></h2>
|
||
<h3 id="winning-entry-source-code-ldb.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/ldb/ldb.c">ldb.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this so it would compile and work with modern compilers. The problem
|
||
was that <code>srand()</code> returns <code>void</code> but it was used in a <code>||</code> expression. Thus the
|
||
comma operator was needed.</p>
|
||
<p>Cody also fixed it for <code>clang</code> under Linux which objected to incompatible pointer
|
||
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>
|
||
<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
|
||
the libc function gets(3) changed to use
|
||
fgets(3)?</a> for why this was done.)</p>
|
||
<p>This one has
|
||
a minor annoyance in that it now prints a newline after the output but this
|
||
seems like a worthy compromise for preventing the interspersed output in macOS
|
||
and at the same time it’s safer and allows for parsing file with longer lines.
|
||
Fixing it it to not have the extra newline is more problematic than it’s worth,
|
||
in macOS another line of output would be shown without the change anyway -
|
||
unless <code>2>/dev/null</code> - and the difference is that now it’s just a blank line
|
||
rather than an annoying warning. A subtlety about this fix: if a line is greater
|
||
than 231 in length if the program chooses that line it might print the first 231
|
||
characters or it might print (up to) the next 231 characters and so on.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/ldb/try.sh">try.sh</a> script.</p>
|
||
<div id="1994_schnitzi">
|
||
<h2 id="winning-entry-1994schnitzi">Winning entry: <a href="1994/schnitzi/index.html">1994/schnitzi</a></h2>
|
||
<h3 id="winning-entry-source-code-schnitzi.c-1">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/schnitzi/schnitzi.c">schnitzi.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added two alt versions, <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/schnitzi/schnitzi.alt.c">one which uses
|
||
fgets_()</a> but when fed its own source code cannot
|
||
generate code that compile and another <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/schnitzi/schnitzi.alt2.c">one with a bigger buffer
|
||
size</a> which, when fed its own source code, will
|
||
generate compilable code but not with the same buffer size but rather the
|
||
original buffer size. Cody explains this at <a href="bugs.html#1994-schnitzi">1994/schnitzi in
|
||
bugs.html</a>.</p>
|
||
<p>The purpose for these versions it both demonstrate how the magic works behind it
|
||
and to help others, should they wish, get the code to work with <code>fgets(3)</code>, with
|
||
or without an increase in buffer size. Note that without this feeding longer
|
||
files, say the index.html file, will crash the program. See <a href="bugs.html#1994_schnitzi">1994/schnitzi in
|
||
bugs.html</a> where Cody also explains the magic for more
|
||
details. Later on, if nobody takes up the task, Cody might resume it, but for
|
||
now there is more important work to do so that the next contest can run.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/schnitzi/try.sh">try.sh</a> and
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/schnitzi/try.alt.sh">try.alt.sh</a> scripts.</p>
|
||
<div id="1994_shapiro">
|
||
<h2 id="winning-entry-1994shapiro">Winning entry: <a href="1994/shapiro/index.html">1994/shapiro</a></h2>
|
||
<h3 id="winning-entry-source-code-shapiro.c-1">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/shapiro/shapiro.c">shapiro.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed a bug on systems where <code>EOF != -1</code>. The problem is that <code>getc()</code> and
|
||
the related functions do not return <code>-1</code> on EOF or error but rather <code>EOF</code>.
|
||
However <code>EOF</code> is not required to be <code>-1</code> but merely an int < 0 and this program
|
||
assumed that <code>getc()</code> will return <code>-1</code> on EOF or error, not <code>EOF</code>. On systems
|
||
where <code>EOF != -1</code> it could result in an infinite loop.</p>
|
||
<p>For an interesting problem that occurred here and what was done to solve it,
|
||
check <a href="bugs.html#1994_shapiro">1994/shapiro in bugs.html</a>.</p>
|
||
<div id="1994_smr">
|
||
<h2 id="winning-entry-1994smr">Winning entry: <a href="1994/smr/index.html">1994/smr</a></h2>
|
||
<h3 id="winning-entry-source-code-smr.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/smr/smr.c">smr.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/smr/try.sh">try.sh</a> script.</p>
|
||
<div id="1994_tvr">
|
||
<h2 id="winning-entry-1994tvr">Winning entry: <a href="1994/tvr/index.html">1994/tvr</a></h2>
|
||
<h3 id="winning-entry-source-code-1994tvr">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/tvr/tvr.c">1994/tvr</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the try scripts, four total, colour and black and white
|
||
pairs for the original entry and the alternate code. These scripts are
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/tvr/try.color.sh">try.color.sh</a> (color to match the author’s
|
||
remarks), <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/tvr/try.bw.sh">try.bw.sh</a>,
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/tvr/try.alt.color.sh">try.alt.color.sh</a> and
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/tvr/try.alt.bw.sh">try.alt.bw.sh</a>, respectively. The scripts go through
|
||
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>
|
||
<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
|
||
the libc function gets)3( changed to use
|
||
fgets(3)?</a> for why this was done.
|
||
In this case the newline had
|
||
to be terminated but it was a pretty straightforward fix. <code>gets()</code> was defined
|
||
to use <code>fgets()</code> and the inclusion of <code>stdio.h</code> 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 <code>fgets(3)</code>.</p>
|
||
<div id="1994_weisberg">
|
||
<h2 id="winning-entry-1994weisberg">Winning entry: <a href="1994/weisberg/index.html">1994/weisberg</a></h2>
|
||
<h3 id="winning-entry-source-code-weisberg.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/weisberg/weisberg.c">weisberg.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> changed the <code>Makefile</code> to make this program more user friendly and easier to
|
||
use with other tools as well by making the program output not a space after each
|
||
number but rather a newline.</p>
|
||
<p>Cody also added the scripts <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/weisberg/try.sh">try.sh</a> and
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/weisberg/primes.sh">primes.sh</a>. The <code>primes.sh</code> script is used by
|
||
<code>try.sh</code> and if both <code>primes(1)</code> and <code>rev(1)</code> are installed it will reverse the
|
||
lines of the <code>weisberg</code>, feeding it to <code>primes(1)</code>, showing those that are
|
||
primes. It only does the reversed output because the program actually prints
|
||
primes.</p>
|
||
<div id="1994_westley">
|
||
<h2 id="winning-entry-1994westley">Winning entry: <a href="1994/westley/index.html">1994/westley</a></h2>
|
||
<h3 id="winning-entry-source-code-westley.c-6">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/westley/westley.c">westley.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> converted the spoiler compiler options (provided by the author) to be
|
||
compiler commands and added a script <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/westley/try.sh">try.sh</a> to
|
||
automate the spoiler commands to make it easier to see the game in action from
|
||
start to finish.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/westley/westley.alt.c">alternate version</a>
|
||
that will look fine on terminals not set to 80 columns and the
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/westley/try.alt.sh">try.alt.sh</a> script to automate the play
|
||
along the lines of the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/westley/try.sh">try.sh</a> script.</p>
|
||
<div id="1995">
|
||
<h1 id="the-12th-ioccc"><a href="1995/index.html">1995 - The 12th IOCCC</a></h1>
|
||
</div>
|
||
<div id="1995_cdua">
|
||
<h2 id="winning-entry-1995cdua">Winning entry: <a href="1995/cdua/index.html">1995/cdua</a></h2>
|
||
<h3 id="winning-entry-source-code-cdua.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1995/cdua/cdua.c">cdua.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this so that it would work with macOS. Once it could compile it
|
||
additionally segfaulted under macOS which he also fixed.</p>
|
||
<p>Cody also provided the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1995/cdua/cdua.alt.c">alternate code</a> for fun :-) ) (in
|
||
particular to make it easier to see the program do what it does in systems that
|
||
are too fast … if there is such a thing anyway :-) ). See the index.html for
|
||
details on this.</p>
|
||
<p>Out of an abundance of caution with <code>clang</code>, Cody also added a second arg to
|
||
<code>main()</code> as some versions of <code>clang</code> whine about the number of args on top of the
|
||
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 <a href="faq.html#faq4_6">FAQ 4.6 - Why was arg
|
||
count and/or type changed in main() in some older
|
||
entries?</a> for more details.</p>
|
||
<div id="1995_dodsond1">
|
||
<h2 id="winning-entry-1995dodsond1">Winning entry: <a href="1995/dodsond1/index.html">1995/dodsond1</a></h2>
|
||
<h3 id="winning-entry-source-code-dodsond1.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1995/dodsond1/dodsond1.c">dodsond1.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1995/dodsond1/try.sh">try.sh</a> script that uses the text file he
|
||
provided which is input we suggested one try with the entry.</p>
|
||
<div id="1995_esde">
|
||
<h2 id="winning-entry-1995esde">Winning entry: <a href="1995/esde/index.html">1995/esde</a></h2>
|
||
<h3 id="winning-entry-source-code-esde.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1995/esde/esde.c">esde.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1995/esde/try.sh">try.sh</a> script.</p>
|
||
<div id="1995_garry">
|
||
<h2 id="winning-entry-1995garry">Winning entry: <a href="1995/garry/index.html">1995/garry</a></h2>
|
||
<h3 id="winning-entry-source-code-garry.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1995/garry/garry.c">garry.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed the alternate code so that it will compile with modern compilers. The
|
||
problem was a missing <code>int</code> for the <code>f</code> variable. He felt it was even more
|
||
important that it works because the layout does indeed look to him like a rat is
|
||
dropping core :-), something that the judges suggested.</p>
|
||
<p>Cody also renamed <code>garry.test.sh</code> to <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1995/garry/try.sh">try.sh</a> and improved it
|
||
to to make sure the program is compiled before trying to use it as well as
|
||
adding a few enhancements. For the alt version he also added the
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1995/garry/try.alt.sh">try.alt.sh</a> script to use the alt version, though the
|
||
alt version is not as important as alternate code in other entries. In order to get
|
||
the paging to work right for the <code>garry.data</code> file leading blank lines had to be
|
||
added.</p>
|
||
<div id="1995_heathbar">
|
||
<h2 id="winning-entry-1995heathbar">Winning entry: <a href="1995/heathbar/index.html">1995/heathbar</a></h2>
|
||
<h3 id="winning-entry-source-code-1995heathbar">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1995/heathbar/heathbar.c">1995/heathbar</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1995/heathbar/try.sh">try.sh</a> script.</p>
|
||
<div id="1995_leo">
|
||
<h2 id="winning-entry-1995leo">Winning entry: <a href="1995/leo/index.html">1995/leo</a></h2>
|
||
<h3 id="winning-entry-source-code-leo.c-1">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1995/leo/leo.c">leo.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1995/leo/try.sh">try.sh</a> script.</p>
|
||
<p>At our change in how to deal with spoilers, Cody also uudecoded the spoiler provided
|
||
by the author, putting it in <a href="1995/leo/spoiler1.html">spoiler1.html</a>.</p>
|
||
<div id="1995_makarios">
|
||
<h2 id="winning-entry-1995makarios">Winning entry: <a href="1995/makarios/index.html">1995/makarios</a></h2>
|
||
<h3 id="winning-entry-source-code-makarios.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1995/makarios/makarios.c">makarios.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this so that it will compile with versions of <code>clang</code> that has a defect
|
||
which only allows <code>main()</code> to have 0, 2 or 3 args. This is done by a new
|
||
function (<code>pain()</code> as it’s annoying that <code>clang</code> is this way :-) ) that <code>main()</code>
|
||
calls which has the four args.</p>
|
||
<div id="1995_savastio">
|
||
<h2 id="winning-entry-1995savastio">Winning entry: <a href="1995/savastio/index.html">1995/savastio</a></h2>
|
||
<h3 id="winning-entry-source-code-savastio.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1995/savastio/savastio.c">savastio.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1995/savastio/try.sh">try.sh</a> script.</p>
|
||
<div id="1995_schnitzi">
|
||
<h2 id="winning-entry-1995schnitzi">Winning entry: <a href="1995/schnitzi/index.html">1995/schnitzi</a></h2>
|
||
<h3 id="winning-entry-source-code-schnitzi.c-2">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1995/schnitzi/schnitzi.c">schnitzi.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1995/schnitzi/try.sh">try.sh</a> script.</p>
|
||
<div id="1995_vanschnitz">
|
||
<h2 id="winning-entry-1995vanschnitz">Winning entry: <a href="1995/vanschnitz/index.html">1995/vanschnitz</a></h2>
|
||
<h3 id="winning-entry-source-code-vanschnitz.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1995/vanschnitz/vanschnitz.c">vanschnitz.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the authors’ <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1995/vanschnitz/vanschnitz.alt.c">spoiler as a C
|
||
file</a> as in 2023 we have decided that in most
|
||
cases all the code should be available for the wider audience, without having to
|
||
extract it. The exception is when the files are created by the entry or the
|
||
entry decrypts the text or something like that.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1995/vanschnitz/try.sh">try.sh</a> script.</p>
|
||
<div id="1996">
|
||
<h1 id="the-13th-ioccc"><a href="1996/index.html">1996 - The 13th IOCCC</a></h1>
|
||
</div>
|
||
<div id="1996_august">
|
||
<h2 id="winning-entry-1996august">Winning entry: <a href="1996/august/index.html">1996/august</a></h2>
|
||
<h3 id="winning-entry-source-code-august.c-1">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1996/august/august.c">august.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed a segfault in this program that prevented it from working right and
|
||
also fixed an infinite loop in the try commands. This infinite loop prevented it
|
||
from working with some systems or compilers which we noted a long time ago.</p>
|
||
<p>The problem with the infinite loop is that the file <code>august.oc</code> had to have
|
||
lines starting with <code>#</code> removed and it was not being done. After this is done
|
||
with say <code>sed(1)</code> (like <code>sed -i'' '/^#/d' august.oc</code> which has been added to
|
||
both the remarks and the <code>try.sh</code> script noted below) the code can proceed. This
|
||
problem existed in macOS.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1996/august/try.sh">try.sh</a> script that runs all the
|
||
commands that were given by the judges in the try section, with the fix above
|
||
applied.</p>
|
||
<div id="1996_dalbec">
|
||
<h2 id="winning-entry-1996dalbec">Winning entry: <a href="1996/dalbec/index.html">1996/dalbec</a></h2>
|
||
<h3 id="winning-entry-source-code-dalbec.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1996/dalbec/dalbec.c">dalbec.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> proposed a fix for this to compile with <code>clang</code> and Landon implemented it
|
||
after some discussion (though Cody changed the function name). The reason Cody
|
||
did not do it is because he thought it was the wrong output but as it happens
|
||
the try section below was worded a bit confusingly. He looked at <a href="#yusuke">Yusuke</a>‘s
|
||
analysis found
|
||
<a href="https://mame-github-io.translate.goog/ioccc-ja-spoilers/1996/dalbec.html?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-US&_x_tr_pto=wapp">here</a>
|
||
but he missed that Yusuke added a’…’ after the result which made him think
|
||
the fix was wrong.</p>
|
||
<p>Cody also made the recommended change of the author to make it so that each
|
||
number is printed on a line by itself rather than having a long string of
|
||
numbers on the same line.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1996/dalbec/try.sh">try.sh</a> script.</p>
|
||
<div id="1996_eldby">
|
||
<h2 id="winning-entry-1996eldby">Winning entry: <a href="1996/eldby/index.html">1996/eldby</a></h2>
|
||
<h3 id="winning-entry-source-code-eldby.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1996/eldby/eldby.c">eldby.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> provided an <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1996/eldby/eldby.alt.c">alternate version</a> which uses
|
||
<code>usleep()</code> in between writing the output to make it easier to see what it looked
|
||
like back in 1996 with modern systems and importantly also for those who are sensitive to text
|
||
flashing by rapidly. We recommend that you try the alternate version first due to
|
||
these reasons.</p>
|
||
<div id="1996_gandalf">
|
||
<h2 id="winning-entry-1996gandalf">Winning entry: <a href="1996/gandalf/index.html">1996/gandalf</a></h2>
|
||
<h3 id="winning-entry-source-code-gandalf.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1996/gandalf/gandalf.c">gandalf.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this to compile and work with modern systems. As he loved the
|
||
references in the code that could not compile he just commented out as little as
|
||
possible to get this to compile.</p>
|
||
<p>Cody also added the rather useful <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1996/gandalf/try.sh">try.sh</a> script to
|
||
really demonstrate the different ways of running the program ends up showing
|
||
either different output or the same output that we briefly pointed out.</p>
|
||
<p>BTW: it is perilous to try the patience of
|
||
<a href="https://www.glyphweb.com/arda/g/gandalf.html">Gandalf</a>. Go ahead, try it! :-)</p>
|
||
<div id="1996_huffman">
|
||
<h2 id="winning-entry-1996huffman">Winning entry: <a href="1996/huffman/index.html">1996/huffman</a></h2>
|
||
<h3 id="winning-entry-source-code-huffman.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1996/huffman/huffman.c">huffman.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1996/huffman/try.sh">try.sh</a> script.</p>
|
||
<div id="1996_jonth">
|
||
<h2 id="winning-entry-1996jonth">Winning entry: <a href="1996/jonth/index.html">1996/jonth</a></h2>
|
||
<h3 id="winning-entry-source-code-jonth.c-1">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1996/jonth/jonth.c">jonth.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this to not segfault under macOS. The problem was that the function
|
||
pointer <code>w</code>, which points to <code>XCreateWindow()</code>, did not specify the parameters of
|
||
the function in the pointer assignment.</p>
|
||
<p>NOTE: if there is no X server running this program will still crash.</p>
|
||
<div id="1996_rcm">
|
||
<h2 id="winning-entry-1996rcm">Winning entry: <a href="1996/rcm/index.html">1996/rcm</a></h2>
|
||
<h3 id="winning-entry-source-code-rcm.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1996/rcm/rcm.c">rcm.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1996/rcm/try.sh">try.sh</a> script.</p>
|
||
<div id="1996_schweikh1">
|
||
<h2 id="winning-entry-1996schweikh1">Winning entry: <a href="1996/schweikh1/index.html">1996/schweikh1</a></h2>
|
||
<h3 id="winning-entry-source-code-schweikh1.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1996/schweikh1/schweikh1.c">schweikh1.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1996/schweikh1/try.sh">try.sh</a> script.</p>
|
||
<p>The author stated that <code>-I/usr/include</code> is needed by <code>gcc</code> in Solaris because
|
||
<code>errno.h</code> has two identical extern declarations of <code>errno</code>. That leads to an
|
||
error due to the redefinition of <code>main</code> but the <code>-I</code> option makes sure the
|
||
working <code>/usr/include/rrno.h</code> is found first, which shouldn’t cause any problems
|
||
on other systems (the other file is
|
||
<code>gcc-lib/sparc-sun-solaris2.5/2.7.2/include/errno.h</code>). Thus Cody also added this to
|
||
the <code>Makefile</code> for the (likely?) few who still use Solaris.</p>
|
||
<div id="1996_schweikh2">
|
||
<h2 id="winning-entry-1996schweikh2">Winning entry: <a href="1996/schweikh2/index.html">1996/schweikh2</a></h2>
|
||
<h3 id="winning-entry-source-code-schweikh2.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1996/schweikh2/schweikh2.c">schweikh2.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1996/schweikh2/try.sh">try.sh</a> script with
|
||
a few commands to try along with a shorter version of something the author
|
||
suggested one try (at the end of the script it prompts if you wish to run the
|
||
author’s idea, with a <code>sleep</code> and <code>echo</code> in between to help one distinguish the
|
||
output better, with the warning that it is an infinite loop).</p>
|
||
<div id="1996_schweikh3">
|
||
<h2 id="winning-entry-1996schweikh3">Winning entry: <a href="1996/schweikh3/index.html">1996/schweikh3</a></h2>
|
||
<h2 id="source-code-schweikh3.c">Source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1996/schweikh3/schweikh3.c">schweikh3.c</a></h2>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> updated the <code>Makefile</code> so that if it fails to compile it will try the
|
||
method suggested for SunOS rather than having to update the <code>Makefile</code> manually or
|
||
running a more complicated command: now one can just run <code>make</code>.</p>
|
||
<div id="1996_westley">
|
||
<h2 id="winning-entry-1996westley">Winning entry: <a href="1996/westley/index.html">1996/westley</a></h2>
|
||
<h3 id="winning-entry-source-code-westley.c-7">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1996/westley/westley.c">westley.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed a segfault in this entry as well as it displaying environmental
|
||
variables. Although the scripts showed correct output, it somewhat lessened the
|
||
usability because they segfaulted and showed (an) environmental variable,
|
||
interspersed with the output of the program. With the fix they no longer have
|
||
this problem. If <code>argc < 5</code> (<code>argv[4]</code> is referenced) it will not do anything
|
||
and it will not segfault either - this was caused by the body of the <code>for()</code> loop
|
||
which is now empty (it doesn’t appear to be needed at all at least modernly).
|
||
Note that you should check the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1996/westley/westley.alt.c">westley.alt.c</a> file
|
||
when reading the author’s comments. To see how to use the original, see the
|
||
index.html file.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1996/westley/try.sh">try.sh</a> and
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1996/westley/try.alt.sh">try.alt.sh</a> scripts to automate showing the different
|
||
clocks, both with the fixed version and the original (alt) version.</p>
|
||
<p>Also, to fix any potential problem with displaying in GitHub the scripts
|
||
provided by the author, Cody added ‘.sh’ to the <code>clock[1-3].sh</code> scripts.</p>
|
||
<div id="1998">
|
||
<h1 id="the-14th-ioccc"><a href="1998/index.html">1998 - The 14th IOCCC</a></h1>
|
||
</div>
|
||
<div id="1998_banks">
|
||
<h2 id="winning-entry-1998banks">Winning entry: <a href="1998/banks/index.html">1998/banks</a></h2>
|
||
<h3 id="winning-entry-source-code-banks.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/banks/banks.c">banks.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> improved the <code>Makefile</code> to allow for easier redefining the control
|
||
keys and time step that the author set up.</p>
|
||
<p>Cody also set up the <code>Makefile</code> to have an alt build (using the same code) for those
|
||
who do not have a page up or page down key and added the
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/banks/keysym.h">keysym.h</a> header file as a reference for other keys one
|
||
can use if they wish to modify the controls. One can certainly do this even if
|
||
they do have page up and page down but this gives a default for those who don’t
|
||
have them like with Macs. The alt build hard codes the page up and page down
|
||
alternatives because not doing so would overly complicate both builds and since
|
||
you can configure them all in both builds it shouldn’t matter.</p>
|
||
<div id="1998_bas1">
|
||
<h2 id="winning-entry-1998bas1">Winning entry: <a href="1998/bas1/index.html">1998/bas1</a></h2>
|
||
<h3 id="winning-entry-source-code-bas1.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/bas1/bas1.c">bas1.c</a></h3>
|
||
</div>
|
||
<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> 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 <a href="faq.html#faq4_6">FAQ 4.6 - Why was arg
|
||
count and/or type changed in main() in some older
|
||
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
|
||
program.</p>
|
||
<div id="1998_bas2">
|
||
<h2 id="winning-entry-1998bas2">Winning entry: <a href="1998/bas2/index.html">1998/bas2</a></h2>
|
||
<h3 id="winning-entry-source-code-bas2.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/bas2/bas2.c">bas2.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/bas2/try.sh">try.sh</a> script which runs some default actions
|
||
as well as allowing one to pass in different file names or strings.</p>
|
||
<div id="1998_chaos">
|
||
<h2 id="winning-entry-1998chaos">Winning entry: <a href="1998/chaos/index.html">1998/chaos</a></h2>
|
||
<h3 id="winning-entry-source-code-chaos.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/chaos/chaos.c">chaos.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added a call to <code>endwin()</code> to restore terminal sanity (echo etc.) when
|
||
exiting the program (in both versions).</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/chaos/try.sh">try.sh</a> script that runs the program on
|
||
all the data files, giving instructions on how to rotate and zoom in and out,
|
||
prior to each run.</p>
|
||
<div id="1998_df">
|
||
<h2 id="winning-entry-1998df">Winning entry: <a href="1998/df/index.html">1998/df</a></h2>
|
||
<h3 id="winning-entry-source-code-df.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/df/df.c">df.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> changed a <code>int *</code> used for <code>fopen(3)</code> to be a <code>FILE *</code> to be more correct
|
||
and prevent any possible problems in some systems (which has happened).</p>
|
||
<p>Cody also made the fixed version to look more like the original version by using
|
||
the old style of <code>main()</code> args so that it reads <code>i,love_unix</code> more naturally,
|
||
and by changing the <code>typedef int lint</code> to be <code>typedef int _int</code>. See the code
|
||
for why this has to be done this way.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/df/try.sh">try.sh</a> script which runs the program in a
|
||
loop until one hits <code>q</code> (or <code>Q</code>) or sends intr/ctrl-c. He also proposed there’s
|
||
a way to cheat very easily. Can you figure out how?</p>
|
||
<div id="1998_dlowe">
|
||
<h2 id="winning-entry-1998dlowe">Winning entry: <a href="1998/dlowe/index.html">1998/dlowe</a></h2>
|
||
<h3 id="winning-entry-source-code-dlowe.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dlowe/dlowe.c">dlowe.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> made the program more portable by changing the void return type of <code>main()</code>
|
||
to be <code>int</code> (in both versions).</p>
|
||
<p>Cody added the scripts <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dlowe/try.sh">try.sh</a>,
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dlowe/try.alt.sh">try.alt.sh</a>, <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dlowe/pootify.sh">pootify.sh</a> and
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dlowe/pootify.cgi.sh">pootify.cgi.sh</a> for a fun example use of the
|
||
program, a local pootifier of web pages and a CGI pootifier. See <a href="1998/dlowe/index.html#historical-remarks">historical
|
||
remarks</a> for more details on the
|
||
pootify scripts.</p>
|
||
<div id="1998_dloweneil">
|
||
<h2 id="winning-entry-1998dloweneil">Winning entry: <a href="1998/dloweneil/index.html">1998/dloweneil</a></h2>
|
||
<h3 id="winning-entry-source-code-dloweneil.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dloweneil/dloweneil.c">dloweneil.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dloweneil/dloweneil.alt.c">alternate code</a> which has vi(m) movement
|
||
(in addition to the other keys except for dropping it’s not <code>d</code> but <code>j</code> or
|
||
space) keys as well as allowing one to quit the game.</p>
|
||
<div id="1998_dorssel">
|
||
<h2 id="winning-entry-1998dorssel">Winning entry: <a href="1998/dorssel/index.html">1998/dorssel</a></h2>
|
||
<h3 id="winning-entry-source-code-dorssel.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dorssel/dorssel.c">dorssel.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dorssel/try.sh">try.sh</a> script.</p>
|
||
<div id="1998_fanf">
|
||
<h2 id="winning-entry-1998fanf">Winning entry: <a href="1998/fanf/index.html">1998/fanf</a></h2>
|
||
<h3 id="winning-entry-source-code-fanf.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/fanf/fanf.c">fanf.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this to compile. The problem was the intermediate steps to get to the
|
||
final code that is compiled. The code is now what it essentially becomes when
|
||
processed completely. The intermediate steps can now be performed to see how it
|
||
expands but it can still compile and be used.</p>
|
||
<p>Cody also added a second arg to <code>main()</code> out of an abundance of caution as some
|
||
versions of <code>clang</code> complain about the number of args to <code>main()</code>. These versions
|
||
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 <a href="faq.html#faq4_6">FAQ 4.6 - Why was arg
|
||
count and/or type changed in main() in some older
|
||
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
|
||
<code>CSILENCE</code> variable of the Makefile.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/fanf/try.sh">try.sh</a> script to show the output of some
|
||
of the expressions that we selected.</p>
|
||
<div id="1998_schnitzi">
|
||
<h2 id="winning-entry-1998schnitzi">Winning entry: <a href="1998/schnitzi/index.html">1998/schnitzi</a></h2>
|
||
<h3 id="winning-entry-source-code-schnitzi.c-3">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schnitzi/schnitzi.c">schnitzi.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed invalid data types which prevented this entry from working, causing a
|
||
segfault. This showed itself in two parts which required two fixes, one for
|
||
Linux and further changes for macOS. He also fixed a segfault (after printing
|
||
garbage) when the arg specified evaluated to 0. It was decided by us, the
|
||
judges, that these segfault fixes should be made because the program is so
|
||
beautiful.</p>
|
||
<p>Later on Cody improved the fixes by checking that the arg is a number <code>>0 && <27</code> as that was noted by the author as a requirement and again since it’s such
|
||
a beautiful program it is worth it, especially as the larger the number the
|
||
larger the resulting program becomes. It can be gigabytes in length if it
|
||
doesn’t crash. At this point since the author stated it has no <code>while</code>,
|
||
<code>do...while</code>, <code>for</code>, <code>if/else</code>, <code>switch</code>, <code>?:</code> Cody removed the if statement by
|
||
doing:</p>
|
||
<pre><code> ((V[1]&&((atoi(V[1])>0&&atoi(V[1])<27))||(exit(1),1)));</code></pre>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schnitzi/try.sh">try.sh</a> script to help users try the
|
||
commands that we recommended as well as some added by him.</p>
|
||
<div id="1998_schweikh1">
|
||
<h2 id="winning-entry-1998schweikh1">Winning entry: <a href="1998/schweikh1/index.html">1998/schweikh1</a></h2>
|
||
<h3 id="winning-entry-source-code-1998schweikh1">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh1/schweikh1.c">1998/schweikh1</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this for modern systems (it did not work at all) and added an
|
||
alternate version that works with macOS. Cody also made it ever so slightly more
|
||
portable by removing the hard-coding of <code>gcc</code>, instead hard-coding it <code>cc</code>. Doing
|
||
this not only lets it work with systems without <code>gcc</code> (though in macOS it does
|
||
exist but is actually <code>clang</code>) as <code>cc</code> always should.
|
||
Getting this entry to work was quite complicated but is also very interesting.</p>
|
||
<p>To see how the macOS fixes works, see the <a href="1998/schweikh1/macos.html">macos.html</a>
|
||
file but do note that this includes spoilers for both versions! The fixes to get
|
||
it to work at all are described next.</p>
|
||
<p>So what was wrong with the original?</p>
|
||
<p>The call to <code>freopen(3)</code> was incorrect with the second arg (the mode) being
|
||
<code>5+__FILE__</code>; it is now <code>"r"</code>. (Observe that the mode to the <code>fopen(3)</code>
|
||
call is: <code>43+__FILE__</code>. This might seem incorrect and indeed it can be changed
|
||
to <code>"r"</code> as well but this was not actually necessary so once this was noticed it
|
||
was changed back to the original.)</p>
|
||
<p>Another important change is that the files are only closed if the <code>FILE *H</code> is
|
||
<code>!= NULL</code>. Without this check, because it’s almost certain that some files will
|
||
not exist, it would dereference a NULL pointer and very likely crash or halt and
|
||
catch fire :-), preventing the entry from working. Notice how <code>H</code> is a funny
|
||
macro defined as:</p>
|
||
<pre><code> %:define H(x) <st%:%:x##.h></code></pre>
|
||
<p>and yet the <code>FILE *</code> can be called <code>H</code>! This might or might not make sense to
|
||
you but if it doesn’t can you figure out why?</p>
|
||
<p>Another fix is that previously the program would <code>return 1</code> if a file failed to
|
||
open but for the same reason as above, it being very likely some files will not
|
||
exist, the return was removed so that if the statement of the <code>if</code> is true the
|
||
<code>while</code> loop run, rather than having the loop by itself. It was done this way to
|
||
make it as close to the original as possible and to maintain the obfuscation as
|
||
close as possible as well.</p>
|
||
<p>Also crucial, and the final fixes to make it work, is that the arrays <code>K</code> and
|
||
<code>L</code> had to be increased in size. They were originally (somewhat bewildering at
|
||
first glance) defined as <code>K[X(*)], L[X(<<)]</code> but they were changed to
|
||
<code>K[(X(*))*4], L[4*X(<<)]</code> though it is no longer clear just how necessary this
|
||
might be.</p>
|
||
<p>As noted, a limitation of <code>gcc</code> existing was removed by Cody to make it so that
|
||
<code>gcc</code> is not required as <code>cc</code> should exist in every system with a C compiler and
|
||
as the author stated: as long as the options <code>-E -dM</code> of the compiler prints out
|
||
the macros in the form of <code>gcc -dM</code> i.e., the lines are in the form <code>#define MACRO value</code> it will work, assuming that compiler can run, of course.</p>
|
||
<p>Cody also added the perl script that the author provided that they used to
|
||
compute the character count in the code according to the contest rules of 1998
|
||
in the file <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh1/charcount.pl">charcount.pl</a>.</p>
|
||
<div id="1998_schweikh2">
|
||
<h2 id="winning-entry-1998schweikh2">Winning entry: <a href="1998/schweikh2/index.html">1998/schweikh2</a></h2>
|
||
<h3 id="winning-entry-source-code-schweikh2.c-1">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh2/schweikh2.c">schweikh2.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed the code to not trigger an internal compiler error in <code>gcc</code>:</p>
|
||
<pre><code> :10:16: warning: type defaults to 'int' in declaration of 'zero' [-Wimplicit-int]
|
||
: In function 'main':
|
||
:12:1: warning: missing terminating " character
|
||
:12:19: internal compiler error: invalid built-in macro "__FILE__"</code></pre>
|
||
<p>The string <code>"01\015"</code> had to be changed to <code>ONE(O(1,1,2,6,0,6))</code>. For an
|
||
interesting historical explanation and further details and fun, see the
|
||
<a href="1998/schweikh2/index.html#historical-remarks">historical remarks</a> in the
|
||
index.html.</p>
|
||
<p>Cody also added an <code>int</code> after <code>register</code> in <code>main()</code> in case <code>clang</code> decides to
|
||
have a problem with that in the future which is not entirely out of the
|
||
question.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh2/try.sh">try.sh</a> script.</p>
|
||
<div id="1998_schweikh3">
|
||
<h2 id="winning-entry-1998schweikh3">Winning entry: <a href="1998/schweikh3/index.html">1998/schweikh3</a></h2>
|
||
<h3 id="winning-entry-source-code-schweikh3.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh3/schweikh3.c">schweikh3.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh3/schweikh3.alt.c">alternate
|
||
code</a> which allows one
|
||
to reconfigure the size constant in the rare case that the author wrote about
|
||
occurs.</p>
|
||
<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
|
||
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
|
||
count and/or type changed in main() in some older
|
||
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
|
||
the commands that we suggested. One command was not added, that of the to use
|
||
command.</p>
|
||
<p>Cody also made the <code>Makefile</code> rule <code>all</code> symlink the entry to <code>samefile</code> as that
|
||
is the name of the program.</p>
|
||
<p>The author stated that:</p>
|
||
<pre><code> In the remote event that the input has more than `8192` files with
|
||
the same size (on systems where `sizeof (char *) == 4`, or `4096` when
|
||
`sizeof (char *) == 8`), increase the manifest constant 32767 on line
|
||
31.</code></pre>
|
||
<p>so Cody changed the constant to a macro in the <code>Makefile</code> called <code>SZ</code> so one can
|
||
more easily do this (though it indeed seems highly unlikely). See the index.html
|
||
for more details.</p>
|
||
<p>There actually is a web page for the tool and this was added to the author
|
||
information for the entry. It has not been added to any JSON file.</p>
|
||
<div id="1998_tomtorfs">
|
||
<h2 id="winning-entry-1998tomtorfs">Winning entry: <a href="1998/tomtorfs/index.html">1998/tomtorfs</a></h2>
|
||
<h3 id="winning-entry-source-code-tomtorfs.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/tomtorfs/tomtorfs.c">tomtorfs.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed the assumption that <code>EOF</code> is <code>-1</code> (the author noted that it assumes
|
||
it is <code>-1</code> and it’s indeed a valid concern as the standard only guarantees that
|
||
it’s a value <code>< 0</code>) and that <code>1</code> is a valid code to return failure (it seems
|
||
unlikely that it wouldn’t be but since the author suggested it it was changed to
|
||
<code>EXIT_FAILURE</code>). To make it so the lines end at the same columns as the original
|
||
the <code>EXIT_FAILURE</code> change was done by redefining <code>exit(3)</code> to be <code>exit(a) return EXIT_FAILURE</code> and <code>1</code> was passed to it (<code>return</code> was used because the original
|
||
program had <code>return 1</code>).</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/tomtorfs/try.sh">try.sh</a> script to try out a few
|
||
commands that we recommended.</p>
|
||
<div id="2000">
|
||
<h1 id="the-15th-ioccc"><a href="2000/index.html">2000 - The 15th IOCCC</a></h1>
|
||
</div>
|
||
<div id="2000_anderson">
|
||
<h2 id="winning-entry-2000anderson">Winning entry: <a href="2000/anderson/index.html">2000/anderson</a></h2>
|
||
<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>
|
||
<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
|
||
the libc function gets(3) changed to use
|
||
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>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/anderson/try.sh">try.sh</a> script.</p>
|
||
<div id="2000_bmeyer">
|
||
<h2 id="winning-entry-2000bmeyer">Winning entry: <a href="2000/bmeyer/index.html">2000/bmeyer</a></h2>
|
||
<h3 id="winning-entry-source-code-bmeyer.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/bmeyer//bmeyer.c">bmeyer.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/bmeyer/try.sh">try.sh</a> script with some improvements to the
|
||
commands we recommended like not assuming the number of columns one has in their
|
||
terminal.</p>
|
||
<div id="2000_briddlebane">
|
||
<h2 id="winning-entry-2000briddlebane">Winning entry: <a href="2000/briddlebane/index.html">2000/briddlebane</a></h2>
|
||
<h3 id="winning-entry-source-code-briddlebane.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/briddlebane//briddlebane.c">briddlebane.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this to compile in systems that require one to explicitly link in
|
||
<code>libm</code>.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/briddlebane/try.sh">try.sh</a> script for those who are
|
||
feeling a bit too confident, cocky or even happy :-)</p>
|
||
<div id="2000_dhyang">
|
||
<h2 id="winning-entry-2000dhyang">Winning entry: <a href="2000/dhyang/index.html">2000/dhyang</a></h2>
|
||
<h3 id="winning-entry-source-code-dhyang.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/dhyang//dhyang.c">dhyang.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> made this more portable by changing the <code>void main</code> to <code>int main</code>.</p>
|
||
<p>He also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/dhyang/try.sh">try.sh</a> script.</p>
|
||
<div id="2000_dlowe">
|
||
<h2 id="winning-entry-2000dlowe">Winning entry: <a href="2000/dlowe/index.html">2000/dlowe</a></h2>
|
||
<h3 id="winning-entry-source-code-dlowe.c-1">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/dlowe//dlowe.c">dlowe.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this to compile with more recent perl versions; the symbol that’s now
|
||
<code>PL_na</code> was once <code>na</code>.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/dlowe/try.sh">try.sh</a> script.</p>
|
||
<div id="2000_jarijyrki">
|
||
<h2 id="winning-entry-2000jarijyrki">Winning entry: <a href="2000/jarijyrki/index.html">2000/jarijyrki</a></h2>
|
||
<h3 id="winning-entry-source-code-jarijyrki.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/jarijyrki//jarijyrki.c">jarijyrki.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> made it easier to compile this in some cases by adding <code>X11/</code> to the
|
||
includes of <code>Xlib.h</code> and <code>keysym.h</code>.</p>
|
||
<div id="2000_natori">
|
||
<h2 id="winning-entry-2000natori">Winning entry: <a href="2000/natori/index.html">2000/natori</a></h2>
|
||
<h3 id="winning-entry-source-code-natori.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/natori//natori.c">natori.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this for modern compilers. Depending on the compiler it would either
|
||
segfault when run or not compile at all (<code>gcc</code> and <code>clang</code> respectively). The
|
||
compiler fix is due to <code>clang</code> being more strict about arg types to <code>main()</code>.</p>
|
||
<p>Cody also provided <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/natori/natori.alt.c">alternate code</a> that
|
||
supports the southern hemisphere, based on the author’s remarks.</p>
|
||
<p>Cody also provided the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/natori/try.sh">try.sh</a> and
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/natori/try.alt.sh">try.alt.sh</a> scripts that show the Moon phase in
|
||
artistic ways. It is recommended one try both a number of times in a row on
|
||
different days (that is run <code>./try.sh</code> several times in a row a few days apart,
|
||
until you see all the Moon phases, and run <code>./try.alt.sh</code> a few times in a row a
|
||
few days apart, until you see all the Moon phases).</p>
|
||
<p>Later on Cody restored the <code>#include</code>s in the source code which had been changed
|
||
by us to make it a one-liner again but this was an error as it was not a
|
||
one-liner but rather a small program. At the same point Cody made the code
|
||
itself a one-line like the code is in the original entry. Now it looks much more
|
||
like the original entry but with the two fixes.</p>
|
||
<p>Finally Cody fixed the <code>Makefile</code> that had the <code>-Wno-foo</code> options in the <code>CDEFINE</code>
|
||
variable which although works it is incongruent with the other Makefiles and is
|
||
more confusing (though not really).</p>
|
||
<div id="2000_primenum">
|
||
<h2 id="winning-entry-2000primenum">Winning entry: <a href="2000/primenum/index.html">2000/primenum</a></h2>
|
||
<h3 id="winning-entry-source-code-primenum.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/primenum//primenum.c">primenum.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> made this more portable by changing the <code>void main</code> to <code>int main</code>.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/primenum/try.sh">try.sh</a> script.</p>
|
||
<div id="2000_rince">
|
||
<h2 id="winning-entry-2000rince">Winning entry: <a href="2000/rince/index.html">2000/rince</a></h2>
|
||
<h3 id="winning-entry-source-code-rince.c-2">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/rince//rince.c">rince.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/rince/try.sh">try.sh</a> script.</p>
|
||
<div id="2000_robison">
|
||
<h2 id="winning-entry-2000robison">Winning entry: <a href="2000/robison/index.html">2000/robison</a></h2>
|
||
<h3 id="winning-entry-source-code-robison.c-1">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/robison//robison.c">robison.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed an infinite loop that occurred if invalid input was entered, flooding
|
||
the screen with:</p>
|
||
<pre><code> Black position and direction: illegal</code></pre>
|
||
<p>This was fixed by having the <code>scanf(3)</code> read in a string and then use <code>atoi(3)</code>
|
||
on it to assign to the <code>int</code>s, much like with <a href="#1987_lievaart">1987/lievaart</a>.
|
||
The strings are <code>char[5]</code> and the <code>%</code> specifier is <code>%4s</code> which is enough for the
|
||
game.</p>
|
||
<div id="2000_schneiderwent">
|
||
<h2 id="winning-entry-2000schneiderwent">Winning entry: <a href="2000/schneiderwent/index.html">2000/schneiderwent</a></h2>
|
||
<h3 id="winning-entry-source-code-schneiderwent.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/schneiderwent//schneiderwent.c">schneiderwent.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/schneiderwent/try.sh">try.sh</a> script.</p>
|
||
<div id="2000_thadgavin">
|
||
<h2 id="winning-entry-2000thadgavin">Winning entry: <a href="2000/thadgavin/index.html">2000/thadgavin</a></h2>
|
||
<h3 id="winning-entry-source-code-thadgavin.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/thadgavin//thadgavin.c">thadgavin.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed the code and added an appropriate make rule so that the
|
||
<a href="https://www.libsdl.org">SDL</a> version works independent from the curses version
|
||
(using the same code). See below for an interesting problem that occurred that
|
||
had to be resolved for SDL1.</p>
|
||
<p>Cody also added <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/thadgavin/thadgavin.alt.c">alternate code</a> to allow
|
||
one to slow down the code to get a better idea of what the program looked like
|
||
back in 2000, with modern systems. This code also, at least for the curses mode, allows
|
||
one to quit at any time by pressing ‘q’. Note that this alternate version only
|
||
will impact the curses and the SDL versions as Cody does not have a DOS system
|
||
to test the other version in.</p>
|
||
<p>Due to a terrible design choice of the SDL1 developers something had to be
|
||
changed. As was noted in the log at the time:</p>
|
||
<pre><code> The SDL version did not work for a number of reasons. First of all the
|
||
code requires that SDL is defined. Second the path[sic] wrong header file was
|
||
included. Third the SDL1 developers thought it would be a great idea
|
||
(but obviously it's a terrible idea) to redefine main() (!!) so that any
|
||
program that uses SDL1 has to have the same args as their definition.
|
||
This program had 'main()' so the error message was:
|
||
|
||
thadgavin.c:60:1: error: conflicting types for 'SDL_main'
|
||
main()
|
||
^
|
||
/opt/local/include/SDL/SDL_main.h:34:14: note: expanded from macro 'main'
|
||
#define main SDL_main
|
||
^
|
||
/opt/local/include/SDL/SDL_main.h:35:12: note: previous declaration is here
|
||
extern int SDL_main(int argc, char *argv[]);
|
||
^
|
||
1 warning and 1 error generated.
|
||
make: *** [thadgavin_sdl] Error 1
|
||
|
||
Thus main() was changed to 'int main(int argc, char **argv)'.</code></pre>
|
||
<div id="2000_tomx">
|
||
<h2 id="winning-entry-2000tomx">Winning entry: <a href="2000/tomx/index.html">2000/tomx</a></h2>
|
||
<h3 id="winning-entry-source-code-tomx.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/tomx//tomx.c">tomx.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/tomx/tomx.alt.c">alternate code</a> based on the
|
||
author’s remarks with a fix for modern systems and he also added the two
|
||
scripts, <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/tomx/try.sh">try.sh</a> and <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/tomx/try.alt.sh">try.alt.sh</a> for
|
||
the main code and the alternate code respectively.</p>
|
||
<p>And although the scripts do <code>chmod +x</code> on the source code (see the index.html for
|
||
details) the source code is now executable by default.</p>
|
||
<div id="2001">
|
||
<h1 id="the-16th-ioccc"><a href="2001/index.html">2001 - The 16th IOCCC</a></h1>
|
||
</div>
|
||
<div id="2001_anonymous">
|
||
<h2 id="winning-entry-2001anonymous">Winning entry: <a href="2001/anonymous/index.html">2001/anonymous</a></h2>
|
||
<h3 id="winning-entry-source-code-anonymous.c-1">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/anonymous//anonymous.c">anonymous.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed both the supplementary program and the program itself (both of which
|
||
segfaulted and once that was fixed only the binary was modified; it was not run
|
||
but according to the author’s remarks it should be executed). He managed to do
|
||
this with Linux but it will not work with any system that does not allow one to
|
||
compile 32-bit ELF binaries. See <a href="bugs.html#2001_anonymous">2001/anonymous in bugs.html</a> for
|
||
why this is; <em>this is <strong>not</strong> a bug, it’s a feature</em> inherent in what it does!</p>
|
||
<p>The following had to be done to fix this:</p>
|
||
<ul>
|
||
<li><code>#include <sys/mman.h></code> for <code>mmap()</code> and <code>munmap()</code>.</li>
|
||
<li>have <code>main()</code> call another function which is no longer a recursive function;
|
||
this prevented <code>main()</code> from entering an infinite recursive loop.</li>
|
||
</ul>
|
||
<p>Without these it would crash and prevent modification of the 32-bit
|
||
<a href="https://en.wikipedia.org/wiki/Executable_and_Linkable_Format">ELF</a> (not elf :-) )
|
||
binary. But again see <a href="bugs.html#2001_anonymous">2001/anonymous in bugs.html</a>
|
||
for this.</p>
|
||
<p>These also had to be done:</p>
|
||
<ul>
|
||
<li>when <code>open()</code>ing the file the file descriptor had to be saved so it could be
|
||
closed prior to executing the program. This is the <code>f</code> variable which an <code>int</code>.</li>
|
||
<li><code>munmap()</code> also had to be called prior to executing the program. This involved
|
||
a new <code>off_t N</code> which was added in the <code>mmap()</code> call which was then used in
|
||
the <code>munmap()</code> call.</li>
|
||
</ul>
|
||
<p>Without those changes the program was not executed after modification which it
|
||
was supposed to do; instead it reported text file busy error.</p>
|
||
<p>Notice that the location of <code>munmap()</code> and <code>close()</code> followed by <code>execv()</code> <em>does
|
||
matter</em>!</p>
|
||
<p>To get this to compile with <code>clang</code>, <code>main()</code> had to change from:</p>
|
||
<pre><code> main (char *ck, char **k)</code></pre>
|
||
<p>to:</p>
|
||
<pre><code> main (int cka, char **k) { char *ck = (char *)cka; /* ... */ }</code></pre>
|
||
<p>The following was also done to be more portable, in case the constants
|
||
<code>PROT_READ</code> and/or <code>PROT_WRITE</code> are not standardised or some platform does not
|
||
follow it: change <code>3</code> in the call to <code>mmap()</code> to be <code>PROT_READ|PROT_WRITE</code>: just in case
|
||
<code>PROT_READ|PROT_WRITE</code> does not equal <code>3</code> (though it seems to be equal in both
|
||
macOS and Linux).</p>
|
||
<p>NOTE: there might be educational value to see the progress of this fix; if you
|
||
wish to see, try the following commands from the <code>2001/anonymous</code> directory:</p>
|
||
<pre><code> git diff d2a42f42e8f477f29e9d5ed09ce2bb349eaf7397..93aa8d79f208dcccc3c5a2370a727b5cf64e9c53 anonymous.c
|
||
git diff 93aa8d79f208dcccc3c5a2370a727b5cf64e9c53..c48629017117379a52b1a512ef8f2593ca9569c8 anonymous.c
|
||
git diff c48629017117379a52b1a512ef8f2593ca9569c8..efdee208a2bc650256637b9357ddfd0de82d2f41 anonymous.c
|
||
git diff efdee208a2bc650256637b9357ddfd0de82d2f41..e9a3f77ea3b209e63ac3f9c06bb84ad86e5ea706 anonymous.c
|
||
git diff d2a42f42e8f477f29e9d5ed09ce2bb349eaf7397..2159caec4677e0f25ad704a74e04c8196fd6c343 anonymous.c
|
||
git diff 2159caec4677e0f25ad704a74e04c8196fd6c343..4bc03de321612869aebf855850c6500df95cb6ef anonymous.c</code></pre>
|
||
<p>Finally to see from start to finish:</p>
|
||
<pre><code> git diff d2a42f42e8f477f29e9d5ed09ce2bb349eaf7397..4bc03de321612869aebf855850c6500df95cb6ef anonymous.c</code></pre>
|
||
<p>or to not use <code>git</code>:</p>
|
||
<pre><code> make diff_orig_prog</code></pre>
|
||
<p>Cody also added a <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/anonymous/anonymous.bed.c">supplementary program</a> like
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/anonymous/anonymous.ten.c">anonymous.ten.c</a> (which ‘sings’ the
|
||
lyrics to <a href="https://en.wikipedia.org/wiki/Ten_Green_Bottles">Ten Green Bottles</a>)
|
||
but which sings <a href="https://allnurseryrhymes.com/ten-in-the-bed/">Ten in the Bed</a>
|
||
instead (the way it’s implemented is different and this allows showing more of
|
||
what the entry supports).</p>
|
||
<p>As well he added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/anonymous/try.sh">try.sh</a> script so that one can
|
||
attempt to use the program as it was designed but if compiling as 32-bit fails
|
||
it will at least run the supplementary program as a 64-bit program directly.</p>
|
||
<div id="2001_bellard">
|
||
<h2 id="winning-entry-2001bellard">Winning entry: <a href="2001/bellard/index.html">2001/bellard</a></h2>
|
||
<h3 id="winning-entry-source-code-bellard.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/bellard//bellard.c">bellard.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this to compile with <code>clang</code> but according to the author this will not
|
||
work without i386 Linux. It generates i386 32-bit code (not bytecode) but
|
||
unfortunately it will not work without i386 Linux. See <a href="bugs.html#2001_bellard">2001/bellard in
|
||
bugs.html</a>.</p>
|
||
<p>Cody fixed an earlier segfault so that it can at least now open the file should
|
||
you have an i386 Linux machine (it can open it in other platforms too, of
|
||
course, but it won’t work). This involved pointer updates and also changing an
|
||
<code>int</code> to a <code>FILE *</code>. Where possible he left the macros as the same but in the
|
||
case of <code>main()</code> this was not possible.</p>
|
||
<p><a href="#yusuke">Yusuke</a> added another change (see below) to make it even more portable across
|
||
compilers besides what Cody did.</p>
|
||
<p>Cody entirely fixed the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/bellard/bellard.otccex.c">supplementary
|
||
bellard.otccex.c</a> so it does not segfault and
|
||
works as well (it did not work at all though it is possible it would work in
|
||
older systems). The main problem was that some <code>int</code>s were
|
||
being used as pointers. This includes, for example, an <code>int</code> used as a <code>char *</code>,
|
||
an <code>int</code> used as a function pointer and an <code>int</code> to access <code>argv</code> as well as there
|
||
being invalid access to <code>argv</code>. He updated the <code>Makefile</code> so that this program
|
||
will compile by default.</p>
|
||
<p>Also the Fibonacci sequence (<code>fib()</code>) will overflow at <code>n > 48</code> so this is
|
||
checked prior to running the function just like the author did for the factorial
|
||
(overflowing at <code>>12</code>). Either way unfortunately this entry seems to not work in
|
||
64-bit Linux or macOS. See below portability notes as well as another fix in
|
||
this entry by Yusuke.</p>
|
||
<h2 id="portability-notes">Portability notes:</h2>
|
||
<p>With a tip from Yusuke we rediscovered the author’s <a href="https://bellard.org/otcc/">web page for this
|
||
program</a> where it is stated that this will only work
|
||
in i386 Linux. The author also stated in the remarks in this document that they
|
||
used <code>gcc 2.95.2</code> but we do not know if that’s relevant or not.</p>
|
||
<p>Yusuke offered a modification which is not needed with <code>gcc</code> but with some
|
||
versions of <code>clang</code> it is. With <code>gcc</code> we can get away with <code>-rdynamic -fno-pie -Wl,-z,execstack</code> which solves the problem of execution in memory but any
|
||
compiler that does not support this would not work. Thus we use the modification
|
||
by Yusuke.</p>
|
||
<div id="2001_cheong">
|
||
<h2 id="winning-entry-2001cheong">Winning entry: <a href="2001/cheong/index.html">2001/cheong</a></h2>
|
||
<h3 id="winning-entry-source-code-cheong.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/cheong//cheong.c">cheong.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this to compile with <code>clang</code> by adding another function that is allowed to
|
||
have a third arg as an <code>int</code>, not a <code>char **</code>. He chose <code>pain()</code> because it’s a four
|
||
letter word that would match the format and because it’s pain that <code>clang</code> forces
|
||
this. :-) This fix makes a point of the author’s notes on portability no longer
|
||
valid, BTW.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/cheong/try.sh">try.sh</a> script.</p>
|
||
<div id="2001_coupard">
|
||
<h2 id="winning-entry-2001coupard">Winning entry: <a href="2001/coupard/index.html">2001/coupard</a></h2>
|
||
<h3 id="winning-entry-source-code-coupard.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/coupard//coupard.c">coupard.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added a value to <code>return</code> in <code>main()</code> to make it more portable.</p>
|
||
<p>Cody fixed this to compile with <code>clang</code> in Linux. The problem was C99 does not
|
||
support implicit int:</p>
|
||
<pre><code> coupard.c:31:10: error: parameter 'h' was not declared, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
|
||
void e(n,h){
|
||
^
|
||
coupard.c:31:8: error: parameter 'n' was not declared, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
|
||
void e(n,h){
|
||
^</code></pre>
|
||
<p>and for some reason it was being reported as an error.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/coupard/try.sh">try.sh</a> script.</p>
|
||
<p><a href="#yusuke">Yusuke</a> provided a proper command line for those without <code>/dev/audio</code>
|
||
or <code>/dev/sound/dsp</code> (which is most everyone nowadays, it seems, and especially
|
||
those with macOS) (to do with sound; see his
|
||
<a href="2013/endoh3/index.html">2013/endoh3/index.html</a> entry where he also refers to
|
||
sound devices in macOS).</p>
|
||
<div id="2001_ctk">
|
||
<h2 id="winning-entry-2001ctk">Winning entry: <a href="2001/ctk/index.html">2001/ctk</a></h2>
|
||
<h3 id="winning-entry-source-code-ctk.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/ctk//ctk.c">ctk.c</a></h3>
|
||
</div>
|
||
<p>The ANSI escape codes were no longer valid but <a href="#yusuke">Yusuke</a> provided a patch to fix
|
||
the ANSI escape codes. This works with both Linux and macOS.</p>
|
||
<p><a href="#cody">Cody</a> fixed this so that it should always restore terminal sanity (echo enabled
|
||
etc.) after exiting even if you don’t press ‘q’, if you crash or if you kill the
|
||
program prematurely. This was done by adding an explicit call to <code>e()</code> at the
|
||
end of <code>main()</code>.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/ctk/ctk.alt.c">alternate code</a> that adds
|
||
vi(m) movement keys.</p>
|
||
<div id="2001_dgbeards">
|
||
<h2 id="winning-entry-2001dgbeards">Winning entry: <a href="2001/dgbeards/index.html">2001/dgbeards</a></h2>
|
||
<h3 id="winning-entry-source-code-dgbeards.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/dgbeards//dgbeards.c">dgbeards.c</a></h3>
|
||
</div>
|
||
<p>The author provided two changes: one to speed it up and one to make it not crash
|
||
on losing. <a href="#cody">Cody</a> provided an <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/dgbeards/dgbeards.alt.c">alternate
|
||
version</a> which does the former but
|
||
not the latter as he he felt that the idea of crashing on losing (see the
|
||
index.html for details on why that might be) too good to get rid. The author
|
||
explains how to make this change, however.</p>
|
||
<p>Cody also points out that there is a way to get the computer to automatically lose
|
||
very quickly. Do you know what it is?</p>
|
||
<div id="2001_herrmann1">
|
||
<h2 id="winning-entry-2001herrmann1">Winning entry: <a href="2001/herrmann1/index.html">2001/herrmann1</a></h2>
|
||
<h3 id="winning-entry-source-code-herrmann1.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/herrmann1//herrmann1.c">herrmann1.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this so that the when compiling the code the program is not executed
|
||
itself by itself which just showed the usage string and exited. The <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/herrmann1/herrmann1.sh">script
|
||
herrmann1.sh</a> is how one should compile the program but
|
||
it’s also how you invoke the program.</p>
|
||
<p>Cody provided the file <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/herrmann1/plus1.turing">plus1.turing</a> based on the
|
||
author’s remarks.</p>
|
||
<p>He also fixed the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/herrmann1/herrmann1.sh">script herrmann1.sh</a> for
|
||
shellcheck. In particular there were quite a few:</p>
|
||
<pre><code> SC2086 (info): Double quote to prevent globbing and word splitting.
|
||
SC2248 (style): Prefer double quoting even when variables don't contain special characters.</code></pre>
|
||
<p>errors/warnings.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/herrmann1/try.sh">try.sh</a> script.</p>
|
||
<div id="2001_herrmann2">
|
||
<h2 id="winning-entry-2001herrmann2">Winning entry: <a href="2001/herrmann2/index.html">2001/herrmann2</a></h2>
|
||
<h3 id="winning-entry-source-code-herrmann2.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/herrmann2//herrmann2.c">herrmann2.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this to work with both 64-bit and 32-bit compilers by changing most
|
||
of the <code>int</code>s (all but that in <code>main(int ...)</code>) to <code>long</code>s. He also fixed it to
|
||
compile with <code>clang</code> by changing the args of <code>main</code> to be <code>int</code> and <code>char **</code>,
|
||
respectively, and changing specific references to the <code>argv</code> arg, casting to
|
||
<code>long</code> (was <code>int</code> but the 64-bit fix requires <code>long</code>) which was its old type.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/herrmann2/try.sh">try.sh</a> script which might be more
|
||
useful than any other place as the command to try is quite long with C code.</p>
|
||
<p>For some reason the original code was missing (presumingly because it had been
|
||
added to <code>.gitignore</code> by accident) but Cody restored it from the archive.</p>
|
||
<div id="2001_kev">
|
||
<h2 id="winning-entry-2001kev">Winning entry: <a href="2001/kev/index.html">2001/kev</a></h2>
|
||
<h3 id="winning-entry-source-code-kev.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/kev//kev.c">kev.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> improved the <code>Makefile</code> to allow one to more easily set up the port,
|
||
speed and <code>socket(2)</code> call that the author had set up.</p>
|
||
<p>Cody also slowed down the ball just a tad (it was already a <code>-D</code> macro that was used
|
||
in the code) as it went too fast for the speed at which the paddles move even
|
||
when holding down the movement keys (but see below).</p>
|
||
<p>Cody also provided an <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/kev/kev.alt.c">alternate version</a> which lets you use
|
||
the arrow keys on your keyboard instead of the more awkward ‘<code>,</code>’ and ‘<code>.</code>’.</p>
|
||
<p>Cody updated both versions to have <code>#ifndef..#endif</code> pairs for the macros so one
|
||
can more easily configure different settings without having to specify all of
|
||
them (though this change became unnecessary with an improvement on how it was
|
||
done). The speed, <code>SPEED</code>, will be set to <code>50</code> if it’s not defined at the compiler
|
||
line as <code>50</code> is what it used to be set to. This way it’s more to the original but
|
||
without having to sacrifice playability by running <code>make</code>.</p>
|
||
<div id="2001_ollinger">
|
||
<h2 id="winning-entry-2001ollinger">Winning entry: <a href="2001/ollinger/index.html">2001/ollinger</a></h2>
|
||
<h3 id="winning-entry-source-code-ollinger.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/ollinger//ollinger.c">ollinger.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/ollinger/try.sh">try.sh</a> script.</p>
|
||
<div id="2001_schweikh">
|
||
<h2 id="winning-entry-2001schweikh">Winning entry: <a href="2001/schweikh/index.html">2001/schweikh</a></h2>
|
||
<h3 id="winning-entry-source-code-schweikh.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/schweikh//schweikh.c">schweikh.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this to not crash if not enough args as this was not documented by
|
||
the author. The other problems are documented so were not fixed. See
|
||
index.html for details.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/schweikh/try.sh">try.sh</a> script.</p>
|
||
<div id="2001_westley">
|
||
<h2 id="winning-entry-2001westley">Winning entry: <a href="2001/westley/index.html">2001/westley</a></h2>
|
||
<h3 id="winning-entry-source-code-westley.c-8">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/westley//westley.c">westley.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the script <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/westley/try.sh">try.sh</a> to
|
||
automate a heap of commands that we, the IOCCC judges, suggested, as well as
|
||
some additional ones that he thought would be fun. He also provided the sort
|
||
and punch card versions, described in the index.html, based on the author’s
|
||
remarks, through <code>Makefile</code> rules that generate the files by default with <code>make all</code>.</p>
|
||
<div id="2004">
|
||
<h1 id="the-17th-ioccc"><a href="2004/index.html">2004 - The 17th IOCCC</a></h1>
|
||
</div>
|
||
<div id="2004_anonymous">
|
||
<h2 id="winning-entry-2004anonymous">Winning entry: <a href="2004/anonymous/index.html">2004/anonymous</a></h2>
|
||
<h3 id="winning-entry-source-code-anonymous.c-2">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/anonymous//anonymous.c">anonymous.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/anonymous/try.sh">try.sh</a> script.</p>
|
||
<div id="2004_arachnid">
|
||
<h2 id="winning-entry-2004arachnid">Winning entry: <a href="2004/arachnid/index.html">2004/arachnid</a></h2>
|
||
<h3 id="winning-entry-source-code-arachnid.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/arachnid//arachnid.c">arachnid.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added an <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/arachnid/arachnid.alt.c">alternate
|
||
version</a> which
|
||
allows those like himself used to <code>h</code>, <code>j</code>, <code>k</code> and <code>l</code> movement keys to not get
|
||
lost. Non rogue players, vi users and Dvorak typists are invited to get lost (or
|
||
use the original version)! :-)</p>
|
||
<p>Cody also renamed the <code>arachnid.info</code> file to
|
||
<a href="2004/arachnid/arachnid.txt">arachnid.txt</a> as it’s not really an informative
|
||
file but a maze file. The extension <code>.maz</code> was not chosen to help with (some?)
|
||
browsers knowing what to do with it.</p>
|
||
<div id="2004_burley">
|
||
<h2 id="winning-entry-2004burley">Winning entry: <a href="2004/burley/index.html">2004/burley</a></h2>
|
||
<h3 id="winning-entry-source-code-burley.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/burley//burley.c">burley.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this to compile with <code>clang</code> and to work with both <code>gcc</code> and
|
||
<code>clang</code> (even after fixing it to compile with <code>clang</code> it did not work properly).</p>
|
||
<p>For <code>clang</code> the problem was that <code>main()</code> had one arg, a <code>char *</code> and this is not
|
||
allowed in any version of <code>clang</code>. In some versions it is allowed if the arg is an
|
||
<code>int</code> but never if it’s anything else. To get it to work took numerous changes.</p>
|
||
<p>First the inclusion of <code>setjmp.h</code> was necessary. Without this <code>longjmp(3)</code>
|
||
implicitly returned <code>int</code> which was used for the purpose of binary expression but
|
||
this no longer appeared to work (though it might be that if the extra function
|
||
was added earlier on it would but this is unknown and the way it was changed is
|
||
safer for the future).</p>
|
||
<p>But by including <code>setjmp.h</code> it naturally made the binary expressions invalid (as
|
||
it returns <code>void</code> which is not allowed in binary expressions) so the comma
|
||
operator with <code>0</code> (<code>,0</code>) had to be used (<code>,1</code> was tried first but this did not
|
||
work right so you can see that it had to be false in those places, though it is
|
||
unknown by Cody if this is because it used to be allowed to have binary
|
||
expression with <code>void</code> or if it is for some other reason).</p>
|
||
<p><code>longjmp(3)</code> was being called with one arg which was an element
|
||
of an <code>int[4][1000]</code> which had to be changed to a <code>jmp_buf p[4]</code> (this due to
|
||
the prototype being included).</p>
|
||
<p><code>main()</code> also called itself but this was a problem so it now calls another
|
||
function <code>poke()</code> which calls itself instead (this is sometimes necessary
|
||
nowadays and other entries had to have this same kind of change,
|
||
<a href="2001/anonymous/index.html">2001/anonymous</a> being a good example).</p>
|
||
<p>Finally the optimiser cannot be enabled so the compiler flags were changed for
|
||
this, forcing <code>-O0</code>.</p>
|
||
<div id="2004_gavare">
|
||
<h2 id="winning-entry-2004gavare">Winning entry: <a href="2004/gavare/index.html">2004/gavare</a></h2>
|
||
<h3 id="winning-entry-source-code-gavare.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/gavare//gavare.c">gavare.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added three different <a href="2004/gavare/index.html#alternate-code">alternate
|
||
versions</a>:</p>
|
||
<ul>
|
||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/gavare/gavare.alt.c">gavare.alt.c</a> allows you to change the image size
|
||
and anti-alias setting at compile time. This is based on the author’s remarks.</li>
|
||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/gavare/gavare.alt2.c">gavare.alt2.c</a> is like
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/gavare/gavare.alt.c">gavare.alt.c</a> but it should work for Windows as well
|
||
(it sets binary mode on <code>stdout</code>). This is also based on the author’s remarks.</li>
|
||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/gavare/gavare.r3.c">gavare.r3.c</a> is the author’s unobfuscated version
|
||
that was used during development, found on their <a href="https://gavare.se/ioccc/ioccc_gavare.c.html">website about the
|
||
entry</a>.</li>
|
||
</ul>
|
||
<div id="2004_gavin">
|
||
<h2 id="winning-entry-2004gavin">Winning entry: <a href="2004/gavin/index.html">2004/gavin</a></h2>
|
||
<h3 id="winning-entry-source-code-gavin.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/gavin//gavin.c">gavin.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> provided the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/gavin/gavin.alt.c">alternate code</a> for
|
||
those who want to use QEMU. The most important part of this is the macro <code>K</code> has
|
||
to be defined as <code>1</code>, not <code>0</code>.</p>
|
||
<p><a href="#yusuke">Yusuke</a> provided the <code>kernel</code> and <code>fs.tar</code> files which can be used if
|
||
you cannot normally use this entry. Instead of generating the files just use the
|
||
files provided, found under the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/gavin/img/">img/</a> directory. Note that
|
||
the <code>img/fs.tar</code> extracts into <code>fs/</code> so you will have to fix the tarball; this
|
||
is done this way to prevent extraction from the entry directory overwriting the
|
||
files and causing <code>make clobber</code> to wipe some of them out.</p>
|
||
<div id="2004_hibachi">
|
||
<h2 id="winning-entry-2004hibachi">Winning entry: <a href="2004/hibachi/index.html">2004/hibachi</a></h2>
|
||
<h3 id="winning-entry-source-code-hibachi.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/hibachi//hibachi.c">hibachi.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed a bunch of links in the index.html provided with the entry
|
||
(the web server’s index.html) that no longer exist or have changed in some other way (<code>https</code>
|
||
instead of <code>http</code> for instance). In most cases a new link or change to https was
|
||
all that was necessary but at least one or two URLs required the Internet
|
||
Wayback Machine.</p>
|
||
<div id="2004_hoyle">
|
||
<h2 id="winning-entry-2004hoyle">Winning entry: <a href="2004/hoyle/index.html">2004/hoyle</a></h2>
|
||
<h3 id="winning-entry-source-code-hoyle.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/hoyle//hoyle.c">hoyle.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/hoyle/try.sh">try.sh</a> script.</p>
|
||
<div id="2004_jdalbec">
|
||
<h2 id="winning-entry-2004jdalbec">Winning entry: <a href="2004/jdalbec/index.html">2004/jdalbec</a></h2>
|
||
<h3 id="winning-entry-source-code-jdalbec.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/jdalbec//jdalbec.c">jdalbec.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this to compile with <code>gcc</code> (it worked with <code>clang</code>). The problem was the
|
||
cpp being unable to parse the generated code (see the index.html for details) and
|
||
this ended up with a number of errors like:</p>
|
||
<pre><code> jdalbec.c:64:5: error: stray '##' in program
|
||
64 | B N##B (I) ; \
|
||
| ^~
|
||
|
||
|
||
..
|
||
|
||
jdalbec.c:65:5: error: stray '##' in program
|
||
65 | V F##B (B) ; \
|
||
| ^~
|
||
jdalbec.c:65:5: error: expected ';' before 'B'
|
||
65 | V F##B (B) ; \
|
||
| ^ ~
|
||
| ;</code></pre>
|
||
<p>and various other problems. However there does seem to be a problem at least
|
||
with some <code>gcc</code> versions in macOS but this appears to be due to errors in
|
||
<code>/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/sys/cdefs.h</code>.</p>
|
||
<p>Cody also added <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/jdalbec/jdalbec.alt.c">alternate code</a> which allows
|
||
one to control how many numbers after the <code>:</code> to print before printing a
|
||
newline, so that one can see the output a bit better (though for lines that have
|
||
a lot of numbers this will be harder to see).</p>
|
||
<p>Finally Cody added <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/jdalbec/try.sh">try.sh</a> and
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/jdalbec/try.alt.sh">try.alt.sh</a> to demonstrate both versions.</p>
|
||
<div id="2004_kopczynski">
|
||
<h2 id="winning-entry-2004kopczynski">Winning entry: <a href="2004/kopczynski/index.html">2004/kopczynski</a></h2>
|
||
<h3 id="winning-entry-source-code-kopczynski.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/kopczynski//kopczynski.c">kopczynski.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> force disabled the optimiser in the <code>Makefile</code> with <code>-O0</code> as he
|
||
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>
|
||
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
|
||
count and/or type changed in main() in some older
|
||
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
|
||
files: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/kopczynski/kopczynski-a">kopczynski-a</a> to demonstrate what happens when art more
|
||
like a letter is fed to the program and the <code>kopczynski*-rev</code> files which are
|
||
the data files reversed with <code>rev(1)</code>. One had to be modified additionally to
|
||
get it to work, that being <code>kopczynski-10-rev</code>.</p>
|
||
<div id="2004_newbern">
|
||
<h2 id="winning-entry-2004newbern">Winning entry: <a href="2004/newbern/index.html">2004/newbern</a></h2>
|
||
<h3 id="winning-entry-source-code-newbern.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/newbern//newbern.c">newbern.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> and Landon individually fixed this to work with <code>clang</code>.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/newbern/try.sh">try.sh</a> script (with a hidden feature
|
||
that the author referred to and was documented by <a href="#yusuke">Yusuke</a> though Cody
|
||
chose the word <code>IOCCC</code> instead of <code>AAA</code>).</p>
|
||
<div id="2004_omoikane">
|
||
<h2 id="winning-entry-2004omoikane">Winning entry: <a href="2004/omoikane/index.html">2004/omoikane</a></h2>
|
||
<h3 id="winning-entry-source-code-omoikane.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/omoikane//omoikane.c">omoikane.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/omoikane/try.sh">try.sh</a> script.</p>
|
||
<div id="2004_schnitzi">
|
||
<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>
|
||
</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
|
||
the libc function gets(3) changed to use
|
||
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
|
||
fast in modern systems, especially the scrolling text of
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/schnitzi/schnitzi.inp1">schnitzi.inp1</a>.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/schnitzi/try.sh">try.sh</a> script.</p>
|
||
<div id="2004_sds">
|
||
<h2 id="winning-entry-2004sds">Winning entry: <a href="2004/sds/index.html">2004/sds</a></h2>
|
||
<h3 id="winning-entry-source-code-sds.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/sds//sds.c">sds.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/sds/try.sh">try.sh</a> script.</p>
|
||
<p>Also, after the <code>README.md</code> file had copyright changes, it broke the script so
|
||
Cody made a copy of the older <code>README.md</code> file into <code>README_sds.txt</code> and added that
|
||
to the repo for the script instead.</p>
|
||
<div id="2004_vik2">
|
||
<h2 id="winning-entry-2004vik2">Winning entry: <a href="2004/vik2/index.html">2004/vik2</a></h2>
|
||
<h3 id="winning-entry-source-code-vik2.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/vik2//vik2.c">vik2.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this to compile in Linux. Although it compiled cleanly in macOS (and
|
||
BSD?) the code failed to compile at all in Linux due to:</p>
|
||
<pre><code> cc -E vik2_1.c > vik2_2.c
|
||
In file included from vik2.c:945,
|
||
from vik2.c:959,
|
||
from vik2.c:972,
|
||
from vik2.c:1025:
|
||
vik2.c:383:8: error: no macro name given in #ifdef directive
|
||
383 | O \
|
||
| ^
|
||
In file included from vik2.c:946:
|
||
vik2.c:383:8: error: no macro name given in #ifdef directive
|
||
383 | O \
|
||
| ^
|
||
In file included from vik2.c:947:
|
||
vik2.c:383:8: error: no macro name given in #ifdef directive
|
||
383 | O \
|
||
| ^
|
||
In file included from vik2.c:948:
|
||
vik2.c:383:8: error: no macro name given in #ifdef directive
|
||
383 | O \
|
||
| ^
|
||
|
||
...
|
||
|
||
In file included from vik2.c:182:
|
||
|
||
vik2.c:992:85: error: #include nested depth 201 exceeds maximum of 200 (use -fmax-include-depth=DEPTH to increase the maximum)
|
||
992 | I
|
||
| ^
|
||
vik2.c:1497:21: error: #include nested depth 200 exceeds maximum of 200 (use -fmax-include-depth=DEPTH to increase the maximum)
|
||
vik2.c:1498:21: error: #include nested depth 200 exceeds maximum of 200 (use -fmax-include-depth=DEPTH to increase the maximum)
|
||
vik2.c:1499:21: error: #include nested depth 200 exceeds maximum of 200 (use -fmax-include-depth=DEPTH to increase the maximum)
|
||
vik2.c:1500:21: error: #include nested depth 200 exceeds maximum of 200 (use -fmax-include-depth=DEPTH to increase the maximum)
|
||
vik2.c:1501:21: error: #include nested depth 200 exceeds maximum of 200 (use -fmax-include-depth=DEPTH to increase the maximum)
|
||
vik2.c:1504:21: error: #include nested depth 200 exceeds maximum of 200 (use -fmax-include-depth=DEPTH to increase the maximum)
|
||
make: *** [Makefile:133: vik2] Error 1</code></pre>
|
||
<p>Unfortunately the fix required heavy modification to the original file (see
|
||
below) and also inclusion of what used to be generated by the
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/vik2/Makefile">Makefile</a> but now it at least works for both Linux and
|
||
macOS.</p>
|
||
<p>As for the fix itself it required changing the C pre-processor macros that
|
||
resulted in macros themselves like <code>#ifdef</code>, <code>#else</code> etc. to be <code>#ifdef</code>,
|
||
<code>#else</code> etc. and also the inclusion of the file <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/vik2/vik2_1.c">vik2_1.c</a>
|
||
(which actually includes itself, once directly and now by <code>__FILE__</code>)
|
||
which used to be generated by the <code>Makefile</code> via <code>cc -E</code>.</p>
|
||
<p>Cody also made it so that the <code>FNAME</code> is (for the entry file itself and
|
||
<code>vik2_1.c</code> - there are other places it should not be done) <code>__FILE__</code>
|
||
just to make it a bit easier to compile.</p>
|
||
<div id="2005">
|
||
<h1 id="the-18th-ioccc"><a href="2005/index.html">2005 - The 18th IOCCC</a></h1>
|
||
</div>
|
||
<div id="2005_aidan">
|
||
<h2 id="winning-entry-2005aidan">Winning entry: <a href="2005/aidan/index.html">2005/aidan</a></h2>
|
||
<h3 id="winning-entry-source-code-aidan.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/aidan//aidan.c">aidan.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed the test script, described by the author in their remarks, to refer
|
||
to the proper compiled program (it’s hardcoded). This had never been done and so
|
||
the script did not even work (at least modernly?).</p>
|
||
<p>He also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/aidan/aidan.alt.c">alternate code</a> based on the
|
||
author’s remarks which is a different approach than the one used and which
|
||
(according to the author) ‘<code>is slower (particularly in worst-case or nearly so scenarios), inelegant, and not a good starting place for sudoku generation.</code>’</p>
|
||
<p>Cody added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/aidan/try.sh">try.sh</a> and
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/aidan/try.alt.sh">try.alt.sh</a> scripts that correspond to the entry and
|
||
alternate code respectively.</p>
|
||
<p>Cody added the <code>make test</code> and <code>make test-n0</code> rules for easier use of the test
|
||
suite.</p>
|
||
<div id="2005_anon">
|
||
<h2 id="winning-entry-2005anon">Winning entry: <a href="2005/anon/index.html">2005/anon</a></h2>
|
||
<h3 id="winning-entry-source-code-anon.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/anon//anon.c">anon.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed a problem where in some systems (like macOS) the <code>stty sane</code> would
|
||
not work and end up causing a bus error. Instead of <code>stty sane</code> it uses <code>stty echo</code> which is what it was trying to accomplish.</p>
|
||
<p>The author noted that one can define <code>NO_STTY</code> to not use <code>stty(1)</code> at all
|
||
(either to prevent having to hit enter or to turn echo off/on) and this is
|
||
explained in the index.html.</p>
|
||
<p>Cody added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/anon/anon.alt.c">alternate code</a> with vi(m) like
|
||
movements.</p>
|
||
<div id="2005_boutines">
|
||
<h2 id="winning-entry-2005boutines">Winning entry: <a href="2005/boutines/index.html">2005/boutines</a></h2>
|
||
<h3 id="winning-entry-source-code-boutines.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/boutines//boutines.c">boutines.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="2005/boutines/input.txt">input.txt</a> data file based on suggested
|
||
input from the author, adapting it to a command to try out.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/boutines/try.sh">try.sh</a> script.</p>
|
||
<div id="2005_giljade">
|
||
<h2 id="winning-entry-2005giljade">Winning entry: <a href="2005/giljade/index.html">2005/giljade</a></h2>
|
||
<h3 id="winning-entry-source-code-giljade.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/giljade//giljade.c">giljade.c</a></h3>
|
||
</div>
|
||
<p>After Landon fixed the entry to compile with <code>clang</code> <a href="#cody">Cody</a> noticed this
|
||
does not work at all in modern systems (see below). He fixed this to work and
|
||
then he later fixed the self-test feature.</p>
|
||
<p>The problem that was showing up is that with either optimising or if anything
|
||
but 32-bit (as in <code>-m32</code>) was used it would not work (at least in 64-bit
|
||
systems?). The optimising cannot be used still but it now works with both 32-bit
|
||
and 64-bit. The solution has to do with the size difference between <code>int</code> and
|
||
<code>long</code> so that the <code>long*E</code> is now <code>int*E</code>. This solves a specific problem for
|
||
Linux (32-bit, 64-bit) and macOS (arm64).</p>
|
||
<p>To get the self-test feature to work it was required to remove from the code:</p>
|
||
<pre><code> O-b-f-u -s-c-a-t-e;</code></pre>
|
||
<p>as it caused a compilation error in some of the generated code but served no
|
||
purpose, didn’t affect the output of the puzzle and since the ‘string’ is
|
||
already in the code there is no problem omitting it.</p>
|
||
<p>The most complicated fix was for, as might be expected, <code>clang</code>: it (at least
|
||
some systems?) has <code>-Werror</code> by default so the program was changed to use <code>make</code>
|
||
and then <code>rm -f</code> on the output of the compiled binary instead. This change might
|
||
also not have been necessary if using different flags to <code>cc</code> but this is less
|
||
portable and caused other problems. This was a complicated fix as it’s in the
|
||
comments but in a funny way; the final result to get the test feature to work
|
||
is:</p>
|
||
<pre><code> ;; /*echo/Line/%d;sed/-n/-e/ %d,%dp/%s/|sed*/
|
||
/*-e/'s,intZ,int/ Z,g'>c.c;make/c;/ rm/-f/c*/
|
||
;;</code></pre>
|
||
<p>changed from:</p>
|
||
<pre><code> ;; /*echo/Line/%d;sed/-n/-e/ %d,%dp/%s>*/
|
||
/*c.c;cc/c.c /-c*/;;</code></pre>
|
||
<p>or as a diff:</p>
|
||
<pre><code> -(t(m),(0));; /*echo/Line/%d;sed/-n/-e/ %d,%dp/%s>*/
|
||
-/*c.c;cc/c.c /-c*/;;char*A=0,*_,*R,*Q, D[9999],*r,l
|
||
-[9999],T=42, M,V=32;long*E,k[9999],B[1 <<+21],*N=B+
|
||
+(t(m),(0));; /*echo/Line/%d;sed/-n/-e/ %d,%dp/%s/|sed*/
|
||
+/*-e/'s,intZ,int/ Z,g'>c.c;make/c;/ rm/-f/c*/
|
||
+;;char*A=0,*_,*R,*Q, D[9999],*r,l[9999],T=42, M,V=32;int *E,k[9999],B[1 <<+21],*N=B+</code></pre>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/giljade/try.sh">try.sh</a> script which also lets one see
|
||
the beauty of the entry without having to use vi(m), should they be afraid of
|
||
getting stuck in it (and for ease of use). :-)</p>
|
||
<p>Finally, to improve upon the test-suite provided by the program, Cody added the
|
||
<code>make test</code> rule which only shows lines matching <code>'^Line'</code> but writing to a
|
||
temporary file the compilation including the ‘Line’ lines. After that is done it
|
||
uses <code>grep -c</code> on the file to show that there are indeed as many versions the
|
||
program generates as the author states, 180. If it does not find 180 it is an
|
||
error; otherwise it is success. See <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/giljade/test.sh">test.sh</a>.</p>
|
||
<div id="2005_jetro">
|
||
<h2 id="winning-entry-2005jetro">Winning entry: <a href="2005/jetro/index.html">2005/jetro</a></h2>
|
||
<h3 id="winning-entry-source-code-jetro.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/jetro//jetro.c">jetro.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added explicit linking of libm (<code>-lm</code>) for systems like Linux that seem to
|
||
not do it implicitly (like macOS does).</p>
|
||
<div id="2005_klausler">
|
||
<h2 id="winning-entry-2005klausler">Winning entry: <a href="2005/klausler/index.html">2005/klausler</a></h2>
|
||
<h3 id="winning-entry-source-code-klausler.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/klausler//klausler.c">klausler.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/klausler/try.sh">try.sh</a> script.</p>
|
||
<div id="2005_mikeash">
|
||
<h2 id="winning-entry-2005mikeash">Winning entry: <a href="2005/mikeash/index.html">2005/mikeash</a></h2>
|
||
<h3 id="winning-entry-source-code-mikeash.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/mikeash//mikeash.c">mikeash.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this to work in some versions of linux. The problem was an
|
||
unknown escape sequence, <code>\N</code>, which caused a funny compiler error:</p>
|
||
<pre><code> };n b[2048];int i
|
||
mikeash.c: In function 'R':
|
||
mikeash.c:7:1: error: '\N' not followed by '{'
|
||
7 | ;C!='\n';A()
|
||
| ^
|
||
mikeash.c:7:1: error: incomplete universal character name \Ne</code></pre>
|
||
<p>The problem was that in the string above there was a <code>\Newline</code> but this is
|
||
invalid C. This was changed to be <code>\nNewline</code> and then, because the code is
|
||
supposed to output itself when fed itself, the reference to <code>'N'</code> had to be
|
||
updated in both the string and the code to be <code>'n'</code>.</p>
|
||
<p>The array size of <code>c</code> was updated by 1 out of caution just in case as the array
|
||
is used to store at least part of the string.</p>
|
||
<p>It might be worth noting that the author stated that the reason for the <code>\N</code> is
|
||
due to LISP having different escape sequences. The code was modified so that
|
||
feeding the program itself will print itself, showing no difference, which is
|
||
what is supposed to happen. It is not known, however, if having to change the
|
||
<code>\N</code> to <code>\n</code> ended up breaking any LISP. The other examples given by the author
|
||
also show correct output though.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/mikeash/try.sh">try.sh</a> script.</p>
|
||
<div id="2005_mynx">
|
||
<h2 id="winning-entry-2005mynx">Winning entry: <a href="2005/mynx/index.html">2005/mynx</a></h2>
|
||
<h3 id="winning-entry-source-code-mynx.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/mynx//mynx.c">mynx.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this so that the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/mynx/source/configure">configure</a> script (which is not
|
||
needed but part of the entry) would work with compilers that have by default
|
||
<code>-Werror</code> like <code>clang</code> in macOS.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/mynx/mynx.alt.c">alternate code</a> which
|
||
does scan for <code>https</code>. Futile, maybe, based on how <code>https</code> is set up, in which
|
||
case just enjoy it for what it was, without it working with websites that do not
|
||
support <code>http</code>. But there might be some command line that will let it work that
|
||
way or perhaps someone wants to add the necessary code.</p>
|
||
<div id="2005_persano">
|
||
<h2 id="winning-entry-2005persano">Winning entry: <a href="2005/persano/index.html">2005/persano</a></h2>
|
||
<h3 id="winning-entry-source-code-persano.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/persano//persano.c">persano.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the (untested) <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/persano/persano.alt.c">alternate
|
||
code</a> which should work for Windows as
|
||
it sets binary mode on <code>stdout</code>. This was based on the author’s remarks but it
|
||
is untested as Cody has no Windows system to test it on.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/persano/try.sh">try.sh</a> script.</p>
|
||
<div id="2005_sykes">
|
||
<h2 id="winning-entry-2005sykes">Winning entry: <a href="2005/sykes/index.html">2005/sykes</a></h2>
|
||
<h3 id="winning-entry-source-code-sykes.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/sykes//sykes.c">sykes.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the saved (with the <code>SAVE</code> command) BASIC program <code>PET</code> which was:</p>
|
||
<pre><code> 10 PRINT "2005'S IOCCC BEST EMULATOR"
|
||
20 PRINT "BY STEPHEN SYKES!"</code></pre>
|
||
<p>followed by the commands:</p>
|
||
<pre><code> SAVE "PET"
|
||
|
||
READY.
|
||
NEW
|
||
|
||
READY.
|
||
LOAD "PET"
|
||
|
||
READY.
|
||
RUN
|
||
2005'S IOCCC BEST EMULATOR
|
||
BY STEPHEN SYKES!</code></pre>
|
||
<p>to both save and test run it.</p>
|
||
<p>Cody added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/sykes/try.sh">try.sh</a> script which runs in a loop with a
|
||
menu of things one might wish to try, asking if they wish to continue when done.</p>
|
||
<p>Cody added the script <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/sykes/test.sh">test.sh</a> and the make rule <code>test</code> to
|
||
run the test suite. The program will enter an infinite loop after it runs so you
|
||
have to hit ctrl-c to end it which the script tells you.</p>
|
||
<p>The scripts note every time that one will have to send ctrl-c or whatever their
|
||
interrupt is set to in order to exit the program.</p>
|
||
<div id="2005_timwi">
|
||
<h2 id="winning-entry-2005timwi">Winning entry: <a href="2005/timwi/index.html">2005/timwi</a></h2>
|
||
<h3 id="winning-entry-source-code-timwi.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/timwi//timwi.c">timwi.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/timwi/try.sh">try.sh</a>. It only has one command as he doesn’t
|
||
want to knacker his brain any more than it might or might not already be :-) and
|
||
he doesn’t want to damage anyone else’s brain either. :-)</p>
|
||
<div id="2005_toledo">
|
||
<h2 id="winning-entry-2005toledo">Winning entry: <a href="2005/toledo/index.html">2005/toledo</a></h2>
|
||
<h3 id="winning-entry-source-code-toledo.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/toledo//toledo.c">toledo.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this to compile with some versions of <code>clang</code> which have an additional
|
||
defect where <code>main()</code> can only have 0, 2 or 3 args (it was 4). It now calls
|
||
another function that takes 4 args and which is what used to be <code>main()</code>.</p>
|
||
<p>The <a href="2005/toledo/index.html#alternate-code">alternate versions</a> that the author
|
||
provided were also fixed.</p>
|
||
<div id="2005_vince">
|
||
<h2 id="winning-entry-2005vince">Winning entry: <a href="2005/vince/index.html">2005/vince</a></h2>
|
||
<h3 id="winning-entry-source-code-vince.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/vince//vince.c">vince.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this in the case that the program is compiled or linked/copied to
|
||
another file name: the code constructed the source code file name in a clever
|
||
and more obscure way by copying to the buffer <code>*argv</code> and then using <code>strcat(3)</code>
|
||
to concatenate to it <code>.c</code>. But this assumes that the executable is the same name
|
||
as the source file which isn’t always true. The author even stated: ‘<code>as long as the source is in the same directory as the executable it should be able to find it</code>’ but the source code file name is not always the same as the executable
|
||
with the appropriate extension so this might be called a bug fix as well though
|
||
if one runs it from another directory, specifying the directory, it’ll not catch it.</p>
|
||
<div id="2006">
|
||
<h1 id="the-19th-ioccc"><a href="2006/index.html">2006 - The 19th IOCCC</a></h1>
|
||
</div>
|
||
<div id="2006_birken">
|
||
<h2 id="winning-entry-2006birken">Winning entry: <a href="2006/birken/index.html">2006/birken</a></h2>
|
||
<h3 id="winning-entry-source-code-birken.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/birken//birken.c">birken.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed a segfault that prevented this entry from working in macOS.
|
||
The problem was a missing <code>+1</code> for <code>strlen(3)</code> with <code>malloc(3)</code>. This prevented
|
||
it from working.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/birken/try.sh">try.sh</a> script.</p>
|
||
<div id="2006_borsanyi">
|
||
<h2 id="winning-entry-2006borsanyi">Winning entry: <a href="2006/borsanyi/index.html">2006/borsanyi</a></h2>
|
||
<h3 id="winning-entry-source-code-borsanyi.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/borsanyi//borsanyi.c">borsanyi.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed the <code>Makefile</code> to work in systems where the <code>lpthread</code> is not
|
||
implicitly linked in.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/borsanyi/try.sh">try.sh</a> script.</p>
|
||
<div id="2006_grothe">
|
||
<h2 id="winning-entry-2006grothe">Winning entry: <a href="2006/grothe/index.html">2006/grothe</a></h2>
|
||
<h3 id="winning-entry-source-code-grothe.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/grothe//grothe.c">grothe.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/grothe/try.sh">try.sh</a> script.</p>
|
||
<div id="2006_hamre">
|
||
<h2 id="winning-entry-2006hamre">Winning entry: <a href="2006/hamre/index.html">2006/hamre</a></h2>
|
||
<h3 id="winning-entry-source-code-hamre.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/hamre//hamre.c">hamre.c</a></h3>
|
||
</div>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/hamre/try.sh">try.sh</a> script.</p>
|
||
<div id="2006_monge">
|
||
<h2 id="winning-entry-2006monge">Winning entry: <a href="2006/monge/index.html">2006/monge</a></h2>
|
||
<h3 id="winning-entry-source-code-monge.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/monge//monge.c">monge.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/monge/monge.alt.c">alternate code</a> that lets
|
||
one resize the image and redefine the number of iterations.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/monge/try.sh">try.sh</a> and
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/monge/try.alt.sh">try.alt.sh</a> scripts.</p>
|
||
<p>Cody also fixed the <code>Makefile</code> to use <code>sdl-config</code> (which is what the author
|
||
stated too though that was noticed later), not <code>sdl2-config</code> as two functions
|
||
that are used were removed from <a href="https://www.libsdl.org">SDL2</a>,
|
||
thus making it not link. Since SDL2 is still available and since changing the
|
||
code to use SDL2 is much more complicated and also makes the entry less like
|
||
the original it was simply made to link in SDL1.</p>
|
||
<p>Nevertheless this entry does require x86/x86_64 CPUS. This is a documented
|
||
feature but one which we will accept fixes to. See <a href="bugs.html#2006_monge">2006/monge in
|
||
bugs.html</a>.</p>
|
||
<div id="2006_night">
|
||
<h2 id="winning-entry-2006night">Winning entry: <a href="2006/night/index.html">2006/night</a></h2>
|
||
<h3 id="winning-entry-source-code-night.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/night//night.c">night.c</a></h3>
|
||
</div>
|
||
<p>As <a href="#cody">Cody</a> is a lost :-) <code>vim</code> user he took the author’s remarks to add support
|
||
back for arrow keys in the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/night/night.alt.c">alternate version</a>.</p>
|
||
<div id="2006_sloane">
|
||
<h2 id="winning-entry-2006sloane">Winning entry: <a href="2006/sloane/index.html">2006/sloane</a></h2>
|
||
<h3 id="winning-entry-source-code-sloane.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/sloane//sloane.c">sloane.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this entry to work with <code>clang</code> which has a defect with the args to
|
||
<code>main()</code>: it requires specific types: <code>int</code> and <code>char **</code> for the first and
|
||
latter args.</p>
|
||
<p>Cody also provided the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/sloane/sloane.alt.c">alternate version</a>, which
|
||
allows one to see what is going on in modern systems, and which we recommend one
|
||
use <em>first</em>.</p>
|
||
<p>Curiously, although <code>clang</code> requires the types of args to be strictly correct,
|
||
some versions do allow only one arg. This was done at first because it’s not
|
||
used but Cody discovered that later versions of <code>clang</code> have an additional defect
|
||
where it does not allow only one arg so the second arg to <code>main()</code> was added
|
||
back.</p>
|
||
<p>This was an unfortunate problem for the alternate code as he has been using <code>Z</code>
|
||
for alternate code <code>usleep()</code> (for sleep) but in this case unfortunately the
|
||
original entry used <code>Z</code> in <code>main()</code> (though unused) so to make it more like the
|
||
original Cody renamed the macro <code>Z</code> for <code>usleep()</code> to <code>S</code> instead which can
|
||
stand for sleep and also it is kind of like a backwards <code>Z</code>. That way <code>Z</code> could
|
||
be in <code>main()</code>.</p>
|
||
<p>Cody also made sure that the <code>Makefile</code> links in <code>libm</code> as not all systems do this
|
||
by default.</p>
|
||
<p>Since the author suggested that the lack of certain <code>#include</code>s might break the
|
||
program in some systems he also added <code>-include ...</code> to the <code>Makefile</code> as well.</p>
|
||
<div id="2006_stewart">
|
||
<h2 id="winning-entry-2006stewart">Winning entry: <a href="2006/stewart/index.html">2006/stewart</a></h2>
|
||
<h3 id="winning-entry-source-code-stewart.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/stewart//stewart.c">stewart.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/stewart/try.sh">try.sh</a> script.</p>
|
||
<div id="2006_sykes1">
|
||
<h2 id="winning-entry-2006sykes1">Winning entry: <a href="2006/sykes1/index.html">2006/sykes1</a></h2>
|
||
<h3 id="winning-entry-source-code-sykes1.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/sykes1//sykes1.c">sykes1.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> provided the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/sykes1/sykes1.alt.c">alternate
|
||
code</a> based on the
|
||
author’s remarks.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/sykes1/try.sh">try.sh</a> script.</p>
|
||
<p>Cody also provided the <a href="2006/sykes1/bedlam-cubes.pdf">bedlam-cubes.pdf</a> file,
|
||
obtained from the Internet Wayback Machine, as the file was no longer available.
|
||
The video was also no longer available but Cody found an alternative and added
|
||
it to the repo as well.</p>
|
||
<div id="2006_sykes2">
|
||
<h2 id="winning-entry-2006sykes2">Winning entry: <a href="2006/sykes2/index.html">2006/sykes2</a></h2>
|
||
<h3 id="winning-entry-source-code-sykes2.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/sykes2//sykes2.c">sykes2.c</a></h3>
|
||
</div>
|
||
<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
|
||
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
|
||
count and/or type changed in main() in some older
|
||
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
|
||
entry to show the clock update in real time.</p>
|
||
<div id="2006_toledo1">
|
||
<h2 id="winning-entry-2006toledo1">Winning entry: <a href="2006/toledo1/index.html">2006/toledo1</a></h2>
|
||
<h3 id="winning-entry-source-code-toledo1.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/toledo1//toledo1.c">toledo1.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/toledo1/try.sh">try.sh</a> script.</p>
|
||
<div id="2006_toledo2">
|
||
<h2 id="winning-entry-2006toledo2">Winning entry: <a href="2006/toledo2/index.html">2006/toledo2</a></h2>
|
||
<h3 id="winning-entry-source-code-toledo2.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/toledo2//toledo2.c">toledo2.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed a segfault in this program which was making it fail to work under
|
||
macOS - it did not seem to be a problem under Linux, at least not fedora. The
|
||
problem was wrong variable types - implicit <code>int</code>s instead of <code>FILE *</code>s. It now
|
||
works with both macOS and Linux.</p>
|
||
<p>Cody also added the (untested) <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/toledo2/toledo2.alt.c">alternate
|
||
code</a> that is based on the author’s remarks to
|
||
port this to systems that have the non-standard <code>kbhit()</code> and <code>getch()</code> (not the
|
||
one from curses) which is typically (always?) in <code>conio.h</code>.</p>
|
||
<p>The author, <a href="authors.html#Oscar_Toledo">Oscar Toledo G.</a>, later went back over
|
||
the program and modified the <code>fread(3)</code>/<code>fwrite(3)</code> section to use the variable
|
||
<code>FILE *e</code> (that Cody changed) instead of <code>int y</code>, making it to work on x86_64
|
||
(perhaps Cody’s fix was for arm64 only?). Also, he added a note to clarify from
|
||
where appears the <code>IMPORT.COM</code> and <code>HALT.COM</code> files.</p>
|
||
<div id="2006_toledo3">
|
||
<h2 id="winning-entry-2006toledo3">Winning entry: <a href="2006/toledo3/index.html">2006/toledo3</a></h2>
|
||
<h3 id="winning-entry-source-code-toledo3.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/toledo3//toledo3.c">toledo3.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed a crash and a display problem in this entry so that it now works in
|
||
modern (64-bit) systems. The crash appears to only occur in macOS but the fix
|
||
lets it work in both Linux and macOS. The problem was that it relied on 32-bits
|
||
so some <code>int</code>s were changed to <code>long</code>s. The display problem might or might not
|
||
have been a problem in Linux with the old <code>int</code>s but this is no longer known.</p>
|
||
<p>Cody also added the code that <em>should</em> work for Windows,
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/toledo3/toledo3.alt.c">toledo3.alt.c</a>, based on the author’s remarks.
|
||
We’re not able to test this.</p>
|
||
<div id="2011">
|
||
<h1 id="the-20th-ioccc"><a href="2011/index.html">2011 - The 20th IOCCC</a></h1>
|
||
</div>
|
||
<div id="2011_akari">
|
||
<h2 id="winning-entry-2011akari">Winning entry: <a href="2011/akari/index.html">2011/akari</a></h2>
|
||
<h3 id="winning-entry-source-code-akari.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/akari//akari.c">akari.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/akari/try.sh">try.sh</a> script.</p>
|
||
<div id="2011_blakely">
|
||
<h2 id="winning-entry-2011blakely">Winning entry: <a href="2011/blakely/index.html">2011/blakely</a></h2>
|
||
<h3 id="winning-entry-source-code-blakely.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/blakely//blakely.c">blakely.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/blakely/try.sh">try.sh</a> script.</p>
|
||
<div id="2011_borsanyi">
|
||
<h2 id="winning-entry-2011borsanyi">Winning entry: <a href="2011/borsanyi/index.html">2011/borsanyi</a></h2>
|
||
<h3 id="winning-entry-source-code-borsanyi.c-1">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/borsanyi//borsanyi.c">borsanyi.c</a></h3>
|
||
</div>
|
||
<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
|
||
the number of args as well. See <a href="faq.html#faq4_6">FAQ 4.6 - Why was arg
|
||
count and/or type changed in main() in some older
|
||
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>
|
||
<div id="2011_dlowe">
|
||
<h2 id="winning-entry-2011dlowe">Winning entry: <a href="2011/dlowe/index.html">2011/dlowe</a></h2>
|
||
<h3 id="winning-entry-source-code-dlowe.c-2">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe//dlowe.c">dlowe.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/dlowe/try.sh">try.sh</a> script.</p>
|
||
<p>Cody also fixed a problem in the manifest, caused by a file name that would be
|
||
interpreted as something else in web servers and would thus be a 404 error even
|
||
though the file appears to exist on disk. In particular the file
|
||
<code>2011/dlowe/dlowe-aux-data/english-0/CIR_APE_08_doc%5B1%5D.txt</code> had to be
|
||
renamed to <code>CIR_APE_08_doc.txt</code> because web servers would parse it as
|
||
<code>CIR_APE_08_doc[1].txt</code> which obviously does not exist as on disk the file name had
|
||
the html encoding literally for the characters, not the characters they
|
||
translate to themselves (which was in the manifest).
|
||
The file could have been named to that but it is not POSIX safe so the <code>[]</code>s
|
||
were removed. At the same time, for the same reason (though the link worked),
|
||
the file <code>2011/dlowe/dlowe-aux-data/png-1/image_thumb[40].png</code> was renamed to
|
||
<code>image_thumb.png</code>.</p>
|
||
<div id="2011_eastman">
|
||
<h2 id="winning-entry-2011eastman">Winning entry: <a href="2011/eastman/index.html">2011/eastman</a></h2>
|
||
<h3 id="winning-entry-source-code-eastman.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/eastman//eastman.c">eastman.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the video file
|
||
<a href="2011/eastman/boing-ball.mp4">boing-ball.mp4</a> which is the demo the
|
||
author referred to.</p>
|
||
<div id="2011_fredriksson">
|
||
<h2 id="winning-entry-2011fredriksson">Winning entry: <a href="2011/fredriksson/index.html">2011/fredriksson</a></h2>
|
||
<h3 id="winning-entry-source-code-fredriksson.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/fredriksson//fredriksson.c">fredriksson.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/fredriksson/try.sh">try.sh</a> script.</p>
|
||
<div id="2011_goren">
|
||
<h2 id="winning-entry-2011goren">Winning entry: <a href="2011/goren/index.html">2011/goren</a></h2>
|
||
<h3 id="winning-entry-source-code-goren.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/goren//goren.c">goren.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this for macOS. Before the fix it segfaulted. It worked fine under
|
||
Linux. After fixing it it was noticed that the author stated it does not work
|
||
for 64-bit so it was then tested as a 32-bit binary (Linux) and 64-bit binary
|
||
(Linux, macOS) and both work. It was fixed by changing some <code>int</code>s to <code>long</code>s
|
||
and now it does work with 64-bit systems as well as 32-bit systems.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/goren/try.sh">try.sh</a> script.</p>
|
||
<p>Cody added the following words of wisdom: <code>'"this" is not a pipe but "|" is'</code>.</p>
|
||
<div id="2011_hamaji">
|
||
<h2 id="winning-entry-2011hamaji">Winning entry: <a href="2011/hamaji/index.html">2011/hamaji</a></h2>
|
||
<h3 id="winning-entry-source-code-hamaji.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/hamaji//hamaji.c">hamaji.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/hamaji/try.sh">try.sh</a> script and the <code>.nono</code> files
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/hamaji/conway-game-of-life.nono">conway-game-of-life.nono</a>,
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/hamaji/multi-solutions.nono">multi-solutions.nono</a>,
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/hamaji/no-solution.nono">no-solution.nono</a>,
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/hamaji/plus.nono">plus.nono</a> and <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/hamaji/smiley.nono">smiley.nono</a>.
|
||
The latter two <code>.nono</code> files were taken from
|
||
<a href="https://web.archive.org/web/20130218055139/http://codegolf.com/paint-by-numbers" class="uri">https://web.archive.org/web/20130218055139/http://codegolf.com/paint-by-numbers</a>
|
||
and the others were from the authors’ remarks.</p>
|
||
<div id="2011_hou">
|
||
<h2 id="winning-entry-2011hou">Winning entry: <a href="2011/hou/index.html">2011/hou</a></h2>
|
||
<h3 id="winning-entry-source-code-hou.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/hou//hou.c">hou.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/hou/try.sh">try.sh</a> script.</p>
|
||
<div id="2011_konno">
|
||
<h2 id="winning-entry-2011konno">Winning entry: <a href="2011/konno/index.html">2011/konno</a></h2>
|
||
<h3 id="winning-entry-source-code-konno.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/konno//konno.c">konno.c</a></h3>
|
||
</div>
|
||
<p>Cody added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/konno/try.sh">try.sh</a> script.</p>
|
||
<div id="2011_richards">
|
||
<h2 id="winning-entry-2011richards">Winning entry: <a href="2011/richards/index.html">2011/richards</a></h2>
|
||
<h3 id="winning-entry-source-code-richards.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/richards//richards.c">richards.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed a minor problem that showed up in both Linux and macOS. He notes
|
||
however that as of this time this entry does not work properly with macOS at
|
||
least with the silicon chip (Intel has not been tested) and it is quite possibly
|
||
an inherent problem in macOS to do with executing code in in memory/JIT and in
|
||
particular with the silicon chip. See <a href="bugs.html#2011_richards">2011/richards in
|
||
bugs.html</a> for more details and a
|
||
document from Apple about how it might be fixed if anyone is brave enough to
|
||
try. If they do they might want to look also at
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/richards/richards.alt.c">richards.alt.c</a>, for whatever it might or might
|
||
not be worth, as it is a possible starting point that Cody added.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/richards/try.sh">try.sh</a> and the
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/richards/try.alt.sh">try.alt.sh</a> scripts. The <code>try.alt.sh</code> script will be
|
||
helpful to test any fixes for Apple silicon chips (see <a href="bugs.html#2011_richards">2011/richards in
|
||
bugs.html</a> for more details).</p>
|
||
<div id="2011_toledo">
|
||
<h2 id="winning-entry-2011toledo">Winning entry: <a href="2011/toledo/index.html">2011/toledo</a></h2>
|
||
<h3 id="winning-entry-source-code-toledo.c-1">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/toledo//toledo.c">toledo.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added two <a href="2011/toledo/index.html#alternate-code">alternate versions</a>: one that
|
||
lets one reconfigure the controls and also the size of the game and another
|
||
version that should work in Windows, based on the author’s remarks and support
|
||
file, <code>layer.c</code>.</p>
|
||
<p>The <code>Makefile</code> was also modified by Cody to make it simpler to redefine the
|
||
controls, width and height.</p>
|
||
<div id="2011_vik">
|
||
<h2 id="winning-entry-2011vik">Winning entry: <a href="2011/vik/index.html">2011/vik</a></h2>
|
||
<h3 id="winning-entry-source-code-vik.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/vik//vik.c">vik.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/vik/try.sh">try.sh</a> script.</p>
|
||
<p>Cody also added an <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/vik/vik.alt.c">alternate version</a> for Windows
|
||
based on the author’s comments (along with looking up the function for the right
|
||
header files). To build try the <code>alt</code> rule of the <code>Makefile</code>.</p>
|
||
<div id="2011_zucker">
|
||
<h2 id="winning-entry-2011zucker">Winning entry: <a href="2011/zucker/index.html">2011/zucker</a></h2>
|
||
<h3 id="winning-entry-source-code-zucker.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/zucker//zucker.c">zucker.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/zucker/try.sh">try.sh</a> script.</p>
|
||
<p>Cody also added <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/zucker/zucker.alt.c">alternate code</a> that should work on
|
||
Windows, based on the author’s remarks that if the system distinguishes binary
|
||
and text then <code>stdout</code> needs to be set to binary mode.</p>
|
||
<p>Cody also added the PDF file
|
||
<a href="2011/zucker/sphere-tracing.pdf">sphere-tracing.pdf</a> in case the link
|
||
eventually dies.</p>
|
||
<div id="2012">
|
||
<h1 id="the-21st-ioccc"><a href="2012/index.html">2012 - The 21st IOCCC</a></h1>
|
||
</div>
|
||
<div id="2012_blakely">
|
||
<h2 id="winning-entry-2012blakely">Winning entry: <a href="2012/blakely/index.html">2012/blakely</a></h2>
|
||
<h3 id="winning-entry-source-code-blakely.c-1">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/blakely//blakely.c">blakely.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added explicit linking of libm (<code>-lm</code>) as not all systems do this
|
||
implicitly (Linux doesn’t seem to but macOS does).</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/blakely/try.sh">try.sh</a> script.</p>
|
||
<div id="2012_deckmyn">
|
||
<h2 id="winning-entry-2012deckmyn">Winning entry: <a href="2012/deckmyn/index.html">2012/deckmyn</a></h2>
|
||
<h3 id="winning-entry-source-code-deckmyn.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/deckmyn//deckmyn.c">deckmyn.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/deckmyn/try.sh">try.sh</a> script.</p>
|
||
<div id="2012_endoh1">
|
||
<h2 id="winning-entry-2012endoh1">Winning entry: <a href="2012/endoh1/index.html">2012/endoh1</a></h2>
|
||
<h3 id="winning-entry-source-code-endoh1.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh1//endoh1.c">endoh1.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added explicit linking of libm (<code>-lm</code>) as not all systems do this
|
||
implicitly (Linux doesn’t seem to but macOS does).</p>
|
||
<p>Cody also added two <a href="2012/endoh1/index.html#alternate-code">alt versions</a> that
|
||
let one control how fast the fluid moves (how long to sleep in between writes)
|
||
and also the gravity factor, the pressure factor and the viscosity factor as
|
||
well as an alarm that lets one run it in a loop without having to hit
|
||
ctrl-c/intr in between (the alarm can be disabled, however). The <code>Makefile</code> allows
|
||
one to easily do this with variable names rather than redefining <code>CDEFINE</code>.</p>
|
||
<p>The two different alt versions is because there are two versions: the original
|
||
and the colour version added by the author, <a href="#yusuke">Yusuke</a>, at the request of
|
||
the judges.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh1/try.alt.sh">try.alt.sh</a> script that compiles
|
||
the alternate code in two ways, one with setting the gravity factor to <code>I</code> and another
|
||
with the default, and which is run on the source file and each of the text files
|
||
supplied by the author. This code has an alarm set at 10 seconds so that one
|
||
need not hit ctrl-c/intr in between .. say to make it more fluid :-)</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh1/try.alt.bw.sh">try.alt.bw.sh</a> which is the
|
||
same as the <code>try.alt.sh</code> except it does not use the coloured version.</p>
|
||
<p>Finally Cody added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh1/try.sh">try.sh</a> and
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh1/try.bw.sh">try.bw.sh</a> which correspond to the coloured version
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh1/endoh1_color.c">endoh1_color.c</a> and the original submitted
|
||
version without colour, <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh1/endoh1.c">endoh1.c</a>.</p>
|
||
<p>The <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh1/endoh1.alt2.c">endoh1.alt2.c</a> was provided by the author,
|
||
<a href="#yusuke">Yusuke</a>, at the time of the contest as a de-obfuscated version.</p>
|
||
<div id="2012_endoh2">
|
||
<h2 id="winning-entry-2012endoh2">Winning entry: <a href="2012/endoh2/index.html">2012/endoh2</a></h2>
|
||
<h3 id="winning-entry-source-code-endoh2.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh2//endoh2.c">endoh2.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh2/try.sh">try.sh</a> script that runs
|
||
everything, filtered through less.</p>
|
||
<p>Cody also fixed a typo in the ruby script
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh2/find-font-table.rb">find-font-table.rb</a>.</p>
|
||
<div id="2012_grothe">
|
||
<h2 id="winning-entry-2012grothe">Winning entry: <a href="2012/grothe/index.html">2012/grothe</a></h2>
|
||
<h3 id="winning-entry-source-code-grothe.c-1">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/grothe//grothe.c">grothe.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/grothe/try.sh">try.sh</a> script.</p>
|
||
<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
|
||
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
|
||
count and/or type changed in main() in some older
|
||
entries?</a> for more details.</p>
|
||
<p>Cody also restored the original code from the archive.</p>
|
||
<p>And although the URL works for now (via redirect), Cody changed the website
|
||
linked to in the recipe file to the domain that the old one currently redirects
|
||
to, in case the other domain ends up expiring or stops redirecting to the more
|
||
recent domain. For historical purposes the old link was
|
||
<code>http://recipes.stevex.net/</code> but it redirects to <code>https://www.mealsteps.com</code>
|
||
which the recipe file now links to.</p>
|
||
<div id="2012_hamano">
|
||
<h2 id="winning-entry-2012hamano">Winning entry: <a href="2012/hamano/index.html">2012/hamano</a></h2>
|
||
<h3 id="winning-entry-source-code-hamano.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/hamano//hamano.c">hamano.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/hamano/try.sh">try.sh</a> script and the helper
|
||
Makefile rules <code>hint.pdf</code>, <code>hint</code>, <code>hello.pdf</code> and <code>hello</code> to simplify the
|
||
procedure for both <code>hint.pdf</code> and <code>hello.pdf</code> as well as compiling them as C.</p>
|
||
<div id="2012_hou">
|
||
<h2 id="winning-entry-2012hou">Winning entry: <a href="2012/hou/index.html">2012/hou</a></h2>
|
||
<h3 id="winning-entry-source-code-hou.c-1">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/hou//hou.c">hou.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/hou/try.sh">try.sh</a> script and restored the original <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/hou/hint.md">hint
|
||
markdown file</a> as the changes made when converting to a GitHub
|
||
index.html made the generated html not look correct; it did not have a title, a
|
||
stylesheet etc. due to the fact that there is no <code>#</code> header (which specified
|
||
title and stylesheet) and other formatting changes.</p>
|
||
<div id="2012_kang">
|
||
<h2 id="winning-entry-2012kang">Winning entry: <a href="2012/kang/index.html">2012/kang</a></h2>
|
||
<h3 id="winning-entry-source-code-kang.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/kang//kang.c">kang.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added alternate code that fixes a problem where in German ‘v’
|
||
sounds like ‘f’ which the program has as ‘f’: with the original version it would
|
||
translate ‘fier’ to ‘4’ when the word is ‘vier’. This was during a time that a
|
||
lot of entries that no longer worked were fixed and it was done without much
|
||
thought but having this alternate version allows one to appreciate the entry
|
||
even more so it was kept in.</p>
|
||
<p>This change will actually break other translations. It also was a feature, not a
|
||
bug, even if it might seem like a bug. But having both versions allows one to
|
||
appreciate the entry even more, given how simple the difference is: as has been
|
||
seen in many entries over the years, a single character can drastically change
|
||
what happens, sometimes in surprising and delightful ways!</p>
|
||
<p>Cody also added six scripts, starting with
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/kang/en.sh">en.sh</a>, <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/kang/de.sh">de.sh</a>,
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/kang/en.alt.sh">en.alt.sh</a> and
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/kang/de.alt.sh">de.alt.sh</a> which count from 0 through 13 in
|
||
English and German using the original entry and the alt version respectively.</p>
|
||
<p>In the German scripts it uses the umlaut and also does it without the umlaut
|
||
(add an ‘e’). Notice how the program picks up on this! All scripts can use
|
||
either version but the <code>.alt.sh</code> versions default to the <code>alt</code> version whereas
|
||
the other defaults to the submitted entry. See the index.html for details.</p>
|
||
<p>The fifth and sixth scripts, <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/kang/try.sh">try.sh</a> and
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/kang/try.alt.sh">try.alt.sh</a>, run a sequence of commands to
|
||
show different languages and numbers with the submitted and alternate version
|
||
respectively. Notice how a single letter changes so much!</p>
|
||
<div id="2012_konno">
|
||
<h2 id="winning-entry-2012konno">Winning entry: <a href="2012/konno/index.html">2012/konno</a></h2>
|
||
<h3 id="winning-entry-source-code-konno.c-1">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/konno//konno.c">konno.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/konno/try.sh">try.sh</a> script.</p>
|
||
<div id="2012_omoikane">
|
||
<h2 id="winning-entry-2012omoikane">Winning entry: <a href="2012/omoikane/index.html">2012/omoikane</a></h2>
|
||
<h3 id="winning-entry-source-code-omoikane.c-1">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/omoikane//omoikane.c">omoikane.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="2012/omoikane/index.html#alternate-code">alternate
|
||
versions</a> which will, if no arg is
|
||
specified, read in the program itself, rather than <code>/dev/urandom</code>. This is
|
||
mostly useful for those without a <code>/dev/urandom</code> device file, which the author
|
||
pointed out as being a problem, but which is the default for the entry . The
|
||
second alternate version is like the first except that it also sets binary mode
|
||
on <code>stdin</code> and <code>stdout</code> which should theoretically make it work in Windows. This
|
||
comes from the author’s remarks.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/omoikane/try.sh">try.sh</a> and
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/omoikane/try.alt.sh">try.alt.sh</a> scripts.</p>
|
||
<div id="2012_tromp">
|
||
<h2 id="winning-entry-2012tromp">Winning entry: <a href="2012/tromp/index.html">2012/tromp</a></h2>
|
||
<h3 id="winning-entry-source-code-tromp.c-1">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/tromp//tromp.c">tromp.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/tromp/try.sh">try.sh</a> script.</p>
|
||
<div id="2012_vik">
|
||
<h2 id="winning-entry-2012vik">Winning entry: <a href="2012/vik/index.html">2012/vik</a></h2>
|
||
<h3 id="winning-entry-source-code-vik.c-1">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/vik//vik.c">vik.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/vik/try.sh">try.sh</a> script.</p>
|
||
<p>Based on the author’s description it should be possible to get this entry to work
|
||
for Windows. With his instructions Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/vik/vik.alt.c">alternate
|
||
version</a> that does this.</p>
|
||
<div id="2012_zeitak">
|
||
<h2 id="winning-entry-2012zeitak">Winning entry: <a href="2012/zeitak/index.html">2012/zeitak</a></h2>
|
||
<h3 id="winning-entry-source-code-zeitak.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/zeitak//zeitak.c">zeitak.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/zeitak/try.sh">try.sh</a> script and the
|
||
<code>make test</code> rule that uses the script along with a number of files that will
|
||
correctly be flagged as incorrect (including a text file and a Java file, with a
|
||
joke, to show that it’s not that it parses C but rather just matching pairs
|
||
though that’s probably obvious) and some correctly nested files were also added
|
||
including <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1984/anonymous/index.html">1984/anonymous</a> (as the
|
||
author explicitly mentioned it), both the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/zeitak/anonymous.alt.c">original
|
||
version</a> (.alt.c) and the
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/zeitak/anonymous.c">modified version</a> that works with macOS
|
||
as well, and a Java file as well with another joke. Those C files had to be
|
||
added because each entry has its own tarball and without the files it would
|
||
break the script.</p>
|
||
<p>A problem was later fixed in the <code>Makefile</code> by Cody, a typo in the <code>CSILENCE</code>
|
||
variable that prevented compilation.</p>
|
||
<p>A minor point is that the author noted that one should
|
||
look at the program source with tab space of 4 characters so Cody added the
|
||
command to do this in vim for those who use it, in the judges’ remarks, to make
|
||
it easier for those who do not know how, and to make it more obvious to try it.</p>
|
||
<div id="2013">
|
||
<h1 id="the-22nd-ioccc"><a href="2013/index.html">2013 - The 22nd IOCCC</a></h1>
|
||
</div>
|
||
<div id="2013_birken">
|
||
<h2 id="winning-entry-2013birken">Winning entry: <a href="2013/birken/index.html">2013/birken</a></h2>
|
||
<h3 id="winning-entry-source-code-birken.c-1">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken//birken.c">birken.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> changed the <code>return 0;</code> at the end of the program to be <code>return system("reset");</code> (via redefining <code>exit(3)</code> so that the column ending would be
|
||
the same) so that as long as it runs to completion the terminal will be sane and
|
||
the cursor will be visible. Using <code>atexit(3)</code> will not work if the program is
|
||
killed, signals are ugly and these would be messing with the entry too much so
|
||
these were not done.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/birken.alt.c">alternate version</a>
|
||
that lets one control how fast the painting is done, based on the author’s
|
||
recommendations, except that Cody made it configurable at compile time. The
|
||
<code>Makefile</code> was modified in such a way as to make it very easy to redefine it at
|
||
compile time.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/try.sh">try.sh</a> script for the entry and the
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/try.alt.sh">try.alt.sh</a> script for the alternate code.</p>
|
||
<div id="2013_cable1">
|
||
<h2 id="winning-entry-2013cable1">Winning entry: <a href="2013/cable1/index.html">2013/cable1</a></h2>
|
||
<h3 id="winning-entry-source-code-cable1.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable1//cable1.c">cable1.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable1/try.sh">try.sh</a> script.</p>
|
||
<div id="2013_cable2">
|
||
<h2 id="winning-entry-2013cable2">Winning entry: <a href="2013/cable2/index.html">2013/cable2</a></h2>
|
||
<h3 id="winning-entry-source-code-cable2.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable2//cable2.c">cable2.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable2/try.sh">try.sh</a> script.</p>
|
||
<div id="2013_cable3">
|
||
<h2 id="winning-entry-2013cable3">Winning entry: <a href="2013/cable3/index.html">2013/cable3</a></h2>
|
||
<h3 id="winning-entry-source-code-cable3.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable3//cable3.c">cable3.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this to compile with modern systems. The problems were that
|
||
<code>localtime()</code> is used differently and with <code>time.h</code> being included (with
|
||
<a href="https://www.libsdl.org">SDL2</a> in macOS - but see below) there was a conflicting
|
||
function type. This appeared to be a problem with macOS and only when SDL2 was
|
||
included (but which as noted next it cannot be).</p>
|
||
<p>The other problem is that this entry uses SDL functions that were
|
||
removed from SDL2 so the <code>Makefile</code> has to use <code>sdl-config</code> and not <code>sdl2-config</code>.
|
||
This meant that at one point to be strictly technical, the removal of
|
||
<code>localtime()</code> wasn’t necessary but this change was left in place anyway (but see
|
||
below again).</p>
|
||
<p>Later on in an updated macOS (problem discovered in macOS Sonoma) the entry
|
||
failed to compile again also due to <code>localtime()</code> so he removed the prototype
|
||
entirely to solve the problem.</p>
|
||
<p>Cody also slightly improved the <code>runme</code> script (renamed to
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable3/cable3.sh">cable3.sh</a> for consistency with other entries that have
|
||
wrapper scripts) to not assume that the program has been compiled by running
|
||
<code>make clobber all || exit 1</code> and he also made it pass <code>shellcheck</code> (using <code>[[ .. ]]</code> over <code>[ .. ]</code>).</p>
|
||
<p>As well, based on the author’s remarks, Cody added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable3/cable3.alt.c">alternate
|
||
code</a> which should be compilable for Windows/MS Visual
|
||
Studio. This is done by in the compile line undefining <code>KB</code> (<code>-UKB</code>) and then in
|
||
the source code defining <code>KB</code> to what the author suggested,
|
||
<code>(kb=H(8),kbhit())&&(r[1190]=getch(),H(7))</code>. It need hardly be mentioned that
|
||
this will not link in Unix systems (including macOS).</p>
|
||
<p>Finally Cody provided the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable3/bios.asm">bios.asm</a> that the author
|
||
referred to, found at the <a href="https://github.com/adriancable/8086tiny/tree/master">GitHub repo for the
|
||
entry</a>, and the <code>ready-made 40MB hard disk image containing a whole bunch of software</code> in <code>hd.img</code> that the
|
||
author linked to at <code>https://bitly.com/1bU8URK</code>.</p>
|
||
<div id="2013_dlowe">
|
||
<h2 id="winning-entry-2013dlowe">Winning entry: <a href="2013/dlowe/index.html">2013/dlowe</a></h2>
|
||
<h3 id="winning-entry-source-code-dlowe.c-3">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/dlowe//dlowe.c">dlowe.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the source code that we suggested one should compile and run with
|
||
different compilers as <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/dlowe/fun.c">fun.c</a>. He modified the <code>Makefile</code> so
|
||
that running <code>make all</code> will compile it, saving you the effort.</p>
|
||
<p>He also provided the script <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/dlowe/slflen.sh">slflen.sh</a> which is based on
|
||
the author’s remarks, fixing it for shellcheck and improving upon it (show what
|
||
files will be processed). This script shows the sparkline of the file lengths
|
||
(as in <code>wc -c</code>). The fixes (but not the improvements) were added to the author’s
|
||
remarks.</p>
|
||
<p>Since the author called the program <code>sparkl</code> Cody modified the <code>Makefile</code> so that
|
||
running <code>make all</code> will create a symlink to <code>dlowe</code> as <code>sparkl</code>. Running <code>make clobber</code> will delete both and running <code>make clobber all</code> will ensure that the
|
||
symlink is created. The <code>slflen.sh</code> script also explicitly makes sure to create
|
||
the symlink as it uses it, even though it runs <code>make clobber all</code>.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/dlowe/try.sh">try.sh</a> script to more easily try the
|
||
program.</p>
|
||
<p>He also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/dlowe/diff.sh">diff.sh</a> script which is based on some
|
||
commands to try that he suggested to see how different lengths look.</p>
|
||
<div id="2013_endoh1">
|
||
<h2 id="winning-entry-2013endoh1">Winning entry: <a href="2013/endoh1/index.html">2013/endoh1</a></h2>
|
||
<h3 id="winning-entry-source-code-endoh1.c-1">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh1//endoh1.c">endoh1.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh1/try.sh">try.sh</a> script.</p>
|
||
<div id="2013_endoh2">
|
||
<h2 id="winning-entry-2013endoh2">Winning entry: <a href="2013/endoh2/index.html">2013/endoh2</a></h2>
|
||
<h3 id="winning-entry-source-code-endoh2.c-1">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh2//endoh2.c">endoh2.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed the <code>Makefile</code> <code>check</code> rule so that it <code>checks</code> :-) that both
|
||
<a href="https://www.ruby-lang.org">Ruby</a> and <a href="https://imagemagick.org">ImageMagick</a> are
|
||
installed before trying to run the ruby script. To be more technically correct:
|
||
it checks that the <code>convert</code> tool of ImageMagick is available (via <code>type -P</code>)
|
||
because <code>convert</code> is part of the ImageMagick suite. The rule will report the
|
||
tools not installed and where to find them, if they are not installed, and after
|
||
checking these requirements it will exit if either is not found.</p>
|
||
<p>The checks are useful because the Ruby script tries to run (via <code>IO.popen()</code>) the
|
||
<code>convert</code> tool but without ImageMagick being installed, if one is unaware of
|
||
where it comes from it will appear to be an error in the Ruby script (it might
|
||
also appear to be an issue with the script even if you know of <code>convert</code>).</p>
|
||
<p>The entry can still be enjoyed if you do not have these tools, however.</p>
|
||
<div id="2013_endoh3">
|
||
<h2 id="winning-entry-2013endoh3">Winning entry: <a href="2013/endoh3/index.html">2013/endoh3</a></h2>
|
||
<h3 id="winning-entry-source-code-endoh3.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3//endoh3.c">endoh3.c</a></h3>
|
||
</div>
|
||
<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
|
||
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
|
||
older entries?</a> for more details.</p>
|
||
<div id="2013_endoh4">
|
||
<h2 id="winning-entry-2013endoh4">Winning entry: <a href="2013/endoh4/index.html">2013/endoh4</a></h2>
|
||
<h3 id="winning-entry-source-code-endoh4.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4//endoh4.c">endoh4.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/endoh4.sh">endoh4.sh</a> script which temporarily
|
||
turns off the cursor as suggested by the author, with the addition that if no
|
||
file is specified it will feed the source code <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/endoh4.c">endoh4.c</a>
|
||
to the program rather than the file specified. It does not try and detect if the
|
||
file exists or can be read as that will be handled by the shell/program. One may
|
||
pass more than one file to the script.</p>
|
||
<p>Cody also made it easier to redefine the size at compilation time (see the
|
||
author’s remarks for more details on what this means). The <code>endoh4.sh</code> script
|
||
allows one to redefine it as well.</p>
|
||
<div id="2013_hou">
|
||
<h2 id="winning-entry-2013hou">Winning entry: <a href="2013/hou/index.html">2013/hou</a></h2>
|
||
<h3 id="winning-entry-source-code-hou.c-2">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou//hou.c">hou.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed the <code>Makefile</code> so that this would work properly. Before this
|
||
the use of the program just did what the judges’ remarks said as far as how it
|
||
might violate rule 2: the program is really just a decompressor to generate the
|
||
real source of the program. So the source of the entry has to be compiled and
|
||
then run, and the output has to be compiled to be <code>hou</code>. This allows the real
|
||
program to be used. Thus the <code>Makefile</code> rule looks like:</p>
|
||
<pre><code> ${PROG}: ${PROG}.c
|
||
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
|
||
./${PROG} | ${CC} ${CFLAGS} -xc - -o $@ ${LDFLAGS}</code></pre>
|
||
<p>which then compiles like:</p>
|
||
<pre><code> cc -std=gnu11 -Wall -Wextra -pedantic -Wno-sign-compare -Wno-strict-prototypes -O3 hou.c -o hou -lm
|
||
./hou | cc -std=gnu11 -Wall -Wextra -pedantic -Wno-sign-compare -Wno-strict-prototypes -O3 -xc - -o hou -lm</code></pre>
|
||
<p>The <code>LDFLAGS</code> were updated to have <code>-lm</code> as the author suggested it uses the
|
||
<code>math.h</code> library which not all systems link in by default (Linux for instance
|
||
does not).</p>
|
||
<p>The author noted that one can build <code>a.c</code> and refers to it in documentation. The
|
||
rule in the <code>Makefile</code> was originally removed as part of the above but it was
|
||
restored so that one can see what the author is talking about.</p>
|
||
<p>Further, after the file <code>2013/hou/doc/example.markdown</code> was moved to
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/doc/example.md">2013/hou/doc/example.md</a> to match the rest of the repo
|
||
this broke <code>make</code> which Cody also fixed.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/try.sh">try.sh</a> script.</p>
|
||
<div id="2013_mills">
|
||
<h2 id="winning-entry-2013mills">Winning entry: <a href="2013/mills/index.html">2013/mills</a></h2>
|
||
<h2 id="source-code-mills.c">Source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/mills/mills.c">mills.c</a></h2>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this so that the server would not refuse the connection
|
||
after the first call to <code>close(2)</code>. The problem was that because the backlog to
|
||
<code>listen(2)</code> was <code>1</code>, once the connection closed the server was essentially ‘dead’.
|
||
The backlog was changed to <code>10</code> and this solves the problem. It is not known if
|
||
this was specific to macOS but it was not specific to a browser as Safari and
|
||
Firefox both had the problem.</p>
|
||
<div id="2013_misaka">
|
||
<h2 id="winning-entry-2013misaka">Winning entry: <a href="2013/misaka/index.html">2013/misaka</a></h2>
|
||
<h3 id="winning-entry-source-code-misaka.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/misaka//misaka.c">misaka.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/misaka/try.sh">try.sh</a> script.</p>
|
||
<div id="2013_morgan1">
|
||
<h2 id="winning-entry-2013morgan1">Winning entry: <a href="2013/morgan1/index.html">2013/morgan1</a></h2>
|
||
<h3 id="winning-entry-source-code-morgan1.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/morgan1//morgan1.c">morgan1.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added explicit linking of libm (<code>-lm</code>) as not all systems do this
|
||
implicitly (Linux doesn’t seem to but macOS does).</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/morgan1/try.sh">try.sh</a> script.</p>
|
||
<div id="2013_robison">
|
||
<h2 id="winning-entry-2013robison">Winning entry: <a href="2013/robison/index.html">2013/robison</a></h2>
|
||
<h3 id="winning-entry-source-code-robison.c-2">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/robison//robison.c">robison.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/robison/try.sh">try.sh</a> script.</p>
|
||
<div id="2014">
|
||
<h1 id="the-23rd-ioccc"><a href="2014/index.html">2014 - The 23rd IOCCC</a></h1>
|
||
</div>
|
||
<div id="2014_birken">
|
||
<h2 id="winning-entry-2014birken">Winning entry: <a href="2014/birken/index.html">2014/birken</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/birken//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> provided the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/birken/prog.alt.c">alternate
|
||
code</a> that lets one redefine the port to
|
||
bind to in case there is a firewall issue or there is some other reason to not
|
||
have the default port. Remember that ports < 1024 are privileged. It also lets
|
||
you redefine the timing constant <code>STARDATE</code> (see the author’s remarks for more
|
||
details on this macro). The <code>Makefile</code> was made to use variables so it’s easier to
|
||
redefine the port and timing constant.</p>
|
||
<div id="2014_deak">
|
||
<h2 id="winning-entry-2014deak">Winning entry: <a href="2014/deak/index.html">2014/deak</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-1">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/deak//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added <a href="2014/deak/index.html#alternate-code">alternate code</a> that lets
|
||
one (via the <code>Makefile</code>) reconfigure the coordinates but instead of being a
|
||
modified version of the entry it is the version the author provided which would
|
||
be what the program would look like if, as the author put it:</p>
|
||
<blockquote>
|
||
<p>The usage of recognizable elements from the C programming language in the
|
||
application source code is intentionally kept to a bare minimum.</p>
|
||
</blockquote>
|
||
<p>.. was not true.</p>
|
||
<p>This alternate version did not originally compile because a value was left off the
|
||
<code>return</code> statement (this might have been fixed in the index.html file too) so
|
||
that was fixed and it also has <code>#include <stdio.h></code> for <code>putchar(3)</code>. The
|
||
<code>#ifndef..#define..#endif</code> was not part of the original alternate code, of course.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/deak/try.alt.sh">try.alt.sh</a> script.</p>
|
||
<div id="2014_endoh1">
|
||
<h2 id="winning-entry-2014endoh1">Winning entry: <a href="2014/endoh1/index.html">2014/endoh1</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-2">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/endoh1//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/endoh1/rake.sh">rake.sh</a> script and <code>make rake</code>
|
||
rule that runs the script. This script will check that <code>rake</code> is installed and
|
||
if it is not it will report this and then check that <code>gem</code> is installed. It
|
||
checks that <code>gem</code> is installed in this case because <code>gem</code> is how you install
|
||
<code>rake</code>. If <code>gem</code> is not installed it tells you to get it along with how to
|
||
install <code>gem</code>. Then it tells you how to install <code>rake</code>. If <code>rake</code> fails to run
|
||
then it tells you to install a specific gem and then to try again. Finally if
|
||
<code>rake</code> succeeds it will verify that <code>prog</code> is executable and if it is it will
|
||
run it.</p>
|
||
<p>After more work on the manifest was done Cody had to update the <code>clobber</code> rule
|
||
to remove some text files so as to not cause problems with an invalid manifest.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/endoh1/try.sh">try.sh</a> script.</p>
|
||
<p>To silence the annoying misleading indentation warning and to prevent debug
|
||
symbols from being built with <code>rake</code> Cody also updated the
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/endoh1/Rakefile">Rakefile</a> slightly.</p>
|
||
<p><strong><em>Barely</em></strong> worth noting but done nonetheless, Cody renamed the <code>read_me.html</code>
|
||
file to <a href="2014/endoh1/spoilers.html">spoilers.html</a> to be clearer in its purpose as
|
||
it is a file with spoilers (and too close to index.html?).</p>
|
||
<div id="2014_endoh2">
|
||
<h2 id="winning-entry-2014endoh2">Winning entry: <a href="2014/endoh2/index.html">2014/endoh2</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-3">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/endoh2//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/endoh2/try.sh">try.sh</a> script.</p>
|
||
<div id="2014_maffiodo1">
|
||
<h2 id="winning-entry-2014maffiodo1">Winning entry: <a href="2014/maffiodo1/index.html">2014/maffiodo1</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-4">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/maffiodo1//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed the <code>Makefile</code> for this entry: it does not require
|
||
<code>SDL2</code> but <code>SDL1</code> so there were linking errors.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/maffiodo1/mario.sh">mario.sh</a> and
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/maffiodo1/giana.sh">giana.sh</a> scripts which play, respectively, <a href="http://en.wikipedia.org/wiki/Super_Mario_Bros.">Super
|
||
Mario Bros</a> and one of <a href="http://en.wikipedia.org/wiki/The_Great_Giana_Sisters">The
|
||
Great Giana Sisters</a>, but
|
||
which let one configure the width and height of the game.</p>
|
||
<div id="2014_maffiodo2">
|
||
<h2 id="winning-entry-2014maffiodo2">Winning entry: <a href="2014/maffiodo2/index.html">2014/maffiodo2</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-5">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/maffiodo2//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/maffiodo2/try.sh">try.sh</a> script.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/maffiodo2/prog.alt.c">alternate code</a>
|
||
provided by the author.</p>
|
||
<div id="2014_morgan">
|
||
<h2 id="winning-entry-2014morgan">Winning entry: <a href="2014/morgan/index.html">2014/morgan</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-6">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/morgan//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/morgan/try.sh">try.sh</a> script.</p>
|
||
<div id="2014_sinon">
|
||
<h2 id="winning-entry-2014sinon">Winning entry: <a href="2014/sinon/index.html">2014/sinon</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-7">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/sinon//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed the code so that the game can play automatically like it
|
||
once did. The problem is that it expects a certain file name which was
|
||
<code>sinon.c</code>. The code now refers to <code>prog.c</code> (it cannot as easily use <code>__FILE__</code>).</p>
|
||
<p>Cody also fixed the scripts <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/sinon/glock.sh">glock.sh</a> and
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/sinon/hecate.sh">hecate.sh</a> which did not work after running
|
||
either of them once as they compile <code>run.c</code> and then do <code>./run | tee run.c</code>
|
||
which overwrites it with output that is not code.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/sinon/try.sh">try.sh</a> script that will first (if perl
|
||
is installed) run the demo mode and then after that it will run the above noted
|
||
scripts in a loop until the user says they do not want to try again (or they
|
||
kill it). This is done this way in case it jams (see index.html for details).</p>
|
||
<div id="2014_skeggs">
|
||
<h2 id="winning-entry-2014skeggs">Winning entry: <a href="2014/skeggs/index.html">2014/skeggs</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-8">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/skeggs//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed the <code>Makefile</code> to compile this entry in modern systems. The problem was
|
||
that the <code>CDEFINE</code> variable in the <code>Makefile</code> was missing <code>'</code>s: the <code>#define CC</code>
|
||
is an actual string that is, in the Makefile, <code>"${CC} -fPIC"</code>, which
|
||
translates to whatever the compiler is followed by a space followed by <code>-fPIC</code>
|
||
but without the <code>'</code>s it was incomplete and so would not compile. Cody didn’t
|
||
have a chance to really look at the compiler error.</p>
|
||
<p><a href="#yusuke">Yusuke</a> suggested that one should use <code>-ldl</code> in the Makefile. This was not
|
||
originally done because it seemed to work but since it uses <code>dlsym()</code> it was
|
||
added later to make it more portable.</p>
|
||
<p>The program creates files in the working directory as part of how it works (see
|
||
the index.html file for details) so Cody made sure that <code>make clobber</code> (via <code>make clean</code>) removes those files and so that they are ignored by <code>.gitignore</code>.</p>
|
||
<div id="2014_vik">
|
||
<h2 id="winning-entry-2014vik">Winning entry: <a href="2014/vik/index.html">2014/vik</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-9">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/vik//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/vik/try.sh">try.sh</a> script. Cody notes that there
|
||
is a bug that will show itself as one of the features does not work right. The
|
||
translation of the raw audio to text is buggy in some cases.</p>
|
||
<p>Cody also added an alternate version that is based on the author’s remarks that will
|
||
theoretically work for Microsoft Windows compilers (if anything works in Windows
|
||
:-) ). We have no way of testing this and if anything has changed since 2014
|
||
that would break it we do not know.</p>
|
||
<div id="2014_wiedijk">
|
||
<h2 id="winning-entry-2014wiedijk">Winning entry: <a href="2014/wiedijk/index.html">2014/wiedijk</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-10">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/wiedijk//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/wiedijk/try.sh">try.sh</a> script which is based on
|
||
the command to try in the ‘try’ section but improved so one can more easily
|
||
specify what <code>indent</code> tool they want to use and also change which <code>sed(1)</code> to use,
|
||
should they want to. It also checks that both of these two tools exist and are
|
||
executable and it pipes it through <code>less(1)</code> as it’s longer than a page worth of
|
||
output.</p>
|
||
<div id="2015">
|
||
<h1 id="the-24th-ioccc"><a href="2015/index.html">2015 - The 24th IOCCC</a></h1>
|
||
</div>
|
||
<div id="2015_burton">
|
||
<h2 id="winning-entry-2015burton">Winning entry: <a href="2015/burton/index.html">2015/burton</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-11">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/burton//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed the code so one can make use of the echo feature, where the
|
||
first character of the filename starts with <code>e</code>. The only way it would work
|
||
before that is if one did something like:</p>
|
||
<pre><code> ln -sf prog eprog
|
||
PATH=$PATH:. ; eprog '...'</code></pre>
|
||
<p>since otherwise the first character would not be <code>e</code> but rather a dot
|
||
(<code>./eprog</code>). This was done by adding to the <code>Makefile</code> <code>-include libgen.h</code> and
|
||
adding to <code>main()</code> after the variable declaration (<code>V*A;</code>) the code:</p>
|
||
<pre><code> *K=basename(*K);</code></pre>
|
||
<p>This was done for both the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/burton/prog.c">prog.c</a> and
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/burton/prog.alt.c">prog.alt.c</a>. The <code>Makefile</code> was also updated to build
|
||
<code>eprog</code> and <code>eprog.alt</code> to make use of the feature more easily. Each is a new
|
||
target (first in <code>TARGET</code> and second in <code>ALT_TARGET</code>) which have a prerequisite
|
||
of <code>${PROG}</code> and <code>${PROG}.alt</code> respectively both of which also copy the <code>prog</code>
|
||
(<code>prog</code> or <code>eprog</code>) to the respective <code>eprog</code> (<code>eprog</code> or <code>eprog.alt</code>). With
|
||
these changes now one can easily use the echo feature the author implemented.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/burton/try.sh">try.sh</a> script. This involved
|
||
adding a text file, <a href="2015/burton/try.this.txt">try.this.txt</a>.</p>
|
||
<p>Cody also added <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/burton/calc.1">calc.1</a> in place of <code>calc.man</code> to have
|
||
proper formatting (in the style of <code>man(1)</code>). The <code>calc.man</code> was removed so as
|
||
to not have to maintain two copies of the same text.</p>
|
||
<p>Cody updated the <code>Makefile</code> to copy the <code>prog</code> to <code>calc</code> and <code>prog.alt</code> to
|
||
<code>calc.alt</code>. <code>ecalc</code> and <code>ecalc.alt</code> also work. This is because the program is
|
||
called <code>calc</code> and is in documentation including the man page. Thus one only need
|
||
add a <code>./</code> to the commands in the man page/index.html.</p>
|
||
<div id="2015_dogon">
|
||
<h2 id="winning-entry-2015dogon">Winning entry: <a href="2015/dogon/index.html">2015/dogon</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-12">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/dogon//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> improved the <code>Makefile</code> so that one can easily change the dimensions
|
||
at compilation time via <code>make(1)</code>.</p>
|
||
<p>Cody also added <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/dogon/prog.alt.c">alternate code</a> that is
|
||
based on the author’s remarks, suggesting that one change the value of <code>q</code> to a
|
||
different number, in order to see a bug that they avoided.</p>
|
||
<div id="2015_duble">
|
||
<h2 id="winning-entry-2015duble">Winning entry: <a href="2015/duble/index.html">2015/duble</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-13">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/duble//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/duble/try.sh">try.sh</a> script.</p>
|
||
<div id="2015_endoh2">
|
||
<h2 id="winning-entry-2015endoh2">Winning entry: <a href="2015/endoh2/index.html">2015/endoh2</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-14">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/endoh2//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/endoh2/try.sh">try.sh</a> script.</p>
|
||
<div id="2015_endoh3">
|
||
<h2 id="winning-entry-2015endoh3">Winning entry: <a href="2015/endoh3/index.html">2015/endoh3</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-15">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/endoh3//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed this to compile with Linux which was having a problem with duplicate
|
||
symbols of <code>main()</code>. The fix is through the compiler option <code>-fcommon</code> which
|
||
will let it compile like it does with macOS.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/endoh3/try.sh">try.sh</a> script which makes
|
||
use of the make rule he added (to enjoy the theme of the entry, <a href="https://en.wikipedia.org/wiki/Back_to_the_Future">Back to the
|
||
Future</a> using this entry by
|
||
simply typing <code>make back_to</code>, <code>make future</code> or <code>make mullender</code>) and then runs
|
||
the famous <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1984/mullender/mullender.c">1984/mullender.c</a>.</p>
|
||
<div id="2015_endoh4">
|
||
<h2 id="winning-entry-2015endoh4">Winning entry: <a href="2015/endoh4/index.html">2015/endoh4</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-16">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/endoh4//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/endoh4/try.sh">try.sh</a> script.</p>
|
||
<div id="2015_hou">
|
||
<h2 id="winning-entry-2015hou">Winning entry: <a href="2015/hou/index.html">2015/hou</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-17">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/hou//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added explicit linking of libm (<code>-lm</code>) for systems that do not do this
|
||
(Linux doesn’t seem to but macOS does).</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/hou/try.sh">try.sh</a> script and the large file <code>large</code>
|
||
which the <code>try.sh</code> script uses.</p>
|
||
<p>Cody also added the RFC 1321 text file, <a href="2015/hou/rfc1321.txt">rfc1321.txt</a> to
|
||
the directory, to make it so one need not download it, and which the index.html
|
||
file now links to.</p>
|
||
<div id="2015_howe">
|
||
<h2 id="winning-entry-2015howe">Winning entry: <a href="2015/howe/index.html">2015/howe</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-18">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/howe//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/howe/try.sh">try.sh</a> script, downloaded the War
|
||
and Peace text file, fixed the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/howe/avgtime.sh">avgtime.sh</a> script (it
|
||
resulted in standard input errors in piping to <code>bc(1)</code>) and added the
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/howe/cc.1">cc.1</a> man page as not all systems have it (in fact it’s
|
||
<code>gcc(1)</code> from Rocky Linux).</p>
|
||
<div id="2015_mills1">
|
||
<h2 id="winning-entry-2015mills1">Winning entry: <a href="2015/mills1/index.html">2015/mills1</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-19">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/mills1//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/mills1/try.sh">try.sh</a> script which changes the
|
||
parameters to what we had in the judges’ remarks to make it easier.</p>
|
||
<div id="2015_mills2">
|
||
<h2 id="winning-entry-2015mills2">Winning entry: <a href="2015/mills2/index.html">2015/mills2</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-20">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/mills2//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/mills2/try.sh">try.sh</a> script.</p>
|
||
<div id="2015_muth">
|
||
<h2 id="winning-entry-2015muth">Winning entry: <a href="2015/muth/index.html">2015/muth</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-21">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/muth//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/muth/try.sh">try.sh</a> script.</p>
|
||
<div id="2015_schweikhardt">
|
||
<h2 id="winning-entry-2015schweikhardt">Winning entry: <a href="2015/schweikhardt/index.html">2015/schweikhardt</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-22">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/schweikhardt//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed the build so that <code>EOF</code> will be <code>-1</code> as the program assumes
|
||
this. It was decided by Cody to do <code>-UEOF -DEOF=-1</code> so as to not have to modify
|
||
the code any with C preprocessor directives (the preferred way) or changing
|
||
<code>EOF</code> to <code>-1</code>.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/schweikhardt/try.sh">try.sh</a> script.</p>
|
||
<div id="2015_yang">
|
||
<h2 id="winning-entry-2015yang">Winning entry: <a href="2015/yang/index.html">2015/yang</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-23">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/yang//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed an unfortunate typo in the <code>Makefile</code> that was preventing some of the
|
||
files from compiling properly, trying instead to compile already compiled code.</p>
|
||
<p>He also added explicit linking of libm (<code>-lm</code>) for systems that do not do this
|
||
(Linux seems to not but macOS does).</p>
|
||
<p>He also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/yang/try.sh">try.sh</a> script.</p>
|
||
<div id="2018">
|
||
<h1 id="the-25th-ioccc"><a href="2018/index.html">2018 - The 25th IOCCC</a></h1>
|
||
</div>
|
||
<div id="2018_anderson">
|
||
<h2 id="winning-entry-2018anderson">Winning entry: <a href="2018/anderson/index.html">2018/anderson</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-24">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/anderson//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/anderson/try.sh">try.sh</a> and
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/anderson/try.alt.sh">try.alt.sh</a> scripts.</p>
|
||
<div id="2018_algmyr">
|
||
<h2 id="winning-entry-2018algmyr">Winning entry: <a href="2018/algmyr/index.html">2018/algmyr</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-25">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/algmyr//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/algmyr/try.sh">try.sh</a> script.</p>
|
||
<div id="2018_bellard">
|
||
<h2 id="winning-entry-2018bellard">Winning entry: <a href="2018/bellard/index.html">2018/bellard</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-26">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/bellard//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/bellard/try.sh">try.sh</a> script.</p>
|
||
<p>Cody also, out of abundance of caution, added a second arg to <code>main()</code> because
|
||
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
|
||
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 -
|
||
Why was arg count and/or type changed in main() in some older
|
||
entries?</a> for more details.</p>
|
||
<p>Cody also added explicit linking of libm (<code>-lm</code>) for systems that do not do this
|
||
(Linux doesn’t seem to but macOS does).</p>
|
||
<p>Cody also added <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/bellard/prog.alt.c">alternate code</a> that should
|
||
work for Windows, based on the author’s remarks. The same thing with the number
|
||
of args to <code>main()</code> that was done in the original entry was done with this
|
||
version as well.</p>
|
||
<div id="2018_burton1">
|
||
<h2 id="winning-entry-2018burton1">Winning entry: <a href="2018/burton1/index.html">2018/burton1</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-27">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/burton1//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed the <code>scripthd</code> script (referred to <code>prog</code> not <code>./prog</code>) and
|
||
renamed it to <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/burton1/scripthd.sh">scripthd.sh</a> to help browsers and
|
||
GitHub as far as downloading/displaying goes.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/burton1/try.sh">try.sh</a> script which also uses
|
||
<code>scripthd.sh</code> to show how it differs from <code>prog</code> itself.</p>
|
||
<div id="2018_burton2">
|
||
<h2 id="winning-entry-2018burton2">Winning entry: <a href="2018/burton2/index.html">2018/burton2</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-28">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/burton2//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed the <code>make test</code> rule: it tried to run <code>tac(1)</code> (in systems
|
||
that have that command) rather than the entry itself which is called <code>tac</code>. Also
|
||
the <code>runtest</code> script (which he renamed to <code>runtest.sh</code> for download/browser
|
||
display purposes) was not executable.</p>
|
||
<p>Cody also renamed <code>manpage</code> to <code>manpage.sh</code> for download/browser purposes and he
|
||
did the same with <code>tokenfix</code> to <code>tokenfix.sh</code> as well as <code>spotcheck</code> to
|
||
<code>spotcheck.sh</code>, <code>spotdiff</code> to <code>spotdiff.sh</code>, <code>freqcount</code> to <code>freqcount.sh</code> and
|
||
<code>mkkeywords</code> to <code>mkkeywords.sh</code>.</p>
|
||
<p>Cody also made the man page properly formatted for <code>man(1)</code> and renamed it the
|
||
file <code>tac.1</code>.</p>
|
||
<p>Cody also renamed <code>discrepancies</code> to <code>discrepancies.html</code> and made it markdown
|
||
format.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/burton2/tokcount.sh">tokcount.sh</a> script which was
|
||
included in the remarks of the author but not an included file.</p>
|
||
<p>Finally Cody added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/burton2/try.sh">try.sh</a> script.</p>
|
||
<div id="2018_ciura">
|
||
<h2 id="winning-entry-2018ciura">Winning entry: <a href="2018/ciura/index.html">2018/ciura</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-29">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/ciura//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/ciura/try.sh">try.sh</a> and
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/ciura/try.alt.sh">try.alt.sh</a> scripts and the PDF file,
|
||
<a href="2018/ciura/lexicon.pdf">lexicon.pdf</a>, that was a dead link, restored from the
|
||
Internet Wayback Machine.</p>
|
||
<div id="2018_endoh1">
|
||
<h2 id="winning-entry-2018endoh1">Winning entry: <a href="2018/endoh1/index.html">2018/endoh1</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-30">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/endoh1//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/endoh1/try.sh">try.sh</a> script which shows the
|
||
input files one at a time and after each one is shown, it feeds it to the
|
||
program, redirecting the output to the respective GIF file. It then will inform
|
||
the user they should open it in a GIF viewer that can show animation in animated
|
||
GIF files. It offers an example command for macOS like the judges did in their
|
||
remarks. The input files offered includes the <code>prog.c</code> as the author,
|
||
<a href="#yusuke">Yusuke</a>, suggested that it too has a secret.</p>
|
||
<div id="2018_endoh2">
|
||
<h2 id="winning-entry-2018endoh2">Winning entry: <a href="2018/endoh2/index.html">2018/endoh2</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-31">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/endoh2//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/endoh2/run.sh">run.sh</a> script (had commands that didn’t
|
||
exist and also didn’t work even after that was addressed) and added the
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/endoh2/try.sh">try.sh</a>, <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/endoh2/python.sh">python.sh</a> and
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/endoh2/python3.sh">python3.sh</a> scripts. The <code>try.sh</code> script runs all
|
||
three of the other scripts but each allows one to send an interrupt in the loops
|
||
and still continue to the next script (if one does it when not in a loop it will
|
||
exit the script). The <code>make python</code> and <code>make python3</code> rules in the <code>Makefile</code> now
|
||
run the respective scripts.</p>
|
||
<div id="2018_hou">
|
||
<h2 id="winning-entry-2018hou">Winning entry: <a href="2018/hou/index.html">2018/hou</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-32">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/hou//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added explicit linking of libm (<code>-lm</code>) for systems that do not do this
|
||
(Linux doesn’t seem to but macOS does).</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/hou/try.sh">try.sh</a> script.</p>
|
||
<div id="2018_mills">
|
||
<h2 id="winning-entry-2018mills">Winning entry: <a href="2018/mills/index.html">2018/mills</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-33">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/mills//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a>, based on the author’s remarks, made it possible to save state
|
||
between runs of the program so that one can resume where they left off. It
|
||
should be noted that there is a bug in the entry (irrespective of save state
|
||
option) where running <code>./prog</code> twice in a row involves having to hit (the second
|
||
run) enter and then exit and then start the program again. Also if you do add a
|
||
file you should run <code>sync</code> prior to exiting or else the file might not exist or
|
||
it might be corrupt. See <a href="bugs.html#2018_mills">2018/mills in bugs.html</a> for more
|
||
details on the bug.</p>
|
||
<div id="2018_poikola">
|
||
<h2 id="winning-entry-2018poikola">Winning entry: <a href="2018/poikola/index.html">2018/poikola</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-34">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/poikola//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the missing <code>docs</code> rule to the <code>Makefile</code> that forms a PDF
|
||
file. The rule requires the tool <code>pdflatex</code>.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/poikola/try.sh">try.sh</a> script.</p>
|
||
<p><a href="authors.html#Dave_Burton">Dave Burton</a>, during the preview period, noticed a
|
||
problem where the macOS <code>Terminal.app</code> does not work properly for this program.
|
||
We added some additional notes on what might happen (it varies depending on
|
||
configuration).</p>
|
||
<div id="2018_vokes">
|
||
<h2 id="winning-entry-2018vokes">Winning entry: <a href="2018/vokes/index.html">2018/vokes</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-35">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/vokes//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/vokes/try.sh">try.sh</a> script.</p>
|
||
<div id="2018_yang">
|
||
<h2 id="winning-entry-2018yang">Winning entry: <a href="2018/yang/index.html">2018/yang</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-36">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/yang//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/yang/try.sh">try.sh</a> script. This script will ask
|
||
if the user wants to see some of the spoilers and only show them if they type
|
||
<code>y</code> or <code>Y</code>.</p>
|
||
<div id="2019">
|
||
<h1 id="the-26th-ioccc"><a href="2019/index.html">2019 - The 26th IOCCC</a></h1>
|
||
</div>
|
||
<div id="2019_adamovsky">
|
||
<h2 id="winning-entry-2019adamovsky">Winning entry: <a href="2019/adamovsky/index.html">2019/adamovsky</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-37">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/adamovsky//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/adamovsky/try.sh">try.sh</a> script and the Unlambda
|
||
file <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/adamovsky/crash.unl">crash.unl</a> which is in the judges’ remarks as
|
||
to what can crash it - but it’s not a bug, it’s a feature.</p>
|
||
<div id="2019_burton">
|
||
<h2 id="winning-entry-2019burton">Winning entry: <a href="2019/burton/index.html">2019/burton</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-38">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/burton//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed the <code>Makefile</code> which had a bad character, a ‘%’ instead of a ‘$’ which
|
||
caused a rule to fail.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/burton/try.sh">try.sh</a> script which shows a
|
||
side-by-side comparison on several files of the entry and <code>wc(1)</code> as well as
|
||
running <code>make test</code>.</p>
|
||
<p>Cody also fixed the script <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/burton/check.sh">check.sh</a> (renamed from
|
||
<code>check</code>) in case <code>x</code> is specified and is not executable and also made it satisfy
|
||
ShellCheck. He also made ShellCheck not be a cow and/or (to use Bart Simpson’s
|
||
advice :-) ) <code>'not have a cow</code> about certain things (including one thing it was
|
||
wrong about) in <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/burton/cow.sh">cow.sh</a> (which was renamed from <code>cow</code>)
|
||
<del>moo</del>too.</p>
|
||
<p>Cody also renamed the file <code>on.one.liners</code> to
|
||
<a href="2019/burton/on.one.liners.txt">on.one.liners.txt</a> to help with
|
||
browsers/GitHub.</p>
|
||
<div id="2019_ciura">
|
||
<h2 id="winning-entry-2019ciura">Winning entry: <a href="2019/ciura/index.html">2019/ciura</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-39">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/ciura//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed an invalid bytes error in <code>tr</code> in the scripts. This does not
|
||
mean that they will produce any output, though, as they expect all
|
||
letters and that makes it harder to form perfect pangrams. On the subject of
|
||
German umlauts and Eszett (ß) see the <a href="bugs.html#2019_ciura">2019/ciura in bugs.html</a>.</p>
|
||
<p>Cody also fixed the <code>Makefile</code> so that the alternate code would be built when running
|
||
<code>make alt</code>.</p>
|
||
<p>Cody converted the PS file linked to by the author to a PDF,
|
||
<a href="2019/ciura/fasc5c.pdf">fasc5c.pdf</a>, and added it to the
|
||
website.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/ciura/try.sh">try.sh</a> and
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/ciura/try.alt.sh">try.alt.sh</a> scripts.</p>
|
||
<p>Finally he added the scripts for the different languages that use the alternate
|
||
version but with the caveat that only English appears to work. Again, see <a href="bugs.html#2019_ciura">2019/ciura in
|
||
bugs.html</a> for more details.</p>
|
||
<div id="2019_diels-grabsch1">
|
||
<h2 id="winning-entry-2019diels-grabsch1">Winning entry: <a href="2019/diels-grabsch1/index.html">2019/diels-grabsch1</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-40">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/diels-grabsch1//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/diels-grabsch1/try.sh">try.sh</a> script.</p>
|
||
<p>Cody also added the file <a href="2019/diels-grabsch1/Shakespeare.txt">Shakespeare.txt</a>
|
||
from <a href="2019/mills/index.html">2019/mills</a> (after running <code>make</code>) so that one can
|
||
not worry about having the entire IOCCC winning entry tree (or at least the 2019 tree each
|
||
entry in a subdirectory). This was important as we now have tarballs for each
|
||
entry by themselves.</p>
|
||
<div id="2019_diels-grabsch2">
|
||
<h2 id="winning-entry-2019diels-grabsch2">Winning entry: <a href="2019/diels-grabsch2/index.html">2019/diels-grabsch2</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-41">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/diels-grabsch2//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/diels-grabsch2/try.sh">try.sh</a> script. This
|
||
script will try and show the difference (i.e. the same output) between the
|
||
program and the result of <code>sha512sum</code> or <code>shasum -a 512</code> if either of those
|
||
tools can be found but otherwise it’ll just run the program itself, showing its
|
||
own sha512sum value.</p>
|
||
<div id="2019_dogon">
|
||
<h2 id="winning-entry-2019dogon">Winning entry: <a href="2019/dogon/index.html">2019/dogon</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-42">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/dogon//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added explicit linking of libm (<code>-lm</code>) for systems that do not do this
|
||
(Linux does not seem to but macOS does).</p>
|
||
<p>He also fixed the <code>Makefile</code> so that it compiles with <code>clang</code> in Linux.</p>
|
||
<p>He also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/dogon/try.sh">try.sh</a> script.</p>
|
||
<p>He also made it possible to easily redefine the memory macro <code>Z</code> at compilation
|
||
time by improving the <code>Makefile</code>.</p>
|
||
<p>He fixed a link in the spoiler source code. As a spoiler it felt more important
|
||
that this was done (some typos were fixed as well but only some - the purpose
|
||
was to only correct spelling and only some, not to change wording or anything
|
||
else).</p>
|
||
<div id="2019_duble">
|
||
<h2 id="winning-entry-2019duble">Winning entry: <a href="2019/duble/index.html">2019/duble</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-43">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/duble//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> made the <code>make fullscreen</code> more portable by not relying on
|
||
<code>stty(1)</code> and <code>sed(1)</code> but rather it just uses <code>tput(1)</code>. He also made it so
|
||
that if <code>tput(1)</code> is not found it tells the user an easier way to compile the full
|
||
screen size rather than having to modify the <code>Makefile</code>. This is done with a script,
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/duble/fullscreen.sh">fullscreen.sh</a>, to simplify the <code>Makefile</code> and provide
|
||
an easy way to tell the user how to compile it, assuming that the environmental
|
||
variables <code>LINES</code> and <code>COLUMNS</code> are set. But even if they’re not set it explains
|
||
how to easily compile the program to a specific size. Note that <code>LINES</code> and
|
||
<code>COLUMNS</code> is not available to scripts so it can’t make use of them that way.</p>
|
||
<div id="2019_endoh">
|
||
<h2 id="winning-entry-2019endoh">Winning entry: <a href="2019/endoh/index.html">2019/endoh</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-44">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/endoh//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p>As this is a backtrace quine having the optimiser enabled is not a good idea so
|
||
<a href="#cody">Cody</a> disabled it. For this same reason he also added the <code>-g</code> flag to the
|
||
compilation as debugging symbols might just be useful for an entry that’s
|
||
supposed to segfault (and which you’re supposed to inspect the core file) :-)</p>
|
||
<p>Cody also added the simple <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/endoh/ascii.c">ascii.c</a> that (while it has an
|
||
arg) prints out the character of the ASCII value (uses <code>isascii(3)</code> first). This
|
||
combined with the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/endoh/try.sh">try.sh</a> script that he added allows one
|
||
to easily reconstruct the source code through GDB by the fact it’s a backtrace
|
||
quine.</p>
|
||
<div id="2019_giles">
|
||
<h2 id="winning-entry-2019giles">Winning entry: <a href="2019/giles/index.html">2019/giles</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-45">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/giles//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/giles/try.sh">try.sh</a> script.</p>
|
||
<div id="2019_karns">
|
||
<h2 id="winning-entry-2019karns">Winning entry: <a href="2019/karns/index.html">2019/karns</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-46">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/karns//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> forced the <code>Makefile</code> to use <code>-O0</code> as he discovered that an
|
||
optimiser level > 0 causes a segfault (sometimes?). (Perhaps this is the problem
|
||
that the author reported where it sometimes segfaults but Cody did not try
|
||
debugging it since it works with <code>-O0</code>.)</p>
|
||
<p>He also added the script <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/karns/try.sh">try.sh</a> to showcase the entry a
|
||
bit more easily.</p>
|
||
<div id="2019_lynn">
|
||
<h2 id="winning-entry-2019lynn">Winning entry: <a href="2019/lynn/index.html">2019/lynn</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-47">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/lynn//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/lynn/try.sh">try.sh</a> script.</p>
|
||
<p>Cody also added the <a href="2019/lynn/example-1.txt">example-1.txt</a> and
|
||
<a href="2019/lynn/example-2.txt">example-2.txt</a> text files from
|
||
<a href="2018/vokes/index.html">2018/vokes</a> so that the entry does not rely on any other
|
||
entry existing.</p>
|
||
<div id="2019_mills">
|
||
<h2 id="winning-entry-2019mills">Winning entry: <a href="2019/mills/index.html">2019/mills</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-48">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/mills//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/mills/try.sh">try.sh</a> script.</p>
|
||
<div id="2019_poikola">
|
||
<h2 id="winning-entry-2019poikola">Winning entry: <a href="2019/poikola/index.html">2019/poikola</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-49">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/poikola//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the missing <code>docs</code> rule to the <code>Makefile</code> that forms a PDF
|
||
file. The rule requires the tool
|
||
<a href="https://tug.org/applications/pdftex/index.html">pdflatex</a>.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/poikola/prog.alt.c">alternate code</a> which
|
||
adds a newline after each number for parsing in additional ways.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/poikola/try.sh">try.sh</a> and
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/poikola/try.alt.sh">try.alt.sh</a> scripts.</p>
|
||
<p>Cody also disabled the optimiser because the author stated that for <code>clang</code> the
|
||
levels <code>[0123s]</code> work okay but with <code>GCC</code> version 6 they only said level 0 works,
|
||
suggesting that with some versions of <code>GCC</code> it might not be correct with levels !=
|
||
0 and since 0 works with <code>clang</code> that’s okay. Similarly, the same for C standards
|
||
tested: <code>gnu17</code> was not tested but <code>gnu11</code> was so the standard was set to
|
||
<code>gnu11</code>.</p>
|
||
<div id="2019_yang">
|
||
<h2 id="winning-entry-2019yang">Winning entry: <a href="2019/yang/index.html">2019/yang</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-50">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/yang//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/yang/try.sh">try.sh</a> script which also involved
|
||
slightly updating the <a href="2019/yang/sample_input.txt">sample_input.txt</a> file
|
||
(removed trailing newlines as it resulted in <code>diff</code> showing differences when it
|
||
shouldn’t) and adding the <a href="2019/yang/ioccc.txt">ioccc.txt</a> file.</p>
|
||
<div id="2020">
|
||
<h1 id="the-27th-ioccc"><a href="2020/index.html">2020 - The 27th IOCCC</a></h1>
|
||
</div>
|
||
<div id="2020_burton">
|
||
<h2 id="winning-entry-2020burton">Winning entry: <a href="2020/burton/index.html">2020/burton</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-51">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/burton//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed the script <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/burton/check_be.sh">check_be.sh</a>: it
|
||
assumed that <code>prog_be</code> was in <code>PATH</code> which is unlikely so it was changed to
|
||
<code>./prog_be</code>.</p>
|
||
<p>Cody also improved the <code>make test</code> rule (which uses <code>check_be.sh</code> and the Little
|
||
Endian counterpart) so that it shows that the files are identical rather than
|
||
showing nothing at all.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/burton/try.sh">try.sh</a> script.</p>
|
||
<div id="2020_carlini">
|
||
<h2 id="winning-entry-2020carlini">Winning entry: <a href="2020/carlini/index.html">2020/carlini</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-52">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/carlini//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/carlini/try.sh">try.sh</a> script which although at
|
||
first glance might not appear to have a point, it actually does, namely showing
|
||
how you can automate play and then reminding you to actually play for real, with
|
||
a friend, whether that’s real or imagined.</p>
|
||
<div id="2020_endoh2">
|
||
<h2 id="winning-entry-2020endoh2">Winning entry: <a href="2020/endoh2/index.html">2020/endoh2</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-53">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/endoh2//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> copied the files from the <code>spoiler.zip</code> file (from his copy during
|
||
the preview period) that was password protected with a password that was no
|
||
longer known (but fortunately was already extracted).</p>
|
||
<p>He also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/endoh2/try.sh">try.sh</a> script.</p>
|
||
<div id="2020_endoh3">
|
||
<h2 id="winning-entry-2020endoh3">Winning entry: <a href="2020/endoh3/index.html">2020/endoh3</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-54">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/endoh3//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed the script <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/endoh3/run_clock.sh">run_clock.sh</a> which gave a
|
||
funny error when running it:</p>
|
||
<pre><code> $ ./run_clock.sh
|
||
-bash: ./run_clock.sh: cannot execute: required file not found</code></pre>
|
||
<p>If run from within vim a different error message occurred:</p>
|
||
<pre><code> /bin/bash: ./run_clock.sh: /usr/bin/end: bad interpreter: No such file or directory</code></pre>
|
||
<p>though this was only noticed later on after it was fixed.</p>
|
||
<p>What was wrong? A typo in the shebang which had <code>/usr/bin/end</code> instead of
|
||
<code>/usr/bin/env</code>.</p>
|
||
<p>Also if <code>clock</code> did not exist and one tried to run the script it would make an
|
||
invalid <code>clock.c</code> which meant it could not compile so it now runs <code>make clock</code>
|
||
first.</p>
|
||
<p>Cody also reported (during the preview period of 2020) for some systems (at some
|
||
point?) like macOS the use of <code>make clock</code> would not work due possibly to a
|
||
timing issue so <a href="#yusuke">Yusuke</a> changed it to compile <code>clock.c</code>
|
||
file directly (this might have been fixed in the
|
||
<code>Makefile</code> later on but it doesn’t hurt to keep it in and this way it isn’t a
|
||
problem in any system).</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/endoh3/run_clock.alt.sh">run_clock.alt.sh</a> script
|
||
which is analogous to the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/endoh3/run_clock.sh">run_clock.sh</a> but for the
|
||
alternate code provided by the author, Yusuke.</p>
|
||
<div id="2020_ferguson1">
|
||
<h2 id="winning-entry-2020ferguson1">Winning entry: <a href="2020/ferguson1/index.html">2020/ferguson1</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-55">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/ferguson1//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p>Just for awareness, here: <a href="#cody">Cody</a> made some corrections to the vital <a href="2020/ferguson1/chocolate-cake.html">Double
|
||
layered chocolate fudge cake recipe</a> :-)
|
||
Other fixes were made but as it’s his entry it’s not worth noting.</p>
|
||
<div id="2020_giles">
|
||
<h2 id="winning-entry-2020giles">Winning entry: <a href="2020/giles/index.html">2020/giles</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-56">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/giles//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/giles/try.sh">try.sh</a> script. This script does
|
||
the conversion of <code>pi.wav</code> (showing the digits) and also converts the number for
|
||
<code>jenny.wav</code> and a number Cody ‘came up with’: one that resembles <code>IOCCC 28</code>:
|
||
<code>10666-28</code>. The <code>6</code> is the closest to <code>C</code> in his head even though it’s not
|
||
perfect.</p>
|
||
<p>If <code>play(1)</code> from SoX is not installed the script checks for <code>aplay(1)</code>. If
|
||
neither are installed it warns the user about this, linking to the FAQ about it,
|
||
and tells them they will have to play the WAV files manually. Otherwise it’ll
|
||
use the program to play the WAV files (and in one case <code>stdout</code>).</p>
|
||
<div id="2020_kurdyukov1">
|
||
<h2 id="winning-entry-2020kurdyukov1">Winning entry: <a href="2020/kurdyukov1/index.html">2020/kurdyukov1</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-57">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/kurdyukov1//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/kurdyukov1/try.sh">try.sh</a> script.</p>
|
||
<div id="2020_kurdyukov2">
|
||
<h2 id="winning-entry-2020kurdyukov2">Winning entry: <a href="2020/kurdyukov2/index.html">2020/kurdyukov2</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-58">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/kurdyukov2//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/kurdyukov2/try.sh">try.sh</a> script.</p>
|
||
<p>Cody also added <code>-L</code>/<code>-I</code> paths to the <code>Makefile</code> to let this compile more easily if
|
||
the user has installed the appropriate library with
|
||
<a href="https://www.macports.org">MacPorts</a> (with the default MacPorts prefix
|
||
<code>/opt/local</code>).</p>
|
||
<p>Cody also fixed the script <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/kurdyukov2/makegif.sh">makegif.sh</a> in a variety
|
||
of ways: <code>shellcheck(1)</code>, make sure the program is compiled first (allowing one to
|
||
specify which compiler to use with <code>CC=foo ./makegif.sh ...</code>), checking that
|
||
<code>convert(1)</code> is found and that it worked properly (linking to the proper FAQ
|
||
entry if not installed or it fails).</p>
|
||
<div id="2020_kurdyukov3">
|
||
<h2 id="winning-entry-2020kurdyukov3">Winning entry: <a href="2020/kurdyukov3/index.html">2020/kurdyukov3</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-59">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/kurdyukov3//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/kurdyukov3/try.sh">try.sh</a> script.</p>
|
||
<p>He also added a link that has much more details about this phenomenon to the
|
||
index.html. Naturally he’s one of the ones who can read text even if it’s even
|
||
more jumbled but we know of others too.</p>
|
||
<div id="2020_kurdyukov4">
|
||
<h2 id="winning-entry-2020kurdyukov4">Winning entry: <a href="2020/kurdyukov4/index.html">2020/kurdyukov4</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-60">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/kurdyukov4//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/kurdyukov4/try.sh">try.sh</a> script.</p>
|
||
<p>Cody also added from <a href="2019/mills/index.html">2019/mills</a> the text file
|
||
<a href="2020/kurdyukov4/Shakespeare.txt">Shakespeare.txt</a> as we now provide a tarball
|
||
of each entry by itself.</p>
|
||
<p>Also, as a fellow Tolkienist, to explain the confusing (to most people) award
|
||
title, Cody gave a quick translation of <code>lámatyávë</code>, which comes from <a href="https://en.wikipedia.org/wiki/Morgoth%27s_Ring">Morgoth’s
|
||
Ring</a>, volume X of the 12
|
||
volume <a href="https://en.wikipedia.org/wiki/The_History_of_Middle-earth">History of
|
||
Middle-earth</a> (known
|
||
to us Tolkienists as <code>HoMe</code>), which he naturally :-) has, by the late and great
|
||
<a href="https://en.wikipedia.org/wiki/Christopher_Tolkien">Christopher Tolkien</a>, son
|
||
and literary executor and heir to <a href="https://www.tolkienestate.com/life/biography/">J.R.R.
|
||
Tolkien</a>.</p>
|
||
<div id="2020_otterness">
|
||
<h2 id="winning-entry-2020otterness">Winning entry: <a href="2020/otterness/index.html">2020/otterness</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-61">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/otterness//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the MIDI files <a href="2020/otterness/cvikl.mid">cvikl.mid</a> and
|
||
<a href="2020/otterness/entertainer.mid">entertainer.mid</a> from the URLs we suggested so
|
||
that one need not download them and to make sure they can always be obtained
|
||
even if the domain or link goes dead.</p>
|
||
<p>Cody also added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/otterness/try.sh">try.sh</a> script.</p>
|
||
<div id="2020_tsoj">
|
||
<h2 id="winning-entry-2020tsoj">Winning entry: <a href="2020/tsoj/index.html">2020/tsoj</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-62">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/tsoj//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added <a href="2020/tsoj/index.html#alternate-code">alternate code</a> that will feel
|
||
more at home for vi users. One might still end up cursing (see the index.html
|
||
file) but probably a lot less :-)</p>
|
||
<div id="2020_yang">
|
||
<h2 id="winning-entry-2020yang">Winning entry: <a href="2020/yang/index.html">2020/yang</a></h2>
|
||
<h3 id="winning-entry-source-code-prog.c-63">Winning entry source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/yang//prog.c">prog.c</a></h3>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> added the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/yang/try.sh">try.sh</a> script.</p>
|
||
<p>Cody also added a make rule (<code>make cppp</code>) for the author’s provided C++ code
|
||
that can preprocess the generated output to make them more acceptable to typical
|
||
compilers. See the index.html for more details.</p>
|
||
<div id="general_thanks">
|
||
<h1 id="general-thanks">General thanks</h1>
|
||
</div>
|
||
<div id="makefiles_fixes_improvements">
|
||
<h2 id="makefiles-fixes-and-improvements">Makefiles fixes and improvements</h2>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> fixed the top level <code>Makefile</code> <code>all</code> rule which had a stray <code>fi;</code>
|
||
without an <code>if</code> so the rule failed entirely.</p>
|
||
<p>Cody also made a variety of other changes in all the Makefiles, sometimes to get
|
||
an entry to work, all noted above, but he also <strong>improved them all</strong> in at least
|
||
one or two ways. Some of the changes made are below.</p>
|
||
<p>Cody changed the <code>LIBS</code> variable to <code>LDFLAGS</code> as that is the standard
|
||
variable. This simplifies compiling without having to modify the <code>Makefile</code> which
|
||
can be useful if something changes or if someone is trying to fix an entry but
|
||
forgets to change the <code>Makefile</code> or even if they don’t want to make a change due
|
||
to a temporary test. These would of course depend on the compiler invocation but
|
||
since <code>LDFLAGS</code> is standard it is more likely to be used by default so no need
|
||
to check the Makefiles.</p>
|
||
<p>Sometimes there were bad characters or rules that caused the entry to fail to
|
||
compile or not work in some way. These are noted above as well.</p>
|
||
<p>Where useful he added some notes to the Makefiles during compilation to let one
|
||
know of certain problems or features that matter for instance having to disable
|
||
the optimiser or in one case enabling <code>-g</code>.</p>
|
||
<p>Also, rather than check <code>$(CC)</code> for exact matches of <code>gcc</code> or <code>clang</code> it now is
|
||
that if <code>$(CC)</code> contains <code>gcc</code> or contains <code>clang</code> then the specific actions
|
||
related to the specific compiler will be done (priority is <code>gcc</code> then <code>clang</code>). This
|
||
is useful because it’s not guaranteed that the compiler names for <code>gcc</code> or
|
||
<code>clang</code> will be exactly that; in macOS for instance it can happen that they are
|
||
in fact different names especially if one installs them from something like
|
||
<a href="https://www.macports.org">MacPorts</a> or possibly <a href="https://brew.sh">Homebrew</a>.</p>
|
||
<p>There were some other fixes as well including mass typo fixes in the Makefiles
|
||
(though that usually does not mean it is worth a thank you note it might be
|
||
worth noting in this case). Other times it was enabling or disabling the
|
||
optimiser to fix an entry, sometimes causing other problems that also had to be
|
||
fixed, a good example being <a href="#1986_marshall">1986/marshall</a> (see the
|
||
<a href="1986/marshall/compilers.html">compilers.html</a> for the amusing details and all that
|
||
had to be done to fix it).</p>
|
||
<p>There was a ‘problem’ where <code>${MAKE}</code> was <code>$(MAKE)</code>: this doesn’t break anything
|
||
but it is inconsistent with the rest of the <code>${foo}</code> tools even if by tradition
|
||
it is <code>$(MAKE)</code>.</p>
|
||
<p>Cody also added missing variables like <code>BASH</code> and <code>PDFLATEX</code> to the
|
||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/var.mk">var.mk</a> file and removed another that was deemed problematic or
|
||
undesired. Other variable names had typos in them.</p>
|
||
<p>In at least one case, like the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/Makefile">top level Makefile</a>, where raw
|
||
commands that are in <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/var.mk">var.mk</a> were used, Cody updated them to use the
|
||
variables.</p>
|
||
<p>A comment was missing for the <code>diff_alt_orig</code> rule in all the Makefiles and
|
||
this, along with many other fixes and changes to the Makefiles were made by
|
||
Cody’s <a href="https://github.com/xexyl/sgit">sgit tool</a> but many other changes he did
|
||
manually.</p>
|
||
<div id="consistency_improvements">
|
||
<h2 id="consistency-improvements">Consistency improvements</h2>
|
||
</div>
|
||
<p><a href="#cody">Cody</a>, being the IOCCC’s resident corrections officer :-) (and a fine one at
|
||
that, we think :-) ), made many, many typ0 (… :-) ) fixes throughout the
|
||
README.md files, scripts, other data files, Makefiles (see above) etc.</p>
|
||
<p>He also updated the formatting of the README.md files, used to generate the
|
||
index.html files, after renaming the old files to README.md, as well as changing
|
||
some other files to markdown as well as format fixing them.</p>
|
||
<p>Where possible he made the presentation of the entries much more consistent
|
||
across the entries of all the years as well as other files. This is not possible
|
||
for everything (the remarks of authors, for instance, cannot be and should not
|
||
be made consistent but adding markdown where necessary in the remarks is).</p>
|
||
<p>Some of these fixes were done with his <a href="https://github.com/xexyl/sgit">sgit
|
||
tool</a> as well but the vast majority were done
|
||
manually.</p>
|
||
<div id="manifest_improvements">
|
||
<h2 id="manifest-improvements">Manifest improvements</h2>
|
||
</div>
|
||
<p><a href="#cody">Cody</a> greatly improved the manifest of the winning entries so that the
|
||
links to the files in the index.html files make sense and are consistent,
|
||
although some might not make as much sense unless one looks into the entry.</p>
|
||
<div id="thank_you_honor_roll">
|
||
<h2 id="thank-you-honor-roll">Thank you honor roll</h2>
|
||
</div>
|
||
<p>There are a number of people who have contributed to <strong>many many
|
||
changes</strong>, fixes and <strong>many important improvements</strong> that we
|
||
wish to <strong>especially thank</strong>.</p>
|
||
<h3 id="authors">Authors</h3>
|
||
<p>A good number of the <a href="authors.html">winning entries of the
|
||
IOCCC</a> tested, identified and helped correct
|
||
and/or improve the write-ups of fellow IOCCC entries for the year that they won.
|
||
The list of those entries is too long to mention: nevertheless the <a href="judges.html">IOCCC
|
||
judges</a> <strong>VERY MUCH APPRECIATE</strong> those who
|
||
helped improve the presentation of their fellow IOCCC entries.</p>
|
||
<div id="cody">
|
||
<h3 id="cody-boone-ferguson">Cody Boone Ferguson</h3>
|
||
</div>
|
||
<p>We call out the extensive contributions of <a href="authors.html#Cody_Boone_Ferguson">Cody Boone
|
||
Ferguson</a> who is
|
||
responsible for most of the improvements and fixes including many <strong>EXTREMELY
|
||
HARD bug fixes</strong> like <a href="thanks-for-help.html#1988_phillipps">1988/phillipps</a>,
|
||
<a href="thanks-for-help.html#1992_vern">1992/vern</a>,
|
||
<a href="thanks-for-help.html#2001_anonymous">2001/anonymous</a>,
|
||
<a href="thanks-for-help.html#2004_burley">2004/burley</a> and
|
||
<a href="thanks-for-help.html#2005_giljade">2005/giljade</a>, making all entries such as
|
||
<a href="thanks-for-help.html#1985_sicherman">1985/sicherman</a> and
|
||
<a href="thanks-for-help.html#1986_wall">1986/wall</a> not need <code>-traditional-cpp</code> (all
|
||
<strong>EXTREMELY HARD</strong>), fixing entries to work with <code>clang</code>, some <strong>EXTREMELY HARD</strong>
|
||
like <a href="thanks-for-help.html#1991_dds">1991/dds</a>, or as much as possible
|
||
(<a href="thanks-for-help.html#1989_westley">1989/westley</a>, a true masterpiece that is
|
||
<strong>INCREDIBLY HARD, <em>MUCH MORE SO</em> than any other fix!</strong>), porting entries to
|
||
macOS (some <strong>EXTREMELY HARD</strong> like
|
||
<a href="thanks-for-help.html#1998_schweikh1">1998/schweikh1</a>, fixing code like
|
||
<a href="thanks-for-help.html#2001_herrmann2">2001/herrmann2</a> to work in both
|
||
32-bit/64-bit which <em>can be</em> <strong>EXTREMELY HARD</strong>, providing alternate code where
|
||
useful/necessary, improving <strong>ALL <em>Makefiles</em></strong>, writing scripts to
|
||
greatly simplify running many of the entries and writing
|
||
<a href="https://github.com/xexyl/sgit">sgit</a> to easily run
|
||
<code>sed(1)</code> on files in the repo to help build the website.</p>
|
||
<p>Cody Boone Ferguson also used one of his own tools to detect many dead links.
|
||
While the tool was not perfect it went a long way to uncover a good number of
|
||
bad, broken or otherwise invalid links. It was a very laborious task to copy
|
||
and paste problematic links into the <a href="https://web.archive.org">Internet Wayback
|
||
Machine</a> in an effort to try and find otherwise lost
|
||
content. A good number of links that now refer to something in the <a href="https://web.archive.org">Internet
|
||
Wayback Machine</a> replace bad, broken, or otherwise
|
||
invalid links are thanks to Cody’s efforts! Another tool he wrote detected
|
||
inconsistent award titles in the README files and CSV file (that he generated
|
||
from the SQL file).</p>
|
||
<p>Additionally Cody greatly improved the manifest of the winning entries and
|
||
checked that the generated html files, index.html and otherwise, look well and
|
||
presentable and suggested a CSS rule for <code><img></code> to make images more responsive
|
||
on smaller screens.</p>
|
||
<p><strong>THANK YOU VERY MUCH</strong> for your extensive efforts in helping improve the IOCCC
|
||
presentation of past IOCCC entries and fixing almost all past entries for modern
|
||
systems!</p>
|
||
<div id="yusuke">
|
||
<h3 id="yusuke-endoh">Yusuke Endoh</h3>
|
||
</div>
|
||
<p><a href="authors.html#Yusuke_Endoh">Yusuke Endoh</a> supplied a
|
||
number of important bug fixes to a number of past IOCCC entries. Some of those
|
||
fixes were <strong>EXTREMELY TECHNICALLY CHALLENGING</strong> such as
|
||
<a href="thanks-for-help.html#1989_robison">1989/robison</a>,
|
||
<a href="thanks-for-help.html#1990_cmills">1990/cmills</a>,
|
||
<a href="thanks-for-help.html#1992_lush">1992/lush</a> and
|
||
<a href="thanks-for-help.html#2001_ctk">2001/ctk</a>. <strong>THANK YOU VERY MUCH</strong> for
|
||
your help!</p>
|
||
<div id="neglect">
|
||
<h2 id="did-we-neglect-to-credit-you">Did we neglect to credit you?</h2>
|
||
</div>
|
||
<p>If you submitted a fix to an entry for which you are not the author,
|
||
and your fix is accepted (in part or as a whole), we would be happy
|
||
to add you to this <a href="thanks-for-help.html">thanks for the help</a> file.</p>
|
||
<p>If you believe we incorporated one of your fixes to an IOCCC winning entry (that you
|
||
are not the author of) for which we neglected to mention in this file, please
|
||
<a href="contact.html">contact the IOCCC</a> so that we may correct the record.</p>
|
||
<!--
|
||
|
||
Copyright © 1984-2024 by Landon Curt Noll. All Rights Reserved.
|
||
|
||
You are free to share and adapt this file under the terms of this license:
|
||
|
||
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
|
||
|
||
For more information, see:
|
||
|
||
https://creativecommons.org/licenses/by-sa/4.0/
|
||
|
||
-->
|
||
<!-- AFTER: last line of markdown file: thanks-for-help.md -->
|
||
|
||
<!-- END: this line ends content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||
<!-- START: this line starts content from: inc/after-content.default.html -->
|
||
|
||
</div>
|
||
|
||
<!-- END: this line ends content from: inc/after-content.default.html -->
|
||
<!-- START: this line starts content from: inc/footer.default.html -->
|
||
|
||
<!--
|
||
|
||
Copyright © 1984-2024 by Landon Curt Noll. All Rights Reserved.
|
||
|
||
You are free to share and adapt this file under the terms of this license:
|
||
|
||
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
|
||
|
||
For more information, see:
|
||
|
||
https://creativecommons.org/licenses/by-sa/4.0/
|
||
|
||
-->
|
||
|
||
<div class="footer">
|
||
|
||
<div id="copyright"><h3>Copyright © 1984-2024 by Landon Curt Noll:
|
||
<a href="https://creativecommons.org/faq/#what-does-some-rights-reserved-mean"
|
||
target="_blank"
|
||
rel="license noopener noreferrer">Some Rights Reserved</a></h3>
|
||
<p>
|
||
This work is <b>licensed by Landon Curt Noll</b> under
|
||
<b><a href="https://creativecommons.org/licenses/by-sa/4.0/?ref=chooser-v1"
|
||
target="_blank"
|
||
rel="license noopener noreferrer"
|
||
style="display:inline-block;">CC BY-SA 4.0</a></b>.
|
||
<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;"
|
||
src="./png/cc.png"
|
||
alt="cc inside circle symbol">
|
||
<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;"
|
||
src="./png/by.png"
|
||
alt="person inside circle symbol">
|
||
<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;"
|
||
src="./png/sa.png"
|
||
alt="arrow looping back on itself inside circle symbol"><br>
|
||
You should <b>carefully review</b> the
|
||
<b><a href="https://creativecommons.org/licenses/by-sa/4.0/legalcode.en"
|
||
target="_blank"
|
||
rel="license noopener noreferrer">CC BY-SA 4.0 LEGAL CODE</a></b>
|
||
before using the licensed material.<br>
|
||
You may wish to review the
|
||
<b><a href="./license.html"
|
||
target="_blank"
|
||
rel="license noopener noreferrer">highlights of some of the key features and terms</a></b>
|
||
of <b>CC BY-SA 4.0</b>.<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div id="coda"><h3>Coda</h3>
|
||
<p>
|
||
<a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2Fthanks-for-help.html" rel="nofollow">Nu HTML check this web page</a><br>
|
||
<a href="#top">Jump to top</a> <a href="#content">Jump to Content</a>
|
||
</p>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<!-- END: this line ends content from: inc/footer.default.html -->
|
||
<!-- START: this line starts content from: inc/bottom.default.html -->
|
||
|
||
</body>
|
||
</html>
|
||
|
||
<!-- END: this line ends content from: inc/bottom.default.html -->
|