/****************************************************************************
- * 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 *
#include <curses.priv.h>
-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);
}