Files
ioccc/1988/litmaath/README.md
T
Landon Curt Noll 4ee4c731f7 convert markdown copyright TAB chars into SPACE chars
While not strictly necessary, replacing the two ASCII tab characters
in the markdown copyright comment makes it easier to detect problematic
TAB indentation within markdown files.

After this commit, only 90 markdown files have leading ASCII TAB
characters.  And again, while not strictly necessary, we can consider
running expand on those 90 markdown files to see what effect that
might have on the HTML files they produce.

Replace leading ASCII TAB characters with multiples of 8 ASCII SPACE
characters (the default action of the `expand(1)` tool) might have
an negative effect on some HTML formatting where **hack-a-round**
formatting was attempted to fix broken indentation caused by
problematic ASCII TAB characters.

Think of this as a baseline for evaluating leading
TAB characters within markdown files.

TODO: Consider either using `expand(1)` to replace leading ASCII
TAB characters with multiples of 8 ASCII SPACE characters AND/OR
modifying the appropriate `bin` tool to convert leading ASCII TAB
characters into multiples of 8 ASCII SPACE characters.
2024-06-22 22:15:25 -07:00

1.8 KiB

To build:

    make

To use:

    ./litmaath some text

There is an alternate version provided. See the Alternate code section below.

Try:

    ./litmaath eschew obfuscation

Alternate code:

This alternate code, added to help understand the entry and for fun, is code that we suggested at the time of the entry publication but which we never put in a file.

Alternate build:

    make alt

Use litmaath.alt as you would litmaath above.

Alternate try:

    ./litmaath.alt six was afraid of seven because seven eight nine

Judges' remarks:

Note the unusual structure:

    while (<condition>)
	 ;

Did you notice that the body is empty?

Furthermore, it's interesting to note that only two variables are used to achieve everything.

The best one can do to understand how the program works is to give it two small strings as arguments, and follow the program closely. One could make the body of the while loop an fprintf with interesting variables like:

    fprintf(stderr,
	 "argv=%lo *argv=%lo **argv=%c argv[1]=%lo *argv[1]=%c argc=%d\n",
	 (long) argv, (long) *argv, *argv && **argv ? **argv : '@',
	 (long) argv[1], argv[1] && *argv[1] ? *argv[1] : '@', argc);

... which is what the alternate code is.

Author's remarks:

No remarks were provided by the author.