Format fixes in 1990/dg/README.md

This commit is contained in:
Cody Boone Ferguson committed 2023-04-09 05:00:24 -07:00
1 parent 138764caf8
commit 8ba53b5eb4
1 file changed
+24 -15
+24 -15
View File
@@ -1,44 +1,53 @@
# Best Abuse of the C Preprocessor # Best Abuse of the C Preprocessor
David Goodenough David Goodenough
anonymous organization anonymous organization
541 Commonwealth Ave, 541 Commonwealth Ave
Newton, MA 02159 Newton, MA 02159
USA USA
## To build: ## To build:
make all ```sh
make all
```
## To run: ## To run:
echo foo bar | ./dg ```sh
echo foo bar | ./dg
```
## Try: ## Try:
echo "to C or not to C" | ./dg ```sh
echo "to C or not to C" | ./dg
```
## Judges' comments: ## Judges' comments:
Some C preprocessors got confused about single quotes in certain cases. Some C preprocessors got confused about single quotes in certain cases.
In particular, the following source line: In particular, the following source line:
b12(ase(bco(acp(bi(acp(bcp(acp(bpl(aqu(bqu(A)))))))))))))))))))))))))))))) ```c
b12(ase(bco(acp(bi(acp(bcp(acp(bpl(aqu(bqu(A))))))))))))))))))))))))))))))
```
sometimes has to be changed to: sometimes has to be changed to:
b12(ase(bco(acp(bi(acp(bcp(acp(bpl('A')))))))))))))))))))))))))))) ```c
b12(ase(bco(acp(bi(acp(bcp(acp(bpl('A'))))))))))))))))))))))))))))
```
if the C preprocessor botches single quotes in cpp expansions, which we have particularly if the C preprocessor botches single quotes in cpp expansions,
done for the wider audience. which we have done for the wider audience.
## Author's comments: ## Author's comments:
If my preprocessor could hack it, I could write this as one single If my preprocessor could hack it, I could write this as one single line rather
line rather than 4, but when I do that I get a complaint "defines than 4, but when I do that I get a complaint "defines nested too deeply".
nested too deeply".
Spoiler: (rot13 to read) Spoiler: (rot13 to read)