Date: Sat, 15 Sep 2001 11:20:01 -0700 (PDT) From: SHIRAMOTO Takeyuki <siramoto@mx9.freecom.ne.jp> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/21133: sail driver dies Message-ID: <200109151820.f8FIK1B35622@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/21133; it has been noted by GNATS. From: SHIRAMOTO Takeyuki <siramoto@mx9.freecom.ne.jp> To: freebsd-gnats-submit@FreeBSD.org, jtm63@enteract.com Cc: Subject: Re: bin/21133: sail driver dies Date: Sun, 16 Sep 2001 03:11:43 +0900 diff -crN /usr/src/games/sail/pl_main.c ./pl_main.c *** /usr/src/games/sail/pl_main.c Tue Nov 30 12:49:38 1999 --- ./pl_main.c Sun Sep 16 01:08:21 2001 *************** *** 49,58 **** pl_main() { - if (!SCREENTEST()) { - printf("Can't sail on this terminal.\n"); - exit(1); - } initialize(); Signal("Aye aye, Sir", (struct ship *)0); play(); --- 49,54 ---- *************** *** 200,208 **** --- 196,208 ---- if ((nameptr = (char *) getenv("SAILNAME")) && *nameptr) (void) strncpy(captain, nameptr, sizeof captain); else { + char *p; + (void) printf("Your name, Captain? "); (void) fflush(stdout); (void) fgets(captain, sizeof captain, stdin); + p = captain; + strsep(&p, "\n\r"); if (!*captain) (void) strcpy(captain, "no name"); else *************** *** 241,246 **** --- 241,250 ---- } } + if (!SCREENTEST()) { + printf("Can't sail on this terminal.\n"); + exit(1); + } initscreen(); draw_board(); (void) sprintf(message, "Captain %s assuming command", captain); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200109151820.f8FIK1B35622>