aboutsummaryrefslogtreecommitdiff
path: root/src/normal.c
diff options
context:
space:
mode:
authorEliseo Martínez <eliseomarmol@gmail.com>2014-04-19 12:28:26 +0200
committerThiago de Arruda <tpadilha84@gmail.com>2014-04-23 06:56:32 -0300
commitfb94edf373418362b803e60bed67525bd5720916 (patch)
treec85dc6180294d90005e21d096ab737e9f65bd6bd /src/normal.c
parentf916cf067d42d1dfd8ed477fdd5e3f0bda665eee (diff)
downloadrneovim-fb94edf373418362b803e60bed67525bd5720916.tar.gz
rneovim-fb94edf373418362b803e60bed67525bd5720916.tar.bz2
rneovim-fb94edf373418362b803e60bed67525bd5720916.zip
Use portable format specifiers: Case %ld - plain - sprintf.
Fix uses of plain "%ld" within sprintf(): - Replace "%ld" with "%" PRId64. - Cast corresponding argument to (int64_t).
Diffstat (limited to 'src/normal.c')
-rw-r--r--src/normal.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/normal.c b/src/normal.c
index 68964604dd..c3aebbc69e 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -3024,10 +3024,10 @@ void clear_showcmd(void)
p_sbr = empty_option;
getvcols(curwin, &curwin->w_cursor, &VIsual, &leftcol, &rightcol);
p_sbr = saved_sbr;
- sprintf((char *)showcmd_buf, "%ldx%ld", lines,
- (long)(rightcol - leftcol + 1));
+ sprintf((char *)showcmd_buf, "%" PRId64 "x%" PRId64,
+ (int64_t)lines, (int64_t)(rightcol - leftcol + 1));
} else if (VIsual_mode == 'V' || VIsual.lnum != curwin->w_cursor.lnum)
- sprintf((char *)showcmd_buf, "%ld", lines);
+ sprintf((char *)showcmd_buf, "%" PRId64, (int64_t)lines);
else {
char_u *s, *e;
int l;
@@ -4451,7 +4451,7 @@ static void nv_ident(cmdarg_T *cap)
isman = (STRCMP(kp, "man") == 0);
isman_s = (STRCMP(kp, "man -s") == 0);
if (cap->count0 != 0 && !(isman || isman_s))
- sprintf((char *)buf, ".,.+%ld", cap->count0 - 1);
+ sprintf((char *)buf, ".,.+%" PRId64, (int64_t)cap->count0 - 1);
STRCAT(buf, "! ");
if (cap->count0 == 0 && isman_s)
@@ -4460,7 +4460,7 @@ static void nv_ident(cmdarg_T *cap)
STRCAT(buf, kp);
STRCAT(buf, " ");
if (cap->count0 != 0 && (isman || isman_s)) {
- sprintf((char *)buf + STRLEN(buf), "%ld", cap->count0);
+ sprintf((char *)buf + STRLEN(buf), "%" PRId64, (int64_t)cap->count0);
STRCAT(buf, " ");
}
}
@@ -4482,7 +4482,7 @@ static void nv_ident(cmdarg_T *cap)
if (g_cmd)
STRCPY(buf, "tj ");
else
- sprintf((char *)buf, "%ldta ", cap->count0);
+ sprintf((char *)buf, "%" PRId64 "ta ", (int64_t)cap->count0);
}
}