Annotation of 41BSD/cmd/apl/an.c, revision 1.1

1.1     ! root        1: #
        !             2: 
        !             3: #include "apl.h"
        !             4: 
        !             5: /*
        !             6:  *     name line
        !             7:  */
        !             8: 
        !             9: char   headline[] = {
        !            10:        "a p l ? 1 1    `` 1 april 1980 ``\n"
        !            11: };
        !            12: 
        !            13: int    cs_size = STKS;         /* Current stack size */
        !            14: 
        !            15: newstak()
        !            16: {
        !            17: register struct item **news, **olds;
        !            18: register i;
        !            19: struct  item **oldstak;
        !            20: unsignd         diff;
        !            21: 
        !            22: #ifdef TRACE
        !            23:        aprintf("\nnew stack allocated\n");
        !            24: #endif
        !            25: 
        !            26:        diff = sp - stack;
        !            27:        olds = stack;oldstak    = stack;
        !            28:        stack   = alloc((cs_size+STKS)*sizeof(stack));news = stack;
        !            29:        for(i=0; i<cs_size; ++i)
        !            30:                *news++ = *olds++;
        !            31:        cs_size += STKS;
        !            32:        afree(oldstak);
        !            33:        staktop = &stack[cs_size-1];
        !            34:        sp = &stack[diff];
        !            35: }

unix.superglobalmegacorp.com

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