X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Flib_delch.c;h=0c30f2d93c1ba49f1102dfb42a23128a6bb54a44;hp=0169d31ac6d5101a4d58588aa0398b5052bdea94;hb=b6d7123594f6959ad0a6602b3952d9e6abe261a0;hpb=0eb88fc5281804773e2a0c7a488a4452463535ce diff --git a/ncurses/base/lib_delch.c b/ncurses/base/lib_delch.c index 0169d31a..0c30f2d9 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,2000,2001 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.12 2001/12/19 01:06:09 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)"), 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); }