]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/bs.c
ncurses 5.7 - patch 20090124
[ncurses.git] / test / bs.c
index 4330f902d7c180f253d0db03bb4729391b0b353d..f9572beb9e6de46ec7d243214717bf2bae981917 100644 (file)
--- a/test/bs.c
+++ b/test/bs.c
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -34,7 +34,7 @@
  * v2.0 featuring strict ANSI/POSIX conformance, November 1993.
  * v2.1 with ncurses mouse support, September 1995
  *
  * v2.0 featuring strict ANSI/POSIX conformance, November 1993.
  * v2.1 with ncurses mouse support, September 1995
  *
- * $Id: bs.c,v 1.45 2007/04/07 17:13:11 tom Exp $
+ * $Id: bs.c,v 1.47 2008/08/03 18:30:28 tom Exp $
  */
 
 #include <test.priv.h>
  */
 
 #include <test.priv.h>
@@ -222,7 +222,7 @@ intro(void)
 
     if ((tmpname = getlogin()) != 0) {
        (void) strcpy(name, tmpname);
 
     if ((tmpname = getlogin()) != 0) {
        (void) strcpy(name, tmpname);
-       name[0] = toupper(name[0]);
+       name[0] = toupper(UChar(name[0]));
     } else
        (void) strcpy(name, dftname);
 
     } else
        (void) strcpy(name, dftname);
 
@@ -465,6 +465,7 @@ initgame(void)
            (void) clearok(stdscr, TRUE);
            (void) refresh();
        } else if (c == 'r') {
            (void) clearok(stdscr, TRUE);
            (void) refresh();
        } else if (c == 'r') {
+           assert(ss != 0);
            prompt(1, "Random-placing your %s", ss->name);
            randomplace(PLAYER, ss);
            placeship(PLAYER, ss, TRUE);
            prompt(1, "Random-placing your %s", ss->name);
            randomplace(PLAYER, ss);
            placeship(PLAYER, ss, TRUE);
@@ -480,6 +481,7 @@ initgame(void)
                }
            error((char *) NULL);
        } else if (strchr("hjkl8462", c)) {
                }
            error((char *) NULL);
        } else if (strchr("hjkl8462", c)) {
+           assert(ss != 0);
            ss->x = curx;
            ss->y = cury;
 
            ss->x = curx;
            ss->y = cury;