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
+12
-12
@@ -1,7 +1,7 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
make
|
||||
make
|
||||
```
|
||||
|
||||
There is an alternate version that should work for Windows. See [alternate
|
||||
@@ -13,7 +13,7 @@ code](#alternate-code) below.
|
||||
The current status of this entry is:
|
||||
|
||||
```
|
||||
STATUS: INABIAF - please **DO NOT** fix
|
||||
STATUS: INABIAF - please **DO NOT** fix
|
||||
```
|
||||
|
||||
For more detailed information see [2011 vik bugs](../../bugs.html#2011_vik).
|
||||
@@ -22,20 +22,20 @@ For more detailed information see [2011 vik bugs](../../bugs.html#2011_vik).
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
./vik file.mod > audio_file.raw
|
||||
./vik file.mod > audio_file.raw
|
||||
```
|
||||
|
||||
If you have `mplayer(1)`:
|
||||
|
||||
|
||||
```sh
|
||||
./vik file.mod | mplayer -demuxer rawaudio -
|
||||
./vik file.mod | mplayer -demuxer rawaudio -
|
||||
```
|
||||
|
||||
Alternatively, you can convert the file to a WAV:
|
||||
|
||||
```sh
|
||||
./vik file.mod > file.raw; ./raw2wav file.raw > file.wav
|
||||
./vik file.mod > file.raw; ./raw2wav file.raw > file.wav
|
||||
```
|
||||
|
||||
and then play `file.wav` with a program that can play WAV files.
|
||||
@@ -44,7 +44,7 @@ and then play `file.wav` with a program that can play WAV files.
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
./try.sh
|
||||
./try.sh
|
||||
```
|
||||
|
||||
The script checks that you have `mplayer(1)` installed and if it is it will pipe
|
||||
@@ -67,7 +67,7 @@ This version is based on the author's remarks and it should work for Windows.
|
||||
Assuming that `make` is similar enough try:
|
||||
|
||||
```sh
|
||||
make alt
|
||||
make alt
|
||||
```
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ initialization for?
|
||||
Does it take your system a long time to compile? You may want to do:
|
||||
|
||||
```sh
|
||||
cc -S vik.c
|
||||
cc -S vik.c
|
||||
```
|
||||
|
||||
and examine the resulting assembly file `vik.s`. On some platforms
|
||||
@@ -154,7 +154,7 @@ Bertilsson, also known as Deelite:
|
||||
Compiling for Unix systems (including cygwin) is straight forward:
|
||||
|
||||
```sh
|
||||
gcc -o vik vik.c
|
||||
gcc -o vik vik.c
|
||||
```
|
||||
|
||||
### Usage
|
||||
@@ -163,13 +163,13 @@ gcc -o vik vik.c
|
||||
#### Convert MOD file to raw 44.1kHz stereo audio file
|
||||
|
||||
```sh
|
||||
./vik mad_world.mod > audio_file.raw
|
||||
./vik mad_world.mod > audio_file.raw
|
||||
```
|
||||
|
||||
#### Listen to the MOD file (streaming to mplayer)
|
||||
|
||||
```sh
|
||||
./vik randowan.mod | mplayer -demuxer rawaudio -
|
||||
./vik randowan.mod | mplayer -demuxer rawaudio -
|
||||
```
|
||||
|
||||
(Don't forget the last `-` as it makes mplayer read from `stdin`.)
|
||||
@@ -211,7 +211,7 @@ the program with this platform, the following line can be added after
|
||||
the main declaration in order for the program to run correctly:
|
||||
|
||||
```c
|
||||
_setmode(_fileno(stdout), 0x8000);
|
||||
_setmode(_fileno(stdout), 0x8000);
|
||||
```
|
||||
|
||||
NOTE: this is what the [alternate version](#alternate-code) is for.
|
||||
|
||||
+13
-14
@@ -132,8 +132,7 @@
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Daniel_Vik">Daniel Vik</a><br>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)
|
||||
<br><br></li>
|
||||
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 -->
|
||||
@@ -142,22 +141,22 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
|
||||
<!-- 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>
|
||||
<p>There is an alternate version that should work for Windows. See <a href="#alternate-code">alternate
|
||||
code</a> below.</p>
|
||||
<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#2011_vik">2011 vik 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">./vik</span> file.mod <span class="op">></span> audio_file.raw</span></code></pre></div>
|
||||
<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">./vik</span> file.mod <span class="op">></span> audio_file.raw</span></code></pre></div>
|
||||
<p>If you have <code>mplayer(1)</code>:</p>
|
||||
<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">./vik</span> file.mod <span class="kw">|</span> <span class="ex">mplayer</span> <span class="at">-demuxer</span> rawaudio <span class="at">-</span></span></code></pre></div>
|
||||
<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">./vik</span> file.mod <span class="kw">|</span> <span class="ex">mplayer</span> <span class="at">-demuxer</span> rawaudio <span class="at">-</span></span></code></pre></div>
|
||||
<p>Alternatively, you can convert the file to a WAV:</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">./vik</span> file.mod <span class="op">></span> file.raw<span class="kw">;</span> <span class="ex">./raw2wav</span> file.raw <span class="op">></span> file.wav</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">./vik</span> file.mod <span class="op">></span> file.raw<span class="kw">;</span> <span class="ex">./raw2wav</span> file.raw <span class="op">></span> file.wav</span></code></pre></div>
|
||||
<p>and then play <code>file.wav</code> with a program that can play WAV files.</p>
|
||||
<h2 id="try">Try:</h2>
|
||||
<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">./try.sh</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">./try.sh</span></span></code></pre></div>
|
||||
<p>The script checks that you have <code>mplayer(1)</code> installed and if it is it will pipe
|
||||
<code>vik</code> to <code>mplayer</code>. In this case it will also use <code>raw2wav</code> to convert the file
|
||||
to a WAV file. If <code>mplayer(1)</code> cannot be found it will just use <code>raw2wav</code>. This
|
||||
@@ -169,7 +168,7 @@ Archive</a>.</p>
|
||||
<p>This version is based on the author’s remarks and it should work for Windows.</p>
|
||||
<h3 id="alternate-build">Alternate build:</h3>
|
||||
<p>Assuming that <code>make</code> is similar enough 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">make</span> alt</span></code></pre></div>
|
||||
<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">make</span> alt</span></code></pre></div>
|
||||
<h3 id="alternate-use">Alternate use:</h3>
|
||||
<p>Use <code>vik.alt</code> as you would <code>vik</code> above.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
@@ -179,7 +178,7 @@ in a most pleasing manner if you don’t like tremolo or vibrato.</p>
|
||||
initialized 32MB array. Can you tell what that partial
|
||||
initialization for?</p>
|
||||
<p>Does it take your system a long time to compile? You may want to do:</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="fu">cc</span> <span class="at">-S</span> vik.c</span></code></pre></div>
|
||||
<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="fu">cc</span> <span class="at">-S</span> vik.c</span></code></pre></div>
|
||||
<p>and examine the resulting assembly file <code>vik.s</code>. On some platforms
|
||||
the assembly file is about 128MB in size!</p>
|
||||
<p>NOTE: The <a href="randowan.mod">randowan.mod</a> and <a href="mad_world.mod">mad_world.mod</a> files were
|
||||
@@ -226,12 +225,12 @@ Bertilsson, also known as Deelite:</p>
|
||||
</ol>
|
||||
<h3 id="build">Build</h3>
|
||||
<p>Compiling for Unix systems (including cygwin) is straight forward:</p>
|
||||
<div class="sourceCode" id="cb9"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="fu">gcc</span> <span class="at">-o</span> vik vik.c</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb9"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">gcc</span> <span class="at">-o</span> vik vik.c</span></code></pre></div>
|
||||
<h3 id="usage">Usage</h3>
|
||||
<h4 id="convert-mod-file-to-raw-44.1khz-stereo-audio-file">Convert MOD file to raw 44.1kHz stereo audio file</h4>
|
||||
<div class="sourceCode" id="cb10"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./vik</span> mad_world.mod <span class="op">></span> audio_file.raw</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb10"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./vik</span> mad_world.mod <span class="op">></span> audio_file.raw</span></code></pre></div>
|
||||
<h4 id="listen-to-the-mod-file-streaming-to-mplayer">Listen to the MOD file (streaming to mplayer)</h4>
|
||||
<div class="sourceCode" id="cb11"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./vik</span> randowan.mod <span class="kw">|</span> <span class="ex">mplayer</span> <span class="at">-demuxer</span> rawaudio <span class="at">-</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb11"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./vik</span> randowan.mod <span class="kw">|</span> <span class="ex">mplayer</span> <span class="at">-demuxer</span> rawaudio <span class="at">-</span></span></code></pre></div>
|
||||
<p>(Don’t forget the last <code>-</code> as it makes mplayer read from <code>stdin</code>.)</p>
|
||||
<h3 id="obfuscation">Obfuscation</h3>
|
||||
<p>The IOCCC rules did not put a limit on the entropy of the source code,
|
||||
@@ -257,7 +256,7 @@ that the program relies on writing binary data to <code>stdout</code>.</p>
|
||||
<p>Microsoft compilers adds a carriage return to newlines, and to compile
|
||||
the program with this platform, the following line can be added after
|
||||
the main declaration in order for the program to run correctly:</p>
|
||||
<div class="sourceCode" id="cb12"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a>_setmode<span class="op">(</span>_fileno<span class="op">(</span>stdout<span class="op">),</span> <span class="bn">0x8000</span><span class="op">);</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb12"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a> _setmode<span class="op">(</span>_fileno<span class="op">(</span>stdout<span class="op">),</span> <span class="bn">0x8000</span><span class="op">);</span></span></code></pre></div>
|
||||
<p>NOTE: this is what the <a href="#alternate-code">alternate version</a> is for.</p>
|
||||
<h3 id="limitations">Limitations</h3>
|
||||
<p>The program only runs when a valid MOD file is passed as argument. If
|
||||
|
||||
Reference in new issue
Block a user