Add 2006/birken/try.sh, bugs.md, format/typo check
The try.sh runs the program on all the tofu input files, prompting the user to press a key before running each one so they have time to look at the output of the previous one. The README.md file format and typo checked. This should complete 2006/birken except that it uses gets(), not fgets(), which has been added to the bugs.md file. I almost got it to work but it crashes with computer.tofu so I did not change it. Will look at this later, maybe, but the bugs.md has a diff of the single change that almost works. I did not have the time to write where it fails but I do happen to know at least the end result.
This commit is contained in:
1 parent
e9ffd327d6
commit
8231e28567
4 files changed
+108
-13
No files matched your search
@@ -2305,6 +2305,23 @@ used decimal mode, or any of the "undocumented" instructions.
|
||||
# 2006
|
||||
|
||||
|
||||
## 2006 birken
|
||||
|
||||
### STATUS: uses gets() - change to fgets() if possible
|
||||
### Source code: [2006/birken/birken.c](2006/birken/birken.c)
|
||||
### Information: [2006/birken/README.md](2006/birken/README.md)
|
||||
|
||||
This entry uses `gets(3)` which is unsafe and provides annoying warnings, most
|
||||
obnoxious in macOS as it shows it at runtime (redirecting `stderr` to
|
||||
`/dev/null` will silence it). The following diff will almost work but it crashes
|
||||
with at least `computer.tofu` input file:
|
||||
|
||||
```diff
|
||||
12a13
|
||||
#define gets(c) fgets((c),PI,stdin)&&(((c)[strlen((c))-1]='\0'),c!=NULL)
|
||||
```
|
||||
|
||||
|
||||
## 2006 borsanyi
|
||||
|
||||
### STATUS: INABIAF - please **DO NOT** fix
|
||||
|
||||
Reference in new issue
Block a user