From 65b6eaeee5bf926cffe5fbfed030b9cb5114cea8 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Mon, 13 Jun 2005 19:05:37 +0000 Subject: [PATCH] (player_login): Replace pr_player() by equivalent pr_id(). (pr_player, upr_player): Internal linkage. (pr_hilite): Unused, remove. --- include/prototypes.h | 3 --- src/lib/player/login.c | 2 +- src/lib/subs/pr.c | 26 ++++---------------------- 3 files changed, 5 insertions(+), 26 deletions(-) diff --git a/include/prototypes.h b/include/prototypes.h index 788d5943f..224f0a757 100644 --- a/include/prototypes.h +++ b/include/prototypes.h @@ -600,9 +600,6 @@ extern void pr_inform(struct player *, char *, ...) ATTRIBUTE((format (printf, 2, 3))); extern void pr_wall(char *, ...) ATTRIBUTE((format (printf, 1, 2))); -extern void pr_player(struct player *pl, int id, s_char *buf); -extern void upr_player(struct player *pl, int id, char *buf); -extern void pr_hilite(s_char *buf); extern void prredir(char *redir); extern void prexec(char *file); extern void prprompt(int min, int btu); diff --git a/src/lib/player/login.c b/src/lib/player/login.c index 6b1a528b8..3a5bb4f9d 100644 --- a/src/lib/player/login.c +++ b/src/lib/player/login.c @@ -101,7 +101,7 @@ player_login(void *ud) } player->state = PS_SHUTDOWN; if (!io_eof(player->iop)) { - pr_player(player, C_EXIT, "so long...\n"); + pr_id(player, C_EXIT, "so long...\n"); io_noblocking(player->iop, 0); while (io_output(player->iop, IO_WAIT) > 0) ; } diff --git a/src/lib/subs/pr.c b/src/lib/subs/pr.c index 8a4e72800..1baf343cf 100644 --- a/src/lib/subs/pr.c +++ b/src/lib/subs/pr.c @@ -55,6 +55,8 @@ #include "server.h" #include "prototypes.h" +static void pr_player(struct player *pl, int id, char *buf); +static void upr_player(struct player *pl, int id, char *buf); static void outid(struct player *pl, int n); /* @@ -193,7 +195,7 @@ pr_wall(char *format, ...) * If a partial line with different id is buffered, terminate it with * a newline first. */ -void +static void pr_player(struct player *pl, int id, char *buf) { char *p; @@ -229,7 +231,7 @@ pr_player(struct player *pl, int id, char *buf) * If a partial line with different id is buffered, terminate it with * a newline first. */ -void +static void upr_player(struct player *pl, int id, char *buf) { char *bp; @@ -276,26 +278,6 @@ upr_player(struct player *pl, int id, char *buf) } } -/* - * highlighted characters have hex 80 or'ed in - * with them to designate their highlightedness - */ -void -pr_hilite(s_char *buf) -{ - register s_char *bp; - register s_char c; - s_char *p; - - p = malloc(strlen(buf) + 1); - strcpy(p, buf); - for (bp = p; 0 != (c = *bp); bp++) - if (isprint(c)) - *bp |= 0x80; - pr(p); - free(p); -} - /* * Send id N to PL. * This runs always at the beginning of a line. -- 2.43.0