File:  [CSRG BSD Unix] / 3BSD / cmd / apl / an.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:53 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, CSRG
CVS tags: HEAD, BSD3
BSD 3.0

#

#include "apl.h"

/*
 *	name line
 */

char	headline[] = {
	"a p l ? 1 1    `` 1 june 1979 ``\n"
};

int	cs_size = STKS;		/* Current stack size */

newstak()
{
register struct item **news, **olds;
register i;
struct	 item **oldstak;
unsignd	 diff;

#ifdef TRACE
	aprintf("\nnew stack allocated\n");
#endif

	diff = sp - stack;
	olds = stack;oldstak	= stack;
	stack	= alloc((cs_size+STKS)*sizeof(stack));news = stack;
	for(i=0; i<cs_size; ++i)
		*news++ = *olds++;
	cs_size += STKS;
	afree(oldstak);
	staktop = &stack[cs_size-1];
	sp = &stack[diff];
}

unix.superglobalmegacorp.com

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