aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/buffer.c12
-rw-r--r--src/ex_cmds.c2
-rw-r--r--src/ex_eval.c8
-rw-r--r--src/fileio.c10
-rw-r--r--src/message.c4
-rw-r--r--src/misc1.c4
-rw-r--r--src/ops.c55
-rw-r--r--src/undo.c4
8 files changed, 52 insertions, 47 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');
}
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index b3b6e0c0f2..e7531eee50 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -1190,7 +1190,7 @@ do_filter (
if (linecount > p_report) {
if (do_in) {
vim_snprintf((char *)msg_buf, sizeof(msg_buf),
- _("%ld lines filtered"), (long)linecount);
+ _("%" PRId64 " lines filtered"), (int64_t)linecount);
if (msg(msg_buf) && !msg_scroll)
/* save message to display it after redraw */
set_keep_msg(msg_buf, 0);
diff --git a/src/ex_eval.c b/src/ex_eval.c
index c249b8482b..14226438e6 100644
--- a/src/ex_eval.c
+++ b/src/ex_eval.c
@@ -602,8 +602,8 @@ static void catch_exception(except_T *excp)
set_vim_var_string(VV_EXCEPTION, excp->value, -1);
if (*excp->throw_name != NUL) {
if (excp->throw_lnum != 0)
- vim_snprintf((char *)IObuff, IOSIZE, _("%s, line %ld"),
- excp->throw_name, (long)excp->throw_lnum);
+ vim_snprintf((char *)IObuff, IOSIZE, _("%s, line %" PRId64),
+ excp->throw_name, (int64_t)excp->throw_lnum);
else
vim_snprintf((char *)IObuff, IOSIZE, "%s", excp->throw_name);
set_vim_var_string(VV_THROWPOINT, IObuff, -1);
@@ -648,8 +648,8 @@ static void finish_exception(except_T *excp)
if (*caught_stack->throw_name != NUL) {
if (caught_stack->throw_lnum != 0)
vim_snprintf((char *)IObuff, IOSIZE,
- _("%s, line %ld"), caught_stack->throw_name,
- (long)caught_stack->throw_lnum);
+ _("%s, line %" PRId64), caught_stack->throw_name,
+ (int64_t)caught_stack->throw_lnum);
else
vim_snprintf((char *)IObuff, IOSIZE, "%s",
caught_stack->throw_name);
diff --git a/src/fileio.c b/src/fileio.c
index 25e92893ae..178f4e694c 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -3749,9 +3749,9 @@ restore_backup:
errmsg_allocated = TRUE;
errmsg = alloc(300);
vim_snprintf((char *)errmsg, 300,
- _(
- "E513: write error, conversion failed in line %ld (make 'fenc' empty to override)"),
- (long)write_info.bw_conv_error_lnum);
+ _("E513: write error, conversion failed in line %" PRId64
+ " (make 'fenc' empty to override)"),
+ (int64_t)write_info.bw_conv_error_lnum);
}
} else if (got_int)
errmsg = (char_u *)_(e_interr);
@@ -3817,8 +3817,8 @@ restore_backup:
STRCAT(IObuff, _(" CONVERSION ERROR"));
c = TRUE;
if (write_info.bw_conv_error_lnum != 0)
- vim_snprintf_add((char *)IObuff, IOSIZE, _(" in line %ld;"),
- (long)write_info.bw_conv_error_lnum);
+ vim_snprintf_add((char *)IObuff, IOSIZE, _(" in line %" PRId64 ";"),
+ (int64_t)write_info.bw_conv_error_lnum);
} else if (notconverted) {
STRCAT(IObuff, _("[NOT converted]"));
c = TRUE;
diff --git a/src/message.c b/src/message.c
index 47143281fa..cc84d88732 100644
--- a/src/message.c
+++ b/src/message.c
@@ -1813,8 +1813,8 @@ static void inc_msg_scrolled(void)
else {
len = (int)STRLEN(p) + 40;
tofree = alloc(len);
- vim_snprintf((char *)tofree, len, _("%s line %ld"),
- p, (long)sourcing_lnum);
+ vim_snprintf((char *)tofree, len, _("%s line %" PRId64),
+ p, (int64_t)sourcing_lnum);
p = tofree;
}
set_vim_var_string(VV_SCROLLSTART, p, -1);
diff --git a/src/misc1.c b/src/misc1.c
index a622c4f173..671ab93327 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -2604,10 +2604,10 @@ void msgmore(long n)
} else {
if (n > 0)
vim_snprintf((char *)msg_buf, MSG_BUF_LEN,
- _("%ld more lines"), pn);
+ _("%" PRId64 " more lines"), (int64_t)pn);
else
vim_snprintf((char *)msg_buf, MSG_BUF_LEN,
- _("%ld fewer lines"), pn);
+ _("%" PRId64 " fewer lines"), (int64_t)pn);
}
if (got_int)
vim_strcat(msg_buf, (char_u *)_(" (Interrupted)"), MSG_BUF_LEN);
diff --git a/src/ops.c b/src/ops.c
index 66c1a218c6..bf5508664a 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -5141,28 +5141,30 @@ void cursor_pos_info(void)
if (VIsual_mode == Ctrl_V && curwin->w_curswant < MAXCOL) {
getvcols(curwin, &min_pos, &max_pos, &min_pos.col,
&max_pos.col);
- vim_snprintf((char *)buf1, sizeof(buf1), _("%ld Cols; "),
- (long)(oparg.end_vcol - oparg.start_vcol + 1));
+ vim_snprintf((char *)buf1, sizeof(buf1), _("%" PRId64 " Cols; "),
+ (int64_t)(oparg.end_vcol - oparg.start_vcol + 1));
} else
buf1[0] = NUL;
if (char_count_cursor == byte_count_cursor
&& char_count == byte_count)
vim_snprintf((char *)IObuff, IOSIZE,
- _("Selected %s%ld of %ld Lines; %ld of %ld Words; %ld of %ld Bytes"),
- buf1, line_count_selected,
- (long)curbuf->b_ml.ml_line_count,
- word_count_cursor, word_count,
- byte_count_cursor, byte_count);
+ _("Selected %s%" PRId64 " of %" PRId64 " Lines; %" PRId64
+ " of %" PRId64 " Words; %" PRId64 " of %" PRId64 " Bytes"),
+ buf1, (int64_t)line_count_selected,
+ (int64_t)curbuf->b_ml.ml_line_count,
+ (int64_t)word_count_cursor, (int64_t)word_count,
+ (int64_t)byte_count_cursor, (int64_t)byte_count);
else
vim_snprintf((char *)IObuff, IOSIZE,
- _(
- "Selected %s%ld of %ld Lines; %ld of %ld Words; %ld of %ld Chars; %ld of %ld Bytes"),
- buf1, line_count_selected,
- (long)curbuf->b_ml.ml_line_count,
- word_count_cursor, word_count,
- char_count_cursor, char_count,
- byte_count_cursor, byte_count);
+ _("Selected %s%" PRId64 " of %" PRId64 " Lines; %" PRId64
+ " of %" PRId64 " Words; %" PRId64 " of %" PRId64
+ " Chars; %" PRId64 " of %" PRId64 " Bytes"),
+ buf1, (int64_t)line_count_selected,
+ (int64_t)curbuf->b_ml.ml_line_count,
+ (int64_t)word_count_cursor, (int64_t)word_count,
+ (int64_t)char_count_cursor, (int64_t)char_count,
+ (int64_t)byte_count_cursor, (int64_t)byte_count);
} else {
p = ml_get_curline();
validate_virtcol();
@@ -5173,22 +5175,25 @@ void cursor_pos_info(void)
if (char_count_cursor == byte_count_cursor
&& char_count == byte_count)
vim_snprintf((char *)IObuff, IOSIZE,
- _("Col %s of %s; Line %ld of %ld; Word %ld of %ld; Byte %ld of %ld"),
+ _("Col %s of %s; Line %" PRId64 " of %" PRId64 "; Word %" PRId64
+ " of %" PRId64 "; Byte %" PRId64 " of %" PRId64 ""),
(char *)buf1, (char *)buf2,
- (long)curwin->w_cursor.lnum,
- (long)curbuf->b_ml.ml_line_count,
- word_count_cursor, word_count,
- byte_count_cursor, byte_count);
+ (int64_t)curwin->w_cursor.lnum,
+ (int64_t)curbuf->b_ml.ml_line_count,
+ (int64_t)word_count_cursor, (int64_t)word_count,
+ (int64_t)byte_count_cursor, (int64_t)byte_count);
else
vim_snprintf((char *)IObuff, IOSIZE,
_(
- "Col %s of %s; Line %ld of %ld; Word %ld of %ld; Char %ld of %ld; Byte %ld of %ld"),
+ "Col %s of %s; Line %" PRId64 " of %" PRId64 "; Word %" PRId64
+ " of %" PRId64 "; Char %" PRId64 " of %" PRId64
+ "; Byte %" PRId64 " of %" PRId64 ""),
(char *)buf1, (char *)buf2,
- (long)curwin->w_cursor.lnum,
- (long)curbuf->b_ml.ml_line_count,
- word_count_cursor, word_count,
- char_count_cursor, char_count,
- byte_count_cursor, byte_count);
+ (int64_t)curwin->w_cursor.lnum,
+ (int64_t)curbuf->b_ml.ml_line_count,
+ (int64_t)word_count_cursor, (int64_t)word_count,
+ (int64_t)char_count_cursor, (int64_t)char_count,
+ (int64_t)byte_count_cursor, (int64_t)byte_count);
}
byte_count = bomb_size();
diff --git a/src/undo.c b/src/undo.c
index 0a66a376eb..6d3fa5c040 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -2465,8 +2465,8 @@ static void u_add_time(char_u *buf, size_t buflen, time_t tt)
/* longer ago */
(void)strftime((char *)buf, buflen, "%Y/%m/%d %H:%M:%S", curtime);
} else
- vim_snprintf((char *)buf, buflen, _("%ld seconds ago"),
- (long)(time(NULL) - tt));
+ vim_snprintf((char *)buf, buflen, _("%" PRId64 " seconds ago"),
+ (int64_t)(time(NULL) - tt));
}
/*