Annotation of coherent/g/usr/bin/vsh/winlib/openwin.c, revision 1.1.1.1

1.1       root        1: /*
                      2:  *      Open a new window
                      3:  *
                      4:  *      Copyright (c) 1990-93 by Udo Munk
                      5:  */
                      6: 
                      7: #ifdef AIX
                      8: #define NLS
                      9: #endif
                     10: 
                     11: #include <curses.h>
                     12: #include "winfun.h"
                     13: 
                     14: extern char    *malloc();
                     15: 
                     16: extern W_LIST  *wl;
                     17: 
                     18: WINDOW *open_window(nlines, ncols, begin_y, begin_x)
                     19: int nlines, ncols, begin_y, begin_x;
                     20: {
                     21:        register W_LIST *wlp1, *wlp2;
                     22:        WINDOW *w;
                     23: 
                     24:        if ((wlp1 = (W_LIST *) malloc(sizeof(W_LIST))) == NULL)
                     25:                return((WINDOW *) 0);
                     26:        w = newwin(nlines, ncols, begin_y, begin_x);
                     27:        keypad(w, TRUE);
                     28: #ifdef INTRFLUSH
                     29:        intrflush(w, FALSE);
                     30: #endif
                     31:        wlp2 = wl;
                     32:        while (wlp2->w_next != (W_LIST *) 0)
                     33:                wlp2 = wlp2->w_next;
                     34:        wlp1->w_w = w;
                     35:        wlp1->w_next = (W_LIST *) 0;
                     36:        wlp2->w_next = wlp1;
                     37:        return(w);
                     38: }

unix.superglobalmegacorp.com

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