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:
1 parent
9046857b91
commit
86d9cd69f7
4 files changed
+38
-14
No files matched your search
+1
-1
@@ -38,7 +38,7 @@ include ../../var.mk
|
||||
|
||||
# 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
|
||||
#
|
||||
|
||||
+15
-13
@@ -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
|
||||
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
|
||||
abiry jnl bs nqqvat gbxraf: '#qrsvar o12(k) 12 k' zrnaf gung ng
|
||||
fbzr cbvag va gur fbhepr n 12 vf sbyybjrq ol gur pbzcerffrq arfgrq
|
||||
qrsvarf. Gur o12 trgf gur cerivbhf pbzcerffvba nf na nethzrag, naq
|
||||
cercraqf gur 12, guhf znxvat nabgure fgrc va gur erperngvba bs gur
|
||||
fbhepr. Gur nkk() qrsvarf qb gur fnzr, ohg nqq gbxraf nsgre.
|
||||
This is another rot13 job (believe it or not) - the `#defines` are a
|
||||
novel way of adding tokens: `#define b12(x) 12 x` means that at
|
||||
some point in the source a `12` is followed by the compressed nested
|
||||
`#define`s. The `b12` gets the previous compression as an argument, and
|
||||
prepends the `12`, thus making another step in the recreation of the
|
||||
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
|
||||
punenpgre vf va gur frg N-Mn-m. y[] vf na neenl gung trgf svyyrq
|
||||
jvgu:
|
||||
As for the rot13 algorithm, it relies on `index(3)` to find if the
|
||||
character is in the set `A-Za-z`. `l[]` is an array that gets filled
|
||||
with:
|
||||
|
||||
"abcdefghijklmmmmnopqrstuvwxyzzzzABCDEFGHIJKLMMMMNOPQRSTUVWXYZZZZ"
|
||||
```
|
||||
"nopqrstuvwxyzzzzabcdefghijklmmmmNOPQRSTUVWXYZZZZABCDEFGHIJKLMMMM"
|
||||
```
|
||||
|
||||
Vs vaqrk() fnlf gur pune vf va gur nycunorg, gura kbe gur bssfrg
|
||||
jvgu 16 gb genafyngr, naq bhgchg, bgurejvfr cnff vg hapunatrq.
|
||||
If `index(3)` says the char is in the alphabet, then XOR the offset
|
||||
with `16` to translate, and output, otherwise pass it unchanged.
|
||||
|
||||
## Copyright and CC BY-SA 4.0 License:
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#define d define
|
||||
|
||||
#define b12(x) 12 x
|
||||
#define a13(x) x 13
|
||||
#define a16(x) x 16
|
||||
|
||||
@@ -661,6 +661,26 @@ links and the user executes does that make the compiler the jury, the linker the
|
||||
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]))
|
||||
|
||||
Yusuke and Cody in conjunction fixed this for modern systems (both fixed a
|
||||
|
||||
Reference in new issue
Block a user