From 82cbf069a781d64802fc59b36778c0b02be4043e Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Mon, 13 Mar 2023 09:01:55 -0700 Subject: [PATCH] Get 1986/wall to work Although under linux it compiled (as long as the compiler supports -traditional-cpp) it did not function correctly. We used a patch from Yusuke Endoh. Thank you Yusuke! --- 1986/wall/README.md | 9 ++++++++- 1986/wall/wall.c | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/1986/wall/README.md b/1986/wall/README.md index 3243b1463..d67866223 100644 --- a/1986/wall/README.md +++ b/1986/wall/README.md @@ -13,7 +13,9 @@ US of A NOTE: On modern systems this entry requires the option `-traditional-cpp` which clang does not support. Please be advised that gcc under macOS is actually -clang so this will not compile with the default gcc under macOS. +clang so this will not compile with the default gcc under macOS. As this entry +stood in modern systems it did not work even when compiled. We used a patch +provided by Yusuke Endoh to make it work. Thank you Yusuke! ## Judges' comments: @@ -27,6 +29,11 @@ the warning message generated by the C compiler. Then execute the program and type characters into its standard input. You will see why the compiler documents the program. +## Author's comments: + +No comments were provided by the author. + + Copyright (c) 1986, Landon Curt Noll & Larry Bassel. All Rights Reserved. Permission for personal, educational or non-profit use is diff --git a/1986/wall/wall.c b/1986/wall/wall.c index 836cb51d5..1c938d49a 100644 --- a/1986/wall/wall.c +++ b/1986/wall/wall.c @@ -13,7 +13,7 @@ ccc( cc) C cc; -{ +{ cc=strdup(cc); C cccc= cc;int @@ -50,7 +50,7 @@ main(c_(-)'-'-1,C_(s))_ }main(,cc) C #define O write(1, -c="O"; +c=strdup("O"); O_(sy) keyboard)); main(;;,for); read(0,