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);
|
||||
|
||||
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);
|
||||
vfprintf(stderr, _(msg), ap);
|
||||
|
|
|
@ -3523,9 +3523,8 @@ void do_wordlinechar_count(void)
|
|||
openfile->placewewant = pww_save;
|
||||
|
||||
/* Display the total word, line, and character counts on the statusbar. */
|
||||
statusline(HUSH, _("%sWords: %lu Lines: %ld Chars: %lu"), was_mark ?
|
||||
_("In Selection: ") : "", (unsigned long)words, (long)nlines,
|
||||
(unsigned long)chars);
|
||||
statusline(HUSH, _("%sWords: %zu Lines: %zd Chars: %zu"), was_mark ?
|
||||
_("In Selection: ") : "", words, nlines, chars);
|
||||
}
|
||||
#endif /* !NANO_TINY */
|
||||
|
||||
|
|
|
@ -3390,11 +3390,9 @@ void do_cursorpos(bool force)
|
|||
charpct = (openfile->totsize == 0) ? 0 : 100 * sum / openfile->totsize;
|
||||
|
||||
statusline(HUSH,
|
||||
_("line %ld/%ld (%d%%), col %lu/%lu (%d%%), char %lu/%lu (%d%%)"),
|
||||
(long)openfile->current->lineno,
|
||||
(long)openfile->filebot->lineno, linepct,
|
||||
(unsigned long)cur_xpt, (unsigned long)cur_lenpt, colpct,
|
||||
(unsigned long)sum, (unsigned long)openfile->totsize, charpct);
|
||||
_("line %zd/%zd (%d%%), col %zu/%zu (%d%%), char %zu/%zu (%d%%)"),
|
||||
openfile->current->lineno, openfile->filebot->lineno, linepct,
|
||||
cur_xpt, cur_lenpt, colpct, sum, openfile->totsize, charpct);
|
||||
|
||||
/* Displaying the cursor position should not suppress it next time. */
|
||||
suppress_cursorpos = FALSE;
|
||||
|
|
Loading…
Reference in New Issue