From nobody@FreeBSD.org  Sat Feb  9 09:16:32 2002
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id CF59937B416
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  9 Feb 2002 09:16:31 -0800 (PST)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.6/8.11.6) id g19HGVC96357;
	Sat, 9 Feb 2002 09:16:31 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200202091716.g19HGVC96357@freefall.freebsd.org>
Date: Sat, 9 Feb 2002 09:16:31 -0800 (PST)
From: Dan Howe <dhowe01@telocity.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Phantasia does not accept [enter] key
X-Send-Pr-Version: www-1.0

>Number:         34759
>Category:       bin
>Synopsis:       Phantasia does not accept [enter] key
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Feb 09 09:20:00 PST 2002
>Closed-Date:    Sat Jan 26 15:12:05 UTC 2008
>Last-Modified:  Sat Jan 26 15:12:05 UTC 2008
>Originator:     Dan Howe
>Release:        4.5-RC
>Organization:
N/A
>Environment:
FreeBSD 4.5-RC #0 ... i386

>Description:
the unix game 'phantasia' does not accept [enter] as a valid key.  A Cntrl-J will work.
This is reproducable in both gnometerm, and xterm.

This was also a problem in 4.3.

>How-To-Repeat:
..play the game.  New users will be prompted for a name, it will not be possible to use the enter key to end the keyboard input.  a Cntrl-J is neccessary.
>Fix:
      
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-ports-bugs 
Responsible-Changed-By: arved 
Responsible-Changed-When: Sun Jan 19 10:56:23 PST 2003 
Responsible-Changed-Why:  
phantasia is now part of the freebsd-games port. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=34759 
Responsible-Changed-From-To: freebsd-ports-bugs->freebsd-bugs 
Responsible-Changed-By: glewis 
Responsible-Changed-When: Wed Sep 10 03:33:49 PDT 2003 
Responsible-Changed-Why:  
Ports version is fixed, but phantasia still exists in the 
base system in 4.x. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=34759 

From: Greg Lewis <glewis@misty.eyesbeyond.com>
To: freebsd-gnats-submit@FreeBSD.ORG
Cc:  
Subject: Re: bin/34759: Phantasia does not accept [enter] key
Date: Wed, 10 Sep 2003 04:49:26 -0600

 Here is the diff I committed to ports.  It should be sufficient to
 commit this to 4.x to close the PR.
 
 Index: phantasia/io.c
 ===================================================================
 RCS file: /var/fcvs/src/games/phantasia/Attic/io.c,v
 retrieving revision 1.6
 diff -u -r1.6 io.c
 --- phantasia/io.c	16 Nov 1999 02:57:33 -0000	1.6
 +++ phantasia/io.c	10 Sep 2003 09:52:52 -0000
 @@ -79,6 +79,9 @@
  	    case CH_NEWLINE:	/* terminate string */
  		break;
  
 +	    case CH_CR:	        /* terminate string */
 +		break;
 +
  	    case CH_REDRAW:	/* redraw screen */
  		clearok(stdscr, TRUE);
  		continue;
 @@ -91,7 +94,7 @@
  
  	*inptr = '\0';		/* terminate string */
  	}
 -    while (ch != CH_NEWLINE && inptr < cp + mx);
 +    while (ch != CH_NEWLINE && ch != CH_CR && inptr < cp + mx);
  }
  /**/
  /************************************************************************
 Index: phantasia/phantdefs.h
 ===================================================================
 RCS file: /var/fcvs/src/games/phantasia/Attic/phantdefs.h,v
 retrieving revision 1.1.1.1
 diff -u -r1.1.1.1 phantdefs.h
 --- phantasia/phantdefs.h	4 Sep 1994 04:03:06 -0000	1.1.1.1
 +++ phantasia/phantdefs.h	10 Sep 2003 09:53:25 -0000
 @@ -136,4 +136,5 @@
  #define	CH_KILL		'\030'		/* kill character (ctrl-X) */
  #define	CH_ERASE	'\010'		/* erase character (ctrl-H) */
  #define	CH_NEWLINE	'\n'		/* newline */
 +#define	CH_CR		'\r'		/* carriage return */
  #define	CH_REDRAW	'\014'		/* redraw screen character (ctrl-L) */
 
 -- 
 Greg Lewis                          Email   : glewis@eyesbeyond.com
 Eyes Beyond                         Web     : http://www.eyesbeyond.com
 Information Technology              FreeBSD : glewis@FreeBSD.org
 
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Sat Jan 26 15:10:08 UTC 2008 
State-Changed-Why:  
OBE.  Since this PR came in, 4.X has been desupported.  Apparently 
the fix did make it into the freebsd-games port, however. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=34759 
>Unformatted:
