improve how markdown code language is commented
We added a space between the markdown triple code mark and language that was enclosed in HTML comments. So a line of the form: ```` ```<!---c---> ```` became: ```` ``` <!---c---> ```` This was done to **help** some code see that the HTML comment string was not a markdown code specifier. Not all code understands this after this changed. For example, `pandoc(1)` still forms HTML classes of the form "<!---c-->" when it encounters the above mentioned change. We also fixed a problem with `2019/dogon/README.md` regarding a markdown code block. We also fixed a problem with `2020/yang/README.md` regarding a markdown code block.
This commit is contained in:
1 parent
c549f6585e
commit
3ddbac9e6b
357 files changed
+2432
-2399
No files matched your search
@@ -1,6 +1,6 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
@@ -21,7 +21,7 @@ For more detailed information see [1990 baruch bugs](../../bugs.html#1990_baruch
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
echo 4 | ./baruch
|
||||
echo 7 | ./baruch
|
||||
```
|
||||
@@ -29,7 +29,7 @@ For more detailed information see [1990 baruch bugs](../../bugs.html#1990_baruch
|
||||
|
||||
## Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
@@ -47,7 +47,7 @@ question. YMMV.
|
||||
|
||||
### Alternate build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make alt
|
||||
```
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./cmills [starting_cash]
|
||||
```
|
||||
|
||||
|
||||
## Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./cmills 5000
|
||||
```
|
||||
|
||||
|
||||
+3
-3
@@ -1,13 +1,13 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./dds
|
||||
```
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
Give the following lines as input:
|
||||
|
||||
```<!---basic-->
|
||||
``` <!---basic-->
|
||||
OLD LANDER.BAS
|
||||
RUN
|
||||
```
|
||||
|
||||
+6
-6
@@ -1,20 +1,20 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
echo foo bar | ./dg
|
||||
```
|
||||
|
||||
|
||||
## Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
@@ -24,13 +24,13 @@
|
||||
Some C preprocessors got confused about single quotes in certain cases.
|
||||
In particular, the following source line:
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
b12(ase(bco(acp(bi(acp(bcp(acp(bpl(aqu(bqu(A))))))))))))))))))))))))))))))
|
||||
```
|
||||
|
||||
sometimes has to be changed to:
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
b12(ase(bco(acp(bi(acp(bcp(acp(bpl('A'))))))))))))))))))))))))))))
|
||||
```
|
||||
|
||||
@@ -56,7 +56,7 @@ 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:
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
"nopqrstuvwxyzzzzabcdefghijklmmmmNOPQRSTUVWXYZZZZABCDEFGHIJKLMMMM"
|
||||
```
|
||||
|
||||
|
||||
+6
-6
@@ -1,6 +1,6 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
To test the official C entry, one might try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
echo "Quartz glyph jocks vend, fix, BMW." | compress | ./btoa | ./jaw
|
||||
```
|
||||
|
||||
@@ -19,7 +19,7 @@ sentence.
|
||||
|
||||
#### Also try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
@@ -39,14 +39,14 @@ it to 1530 bytes) which implements the complete shark utility. The script,
|
||||
The sender must have `compress` and `btoa`. To send, try:
|
||||
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./shark.sh jaw.* README.md > receive
|
||||
```
|
||||
|
||||
The resulting file, `receive`, unpacks the input files
|
||||
even if the receiver lacks `uncompress` and `btoa`:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
mkdir -p test
|
||||
cd test
|
||||
sh ../receive
|
||||
@@ -168,7 +168,7 @@ Construct `sharkmail`, to auto-split `sharkives` into mailable segments and mail
|
||||
them. Here's a simple one, which could be extended to enable auto-reassembly
|
||||
with one shell cmd at the far end.
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
#!/bin/sh
|
||||
m=$1; shift
|
||||
shark $* | split -800 - /tmp/shark$$
|
||||
|
||||
+6
-6
@@ -1,6 +1,6 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
@@ -11,7 +11,7 @@ that can be used if your compiler is incapable of compiling `X=g()...` in
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./pjr
|
||||
```
|
||||
|
||||
@@ -22,7 +22,7 @@ Note that some compilers will be unable to compile the expression `X=g()...` in
|
||||
`main()` due to lack of temporary stack space. One might want to try replacing
|
||||
`main()` with:
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
main(){X=s().v().o().o().l().S().d().l().i().o().w().N();}
|
||||
```
|
||||
|
||||
@@ -34,14 +34,14 @@ well.
|
||||
|
||||
### Alternate build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make alt
|
||||
```
|
||||
|
||||
|
||||
### Alternate use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./pjr.alt
|
||||
```
|
||||
|
||||
@@ -74,7 +74,7 @@ opposite:
|
||||
|
||||
To encode a new string input the string as it is meant to come out:
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
X=s().v().o().o().l().S().d().l().i().o().w().N();
|
||||
```
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./scjones
|
||||
```
|
||||
|
||||
|
||||
## Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
|
||||
+3
-3
@@ -1,19 +1,19 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
NOTE: that's not a typo or mistake but one can also do:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./o
|
||||
```
|
||||
|
||||
|
||||
+9
-9
@@ -1,6 +1,6 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
@@ -25,7 +25,7 @@ In 2023 it was noticed that in some systems like macOS there was confusing
|
||||
output due to a warning at runtime that was interspersed with the output of the
|
||||
program. For instance it would show:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./tbr
|
||||
$ warning: this program uses gets(), which is unsafe.
|
||||
```
|
||||
@@ -40,7 +40,7 @@ below, in the [alternate version](#alternate-code) section.
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./tbr
|
||||
$ enter some shell commands
|
||||
```
|
||||
@@ -54,7 +54,7 @@ just `exit` or `logout`? Hint: see the authors' remarks.
|
||||
|
||||
## Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./tbr
|
||||
$ ls -l tbr tbr.c
|
||||
|
||||
@@ -79,7 +79,7 @@ documented, are not considered bugs as such in the context of the contest.
|
||||
The authors supplied us with a slightly smaller unformatted version
|
||||
of the program which we include below:
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
#define D ,close(
|
||||
char*c,q[512],m[256],*v[99],**u,*i[3];int f[2],p;main(){for(m[m[60]=m[62]=
|
||||
32]=m[*m=124[m]=9]=6;e(-8),gets(1+(c=q))||(exit(0),0);r(0,0))for(;*++c;);}
|
||||
@@ -99,14 +99,14 @@ equivalent like the authors intended.
|
||||
|
||||
### Alternate build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make alt
|
||||
```
|
||||
|
||||
|
||||
### Alternate use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./tbr.alt
|
||||
```
|
||||
|
||||
@@ -165,13 +165,13 @@ argument is stolen every time a `>` or `<` is encountered. The
|
||||
shell flags an error if no arguments are on the stack. Thus, for
|
||||
example:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
cat > foo > bar
|
||||
```
|
||||
|
||||
cats to `foo`, since it was pushed last, but
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
cat > > foo bar
|
||||
```
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
@@ -18,7 +18,7 @@ For more detailed information see [1990 theorem bugs](../../bugs.html#1990_theor
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./theorem expression x1 x2 h y1
|
||||
```
|
||||
|
||||
@@ -35,7 +35,7 @@ where:
|
||||
|
||||
## Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
@@ -62,7 +62,7 @@ left to right. (i.e., parenthesis aren't supported).
|
||||
|
||||
Try running the program with the following args:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./theorem y 0 1 0.1 1
|
||||
./theorem 1/x 1 2 0.1 0
|
||||
./theorem 'x^2/y+x' 0 1 0.1 6
|
||||
@@ -71,14 +71,14 @@ Try running the program with the following args:
|
||||
But wait, there is more! You also get, free of charge, a
|
||||
reversing filter! Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./theorem -r 0 0 0 0 < theorem.c > sorter.c
|
||||
```
|
||||
|
||||
Still not impressed? The author throws in for free, a
|
||||
sort program! Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make sorter
|
||||
ls | ./sorter
|
||||
```
|
||||
@@ -87,14 +87,14 @@ This program is safe for home use as well. The author has
|
||||
included a safety feature in case you misplace the original
|
||||
program source:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./sorter -r 0 0 0 0 < sorter.c > theorem_bkp.c
|
||||
```
|
||||
|
||||
And finally, as a special offer to users of this entry,
|
||||
the author provides a Fibonacci sequence generator! Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./sorter 0 0 0 0 < theorem.c > fibonacci.c
|
||||
make fibonacci
|
||||
./fibonacci 1 1
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./westley <number>
|
||||
```
|
||||
|
||||
@@ -16,7 +16,7 @@ The number should be greater than 0.
|
||||
|
||||
## Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
@@ -30,14 +30,14 @@ The alternate code is provided to show how C changed.
|
||||
|
||||
If you have an old enough compiler try and to see how C has changed over the years:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make alt
|
||||
```
|
||||
|
||||
|
||||
### Alternate use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./westley.alt <number>
|
||||
```
|
||||
|
||||
|
||||
Reference in new issue
Block a user