From be1bc188a780d43890ebd620a742c10f6268204a Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Fri, 17 Nov 2023 12:14:15 -0800 Subject: [PATCH] Add bug status of 2001/rosten + formatting/typos There is a missing file. Format/typo check README.md file. --- 2001/rosten/README.md | 20 ++++++++--- bugs.md | 82 +++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 95 insertions(+), 7 deletions(-) diff --git a/2001/rosten/README.md b/2001/rosten/README.md index f13e50cee..bd14315c9 100644 --- a/2001/rosten/README.md +++ b/2001/rosten/README.md @@ -5,6 +5,18 @@ make ``` +### Bugs and (Mis)features: + +The current status of this entry is: + +``` +STATUS: missing files - please provide them +``` + +For more detailed information see [2001 rosten in bugs.md](/bugs.md#2001-rosten). + + + ## To use: ```sh @@ -39,10 +51,12 @@ cursor) in the wrong way. :-) ## Author's remarks: + ### NAME `rosten` - make the mouse act as if it has been greased + ### SYNOPSIS ```sh @@ -66,7 +80,7 @@ It only takes one optional option: the greasiness factor. This is the number that the speed is divided by on each iteration. The default is 1.03. A setting of 1 - no friction - is fun as is 0.99. -Being an X program, it recognised the `DISPLAY` variable. +Being an X program, it recognises the `DISPLAY` variable. ### PORTABILITY @@ -148,9 +162,7 @@ problems with its own include files, but none with my program. ### ERRORS The DEC compiler of this version: `DEC C V5.6-079 on Digital UNIX V4.0 (Rev. -878)` - -can't compile the code. It thinks that preprocessor lines can not have +878)` can't compile the code. It thinks that preprocessor lines can not have whitespace preceding the `#`. Moving the preprocessor directives to the beginning of the line wrecks the layout but makes it compile. diff --git a/bugs.md b/bugs.md index e6d17e01b..6c0fa86af 100644 --- a/bugs.md +++ b/bugs.md @@ -1423,8 +1423,8 @@ index a5745bc7f4fa28b834c004f4cf19633e40ad9165..5e5e5334f33f9dbd95c70eddece3189d { a = 0; y ( a [ b ] ``` -But since it does not for the time being it is advisable to just redirect stderr -to /dev/null (`2>/dev/null`). +But since it does not for the time being it is advisable to just redirect +`stderr` to `/dev/null` (`2>/dev/null`). ## 1996 jonth @@ -1855,7 +1855,7 @@ If you have a fix for 64-bit systems this is welcome as an alternate version, as stated above. You might like to look at the otccelf version but note that it (at least in 64-bit linux and macOS) has compilation errors. -### Aside: why were there changes if INABIAF ? +### Aside: why were there changes made if INABIAF ? This is a good question. The reason is we believe it better to fix some obvious problems: there were some bugs that would very possibly prevent it from working @@ -1892,6 +1892,7 @@ in the archive. Do you have a copy? Please provide it! The author also referred to the file `times2.turing` but this is also missing in the archive. Do you have a copy? Please provide it! + ### STATUS: known bug - please help us fix There is also a bug in part. During compilation you're supposed to see some @@ -1927,6 +1928,17 @@ Although it is independent of endianness both systems need the same character set. In other words both have to be ASCII or EBCDIC - not one of each. +## 2001 rosten + + +### STATUS: missing files - please provide them +### Source code: [2001/rosten/rosten.c](2001/rosten/rosten.c) +### Information: [2001/rosten/README.md](2001/rosten/README.md) + +The author stated that there is a cat man page for this program in case one +wanted to install it as a tool but this is missing. + + ## 2001 schweikh @@ -1943,6 +1955,7 @@ There's also no way to escape meta characters. ## 2001 westley +### STATUS: missing files - please provide them ### STATUS: uses gets() - change to fgets() if possible ### Source code: [2001/westley/westley.c](2001/westley/westley.c) ### Information: [2001/westley/README.md](2001/westley/README.md) @@ -1957,6 +1970,69 @@ The author referred to a file `card.gif` but this file is missing. Do you have it? Please provide it! +## 2001 williams + + +### STATUS: known bug - please help us fix +### Source code: [2001/williams/williams.c](2001/williams/williams.c) +### Information: [2001/williams/README.md](2001/williams/README.md) + +There seem to be a couple bugs at least in this entry. The first one is that +when it does reach a certain point it crashes. This is in the function `J()` (or +one it calls?). But sometimes it seems to not get that far, just showing lines +moving back and forth. This is also in `J()`. It is not confirmed but it might +be that the lines are drawn by `XDrawString()`, the last part in `J()`. + +`J()` has a `for` loop identified by `for` and also a couple `while` loops, +identified by `R`. + +Since the game never ends properly the score is not printed either. + +It appears that the crash happens in more than one place. For instance it has +happened at + +```c +XCheckMaskEvent(d, 4,&e) +``` + +but it's also happened at + +```c +else XDrawPoint(d ,w,g,(l.s+=l.a)>>9, h=(l.c+=l.b)>>9) +``` + +In both cases the pointer `d` was corrupted: + +``` +(lldb) p d +(Display *) 0x0000000000000001 +``` + +It is believed that it also happened at + +```c +XDrawString(d,w,g,W/3,H/2,m,B); +``` + +in `J()` and for the same reason. + +The loop seems to be stuck in the call to `usleep(3)` like: + +```c +usleep(p*200); +``` + +which happens to be in a `while()` loop. + +There is a way to get the code to crash. If you don't do anything until +everything is destroyed (where you'd lose the game if it ended) and then you +start to shoot your missiles repeatedly it will eventually crash. It appears not +to be the case (though this was not tried as many times) if you start shooting +when the missiles come down. The fact you can shoot after it starts that +sleeping in a loop does suggest that it's not stuck only showing those lines and +sleeping. + + # 2002 There was no IOCCC in 2002.