build missing HTML files for entries

Setup a simple topnav for missing HTML files for entries.

Added `bin/gen-other-html.sh` to build entry HTML files from
markdown other than README.md to index.html HTML files.

Fixed duplicate link text in `2020/ferguson1/gameplay.md`.

Improved `inc/md2html.cfg` to support building the missing HTML
files for entries.

Added `make gen_other_html` to top level Makefile.
Added `make gen_other_html` to `make quick_www` and `make www`.

Fixed inventory links for year level index.html files.
Changed `bin/output-year-index.sh` VERSION from "1.0.1 2024-02-23"
to "1.1 2024-02-27".

Added missing lines in `manifest.numbers`.  Update the affected
`.entry.json` files.

The manifest (in both `manifest.numbers` and the collection of
manifests from of all entry `.entry.json` files) now match.  Errors
from `make verify_entry_files` will now abort both `make quick_www`
and `make www` rules in the top level `Makefile`.

Changed markdown files in manifest to have an _inventory_order_ of
_2000000000_ so that the `index.html` file will usually appear at
the start of the _Secondary files_ set for the "#inventory" section
of an entry's `index.html` file.

Changed compressed tar files (files that end in _.tar.bz2_) in
manifest to have an _inventory_order_ of _100000_ so that these
files will usually appear at the end of the _Primary files_ set for
the "#inventory" section of an entry's `index.html` file.

Added 'Jump to top` link above the _Primary files_ section.
Changed `bin/output-index-inventory.sh` VERSION from "1.1.1 2024-02-23"
to "1.2 2024-02-27".

Updated HTML files to perform the above via `make www`.
This commit is contained in:
Landon Curt Noll committed 2024-02-27 22:36:20 -08:00
1 parent 7babf792e4
commit 9d3438fb88
718 files changed
+17515 -4084

No files matched your search

