1 /** $MirOS: src/usr.bin/oldroff/nroff/tdef.h,v 1.2 2008/11/08 23:04:43 tg Exp $ */ 2 3 /*- 4 * Copyright (c) 1979, 1980, 1981, 1986, 1988, 1990, 1991, 1992 5 * The Regents of the University of California. 6 * Copyright (C) Caldera International Inc. 2001-2002. 7 * Copyright (c) 2003, 2004 8 * Thorsten "mirabilos" Glaser <tg@mirbsd.org> 9 * All rights reserved. 10 * 11 * Redistribution and use in source and binary forms, 12 * with or without modification, are permitted provided 13 * that the following conditions are met: 14 * 15 * Redistributions of source code and documentation must retain 16 * the above copyright notice, this list of conditions and the 17 * following disclaimer. Redistributions in binary form must 18 * reproduce the above copyright notice, this list of conditions 19 * and the following disclaimer in the documentation and/or other 20 * materials provided with the distribution. 21 * 22 * All advertising materials mentioning features or use of this 23 * software must display the following acknowledgement: 24 * This product includes software developed or owned by 25 * Caldera International, Inc. 26 * 27 * Neither the name of Caldera International, Inc. nor the names 28 * of other contributors may be used to endorse or promote products 29 * derived from this software without specific prior written permission. 30 * 31 * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA 32 * INTERNATIONAL, INC. AND CONTRIBUTORS "AS IS" AND ANY EXPRESS 33 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 34 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 35 * ARE DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE 36 * LIABLE FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR 37 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 38 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 39 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 40 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 41 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 42 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 43 * 44 * @(#)tdef.h 4.9 (Berkeley) 4/18/91 45 */ 46 47 #ifndef _TDEF_H 48 #define _TDEF_H 49 50 #include <sys/param.h> 51 #include <signal.h> 52 53 #undef CMASK /* XXX */ 54 #undef BIG /* XXX */ 55 #define MAXPTR (-1) /* max value of any pointer variable */ 56 57 #ifdef NROFF /* NROFF */ 58 #define EM t.Em 59 #define HOR t.Hor 60 #define VERT t.Vert 61 #define INCH 240 /* increments per inch */ 62 #define SPS INCH/10 /* space size */ 63 #define SS INCH/10 /* " */ 64 #define TRAILER 0 65 #define UNPAD 0227 66 #define PO 0 /* page offset */ 67 #define ASCII 1 68 #define PTID 1 69 #define LG 0 70 #define DTAB 0 /* set at 8 Ems at init time */ 71 #define ICS 2*SPS 72 /*#define TEMP 256 /* 65K */ 73 #define TEMP 1536 /* 384K */ 74 #endif 75 76 #ifndef NROFF /* TROFF */ 77 #define INCH 432 /* troff resolution */ 78 #define SPS 20 /* space size at 10pt; 1/3 Em */ 79 #define SS 12 /* space size in 36ths of an em */ 80 #define TRAILER 6048 /* 144*14*3 = 14 inches */ 81 #define UNPAD 027 82 #define PO 416 /* page offset 26/27ths inch */ 83 #define HOR 1 84 #define VERT 3 85 #define EM (6*(pts&077)) 86 #define ASCII 0 87 #define PTID 0 88 #define LG 1 89 #define DTAB (INCH/2) 90 #define ICS 3*SPS 91 /* #define TEMP 512 /* 128K */ 92 #define TEMP 2048 /* 512K */ 93 #endif 94 95 #define NARSP 0177 /* narrow space */ 96 #define HNSP 0226 /* half narrow space */ 97 #define PS 10 /* default point size */ 98 #define FT 0 /* default font position */ 99 #define LL 65*INCH/10 /* line length; 39picas=6.5in */ 100 #define VS INCH/6 /* vert space; 12points */ 101 102 #ifdef VMUNIX 103 #define NN 2048 /* number registers */ 104 #else 105 #define NN 132 /* number registers */ 106 #endif 107 /* #define NN 200 */ 108 109 #define NNAMES 14 /* predefined reg names */ 110 #define NIF 63 /* if-else nesting */ 111 #define NS 256 /* name buffer */ 112 #define NTM 1024 /* tm buffer */ 113 #define NEV 4 /* environments */ 114 #define EVLSZ 32 /* size of ev stack */ 115 /* #define EVS 4*256 */ 116 117 #ifdef VMUNIX 118 #define NM 3600 119 #define EVS 80*256 /* environment size in words */ 120 #else 121 #define NM 300 /* requests + macros */ 122 #define EVS 3*256 /* environment size in words */ 123 #endif 124 125 #define DELTA 2048 /* delta core bytes */ 126 #define NHYP 12 /* max hyphens per word */ 127 #define NHEX 256 /* byte size of exception word list */ 128 #define NTAB 45 /* tab stops */ 129 #define NSO 12 /* "so" depth */ 130 131 #ifdef VMUNIX 132 #define WDSIZE 2048 /* word buffer size */ 133 #define LNSIZE 5760 /* line buffer size */ 134 #else 135 #define WDSIZE 170 /* word buffer size */ 136 #define LNSIZE 480 /* line buffer size */ 137 #endif 138 /* #define LNSIZE 680 */ 139 140 #define NDI 5 /* number of diversions */ 141 #define DBL 0100000 /* double size indicator */ 142 #define MOT 0100000 /* motion character indicator */ 143 #define MOTV 0160000 /* clear for motion part */ 144 #define VMOT 0040000 /* vert motion bit */ 145 #define NMOT 0020000 /* negative motion indicator */ 146 #define MMASK 0100000 /* macro mask indicator */ 147 #define CMASK 0100377 148 #define ZBIT 0400 /* zero width char */ 149 #define BMASK 0377 150 #define BYTE 8 151 #define IMP 004 /* impossible char */ 152 #define FILLER 037 153 #define PRESC 026 154 #define HX 0376 /* High-order part of xlss */ 155 #define LX 0375 /* low-order part of xlss */ 156 #define CONT 025 157 #define COLON 013 158 #define XPAR 030 159 #define ESC 033 160 #define FLSS 031 161 #define RPT 014 162 #define JREG 0374 163 #define NTRAP 20 /* number of traps */ 164 #define NPN 20 /* numbers in "-o" */ 165 #define T_PAD 0101 /* cat padding */ 166 #define T_INIT 0100 167 #define T_IESC 16 /* initial offset */ 168 #define T_STOP 0111 169 #define NPP 10 /* pads per field */ 170 171 #ifdef VMUNIX 172 #define FBUFSZ 2048 173 #else 174 #define FBUFSZ 256 /* field buf size words */ 175 #endif 176 177 #define OBUFSZ 147456 /* bytes */ 178 #define IBUFSZ 16384 /* bytes */ 179 #define NC 256 /* cbuf size words */ 180 #define NOV 10 /* number of overstrike chars */ 181 #define TDELIM 032 182 #define LEFT 035 183 #define RIGHT 036 184 #define LEADER 001 185 #define TAB 011 186 #define TMASK 037777 187 #define RTAB 0100000 188 #define CTAB 0040000 189 #define OHC 024 190 191 #define PAIR(A,B) (A|(B<<BYTE)) 192 193 #define BLK 256 /* alloc block words */ 194 195 #ifdef VMUNIX 196 #define BIG 4096 197 #endif 198 199 #ifdef BIG 200 typedef long filep; 201 #define NBLIST BIG /* allocation , BIG = 256 per 65k */ 202 #define BLKBITS 8 /* for BLK=256 */ 203 #else /* def BIG */ 204 typedef unsigned filep; 205 #define NBLIST TEMP /* allocation list, TEMP<=512 */ 206 /* BLK*NBLIST<=65536 words, if filep=unsigned */ 207 #define BLKBITS 0 208 #endif 209 210 #endif /* ndef _TDEF_H */ 211