00001 #include <curses.h>
00002 #include "curspriv.h"
00003
00004
00005
00006
00007
00008 int winsch(win, c)
00009 WINDOW *win;
00010 char c;
00011 {
00012 int *temp1;
00013 int *temp2;
00014 int *end;
00015 int x = win->_curx;
00016 int y = win->_cury;
00017 int maxx = win->_maxx;
00018
00019 if ((c < ' ') && (c == '\n' || c == '\r' || c == '\t' || c == '\b'))
00020 return(waddch(win, c));
00021 end = &win->_line[y][x];
00022 temp1 = &win->_line[y][maxx];
00023 temp2 = temp1 - 1;
00024 if (c < ' ')
00025 temp2--;
00026 while (temp1 > end) *temp1-- = *temp2--;
00027 win->_maxchng[y] = maxx;
00028 if ((win->_minchng[y] == _NO_CHANGE) || (win->_minchng[y] > x))
00029 win->_minchng[y] = x;
00030 return(waddch(win, c));
00031 }