improved indentation and whitespace for markdown code blocks
All code blocks in markdown have been intended by at least 4 spaces. We add `--tab-stop=8` to all `pandoc(1)` executions in order to set a better tab stop indentation, especially for tab intended code blocks. Changed `bin/pandoc-wrapper.sh` VERSION from "1.5.3 2024-03-26" to "1.6 2024-03-31". Fixed `1991/brnstnd/sorta.README.md` so that the sorta code is code blocks. Removed unneeded paragraph group in copyright in `inc/footer.default.html`. Fixed excess whitespace after list Author on entry `index.html` page. Changed `bin/output-index-author.sh` VERSION from "1.5.2 2024-03-26" to "1.6 2024-03-31". Performed `make www` to perform the above and test under macOS. TODO: Fix the problem of the initial line of code being extra intended. TODO: Fix excess whitespace around code that is inline.
This commit is contained in:
1 parent
b84c27ce02
commit
a996f8d2b8
734 files changed
+16723
-16963
No files matched your search
+17
-19
@@ -1,7 +1,7 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
make
|
||||
make
|
||||
```
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ make
|
||||
The current status of this entry is:
|
||||
|
||||
```
|
||||
STATUS: INABIAF - please **DO NOT** fix
|
||||
STATUS: INABIAF - please **DO NOT** fix
|
||||
```
|
||||
|
||||
For more detailed information see [2020 giles bugs](../../bugs.html#2020_giles).
|
||||
@@ -19,9 +19,9 @@ For more detailed information see [2020 giles bugs](../../bugs.html#2020_giles).
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
./prog < dtmf.wav
|
||||
./prog < dtmf.wav
|
||||
|
||||
./prog [digits] > digits.wav
|
||||
./prog [digits] > digits.wav
|
||||
```
|
||||
|
||||
where `dtmf.wav` is a WAV file of the dialling of a number being dialled with
|
||||
@@ -34,12 +34,11 @@ will be converted to the DTMF sound!
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
./try.sh
|
||||
./prog < pi.wav
|
||||
|
||||
# See
|
||||
./prog 867-5309 > jenny.wav
|
||||
./try.sh
|
||||
./prog < pi.wav
|
||||
|
||||
# See
|
||||
./prog 867-5309 > jenny.wav
|
||||
```
|
||||
|
||||
If the script [try.sh](try.sh) did not play a WAV file, it means you do not have
|
||||
@@ -73,8 +72,8 @@ audio channels.
|
||||
|
||||
|
||||
```sh
|
||||
$ ./prog < pi.wav
|
||||
31415926
|
||||
$ ./prog < pi.wav
|
||||
31415926
|
||||
```
|
||||
|
||||
If the program is executed with a command-line argument, it will generate the
|
||||
@@ -82,7 +81,7 @@ tones corresponding to the specified characters, writing them to standard output
|
||||
as a WAV file.
|
||||
|
||||
```sh
|
||||
$ ./prog 867-5309 | aplay
|
||||
$ ./prog 867-5309 | aplay
|
||||
```
|
||||
|
||||
### Interesting Features
|
||||
@@ -144,14 +143,13 @@ frequency determines which row the digit is in, and the higher frequency
|
||||
determines the column. There are 4 possible row frequencies and 4 possible
|
||||
column frequencies.
|
||||
|
||||
|
||||
```
|
||||
| | **1209 Hz** | **1336 Hz** | **1477 Hz** | **1633 Hz** |
|
||||
|------------|-------------|-------------|-------------|-------------|
|
||||
| **697 Hz** | 1 | 2 abc | 3 def | A |
|
||||
| **770 Hz** | 4 ghi | 5 jkl | 6 mno | B |
|
||||
| **852 Hz** | 7 pqrs | 8 tuv | 9 wxyz | C |
|
||||
| **941 Hz** | * | 0 | # | D |
|
||||
| | **1209 Hz** | **1336 Hz** | **1477 Hz** | **1633 Hz** |
|
||||
|------------|-------------|-------------|-------------|-------------|
|
||||
| **697 Hz** | 1 | 2 abc | 3 def | A |
|
||||
| **770 Hz** | 4 ghi | 5 jkl | 6 mno | B |
|
||||
| **852 Hz** | 7 pqrs | 8 tuv | 9 wxyz | C |
|
||||
| **941 Hz** | * | 0 | # | D |
|
||||
```
|
||||
|
||||
This program determines which frequencies are present in the input by passing it
|
||||
|
||||
+18
-19
@@ -132,8 +132,7 @@
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Edward_Giles">Edward Giles</a><br>
|
||||
Location: <a href="../../location.html#AU">AU</a> - <em>Commonwealth of Australia</em> (<em>Australia</em>)
|
||||
<br><br></li>
|
||||
Location: <a href="../../location.html#AU">AU</a> - <em>Commonwealth of Australia</em> (<em>Australia</em>)</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -142,26 +141,26 @@ Location: <a href="../../location.html#AU">AU</a> - <em>Commonwealth of Australi
|
||||
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
|
||||
<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></span></code></pre></div>
|
||||
<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></span></code></pre></div>
|
||||
<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>
|
||||
<pre><code> STATUS: INABIAF - please **DO NOT** fix</code></pre>
|
||||
<p>For more detailed information see <a href="../../bugs.html#2020_giles">2020 giles 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">./prog</span> <span class="op"><</span> dtmf.wav</span>
|
||||
<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">./prog</span> <span class="op"><</span> dtmf.wav</span>
|
||||
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./prog</span> <span class="pp">[</span><span class="ss">digits</span><span class="pp">]</span> <span class="op">></span> digits.wav</span></code></pre></div>
|
||||
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a> <span class="ex">./prog</span> <span class="pp">[</span><span class="ss">digits</span><span class="pp">]</span> <span class="op">></span> digits.wav</span></code></pre></div>
|
||||
<p>where <code>dtmf.wav</code> is a WAV file of the dialling of a number being dialled with
|
||||
<a href="https://en.wikipedia.org/wiki/Dual-tone_multi-frequency_signaling">DTMF (Dual-tone multi
|
||||
frequency)</a>
|
||||
(more commonly known as Touch-Tone) and <code>[digits]</code> is a sequence of digits that
|
||||
will be converted to the DTMF sound!</p>
|
||||
<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>
|
||||
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./prog</span> <span class="op"><</span> pi.wav</span>
|
||||
<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>
|
||||
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">./prog</span> <span class="op"><</span> pi.wav</span>
|
||||
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a><span class="co"># See</span></span>
|
||||
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a><span class="ex">./prog</span> 867-5309 <span class="op">></span> jenny.wav</span></code></pre></div>
|
||||
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a> <span class="co"># See</span></span>
|
||||
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a> <span class="ex">./prog</span> 867-5309 <span class="op">></span> jenny.wav</span></code></pre></div>
|
||||
<p>If the script <a href="try.sh">try.sh</a> did not play a WAV file, it means you do not have
|
||||
SoX installed; see <a href="../../faq.html#sox">FAQ 3.10: How do I compile and use an IOCCC entry that
|
||||
requires sound?</a>). In this case install it and try it again or
|
||||
@@ -181,12 +180,12 @@ standard input, decode the touch-tones in the file, and output the corresponding
|
||||
digits to standard output. This program only supports WAV files that have
|
||||
exactly 16 bits per sample, but it allows any sample rate and any number of
|
||||
audio channels.</p>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> ./prog <span class="op"><</span> pi.wav</span>
|
||||
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="ex">31415926</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">$</span> ./prog <span class="op"><</span> pi.wav</span>
|
||||
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">31415926</span></span></code></pre></div>
|
||||
<p>If the program is executed with a command-line argument, it will generate the
|
||||
tones corresponding to the specified characters, writing them to standard output
|
||||
as a WAV file.</p>
|
||||
<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> ./prog 867-5309 <span class="kw">|</span> <span class="fu">aplay</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">$</span> ./prog 867-5309 <span class="kw">|</span> <span class="fu">aplay</span></span></code></pre></div>
|
||||
<h3 id="interesting-features">Interesting Features</h3>
|
||||
<ul>
|
||||
<li>When compiled with <code>gcc -pedantic -Wall -Wextra</code> there are no compiler
|
||||
@@ -241,12 +240,12 @@ shorthand.</li>
|
||||
frequency determines which row the digit is in, and the higher frequency
|
||||
determines the column. There are 4 possible row frequencies and 4 possible
|
||||
column frequencies.</p>
|
||||
<pre><code>| | **1209 Hz** | **1336 Hz** | **1477 Hz** | **1633 Hz** |
|
||||
|------------|-------------|-------------|-------------|-------------|
|
||||
| **697 Hz** | 1 | 2 abc | 3 def | A |
|
||||
| **770 Hz** | 4 ghi | 5 jkl | 6 mno | B |
|
||||
| **852 Hz** | 7 pqrs | 8 tuv | 9 wxyz | C |
|
||||
| **941 Hz** | * | 0 | # | D |</code></pre>
|
||||
<pre><code> | | **1209 Hz** | **1336 Hz** | **1477 Hz** | **1633 Hz** |
|
||||
|------------|-------------|-------------|-------------|-------------|
|
||||
| **697 Hz** | 1 | 2 abc | 3 def | A |
|
||||
| **770 Hz** | 4 ghi | 5 jkl | 6 mno | B |
|
||||
| **852 Hz** | 7 pqrs | 8 tuv | 9 wxyz | C |
|
||||
| **941 Hz** | * | 0 | # | D |</code></pre>
|
||||
<p>This program determines which frequencies are present in the input by passing it
|
||||
through a set of 8 virtual resonators, each tuned to one of the frequencies used
|
||||
for DTMF. These can be implemented using only basic arithmetic, and they are
|
||||
|
||||
Reference in new issue
Block a user