Use portable format specifiers: Case %ld - plain - fprintf.

Fix uses of plain "%ld" within fprintf():
- Replace "%ld" with "%" PRId64.
- Cast corresponding argument to (int64_t).
This commit is contained in:
Eliseo Martínez
2014-04-20 04:09:35 +02:00
committed by Thiago de Arruda
parent b536c22550
commit 1bffe66508
7 changed files with 58 additions and 43 deletions

View File

@@ -1294,8 +1294,8 @@ static void write_one_filemark(FILE *fp, xfmark_T *fm, int c1, int c2)
else
name = fm->fname; /* use name from .viminfo */
if (name != NULL && *name != NUL) {
fprintf(fp, "%c%c %ld %ld ", c1, c2, (long)fm->fmark.mark.lnum,
(long)fm->fmark.mark.col);
fprintf(fp, "%c%c %" PRId64 " %" PRId64 " ",
c1, c2, (int64_t)fm->fmark.mark.lnum, (int64_t)fm->fmark.mark.col);
viminfo_writestring(fp, name);
}
@@ -1393,7 +1393,8 @@ int write_viminfo_marks(FILE *fp_out)
static void write_one_mark(FILE *fp_out, int c, pos_T *pos)
{
if (pos->lnum != 0)
fprintf(fp_out, "\t%c\t%ld\t%d\n", c, (long)pos->lnum, (int)pos->col);
fprintf(fp_out, "\t%c\t%" PRId64 "\t%d\n", c,
(int64_t)pos->lnum, (int)pos->col);
}
/*