Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/curses-v3]: src/games Update for SUS v2 curses - printw takes `char *for...



details:   https://anonhg.NetBSD.org/src/rev/732a0a0bd1f0
branches:  curses-v3
changeset: 479957:732a0a0bd1f0
user:      jdc <jdc%NetBSD.org@localhost>
date:      Fri Jan 21 18:27:20 2000 +0000

description:
Update for SUS v2 curses - printw takes `char *format' not `const char *format'

diffstat:

 games/canfield/canfield/canfield.c |  10 +++++-----
 games/mille/extern.c               |   8 ++++----
 games/mille/mille.h                |   7 ++++---
 games/mille/misc.c                 |   8 ++++----
 games/phantasia/misc.c             |  14 +++++++-------
 games/sail/extern.h                |   6 +++---
 games/sail/pl_7.c                  |  14 +++++++-------
 7 files changed, 34 insertions(+), 33 deletions(-)

diffs (240 lines):

diff -r f4e2287299c7 -r 732a0a0bd1f0 games/canfield/canfield/canfield.c
--- a/games/canfield/canfield/canfield.c        Sun Jan 16 18:58:23 2000 +0000
+++ b/games/canfield/canfield/canfield.c        Fri Jan 21 18:27:20 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: canfield.c,v 1.15 1999/09/12 09:02:20 jsm Exp $        */
+/*     $NetBSD: canfield.c,v 1.15.6.1 2000/01/21 18:27:20 jdc Exp $    */
 
 /*
  * Copyright (c) 1980, 1993
@@ -43,7 +43,7 @@
 #if 0
 static char sccsid[] = "@(#)canfield.c 8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: canfield.c,v 1.15 1999/09/12 09:02:20 jsm Exp $");
+__RCSID("$NetBSD: canfield.c,v 1.15.6.1 2000/01/21 18:27:20 jdc Exp $");
 #endif
 #endif /* not lint */
 
@@ -1588,7 +1588,7 @@
        } while (!done);
 }
 
