| Summary: | sail driver dies | ||
|---|---|---|---|
| Product: | Base System | Reporter: | jtm63 <jtm63> |
| Component: | bin | Assignee: | freebsd-bugs (Nobody) <bugs> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 3.5-STABLE | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
jtm63
2000-09-08 22:20:01 UTC
Responsible Changed From-To: gnats-admin->freebsd-bugs Orphaned PR State Changed From-To: open->closed I can't reproduce this. If there is still a problem, a lot more details are going to be needed. 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);
|