X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Flib_screen.c;h=9e942eaf8494013f9c240551302c1121133cab70;hp=dba29809d93be296a36413d0a558b617e3ef4732;hb=8890c8f28a1db5995ef17f52a7d8c0b9cf574210;hpb=0de8912c1c0746eb37b733e9e6fdf852aab9506a diff --git a/ncurses/base/lib_screen.c b/ncurses/base/lib_screen.c index dba29809..9e942eaf 100644 --- a/ncurses/base/lib_screen.c +++ b/ncurses/base/lib_screen.c @@ -41,7 +41,7 @@ #define CUR SP_TERMTYPE #endif -MODULE_ID("$Id: lib_screen.c,v 1.94 2019/03/23 23:47:16 tom Exp $") +MODULE_ID("$Id: lib_screen.c,v 1.96 2019/07/20 20:23:21 tom Exp $") #define MAX_SIZE 0x3fff /* 16k is big enough for a window or pad */ @@ -447,7 +447,7 @@ read_row(char *source, NCURSES_CH_T * prior, NCURSES_CH_T * target, int length) int len; source = decode_cchar(source, prior, target); - len = wcwidth(target->chars[0]); + len = _nc_wacs_width(target->chars[0]); if (len > 1) { int n; @@ -514,13 +514,13 @@ NCURSES_SP_NAME(getwin) (NCURSES_SP_DCLx FILE *filep) * Read the first 4 bytes to determine first if this is an old-format * screen-dump, or new-format. */ - if (read_block(&tmp, 4, filep) < 0) { + if (read_block(&tmp, (size_t) 4, filep) < 0) { returnWin(0); } /* * If this is a new-format file, and we do not support it, give up. */ - if (!memcmp(&tmp, my_magic, 4)) { + if (!memcmp(&tmp, my_magic, (size_t) 4)) { #if NCURSES_EXT_PUTWIN if (read_win(&tmp, filep) < 0) #endif @@ -823,7 +823,7 @@ putwin(WINDOW *win, FILE *filep) attr_t attr; *buffer = '\0'; - if (!strncmp(name, "_pad.", 5) && !(win->_flags & _ISPAD)) { + if (!strncmp(name, "_pad.", (size_t) 5) && !(win->_flags & _ISPAD)) { continue; } switch (scr_params[y].type) { @@ -894,7 +894,7 @@ putwin(WINDOW *win, FILE *filep) returnCode(code); for (x = 0; x <= win->_maxx; x++) { #if NCURSES_WIDECHAR - int len = wcwidth(data[x].chars[0]); + int len = _nc_wacs_width(data[x].chars[0]); encode_cell(buffer, TOP_SLIMIT CHREF(data[x]), CHREF(last_cell)); last_cell = data[x]; PUTS(buffer);