Format fix 2000/schneiderwent/README.md

This commit is contained in:
Cody Boone Ferguson committed 2023-04-20 12:35:23 -07:00
1 parent e6dfaf0d52
commit 43d4057682
1 file changed
+27 -27
+27 -27
View File
@@ -19,8 +19,11 @@ make
```sh ```sh
./schneiderwent schneiderwent.data ./schneiderwent schneiderwent.data
./schneiderwent
``` ```
What's the difference?
## Judges' remarks: ## Judges' remarks:
Very nice play by the rules and portable text obfuscation. Very nice play by the rules and portable text obfuscation.
@@ -35,46 +38,43 @@ keeping the program portable between different encodings
This entry displays the current time to the console, for example: This entry displays the current time to the console, for example:
it's just after ten 'til 6 in the evening > it's just after ten 'til 6 in the evening
FWIW, none of the compilers with which this entry was tested issued FWIW, none of the compilers with which this entry was tested issued
any warnings or errors in compiling the source for this entry. No any warnings or errors in compiling the source for this entry. No
doubt lint will complain about the goto statements. doubt lint will complain about the goto statements.
The schneiderwent.data file consists of the values used by multiple The [schneiderwent.data](schneiderwent.data) file consists of the values used by
table lookups. This is simply good program design, separating multiple table lookups. This is simply good program design, separating these
these values from the source code allows changing the behavior of values from the source code allows changing the behavior of the application
the application without recompiling. without recompiling.
Having learned COBOL at an early age, the pthreads of my thought Having learned COBOL at an early age, the `pthread`s of my thought
processes tend to be translated into code in a verbose manner. Some processes tend to be translated into code in a verbose manner. Some
of the #defines in this entry's code are to mitigate this personal of the `#define`s in this entry's code are to mitigate this personal
deficiency. deficiency.
### Obfuscation
Obfuscation in this entry consists of: Obfuscation in this entry consists of:
* printfing console messages stored as EBCDIC character values - this is not an * `printf()`ing console messages stored as EBCDIC character values - this is not
attempt at encryption, but rather at cross platform compatibility an attempt at encryption, but rather at cross platform compatibility.
* ASCII character values are calculated from the EBCDIC in a particularly ugly * ASCII character values are calculated from the EBCDIC in a particularly ugly
abuse of the '?' operator abuse of the '?' operator.
* detection of whether to print the ASCII or EBCDIC values is done by taking the * Detection of whether to print the ASCII or EBCDIC values is done by taking the
remainder of dividing the character 'J' by 2 - the ASCII value of the character remainder of dividing the character `'J'` by `2` - the ASCII value of the
is even, the EBCDIC value is odd character is even, the EBCDIC value is odd.
* The messages to be `printf`ed are determined via multiple table lookups and
* the messages to be printfed are determined via multiple table lookups and bit-masked values.
bitmasked values * For minutes, the bit position turned on is multiplied by two to determine the
message to be `printf`ed.
* for minutes, the bit position turned on is multiplied by two to determine the * For hours, the straight bit position is used.
message to be printfed * This entry mostly eschews function calls for the often overlooked
setjmp/longjmp combination.
* for hours, the straight bit position is used * The trigraphs are not there as obfuscation nor are they there to annoy the
* this entry mostly eschews function calls for the often overlooked
setjmp/longjmp combination
* the trigraphs are not there as obfuscation nor are they there to annoy the
judges - it's just the easiest way to get around the absence of square brackets judges - it's just the easiest way to get around the absence of square brackets
in a normal 3270 environment in a normal 3270 environment.
## Copyright and CC BY-SA 4.0 License: ## Copyright and CC BY-SA 4.0 License: