Merge pull request #1661 from xexyl/duble2015-fmt

Further format fixes in 2015/duble
This commit is contained in:
Landon Curt Noll authored and GitHub committed 2023-12-08 04:18:27 -08:00
commit 6bd0237fa2
1 file changed
+14 -8
+14 -8
View File
@@ -25,7 +25,7 @@ echo Some text | ./prog
## Alternate code: ## Alternate code:
This alternate code, provided by the author, is discussed in more detail by the This alternate code, provided by the author, is discussed in more detail by the
author in the 'prog.c vs prog.alt.c' section of their remarks. author in the '[prog.c](prog.c) vs [prog.alt.c](prog.alt.c)' section of their remarks.
### Alternate build: ### Alternate build:
@@ -63,13 +63,15 @@ blasphemous. When I was fighting to make this program work, I started
wondering if it was not the reason for its very erratic behaviour. wondering if it was not the reason for its very erratic behaviour.
### prog.c vs prog.alt.c ### [prog.c](prog.c) vs [prog.alt.c](prog.alt.c)
The file `prog.alt.c` is the one I submitted. The file [prog.alt.c](prog.alt.c) is the one I submitted.
[Gil Dogon](/winners.html#Gil_Dogon) noted a few unsafe statements (statements [Gil Dogon](/winners.html#Gil_Dogon) noted a few unsafe statements (statements
whose behaviour is undefined in the C standard and, as such, could cause issues whose behaviour is undefined in the C standard and, as such, could cause issues
with other compilers or optimization levels). These have been fixed in `prog.c`. with other compilers or optimization levels). These have been fixed in
[prog.c](prog.c).
After this fix, in order to remain rule-2-compliant, a variable name has also After this fix, in order to remain rule-2-compliant, a variable name has also
been shortened in this file. been shortened in this file.
@@ -107,6 +109,7 @@ configuration was needed.
I also tested it on FreeBSD 9.3 32bits (font and encoding configuration was I also tested it on FreeBSD 9.3 32bits (font and encoding configuration was
needed in this case). needed in this case).
#### Basic mode: #### Basic mode:
```sh ```sh
@@ -117,6 +120,7 @@ $ ./prog < lorem-ipsum.txt
[... rendering ...] [... rendering ...]
``` ```
#### Interactive mode: #### Interactive mode:
```sh ```sh
@@ -126,6 +130,7 @@ $ ./prog
> >
``` ```
### Obfuscation: ### Obfuscation:
This entry is obfuscated in various ways: This entry is obfuscated in various ways:
@@ -158,6 +163,7 @@ encoded in macro `O_o` at the top of the source file.
### Limitations: ### Limitations:
#### Charset #### Charset
In order to comply with the size rule, I encoded only a part of the visible ASCII In order to comply with the size rule, I encoded only a part of the visible ASCII
@@ -167,9 +173,9 @@ chars:
a-z, A-Z, '.' ':' ',' ';' '!' and '?'. a-z, A-Z, '.' ':' ',' ';' '!' and '?'.
``` ```
Uppercase and lowercase chars are rendered the same. The program also understand Uppercase and lowercase chars are rendered the same. The program also
the space and the linefeed (`\n`). Other chars are simply ignored (most of the understands space and linefeed (`\n`). Other chars are simply ignored (most of
time ;) the time ;)
#### Stack size #### Stack size
@@ -206,7 +212,7 @@ you are curious. :)
#### A 'draft' mode #### A 'draft' mode
Defining an environment variable called DRAFT will enable the 'draft-mode'. Defining an environment variable called `DRAFT` will enable the 'draft-mode'.
Try for example: Try for example:
```sh ```sh