Annotation of researchv10no/ncurses/screen/line_alloc.c, revision 1.1.1.1

1.1       root        1: /*     @(#) line_alloc.c: 1.1 10/15/83 (1.9    10/27/82)       */
                      2: 
                      3: #include "curses.ext"
                      4: 
                      5: /*
                      6:  * _line_alloc returns a pointer to a new line structure.
                      7:  */
                      8: struct line *
                      9: _line_alloc ()
                     10: {
                     11:        register struct line   *rv = SP->freelist;
                     12:        char *calloc();
                     13: 
                     14: #ifdef DEBUG
                     15:        if(outf) fprintf(outf, "mem: _line_alloc (), prev SP->freelist %x\n", SP->freelist);
                     16: #endif
                     17:        if (rv) {
                     18:                SP->freelist = rv -> next;
                     19:        } else {
                     20: #ifdef NONSTANDARD
                     21:                _ec_quit("No lines available in line_alloc", "");
                     22: #else
                     23:                rv = (struct line *) calloc (1, sizeof *rv);
                     24:                rv -> body = (chtype *) calloc (columns, sizeof (chtype));
                     25: #endif
                     26:        }
                     27:        rv -> length = 0;
                     28:        rv -> hash = 0;
                     29:        return rv;
                     30: }

unix.superglobalmegacorp.com

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