Format fix 2012/zeitak/README.md

This commit is contained in:
Cody Boone Ferguson committed 2023-05-04 06:46:07 -07:00
1 parent f05d4a3533
commit 3b0e5d8e22
1 file changed
+19 -16
+19 -16
View File
@@ -15,8 +15,8 @@ make
./zeitak < file.c ./zeitak < file.c
``` ```
where file.c is the file to be checked for nesting errors. For example, you may where `file.c` is the file to be checked for nesting errors. For example, you may
try incorrect.c and the program itself. try [incorrect.c](incorrect.c) and the program itself.
## Try: ## Try:
@@ -25,10 +25,13 @@ try incorrect.c and the program itself.
./zeitak < incorrect.c ./zeitak < incorrect.c
``` ```
NOTE: it prints an error and exits on the first nesting error so it will not
detect multiple issues!
### Alternate code ### Alternate code
An alternate version of this entry, `zeitak.alt.c`, is provided. An alternate version of this entry, [zeitak.alt.c](zeitak.alt.c), is provided.
The file `zeitak.alt.c` provides a version that has been slightly The file [zeitak.alt.c](zeitak.alt.c) provides a version that has been slightly
deobfuscated. You may find reading that file helpful in your attempt deobfuscated. You may find reading that file helpful in your attempt
to understand this extremely subtle entry. to understand this extremely subtle entry.
@@ -40,13 +43,14 @@ make alt
Use `zeitak.alt` as you would `zeitak` above. Use `zeitak.alt` as you would `zeitak` above.
## Judges' remarks ## Judges' remarks:
This is an extremely subtle and twisted piece of Gold award winning code! This is an extremely subtle and twisted piece of Gold award winning code!
The judges had spent a considerable amount of time analyzing this entry. The judges had spent a considerable amount of time analyzing this entry.
At one point we spent At one point we spent
[18 minutes](https://twitter.com/ioccc/status/252162898800033792) [18
minutes](https://web.archive.org/web/20130925190722/https://twitter.com/ioccc/status/252162898800033792)
just to understand 18 key characters of this code. just to understand 18 key characters of this code.
## Author's remarks ## Author's remarks
@@ -58,8 +62,8 @@ just to understand 18 key characters of this code.
As you have probably understood by looking at the source\*, this program has As you have probably understood by looking at the source\*, this program has
something to do with parenthesis (and equality of opening and closing something to do with parenthesis (and equality of opening and closing
parenthesis, if you look close enough). It goes over the file given to it and parenthesis, if you look close enough). It goes over the file given to it and
checks that every opening (, [, or { has a matching closing one and checks that every opening `(`, `[`, or `{` has a matching closing one and
vice versa. It also checks that every " or ' is closed. vice versa. It also checks that every `"` or `'` is closed.
If an error is detected, an error message will be printed. If the problem If an error is detected, an error message will be printed. If the problem
is a superfluous closing bracket, it will even print a few characters is a superfluous closing bracket, it will even print a few characters
@@ -74,7 +78,7 @@ around it's position.
printf(")"); printf(")");
* Doesn't get confused by the 1984/anonymous entry! * Doesn't get confused by the [1984/anonymous](/1984/anonymous/anonymous.c) entry!
#### Mis-Features #### Mis-Features
@@ -92,14 +96,14 @@ even more limited source, that is:
* Without any digits. * Without any digits.
* Without any character constants. * Without any character constants.
* Without using functions from headers other than stdio. * Without using functions from headers other than stdio.
* Without any control-flow keywords (not even the ?: operator). * Without any control-flow keywords (not even the `?:` operator).
* Without any arithmetic or logic operators! * Without any arithmetic or logic operators!
So, what's left? Parenthesis, and lots of them, as looking at the source will So, what's left? Parenthesis, and lots of them, as looking at the source will
reveal immediately. The main obfuscation is building the whole algorithm using reveal immediately. The main obfuscation is building the whole algorithm using
only function calls, typecasts, array lookups and pointer operators. only function calls, typecasts, array lookups and pointer operators.
Additional obfuscations include: ##### Additional obfuscations include:
* Extensive reuse of identifiers: Macros share names with variables, inner * Extensive reuse of identifiers: Macros share names with variables, inner
curly braces scopes contain variables with names identical to those in the curly braces scopes contain variables with names identical to those in the
@@ -109,16 +113,15 @@ Additional obfuscations include:
* Mostly one-letter identifiers. * Mostly one-letter identifiers.
* Complex recursion: A function might call itself once, twice, or not at all. * Complex recursion: A function might call itself once, twice, or not at all.
#### Compilation/Running Notes #### Compilation/Portability/Running Notes
* The program requires `char` to be one byte and pointers to be * The program requires `char` to be one byte and pointers to be
at least two bytes long. at least two bytes long.
* The program was tested on the following platforms: * The program was tested on the following platforms:
- Ubuntu 9.04 32-bit with GCC
** Ubuntu 9.04 32-bit with GCC - Windows 7 32-bit with GCC
** Windows 7 32-bit with GCC - Windows 7 32-bit with OpenWatcom
** Windows 7 32-bit with OpenWatcom
## Copyright and CC BY-SA 4.0 License: ## Copyright and CC BY-SA 4.0 License: