Update thanks for 1990/dg + format README.md

I had never put my name in the README.md file so this was not in the
thanks file either. This has been corrected.

Format fixed the README.md file.

Plus add -Wno-implicit-int to the CSILENCE in the Makefile.
This commit is contained in:
Cody Boone Ferguson committed 2023-10-21 11:05:34 -07:00
1 parent 9046857b91
commit 86d9cd69f7
4 files changed
+38 -14

No files matched your search

+1 -1
View File
@@ -38,7 +38,7 @@ include ../../var.mk
# Common C compiler warnings to silence # Common C compiler warnings to silence
# #
CSILENCE= -Wno-invalid-pp-token -Wno-strict-prototypes CSILENCE= -Wno-invalid-pp-token -Wno-strict-prototypes -Wno-implicit-int
# Common C compiler warning flags # Common C compiler warning flags
# #
+15 -13
View File
@@ -49,23 +49,25 @@ which we have done for the wider audience.
If my preprocessor could hack it, I could write this as one single line rather If my preprocessor could hack it, I could write this as one single line rather
than 4, but when I do that I get a complaint "defines nested too deeply". than 4, but when I do that I get a complaint "defines nested too deeply".
Spoiler: (rot13 to read) ### Obfuscation spoiler:
Guvf vf nabgure ebg13 wbo (oryvrir vg be abg) - gur #qrsvarf ner n This is another rot13 job (believe it or not) - the `#defines` are a
abiry jnl bs nqqvat gbxraf: '#qrsvar o12(k) 12 k' zrnaf gung ng novel way of adding tokens: `#define b12(x) 12 x` means that at
fbzr cbvag va gur fbhepr n 12 vf sbyybjrq ol gur pbzcerffrq arfgrq some point in the source a `12` is followed by the compressed nested
qrsvarf. Gur o12 trgf gur cerivbhf pbzcerffvba nf na nethzrag, naq `#define`s. The `b12` gets the previous compression as an argument, and
cercraqf gur 12, guhf znxvat nabgure fgrc va gur erperngvba bs gur prepends the `12`, thus making another step in the recreation of the
fbhepr. Gur nkk() qrsvarf qb gur fnzr, ohg nqq gbxraf nsgre. source. The `axx()` `#define`s do the same, but add tokens after.
Nf sbe gur ebg13 nytbevguz, vg eryvrf ba vaqrk() gb svaq vs gur As for the rot13 algorithm, it relies on `index(3)` to find if the
punenpgre vf va gur frg N-Mn-m. y[] vf na neenl gung trgf svyyrq character is in the set `A-Za-z`. `l[]` is an array that gets filled
jvgu: with:
"abcdefghijklmmmmnopqrstuvwxyzzzzABCDEFGHIJKLMMMMNOPQRSTUVWXYZZZZ" ```
"nopqrstuvwxyzzzzabcdefghijklmmmmNOPQRSTUVWXYZZZZABCDEFGHIJKLMMMM"
```
Vs vaqrk() fnlf gur pune vf va gur nycunorg, gura kbe gur bssfrg If `index(3)` says the char is in the alphabet, then XOR the offset
jvgu 16 gb genafyngr, naq bhgchg, bgurejvfr cnff vg hapunatrq. with `16` to translate, and output, otherwise pass it unchanged.
## Copyright and CC BY-SA 4.0 License: ## Copyright and CC BY-SA 4.0 License:
+2
View File
@@ -1,5 +1,7 @@
#include <stdio.h> #include <stdio.h>
#define d define
#define b12(x) 12 x #define b12(x) 12 x
#define a13(x) x 13 #define a13(x) x 13
#define a16(x) x 16 #define a16(x) x 16
+20
View File
@@ -661,6 +661,26 @@ links and the user executes does that make the compiler the jury, the linker the
judge and user the executioner? :-) judge and user the executioner? :-)
## [1990/dg](1990/dg/dg.c) ([README.md](1990/dg/README.md]))
Cody fixed this for modern systems. There were two problems to be resolved.
One can no longer do:
```c
#define d define
#d b12(x) 12 x
/* etc. */
```
so the use of `#d` is now instead `#define` (the macro was originally deleted
but later Cody added it back to make it more like the original).
The second problem was suggested by the judges at the time of judging, to do
with if the C preprocessor botches single quotes in cpp expansion.
## [1990/dds](1990/dds/dds.c) ([README.md](1990/dds/README.md])) ## [1990/dds](1990/dds/dds.c) ([README.md](1990/dds/README.md]))
Yusuke and Cody in conjunction fixed this for modern systems (both fixed a Yusuke and Cody in conjunction fixed this for modern systems (both fixed a