Files
ioccc/2019/yang/index.html
T
Landon Curt Noll a9ca93ec47 fix markdown footnote problem caused by pandoc
Add "<!-- BEFORE: 1st line of markdown file: FILE/PATH -->"
before the markdown content.  This line appears in the
generated HTML.

Add "<!-- AFTER: last line of markdown file: FILE/PATH -->"
after the markdown content.  This line appears in the
generated HTML.

We test a fix relating to problems produced by `pandoc(1)`
when footnotes are added at the end of generated HTML.
This test is made for `2000/bmeyer/index.html`.

Fixed exit 4 in `bin/md2html.sh that should be exit 5.

Changed `bin/md2html.sh` VERSION from to "1.3 2024-04-14"
to "1.4 2024-04-18".

Run `bin/readme2index.sh -v 1 2000/bmeyer` to perform the above.
2024-04-19 01:20:31 -07:00

385 lines
19 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!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>2019/yang - Most in need of transparency</title>
<link rel="icon" type="image/x-icon" href="../../favicon.ico">
<meta name="description" content="2019 IOCCC entry yang - Most in need of transparency">
<meta name="keywords" content="IOCCC, 2019, IOCCC 2019, IOCCC entry, yang, Most in need of transparency">
</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/readme2index.sh -->
<!-- The content of main section of this web page came from: 2019/yang/README.md -->
<!-- -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- !!! Do not modify this web page, instead modify the file: 2019/yang/README.md !!! -->
<!-- !!! Do not modify this web page, instead modify the file: 2019/yang/README.md !!! -->
<!-- !!! Do not modify this web page, instead modify the file: 2019/yang/README.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">
IOCCC
</div>
<div class="topbar-items">
<div class="item">
<span class="item-header">
Home
</span>
<div class="sub-item">
<div class="outfit-font"><a href="../../index.html">IOCCC Home</a></div>
<div class="outfit-font"><a href="../../years.html">Winning Entries</a></div>
<div class="outfit-font"><a href="../../authors.html">People who have won</a></div>
<div class="outfit-font"><a href="../../location.html">Location of authors</a></div>
</div>
</div>
<div class="item">
<span class="item-header">
News
</span>
<div class="sub-item">
<div class="outfit-font"><a href="../../news.html">IOCCC News</a></div>
<div class="outfit-font"><a href="../../status.html">Contest status</a></div>
<div class="outfit-font"><a href="../../next/index.html">Rules and Guidelines</a></div>
<div class="outfit-font"><a href="../../faq.html#submit">How to enter the IOCCC</a></div>
<div class="outfit-font"><a href="../../faq.html">FAQ</a></div>
</div>
</div>
<div class="item">
<span class="item-header">
Bugs
</span>
<div class="sub-item">
<div class="outfit-font"><a href="../../bugs.html">Bugs &amp; (mis)features</a></div>
<div class="outfit-font"><a href="../../faq.html#fix_an_entry">Fixing IOCCC entries</a></div>
<div class="outfit-font"><a href="../../faq.html#fix_web_site">Fixing the web site</a></div>
<div class="outfit-font"><a href="../../faq.html#fix_author">Fixing author info</a></div>
<div class="outfit-font"><a href="../../thanks-for-help.html">Thanks for the help</a></div>
</div>
</div>
<div class="item">
<span class="item-header">
Judges
</span>
<div class="sub-item">
<div class="outfit-font"><a href="../../judges.html">The IOCCC Judges</a></div>
<div class="outfit-font"><a href="../../contact.html">Contacting the IOCCC</a></div>
</div>
</div>
</div>
</div>
</nav>
</div>
<!-- END: this line ends content from: inc/topbar.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>2019/yang - Most in need of transparency</h2>
</div>
<!-- END: this line ends content from: inc/header.default.html -->
<!-- START: this line starts content from: inc/navbar.last.html -->
<div class="navbar">
<a class="Left" href="../poikola/index.html">&larr; poikola</a>
<a class="Left" href="../index.html">&uarr; 2019 &uarr;</a>
<a class="Left Disabled" href="#">last entry</a>
<a class="Right" href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/yang/prog.c">C code</a>
<a class="Right" href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/yang/Makefile">Makefile</a>
<a class="Right" href="#inventory">Inventory</a>
<a class="Right" href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F2019%2Fyang%2Findex.html">&#x2713;</a>
</div>
<!-- END: this line ends content from: inc/navbar.last.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 20 by: bin/output-index-author.sh via bin/md2html.sh -->
<!-- START: this line starts content generated by: bin/output-index-author.sh -->
<h2 id="author">Author:</h2>
<ul>
<li>Name: <a href="../../authors.html#Don_Yang">Don Yang</a><br>
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)</li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
<!-- END: this line ends content for HTML phase 20 by: bin/output-index-author.sh via bin/md2html.sh -->
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
<!-- BEFORE: 1st line of markdown file: 2019/yang/README.md -->
<h2 id="to-build">To build:</h2>
<pre><code> make</code></pre>
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
<p>The current status of this entry is:</p>
<pre><code> STATUS: INABIAF - please **DO NOT** fix</code></pre>
<p>For more detailed information see <a href="../../bugs.html#2019_yang">2019 yang bugs</a>.</p>
<h2 id="to-use">To use:</h2>
<pre><code> ./prog sample_input.txt a b c d
cat a
cat b
cat c
cat d
cat a b c d | ./prog</code></pre>
<h2 id="try">Try:</h2>
<pre><code> ./try.sh</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>Do you understand how this program works? You may have to go over and over the
output again.</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<h3 id="summary">Summary:</h3>
<p>Scramble/unscramble to single file:</p>
<pre><code> ./prog original.txt &gt; scrambled.txt
./prog &lt; scrambled.txt &gt; unscrambled.txt</code></pre>
<p>Scramble/unscramble to multiple files:</p>
<pre><code> ./prog input.txt output1.txt output2.txt ...
cat output1.txt output2.txt ... | ./prog &gt; unscrambled.txt</code></pre>
<p>Re-scramble:</p>
<pre><code> ./prog original.txt | ./prog - &gt; scrambled1.txt
./prog original.txt | ./prog - | ./prog - &gt; scrambled2.txt
./prog original.txt | ./prog - | ./prog - | ... &gt; scrambled3.txt</code></pre>
<p>Scramble slowly:</p>
<pre><code> ./prog input.txt | ruby prog.c</code></pre>
<p>Input must be in UTF-8 encoding.</p>
<h3 id="details">Details:</h3>
<p>This is a text scrambling utility. To scramble text, specify input file name as
the first argument:</p>
<pre><code> ./prog input.txt &gt; output.txt</code></pre>
<p>If original input file was small enough to fit in your terminal, you
can simply use <code>cat</code> to unscramble the output text.</p>
<pre><code> cat output.txt</code></pre>
<p>It might seem like nothing was scrambled, but you can try passing the output
through <code>strings(1)</code> and see that most of the original strings are gone. What
happened is that the original text has been shuffled with ANSI cursor
positioning codes inserted in such a way that characters are printed in random
order. This effect is more visible if there is a delay after each character is
printed. For convenience, a utility is included in the source to output
characters slowly:</p>
<pre><code> ./prog input.txt | ruby prog.c</code></pre>
<p>Scrambling order is deterministic, but you can reshuffle the output by
piping it through the same utility again, by specifying <code>-</code> as the
first argument:</p>
<pre><code> ./prog input.txt | ./prog - | ./prog - | ...</code></pre>
<p>You can also split the input to multiple files, each getting a subset
of the original input characters:</p>
<pre><code> ./prog input.txt output1.txt output2.txt ...
cat output1.txt output2.txt ... &gt; unscrambled.txt</code></pre>
<p>You can only unscramble files with <code>cat</code> if the input fits in a single
terminal screen. If you don’t know what will be the terminal size of
the recipient, note that <code>prog.c</code> will fit in a 80x25 terminal, so a
good guideline is to pick files that have fewer rows and columns than
<code>prog.c</code>.</p>
<p>For files that are larger than your terminal window, <code>cat</code> will not be
sufficient for unscrambling because any scrolling causes the character
positions to be misaligned. But fear not, this utility also includes
unscrambling functionality. If no argument is specified, input will
be read through <code>stdin</code> and unscrambled to <code>stdout</code>:</p>
<pre><code> ./prog &lt; scrambled.txt &gt; unscrambled.txt</code></pre>
<p>Where this is useful is that if you scramble the input to multiple
files and unscramble each output file individually, those output
files can be printed on transparencies and distributed separately.</p>
<pre><code> ./prog input.txt output1.txt output2.txt output3.txt
./prog &lt; output1.txt &gt; layer1.txt
./prog &lt; output2.txt &gt; layer2.txt
./prog &lt; output3.txt &gt; layer3.txt</code></pre>
<p>In other words, this is a utility for facilitating
<a href="https://en.wikipedia.org/wiki/Visual_cryptography">visual cryptography</a>.</p>
<p>This utility can also be used just for removing trailing whitespaces
and expanding tabs to 8 spaces.</p>
<pre><code> ./prog input.txt | ./prog</code></pre>
<h3 id="features">Features:</h3>
<h4 id="utf-8-support">UTF-8 support:</h4>
<p>A simple text scrambling utility might not have required a screenful
of code, but this particular one natively supports UTF-8.
Specifically: individual UTF-8 byte sequences will not be split into
broken ones, and the utility is aware of full-width versus half-width
differences such that the cursor is positioned correctly for most CJK
input. <a href="sample_input.txt">sample_input.txt</a> demonstrates this feature with a mix of
Basic Latin and Japanese characters.</p>
<p>Output cursor positions will most definitely be wrong for inputs
containing combining characters and right-to-left text, but it should
be possible to unscramble those text back to the original using this
same utility, since the utility is self-consistent in how cursor
positions are handled.</p>
<h3 id="error-handling">Error handling</h3>
<p>If any file can not be opened for reading or writing, an error is
printed to <code>stderr</code>, and the utility will exit with nonzero status.</p>
<p>If there isn’t enough memory, the utility will likely crash.</p>
<p>If input contains CR-LF end of line sequences, those <code>CR</code>s are silently
dropped. In fact, most control codes are silently ignored except line
feeds (preserved) and tabs (expanded to 8 spaces).</p>
<h3 id="compatibility">Compatibility</h3>
<p>Verified to work and compiles without warnings on these environments:</p>
<ul>
<li>gcc 7.3.0 on Linux</li>
<li>gcc 7.4.0 on Cygwin</li>
<li>clang 4.0.1-10 on Linux</li>
<li>clang 5.0.1 on Cygwin</li>
<li>gcc 4.8.4 on Linux</li>
</ul>
<h3 id="full-version">Full version</h3>
<p>I tried really hard to make <code>prog.c</code> fit in a 80x25 terminal without wrapping.
If I were not constrained by space, I would have made an ASCII art out of it.
<a href="violet.c">violet.c</a> is that program, and also comes with the minor benefit of
supporting lines longer than a million columns depending on <code>sizeof(int)</code>.</p>
<p>Violet is named after <a href="https://en.wikipedia.org/wiki/Violet_Evergarden">Violet
Evergarden</a> in the story with
the same name, the character who is highly skilled in writing letters.</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: 2019/yang/README.md -->
<!-- END: this line ends content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
<!-- START: this line starts content for HTML phase 22 by: bin/output-index-inventory.sh via bin/md2html.sh -->
<!-- START: this line starts content generated by: bin/output-index-inventory.sh -->
<div id="inventory">
<h1 id="inventory-for-2019yang">Inventory for 2019/yang</h1>
</div>
<p><a href="#top">Jump to top</a></p>
<h2 id="primary-files">Primary files</h2>
<ul>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/yang/prog.c">prog.c</a> - entry source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/yang/Makefile">Makefile</a> - entry Makefile</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/yang/prog.orig.c">prog.orig.c</a> - original source</li>
<li><a href="ioccc.txt">ioccc.txt</a> - sample input</li>
<li><a href="sample_input.txt">sample_input.txt</a> - sample input</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/yang/try.sh">try.sh</a> - how to run</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/yang/violet.c">violet.c</a> - source formatter as ASCII Violet Evergarden</li>
<li><a href="spoiler.html">spoiler.html</a> - SPOILER WARNING</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="2019_yang.tar.bz2">2019_yang.tar.bz2</a> - download entry tarball</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/yang/README.md">README.md</a> - markdown source for this web page</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/yang/.entry.json">.entry.json</a> - description of entry in JSON</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/yang/.gitignore">.gitignore</a> - list of files that should not be committed under git</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/yang/.path">.path</a> - directory path from top directory</li>
<li><a href="index.html">index.html</a> - this web page</li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
<!-- END: this line ends content for HTML phase 22 by: bin/output-index-inventory.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"><h2>Copyright and CC BY-SA 4.0 License</h2></div>
<p>All IOCCC content including this file and web page are:</p>
<b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Copyright &copy; 1984-2024 by Landon Curt Noll. <a href="https://creativecommons.org/faq/#what-does-some-rights-reserved-mean">Some Rights Reserved</a>.</b>
<p>This work is licensed by Landon Curt Noll under:</p>
<p><b><a href="https://creativecommons.org/licenses/by-sa/4.0/?ref=chooser-v1"
target="_blank" rel="license noopener noreferrer" style="display:inline-block;">&nbsp;&nbsp;&nbsp;&nbsp;CC BY-SA 4.0
<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">
</a></b></p>
<p>The <b>CC BY-SA 4.0 LEGAL CODE</b> for this license is found under:</p>
<p>&nbsp;&nbsp;&nbsp;<b><a href="https://creativecommons.org/licenses/by-sa/4.0/legalcode.en">
https://creativecommons.org/licenses/by-sa/4.0/legalcode.en</a></b></p>
<p>You should <b>carefully review</b> all of the terms and conditions of the
<a href="https://creativecommons.org/licenses/by-sa/4.0/legalcode.en">actual license</a>
before using the licensed material.</p>
<p>You may wish to review the <b><a href="../../license.html">highlights of some of the key
features and terms</a></b> of the <a href="https://creativecommons.org/licenses/by-sa/4.0/legalcode.en">actual license</a>.</p>
<h2>Coda</h2>
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F2019%2Fyang%2Findex.html">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 -->