From b86f6dc73ece07ba616abb41b3d11446f847282a Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Tue, 26 Sep 2023 11:23:31 -0700 Subject: [PATCH] Improve fix of 1990/tbr In particular the fix to make it more like the original. There was no need to have the function prototypes at the top of the file. I also added a couple -Wno- options to the CSILENCE variable in the Makefile. I also added to the Makefile so that make alt will build the alt version (only functional difference is that there is gets() instead of fgets()). --- 1990/tbr/Makefile | 7 ++++--- 1990/tbr/tbr.c | 1 - 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/1990/tbr/Makefile b/1990/tbr/Makefile index b538fbe3b..8f74cbdaf 100644 --- a/1990/tbr/Makefile +++ b/1990/tbr/Makefile @@ -39,7 +39,8 @@ include ../../var.mk # Common C compiler warnings to silence # CSILENCE= -Wno-char-subscripts -Wno-error -Wno-implicit-function-declaration \ - -Wno-unused-value -Wno-deprecated-non-prototype -Wno-return-type + -Wno-unused-value -Wno-deprecated-non-prototype -Wno-return-type -Wno-implicit-int \ + -Wno-empty-body # Common C compiler warning flags # @@ -114,8 +115,8 @@ OBJ= ${PROG}.o DATA= TARGET= ${PROG} # -ALT_OBJ= -ALT_TARGET= +ALT_OBJ= ${PROG}.alt.o +ALT_TARGET= ${PROG}.alt ################# diff --git a/1990/tbr/tbr.c b/1990/tbr/tbr.c index 6292b0803..e867fb391 100644 --- a/1990/tbr/tbr.c +++ b/1990/tbr/tbr.c @@ -1,4 +1,3 @@ -int e(int x),r(int t,int o); #define gets(x)fgets((x),512,stdin) #define exit(x) exit((x)),0 #define D ,close(