X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fwidechar%2Flib_add_wch.c;h=b817647c607eb13a590df1b786427b530c2cdbca;hp=0e1f4ea52acdd282317aa24a1396d9adbf6d829c;hb=9f479192e3ca3413d235c66bf058f8cc63764898;hpb=76a479337308b4b5e749fa8c38b7b7f482998c5b diff --git a/ncurses/widechar/lib_add_wch.c b/ncurses/widechar/lib_add_wch.c index 0e1f4ea5..b817647c 100644 --- a/ncurses/widechar/lib_add_wch.c +++ b/ncurses/widechar/lib_add_wch.c @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 2004-2011,2016 Free Software Foundation, Inc. * + * Copyright 2019-2020,2021 Thomas E. Dickey * + * Copyright 2004-2011,2016 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -39,7 +40,7 @@ #include #endif -MODULE_ID("$Id: lib_add_wch.c,v 1.13 2016/05/28 23:36:34 tom Exp $") +MODULE_ID("$Id: lib_add_wch.c,v 1.17 2021/06/17 21:26:02 tom Exp $") /* clone/adapt lib_addch.c */ static const cchar_t blankchar = NewChar(BLANK_TEXT); @@ -114,7 +115,7 @@ render_char(WINDOW *win, cchar_t ch) #endif static bool -newline_forces_scroll(WINDOW *win, NCURSES_SIZE_T * ypos) +newline_forces_scroll(WINDOW *win, NCURSES_SIZE_T *ypos) { bool result = FALSE; @@ -132,7 +133,7 @@ newline_forces_scroll(WINDOW *win, NCURSES_SIZE_T * ypos) * wrapped the cursor. We don't do anything with this flag except set it when * wrapping, and clear it whenever we move the cursor. If we try to wrap at * the lower-right corner of a window, we cannot move the cursor (since that - * wouldn't be legal). So we return an error (which is what SVr4 does). + * wouldn't be legal). So we return an error (which is what SVr4 does). * Unlike SVr4, we can successfully add a character to the lower-right corner * (Solaris 2.6 does this also, however). */ @@ -195,7 +196,7 @@ wadd_wch_literal(WINDOW *win, cchar_t ch) * adjustments. */ { - int len = wcwidth(CharOf(ch)); + int len = _nc_wacs_width(CharOf(ch)); int i; int j; wchar_t *chars;