1*35128Smarc /* 2*35128Smarc 3*35128Smarc * Copyright (c) 1984, 1985, 1986 AT&T 4*35128Smarc * All Rights Reserved 5*35128Smarc 6*35128Smarc * THIS IS UNPUBLISHED PROPRIETARY SOURCE 7*35128Smarc * CODE OF AT&T. 8*35128Smarc * The copyright notice above does not 9*35128Smarc * evidence any actual or intended 10*35128Smarc * publication of such source code. 11*35128Smarc 12*35128Smarc */ 13*35128Smarc /* @(#)brkincr.h 1.1 */ 14*35128Smarc /* 15*35128Smarc * UNIX shell 16*35128Smarc * S. R. Bourne 17*35128Smarc * Rewritten by David Korn 18*35128Smarc * 19*35128Smarc */ 20*35128Smarc 21*35128Smarc #if u370 || uts 22*35128Smarc #define BRKINCR 4096 23*35128Smarc #else 24*35128Smarc #define BRKINCR ((int)(0400*sizeof(char*))) 25*35128Smarc #endif /* u370 */ 26*35128Smarc #ifdef INT16 27*35128Smarc #define BRKMAX ((unsigned)(077777-BRKINCR)) 28*35128Smarc #else 29*35128Smarc #define BRKMAX (1024*BRKINCR) 30*35128Smarc #endif /* INT16 */ 31*35128Smarc #define MINTRAP 0 32*35128Smarc #define MAXTRAP NSIG+1 33*35128Smarc 34*35128Smarc #define SIGBITS 8 35*35128Smarc 36*35128Smarc #define SIGSLOW 1 37*35128Smarc #define SIGSET 4 38*35128Smarc #define SIGMOD 8 39*35128Smarc /* 40*35128Smarc * SIGNOSET means that signal not set unless mentioned explicitly 41*35128Smarc * SIGCAUGHT signals trap to fault, others to done 42*35128Smarc */ 43*35128Smarc #define SIGCAUGHT 16 44*35128Smarc #define SIGNOSET 32 45*35128Smarc #define SIGIGNORE 64 46*35128Smarc #define SIGJOBS 128 47*35128Smarc 48*35128Smarc #ifdef BSD 49*35128Smarc # ifdef BSD_4_2 50*35128Smarc #define sighold(s) sigblock(1<<((s)-1)) 51*35128Smarc #define sigrelse(s) sigsetmask(sigblock(0)&~(1<<((s)-1))) 52*35128Smarc # else 53*35128Smarc #define signal sigset 54*35128Smarc # endif /* BSD_4_2 */ 55*35128Smarc #else 56*35128Smarc #endif /* BSD */ 57*35128Smarc #define SIGFAIL 0200 58*35128Smarc #define SIGFLG 0200 59*35128Smarc #define TRAPSET 2 60*35128Smarc 61*35128Smarc 62*35128Smarc 63*35128Smarc 64*35128Smarc struct blk /* heap storage */ 65*35128Smarc { 66*35128Smarc BLKPTR word; 67*35128Smarc }; 68*35128Smarc 69*35128Smarc 70*35128Smarc extern char *brkbegin; 71*35128Smarc extern BLKPTR blokp; /*current search pointer*/ 72*35128Smarc extern BLKPTR bloktop; /*top of arena (last blok) 73*35128Smarc initialized in addblok */ 74*35128Smarc 75*35128Smarc extern jmp_buf subshell; /* jump here for subshell */ 76*35128Smarc extern jmp_buf *freturn; /* return pointer for functions or failure */ 77*35128Smarc extern jmp_buf errshell; /* return here on failures */ 78