BSD 3 development
[unix-history] / usr / src / cmd / apl / an.c
CommitLineData
ae063bdb
KT
1#
2
3#include "apl.h"
4
5/*
6 * name line
7 */
8
9char headline[] = {
10 "a p l ? 1 1 `` 1 june 1979 ``\n"
11};
12
13int cs_size = STKS; /* Current stack size */
14
15newstak()
16{
17register struct item **news, **olds;
18register i;
19struct item **oldstak;
20unsignd 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}