Annotation of coherent/g/usr/lib/ncurses/lib_delch.c, revision 1.1.1.1

1.1       root        1: /*********************************************************************
                      2: *                         COPYRIGHT NOTICE                           *
                      3: **********************************************************************
                      4: *        This software is copyright (C) 1982 by Pavel Curtis         *
                      5: *                                                                    *
                      6: *        Permission is granted to reproduce and distribute           *
                      7: *        this file by any means so long as no fee is charged         *
                      8: *        above a nominal handling fee and so long as this            *
                      9: *        notice is always included in the copies.                    *
                     10: *                                                                    *
                     11: *        Other rights are reserved except as explicitly granted      *
                     12: *        by written permission of the author.                        *
                     13: *                Pavel Curtis                                        *
                     14: *                Computer Science Dept.                              *
                     15: *                405 Upson Hall                                      *
                     16: *                Cornell University                                  *
                     17: *                Ithaca, NY 14853                                    *
                     18: *                                                                    *
                     19: *                Ph- (607) 256-4934                                  *
                     20: *                                                                    *
                     21: *                Pavel.Cornell@Udel-Relay   (ARPAnet)                *
                     22: *                decvax!cornell!pavel       (UUCPnet)                *
                     23: *********************************************************************/
                     24: 
                     25: /*
                     26: **     lib_delch.c
                     27: **
                     28: **     The routine wdelch().
                     29: **
                     30: ** $Log:       lib_delch.c,v $
                     31:  * Revision 1.11  93/04/12  14:13:29  bin
                     32:  * Udo: third color update
                     33:  * 
                     34:  * Revision 1.5  92/06/02  12:05:05  bin
                     35:  * *** empty log message ***
                     36:  * 
                     37:  * Revision 1.2  92/04/13  14:37:18  bin
                     38:  * update by vlad
                     39:  * 
                     40:  * Revision 2.2  91/04/20  18:13:33  munk
                     41:  * Usage of register variables
                     42:  *
                     43:  * Revision 2.1  82/10/25  14:46:52  pavel
                     44:  * Added Copyright Notice
                     45:  * 
                     46:  * Revision 2.0  82/10/24  15:20:47  pavel
                     47:  * Beta-one Test Release
                     48:  * 
                     49: **
                     50: */
                     51: 
                     52: #ifdef RCSHDR
                     53: static char RCSid[] =
                     54:        "$Header: /src386/usr/lib/ncurses/RCS/lib_delch.c,v 1.11 93/04/12 14:13:29 bin Exp Locker: bin $";
                     55: #endif
                     56: 
                     57: #include "curses.h"
                     58: #include "curses.priv.h"
                     59: #include "term.h"
                     60: 
                     61: 
                     62: wdelch(win)
                     63: register WINDOW        *win;
                     64: {
                     65:        register chtype *temp1, *temp2;
                     66:        chtype          *end;
                     67:        int cury;
                     68: 
                     69: #ifdef TRACE
                     70:        if (_tracing)
                     71:            _tracef("wdelch(%o) called", win);
                     72: #endif
                     73: 
                     74:        cury = win->_cury;
                     75:        end = &win->_line[cury][win->_maxx];
                     76:        temp2 = &win->_line[cury][win->_curx + 1];
                     77:        temp1 = temp2 - 1;
                     78: 
                     79:        while (temp1 < end)
                     80:            *temp1++ = *temp2++;
                     81: 
                     82:        *temp1 = ' ' | win->_attrs;
                     83: 
                     84:        win->_lastchar[cury] = win->_maxx;
                     85: 
                     86:        if (win->_firstchar[cury] == _NOCHANGE
                     87:                                   || win->_firstchar[cury] > win->_curx)
                     88:            win->_firstchar[cury] = win->_curx;
                     89: 
                     90:        if (delete_character)
                     91:            win->_numchngd[cury] += 1;
                     92:        else
                     93:            win->_numchngd[cury] += win->_maxx - win->_curx + 1;
                     94: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.