diff --git a/src/rcfile.c b/src/rcfile.c index 6d543315..d0b9ca87 100644 --- a/src/rcfile.c +++ b/src/rcfile.c @@ -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); diff --git a/src/text.c b/src/text.c index a107474d..065f1344 100644 --- a/src/text.c +++ b/src/text.c @@ -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 */ diff --git a/src/winio.c b/src/winio.c index 7a10eee7..698d1968 100644 --- a/src/winio.c +++ b/src/winio.c @@ -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;