tweaks: use printf's z modifier for (s)size_t, instead of casting
parent
a10fdc3fb1
commit
62ebd93579
|
@ -146,7 +146,7 @@ void rcfile_error(const char *msg, ...)
|
||||||
rcfile_with_errors = strdup(nanorc);
|
rcfile_with_errors = strdup(nanorc);
|
||||||
|
|
||||||
if (lineno > 0)
|
if (lineno > 0)
|
||||||
fprintf(stderr, _("Error in %s on line %lu: "), nanorc, (unsigned long)lineno);
|
fprintf(stderr, _("Error in %s on line %zu: "), nanorc, lineno);
|
||||||
|
|
||||||
va_start(ap, msg);
|
va_start(ap, msg);
|
||||||
vfprintf(stderr, _(msg), ap);
|
vfprintf(stderr, _(msg), ap);
|
||||||
|
|
|
@ -3523,9 +3523,8 @@ void do_wordlinechar_count(void)
|
||||||
openfile->placewewant = pww_save;
|
openfile->placewewant = pww_save;
|
||||||
|
|
||||||
/* Display the total word, line, and character counts on the statusbar. */
|
/* Display the total word, line, and character counts on the statusbar. */
|
||||||
statusline(HUSH, _("%sWords: %lu Lines: %ld Chars: %lu"), was_mark ?
|
statusline(HUSH, _("%sWords: %zu Lines: %zd Chars: %zu"), was_mark ?
|
||||||
_("In Selection: ") : "", (unsigned long)words, (long)nlines,
|
_("In Selection: ") : "", words, nlines, chars);
|
||||||
(unsigned long)chars);
|
|
||||||
}
|
}
|
||||||
#endif /* !NANO_TINY */
|
#endif /* !NANO_TINY */
|
||||||
|
|
||||||
|
|
|
@ -3390,11 +3390,9 @@ void do_cursorpos(bool force)
|
||||||
charpct = (openfile->totsize == 0) ? 0 : 100 * sum / openfile->totsize;
|
charpct = (openfile->totsize == 0) ? 0 : 100 * sum / openfile->totsize;
|
||||||
|
|
||||||
statusline(HUSH,
|
statusline(HUSH,
|
||||||
_("line %ld/%ld (%d%%), col %lu/%lu (%d%%), char %lu/%lu (%d%%)"),
|
_("line %zd/%zd (%d%%), col %zu/%zu (%d%%), char %zu/%zu (%d%%)"),
|
||||||
(long)openfile->current->lineno,
|
openfile->current->lineno, openfile->filebot->lineno, linepct,
|
||||||
(long)openfile->filebot->lineno, linepct,
|
cur_xpt, cur_lenpt, colpct, sum, openfile->totsize, charpct);
|
||||||
(unsigned long)cur_xpt, (unsigned long)cur_lenpt, colpct,
|
|
||||||
(unsigned long)sum, (unsigned long)openfile->totsize, charpct);
|
|
||||||
|
|
||||||
/* Displaying the cursor position should not suppress it next time. */
|
/* Displaying the cursor position should not suppress it next time. */
|
||||||
suppress_cursorpos = FALSE;
|
suppress_cursorpos = FALSE;
|
||||||
|
|
Loading…
Reference in New Issue