From 8c12432327dbdc8940447b281b8bc456aaf898b9 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 18 Jun 2010 21:04:25 +0200 Subject: [PATCH] PR() and PRdate() are no longer used, remove them --- include/prototypes.h | 2 -- src/lib/subs/pr.c | 46 -------------------------------------------- 2 files changed, 48 deletions(-) diff --git a/include/prototypes.h b/include/prototypes.h index 55a2be7f..e147f20c 100644 --- a/include/prototypes.h +++ b/include/prototypes.h @@ -573,8 +573,6 @@ extern int prmptrd(char *prompt, char *str, int size); extern int uprmptrd(char *prompt, char *str, int size); extern void prdate(void); extern void prxy(char *, coord, coord); -extern void PR(int, char *, ...) ATTRIBUTE((format (printf, 2, 3))); -extern void PRdate(natid cn); extern void pr_beep(void); extern void mpr(int, char *, ...) ATTRIBUTE((format (printf, 2, 3))); extern size_t copy_ascii_no_funny(char *, char *); diff --git a/src/lib/subs/pr.c b/src/lib/subs/pr.c index e707b1c9..8bb221f8 100644 --- a/src/lib/subs/pr.c +++ b/src/lib/subs/pr.c @@ -441,52 +441,6 @@ prxy(char *format, coord x, coord y) pr(format, xrel(np, x), yrel(np, y)); } -/* - * Print to country CN similar to printf(). - * Use printf-style FORMAT with the optional arguments. - * Output is buffered until a newline arrives. - * If CN is the current player and we're not in the update, print just - * like pr(). Else print into a bulletin. - * Because printing like pr() requires normal text, and bulletins - * require user text, only plain ASCII is allowed. - */ -void -PR(int cn, char *format, ...) -{ - /* XXX should really do this on a per-nation basis */ - static char longline[MAXNOC][512]; - int newline; - va_list ap; - char buf[1024]; - - va_start(ap, format); - (void)vsprintf(buf, format, ap); - va_end(ap); - newline = strrchr(buf, '\n') ? 1 : 0; - strcat(longline[cn], buf); - if (newline) { - if (update_running || (cn && cn != player->cnum)) - typed_wu(0, cn, longline[cn], TEL_BULLETIN); - else - pr_player(player, C_DATA, longline[cn]); - longline[cn][0] = '\0'; - } -} - -/* - * Print the current time in ctime() format to country CN. - * If CN is the current player and we're not in the update, print just - * like prdate(). Else print into a bulletin. - */ -void -PRdate(natid cn) -{ - time_t now; - - (void)time(&now); - PR(cn, ctime(&now)); -} - /* * Sound the current player's bell. */