mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 00:08:19 +00:00
Use portable format specifiers: Case %ld - localized - EMSGN.
Fix uses of localized "%ld" within EMSGN(): - Replace "%ld" with "%" PRId64. - No argument cast needed. EMSGN() will take care of that.
This commit is contained in:

committed by
Thiago de Arruda

parent
bf3b9d0ecb
commit
b8f3ff2a69
@@ -916,7 +916,7 @@ do_buffer (
|
||||
if (start == DOBUF_FIRST) {
|
||||
/* don't warn when deleting */
|
||||
if (!unload)
|
||||
EMSGN(_("E86: Buffer %ld does not exist"), count);
|
||||
EMSGN(_("E86: Buffer %" PRId64 " does not exist"), count);
|
||||
} else if (dir == FORWARD)
|
||||
EMSG(_("E87: Cannot go beyond last buffer"));
|
||||
else
|
||||
@@ -948,8 +948,8 @@ do_buffer (
|
||||
if (bufIsChanged(buf))
|
||||
return FAIL;
|
||||
} else {
|
||||
EMSGN(_(
|
||||
"E89: No write since last change for buffer %ld (add ! to override)"),
|
||||
EMSGN(_("E89: No write since last change for buffer %" PRId64
|
||||
" (add ! to override)"),
|
||||
buf->b_fnum);
|
||||
return FAIL;
|
||||
}
|
||||
@@ -1575,7 +1575,7 @@ int buflist_getfile(int n, linenr_T lnum, int options, int forceit)
|
||||
if ((options & GETF_ALT) && n == 0)
|
||||
EMSG(_(e_noalt));
|
||||
else
|
||||
EMSGN(_("E92: Buffer %ld not found"), n);
|
||||
EMSGN(_("E92: Buffer %" PRId64 " not found"), n);
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
|
@@ -142,7 +142,7 @@ void diff_buf_add(buf_T *buf)
|
||||
}
|
||||
}
|
||||
|
||||
EMSGN(_("E96: Can not diff more than %ld buffers"), DB_COUNT);
|
||||
EMSGN(_("E96: Can not diff more than %" PRId64 " buffers"), DB_COUNT);
|
||||
}
|
||||
|
||||
/// Find buffer "buf" in the list of diff buffers for the current tab page.
|
||||
|
@@ -2460,7 +2460,7 @@ void do_wqall(exarg_T *eap)
|
||||
break;
|
||||
}
|
||||
if (buf->b_ffname == NULL) {
|
||||
EMSGN(_("E141: No file name for buffer %ld"), (long)buf->b_fnum);
|
||||
EMSGN(_("E141: No file name for buffer %" PRId64), buf->b_fnum);
|
||||
++error;
|
||||
} else if (check_readonly(&eap->forceit, buf)
|
||||
|| check_overwrite(eap, buf, buf->b_fname, buf->b_ffname,
|
||||
@@ -6123,7 +6123,7 @@ void ex_sign(exarg_T *eap)
|
||||
foldOpenCursor();
|
||||
}
|
||||
else
|
||||
EMSGN(_("E157: Invalid sign ID: %ld"), id);
|
||||
EMSGN(_("E157: Invalid sign ID: %" PRId64), id);
|
||||
}
|
||||
else if (idx == SIGNCMD_UNPLACE)
|
||||
{
|
||||
|
@@ -4267,7 +4267,7 @@ check_more (
|
||||
if (n == 1)
|
||||
EMSG(_("E173: 1 more file to edit"));
|
||||
else
|
||||
EMSGN(_("E173: %ld more files to edit"), n);
|
||||
EMSGN(_("E173: %" PRId64 " more files to edit"), n);
|
||||
quitmore = 2; /* next try to quit is allowed */
|
||||
}
|
||||
return FAIL;
|
||||
|
@@ -623,7 +623,7 @@ cs_reading_emsg (
|
||||
int idx /* connection index */
|
||||
)
|
||||
{
|
||||
EMSGN(_("E262: error reading cscope connection %ld"), idx);
|
||||
EMSGN(_("E262: error reading cscope connection %" PRId64), idx);
|
||||
}
|
||||
|
||||
#define CSREAD_BUFSIZE 2048
|
||||
|
@@ -2085,7 +2085,7 @@ ml_get_buf (
|
||||
/* Avoid giving this message for a recursive call, may happen when
|
||||
* the GUI redraws part of the text. */
|
||||
++recursive;
|
||||
EMSGN(_("E315: ml_get: invalid lnum: %ld"), lnum);
|
||||
EMSGN(_("E315: ml_get: invalid lnum: %" PRId64), lnum);
|
||||
--recursive;
|
||||
}
|
||||
errorret:
|
||||
@@ -2117,7 +2117,7 @@ errorret:
|
||||
/* Avoid giving this message for a recursive call, may happen
|
||||
* when the GUI redraws part of the text. */
|
||||
++recursive;
|
||||
EMSGN(_("E316: ml_get: cannot find line %ld"), lnum);
|
||||
EMSGN(_("E316: ml_get: cannot find line %" PRId64), lnum);
|
||||
--recursive;
|
||||
}
|
||||
goto errorret;
|
||||
@@ -2977,7 +2977,7 @@ static void ml_flush_line(buf_T *buf)
|
||||
|
||||
hp = ml_find_line(buf, lnum, ML_FIND);
|
||||
if (hp == NULL)
|
||||
EMSGN(_("E320: Cannot find line %ld"), lnum);
|
||||
EMSGN(_("E320: Cannot find line %" PRId64), lnum);
|
||||
else {
|
||||
dp = (DATA_BL *)(hp->bh_data);
|
||||
idx = lnum - buf->b_ml.ml_locked_low;
|
||||
@@ -3237,11 +3237,11 @@ static bhdr_T *ml_find_line(buf_T *buf, linenr_T lnum, int action)
|
||||
}
|
||||
if (idx >= (int)pp->pb_count) { /* past the end: something wrong! */
|
||||
if (lnum > buf->b_ml.ml_line_count)
|
||||
EMSGN(_("E322: line number out of range: %ld past the end"),
|
||||
EMSGN(_("E322: line number out of range: %" PRId64 " past the end"),
|
||||
lnum - buf->b_ml.ml_line_count);
|
||||
|
||||
else
|
||||
EMSGN(_("E323: line count wrong in block %ld"), bnum);
|
||||
EMSGN(_("E323: line count wrong in block %" PRId64), bnum);
|
||||
goto error_block;
|
||||
}
|
||||
if (action == ML_DELETE) {
|
||||
|
@@ -3386,7 +3386,7 @@ int set_errorlist(win_T *wp, list_T *list, int action, char_u *title)
|
||||
if (bufnum != 0 && (buflist_findnr(bufnum) == NULL)) {
|
||||
if (!did_bufnr_emsg) {
|
||||
did_bufnr_emsg = TRUE;
|
||||
EMSGN(_("E92: Buffer %ld not found"), bufnum);
|
||||
EMSGN(_("E92: Buffer %" PRId64 " not found"), bufnum);
|
||||
}
|
||||
valid = FALSE;
|
||||
bufnum = 0;
|
||||
|
@@ -8401,7 +8401,7 @@ spell_add_word (
|
||||
if (i == idx)
|
||||
break;
|
||||
if (*spf == NUL) {
|
||||
EMSGN(_("E765: 'spellfile' does not have %ld entries"), idx);
|
||||
EMSGN(_("E765: 'spellfile' does not have %" PRId64 " entries"), idx);
|
||||
vim_free(fnamebuf);
|
||||
return;
|
||||
}
|
||||
|
@@ -1933,7 +1933,7 @@ parse_line:
|
||||
if (line_error) {
|
||||
EMSG2(_("E431: Format error in tags file \"%s\""), tag_fname);
|
||||
if (!use_cscope)
|
||||
EMSGN(_("Before byte %ld"), (long)ftell(fp));
|
||||
EMSGN(_("Before byte %" PRId64), ftell(fp));
|
||||
stop_searching = TRUE;
|
||||
line_error = FALSE;
|
||||
}
|
||||
|
@@ -1910,7 +1910,7 @@ void undo_time(long step, int sec, int file, int absolute)
|
||||
break;
|
||||
|
||||
if (absolute) {
|
||||
EMSGN(_("E830: Undo number %ld not found"), step);
|
||||
EMSGN(_("E830: Undo number %" PRId64 " not found"), step);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user