X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Flib_delch.c;h=64c9da73edf85f0d67a3d4591698f7840e36c3c4;hp=0169d31ac6d5101a4d58588aa0398b5052bdea94;hb=91fa4688e82518794fcf0c32a36f3fcca5e4c2d5;hpb=0eb88fc5281804773e2a0c7a488a4452463535ce diff --git a/ncurses/base/lib_delch.c b/ncurses/base/lib_delch.c index 0169d31a..64c9da73 100644 --- a/ncurses/base/lib_delch.c +++ b/ncurses/base/lib_delch.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998-2001,2009 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 * @@ -40,29 +40,30 @@ #include -MODULE_ID("$Id: lib_delch.c,v 1.8 1998/06/28 00:28:17 tom Exp $") +MODULE_ID("$Id: lib_delch.c,v 1.13 2009/10/24 22:32:47 tom Exp $") -int wdelch(WINDOW *win) +NCURSES_EXPORT(int) +wdelch(WINDOW *win) { -int code = ERR; + int code = ERR; - T((T_CALLED("wdelch(%p)"), win)); + T((T_CALLED("wdelch(%p)"), (void *) win)); - if (win) { - chtype blank = _nc_background(win); - struct ldat *line = &(win->_line[win->_cury]); - chtype *end = &(line->text[win->_maxx]); - chtype *temp2 = &(line->text[win->_curx + 1]); - chtype *temp1 = temp2 - 1; + if (win) { + NCURSES_CH_T blank = win->_nc_bkgd; + struct ldat *line = &(win->_line[win->_cury]); + NCURSES_CH_T *end = &(line->text[win->_maxx]); + NCURSES_CH_T *temp2 = &(line->text[win->_curx + 1]); + NCURSES_CH_T *temp1 = temp2 - 1; - CHANGED_TO_EOL(line, win->_curx, win->_maxx); - while (temp1 < end) - *temp1++ = *temp2++; + CHANGED_TO_EOL(line, win->_curx, win->_maxx); + while (temp1 < end) + *temp1++ = *temp2++; - *temp1 = blank; + *temp1 = blank; - _nc_synchook(win); - code = OK; - } - returnCode(code); + _nc_synchook(win); + code = OK; + } + returnCode(code); }