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 player_output_some(void);
/*
* Print to current player similar to printf().
char *p;
char *bp;
int len;
- time_t deadline;
journal_output(pl, id, buf);
}
}
- if (player == pl) {
- deadline = (time_t)(pl->may_sleep == PLAYER_SLEEP_FREELY
- ? -1 : 0);
- while (io_output_if_queue_long(pl->iop, deadline) > 0)
- ;
- }
+ if (player == pl)
+ player_output_some();
}
/*
int standout = 0;
char printbuf[2];
char ch;
- time_t deadline;
journal_output(pl, id, buf);
}
}
- if (player == pl) {
- deadline = (time_t)(pl->may_sleep == PLAYER_SLEEP_FREELY
- ? -1 : 0);
- while (io_output_if_queue_long(pl->iop, deadline) > 0)
- ;
- }
+ if (player == pl)
+ player_output_some();
}
/*
pl->curid = n;
}
+static void
+player_output_some(void)
+{
+ time_t deadline;
+
+ deadline = (time_t)(player->may_sleep == PLAYER_SLEEP_FREELY ? -1 : 0);
+ while (io_output_if_queue_long(player->iop, deadline) > 0)
+ ;
+}
+
/*
* Send redirection request REDIR to the current player.
* REDIR is UTF-8, but non-ASCII characters can occur only if the