X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Flib_clrbot.c;h=cbf2206d558156d69946d60dc01ce229081b49a6;hp=cec34161acef4802cbf41c4833d3e247faf1232e;hb=21c8ffa0edf2e389f3f674f0c08009002c6f357d;hpb=0eb88fc5281804773e2a0c7a488a4452463535ce diff --git a/ncurses/base/lib_clrbot.c b/ncurses/base/lib_clrbot.c index cec34161..cbf2206d 100644 --- a/ncurses/base/lib_clrbot.c +++ b/ncurses/base/lib_clrbot.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,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,36 +40,37 @@ #include -MODULE_ID("$Id: lib_clrbot.c,v 1.14 1998/06/28 00:36:26 tom Exp $") +MODULE_ID("$Id: lib_clrbot.c,v 1.21 2009/10/24 22:33:19 tom Exp $") -int wclrtobot(WINDOW *win) +NCURSES_EXPORT(int) +wclrtobot(WINDOW *win) { -int code = ERR; + int code = ERR; - T((T_CALLED("wclrtobot(%p)"), win)); + T((T_CALLED("wclrtobot(%p)"), (void *) win)); - if (win) { - short y; - short startx = win->_curx; - chtype blank = _nc_background(win); + if (win) { + NCURSES_SIZE_T y; + NCURSES_SIZE_T startx = win->_curx; + NCURSES_CH_T blank = win->_nc_bkgd; - T(("clearing from y = %d to y = %d with maxx = %d", win->_cury, win->_maxy, win->_maxx)); + T(("clearing from y = %ld to y = %ld with maxx = %ld", + (long) win->_cury, (long) win->_maxy, (long) win->_maxx)); - for (y = win->_cury; y <= win->_maxy; y++) { - struct ldat *line = &(win->_line[y]); - chtype *ptr = &(line->text[startx]); - chtype *end = &(line->text[win->_maxx]); + for (y = win->_cury; y <= win->_maxy; y++) { + struct ldat *line = &(win->_line[y]); + NCURSES_CH_T *ptr = &(line->text[startx]); + NCURSES_CH_T *end = &(line->text[win->_maxx]); - CHANGED_TO_EOL(line, startx, win->_maxx); + CHANGED_TO_EOL(line, startx, win->_maxx); - while (ptr <= end) - *ptr++ = blank; + while (ptr <= end) + *ptr++ = blank; - startx = 0; - } - _nc_synchook(win); - code = OK; + startx = 0; } - returnCode(code); + _nc_synchook(win); + code = OK; + } + returnCode(code); } -