projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
BSD 4_2 release
[unix-history]
/
usr
/
src
/
games
/
mille
/
move.c
diff --git
a/usr/src/games/mille/move.c
b/usr/src/games/mille/move.c
index
b6ebe5d
..
ee782fb
100644
(file)
--- a/
usr/src/games/mille/move.c
+++ b/
usr/src/games/mille/move.c
@@
-1,9
+1,17
@@
-#ifndef lint
-static char sccsid[] = "@(#)move.c 4.1 12/24/82";
-#endif
-
#include "mille.h"
#include "mille.h"
-#include "unctrl.h"
+# ifdef attron
+# include <term.h>
+# define _tty cur_term->Nttyb
+# endif attron
+
+/*
+ * @(#)move.c 1.3 (Berkeley) 7/2/83
+ */
+
+#ifdef CTRL
+#undef CTRL
+#endif
+#define CTRL(c) (c - 'A' + 1)
char *Movenames[] = {
"M_DISCARD", "M_DRAW", "M_PLAY", "M_ORDER"
char *Movenames[] = {
"M_DISCARD", "M_DRAW", "M_PLAY", "M_ORDER"
@@
-295,7
+303,7
@@
getmove()
move(MOVE_Y, MOVE_X + sizeof moveprompt);
leaveok(Board, FALSE);
refresh();
move(MOVE_Y, MOVE_X + sizeof moveprompt);
leaveok(Board, FALSE);
refresh();
- while ((c =
get
ch()) == _tty.sg_kill || c == _tty.sg_erase)
+ while ((c =
read
ch()) == _tty.sg_kill || c == _tty.sg_erase)
continue;
if (islower(c))
c = toupper(c);
continue;
if (islower(c))
c = toupper(c);
@@
-328,7
+336,7
@@
getmove()
wrefresh(Score);
break;
case 'R': /* Redraw screen */
wrefresh(Score);
break;
case 'R': /* Redraw screen */
- case CTRL(
l
):
+ case CTRL(
'L'
):
clearok(curscr, TRUE);
newboard();
prboard();
clearok(curscr, TRUE);
newboard();
prboard();
@@
-354,7
+362,8
@@
getmove()
break;
case '\r': /* Ignore RETURNs and */
case '\n': /* Line Feeds */
break;
case '\r': /* Ignore RETURNs and */
case '\n': /* Line Feeds */
- case ' ': /* and Spaces */
+ case ' ': /* Spaces */
+ case '\0': /* and nulls */
break;
case 'Z': /* Debug code */
if (geteuid() == ARNOLD) {
break;
case 'Z': /* Debug code */
if (geteuid() == ARNOLD) {
@@
-366,7
+375,7
@@
over:
leaveok(Board, FALSE);
refresh();
sp = buf;
leaveok(Board, FALSE);
refresh();
sp = buf;
- while ((*sp =
get
ch()) != '\n') {
+ while ((*sp =
read
ch()) != '\n') {
if (*sp == _tty.sg_kill)
goto over;
else if (*sp == _tty.sg_erase) {
if (*sp == _tty.sg_kill)
goto over;
else if (*sp == _tty.sg_erase) {