ANSI C; sprintf now returns an int.
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Fri, 23 Oct 1987 03:40:05 +0000 (19:40 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Fri, 23 Oct 1987 03:40:05 +0000 (19:40 -0800)
SCCS-vsn: games/monop/prop.c 5.2
SCCS-vsn: games/trek/getpar.c 4.5
SCCS-vsn: games/trek/shield.c 5.2
SCCS-vsn: games/snake/snake/move.c 5.2

usr/src/games/monop/prop.c
usr/src/games/snake/snake/move.c
usr/src/games/trek/getpar.c
usr/src/games/trek/shield.c

index 734c7a0..cca1ffa 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)prop.c     5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)prop.c     5.2 (Berkeley) %G%";
 #endif not lint
 
 # include      "monop.ext"
 #endif not lint
 
 # include      "monop.ext"
@@ -130,7 +130,7 @@ bid() {
                i = ++i % num_play;
                if (in[i]) {
                        do {
                i = ++i % num_play;
                if (in[i]) {
                        do {
-                               sprintf(buf, "%s: ", name_list[i]);
+                               (void)sprintf(buf, "%s: ", name_list[i]);
                                cur_bid = get_int(buf);
                                if (cur_bid == 0) {
                                        in[i] = FALSE;
                                cur_bid = get_int(buf);
                                if (cur_bid == 0) {
                                        in[i] = FALSE;
index 11c68e4..2bfe4cf 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)move.c     5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)move.c     5.2 (Berkeley) %G%";
 #endif not lint
 
 /*************************************************************************
 #endif not lint
 
 /*************************************************************************
@@ -369,7 +369,7 @@ int v0,v1,v2,v3,v4,v5,v6,v7,v8,v9;
 
        p.line = ps->line+1; p.col = ps->col+1;
        move(&p);
 
        p.line = ps->line+1; p.col = ps->col+1;
        move(&p);
-       sprintf(str,st,v0,v1,v2,v3,v4,v5,v6,v7,v8,v9);
+       (void)sprintf(str,st,v0,v1,v2,v3,v4,v5,v6,v7,v8,v9);
        pstring(str);
 }
 
        pstring(str);
 }
 
@@ -377,7 +377,7 @@ printf(st,v0,v1,v2,v3,v4,v5,v6,v7,v8,v9)
 char *st;
 int v0,v1,v2,v3,v4,v5,v6,v7,v8,v9;
 {
 char *st;
 int v0,v1,v2,v3,v4,v5,v6,v7,v8,v9;
 {
-       sprintf(str,st,v0,v1,v2,v3,v4,v5,v6,v7,v8,v9);
+       (void)sprintf(str,st,v0,v1,v2,v3,v4,v5,v6,v7,v8,v9);
        pstring(str);
 }
 
        pstring(str);
 }
 
index b97d501..5182f04 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)getpar.c   4.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)getpar.c   4.5 (Berkeley) %G%";
 #endif not lint
 
 # include      <stdio.h>
 #endif not lint
 
 # include      <stdio.h>
@@ -173,7 +173,7 @@ char        *t;
 
        if (t == 0)
                t = " \t\n;";
 
        if (t == 0)
                t = " \t\n;";
-       sprintf(format, "%%%d[^%s]", l, t);
+       (void)sprintf(format, "%%%d[^%s]", l, t);
        while (1)
        {
                if ((f = testnl()) && s)
        while (1)
        {
                if ((f = testnl()) && s)
index 8e81841..6325ba2 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)shield.c   5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)shield.c   5.2 (Berkeley) %G%";
 #endif not lint
 
 # include      "trek.h"
 #endif not lint
 
 # include      "trek.h"
@@ -87,9 +87,9 @@ int   f;
        else
        {
                if (*stat)
        else
        {
                if (*stat)
-                       sprintf(s, "%s %s up.  Do you want %s down", device, dev2, dev3);
+                       (void)sprintf(s, "%s %s up.  Do you want %s down", device, dev2, dev3);
                else
                else
-                       sprintf(s, "%s %s down.  Do you want %s up", device, dev2, dev3);
+                       (void)sprintf(s, "%s %s down.  Do you want %s up", device, dev2, dev3);
                if (!getynpar(s))
                        return;
                i = !*stat;
                if (!getynpar(s))
                        return;
                i = !*stat;