Annotation of coherent/g/usr/lib/ncurses/lib_insch.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_insch.c
                     27: **
                     28: **     The routine winsch().
                     29: **
                     30: ** $Log:       lib_insch.c,v $
                     31:  * Revision 1.11  93/04/12  14:13:44  bin
                     32:  * Udo: third color update
                     33:  * 
                     34:  * Revision 1.5  92/06/02  12:05:16  bin
                     35:  * *** empty log message ***
                     36:  * 
                     37:  * Revision 1.2  92/04/13  14:37:38  bin
                     38:  * update by vlad
                     39:  * 
                     40:  * Revision 2.2  91/04/20  19:09:25  munk
                     41:  * Usage of register variables
                     42:  *
                     43:  * Revision 2.1  82/10/25  14:47:39  pavel
                     44:  * Added Copyright Notice
                     45:  * 
                     46:  * Revision 2.0  82/10/25  13:46:02  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_insch.c,v 1.11 93/04/12 14:13:44 bin Exp Locker: bin $";
                     55: #endif
                     56: 
                     57: #include "curses.h"
                     58: #include "curses.priv.h"
                     59: 
                     60: 
                     61: winsch(win, c)
                     62: register WINDOW        *win;
                     63: chtype c;
                     64: {
                     65:        register chtype *temp1, *temp2;
                     66:        chtype          *end;
                     67:        int from, to;
                     68: 
                     69: #ifdef TRACE
                     70:        if (_tracing)
                     71:            _tracef("winsch(%o,%o) called", win, c);
                     72: #endif
                     73: 
                     74:        end = &win->_line[win->_cury][win->_curx];
                     75:        temp1 = &win->_line[win->_cury][win->_maxx];
                     76:        temp2 = temp1 - 1;
                     77: 
                     78:        while (temp1 > end)
                     79:            *temp1-- = *temp2--;
                     80: 
                     81:        *temp1 = c | win->_attrs;
                     82: 
                     83:        to = win->_lastchar[win->_cury] = win->_maxx;
                     84:        from = win->_firstchar[win->_cury];
                     85:        if ((from == _NOCHANGE) || (from > win->_curx))
                     86:            from = win->_firstchar[win->_cury] = win->_curx;
                     87:        win->_numchngd[win->_cury] = to - from;
                     88: }

unix.superglobalmegacorp.com

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