home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume2 / window / part4 / addch.c.pat next >
Encoding:
Text File  |  1986-11-30  |  1.0 KB  |  40 lines

  1. *** libcurses42/addch.c    Thu Nov 17 11:03:10 1983
  2. --- libcurses/addch.c    Wed Jul 24 13:30:58 1985
  3. ***************
  4. *** 19,22
  5.   # endif
  6. !     if (y >= win->_maxy || x >= win->_maxx || y < 0 || x < 0)
  7. !         return ERR;
  8.       switch (c) {
  9.  
  10. --- 19,25 -----
  11.   # endif
  12. ! #ifdef slowway
  13. !     /* These tests 'cannot happen'.  What about win==NULL?! */
  14. !     if (y < 0 || y >= win->_maxy || x < 0 || x >= win->_maxx)
  15. !         return (ERR);
  16. ! #endif
  17.       switch (c) {
  18. ***************
  19. *** 38,40
  20.               c |= _STANDOUT;
  21. !         set_ch(win, y, x, c, NULL);
  22.           for (wp = win->_nextp; wp != win; wp = wp->_nextp)
  23.  
  24. --- 41,55 -----
  25.               c |= _STANDOUT;
  26. ! #ifdef    slowway
  27. !         set_ch(win, y, x, c, (WINDOW *)NULL);
  28. ! #else
  29. !         /* rti-sel!trt: efficiency hack */
  30. !         if (win->_y[y][x] != c) {
  31. !             if (win->_firstch[y] == _NOCHANGE)
  32. !                 win->_firstch[y] = win->_lastch[y] = x;
  33. !             else if (x > win->_lastch[y])
  34. !                 win->_lastch[y] = x;
  35. !             else if (x < win->_firstch[y])
  36. !                 win->_firstch[y] = x;
  37. !         }
  38. ! #endif
  39.           for (wp = win->_nextp; wp != win; wp = wp->_nextp)
  40.