Annotation of researchv10dc/ncurses/screen/initscr.c, revision 1.1

1.1     ! root        1: # include      "curses.ext"
        !             2: # include      <signal.h>
        !             3: /*     @(#) initscr.c: 1.1 10/15/83    (1.17   3/16/83)        */
        !             4: 
        !             5: char   *calloc();
        !             6: char   *malloc();
        !             7: extern char    *getenv();
        !             8: 
        !             9: extern WINDOW  *makenew();
        !            10: 
        !            11: /*
        !            12:  *     This routine initializes the current and standard screen.
        !            13:  *
        !            14:  * 3/5/81 (Berkeley) @(#)initscr.c     1.2
        !            15:  */
        !            16: 
        !            17: WINDOW *
        !            18: initscr()
        !            19: {
        !            20:        register char *sp;
        !            21:        struct screen *scp;
        !            22:        extern char *_c_why_not;
        !            23:        
        !            24: # ifdef DEBUG
        !            25:        if (outf == NULL) {
        !            26:                if( ( outf = fopen("trace", "w") ) == NULL)
        !            27:                {
        !            28:                        perror("trace");
        !            29:                        exit(-1);
        !            30:                }
        !            31:        }
        !            32: #endif
        !            33: 
        !            34:        if( ( sp = getenv( "TERM" ) ) == NULL )
        !            35:        {
        !            36:                sp = Def_term;
        !            37:        }
        !            38: # ifdef DEBUG
        !            39:        if(outf) fprintf(outf, "INITSCR: term = %s\n", sp);
        !            40: # endif
        !            41:        if( ( scp = newterm( sp, stdout, stdin ) ) == NULL )
        !            42:        {
        !            43:                _ec_quit(_c_why_not, sp);
        !            44:        }
        !            45:        return stdscr;
        !            46: }

unix.superglobalmegacorp.com

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