Source-Changes-HG archive

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

[src/trunk]: src/games/backgammon rename text() to wrtext(), aligning it with...



details:   https://anonhg.NetBSD.org/src/rev/fecd1510e9b5
branches:  trunk
changeset: 753272:fecd1510e9b5
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Mar 22 05:10:19 2010 +0000

description:
rename text() to wrtext(), aligning it with most other output routines,
and avoiding a compile error on powerpc64.

XXX: this tries to make a ".text" symbol, which already exists...

diffstat:

 games/backgammon/backgammon/main.c     |  16 ++++++++--------
 games/backgammon/backgammon/text.c     |   6 +++---
 games/backgammon/common_source/back.h  |   4 ++--
 games/backgammon/common_source/table.c |   6 +++---
 games/backgammon/teachgammon/teach.c   |  30 +++++++++++++++---------------
 games/backgammon/teachgammon/ttext2.c  |   8 ++++----
 games/backgammon/teachgammon/tutor.c   |   6 +++---
 7 files changed, 38 insertions(+), 38 deletions(-)

diffs (283 lines):

diff -r 3a96e04276ae -r fecd1510e9b5 games/backgammon/backgammon/main.c
--- a/games/backgammon/backgammon/main.c        Mon Mar 22 05:08:54 2010 +0000
+++ b/games/backgammon/backgammon/main.c        Mon Mar 22 05:10:19 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.27 2009/08/12 05:17:57 dholland Exp $       */
+/*     $NetBSD: main.c,v 1.28 2010/03/22 05:10:19 mrg Exp $    */
 
 /*
  * Copyright (c) 1980, 1993
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)main.c     8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: main.c,v 1.27 2009/08/12 05:17:57 dholland Exp $");
+__RCSID("$NetBSD: main.c,v 1.28 2010/03/22 05:10:19 mrg Exp $");
 #endif
 #endif                         /* not lint */
 
@@ -133,15 +133,15 @@
 
        /* check if restored game and save flag for later */
        if ((rfl = rflag) != 0) {
-               text(message);  /* print message */
-               text(contin);
+               wrtext(message);        /* print message */
+               wrtext(contin);
                wrboard();      /* print board */
                /* if new game, pretend to be a non-restored game */
                if (cturn == 0)
                        rflag = 0;
        } else {
                rscore = wscore = 0;    /* zero score */
-               text(message);  /* update message without pausing */
+               wrtext(message);        /* update message without pausing */
 
                if (aflag) {    /* print rules */
                        writel(rules);
@@ -158,7 +158,7 @@
                                writel(need);
                                if (yorn(0)) {  /* print instructions */
                                        clear();
-                                       text(instr);
+                                       wrtext(instr);
                                }
                        }
                }
@@ -223,7 +223,7 @@
                } else
                        if (!aflag)
                                /* pause to read message */
-                               text(contin);
+                               wrtext(contin);
 
                wrboard();      /* print board */
 
@@ -416,7 +416,7 @@
                                                curmove(20, 0);
                                        else
                                                writec('\n');
-                                       text(helpm);
+                                       wrtext(helpm);
                                        if (tflag)
                                                curmove(cturn == -1 ? 
                                                    18 : 19, 0);
diff -r 3a96e04276ae -r fecd1510e9b5 games/backgammon/backgammon/text.c
--- a/games/backgammon/backgammon/text.c        Mon Mar 22 05:08:54 2010 +0000
+++ b/games/backgammon/backgammon/text.c        Mon Mar 22 05:10:19 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: text.c,v 1.8 2005/07/01 01:12:39 jmc Exp $     */
+/*     $NetBSD: text.c,v 1.9 2010/03/22 05:10:19 mrg Exp $     */
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)text.c     8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: text.c,v 1.8 2005/07/01 01:12:39 jmc Exp $");
+__RCSID("$NetBSD: text.c,v 1.9 2010/03/22 05:10:19 mrg Exp $");
 #endif
 #endif /* not lint */
 
@@ -107,7 +107,7 @@
 0};
 
 int
-text(const char  *const *t)
+wrtext(const char  *const *t)
 {
        int     i;
        const char   *s, *a;
diff -r 3a96e04276ae -r fecd1510e9b5 games/backgammon/common_source/back.h
--- a/games/backgammon/common_source/back.h     Mon Mar 22 05:08:54 2010 +0000
+++ b/games/backgammon/common_source/back.h     Mon Mar 22 05:10:19 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: back.h,v 1.16 2009/08/12 05:17:57 dholland Exp $       */
+/*     $NetBSD: back.h,v 1.17 2010/03/22 05:10:19 mrg Exp $    */
 
 /*
  * Copyright (c) 1980, 1993
@@ -165,7 +165,7 @@
 void   refresh(void);
 void   roll(void);
 void   save(int);
-int    text(const char *const *);
+int    wrtext(const char *const *);
 void   wrboard(void);
 void   wrhit(int);
 void   wrint(int);
diff -r 3a96e04276ae -r fecd1510e9b5 games/backgammon/common_source/table.c
--- a/games/backgammon/common_source/table.c    Mon Mar 22 05:08:54 2010 +0000
+++ b/games/backgammon/common_source/table.c    Mon Mar 22 05:10:19 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: table.c,v 1.10 2009/08/12 05:17:57 dholland Exp $      */
+/*     $NetBSD: table.c,v 1.11 2010/03/22 05:10:19 mrg Exp $   */
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)table.c    8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: table.c,v 1.10 2009/08/12 05:17:57 dholland Exp $");
+__RCSID("$NetBSD: table.c,v 1.11 2010/03/22 05:10:19 mrg Exp $");
 #endif
 #endif /* not lint */
 
