Fix %l[du] formats that have int arguments on ILP32; might break LP64.
This commit is contained in:
parent
90c3bfc9b0
commit
17b67bd091
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ex_equal.c,v 1.7 1998/01/09 08:07:47 perry Exp $ */
|
||||
/* $NetBSD: ex_equal.c,v 1.8 2000/10/18 01:42:05 tv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993, 1994
|
||||
@ -56,6 +56,6 @@ ex_equal(sp, cmdp)
|
||||
} else
|
||||
lno = cmdp->addr1.lno;
|
||||
|
||||
(void)ex_printf(sp, "%ld\n", lno);
|
||||
(void)ex_printf(sp, "%ld\n", (long)lno);
|
||||
return (0);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ex_read.c,v 1.8 2000/05/31 19:49:25 jdc Exp $ */
|
||||
/* $NetBSD: ex_read.c,v 1.9 2000/10/18 01:42:10 tv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993, 1994
|
||||
@ -336,7 +336,8 @@ ex_readfp(sp, name, fp, fm, nlinesp, silent)
|
||||
if (!silent) {
|
||||
p = msg_print(sp, name, &nf);
|
||||
msgq(sp, M_INFO,
|
||||
"148|%s: %lu lines, %lu characters", p, lcnt, ccnt);
|
||||
"148|%s: %lu lines, %lu characters", p,
|
||||
(unsigned long)lcnt, (unsigned long)ccnt);
|
||||
if (nf)
|
||||
FREE_SPACE(sp, p, 0);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ex_shell.c,v 1.8 2000/05/31 19:49:25 jdc Exp $ */
|
||||
/* $NetBSD: ex_shell.c,v 1.9 2000/10/18 01:42:10 tv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993, 1994
|
||||
@ -176,7 +176,7 @@ proc_wait(sp, pid, cmd, silent, okpipe)
|
||||
p = msg_print(sp, cmd, &nf);
|
||||
len = strlen(p);
|
||||
msgq(sp, M_ERR, "%.*s%s: received signal: %s%s",
|
||||
MIN(len, 20), p, len > 20 ? " ..." : "",
|
||||
(int)MIN(len, 20), p, len > 20 ? " ..." : "",
|
||||
sigmsg(WTERMSIG(pstat)),
|
||||
WCOREDUMP(pstat) ? "; core dumped" : "");
|
||||
if (nf)
|
||||
@ -198,7 +198,7 @@ proc_wait(sp, pid, cmd, silent, okpipe)
|
||||
p = msg_print(sp, cmd, &nf);
|
||||
len = strlen(p);
|
||||
msgq(sp, M_ERR, "%.*s%s: exited with status %d",
|
||||
MIN(len, 20), p, len > 20 ? " ..." : "",
|
||||
(int)MIN(len, 20), p, len > 20 ? " ..." : "",
|
||||
WEXITSTATUS(pstat));
|
||||
if (nf)
|
||||
FREE_SPACE(sp, p, 0);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vs_line.c,v 1.2 1998/01/09 08:08:50 perry Exp $ */
|
||||
/* $NetBSD: vs_line.c,v 1.3 2000/10/18 01:42:12 tv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993, 1994
|
||||
@ -141,7 +141,8 @@ vs_line(sp, smp, yp, xp)
|
||||
cols_per_screen -= O_NUMBER_LENGTH;
|
||||
if ((!dne || smp->lno == 1) && skip_cols == 0) {
|
||||
nlen = snprintf(cbuf,
|
||||
sizeof(cbuf), O_NUMBER_FMT, smp->lno);
|
||||
sizeof(cbuf), O_NUMBER_FMT,
|
||||
(unsigned long)smp->lno);
|
||||
(void)gp->scr_addstr(sp, cbuf, nlen);
|
||||
}
|
||||
}
|
||||
@ -504,7 +505,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,
|
||||
(unsigned long)smp->lno);
|
||||
(void)gp->scr_addstr(sp, nbuf, len);
|
||||
}
|
||||
(void)gp->scr_move(sp, oldy, oldx);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vs_refresh.c,v 1.4 2000/03/13 23:22:53 soren Exp $ */
|
||||
/* $NetBSD: vs_refresh.c,v 1.5 2000/10/18 01:42:13 tv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993, 1994
|
||||
@ -791,7 +791,8 @@ vs_modeline(sp)
|
||||
*/
|
||||
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",
|
||||
(unsigned long)sp->lno, (unsigned long)(curcol + 1));
|
||||
|
||||
midpoint = (cols - ((len + 1) / 2)) / 2;
|
||||
if (curlen < midpoint) {
|
||||
|
Loading…
Reference in New Issue
Block a user