force use of pandoc version >= 3.1.12.2
The `bin/pandoc-wrapper.sh` tool will verify that the ssytem has a recent enough version of `pandoc(1)`. We explain why we insist on `pandoc(1)`. version >= 3.1.12.2 in comments where the $PANDOC_MIN_VERSION is set. Added `--wrap=preserve` as a default argument to `pandoc(1)`. While this change will impact every HTML file generated, we believe this will improve the ability of someone to look at the generated HTML and correlate with the original markdown. Changed `bin/pandoc-wrapper.sh` VERSION from "1.4.2 2024-03-17" to "1.4.3 2024-03-18". Performed `make www` to achieve all of the above and to generate HTML using the new `--wrap=preserve` `pandoc(1)` mode.
This commit is contained in:
1 parent
9eb7a54e9f
commit
b0b212acb1
402 files changed
+37061
-55132
No files matched your search
+143
-176
@@ -129,9 +129,9 @@
|
||||
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Andreas_Gustafsson">Andreas
|
||||
Gustafsson</a><br> Location: <a href="../../location.html#FI">FI</a> -
|
||||
<em>Republic of Finland </em> (<em>Finland</em>) <br><br></li>
|
||||
<li>Name: <a href="../../authors.html#Andreas_Gustafsson">Andreas Gustafsson</a><br>
|
||||
Location: <a href="../../location.html#FI">FI</a> - <em>Republic of Finland </em> (<em>Finland</em>)
|
||||
<br><br></li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -141,21 +141,19 @@ Gustafsson</a><br> Location: <a href="../../location.html#FI">FI</a> -
|
||||
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> all</span></code></pre></div>
|
||||
<p>NOTE: we DISABLE the optimiser because having it enabled causes some
|
||||
invocations to crash in some systems.</p>
|
||||
<p>NOTE: we DISABLE the optimiser because having it enabled causes some invocations
|
||||
to crash in some systems.</p>
|
||||
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
|
||||
<p>The current status of this entry is:</p>
|
||||
<pre><code>STATUS: uses gets() - change to fgets() if possible</code></pre>
|
||||
<p>For more detailed information see <a
|
||||
href="../../bugs.html#1992_gson">1992 gson bugs</a>.</p>
|
||||
<p>For more detailed information see <a href="../../bugs.html#1992_gson">1992 gson bugs</a>.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./ag</span> word word2 word3 <span class="op"><</span> /path/to/dictionary</span></code></pre></div>
|
||||
<h2 id="try">Try:</h2>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span></span></code></pre></div>
|
||||
<p>This script will determine (or try and determine) where your system
|
||||
dictionary is located and assuming that it can find one it’ll use that.
|
||||
It checks the following locations though the last one is more
|
||||
ironic:</p>
|
||||
<p>This script will determine (or try and determine) where your system dictionary
|
||||
is located and assuming that it can find one it’ll use that. It checks the
|
||||
following locations though the last one is more ironic:</p>
|
||||
<pre><code>/usr/share/dict/words
|
||||
/usr/share/lib/spell/words
|
||||
/usr/ucblib/dict/words
|
||||
@@ -169,65 +167,58 @@ ironic:</p>
|
||||
<span id="cb6-6"><a href="#cb6-6" aria-hidden="true" tabindex="-1"></a><span class="ex">./ag</span> ross perot <span class="op"><</span> /usr/share/dict/words</span>
|
||||
<span id="cb6-7"><a href="#cb6-7" aria-hidden="true" tabindex="-1"></a><span class="ex">./ag</span> paul e tsongas <span class="op"><</span> /usr/share/dict/words</span></code></pre></div>
|
||||
<p>where <code>/usr/share/dict/words</code> is the dictionary file.</p>
|
||||
<p>Then it uses the <a href="mkdict.sh">mkdict.sh</a> script to create a
|
||||
dictionary file out of the files <a href="README.md">README.md</a>, <a
|
||||
href="try.sh">try.sh</a> (itself) and <a href="Makefile">Makefile</a>
|
||||
and it repeats the same commands as above. In the case no dictionary
|
||||
file can be found in the first step it only runs the commands once with
|
||||
the created dictionary file.</p>
|
||||
<p>Then it uses the <a href="mkdict.sh">mkdict.sh</a> script to create a dictionary file out
|
||||
of the files <a href="README.md">README.md</a>, <a href="try.sh">try.sh</a> (itself) and
|
||||
<a href="Makefile">Makefile</a> and it repeats the same commands as above. In the case no
|
||||
dictionary file can be found in the first step it only runs the commands once
|
||||
with the created dictionary file.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Recently some newspapers printed amusing anagrams of one of the names
|
||||
listed above. Run this program to find the anagrams they weren’t allowed
|
||||
to print!</p>
|
||||
<p>The author provided an obfuscated script that can be used to
|
||||
construct dictionaries which has been put in as <a
|
||||
href="mkdict.sh">mkdict.sh</a>. To use try:</p>
|
||||
<p>Recently some newspapers printed amusing anagrams of one of the
|
||||
names listed above. Run this program to find the anagrams they
|
||||
weren’t allowed to print!</p>
|
||||
<p>The author provided an obfuscated script that can be used to construct
|
||||
dictionaries which has been put in as <a href="mkdict.sh">mkdict.sh</a>. To use try:</p>
|
||||
<div class="sourceCode" id="cb7"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="fu">cat</span> README.md <span class="kw">|</span> <span class="ex">./mkdict.sh</span> <span class="op">></span> words</span></code></pre></div>
|
||||
<p>Then try using the program as shown above with the file
|
||||
<code>words</code>.</p>
|
||||
<p>Then try using the program as shown above with the file <code>words</code>.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>The name of the game:</p>
|
||||
<p>AG is short for either Anagram Generator or simply AnaGram. It might
|
||||
also be construed to mean Alphabet Game, and by pure coincidence it
|
||||
happens to be the author’s initials.</p>
|
||||
<p>AG is short for either Anagram Generator or simply AnaGram. It might also be
|
||||
construed to mean Alphabet Game, and by pure coincidence it happens to be the
|
||||
author’s initials.</p>
|
||||
<h3 id="what-it-does">What it does</h3>
|
||||
<p>AG takes one or more words as arguments, and tries to find anagrams
|
||||
of those words, i.e. words or sentences containing exactly the same
|
||||
letters.</p>
|
||||
<p>AG takes one or more words as arguments, and tries to find anagrams of those
|
||||
words, i.e. words or sentences containing exactly the same letters.</p>
|
||||
<h3 id="how-to-use-it">How to use it</h3>
|
||||
<p>To run AG, you need a dictionary file consisting of distinct words in
|
||||
the natural language of your choice, one word on each line. If your
|
||||
machine doesn’t have one already, you can make your own dictionary by
|
||||
concatenating a few hundred of your favourite Usenet articles and piping
|
||||
them through the following obfuscated shell script:</p>
|
||||
<p>To run AG, you need a dictionary file consisting of distinct words in the
|
||||
natural language of your choice, one word on each line. If your machine doesn’t
|
||||
have one already, you can make your own dictionary by concatenating a few
|
||||
hundred of your favourite Usenet articles and piping them through the following
|
||||
obfuscated shell script:</p>
|
||||
<div class="sourceCode" id="cb8"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="co">#!/bin/sh</span></span>
|
||||
<span id="cb8-2"><a href="#cb8-2" aria-hidden="true" tabindex="-1"></a><span class="va">z</span><span class="op">=</span>a-z]<span class="kw">;</span><span class="fu">tr</span> [A-Z<span class="dt">\]</span> <span class="dt">\[</span><span class="va">$z</span><span class="kw">|</span><span class="fu">sed</span> s/[<span class="dt">\^</span><span class="va">$z</span>[<span class="dt">\^</span><span class="va">$z</span><span class="pp">*</span>/_/g<span class="kw">|</span><span class="fu">tr</span> _ <span class="dt">\\</span>012<span class="kw">|</span><span class="fu">grep</span> ..<span class="kw">|</span><span class="fu">sort</span> <span class="at">-u</span></span></code></pre></div>
|
||||
<p>Using articles from alt.folklore.computers is likely to make a more
|
||||
professional-looking dictionary than rec.arts.erotica.</p>
|
||||
<p>Using articles from alt.folklore.computers is likely to make
|
||||
a more professional-looking dictionary than rec.arts.erotica.</p>
|
||||
<p>AG must be run with the dictionary file as standard input.</p>
|
||||
<p>Because anagrams consisting of just a few words are generally more
|
||||
meaningful than those consisting of dozens of very short words, the
|
||||
number of words in the anagrams is limited to 3 by default. This limit
|
||||
can be changed using a numeric command line option, as in
|
||||
number of words in the anagrams is limited to 3 by default. This
|
||||
limit can be changed using a numeric command line option, as in
|
||||
<code>./ag -4 international obfuscated c code contest </usr/dict/words</code>.</p>
|
||||
<h3 id="bugs-and-limitations">Bugs and limitations</h3>
|
||||
<ul>
|
||||
<li>There is no error checking.</li>
|
||||
<li>Standard input must be seekable, so you can’t pipe the dictionary
|
||||
into AG.</li>
|
||||
<li>The input sentence and each line in the dictionary may contain at
|
||||
most 32 distinct letters, and each letter may occur at most 15
|
||||
times.</li>
|
||||
<li>Standard input must be seekable, so you can’t pipe the dictionary into AG.</li>
|
||||
<li>The input sentence and each line in the dictionary may contain at most 32
|
||||
distinct letters, and each letter may occur at most 15 times.</li>
|
||||
<li>Words in the dictionary may be at most 255 bytes long.</li>
|
||||
<li>AG cannot handle characters that sign-extend to negative
|
||||
values.</li>
|
||||
<li>Although AG works on both 16-bit and 32-bit machines, the size of
|
||||
the problems it can solve is severely limited on machines that limit the
|
||||
stack size to 64k or less.</li>
|
||||
<li>AG cannot handle characters that sign-extend to negative values.</li>
|
||||
<li>Although AG works on both 16-bit and 32-bit machines, the size of the problems
|
||||
it can solve is severely limited on machines that limit the stack size to 64k or
|
||||
less.</li>
|
||||
</ul>
|
||||
<h3 id="obfuscatory-notes">Obfuscatory notes</h3>
|
||||
<p>As you can see, AG takes advantage of the new ‘92 whitespace rules’
|
||||
to achieve a clear, readable, self-documenting layout. The identifiers
|
||||
<p>As you can see, AG takes advantage of the new ‘92 whitespace rules’ to
|
||||
achieve a clear, readable, self-documenting layout. The identifiers
|
||||
have been chosen in a way appropriate for an alphabet game, and common
|
||||
sources of bugs such as goto statements and malloc/free have been
|
||||
eliminated. As AG also refrains from abusing the preprocessor, it
|
||||
@@ -237,164 +228,140 @@ careful choice of algorithms. Some of the finer points of those
|
||||
algorithms are outlined in the spoiler below.</p>
|
||||
<h3 id="how-it-works">How it works:</h3>
|
||||
<p>Here follows a description of some of the data structures and
|
||||
algorithms used by AG. It is by no means complete, but it may help you
|
||||
get an idea about the general principles.</p>
|
||||
algorithms used by AG. It is by no means complete, but it may help
|
||||
you get an idea about the general principles.</p>
|
||||
<hr />
|
||||
<p>Internally, AG represents words and sentences as arrays of 32 4-bit
|
||||
integer elements. Each element represents the number of times a letter
|
||||
occurs in the word/sentence. There are 32 elements because 32 is a
|
||||
convenient power of two larger than the number of letters in most
|
||||
western alphabets, and the elements are 4 bits each because the same
|
||||
letter is unlikely to occur more than 15 times in a practical anagram
|
||||
generation problem.</p>
|
||||
<p>Internally, AG represents words and sentences as arrays of 32
|
||||
4-bit integer elements. Each element represents the number of
|
||||
times a letter occurs in the word/sentence. There are 32 elements
|
||||
because 32 is a convenient power of two larger than the number of
|
||||
letters in most western alphabets, and the elements are 4 bits
|
||||
each because the same letter is unlikely to occur more than 15
|
||||
times in a practical anagram generation problem.</p>
|
||||
<p>These <code>32*4</code>-bit arrays are actually stored in memory in a
|
||||
“bit-transposed” format, as arrays of four <code>long</code> values. It
|
||||
is assumed that a <code>long</code> is at least 32 bits. The first 4-bit
|
||||
letter count is formed by the least significant (<code>2^0</code>) bit
|
||||
in each of the four <code>long</code>s, the next one is formed by the
|
||||
<code>2^1</code> bits, etc.</p>
|
||||
“bit-transposed” format, as arrays of four <code>long</code> values. It is
|
||||
assumed that a <code>long</code> is at least 32 bits. The first 4-bit letter
|
||||
count is formed by the least significant (<code>2^0</code>) bit in each of the
|
||||
four <code>long</code>s, the next one is formed by the <code>2^1</code> bits, etc.</p>
|
||||
<p>This storage format makes it possible to add or subtract two such
|
||||
vectors of 32 4-bit values in parallel by simulating a set of 32 binary
|
||||
full adders in software using bitwise logical operations. E.g., all the
|
||||
LSBs of the result are formed in parallel by taking the exclusive OR of
|
||||
the LSBs in each summand, and 32 carry bits are formed in parallel in a
|
||||
similar way using a logical AND. Thus, 32 independent 4-bit additions
|
||||
can be performed by just four iterations of a loop containing some
|
||||
32-bit bitwise logical operations, but no arithmetic operations other
|
||||
than those implied by array indexing.</p>
|
||||
vectors of 32 4-bit values in parallel by simulating a set of 32
|
||||
binary full adders in software using bitwise logical operations.
|
||||
E.g., all the LSBs of the result are formed in parallel by taking
|
||||
the exclusive OR of the LSBs in each summand, and 32 carry bits
|
||||
are formed in parallel in a similar way using a logical AND.
|
||||
Thus, 32 independent 4-bit additions can be performed by just four
|
||||
iterations of a loop containing some 32-bit bitwise logical
|
||||
operations, but no arithmetic operations other than those implied
|
||||
by array indexing.</p>
|
||||
<p>Subtraction works similarly, and in fact AG only implements
|
||||
subtraction directly, handling addition by means of the identity
|
||||
<code>a+b = a-(0-b)</code>.</p>
|
||||
<p>In addition to this <code>32*4</code>-bit representation, AG also
|
||||
forms a so-called “signature” that is the bitwise OR of the four
|
||||
<code>long</code>s, which is equivalent to saying that the signature of
|
||||
a word contains a logical 1 in the bit positions corresponding to
|
||||
letters occurring at least once in that word.</p>
|
||||
<p>In addition to this <code>32*4</code>-bit representation, AG also forms a so-called
|
||||
“signature” that is the bitwise OR of the four <code>long</code>s, which is
|
||||
equivalent to saying that the signature of a word contains a logical 1
|
||||
in the bit positions corresponding to letters occurring at least once
|
||||
in that word.</p>
|
||||
<p>The first thing AG does is to construct a lookup table of 256
|
||||
<code>long</code>s, one for each 8-bit character value. The entry for a
|
||||
character will be zero if that character doesn’t appear in the sentence
|
||||
given on the command line, or it will have a single bit set if the
|
||||
character does appear in the sentence. By adding together the bit masks
|
||||
for all the letters in the input sentence using the transpose addition
|
||||
method described above, AG forms the <code>32*4</code> bit array
|
||||
representation of the input sentence.</p>
|
||||
character will be zero if that character doesn’t appear in the
|
||||
sentence given on the command line, or it will have a single bit
|
||||
set if the character does appear in the sentence. By adding
|
||||
together the bit masks for all the letters in the input sentence
|
||||
using the transpose addition method described above, AG forms the
|
||||
<code>32*4</code> bit array representation of the input sentence.</p>
|
||||
<p>The next action performed is reading the dictionary. Those words that
|
||||
contain letters not in the input sentence are immediately discarded.
|
||||
Words containing the right letters but in excessive numbers are
|
||||
eliminated in a separate check involving the <code>32*4</code> bit
|
||||
array.</p>
|
||||
eliminated in a separate check involving the <code>32*4</code> bit array.</p>
|
||||
<p>The remaining words, which will be referred to as “candidate words”,
|
||||
are stored in <code>32*4</code>-bit representation, together with their
|
||||
signatures and offsets into the dictionary file so that the plain-text
|
||||
version of a word can later be found for printing. This information is
|
||||
kept in a local <code>struct</code> in the dictionary-reading function,
|
||||
and memory is allocated for each candidate word simply by making another
|
||||
recursive call to that function.</p>
|
||||
<p>Each <code>struct</code> so allocated is linked into a fixed-size
|
||||
hash table of 4096 entries indexed by the 12 low bits of the word’s
|
||||
signature. When the dictionary-reading function encounters end-of-file,
|
||||
all the candidate words have been stored in nested activation records on
|
||||
the stack, accessible through the hash table.</p>
|
||||
are stored in <code>32*4</code>-bit representation, together with their signatures
|
||||
and offsets into the dictionary file so that the plain-text version of
|
||||
a word can later be found for printing. This information is kept in a
|
||||
local <code>struct</code> in the dictionary-reading function, and memory is
|
||||
allocated for each candidate word simply by making another recursive
|
||||
call to that function.</p>
|
||||
<p>Each <code>struct</code> so allocated is linked into a fixed-size hash table of
|
||||
4096 entries indexed by the 12 low bits of the word’s signature.
|
||||
When the dictionary-reading function encounters end-of-file, all the
|
||||
candidate words have been stored in nested activation records on the
|
||||
stack, accessible through the hash table.</p>
|
||||
<p>Generating the anagrams is then done by traversing the hash table and
|
||||
subtracting the letters of each word in the hash table from the “current
|
||||
sentence”, which initially is the sentence given on the command
|
||||
line.</p>
|
||||
subtracting the letters of each word in the hash table from the
|
||||
“current sentence”, which initially is the sentence given on the
|
||||
command line.</p>
|
||||
<p>The subtraction is performed in parallel on the 4-bit letter counts
|
||||
as described above, and if all 32 results are zero, an anagram has been
|
||||
found. If the result is negative for one or more of the letters (as
|
||||
indicated by one or more <code>1</code>s in a vector of 32 borrow bits
|
||||
returned by the subtraction routine), the word did not match the current
|
||||
sentence and is ignored. Finally, if the result contained only
|
||||
non-negative letter counts, we have found a partial anagram: a word
|
||||
containing some, but not all, of the letters in the current sentence. In
|
||||
this case we recursively try to find an anagram of the remaining
|
||||
letters. The depth of the recursion is limited to the maximum number of
|
||||
words in the anagram, as specified by the user.</p>
|
||||
<p>When the deepest recursion level has been reached, an optimization
|
||||
can be applied: because no further recursion will be done, there is no
|
||||
need to look for partial anagrams, and therefore AG only needs to check
|
||||
for words that contain exactly the same letters as the current sentence.
|
||||
Those words can be found simply by indexing the hash table with the
|
||||
signature of the current sentence.</p>
|
||||
as described above, and if all 32 results are zero, an anagram has
|
||||
been found. If the result is negative for one or more of the letters
|
||||
(as indicated by one or more <code>1</code>s in a vector of 32 borrow bits
|
||||
returned by the subtraction routine), the word did not match the
|
||||
current sentence and is ignored. Finally, if the result contained
|
||||
only non-negative letter counts, we have found a partial anagram:
|
||||
a word containing some, but not all, of the letters in the current
|
||||
sentence. In this case we recursively try to find an anagram of the
|
||||
remaining letters. The depth of the recursion is limited to the
|
||||
maximum number of words in the anagram, as specified by the user.</p>
|
||||
<p>When the deepest recursion level has been reached, an optimization can
|
||||
be applied: because no further recursion will be done, there is no
|
||||
need to look for partial anagrams, and therefore AG only needs to
|
||||
check for words that contain exactly the same letters as the current
|
||||
sentence. Those words can be found simply by indexing the hash table
|
||||
with the signature of the current sentence.</p>
|
||||
<p>Even when not on the deepest recursion level, AG generally avoids
|
||||
examining all the entries of the hash table. The idea is that we are not
|
||||
interested in hash buckets whose words contain any letters not in the
|
||||
current sentence; these buckets are exactly those whose index has a
|
||||
logical one in a bit position where the signature of the current
|
||||
sentence has a zero. Put another way, we want to loop through only those
|
||||
hash bucket indices <code>i</code> that contain zeroes in all the bit
|
||||
positions where the signature <code>s</code> of the current sentence
|
||||
contains a zero; this can be expressed in C as
|
||||
(<code>i & ~s == 0</code>).</p>
|
||||
<p>It is possible to loop through all such numbers in an efficient way
|
||||
by taking advantage of certain properties of binary arithmetic: by
|
||||
forcing the bits corresponding to zeroes in <code>s</code> to ones, we
|
||||
can make the carries generated in incrementing <code>i</code> propagate
|
||||
straight across those bits that should remain zero. For example, the
|
||||
following program prints all those 16-bit integers that contain zeroes
|
||||
in all even bit positions:</p>
|
||||
examining all the entries of the hash table. The idea is that we are
|
||||
not interested in hash buckets whose words contain any letters not
|
||||
in the current sentence; these buckets are exactly those whose index
|
||||
has a logical one in a bit position where the signature of the current
|
||||
sentence has a zero. Put another way, we want to loop through only
|
||||
those hash bucket indices <code>i</code> that contain zeroes in all the bit
|
||||
positions where the signature <code>s</code> of the current sentence contains
|
||||
a zero; this can be expressed in C as (<code>i & ~s == 0</code>).</p>
|
||||
<p>It is possible to loop through all such numbers in an efficient way by
|
||||
taking advantage of certain properties of binary arithmetic: by
|
||||
forcing the bits corresponding to zeroes in <code>s</code> to ones, we can make
|
||||
the carries generated in incrementing <code>i</code> propagate straight across
|
||||
those bits that should remain zero. For example, the following
|
||||
program prints all those 16-bit integers that contain zeroes in all
|
||||
even bit positions:</p>
|
||||
<div class="sourceCode" id="cb9"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a>main<span class="op">(){</span><span class="dt">int</span> i<span class="op">=</span><span class="dv">0</span><span class="op">,</span>s<span class="op">=</span><span class="bn">0xAAAA</span><span class="op">;</span><span class="cf">do</span><span class="op">{</span>printf<span class="op">(</span><span class="st">"</span><span class="sc">%04x\t</span><span class="st">"</span><span class="op">,</span>i<span class="op">);}</span><span class="cf">while</span><span class="op">(</span>i<span class="op">=((</span>i<span class="op">|~</span>s<span class="op">)+</span><span class="dv">1</span><span class="op">)&</span>s<span class="op">);}</span></span></code></pre></div>
|
||||
<p>AG uses a similar method but works in the opposite direction, finding
|
||||
the next lower value with zeroes in given bit positions by propagating
|
||||
borrows across those bits. Some additional adjustments are made to the
|
||||
hash table index when initiating a recursive search, using similar
|
||||
bit-twiddling techniques.</p>
|
||||
borrows across those bits. Some additional adjustments are made
|
||||
to the hash table index when initiating a recursive search, using
|
||||
similar bit-twiddling techniques.</p>
|
||||
<p>Whenever an anagram has been found, it is printed by traversing a
|
||||
linked list formed by <code>struct</code>s in the activation records of
|
||||
the recursive invocations of the search function, seeking to the
|
||||
beginning of the word matched by that invocation, and copying the
|
||||
characters of the word directly from standard input to standard
|
||||
output.</p>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
|
||||
License:</h2>
|
||||
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights
|
||||
Reserved. You are free to share and adapt this file under the terms of
|
||||
this license:</p>
|
||||
linked list formed by <code>struct</code>s in the activation records of the
|
||||
recursive invocations of the search function, seeking to the beginning
|
||||
of the word matched by that invocation, and copying the characters of
|
||||
the word directly from standard input to standard output.</p>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0 License:</h2>
|
||||
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved.
|
||||
You are free to share and adapt this file under the terms of this license:</p>
|
||||
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
|
||||
<p>For more information, see:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
<p>For more information, see: https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
|
||||
<!-- 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 -->
|
||||
|
||||
<h1 id="inventory-for-1992gson"><a name="inventory"></a>Inventory for
|
||||
1992/gson</h1>
|
||||
<h1 id="inventory-for-1992gson"><a name="inventory"></a>Inventory for 1992/gson</h1>
|
||||
<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/1992/gson/gson.c">gson.c</a>
|
||||
- entry source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/gson/Makefile">Makefile</a>
|
||||
- entry Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/gson/gson.orig.c">gson.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/gson/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/gson/mkdict.sh">mkdict.sh</a>
|
||||
- tool to make the dictionary</li>
|
||||
<li><a href="1992_gson.tar.bz2">1992_gson.tar.bz2</a> - download entry
|
||||
source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/gson/gson.c">gson.c</a> - entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/gson/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/gson/gson.orig.c">gson.orig.c</a> - original source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/gson/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/gson/mkdict.sh">mkdict.sh</a> - tool to make the dictionary</li>
|
||||
<li><a href="1992_gson.tar.bz2">1992_gson.tar.bz2</a> - download 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/1992/gson/.entry.json">.entry.json</a>
|
||||
- description of entry in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/gson/.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/1992/gson/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/gson/.gitignore">.gitignore</a> - list of files that should not be committed under git</li>
|
||||
<li><a href=".path">.path</a> - directory path from top directory</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/gson/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/gson/README.md">README.md</a> - markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
|
||||
|
||||
Reference in new issue
Block a user