]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/base/lib_addch.c
ncurses 5.0
[ncurses.git] / ncurses / base / lib_addch.c
similarity index 96%
rename from ncurses/lib_addch.c
rename to ncurses/base/lib_addch.c
index 859c9caa652e081b23e0c32e309890d9c374a152..101d75ef29a9a3a1ddbb35c5500b6e9135cd4c13 100644 (file)
@@ -41,7 +41,7 @@
 #include <curses.priv.h>
 #include <ctype.h>
 
-MODULE_ID("$Id: lib_addch.c,v 1.39 1998/02/11 12:13:57 tom Exp $")
+MODULE_ID("$Id: lib_addch.c,v 1.42 1999/07/24 20:01:05 tom Exp $")
 
 /*
  * Ugly microtweaking alert.  Everything from here to end of module is
@@ -133,12 +133,7 @@ int waddch_literal(WINDOW *win, chtype ch)
 
        line = win->_line+win->_cury;
        
-       if (line->firstchar == _NOCHANGE)
-               line->firstchar = line->lastchar = x;
-       else if (x < line->firstchar)
-               line->firstchar = x;
-       else if (x > line->lastchar)
-               line->lastchar = x;
+       CHANGED_CELL(line,x);
 
        line->text[x++] = ch;
        
@@ -174,8 +169,8 @@ int waddch_nosync(WINDOW *win, const chtype ch)
 /* the workhorse function -- add a character to the given window */
 {
        int     x, y;
-       int     t;
-       const char *s;
+       int     t = 0;
+       const char *s = 0;
 
        if ((ch & A_ALTCHARSET)
            || ((t = TextOf(ch)) > 127)