From 9963fdefa58707e45f08a31ee27c955311d80021 Mon Sep 17 00:00:00 2001 From: Greg Lewis Date: Wed, 10 Sep 2003 10:05:42 +0000 Subject: . Treat carriage returns the same as linefeeds when entering data. This allows the Enter key to work correctly when entering a name. PR: 34759 --- games/bsdgames/files/patch-phantasia::io.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 games/bsdgames/files/patch-phantasia::io.c (limited to 'games/bsdgames/files/patch-phantasia::io.c') diff --git a/games/bsdgames/files/patch-phantasia::io.c b/games/bsdgames/files/patch-phantasia::io.c new file mode 100644 index 000000000000..29f05cf1265f --- /dev/null +++ b/games/bsdgames/files/patch-phantasia::io.c @@ -0,0 +1,26 @@ +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); + } + /* */ + /************************************************************************ -- cgit v1.2.3