summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1998-08-02 15:18:45 +0000
committerbde <bde@FreeBSD.org>1998-08-02 15:18:45 +0000
commitdbc09be291ed507f26f3b2f3fbad6b02ef6bf476 (patch)
tree447936f1245497e41047f88a616f368a498ba092 /contrib
parent559a9a5f7d40627eaecd0fc3cd60b6d49c3853b9 (diff)
downloadFreeBSD-src-dbc09be291ed507f26f3b2f3fbad6b02ef6bf476.zip
FreeBSD-src-dbc09be291ed507f26f3b2f3fbad6b02ef6bf476.tar.gz
Fixed printf format errors.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/nvi/common/msg.c3
-rw-r--r--contrib/nvi/ex/ex_print.c3
-rw-r--r--contrib/nvi/ex/ex_visual.c5
-rw-r--r--contrib/nvi/vi/vs_line.c7
-rw-r--r--contrib/nvi/vi/vs_refresh.c4
5 files changed, 13 insertions, 9 deletions
diff --git a/contrib/nvi/common/msg.c b/contrib/nvi/common/msg.c
index 2b18082..bdf5c02 100644
--- a/contrib/nvi/common/msg.c
+++ b/contrib/nvi/common/msg.c
@@ -472,7 +472,8 @@ mod_rpt(sp)
*p++ = ' ';
tlen += 2;
}
- len = snprintf(p, MAXNUM, "%lu ", sp->rptlines[cnt]);
+ len = snprintf(p, MAXNUM, "%lu ",
+ (u_long)sp->rptlines[cnt]);
p += len;
tlen += len;
t = msg_cat(sp,
diff --git a/contrib/nvi/ex/ex_print.c b/contrib/nvi/ex/ex_print.c
index 4218e08..1cc2500 100644
--- a/contrib/nvi/ex/ex_print.c
+++ b/contrib/nvi/ex/ex_print.c
@@ -122,7 +122,8 @@ ex_print(sp, cmdp, fp, tp, flags)
*/
if (LF_ISSET(E_C_HASH)) {
if (from <= 999999) {
- snprintf(buf, sizeof(buf), "%6ld ", from);
+ snprintf(buf, sizeof(buf), "%6lu ",
+ (u_long)from);
p = buf;
} else
p = "TOOBIG ";
diff --git a/contrib/nvi/ex/ex_visual.c b/contrib/nvi/ex/ex_visual.c
index 82e503d..94479439 100644
--- a/contrib/nvi/ex/ex_visual.c
+++ b/contrib/nvi/ex/ex_visual.c
@@ -81,9 +81,10 @@ ex_visual(sp, cmdp)
if (FL_ISSET(cmdp->iflags, E_C_COUNT))
len = snprintf(buf, sizeof(buf),
- "%luz%c%lu", sp->lno, pos, cmdp->count);
+ "%luz%c%lu", (u_long)sp->lno, pos, cmdp->count);
else
- len = snprintf(buf, sizeof(buf), "%luz%c", sp->lno, pos);
+ len = snprintf(buf, sizeof(buf), "%luz%c",
+ (u_long)sp->lno, pos);
(void)v_event_push(sp, NULL, buf, len, CH_NOMAP | CH_QUOTED);
/*
diff --git a/contrib/nvi/vi/vs_line.c b/contrib/nvi/vi/vs_line.c
index b439de9..b7e8e16 100644
--- a/contrib/nvi/vi/vs_line.c
+++ b/contrib/nvi/vi/vs_line.c
@@ -138,8 +138,8 @@ vs_line(sp, smp, yp, xp)
if (O_ISSET(sp, O_NUMBER)) {
cols_per_screen -= O_NUMBER_LENGTH;
if ((!dne || smp->lno == 1) && skip_cols == 0) {
- nlen = snprintf(cbuf,
- sizeof(cbuf), O_NUMBER_FMT, smp->lno);
+ nlen = snprintf(cbuf, sizeof(cbuf),
+ O_NUMBER_FMT, (u_long)smp->lno);
(void)gp->scr_addstr(sp, cbuf, nlen);
}
}
@@ -506,7 +506,8 @@ vs_number(sp)
break;
(void)gp->scr_move(sp, smp - HMAP, 0);
- len = snprintf(nbuf, sizeof(nbuf), O_NUMBER_FMT, smp->lno);
+ len = snprintf(nbuf, sizeof(nbuf),
+ O_NUMBER_FMT, (u_long)smp->lno);
(void)gp->scr_addstr(sp, nbuf, len);
}
(void)gp->scr_move(sp, oldy, oldx);
diff --git a/contrib/nvi/vi/vs_refresh.c b/contrib/nvi/vi/vs_refresh.c
index 8158760..d954c62 100644
--- a/contrib/nvi/vi/vs_refresh.c
+++ b/contrib/nvi/vi/vs_refresh.c
@@ -845,8 +845,8 @@ vs_modeline(sp)
cols = sp->cols - 1;
if (O_ISSET(sp, O_RULER)) {
vs_column(sp, &curcol);
- len =
- snprintf(buf, sizeof(buf), "%lu,%lu", sp->lno, curcol + 1);
+ len = snprintf(buf, sizeof(buf), "%lu,%lu",
+ (u_long)sp->lno, (u_long)(curcol + 1));
midpoint = (cols - ((len + 1) / 2)) / 2;
if (curlen < midpoint) {
OpenPOWER on IntegriCloud