X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fwidechar%2Flib_ins_wch.c;h=4210579175c4f51d16f26472fb47da0e1923a52d;hp=4f62d365314ade52c623ebc28e773b9f3e732f72;hb=79185cda09da0a0eef36ab0daabe3b739a2757cb;hpb=aa4fd77b765d528af776d42ea6e98a7405e18b40 diff --git a/ncurses/widechar/lib_ins_wch.c b/ncurses/widechar/lib_ins_wch.c index 4f62d365..42105791 100644 --- a/ncurses/widechar/lib_ins_wch.c +++ b/ncurses/widechar/lib_ins_wch.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2002-2009,2010 Free Software Foundation, Inc. * + * Copyright (c) 2002-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 +39,7 @@ #include -MODULE_ID("$Id: lib_ins_wch.c,v 1.15 2010/12/11 19:58:39 tom Exp $") +MODULE_ID("$Id: lib_ins_wch.c,v 1.20 2016/03/13 00:42:34 tom Exp $") /* * Insert the given character, updating the current location to simplify @@ -53,7 +53,7 @@ _nc_insert_wch(WINDOW *win, const cchar_t *wch) int code = OK; if (cells < 0) { - code = winsch(win, CharOf(CHDEREF(wch))); + code = winsch(win, (chtype) CharOf(CHDEREF(wch))); } else { if (cells == 0) cells = 1; @@ -73,7 +73,7 @@ _nc_insert_wch(WINDOW *win, const cchar_t *wch) SetWidecExt(temp1[cell], cell); } - win->_curx++; + win->_curx = (NCURSES_SIZE_T) (win->_curx + cells); } } return code; @@ -115,7 +115,7 @@ wins_nwstr(WINDOW *win, const wchar_t *wstr, int n) if (win != 0 && wstr != 0) { if (n < 1) - n = wcslen(wstr); + n = (int) wcslen(wstr); code = OK; if (n > 0) { SCREEN *sp = _nc_screen_of(win); @@ -132,7 +132,7 @@ wins_nwstr(WINDOW *win, const wchar_t *wstr, int n) (void) setcchar(&tmp_cchar, &tmp_wchar, WA_NORMAL, - 0, + (short) 0, (void *) 0); code = _nc_insert_wch(win, &tmp_cchar); } else {