@@ -262,7 +262,7 @@
                                        curmove(20, 0);
                                else
                                        writec('\n');
-                               (void) text(help2);
+                               (void) wrtext(help2);
                                if (tflag) {
                                        curmove(cturn == -1 ? 18 : 19, 39);
                                } else {
diff -r 3a96e04276ae -r fecd1510e9b5 games/backgammon/teachgammon/teach.c
--- a/games/backgammon/teachgammon/teach.c      Mon Mar 22 05:08:54 2010 +0000
+++ b/games/backgammon/teachgammon/teach.c      Mon Mar 22 05:10:19 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: teach.c,v 1.20 2009/08/12 05:17:57 dholland Exp $      */
+/*     $NetBSD: teach.c,v 1.21 2010/03/22 05:10:19 mrg Exp $   */
 
 /*
  * Copyright (c) 1980, 1993
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)teach.c    8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: teach.c,v 1.20 2009/08/12 05:17:57 dholland Exp $");
+__RCSID("$NetBSD: teach.c,v 1.21 2010/03/22 05:10:19 mrg Exp $");
 #endif
 #endif                         /* not lint */
 
@@ -87,9 +87,9 @@
                raw.c_oflag &= ~(ONLCR | OXTABS);
                clear();
        }
-       text(hello);
-       text(list);
-       i = text(contin);
+       wrtext(hello);
+       wrtext(list);
+       i = wrtext(contin);
        if (i == 0)
                i = 2;
        init();
@@ -99,42 +99,42 @@
                        leave();
 
                case 2:
-                       if ((i = text(intro1)) != 0)
+                       if ((i = wrtext(intro1)) != 0)
                                break;
                        wrboard();
-                       if ((i = text(intro2)) != 0)
+                       if ((i = wrtext(intro2)) != 0)
                                break;
 
                case 3:
-                       if ((i = text(moves)) != 0)
+                       if ((i = wrtext(moves)) != 0)
                                break;
 
                case 4:
-                       if ((i = text(removepiece)) != 0)
+                       if ((i = wrtext(removepiece)) != 0)
                                break;
 
                case 5:
-                       if ((i = text(hits)) != 0)
+                       if ((i = wrtext(hits)) != 0)
                                break;
 
                case 6:
-                       if ((i = text(endgame)) != 0)
+                       if ((i = wrtext(endgame)) != 0)
                                break;
 
                case 7:
-                       if ((i = text(doubl)) != 0)
+                       if ((i = wrtext(doubl)) != 0)
                                break;
 
                case 8:
-                       if ((i = text(stragy)) != 0)
+                       if ((i = wrtext(stragy)) != 0)
                                break;
 
                case 9:
-                       if ((i = text(prog)) != 0)
+                       if ((i = wrtext(prog)) != 0)
                                break;
 
                case 10:
-                       if ((i = text(lastch)) != 0)
+                       if ((i = wrtext(lastch)) != 0)
                                break;
                }
        tutor();
diff -r 3a96e04276ae -r fecd1510e9b5 games/backgammon/teachgammon/ttext2.c
--- a/games/backgammon/teachgammon/ttext2.c     Mon Mar 22 05:08:54 2010 +0000
+++ b/games/backgammon/teachgammon/ttext2.c     Mon Mar 22 05:10:19 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ttext2.c,v 1.8 2005/07/01 01:12:39 jmc Exp $   */
+/*     $NetBSD: ttext2.c,v 1.9 2010/03/22 05:10:19 mrg Exp $   */
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)ttext2.c   8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: ttext2.c,v 1.8 2005/07/01 01:12:39 jmc Exp $");
+__RCSID("$NetBSD: ttext2.c,v 1.9 2010/03/22 05:10:19 mrg Exp $");
 #endif
 #endif                         /* not lint */
 
@@ -127,7 +127,7 @@
 
 
 int
-text(const char *const *txt)
+wrtext(const char *const *txt)
 {
        const char  *const *begin;
        const char   *a;
@@ -157,7 +157,7 @@
                                                        clear();
                                        } else
                                                writec('\n');
-                                       text(list);
+                                       wrtext(list);
                                        writel(prompt);
                                        continue;
                                }
diff -r 3a96e04276ae -r fecd1510e9b5 games/backgammon/teachgammon/tutor.c
--- a/games/backgammon/teachgammon/tutor.c      Mon Mar 22 05:08:54 2010 +0000
+++ b/games/backgammon/teachgammon/tutor.c      Mon Mar 22 05:10:19 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tutor.c,v 1.8 2009/08/12 05:17:57 dholland Exp $       */
+/*     $NetBSD: tutor.c,v 1.9 2010/03/22 05:10:19 mrg Exp $    */
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)tutor.c    8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: tutor.c,v 1.8 2009/08/12 05:17:57 dholland Exp $");
+__RCSID("$NetBSD: tutor.c,v 1.9 2010/03/22 05:10:19 mrg Exp $");
 #endif
 #endif                         /* not lint */
 
@@ -89,7 +89,7 @@
                }
                if (tflag)
                        curmove(18, 0);
-               text(*test[i].com);
+               wrtext(*test[i].com);
                if (!tflag)
                        writec('\n');
                if (i == maxmoves)



Home | Main Index | Thread Index | Old Index