From 7f04d7e6a547908919d619d7f1c2929366b35f27 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Thu, 19 Oct 2023 09:20:32 -0700 Subject: [PATCH 1/2] Minor updates and fixes to thanks file In particular make use of the new make rules for diff (where applicable and located - there are some places where it does not apply as it uses git diff for a sequence and I haven't tried to locate any others). Also cleaned up the entry for 1989/tromp. --- thanks-for-fixes.md | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/thanks-for-fixes.md b/thanks-for-fixes.md index b34223c47..be5dda1b2 100644 --- a/thanks-for-fixes.md +++ b/thanks-for-fixes.md @@ -514,13 +514,14 @@ he was using lldb and saw that the type of a pointer was too `long` :-) ## [1989/robison](1989/robison/robison.c) ([README.md](1989/robison/README.md])) +cd 1989/robison ; make orig_prog_diff Yusuke Endoh fixed this to compile under modern systems. To see the changes made, try: ```sh -git diff d2a42f42e8f477f29e9d5ed09ce2bb349eaf7397..9d63c37f490da333fbb1ed7db9571902570d4bad 1989/robison/robison.c +cd 1989/robison ; make orig_prog_diff ``` (It adds the C token pasting operator `##` instead of `/**/`.) @@ -528,19 +529,21 @@ git diff d2a42f42e8f477f29e9d5ed09ce2bb349eaf7397..9d63c37f490da333fbb1ed7db9571 ## [1989/tromp](1989/tromp/tromp.c) ([README.md](1989/tromp/README.md])) -We used a patch from Yusuke to get this to compile under gcc. +Cody and Yusuke fixed this entry: Yusuke fixed this to compile with gcc and Cody +fixed it for clang and made some other fixes as well. -Cody fixed this to work with clang by further changing the variable `a` to be -not the third argument to `main()` but instead be a variable declared in -`main()`. +To get it to work with clang the variable `a` had to not be the third argument +to `main()` but instead be a variable in `main()`. -Cody also bug fixed it so that the high score file would work (it was not even -being created) and after this making sure the terminal stayed sane (the letter -'`u`' could not be typed and echo was disabled outright after the segfault fix / -high score file was reinstated). Although we appreciate the help here, he -cynically noted that he had to have an IOCCC -[Tetris](https://en.wikipedia.org/wiki/Tetris) working (this of course was not -his only reason :-) ) +Cody also fixed a segfault and made it so the that the high score file would +work (it was not even being created but it was supposed to be). + +Another problem Cody fixed was that the terminal was left in an insane state where you +could not type '`u`' and echo was completely disabled. + +Although we appreciate the help here, he cynically noted that he had to have an +IOCCC [Tetris](https://en.wikipedia.org/wiki/Tetris) working (this of course was +not his only reason :-) ) ## [1989/westley](1989/westley/westley.c) ([README.md](1989/westley/README.md])) From c6ff25ac1732ee887227ee07eafb67d1d1a75f78 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Thu, 19 Oct 2023 09:29:44 -0700 Subject: [PATCH 2/2] Fix fix in thanks-for-fixes.md :-) Looking briefly at the code that I fixed the idea that the loop could be updated to have the increment part always increment is not correct and thus had to be fixed the way it was fixed. --- thanks-for-fixes.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/thanks-for-fixes.md b/thanks-for-fixes.md index be5dda1b2..7b5de90f1 100644 --- a/thanks-for-fixes.md +++ b/thanks-for-fixes.md @@ -497,9 +497,7 @@ you know how? Cody fixed an infinite loop where the program would print the same thing over and over again, flooding the screen. The problem is that there was a `for` loop that by necessity had to not have an increment stage but only in the `if` path -(in the loop itself) did the pointer get updated. Looking at the code it might -be that it can work just as well by adding the increment in the loop itself but -this was not done. +(in the loop itself) did the pointer get updated. Cody also provided an [alternate version](1989/ovdluhe/ovdluhe.alt.c) based on the author's remarks. See the README.md for details. The fix described above was