Format fixes in html files of 2020
This commit is contained in:
1 parent
cc026c02b6
commit
6bbcebc7bf
12 files changed
+128
-122
No files matched your search
@@ -872,11 +872,14 @@ seem to both be compared to <code>y</code> but never <code>x</code> (that variab
|
||||
and not even in this part of the code).</p></li>
|
||||
<li><p>The function <code>B()</code> ends with a <code>goto</code>. Why? It’s also another place where
|
||||
there’s at least one negative offset.</p></li>
|
||||
<li><p>A note on the many <code>#define</code>s in my entry. You say you dislike them:</p>
|
||||
<pre><code> Doing masses of #defines to obscure the source has become 'old'. We
|
||||
tend to 'see thru' masses of #defines due to our pre-processor tests
|
||||
that we apply. Simply abusing #defines or -Dfoo=bar won't go as far
|
||||
as a program that is more well rounded in confusion.</code></pre>
|
||||
<li><p>A note on the many <code>#define</code>s in my entry. You say you dislike them:</p></li>
|
||||
</ul>
|
||||
<blockquote>
|
||||
<p>Doing masses of #defines to obscure the source has become ‘old’. We tend to
|
||||
‘see thru’ masses of #defines due to our pre-processor tests that we apply.
|
||||
Simply abusing #defines or -Dfoo=bar won’t go as far as a program that is more
|
||||
well rounded in confusion.</p>
|
||||
</blockquote>
|
||||
<p>As I have noted though many of these save quite a lot of bytes too. It’s
|
||||
true that they might aid (but barely) in obfuscation but I think that my
|
||||
entry is more rounded in confusion; certainly the other techniques I have
|
||||
@@ -888,7 +891,8 @@ also removed some that saved bytes and in fact I think it makes it more
|
||||
obscure if in no other way but making it more difficult to look at (for
|
||||
example I might have been able to save bytes by defining for the array
|
||||
offsets but I find that it looks much better - which is to say much worse -
|
||||
the way I have it now).</p></li>
|
||||
the way I have it now).</p>
|
||||
<ul>
|
||||
<li><p>Going back to the curious <code>static char s[]=Z(; +<>^v);</code>: there’s something
|
||||
magical about the number 7 isn’t there? I do not refer to primes although
|
||||
certainly one could say that primes have a magic to them. No. I’m instead
|
||||
@@ -1117,7 +1121,7 @@ the score line is made an empty string it doesn’t matter because it’ll appea
|
||||
all spaces anyway. Thus I could save another three bytes by changing it to:</p>
|
||||
<pre><code> !o && q *U,*V,' ');</code></pre>
|
||||
<p>Technically it would be a <code>" "</code> (see <a href="HACKING.html">HACKING.html</a>
|
||||
else for N (not referring to the variable though it might very
|
||||
for N (not referring to the variable though it might very
|
||||
well matter here too) movements (i.e. due to sizes) you will at times (e.g.
|
||||
after eating a bug) see the snake body char at 0,0. I’m not bothered about that
|
||||
though because the score line is meant to display something, it squeezes a few
|
||||
|
||||
@@ -630,10 +630,10 @@ there's at least one negative offset.
|
||||
|
||||
- A note on the many `#define`s in my entry. You say you dislike them:
|
||||
|
||||
Doing masses of #defines to obscure the source has become 'old'. We
|
||||
tend to 'see thru' masses of #defines due to our pre-processor tests
|
||||
that we apply. Simply abusing #defines or -Dfoo=bar won't go as far
|
||||
as a program that is more well rounded in confusion.
|
||||
> Doing masses of #defines to obscure the source has become 'old'. We tend to
|
||||
'see thru' masses of #defines due to our pre-processor tests that we apply.
|
||||
Simply abusing #defines or -Dfoo=bar won't go as far as a program that is more
|
||||
well rounded in confusion.
|
||||
|
||||
As I have noted though many of these save quite a lot of bytes too. It's
|
||||
true that they might aid (but barely) in obfuscation but I think that my
|
||||
@@ -955,7 +955,7 @@ all spaces anyway. Thus I could save another three bytes by changing it to:
|
||||
```
|
||||
|
||||
Technically it would be a `" "` (see [HACKING.html][]
|
||||
else for N (not referring to the variable though it might very
|
||||
for N (not referring to the variable though it might very
|
||||
well matter here too) movements (i.e. due to sizes) you will at times (e.g.
|
||||
after eating a bug) see the snake body char at 0,0. I'm not bothered about that
|
||||
though because the score line is meant to display something, it squeezes a few
|
||||
|
||||
@@ -530,12 +530,12 @@ messed up. There are numerous things you might try but probably the easiest is
|
||||
to run the game again without modifying the dimensions (and then just quit) or
|
||||
even just the <code>reset</code> command.</p>
|
||||
<p>The Linux man page says:</p>
|
||||
<pre><code> You might have to run the `reset` tool like:
|
||||
|
||||
<LF>reset<LF>
|
||||
|
||||
(the line-feed character is normally control-J) to get the terminal
|
||||
to work, as carriage-return may no longer work in the abnormal state.</code></pre>
|
||||
<blockquote>
|
||||
<p>You might have to run the <code>reset</code> tool like:</p>
|
||||
<p><LF>reset<LF></p>
|
||||
<p>(the line-feed character is normally control-J) to get the terminal to work,
|
||||
as carriage-return may no longer work in the abnormal state.</p>
|
||||
</blockquote>
|
||||
<p>If you don’t have the reset utility you can try:</p>
|
||||
<pre><code> echo -e \\033c</code></pre>
|
||||
<p>Otherwise try <code>clear; stty sane</code> (that will turn on echo also) or if all else
|
||||
@@ -603,17 +603,20 @@ support in the source code itself.</p>
|
||||
<h2 id="colour-limitations"><a href="#toc">Colour limitations</a></h2>
|
||||
</div>
|
||||
<p>According to X/Open Curses, Issue 7 (pg. 57):</p>
|
||||
<pre><code> With init_pair() and pair_content(), the value of pair must be in a range
|
||||
from 0 to and including COLOR_PAIRS-1. (There may be an
|
||||
implementation-specific upper limit on the valid value of pair, but any such
|
||||
limit is at least 63.) Valid values for f and b are the range from 0 to and
|
||||
including COLORS-1.</code></pre>
|
||||
<blockquote>
|
||||
<p>With <code>init_pair()</code> and <code>pair_content()</code>, the value of pair must be in a range from
|
||||
0 to and including <code>COLOR_PAIRS-1</code>. (There may be an implementation-specific upper
|
||||
limit on the valid value of pair, but any such limit is at least 63.) Valid
|
||||
values for f and b are the range from 0 to and including <code>COLORS-1</code>.</p>
|
||||
</blockquote>
|
||||
<p>The manpage for <code>init_pair()</code> says this:</p>
|
||||
<pre><code> These limits apply to color values and color pairs. Values outside these limits are not legal, and may result in a runtime error:
|
||||
|
||||
[...]
|
||||
|
||||
COLOR_PAIRS corresponds to the terminal database's max_pairs capability, (see terminfo(5)).</code></pre>
|
||||
<blockquote>
|
||||
<p>These limits apply to color values and color pairs. Values outside these
|
||||
limits are not legal, and may result in a runtime error:</p>
|
||||
<p>[…]</p>
|
||||
<p><code>COLOR_PAIRS</code> corresponds to the terminal database’s <code>max_pairs</code> capability,
|
||||
(see <code>terminfo(5)</code>).</p>
|
||||
</blockquote>
|
||||
<p>Based on the two as well as the fact that monochrome terminals (I’ve tried under
|
||||
both Linux and macOS) seem to work fine I believe I am fine here too. And to
|
||||
confirm this I wrote the following code with the output below:</p>
|
||||
|
||||
+17
-22
@@ -191,14 +191,12 @@ even just the `reset` command.
|
||||
|
||||
The Linux man page says:
|
||||
|
||||
```
|
||||
You might have to run the `reset` tool like:
|
||||
|
||||
<LF>reset<LF>
|
||||
|
||||
(the line-feed character is normally control-J) to get the terminal
|
||||
to work, as carriage-return may no longer work in the abnormal state.
|
||||
```
|
||||
> You might have to run the `reset` tool like:
|
||||
>
|
||||
> <LF>reset<LF>
|
||||
>
|
||||
> (the line-feed character is normally control-J) to get the terminal to work,
|
||||
as carriage-return may no longer work in the abnormal state.
|
||||
|
||||
If you don't have the reset utility you can try:
|
||||
|
||||
@@ -305,23 +303,20 @@ support in the source code itself.
|
||||
|
||||
According to X/Open Curses, Issue 7 (pg. 57):
|
||||
|
||||
```
|
||||
With init_pair() and pair_content(), the value of pair must be in a range
|
||||
from 0 to and including COLOR_PAIRS-1. (There may be an
|
||||
implementation-specific upper limit on the valid value of pair, but any such
|
||||
limit is at least 63.) Valid values for f and b are the range from 0 to and
|
||||
including COLORS-1.
|
||||
```
|
||||
> With `init_pair()` and `pair_content()`, the value of pair must be in a range from
|
||||
0 to and including `COLOR_PAIRS-1`. (There may be an implementation-specific upper
|
||||
limit on the valid value of pair, but any such limit is at least 63.) Valid
|
||||
values for f and b are the range from 0 to and including `COLORS-1`.
|
||||
|
||||
The manpage for `init_pair()` says this:
|
||||
|
||||
```
|
||||
These limits apply to color values and color pairs. Values outside these limits are not legal, and may result in a runtime error:
|
||||
|
||||
[...]
|
||||
|
||||
COLOR_PAIRS corresponds to the terminal database's max_pairs capability, (see terminfo(5)).
|
||||
```
|
||||
> These limits apply to color values and color pairs. Values outside these
|
||||
limits are not legal, and may result in a runtime error:
|
||||
>
|
||||
> [...]
|
||||
>
|
||||
> `COLOR_PAIRS` corresponds to the terminal database's `max_pairs` capability,
|
||||
(see `terminfo(5)`).
|
||||
|
||||
Based on the two as well as the fact that monochrome terminals (I've tried under
|
||||
both Linux and macOS) seem to work fine I believe I am fine here too. And to
|
||||
|
||||
Reference in new issue
Block a user