-const char *const basicinstructions[] = {
+char *const basicinstructions[] = {
        "Here are brief instuctions to the game of Canfield:\n\n",
        "     If you have never played solitaire before, it is recom-\n",
        "mended  that  you  consult  a solitaire instruction book. In\n",
@@ -1610,7 +1610,7 @@
        "push any key when you are finished: ",
        0 };
 
-const char *const bettinginstructions[] = {
+char *const bettinginstructions[] = {
        "     The rules for betting are  somewhat  less  strict  than\n",
        "those  used in the official version of the game. The initial\n",
        "deal costs $13. You may quit at this point  or  inspect  the\n",
@@ -1638,7 +1638,7 @@
 void
 instruct()
 {
-       const char *const *cp;
+       char *const *cp;
 
        move(originrow, origincol);
        printw("This is the game of solitaire called Canfield.  Do\n");
diff -r f4e2287299c7 -r 732a0a0bd1f0 games/mille/extern.c
--- a/games/mille/extern.c      Sun Jan 16 18:58:23 2000 +0000
+++ b/games/mille/extern.c      Fri Jan 21 18:27:20 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: extern.c,v 1.6 1999/09/08 21:17:50 jsm Exp $   */
+/*     $NetBSD: extern.c,v 1.6.6.1 2000/01/21 18:27:30 jdc Exp $       */
 
 /*
  * Copyright (c) 1982, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)extern.c   8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: extern.c,v 1.6 1999/09/08 21:17:50 jsm Exp $");
+__RCSID("$NetBSD: extern.c,v 1.6.6.1 2000/01/21 18:27:30 jdc Exp $");
 #endif
 #endif /* not lint */
 
@@ -56,8 +56,8 @@
        Saved;                  /* set if game just saved               */
 
 char   Initstr[100];           /* initial string for error field       */
-const char     *C_fmt = "%-18.18s",    /* format for printing cards    */
-       *Fromfile = NULL,       /* startup file for game                */
+char   *C_fmt = "%-18.18s";    /* format for printing cards    */
+const char     *Fromfile = NULL,       /* startup file for game        */
        *const _cn[NUM_CARDS] = {       /* Card name buffer             */
                "",
                "25",
diff -r f4e2287299c7 -r 732a0a0bd1f0 games/mille/mille.h
--- a/games/mille/mille.h       Sun Jan 16 18:58:23 2000 +0000
+++ b/games/mille/mille.h       Fri Jan 21 18:27:20 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mille.h,v 1.11 1999/09/30 18:01:32 jsm Exp $   */
+/*     $NetBSD: mille.h,v 1.11.4.1 2000/01/21 18:27:30 jdc Exp $       */
 
 /*
  * Copyright (c) 1982, 1993
@@ -216,7 +216,8 @@
 extern bool    Debug, Finished, Next, On_exit, Order, Saved;
 
 extern char    Initstr[];
-extern const char      *C_fmt, *const *C_name, *Fromfile;
+extern char            *C_fmt;
+extern const char      *const *C_name, *Fromfile;
 
 extern int     Card_no, End, Handstart, Movetype, Numgos,
                Numneed[], Numseen[NUM_CARDS], Play, Window;
@@ -243,7 +244,7 @@
 void   check_more __P((void));
 void   die __P((int)) __attribute__((__noreturn__));
 void   domove __P((void));
-bool   error __P((const char *, ...));
+bool   error __P((char *, ...));
 void   extrapolate __P((PLAY *));
 void   finalscore __P((PLAY *));
 CARD   getcard __P((void));
diff -r f4e2287299c7 -r 732a0a0bd1f0 games/mille/misc.c
--- a/games/mille/misc.c        Sun Jan 16 18:58:23 2000 +0000
+++ b/games/mille/misc.c        Fri Jan 21 18:27:20 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: misc.c,v 1.8 1999/03/29 05:12:39 mrg Exp $     */
+/*     $NetBSD: misc.c,v 1.8.8.1 2000/01/21 18:27:30 jdc Exp $ */
 
 /*
  * Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)misc.c     8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: misc.c,v 1.8 1999/03/29 05:12:39 mrg Exp $");
+__RCSID("$NetBSD: misc.c,v 1.8.8.1 2000/01/21 18:27:30 jdc Exp $");
 #endif
 #endif /* not lint */
 
@@ -65,10 +65,10 @@
 
 bool
 #if __STDC__
-error(const char *str, ...)
+error(char *str, ...)
 #else
 error(str, va_alist)
-       const char *str;
+       char *str;
        va_dcl
 #endif
 {
diff -r f4e2287299c7 -r 732a0a0bd1f0 games/phantasia/misc.c
--- a/games/phantasia/misc.c    Sun Jan 16 18:58:23 2000 +0000
+++ b/games/phantasia/misc.c    Fri Jan 21 18:27:20 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: misc.c,v 1.6 1999/09/08 21:57:19 jsm Exp $     */
+/*     $NetBSD: misc.c,v 1.6.6.1 2000/01/21 18:27:34 jdc Exp $ */
 
 /*
  * misc.c  Phantasia miscellaneous support routines
@@ -937,16 +937,16 @@
 error(whichfile)
        const char   *whichfile;
 {
-       int     (*funcp) __P((const char *,...));
-
        if (Windows) {
-               funcp = printw;
+               printw ("An unrecoverable error has occurred reading %s.
+                   (errno = %d)\n", whichfile, errno);
+               printw ("Please run 'setup' to determine the problem.\n");
                clear();
        } else
-               funcp = printf;
+               printf ("An unrecoverable error has occurred reading %s.
+                   (errno = %d)\n", whichfile, errno);
+               printf ("Please run 'setup' to determine the problem.\n");
 
-       (*funcp) ("An unrecoverable error has occurred reading %s.  (errno = %d)\n", whichfile, errno);
-       (*funcp) ("Please run 'setup' to determine the problem.\n");
        cleanup(TRUE);
        /* NOTREACHED */
 }
diff -r f4e2287299c7 -r 732a0a0bd1f0 games/sail/extern.h
--- a/games/sail/extern.h       Sun Jan 16 18:58:23 2000 +0000
+++ b/games/sail/extern.h       Fri Jan 21 18:27:20 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: extern.h,v 1.13 1999/12/28 18:05:24 jsm Exp $ */
+/*     $NetBSD: extern.h,v 1.13.2.1 2000/01/21 18:27:38 jdc Exp $ */
 
 /*
  * Copyright (c) 1983, 1993
@@ -400,9 +400,9 @@
 void initscreen __P((void));
 void cleanupscreen __P((void));
 void newturn __P((int));
-void Signal __P((const char *, struct ship *, ...))
+void Signal __P((char *, struct ship *, ...))
         __attribute__((__format__(__printf__,1,3)));
-void Msg __P((const char *, ...))
+void Msg __P((char *, ...))
         __attribute__((__format__(__printf__,1,2)));
 void Scroll __P((void));
 void prompt __P((const char *, struct ship *));
diff -r f4e2287299c7 -r 732a0a0bd1f0 games/sail/pl_7.c
--- a/games/sail/pl_7.c Sun Jan 16 18:58:23 2000 +0000
+++ b/games/sail/pl_7.c Fri Jan 21 18:27:20 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pl_7.c,v 1.13 1999/12/28 18:05:25 jsm Exp $    */
+/*     $NetBSD: pl_7.c,v 1.13.2.1 2000/01/21 18:27:39 jdc Exp $        */
 
 /*
  * Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)pl_7.c     8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: pl_7.c,v 1.13 1999/12/28 18:05:25 jsm Exp $");
+__RCSID("$NetBSD: pl_7.c,v 1.13.2.1 2000/01/21 18:27:39 jdc Exp $");
 #endif
 #endif /* not lint */
 
@@ -175,11 +175,11 @@
        va_list ap;
        char format[BUFSIZ];
 #ifndef __STDC__
-       const char *fmt;
+       char *fmt;
        struct ship *ship;
 
        va_start(ap);
-       fmt = va_arg(ap, const char *);
+       fmt = va_arg(ap, char *);
        ship = va_arg(ap, struct ship *);
 #else
        va_start(ap, ship);
@@ -197,7 +197,7 @@
 /*VARARGS2*/
 void
 #ifdef __STDC__
-Msg(const char *fmt, ...)
+Msg(char *fmt, ...)
 #else
 Msg(va_alist)
        va_dcl
@@ -205,10 +205,10 @@
 {
        va_list ap;
 #ifndef __STDC__
-       const char *fmt;
+       char *fmt;
 
        va_start(ap);
-       fmt = va_arg(ap, const char *);
+       fmt = va_arg(ap, char *);
 #else
        va_start(ap, fmt);
 #endif



Home | Main Index | Thread Index | Old Index