nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit f602613a9acbed304932e6b6f9517f206290044c
parent ba124ffa5d30842bc0b0c74e9e6a21897dfb1698
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Thu,  7 Jan 2021 16:17:17 +0100

tweaks: avoid compilation warnings on 32-bit machine plus newer compiler

Diffstat:
Msrc/winio.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/winio.c b/src/winio.c @@ -2088,7 +2088,7 @@ void minibar(void) } else thename = copy_of(_("(nameless)")); - sprintf(location, "%zi,%lu", openfile->current->lineno, xplustabs() + 1); + sprintf(location, "%zi,%zi", openfile->current->lineno, xplustabs() + 1); placewidth = strlen(location); namewidth = breadth(thename); @@ -2146,7 +2146,7 @@ void minibar(void) else if ((unsigned char)*this_position < 0x80 && using_utf8()) sprintf(hexadecimal, "U+%04X", (unsigned char)*this_position); else if (using_utf8() && mbtowc(&widecode, this_position, MAXCHARLEN) >= 0) - sprintf(hexadecimal, "U+%04X", widecode); + sprintf(hexadecimal, "U+%04X", (int)widecode); #endif else sprintf(hexadecimal, " 0x%02X", (unsigned char)*this_position); @@ -2162,7 +2162,7 @@ void minibar(void) /* Display how many percent the current line is into the file. */ if (namewidth + 6 < COLS) { - sprintf(location, "%3li%%", 100 * openfile->current->lineno / openfile->filebot->lineno); + sprintf(location, "%3zi%%", 100 * openfile->current->lineno / openfile->filebot->lineno); mvwaddstr(bottomwin, 0, COLS - 4 - padding, location); }