fix CTRL macros; make ANSI C compatible
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Wed, 23 Dec 1987 05:35:31 +0000 (21:35 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Wed, 23 Dec 1987 05:35:31 +0000 (21:35 -0800)
SCCS-vsn: games/snake/snake/snake.c 5.3

usr/src/games/snake/snake/snake.c

index 65adb77..21d2142 100644 (file)
@@ -11,7 +11,7 @@ char copyright[] =
 #endif not lint
 
 #ifndef lint
 #endif not lint
 
 #ifndef lint
-static char sccsid[] = "@(#)snake.c    5.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)snake.c    5.3 (Berkeley) %G%";
 #endif not lint
 
 /*
 #endif not lint
 
 /*
@@ -234,8 +234,8 @@ mainloop()
                if (!fast) flushi();
                lastc = c;
                switch (c){
                if (!fast) flushi();
                lastc = c;
                switch (c){
-               case CTRL(z):
-               case CTRL(c):
+               case CTRL('z'):
+               case CTRL('c'):
                        suspend();
                        continue;
                case EOT:
                        suspend();
                        continue;
                case EOT:
@@ -265,7 +265,7 @@ mainloop()
                        putpad(KS);
                        putpad(TI);
                        point(&cursor,0,lcnt-1);
                        putpad(KS);
                        putpad(TI);
                        point(&cursor,0,lcnt-1);
-               case CTRL(l):
+               case CTRL('l'):
                        setup();
                        winnings(cashvalue);
                        continue;
                        setup();
                        winnings(cashvalue);
                        continue;
@@ -340,7 +340,7 @@ mainloop()
                                                pchar(&you,ME);
                                }
                                break;
                                                pchar(&you,ME);
                                }
                                break;
-                       case CTRL(p):
+                       case CTRL('p'):
                        case 'e':
                        case 'k':
                        case 'i':
                        case 'e':
                        case 'k':
                        case 'i':
@@ -353,7 +353,7 @@ mainloop()
                                                pchar(&you,ME);
                                }
                                break;
                                                pchar(&you,ME);
                                }
                                break;
-                       case CTRL(n):
+                       case CTRL('n'):
                        case 'c':
                        case 'j':
                        case LF:
                        case 'c':
                        case 'j':
                        case LF: