Fix 1984/laman if no arg specified
As the definition of INABIAF changed, again, and since it took no more than ten seconds to fix, I have fixed this entry. As the thanks file was updated for this some other things that had been left out were also fixed at the same time as these were already in the file but not committed. There was also a typo fix in there.
This commit is contained in:
1 parent
8b71dd0d4f
commit
9f4f0981e0
4 files changed
+27
-39
No files matched your search
@@ -10,17 +10,6 @@ make all
|
||||
```
|
||||
|
||||
|
||||
### Bugs and (Mis)features
|
||||
|
||||
The current status of this entry is:
|
||||
|
||||
```
|
||||
STATUS: known bug - please help us fix
|
||||
```
|
||||
|
||||
For more detailed information see [1984 laman in bugs.md](/bugs.md#1984-laman).
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
a[900]; b;c;d=1 ;e=1;f; g;h;O; main(k,
|
||||
l)char* *l;{g= atoi(* ++l); for(k=
|
||||
l)char* *l;{if(k>1) {g=atoi(* ++l); for(k=
|
||||
0;k*k< g;b=k ++>>1) ;for(h= 0;h*h<=
|
||||
g;++h); --h;c=( (h+=g>h *(h+1)) -1)>>1;
|
||||
while(d <=g){ ++O;for (f=0;f< O&&d<=g
|
||||
@@ -9,4 +9,4 @@ while(d <=g){ ++O;for (f=0;f< O&&d<=g
|
||||
b){if(b <k/2)a[ b<<5|c] ^=a[(k -(b+1))
|
||||
<<5|c]^= a[b<<5 |c]^=a[ (k-(b+1 ))<<5|c]
|
||||
;printf( a[b<<5|c ]?"%-4d" :" " ,a[b<<5
|
||||
|c]);} putchar( '\n');}} /*Mike Laman*/
|
||||
|c]);} putchar( '\n');}}} /*Mike Laman*/
|
||||
@@ -394,19 +394,15 @@ An example where a crash is not a bug: [2019/endoh](2019/endoh/endoh.c) is
|
||||
supposed to crash. There are others that are also supposed to crash or that are
|
||||
known to segfault but are considered features.
|
||||
|
||||
As of 10 April 2023 the definition changed for a second time (the first time was
|
||||
07 April 2023). If something is noted by the author as a known bug or limitation
|
||||
it need not be fixed **unless it impacts the usability** of the program or **it removes
|
||||
instructional value**. An example where a crash undocumented needn't be fixed is
|
||||
[1984/laman](1984/laman/laman.c). On the other hand the fixes made by [Cody
|
||||
Boone Ferguson](/winners.html#Cody_Boone_Ferguson) in
|
||||
[1990/theorem](1990/theorem/theorem.c) were useful.
|
||||
An important note is that if the README.md of the entry has a bug status that
|
||||
says it can be fixed it can be. Otherwise it should not be.
|
||||
|
||||
Nonetheless we challenge you to fix these entries for educational/instructional
|
||||
value and/or enjoyment but we kindly request that you **DO NOT** submit a pull
|
||||
request! If you can't figure it out you're invited to look at the git diffs,
|
||||
where there are some (some were fixed earlier on but rolled back as both Cody
|
||||
and Landon individually felt that the fix was tampering with the entry).
|
||||
request unless it's a bug or (mis)feature we would like you to fix! If you can't
|
||||
figure it out you're invited to look at the git diffs, where there are some
|
||||
(some were fixed earlier on but rolled back as both Cody and Landon individually
|
||||
felt that the fix was tampering with the entry).
|
||||
|
||||
NOTE: in the case of `gets()` we've fixed some to avoid the warning of the
|
||||
compiler, linker or even during runtime, depending on the system. In [some cases
|
||||
@@ -466,24 +462,15 @@ $ ./decot
|
||||
without a newline after the `\`. This is not a bug.
|
||||
|
||||
|
||||
## 1984 laman
|
||||
|
||||
### STATUS: INABIAF - please **DO NOT** fix
|
||||
### Source code: [1984/laman/laman.c](1984/laman/laman.c)
|
||||
### Information: [1984/laman/README.md](1984/laman/README.md)
|
||||
|
||||
This entry will very likely crash or do something else if you run it without an
|
||||
arg. It likely won't do anything at all if the arg is not a positive number.
|
||||
|
||||
|
||||
## 1984 mullender
|
||||
|
||||
### STATUS: INABIAF - please **DO NOT** fix
|
||||
### Source code: [1984/mullender/mullender.c](1984/mullender/mullender.c)
|
||||
### Information: [1984/mullender/README.md](1984/mullender/README.md)
|
||||
|
||||
Although there are two alt versions added by Cody that will work in modern
|
||||
systems, if you do not have a [VAX-11](https://en.wikipedia.org/wiki/VAX-11) or
|
||||
Although there is an alt version and supplementary program added by Cody that
|
||||
will work in modern systems, if you do not have a
|
||||
[VAX-11](https://en.wikipedia.org/wiki/VAX-11) or
|
||||
[PDP-11](https://en.wikipedia.org/wiki/PDP-11) to run the original entry on it
|
||||
will not work. See the README.md for details on the alternate versions.
|
||||
|
||||
|
||||
+16
-4
@@ -21,9 +21,9 @@ CHALLENGING bug fixes** like
|
||||
(all **EXTREMELY CHALLENGING**), fixing entries to work with clang (some being
|
||||
**EXTREMELY CHALLENGING** like
|
||||
[1991/dds](/thanks-for-fixes.md#1991dds-readmemd)) or as much as possible (like
|
||||
[1989/westley](/thanks-for-fixes.md#1989westley-readmemd) which is **INCREDIBLY
|
||||
HARD, _MUCH, MUCH MORE SO_ than any other fix!**), porting entries to macOS (some being
|
||||
**EXTREMELY CHALLENGING** like
|
||||
[1989/westley](/thanks-for-fixes.md#1989westley-readmemd), a true masterpiece
|
||||
that is **INCREDIBLY HARD, _MUCH, MUCH MORE SO_ than any other fix!**), porting
|
||||
entries to macOS (some being **EXTREMELY CHALLENGING** like
|
||||
[1998/schweikh1](/thanks-for-fixes.md#1998schweikh1-readmemd)), fixing code like
|
||||
[2001/herrmann2](/thanks-for-fixes.md#2001herrmann2-readmemd) to work in both
|
||||
32-bit/64-bit which *can be* **EXTREMELY CHALLENGING**, providing alternate code
|
||||
@@ -180,6 +180,15 @@ To see the difference from start to fixed:
|
||||
cd 1984/decot ; make diff_orig_prog
|
||||
```
|
||||
|
||||
## [1984/laman](1984/laman/laman.c) ([README.md](1984/laman/README.md]))
|
||||
|
||||
Cody fixed this to not crash when no arg is specified. Note that if the arg is
|
||||
not a positive number it will not do anything useful or anything at all.
|
||||
|
||||
This was fixed on 30 October 2023 after the bug status was changed from INABIAF
|
||||
(it's not a bug it's a feature) to bug.
|
||||
|
||||
|
||||
## [1984/mullender](1984/mullender/mullender.c) ([README.md](1984/mullender/README.md]))
|
||||
|
||||
Cody provided an [alternate version](1984/mullender/mullender.alt.c), an
|
||||
@@ -1131,7 +1140,7 @@ from stdin after starting the program). Ideally `fgets()` would be used but this
|
||||
is a more problematic. Previously it had a buffer size of 256 which could
|
||||
easily overflow. In this entry `gets()` is used in a more complicated way:
|
||||
first `m` is set to `*++p` in a for loop where `p` is argv. Later `m` is set to
|
||||
point to `h` which was of size \256. `gets()` is called as `m = gets(m)`) but
|
||||
point to `h` which was of size 256. `gets()` is called as `m = gets(m)`) but
|
||||
trying to change it to use `fgets()` proved more a problem. Since the input must
|
||||
come from the command line Cody changed the buffer size to `ARG_MAX+1` which
|
||||
should be enough (again theoretically) especially since the command expects
|
||||
@@ -1139,6 +1148,9 @@ redirecting a dictionary file as part of the command line. This also makes it
|
||||
possible for longer strings to be read (in case the `gets()` was not used in a
|
||||
loop).
|
||||
|
||||
Cody also added the [mkdict.sh](1992/gson/mkdict.sh) script that the author
|
||||
included in their remarks. See the README.md for its purpose. It was NOT fixed
|
||||
for ShellCheck because the author deliberately obfuscated it.
|
||||
|
||||
## [1992/kivinen](1992/kivinen/kivinen.c) ([README.md](1992/kivinen/README.md]))
|
||||
|
||||
|
||||
Reference in new issue
Block a user