diff -r c6a1ad6cf749 -r a285ee393860 src/main.c --- a/src/main.c Mon Apr 07 14:08:57 2014 +0200 +++ b/src/main.c Mon Apr 07 17:39:46 2014 +0200 @@ -59,11 +59,13 @@ timeunit = 1; } - if ((time = strtoul(optarg, &valid, 10)) > TIME_MAX + if ((time = strtoul(optarg, &valid, 10))*timeunit > UINT16_MAX || *valid != '\0') { - fprintf(stderr, "Specified time is invalid (%s)\n", optarg); + fprintf(stderr, "Specified time is invalid (%s)" + "- Maximum: 65535 seconds (1092 minutes)\n", optarg); return 1; } else { + settings->gameinfo.timecontrol = 1; if (opt=='t') { settings->gameinfo.time = timeunit * time; } else { @@ -108,7 +110,7 @@ return settings; } -void dump_gameinfo(Gameinfo *gameinfo) { +void dump_gameinfo(GameInfo *gameinfo) { int serverwhite = gameinfo->servercolor == WHITE; attron(A_UNDERLINE); printw("Game details\n"); @@ -116,7 +118,7 @@ printw(" Server: %s\n Client: %s\n", serverwhite?"white":"black", serverwhite?"black":"White" ); - if (gameinfo->time > 0) { + if (gameinfo->timecontrol) { if (gameinfo->time % 60) { printw(" Time limit: %ds + %ds\n", gameinfo->time, gameinfo->addtime); @@ -163,7 +165,7 @@ return EXIT_SUCCESS; } initscr(); - cbreak(); + halfdelay(10); keypad(stdscr, TRUE); if (has_colors()) { start_color();