aboutsummaryrefslogtreecommitdiff
path: root/src/buffer.c
diff options
context:
space:
mode:
authorEliseo Martínez <eliseomarmol@gmail.com>2014-04-20 14:37:11 +0200
committerThiago de Arruda <tpadilha84@gmail.com>2014-04-23 06:56:32 -0300
commit22dd4f62d3e0391eb88715b663bd84cae4f435c0 (patch)
tree878e33a94feca564010031dbbc7482137cc1d612 /src/buffer.c
parent3f8061f16c820d32d87f2b608c292ae4d9fb0415 (diff)
downloadrneovim-22dd4f62d3e0391eb88715b663bd84cae4f435c0.tar.gz
rneovim-22dd4f62d3e0391eb88715b663bd84cae4f435c0.tar.bz2
rneovim-22dd4f62d3e0391eb88715b663bd84cae4f435c0.zip
Use portable format specifiers: Case %ld - localized - vim_snprintf.
Fix uses of localized "%ld" within vim_snprintf(): - Replace "%ld" with "%" PRId64. - Cast corresponding argument to (int64_t).
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 9164664bbf..8a4323660f 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -2184,8 +2184,8 @@ void buflist_list(exarg_T *eap)
IObuff[len++] = ' ';
} while (--i > 0 && len < IOSIZE - 18);
vim_snprintf((char *)IObuff + len, (size_t)(IOSIZE - len),
- _("line %ld"), buf == curbuf ? curwin->w_cursor.lnum
- : (long)buflist_findlnum(buf));
+ _("line %" PRId64), buf == curbuf ? (int64_t)curwin->w_cursor.lnum
+ : (int64_t)buflist_findlnum(buf));
msg_outtrans(IObuff);
out_flush(); /* output one line at a time */
ui_breakcheck();
@@ -2574,8 +2574,8 @@ fileinfo (
if (curbuf->b_ml.ml_line_count == 1)
vim_snprintf_add((char *)buffer, IOSIZE, _("1 line --%d%%--"), n);
else
- vim_snprintf_add((char *)buffer, IOSIZE, _("%ld lines --%d%%--"),
- (long)curbuf->b_ml.ml_line_count, n);
+ vim_snprintf_add((char *)buffer, IOSIZE, _("%" PRId64 " lines --%d%%--"),
+ (int64_t)curbuf->b_ml.ml_line_count, n);
} else {
vim_snprintf_add((char *)buffer, IOSIZE,
_("line %ld of %ld --%d%%-- col "),
@@ -4595,8 +4595,8 @@ void sign_list_placed(buf_T *rbuf)
msg_putchar('\n');
}
for (p = buf->b_signlist; p != NULL && !got_int; p = p->next) {
- vim_snprintf(lbuf, BUFSIZ, _(" line=%ld id=%d name=%s"),
- (long)p->lnum, p->id, sign_typenr2name(p->typenr));
+ vim_snprintf(lbuf, BUFSIZ, _(" line=%" PRId64 " id=%d name=%s"),
+ (int64_t)p->lnum, p->id, sign_typenr2name(p->typenr));
MSG_PUTS(lbuf);
msg_putchar('\n');
}