From 595d499329acdda07ae5f7e03097165a4a5a2b72 Mon Sep 17 00:00:00 2001 From: fcambus Date: Fri, 23 Jun 2017 12:56:25 +0000 Subject: [PATCH] Remove unused confirm() and datime() functions. Those functions are unused and have been compiled out since 1998, it's time to let them go. OK sthen@, tom@, mestre@ --- games/adventure/extern.h | 3 +-- games/adventure/io.c | 23 +---------------------- games/adventure/wizard.c | 20 +------------------- 3 files changed, 3 insertions(+), 43 deletions(-) diff --git a/games/adventure/extern.h b/games/adventure/extern.h index 383c2094b12..93bd2c65e63 100644 --- a/games/adventure/extern.h +++ b/games/adventure/extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: extern.h,v 1.10 2016/03/08 10:48:39 mestre Exp $ */ +/* $OpenBSD: extern.h,v 1.11 2017/06/23 12:56:25 fcambus Exp $ */ /* $NetBSD: extern.h,v 1.3 1997/10/11 01:55:27 lukem Exp $ */ /* @@ -123,7 +123,6 @@ void prht(void); #define length(str) (strlen((str)) + 1) /* wizard.c */ -void datime(time_t *, time_t *); void poof(void); int Start(void); int wizard(void); diff --git a/games/adventure/io.c b/games/adventure/io.c index dc9798b4a45..04eac4c4abe 100644 --- a/games/adventure/io.c +++ b/games/adventure/io.c @@ -1,4 +1,4 @@ -/* $OpenBSD: io.c,v 1.22 2016/12/21 18:28:19 krw Exp $ */ +/* $OpenBSD: io.c,v 1.23 2017/06/23 12:56:25 fcambus Exp $ */ /* $NetBSD: io.c,v 1.3 1995/04/24 12:21:37 cgd Exp $ */ /*- @@ -89,27 +89,6 @@ getin(char *wrd1, size_t siz1, char *wrd2, size_t siz2) } } - -#if 0 /* Not used */ -int -confirm(char *mesg) /* confirm irreversible action */ -{ - int result; - int ch; - - printf("%s", mesg); /* tell him what he did */ - if ((ch = getchar()) == 'y') /* was his first letter a 'y'? */ - result = 1; - else if (ch == EOF) { - printf("user closed input stream, quitting...\n"); - exit(0); - } else - result = 0; - FLUSHLINE; - return (result); -} -#endif - int yes(int x, int y, int z) /* confirm with rspeak */ { diff --git a/games/adventure/wizard.c b/games/adventure/wizard.c index 2bcdb7015f3..90eee0653dd 100644 --- a/games/adventure/wizard.c +++ b/games/adventure/wizard.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wizard.c,v 1.19 2016/03/08 10:48:39 mestre Exp $ */ +/* $OpenBSD: wizard.c,v 1.20 2017/06/23 12:56:25 fcambus Exp $ */ /* $NetBSD: wizard.c,v 1.3 1995/04/24 12:21:41 cgd Exp $ */ /*- @@ -45,24 +45,6 @@ #include "extern.h" #include "hdr.h" -#if 0 -void -datime(int *d, int *t) -{ - time_t tvec; - struct tm *tptr; - - time(&tvec); - tptr = localtime(&tvec); - /* day since 1977 (mod leap) */ - *d = tptr->tm_yday + 365 * (tptr->tm_year - 77); - /* bug: this will overflow in the year 2066 AD */ - /* it will be attributed to Wm the C's millenial celebration */ - /* and minutes since midnite */ - *t = tptr->tm_hour * 60 + tptr->tm_min; -} /* pretty painless */ -#endif - char magic[6]; void -- 2.20.1