--- bsd-games-2.17/battlestar/room.c.orig 2003-12-16 18:47:37.000000000 -0800
+++ bsd-games-2.17/battlestar/room.c 2017-05-18 18:07:39.212393764 -0700
@@ -58,7 +58,7 @@
putchar(c);
} else {
if (c != '*')
- printf(truedirec(compass, c));
+ printf("%s", truedirec(compass, c));
compass++;
}
}
--- bsd-games-2.17/cribbage/io.c.orig 2017-05-18 18:20:38.416305677 -0700
+++ bsd-games-2.17/cribbage/io.c 2017-05-18 18:44:40.525540333 -0700
@@ -103,13 +103,13 @@
if (brfrank)
addmsg("%1.1s", rankchar[c.rank]);
else
- addmsg(rankname[c.rank]);
+ addmsg("%s", rankname[c.rank]);
if (mid != NULL)
- addmsg(mid);
+ addmsg("%s", mid);
if (brfsuit)
addmsg("%1.1s", suitchar[c.suit]);
else
- addmsg(suitname[c.suit]);
+ addmsg("%s", suitname[c.suit]);
return (TRUE);
}
@@ -192,7 +192,7 @@
exit(74);
}
for (;;) {
- msg(prompt);
+ msg("%s", prompt);
if (incard(&crd)) { /* if card is full card */
if (!is_one(crd, hand, n))
msg("That's not in your hand");
@@ -345,7 +345,7 @@
int sum;
for (sum = 0;;) {
- msg(prompt);
+ msg("%s", prompt);
if (!(p = xgetline()) || *p == '\0') {
msg(quiet ? "Not a number" :
"That doesn't look like a number");
--- bsd-games-2.17/hack/hack.apply.c.orig 2004-01-27 12:52:07.000000000 -0800
+++ bsd-games-2.17/hack/hack.apply.c 2017-05-18 18:47:57.690735298 -0700
@@ -392,7 +392,7 @@
digtxt = "Now what exactly was it that you were digging in?";
mnewsym(dpx, dpy);
prl(dpx, dpy);
- pline(digtxt); /* after mnewsym & prl */
+ pline("%s", digtxt); /* after mnewsym & prl */
return (0);
} else {
if (IS_WALL(levl[dpx][dpy].typ)) {
--- bsd-games-2.17/hack/hack.eat.c.orig 2003-12-16 18:47:37.000000000 -0800
+++ bsd-games-2.17/hack/hack.eat.c 2017-05-18 18:48:58.618413276 -0700
@@ -132,7 +132,7 @@
useup(tin.tin);
r = rn2(2 * TTSZ);
if (r < TTSZ) {
- pline(tintxts[r].txt);
+ pline("%s", tintxts[r].txt);
lesshungry(tintxts[r].nut);
if (r == 1) { /* SALMON */
Glib = rnd(15);
--- bsd-games-2.17/hack/hack.end.c.orig 2017-05-18 18:20:38.432305860 -0700
+++ bsd-games-2.17/hack/hack.end.c 2017-05-18 21:23:05.962841955 -0700
@@ -539,7 +539,7 @@
if (t1->maxlvl != t1->level)
Sprintf(eos(linebuf), " [max %d]", t1->maxlvl);
if (quit && t1->death[4])
- Sprintf(eos(linebuf), t1->death + 4);
+ Sprintf(eos(linebuf), "%s", t1->death + 4);
}
if (killed)
Sprintf(eos(linebuf), " by %s%s",
@@ -552,7 +552,7 @@
char *bp = eos(linebuf);
char hpbuf[10];
int hppos;
- Sprintf(hpbuf, (t1->hp > 0) ? itoa(t1->hp) : "-");
+ Sprintf(hpbuf, "%s", (t1->hp > 0) ? itoa(t1->hp) : "-");
hppos = COLNO - 7 - strlen(hpbuf);
if (bp <= linebuf + hppos) {
while (bp < linebuf + hppos)
--- bsd-games-2.17/hack/hack.invent.c.orig 2004-01-27 12:52:07.000000000 -0800
+++ bsd-games-2.17/hack/hack.invent.c 2017-05-18 21:24:59.807943020 -0700
@@ -671,7 +671,7 @@
if (ckfn && !(*ckfn) (otmp))
continue;
if (!allflag) {
- pline(xprname(otmp, ilet));
+ pline("%s", xprname(otmp, ilet));
addtopl(" [nyaq]? ");
sym = readchar();
} else
@@ -717,7 +717,7 @@
prinv(obj)
struct obj *obj;
{
- pline(xprname(obj, obj_to_let(obj)));
+ pline("%s", xprname(obj, obj_to_let(obj)));
}
static char *
--- bsd-games-2.17/hack/hack.main.c.orig 2017-05-18 18:20:38.432305860 -0700
+++ bsd-games-2.17/hack/hack.main.c 2017-05-18 21:25:43.616351447 -0700
@@ -463,7 +463,7 @@
}
if (multi < 0) {
if (!++multi) {
- pline(nomovemsg ? nomovemsg :
+ pline("%s", nomovemsg ? nomovemsg :
"You can move again.");
nomovemsg = 0;
if (afternmv)
--- bsd-games-2.17/hack/hack.options.c.orig 2004-01-02 10:04:51.000000000 -0800
+++ bsd-games-2.17/hack/hack.options.c 2017-05-18 21:26:27.148753037 -0700
@@ -268,7 +268,7 @@
if (*--eop == ',')
*eop = 0;
}
- pline(buf);
+ pline("%s", buf);
} else
parseoptions(buf, FALSE);
--- bsd-games-2.17/hack/hack.pager.c.orig 2003-12-16 18:47:37.000000000 -0800
+++ bsd-games-2.17/hack/hack.pager.c 2017-05-18 21:28:03.938647785 -0700
@@ -104,7 +104,7 @@
buf[0] = q;
(void) strncpy(buf + 1, " ", 7);
}
- pline(buf);
+ pline("%s", buf);
if (ep[-1] == ';') {
pline("More info? ");
if (readchar() == 'y') {
@@ -298,7 +298,7 @@
}
/* --- now we really do it --- */
if (mode == 2 && linect == 1) /* topline only */
- pline(texthead->line_text);
+ pline("%s", texthead->line_text);
else if (mode == 2) {
int curline, lth;
--- bsd-games-2.17/hack/hack.potion.c.orig 2003-12-16 18:47:37.000000000 -0800
+++ bsd-games-2.17/hack/hack.potion.c 2017-05-18 21:27:13.934185215 -0700
@@ -286,7 +286,7 @@
if (flags.beginner)
pline("You have a strange feeling for a moment, then it passes.");
else
- pline(txt);
+ pline("%s", txt);
if (!objects[obj->otyp].oc_name_known && !objects[obj->otyp].oc_uname)
docall(obj);
useup(obj);
--- bsd-games-2.17/hack/hack.rumors.c.orig 2003-12-16 18:47:37.000000000 -0800
+++ bsd-games-2.17/hack/hack.rumors.c 2017-05-18 21:28:46.907045804 -0700
@@ -112,7 +112,7 @@
if ((ep = strchr(line, '\n')) != 0)
*ep = 0;
pline("This cookie has a scrap of paper inside! It reads: ");
- pline(line);
+ pline("%s", line);
}
void
--- bsd-games-2.17/hack/hack.timeout.c.orig 2003-12-16 18:47:37.000000000 -0800
+++ bsd-games-2.17/hack/hack.timeout.c 2017-05-18 21:29:57.511700875 -0700
@@ -126,7 +126,7 @@
long i = (Stoned & TIMEOUT);
if (i > 0 && i <= SIZE(stoned_texts))
- pline(stoned_texts[SIZE(stoned_texts) - i]);
+ pline("%s", stoned_texts[SIZE(stoned_texts) - i]);
if (i == 5)
Fast = 0;
if (i == 3)
--- bsd-games-2.17/hunt/hunt/hunt.c.orig 2017-05-18 21:38:16.488366136 -0700
+++ bsd-games-2.17/hunt/hunt/hunt.c 2017-05-18 21:52:37.700549544 -0700
@@ -914,7 +914,7 @@
int serrno = errno;
fincurs();
errno = serrno;
- err(eval, mesg ? mesg : "");
+ err(eval, "%s", mesg ? mesg : "");
}
/*
@@ -928,7 +928,7 @@
const char *mesg;
{
fincurs();
- errx(eval, mesg ? mesg : "");
+ errx(eval, "%s", mesg ? mesg : "");
}
#if !defined(USE_CURSES) && defined(SIGTSTP)
--- bsd-games-2.17/monop/misc.c.orig 2004-12-07 05:34:21.000000000 -0800
+++ bsd-games-2.17/monop/misc.c 2017-05-18 21:53:32.207072459 -0700
@@ -101,7 +101,7 @@
for (;;) {
inter:
- printf(prompt);
+ printf("%s", prompt);
num = 0;
for (sp = buf; (c=getchar()) != '\n'; *sp++ = c)
if (c == -1) /* check for interrupted system call */
--- bsd-games-2.17/sail/assorted.c.orig 2003-12-16 18:47:37.000000000 -0800
+++ bsd-games-2.17/sail/assorted.c 2017-05-18 22:10:27.624338039 -0700
@@ -163,7 +163,7 @@
errx(1, "Unknown shot type %d", shot);
}
- makesignal(from, message, on);
+ makesignal(from, "%s", on, message);
if (roll == 6 && rig) {
switch(Rhit) {
case 0:
@@ -190,7 +190,7 @@
default:
errx(1, "Bad Rhit = %d", Rhit);
}
- makemsg(on, message);
+ makemsg(on, "%s", message);
} else if (roll == 6) {
switch (Hhit) {
case 0:
@@ -218,7 +218,7 @@
default:
errx(1, "Bad Hhit = %d", Hhit);
}
- makemsg(on, message);
+ makemsg(on, "%s", message);
}
/*
if (Chit > 1 && on->file->readyL&R_INITIAL && on->file->readyR&R_INITIAL) {