]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/base/lib_delch.c
ncurses 5.3
[ncurses.git] / ncurses / base / lib_delch.c
index 0169d31ac6d5101a4d58588aa0398b5052bdea94..0c30f2d93c1ba49f1102dfb42a23128a6bb54a44 100644 (file)
@@ -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            *
 
 #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.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);
 }