diff options
author | Eliseo Martínez <eliseomarmol@gmail.com> | 2014-04-20 15:20:22 +0200 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-04-23 06:56:33 -0300 |
commit | b8f3ff2a694f49b027b23d6afe218a6f2cb254c0 (patch) | |
tree | bf8ee0283dfc475dcb37fe20ee7c3e816ec2f8e7 | |
parent | bf3b9d0ecbb16fc998c1c9656fd2ec235708ec55 (diff) | |
download | rneovim-b8f3ff2a694f49b027b23d6afe218a6f2cb254c0.tar.gz rneovim-b8f3ff2a694f49b027b23d6afe218a6f2cb254c0.tar.bz2 rneovim-b8f3ff2a694f49b027b23d6afe218a6f2cb254c0.zip |
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.
-rw-r--r-- | src/buffer.c | 10 | ||||
-rw-r--r-- | src/diff.c | 2 | ||||
-rw-r--r-- | src/ex_cmds.c | 4 | ||||
-rw-r--r-- | src/ex_docmd.c | 2 | ||||
-rw-r--r-- | src/if_cscope.c | 2 | ||||
-rw-r--r-- | src/memline.c | 10 | ||||
-rw-r--r-- | src/quickfix.c | 2 | ||||
-rw-r--r-- | src/spell.c | 2 | ||||
-rw-r--r-- | src/tag.c | 2 | ||||
-rw-r--r-- | src/undo.c | 2 |
10 files changed, 19 insertions, 19 deletions
diff --git a/src/buffer.c b/src/buffer.c index db773a4e09..b6b999e920 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -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,9 +948,9 @@ do_buffer ( if (bufIsChanged(buf)) return FAIL; } else { - EMSGN(_( - "E89: No write since last change for buffer %ld (add ! to override)"), - buf->b_fnum); + 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; } diff --git a/src/diff.c b/src/diff.c index 5a21df2d0c..74e145f96c 100644 --- a/src/diff.c +++ b/src/diff.c @@ -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. diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 625e7dca31..e2ea0a9625 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -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) { diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 0f2ed48535..74bc6f5af4 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -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; diff --git a/src/if_cscope.c b/src/if_cscope.c index 1d20db8ade..ae1495ce06 100644 --- a/src/if_cscope.c +++ b/src/if_cscope.c @@ -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 diff --git a/src/memline.c b/src/memline.c index 89085745a1..7dc386af66 100644 --- a/src/memline.c +++ b/src/memline.c @@ -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) { diff --git a/src/quickfix.c b/src/quickfix.c index 60d7ea0235..46511b2c19 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -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; diff --git a/src/spell.c b/src/spell.c index 5f899a06cc..6113d27d34 100644 --- a/src/spell.c +++ b/src/spell.c @@ -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; } diff --git a/src/undo.c b/src/undo.c index ebfb9280df..e95a34cbd1 100644 --- a/src/undo.c +++ b/src/undo.c @@ -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; } |