]> git.cameronkatri.com Git - bsdgames-darwin.git/commitdiff
new curses update
authorcgd <cgd@NetBSD.org>
Wed, 10 Nov 1993 10:02:16 +0000 (10:02 +0000)
committercgd <cgd@NetBSD.org>
Wed, 10 Nov 1993 10:02:16 +0000 (10:02 +0000)
rogue/Makefile
rogue/message.c
rogue/score.c

index 53779b3c9fbfd6d3d5a533ef03819918ecda0e3a..f0161a2f67919d7f737bd8b1cf2d69e018cbe560 100644 (file)
@@ -1,8 +1,8 @@
 #      from: @(#)Makefile      5.7 (Berkeley) 5/11/90
-#      $Id: Makefile,v 1.2 1993/08/01 05:44:27 mycroft Exp $
+#      $Id: Makefile,v 1.3 1993/11/10 10:02:16 cgd Exp $
 
 PROG=  rogue
-CFLAGS+=-DUNIX -DUNIX_BSD4_2 -fwritable-strings
+CFLAGS+=-DUNIX -fwritable-strings -g
 SRCS=  curses.c hit.c init.c inventory.c level.c machdep.c main.c \
        message.c monster.c move.c object.c pack.c play.c random.c ring.c \
        room.c save.c score.c spec_hit.c throw.c trap.c use.c zap.c
index 2bdcd3b2aea564eda41a53b5c08653e7d5c3aa1a..4e48e18d71fae185a0a51ee083e2bddf39b8f8cc 100644 (file)
@@ -36,7 +36,7 @@
 
 #ifndef lint
 /*static char sccsid[] = "from: @(#)message.c  5.3 (Berkeley) 6/1/90";*/
-static char rcsid[] = "$Id: message.c,v 1.3 1993/08/10 16:33:14 mycroft Exp $";
+static char rcsid[] = "$Id: message.c,v 1.4 1993/11/10 10:02:19 cgd Exp $";
 #endif /* not lint */
 
 /*
@@ -196,22 +196,23 @@ rgetchar()
        for(;;) {
                ch = getchar();
 
-#ifdef VREPRINT
-               if (ch == origtermio.c_cc[VREPRINT])
+               switch(ch) {
+               case '\022':
                        wrefresh(curscr);
-               else
-#endif
-#ifdef VSUSP
-               if (ch == origtermio.c_cc[VSUSP]) {
+                       break;
+#ifdef UNIX_BSD4_2
+               case '\032':
                        printf(CL);
                        fflush(stdout);
-                       kill(0, SIGTSTP);
-               } else
+                       tstp();
+                       break;
 #endif
-               if (ch == '&')
+               case '&':
                        save_screen();
-               else
+                       break;
+               default:
                        return(ch);
+               }
        }
 }
 /*
index 920a4dc4503331f96f2408767ec2c6a3d2bb66ca..4b4f06918117e9cd9942548f2b638926cf6078d8 100644 (file)
@@ -36,7 +36,7 @@
 
 #ifndef lint
 /*static char sccsid[] = "from: @(#)score.c    5.5 (Berkeley) 6/1/90";*/
-static char rcsid[] = "$Id: score.c,v 1.3 1993/09/23 22:28:42 mycroft Exp $";
+static char rcsid[] = "$Id: score.c,v 1.4 1993/11/10 10:02:20 cgd Exp $";
 #endif /* not lint */
 
 /*
@@ -207,7 +207,8 @@ short other;
 
        md_lock(1);
 
-       if ((fp = fopen(_PATH_SCOREFILE, "r+")) == NULL) {
+       if ((fp = fopen(_PATH_SCOREFILE, "r+")) == NULL &&
+           (fp = fopen(_PATH_SCOREFILE, "w+")) == NULL) {
                message("cannot read/write/create score file", 0);
                sf_error();
        }