Annotation of coherent/g/usr/lib/uucp/uuinstall/lite.c, revision 1.1

1.1     ! root        1: /* lite.c: this is used to read a character array from a curses
        !             2:  * window, delimited by whitespace. The character array is then
        !             3:  * reprinted to the window in standout mode, if the appropriate
        !             4:  * flag is set.
        !             5:  */
        !             6: 
        !             7: #include "uuinstall.h"
        !             8: 
        !             9: lite(win, row, col, flag)
        !            10: WINDOW *win;
        !            11: int row, col ,flag;
        !            12: {
        !            13:        int x,y;
        !            14: 
        !            15:        strcpy(litestring,"");
        !            16: 
        !            17:        /* now read char by char until we hit a whitespace, building
        !            18:         * our character array to be reprinted as we go along.
        !            19:         */
        !            20: 
        !            21:        wmove(win,row,col);
        !            22:        for(x = 0 ; x < 15 ; x++){
        !            23:                litestring[x] = winch(win);  /* build our char array */
        !            24: 
        !            25:                if(isspace(litestring[x])){     /* terminate string when */
        !            26:                        litestring[x] = '\0';   /* we hit a space and    */
        !            27:                        break;                  /* terminate loop.       */
        !            28:                }
        !            29: 
        !            30:                wdelch(win);
        !            31:        }
        !            32: 
        !            33: 
        !            34:        /* now to repad this line with spaces, since wdel()ing will have
        !            35:         * skewed our columns.
        !            36:         */
        !            37: 
        !            38:        for(y = 0 ; y < x; y++)
        !            39:                winsch(win, ' ');
        !            40: 
        !            41: 
        !            42:        /* now to reprint character array to window, check the flag to
        !            43:         * see if it should be printed in standout mode.
        !            44:         */
        !            45: 
        !            46:        if(flag)
        !            47:                wstandout(win);
        !            48: 
        !            49:        waddstr(win, litestring);
        !            50:        wmove(win,row,col);
        !            51: 
        !            52:        if(flag)
        !            53:                wstandend(win);
        !            54: 
        !            55:        return;
        !            56: }

unix.superglobalmegacorp.com

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