From 7be723e0ad443ca79570e2b0da5b51f061e9c996 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Wed, 18 Oct 2023 05:24:45 -0700 Subject: [PATCH] Make 1987/westley more symmetrical after fix With the compilation fix of the code some symmetry was unfortunately destroyed. To try and keep it as close as possible to the original I had just commented out the code. But looking at it again today it occurred to me that I can make it look more symmetrical by removing the commented out code and then formatting the code a bit differently (another cast was removed to do this). It is not any less authentic but it now has more symmetry which was an important part of the entry's layout. --- 1987/westley/westley.c | 4 ++-- thanks-for-fixes.md | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/1987/westley/westley.c b/1987/westley/westley.c index 6db527893..f58cb3251 100644 --- a/1987/westley/westley.c +++ b/1987/westley/westley.c @@ -26,11 +26,11 @@ ,LACEDx0 = 0xDECAL, rof ; for (;(int) (tni);) - /* (int)*/(tni) + (tni) = reviled ; deliver = redivider ; -for ((int)(tni)++,++reviled;reviled* *deliver;deliver++,++/*(int)*/(tni)) rof + for ((tni)++,++reviled;reviled**deliver;deliver++,++(tni)) rof = (int) -1- (tni) ;reviled--;--deliver; diff --git a/thanks-for-fixes.md b/thanks-for-fixes.md index d15e040b9..b585db4a7 100644 --- a/thanks-for-fixes.md +++ b/thanks-for-fixes.md @@ -307,7 +307,12 @@ the code can refer to `gets()` instead. Cody fixed this for modern systems. The problem was `'assignment to cast is illegal, lvalue casts are not supported'`. For the original file see the -README.md file. +README.md file. Unfortunately this ruins some symmetry. To try and resolve this +as much as possible at first code was commented out but later on the commented +out code was removed and another part changed so that, although it has some code +no longer there, it has a closer match in symmetry and since the code was +commented out it's probably not a big deal to have it removed instead as it does +look more symmetrical now. Cody also added to the Makefile `-include stdio.h` in the nowadays very unlikely(?) but nevertheless suggested case that `putchar()` is not available.