(player_login): Replace pr_player() by equivalent pr_id().

(pr_player, upr_player): Internal linkage.

(pr_hilite): Unused, remove.
This commit is contained in:
Markus Armbruster 2005-06-13 19:05:37 +00:00
parent 71e164ed30
commit 65b6eaeee5
3 changed files with 5 additions and 26 deletions

View file

@ -600,9 +600,6 @@ extern void pr_inform(struct player *, char *, ...)
ATTRIBUTE((format (printf, 2, 3))); ATTRIBUTE((format (printf, 2, 3)));
extern void pr_wall(char *, ...) extern void pr_wall(char *, ...)
ATTRIBUTE((format (printf, 1, 2))); 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 prredir(char *redir);
extern void prexec(char *file); extern void prexec(char *file);
extern void prprompt(int min, int btu); extern void prprompt(int min, int btu);

View file

@ -101,7 +101,7 @@ player_login(void *ud)
} }
player->state = PS_SHUTDOWN; player->state = PS_SHUTDOWN;
if (!io_eof(player->iop)) { 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); io_noblocking(player->iop, 0);
while (io_output(player->iop, IO_WAIT) > 0) ; while (io_output(player->iop, IO_WAIT) > 0) ;
} }

View file

@ -55,6 +55,8 @@
#include "server.h" #include "server.h"
#include "prototypes.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); 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 * If a partial line with different id is buffered, terminate it with
* a newline first. * a newline first.
*/ */
void static void
pr_player(struct player *pl, int id, char *buf) pr_player(struct player *pl, int id, char *buf)
{ {
char *p; 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 * If a partial line with different id is buffered, terminate it with
* a newline first. * a newline first.
*/ */
void static void
upr_player(struct player *pl, int id, char *buf) upr_player(struct player *pl, int id, char *buf)
{ {
char *bp; 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. * Send id N to PL.
* This runs always at the beginning of a line. * This runs always at the beginning of a line.