+8 -8
View File
@@ -9,14 +9,6 @@
{ "author_handle" : "Don_Dodson" }
],
"manifest" : [
{
"file_path" : "index.html",
"inventory_order" : 10,
"OK_to_edit" : false,
"display_as" : "html",
"display_via_github" : false,
"entry_text" : "entry home page"
},
{
"file_path" : "dodsond1.c",
"inventory_order" : 20,
@@ -49,6 +41,14 @@
"display_via_github" : false,
"entry_text" : "download entry source"
},
{
"file_path" : "index.html",
"inventory_order" : 2000000000,
"OK_to_edit" : false,
"display_as" : "html",
"display_via_github" : false,
"entry_text" : "entry home page"
},
{
"file_path" : ".entry.json",
"inventory_order" : 4294967295,
+2 -1
View File
@@ -158,9 +158,9 @@ https://creativecommons.org/licenses/by-sa/4.0/</p>
<h1 id="inventory-for-1994dodsond1"><a name="inventory"></a>Inventory
for 1994/dodsond1</h1>
<p><a href="#top">Jump to top</a></p>
<h2 id="primary-files">Primary files</h2>
<ul>
<li><a href="index.html">index.html</a> - entry home page</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/dodsond1/dodsond1.c">dodsond1.c</a>
- entry source</li>
@@ -175,6 +175,7 @@ entry source</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="index.html">index.html</a> - entry home page</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/dodsond1/.entry.json">.entry.json</a>
- description of entry in JSON</li>
+8 -8
View File
@@ -9,14 +9,6 @@
{ "author_handle" : "Don_Dodson" }
],
"manifest" : [
{
"file_path" : "index.html",
"inventory_order" : 10,
"OK_to_edit" : false,
"display_as" : "html",
"display_via_github" : false,
"entry_text" : "entry home page"
},
{
"file_path" : "dodsond2.c",
"inventory_order" : 20,
@@ -65,6 +57,14 @@
"display_via_github" : false,
"entry_text" : "download entry source"
},
{
"file_path" : "index.html",
"inventory_order" : 2000000000,
"OK_to_edit" : false,
"display_as" : "html",
"display_via_github" : false,
"entry_text" : "entry home page"
},
{
"file_path" : ".entry.json",
"inventory_order" : 4294967295,
+2 -1
View File
@@ -210,9 +210,9 @@ https://creativecommons.org/licenses/by-sa/4.0/</p>
<h1 id="inventory-for-1994dodsond2"><a name="inventory"></a>Inventory
for 1994/dodsond2</h1>
<p><a href="#top">Jump to top</a></p>
<h2 id="primary-files">Primary files</h2>
<ul>
<li><a href="index.html">index.html</a> - entry home page</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/dodsond2/dodsond2.c">dodsond2.c</a>
- entry source</li>
@@ -232,6 +232,7 @@ entry source</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="index.html">index.html</a> - entry home page</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/dodsond2/.entry.json">.entry.json</a>
- description of entry in JSON</li>
+8 -8
View File
@@ -9,14 +9,6 @@
{ "author_handle" : "Mary_Ann_Horton" }
],
"manifest" : [
{
"file_path" : "index.html",
"inventory_order" : 10,
"OK_to_edit" : false,
"display_as" : "html",
"display_via_github" : false,
"entry_text" : "entry home page"
},
{
"file_path" : "horton.c",
"inventory_order" : 20,
@@ -97,6 +89,14 @@
"display_via_github" : false,
"entry_text" : "download entry source"
},
{
"file_path" : "index.html",
"inventory_order" : 2000000000,
"OK_to_edit" : false,
"display_as" : "html",
"display_via_github" : false,
"entry_text" : "entry home page"
},
{
"file_path" : ".entry.json",
"inventory_order" : 4294967295,
+2 -1
View File
@@ -213,9 +213,9 @@ https://creativecommons.org/licenses/by-sa/4.0/</p>
<h1 id="inventory-for-1994horton"><a name="inventory"></a>Inventory for
1994/horton</h1>
<p><a href="#top">Jump to top</a></p>
<h2 id="primary-files">Primary files</h2>
<ul>
<li><a href="index.html">index.html</a> - entry home page</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/horton/horton.c">horton.c</a>
- entry source</li>
@@ -247,6 +247,7 @@ entry source</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="index.html">index.html</a> - entry home page</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/horton/.entry.json">.entry.json</a>
- description of entry in JSON</li>
+8 -8
View File
@@ -9,14 +9,6 @@
{ "author_handle" : "Ian_Collier" }
],
"manifest" : [
{
"file_path" : "index.html",
"inventory_order" : 10,
"OK_to_edit" : false,
"display_as" : "html",
"display_via_github" : false,
"entry_text" : "entry home page"
},
{
"file_path" : "imc.c",
"inventory_order" : 20,
@@ -57,6 +49,14 @@
"display_via_github" : false,
"entry_text" : "download entry source"
},
{
"file_path" : "index.html",
"inventory_order" : 2000000000,
"OK_to_edit" : false,
"display_as" : "html",
"display_via_github" : false,
"entry_text" : "entry home page"
},
{
"file_path" : ".entry.json",
"inventory_order" : 4294967295,
+2 -1
View File
@@ -194,9 +194,9 @@ https://creativecommons.org/licenses/by-sa/4.0/</p>
<h1 id="inventory-for-1994imc"><a name="inventory"></a>Inventory for
1994/imc</h1>
<p><a href="#top">Jump to top</a></p>
<h2 id="primary-files">Primary files</h2>
<ul>
<li><a href="index.html">index.html</a> - entry home page</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/imc/imc.c">imc.c</a>
- entry source</li>
@@ -214,6 +214,7 @@ source</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="index.html">index.html</a> - entry home page</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/imc/.entry.json">.entry.json</a>
- description of entry in JSON</li>
+14 -16
View File
@@ -245,25 +245,23 @@ Entries of 1994 - The 11th IOCCC</h1>
<p><strong>Download IOCCC</strong> <a
href="1994/ioccc.1994.tar.bz2">1994 entry source</a></p>
<ul>
<li><a href="1994/dodsond1/index.html">1994/dodsond1</a> - Best
Game</li>
<li><a href="1994/dodsond2/index.html">1994/dodsond2</a> - Most
Obfuscated Packaging</li>
<li><a href="1994/horton/index.html">1994/horton</a> - Best Utility</li>
<li><a href="1994/imc/index.html">1994/imc</a> - Most Obfuscated
<li><a href="dodsond1/index.html">1994/dodsond1</a> - Best Game</li>
<li><a href="dodsond2/index.html">1994/dodsond2</a> - Most Obfuscated
Packaging</li>
<li><a href="horton/index.html">1994/horton</a> - Best Utility</li>
<li><a href="imc/index.html">1994/imc</a> - Most Obfuscated
Algorithm</li>
<li><a href="1994/ldb/index.html">1994/ldb</a> - Best One-liner</li>
<li><a href="1994/schnitzi/index.html">1994/schnitzi</a> - Best
Layout</li>
<li><a href="1994/shapiro/index.html">1994/shapiro</a> - Most Well
Rounded Obfuscation</li>
<li><a href="1994/smr/index.html">1994/smr</a> - Worst Abuse of the
<li><a href="ldb/index.html">1994/ldb</a> - Best One-liner</li>
<li><a href="schnitzi/index.html">1994/schnitzi</a> - Best Layout</li>
<li><a href="shapiro/index.html">1994/shapiro</a> - Most Well Rounded
Obfuscation</li>
<li><a href="smr/index.html">1994/smr</a> - Worst Abuse of the
Rules</li>
<li><a href="1994/tvr/index.html">1994/tvr</a> - Best X11 Program</li>
<li><a href="1994/weisberg/index.html">1994/weisberg</a> - Best Short
<li><a href="tvr/index.html">1994/tvr</a> - Best X11 Program</li>
<li><a href="weisberg/index.html">1994/weisberg</a> - Best Short
Program</li>
<li><a href="1994/westley/index.html">1994/westley</a> - Worst Abuse of
the C Preprocessor</li>
<li><a href="westley/index.html">1994/westley</a> - Worst Abuse of the C
Preprocessor</li>
</ul>
<p> <strong>Jump to:</strong> <a href="#">top</a></p>
+8 -8
View File
@@ -9,14 +9,6 @@
{ "author_handle" : "Laurion_Burchall" }
],
"manifest" : [
{
"file_path" : "index.html",
"inventory_order" : 10,
"OK_to_edit" : false,
"display_as" : "html",
"display_via_github" : false,
"entry_text" : "entry home page"
},
{
"file_path" : "ldb.c",
"inventory_order" : 20,
@@ -57,6 +49,14 @@
"display_via_github" : false,
"entry_text" : "download entry source"
},
{
"file_path" : "index.html",
"inventory_order" : 2000000000,
"OK_to_edit" : false,
"display_as" : "html",
"display_via_github" : false,
"entry_text" : "entry home page"
},
{
"file_path" : ".entry.json",
"inventory_order" : 4294967295,
+2 -1
View File
@@ -163,9 +163,9 @@ https://creativecommons.org/licenses/by-sa/4.0/</p>
<h1 id="inventory-for-1994ldb"><a name="inventory"></a>Inventory for
1994/ldb</h1>
<p><a href="#top">Jump to top</a></p>
<h2 id="primary-files">Primary files</h2>
<ul>
<li><a href="index.html">index.html</a> - entry home page</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/ldb/ldb.c">ldb.c</a>
- entry source</li>
@@ -183,6 +183,7 @@ source</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="index.html">index.html</a> - entry home page</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/ldb/.entry.json">.entry.json</a>
- description of entry in JSON</li>
+8 -8
View File
@@ -9,14 +9,6 @@
{ "author_handle" : "Mark_Schnitzius" }
],
"manifest" : [
{
"file_path" : "index.html",
"inventory_order" : 10,
"OK_to_edit" : false,
"display_as" : "html",
"display_via_github" : false,
"entry_text" : "entry home page"
},
{
"file_path" : "schnitzi.c",
"inventory_order" : 20,
@@ -89,6 +81,14 @@
"display_via_github" : false,
"entry_text" : "download entry source"
},
{
"file_path" : "index.html",
"inventory_order" : 2000000000,
"OK_to_edit" : false,
"display_as" : "html",
"display_via_github" : false,
"entry_text" : "entry home page"
},
{
"file_path" : ".entry.json",
"inventory_order" : 4294967295,
+2 -1
View File
@@ -218,9 +218,9 @@ https://creativecommons.org/licenses/by-sa/4.0/</p>
<h1 id="inventory-for-1994schnitzi"><a name="inventory"></a>Inventory
for 1994/schnitzi</h1>
<p><a href="#top">Jump to top</a></p>
<h2 id="primary-files">Primary files</h2>
<ul>
<li><a href="index.html">index.html</a> - entry home page</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/schnitzi/schnitzi.c">schnitzi.c</a>
- entry source</li>
@@ -250,6 +250,7 @@ entry source</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="index.html">index.html</a> - entry home page</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/schnitzi/.entry.json">.entry.json</a>
- description of entry in JSON</li>
+8 -8
View File
@@ -9,14 +9,6 @@
{ "author_handle" : "Andrew_Shapiro" }
],
"manifest" : [
{
"file_path" : "index.html",
"inventory_order" : 10,
"OK_to_edit" : false,
"display_as" : "html",
"display_via_github" : false,
"entry_text" : "entry home page"
},
{
"file_path" : "shapiro.c",
"inventory_order" : 20,
@@ -57,6 +49,14 @@
"display_via_github" : false,
"entry_text" : "download entry source"
},
{
"file_path" : "index.html",
"inventory_order" : 2000000000,
"OK_to_edit" : false,
"display_as" : "html",
"display_via_github" : false,
"entry_text" : "entry home page"
},
{
"file_path" : ".entry.json",
"inventory_order" : 4294967295,
+2 -1
View File
@@ -207,9 +207,9 @@ https://creativecommons.org/licenses/by-sa/4.0/</p>
<h1 id="inventory-for-1994shapiro"><a name="inventory"></a>Inventory for
1994/shapiro</h1>
<p><a href="#top">Jump to top</a></p>
<h2 id="primary-files">Primary files</h2>
<ul>
<li><a href="index.html">index.html</a> - entry home page</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/shapiro/shapiro.c">shapiro.c</a>
- entry source</li>
@@ -225,6 +225,7 @@ entry source</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="index.html">index.html</a> - entry home page</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/shapiro/.entry.json">.entry.json</a>
- description of entry in JSON</li>
+253
View File
@@ -0,0 +1,253 @@
<!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 -->
<!-- -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- !!! 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/top.default.html -->
<!-- -->
<!-- The original markdown content was formed by the tool: bin/gen-other-html.sh -->
<!-- The HTML was converted from markdown by the tool: bin/md2html.sh -->
<!-- -->
<!-- START: this line starts content from: inc/head.default.html -->
<head>
<link rel="stylesheet" href="../../ioccc.css">
<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>
<meta name="description" content="shapiro.md for 1994/shapiro">
<meta name="keywords" content="IOCCC, 1994/shapiro, shapiro.md">
</head>
<!-- END: this line ends content from: inc/head.default.html -->
<!-- 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/header.default.html -->
<div class="header">
<img src="../../png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
<h1>The International Obfuscated C Code Contest</h1>
<h2>shapiro.md for 1994/shapiro</h2>
</div>
<!-- END: this line ends content from: inc/header.default.html -->
<!-- START: this line starts content from: inc/topnav.up2index.html -->
<div class="topnav">
<a class="Left" href="index.html">&uarr; jump to index.html &uarr;</a>
</div>
<!-- END: this line ends content from: inc/topnav.up2index.html -->
<!-- START: this line starts content from: inc/begin-row.default.html -->
<div class="row">
<!-- END: this line ends content from: inc/begin-row.default.html -->
<!-- START: this line starts content from: inc/begin-leftcolumn.default.html -->
<div class="leftcolumn">
<!-- END: this line ends content from: inc/begin-leftcolumn.default.html -->
<!-- START: this line starts content from: inc/sidenav.default.html -->
<div class="sidenav">
<a href="#content">Jump to contents</a>
</div>
<hr>
<div class="sidenav">
<a href="../../index.html">IOCCC Home</a>
<a href="../../years.html">Winning Entries</a>
<a href="../../authors.html">People who have won</a>
</div>
<hr>
<div class="sidenav">
<a href="../../news.html">IOCCC News</a>
<a href="../../faq.html#submit">How to enter the IOCCC</a>
<a href="../../faq.html">FAQ</a>
</div>
<hr>
<div class="sidenav">
<a href="../../bugs.html">Bugs &amp; (mis)features</a>
<a href="../../faq.html#fix_an_entry">Fixing IOCCC entries</a>
<a href="../../faq.html#fix_web_site">Fixing the web site</a>
<a href="../../faq.html#fix_author">Fixing author info</a>
<a href="../../thanks-for-help.html">Thanks for the help</a>
</div>
<hr>
<div class="sidenav">
<a href="../../judges.html">The IOCCC Judges</a>
<a href="../../contact.html">Contacting the IOCCC</a>
</div>
<hr>
<div class="sidenav">
<a href="#top">Jump to top</a>
</div>
<!-- END: this line ends content from: inc/sidenav.default.html -->
<!-- START: this line starts content from: inc/end-leftcolumn.default.html -->
</div>
<!-- END: this line ends content from: inc/end-leftcolumn.default.html -->
<!-- START: this line starts content from: inc/begin-rightcolumn.default.html -->
<div class="rightcolumn">
<!-- END: this line ends content from: inc/begin-rightcolumn.default.html -->
<!-- START: this line starts content from: inc/before-content.default.html -->
<a name="content"></a>
<!-- 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 -->
<h1 id="hints">HINTS</h1>
<p>For the first program (<a href="shapiro.c">shapiro.c</a>):</p>
<p>This is a very simple program:</p>
<pre><code> 1. #include &lt;stdio.h&gt;
2. main()
3. {
4. int K,L,M=0;
5. FILE *J;
6. J=fopen(__FILE__,&quot;r&quot;);
7. for(;
8. (L=getc(J))&gt;=0;
9. L&gt;=&#39;J&#39;&amp;&amp;L&lt;=&#39;J&#39;+15 &amp;&amp;
10. ((M=!M)?K=L:putchar(K-&#39;J&#39;|(L-&#39;J&#39;&lt;&lt;4)))
11. );
12. exit(0);}</code></pre>
<p>Lines 1-5 are basic stuff. Line 6 opens the source code for input.
Line 7 is the loop. Line 8 reads in each character in the file (placed
in <code>L</code>) while not &gt;= 0. Line 9 is an <code>if</code>
expression which filters out all characters not between <code>J</code>
and <code>J + 15</code>. Line 10 uses <code>M</code> to execute two
different paths; the first just stores the character in <code>K</code>
and the second path combines the last two characters read in as high and
low nibbles of a byte and outputs them. In effect this is a very poor
ASCII to binary decoder. The last line is necessary so that make will
not stop when it executes this program.</p>
<p>The second program is encoded into this format and then included
(mostly) as a comment.</p>
<p>Notice that it is impossible to write this program while leaving 16
contiguous ASCII characters free for the encoding. Because of this the
second program is mostly included as a comment. However, some of the
characters of the encoded program are also source code for the
decoder.</p>
<h3 id="for-the-second-program-with-time.h">For the second program (with
time.h):</h3>
<pre><code> 1 #include &lt;stdio.h&gt;
2 #include &lt;time.h&gt;
3 #define o(j,k,m,n,l) {fprintf(j,a[k],m,n,a[l]);fflush(j);}
4 char *a[]={&quot;%c+------------+\n&quot;,&quot;%c+%3d %-8s+\n&quot;,&quot;seconds&quot;,&quot;minutes&quot;,
5 &quot;hours&quot;,&quot;%s\n&quot;,&quot;\0337\033[%d;65;H%s\0338&quot;};
6 int b[]={0,0,17,14,11,0};
7 main(v,c)
8 int v;
9 char ** c;
10 {
11 char d[40],*e,f=6;
12 time_t g;
13 FILE *h,*i;
14 while (--f &amp;&amp; !pipe(d) &amp;&amp; !fork());
15 h=fdopen(6-f&lt;&lt;1,&quot;a&quot;);
16 i=fdopen((6-f&lt;&lt;1)+1,&quot;r&quot;);
17 for(;;){
18 if(f){
19 fgets(d,40,i);
20 d[strlen(d)-1]=&#39;\0&#39;;
21 if(*d==&#39;0&#39;+f){ sprintf(*c,&quot;%s\n&quot;,d+1); o(stdout,6,6-f,d+1,0) }
22 if(*d&gt;&#39;0&#39;+f) o(h,5,d,0,0)
23 }else{
24 time(&amp;g);
25 e=asctime(localtime(&amp;g));
26 for(v=1;v&lt;6;v++) o(h,v!=1&amp;&amp;v!=6-1,v+&#39;0&#39;,atoi(e+b[v]),v)
27 sleep(1);
28 }}}
</code></pre>
<p>Lines 1 and 2 have to be there. Think of <code>o</code> in line 3 as
send message with <code>j</code>,<code>k</code> and <code>m</code> as
where, format and what. Lines 4 and 5 are all the text strings. Line 6
is the offsets into the time string for the hours, minutes and seconds.
Lines 7-13 are basic stuff. Line 14 is the crux of the biscuit. 14 forks
off <code>f</code> (6) processes each of which is connected to the ones
above and below it with a Unix pipe. It was too difficult to recover the
actual FD numbers for the pipe ends in line 14 so I regenerate them and
<code>fdopen()</code> them (for use with the standard C library
functions) on lines 15 and 16. Now we have six almost identical
processes each of which has two files open, <code>h</code> and
<code>i</code> (up and down). The only difference in each process is the
value of <code>f</code> (<code>0 &lt;= f &lt; 6</code>). The five
processes where <code>f !=0</code> are the slave processes and
<code>f == 0</code> is the master. Line 17 says we are going to do this
forever. Lines 18 and 23 differentiate between the master and the
slaves.</p>
<p>Lines 19 to 22 are the slave code. Here we read in a line of text
from <code>i</code> (down, line 19) and remove the newline char (line
20). On line 21 if this message is for us (if the first character is our
number, <code>f</code>, in ASCII) we do two things:</p>
<ol type="1">
<li>We copy the text of the message to <code>*c</code> which is really
<code>argv[0]</code>. If you are on the correct flavor of Unix this will
change the output of the <code>ps(1)</code> command to the string we
just put there.</li>
<li>We send the message (not including the number) to
<code>stdout</code> with format number 6
(<code>"\0337\033[%d;65;H%s\0338"</code>) If you can read VTxxx (and I
read books printed as ANSI/VTxxx codes for fun :-) ) you know this is
the sequence for:</li>
</ol>
<pre><code>remember where we are,
go somewhere else,
print the message,
and return to where we started.</code></pre>
<p>Line 22 says if this message is not for us (the number is bigger than
ours) send it to <code>h</code> (up).</p>
<p>Lines 24 to 27 are the master code. Here we get the time and convert
it to an ASCII format (lines 24 and 25). Then on line 26 we build and
send each of the messages for the slaves. The message uses a different
control string for the different slaves. For the first and last slave
the message text is just <code>"%c+------------+\n"</code> (slave
number, text, newline.) For the other slaves it is
<code>"%c+%3d %-8s+\n"</code> (slave number, number, units, newline).
The slave number is <code>v+'0'</code>. The number (if used) is
<code>atoi(e+b[v])</code> and the units are just the string in the slave
number position.</p>
<!-- 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 -->
<!-- END: this line ends content from: inc/after-content.default.html -->
<!-- START: this line starts content from: inc/end-rightcolumn.default.html -->
</div>
<!-- END: this line ends content from: inc/end-rightcolumn.default.html -->
<!-- START: this line starts content from: inc/end-row.default.html -->
</div>
<!-- END: this line ends content from: inc/end-row.default.html -->
<!-- START: this line starts content from: inc/footer.default.html -->
<div class="footer">
<hr>
<h2>Coda</h2>
<p><a href="https://validator.w3.org/nu/?doc=#">Nu HTML check this web page</a></p>
<p><a href="#top">Jump to top</a> <a href="#content">Jump to Content</a> <a href="#inventory">Jump to Inventory</a></p>
</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 -->
+8 -8
View File
@@ -9,14 +9,6 @@
{ "author_handle" : "Szymon_Rusinkiewicz" }
],
"manifest" : [
{
"file_path" : "index.html",
"inventory_order" : 10,
"OK_to_edit" : false,
"display_as" : "html",
"display_via_github" : false,
"entry_text" : "entry home page"
},
{
"file_path" : "smr.c",
"inventory_order" : 20,
@@ -57,6 +49,14 @@
"display_via_github" : false,
"entry_text" : "download entry source"
},
{
"file_path" : "index.html",
"inventory_order" : 2000000000,
"OK_to_edit" : false,
"display_as" : "html",
"display_via_github" : false,
"entry_text" : "entry home page"
},
{
"file_path" : ".entry.json",
"inventory_order" : 4294967295,
+2 -1
View File
@@ -166,9 +166,9 @@ https://creativecommons.org/licenses/by-sa/4.0/</p>
<h1 id="inventory-for-1994smr"><a name="inventory"></a>Inventory for
1994/smr</h1>
<p><a href="#top">Jump to top</a></p>
<h2 id="primary-files">Primary files</h2>
<ul>
<li><a href="index.html">index.html</a> - entry home page</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/smr/smr.c">smr.c</a>
- entry source</li>
@@ -186,6 +186,7 @@ source</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="index.html">index.html</a> - entry home page</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/smr/.entry.json">.entry.json</a>
- description of entry in JSON</li>
+8 -8
View File
@@ -9,14 +9,6 @@
{ "author_handle" : "Teemu_Rantanen" }
],
"manifest" : [
{
"file_path" : "index.html",
"inventory_order" : 10,
"OK_to_edit" : false,
"display_as" : "html",
"display_via_github" : false,
"entry_text" : "entry home page"
},
{
"file_path" : "tvr.c",
"inventory_order" : 20,
@@ -105,6 +97,14 @@
"display_via_github" : false,
"entry_text" : "download entry source"
},
{
"file_path" : "index.html",
"inventory_order" : 2000000000,
"OK_to_edit" : false,
"display_as" : "html",
"display_via_github" : false,
"entry_text" : "entry home page"
},
{
"file_path" : ".entry.json",
"inventory_order" : 4294967295,
+2 -1
View File
@@ -315,9 +315,9 @@ https://creativecommons.org/licenses/by-sa/4.0/</p>
<h1 id="inventory-for-1994tvr"><a name="inventory"></a>Inventory for
1994/tvr</h1>
<p><a href="#top">Jump to top</a></p>
<h2 id="primary-files">Primary files</h2>
<ul>
<li><a href="index.html">index.html</a> - entry home page</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/tvr/tvr.c">tvr.c</a>
- entry source</li>
@@ -353,6 +353,7 @@ source</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="index.html">index.html</a> - entry home page</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/tvr/.entry.json">.entry.json</a>
- description of entry in JSON</li>
+8 -8
View File
@@ -9,14 +9,6 @@
{ "author_handle" : "Jeff_Weisberg" }
],
"manifest" : [
{
"file_path" : "index.html",
"inventory_order" : 10,
"OK_to_edit" : false,
"display_as" : "html",
"display_via_github" : false,
"entry_text" : "entry home page"
},
{
"file_path" : "weisberg.c",
"inventory_order" : 20,
@@ -65,6 +57,14 @@
"display_via_github" : false,
"entry_text" : "download entry source"
},
{
"file_path" : "index.html",
"inventory_order" : 2000000000,
"OK_to_edit" : false,
"display_as" : "html",
"display_via_github" : false,
"entry_text" : "entry home page"
},
{
"file_path" : ".entry.json",
"inventory_order" : 4294967295,
+2 -1
View File
@@ -196,9 +196,9 @@ https://creativecommons.org/licenses/by-sa/4.0/</p>
<h1 id="inventory-for-1994weisberg"><a name="inventory"></a>Inventory
for 1994/weisberg</h1>
<p><a href="#top">Jump to top</a></p>
<h2 id="primary-files">Primary files</h2>
<ul>
<li><a href="index.html">index.html</a> - entry home page</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/weisberg/weisberg.c">weisberg.c</a>
- entry source</li>
@@ -219,6 +219,7 @@ entry source</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="index.html">index.html</a> - entry home page</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/weisberg/.entry.json">.entry.json</a>
- description of entry in JSON</li>
+8 -8
View File
@@ -9,14 +9,6 @@
{ "author_handle" : "Brian_Westley" }
],
"manifest" : [
{
"file_path" : "index.html",
"inventory_order" : 10,
"OK_to_edit" : false,
"display_as" : "html",
"display_via_github" : false,
"entry_text" : "entry home page"
},
{
"file_path" : "westley.c",
"inventory_order" : 20,
@@ -73,6 +65,14 @@
"display_via_github" : false,
"entry_text" : "download entry source"
},
{
"file_path" : "index.html",
"inventory_order" : 2000000000,
"OK_to_edit" : false,
"display_as" : "html",
"display_via_github" : false,
"entry_text" : "entry home page"
},
{
"file_path" : ".entry.json",
"inventory_order" : 4294967295,
+2 -1
View File
@@ -274,9 +274,9 @@ https://creativecommons.org/licenses/by-sa/4.0/</p>
<h1 id="inventory-for-1994westley"><a name="inventory"></a>Inventory for
1994/westley</h1>
<p><a href="#top">Jump to top</a></p>
<h2 id="primary-files">Primary files</h2>
<ul>
<li><a href="index.html">index.html</a> - entry home page</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/westley/westley.c">westley.c</a>
- entry source</li>
@@ -300,6 +300,7 @@ entry source</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="index.html">index.html</a> - entry home page</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/westley/.entry.json">.entry.json</a>
- description of entry in JSON</li>