]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/widechar/lib_add_wch.c
ncurses 6.2 - patch 20210418
[ncurses.git] / ncurses / widechar / lib_add_wch.c
index 0e1f4ea52acdd282317aa24a1396d9adbf6d829c..5d6d5547f2f4030c58a9cf954f450de6e5facc5b 100644 (file)
@@ -1,5 +1,6 @@
 /****************************************************************************
- * Copyright (c) 2004-2011,2016 Free Software Foundation, Inc.              *
+ * Copyright 2019,2020 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 <wctype.h>
 #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.16 2020/02/02 23:34:34 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;
 
@@ -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;