This repository has been archived by the owner on Dec 30, 2024. It is now read-only.
forked from ioccc-src/winner
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy paththanks-for-help.html
5321 lines (5191 loc) · 368 KB
/
thanks-for-help.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!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:[email protected]&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 authors
</a>
</div>
<div class="outfit-font">
<a href="./bugs.html" class="sub-item-link">
Bugs and (mis)features
</a>
</div>
<div class="outfit-font">
<a href="./faq.html#fix_an_entry" class="sub-item-link">
Fixing entries
</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">
Status
</span>
<div class="sub-item">
<div class="outfit-font">
<a href="./news.html" class="sub-item-link">
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 class="outfit-font">
<a href="./markdown.html" class="sub-item-link">
Markdown guidelines
</a>
</div>
<div class="outfit-font">
<a href="./SECURITY.html" class="sub-item-link">
Security policy
</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">
Frequently Asked Questions
</a>
</div>
<div class="outfit-font">
<a href="./faq.html#enter" class="sub-item-link">
Enter the IOCCC
</a>
</div>
<div class="outfit-font">
<a href="./faq.html#compiling" class="sub-item-link">
Compiling entries
</a>
</div>
<div class="outfit-font">
<a href="./faq.html#running_entries" class="sub-item-link">
Running entries
</a>
</div>
<div class="outfit-font">
<a href="./faq.html#help" class="sub-item-link">
How to help
</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">
Home page
</a>
</div>
<div class="outfit-font">
<a href="./about.html" class="sub-item-link">
About the IOCCC
</a>
</div>
<div class="outfit-font">
<a href="./judges.html" class="sub-item-link">
The Judges
</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="./contact.html" class="sub-item-link">
Contact us
</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">
Winning authors
</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>
<a class="mobile-submenu-item" href="./faq.html#fix_an_entry">
Fixing entries
</a>
<a class="mobile-submenu-item" href="./faq.html#fix_author">
Updating author info
</a>
<a class="mobile-submenu-item" href="./thanks-for-help.html">
Thanks for the help
</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="./news.html">
News
</a>
<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="./markdown.html">
Markdown guidelines
</a>
<a class="mobile-submenu-item" href="./SECURITY.html">
Security policy
</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#enter">
Enter the IOCCC
</a>
<a class="mobile-submenu-item" href="./faq.html#compiling">
Compiling entries
</a>
<a class="mobile-submenu-item" href="./faq.html#running_entries">
Running entries
</a>
<a class="mobile-submenu-item" href="./faq.html#help">
How to help
</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">
Home page
</a>
<a class="mobile-submenu-item" href="./about.html">
About the IOCCC
</a>
<a class="mobile-submenu-item" href="./judges.html">
The Judges
</a>
<a class="mobile-submenu-item" href="./contact.html">
Contact us
</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%2Fwww.ioccc.org%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="#try">Try script system</a></li>
<li><a href="#website_improvements">Website and manifest improvements</a></li>
<li><a href="#faq_improvements">FAQ 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>
<p>Jump to: <a href="#">top</a></p>
<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/winner/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/winner/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>
<p>Jump to: <a href="#">top</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/winner/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>
<p>Cody later discovered that the <code>make alt</code> rule does not work as the
<code>-traditional-cpp</code> option conflicts with some of the other options. Thus the
<code>make alt</code> rule only uses <code>-traditional-cpp</code>.</p>
<p>To see the diff between the original and the alternate code, try:</p>
<pre class="<!--sh-->"><code> cd 1984/decot ; make diff_orig_alt</code></pre>
<p>Jump to: <a href="#">top</a></p>
<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/winner/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/winner/blob/master/1984/laman/try.sh">try.sh</a> script.</p>
<p>Jump to: <a href="#">top</a></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/winner/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/winner/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/winner/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>
<p>Jump to: <a href="#">top</a></p>
<div id="1985">
<h1 id="the-2nd-ioccc"><a href="1985/index.html">1985 - The 2nd IOCCC</a></h1>
</div>
<p>Jump to: <a href="#">top</a></p>
<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/winner/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><strong>NOTE</strong>: 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>
<p>Jump to: <a href="#">top</a></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/winner/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 the
FAQ on “<a href="faq.html#arg_count">main function args</a>”
for more details.</p>
<p>Cody also added the script <a href="https://github.com/ioccc-src/winner/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/winner/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>
<p>Jump to: <a href="#">top</a></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/winner/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/winner/blob/master/1985/lycklama/try.alt.sh">try.alt.sh</a> script.</p>
<p>Jump to: <a href="#">top</a></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/winner/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/winner/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/winner/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>
<p>Jump to: <a href="#">top</a></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/winner/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/winner/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/winner/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/winner/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/winner/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/winner/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/winner/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/winner/blob/master/1985/sicherman/try.sh">try.sh</a> and
<a href="https://github.com/ioccc-src/winner/blob/master/1985/sicherman/try.alt.sh">try.alt.sh</a> scripts.</p>
<p>Jump to: <a href="#">top</a></p>
<div id="1986">
<h1 id="the-3rd-ioccc"><a href="1986/index.html">1986 - The 3rd IOCCC</a></h1>
</div>
<p>Jump to: <a href="#">top</a></p>
<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/winner/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>
<p>Jump to: <a href="#">top</a></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/winner/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/winner/blob/master/1986/bright/try.sh">try.sh</a> script.</p>
<p>Jump to: <a href="#">top</a></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/winner/blob/master/1986/hague/hague.c">hague.c</a></h3>
</div>
<p><a href="#cody">Cody</a> made this use <code>fgets()</code>.
Cody also added the <a href="https://github.com/ioccc-src/winner/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. See the
FAQ on “<a href="faq.html#gets">gets and fgets</a>”
for why this was done.</p>
<p>Jump to: <a href="#">top</a></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/winner/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>
<p>Jump to: <a href="#">top</a></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/winner/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/winner/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>
<p>Jump to: <a href="#">top</a></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/winner/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>
<p>Jump to: <a href="#">top</a></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/winner/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/winner/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/winner/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>
<p>Jump to: <a href="#">top</a></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/winner/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/winner/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>
<p>Jump to: <a href="#">top</a></p>
<div id="1987">
<h1 id="the-4th-ioccc"><a href="1987/index.html">1987 - The 4th IOCCC</a></h1>
</div>
<p>Jump to: <a href="#">top</a></p>
<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/winner/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/winner/blob/master/1987/biggar/try.sh">try.sh</a> script.</p>
<p>Jump to: <a href="#">top</a></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/winner/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/winner/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/winner/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>
<p>Jump to: <a href="#">top</a></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/winner/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/winner/blob/master/1987/hines/try.sh">try.sh</a> script, the C file
<a href="https://github.com/ioccc-src/winner/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>
<p>Jump to: <a href="#">top</a></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/winner/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>
<p>Jump to: <a href="#">top</a></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/winner/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 the
FAQ on “<a href="faq.html#gets">gets and fgets</a>”
for why this was done.</p>
<p>Cody also added the <a href="https://github.com/ioccc-src/winner/blob/master/1987/wall/try.sh">try.sh</a> script.</p>
<p>Jump to: <a href="#">top</a></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/winner/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/winner/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>
<p>Jump to: <a href="#">top</a></p>
<div id="1988">
<h1 id="the-5th-ioccc"><a href="1988/index.html">1988 - The 5th IOCCC</a></h1>
</div>
<p>Jump to: <a href="#">top</a></p>
<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/winner/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);