From 9d2d7d8e0c519c7c21e61ee3c82a7e1aa49ef34f Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sat, 24 Aug 2013 21:35:47 -0400 Subject: [PATCH] Eliminate addprintf. --- display.c | 29 ----------------------------- extern.h | 3 --- game.c | 2 +- 3 files changed, 1 insertion(+), 33 deletions(-) diff --git a/display.c b/display.c index 3d2d29b..04f2f3a 100644 --- a/display.c +++ b/display.c @@ -693,35 +693,6 @@ pos_str(int row, int col, char *str, ...) va_end(ap); } -void -/* VARARGS1 */ -addprintf(char *str, int a, int b, int c, int d, int e, int f, int g, int h) -{ - char junkbuf[STRSIZE]; - - (void) sprintf (junkbuf, str, a, b, c, d, e, f, g, h); - (void) addstr (junkbuf); -} -void -/* VARARGS1 */ -addprintf1(char *str, char *a, int b, int c, int d, int e, int f, int g, int h) -{ - char junkbuf[STRSIZE]; - - (void) sprintf (junkbuf, str, a, b, c, d, e, f, g, h); - (void) addstr (junkbuf); -} - -void -/* VARARGS1 */ -addprintf2(char *str, char *a, int b, int c, int d, char *e, char *f, int g, int h) -{ - char junkbuf[STRSIZE]; - - (void) sprintf (junkbuf, str, a, b, c, d, e, f, g, h); - (void) addstr (junkbuf); -} - /* Print a single cell in condensed format. */ diff --git a/extern.h b/extern.h index 4e9af64..78724ec 100644 --- a/extern.h +++ b/extern.h @@ -162,9 +162,6 @@ void delay (void); void close_disp (void); void pos_str (int row, int col, char *str, ...); void pos_str1 (int row, int col, char *str, ...); -void addprintf (char *str, int a, int b, int c, int d, int e, int f, int g, int h); -void addprintf1 (char *str, char *a, int b, int c, int d, int e, int f, int g, int h); -void addprintf2 (char *str, char *a, int b, int c, int d, char *e, char *f, int g, int h); int direction(); void init_game (void); /* game routines */ diff --git a/game.c b/game.c index 66e2e1c..85356d7 100644 --- a/game.c +++ b/game.c @@ -323,7 +323,7 @@ bool select_cities(void) { userp = cont_tab[user_cont].cityp[useri]; } while (userp == compp); - addprintf ("Your city is at %d.", loc_disp(userp->loc),0,0,0,0,0,0,0); + topmsg(1, "Your city is at %d.", loc_disp(userp->loc)); delay (); /* let user see output before we set_prod */ /* update city and map */ -- 2.43.0