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