Tweak output of -s slightly. (Marc H. Thoben <root@develz.org>)

git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@606 db0b04b0-f4d1-0310-9a6d-de3e77497b0e
This commit is contained in:
Pasi Kallinen 2011-10-03 15:49:14 +00:00
parent 3b189f61d9
commit 8e076008d1
1 changed files with 14 additions and 2 deletions

View File

@ -100,6 +100,7 @@ extern int yyparse ();
char * __progname;
int g_idle_alarm_enabled = 0;
int showplayers = 0;
void (*g_chain_winch)(int);
#ifndef USE_SQLITE3
@ -785,6 +786,10 @@ game_get_column_data(struct dg_game *game,
case SORTMODE_WINDOWSIZE:
snprintf(data, bufsz, "%3dx%3d", game->ws_col, game->ws_row);
if (showplayers)
snprintf(data, bufsz, "%dx%d", game->ws_col, game->ws_row);
else
snprintf(data, bufsz, "%3dx%3d", game->ws_col, game->ws_row);
if ((game->ws_col > COLS || game->ws_row > LINES))
*hilite = CLR_RED;
break;
@ -799,6 +804,12 @@ game_get_column_data(struct dg_game *game,
long secs, mins, hours;
secs = (ctime - game->idle_time);
if (showplayers) {
snprintf(data, 10, "%ld", secs);
break;
}
hours = (secs / 3600);
secs -= (hours * 3600);
mins = (secs / 60) % 60;
@ -1161,7 +1172,7 @@ watchgame:
void
inprogressdisplay (int gameid)
{
const char *selectorchars = "abcdefghijklmnoprstuvwxyzABCDEFGHIJKLMNOPRSTUVWXYZ";
const char *selectorchars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPRSTUVWXYZ";
int i, len = 20;
static dg_sortmode sortmode = NUM_SORTMODES;
struct dg_game **games = NULL;
@ -1194,6 +1205,8 @@ inprogressdisplay (int gameid)
for (curr_watchcol = watchcols; *curr_watchcol; ++curr_watchcol) {
struct dg_watchcols *col = *curr_watchcol;
if ((dg_sortmode)col->dat == SORTMODE_NONE)
continue;
char tmpbuf[80];
int hilite = 0;
game_get_column_data(games[i],
@ -2488,7 +2501,6 @@ main (int argc, char** argv)
unsigned int len;
int c, i;
int userchoice;
int showplayers = 0;
char *tmp;
char *wall_email_str = NULL;
#ifdef USE_RLIMIT