1 /* 2 * This code contains changes by 3 * Gunnar Ritter, Freiburg i. Br., Germany, 2002. All rights reserved. 4 * 5 * Conditions 1, 2, and 4 and the no-warranty notice below apply 6 * to these changes. 7 * 8 * 9 * Copyright (c) 1980, 1993 10 * The Regents of the University of California. All rights reserved. 11 * 12 * Redistribution and use in source and binary forms, with or without 13 * modification, are permitted provided that the following conditions 14 * are met: 15 * 1. Redistributions of source code must retain the above copyright 16 * notice, this list of conditions and the following disclaimer. 17 * 2. Redistributions in binary form must reproduce the above copyright 18 * notice, this list of conditions and the following disclaimer in the 19 * documentation and/or other materials provided with the distribution. 20 * 3. All advertising materials mentioning features or use of this software 21 * must display the following acknowledgement: 22 * This product includes software developed by the University of 23 * California, Berkeley and its contributors. 24 * 4. Neither the name of the University nor the names of its contributors 25 * may be used to endorse or promote products derived from this software 26 * without specific prior written permission. 27 * 28 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 29 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 30 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 31 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 32 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 36 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 37 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 38 * SUCH DAMAGE. 39 * 40 * 41 * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. 42 * 43 * Redistribution and use in source and binary forms, with or without 44 * modification, are permitted provided that the following conditions 45 * are met: 46 * Redistributions of source code and documentation must retain the 47 * above copyright notice, this list of conditions and the following 48 * disclaimer. 49 * Redistributions in binary form must reproduce the above copyright 50 * notice, this list of conditions and the following disclaimer in the 51 * documentation and/or other materials provided with the distribution. 52 * All advertising materials mentioning features or use of this software 53 * must display the following acknowledgement: 54 * This product includes software developed or owned by Caldera 55 * International, Inc. 56 * Neither the name of Caldera International, Inc. nor the names of 57 * other contributors may be used to endorse or promote products 58 * derived from this software without specific prior written permission. 59 * 60 * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA 61 * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR 62 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 63 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 64 * ARE DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE 65 * LIABLE FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR 66 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 67 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 68 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 69 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 70 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 71 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 72 * 73 * from ex_tune.h 7.8.1 (2.11BSD) 1996/10/23 74 * 75 * @(#)ex_tune.h 1.12 (gritter) 12/1/04 76 */ 77 78 /* 79 * Note: the parameters that are actually tuneable have been moved to 80 * config.h. Do not make changes here unless you know what you are 81 * doing! GR 82 */ 83 84 /* 85 * Definitions of editor parameters and limits 86 */ 87 88 /* 89 * Pathnames (will be predefined in Makefile). 90 */ 91 #ifndef EXRECOVER 92 #define EXRECOVER "/usr/sbin/exrecover" 93 #endif 94 #ifndef EXPRESERVE 95 #define EXPRESERVE "/usr/sbin/expreserve" 96 #endif 97 #ifndef VMUNIX 98 #ifndef EXSTRINGS 99 #define EXSTRINGS "/usr/share/misc/exstrings" 100 #endif 101 #endif 102 103 /* 104 * If your system believes that tabs expand to a width other than 105 * 8 then your makefile should cc with -DTABS=whatever, otherwise we use 8. 106 */ 107 #ifndef TABS 108 #define TABS 8 109 #endif 110 111 /* 112 * Maximums 113 * 114 * The definition of LBSIZE should be the same as BUFSIZ (512 usually). 115 * Most other definitions are quite generous. 116 */ 117 /* FNSIZE is also defined in expreserve.c */ 118 #ifdef _POSIX_PATH_MAX 119 #define FNSIZE _POSIX_PATH_MAX 120 #else 121 #define FNSIZE 128 /* File name size */ 122 #endif 123 #ifdef VMUNIX 124 #define LBSIZE BUFSIZ /* Line buffer size */ 125 #ifndef ESIZE /* see config.h */ 126 #define ESIZE 512 /* Regular expression buffer size */ 127 #endif 128 #define CRSIZE BUFSIZ /* Crypt buffer size */ 129 #else /* !VMUNIX */ 130 #ifdef u370 131 #define LBSIZE 4096 132 #ifndef ESIZE /* see config.h */ 133 #define ESIZE 512 134 #endif 135 #define CRSIZE 4096 136 #else 137 #define LBSIZE 512 /* Line length */ 138 #ifndef ESIZE /* see config.h */ 139 #define ESIZE 128 /* Size of compiled re */ 140 #endif 141 #define CRSIZE 512 142 #endif 143 #endif 144 #define NBRA 9 /* Number of re \( \) pairs */ 145 #define GBSIZE 256 /* Buffer size */ 146 #define UXBSIZE 128 /* Unix command buffer size */ 147 #define VBSIZE 128 /* Partial line max size in visual */ 148 /* LBLKS is also defined in expreserve.c */ 149 #ifndef VMUNIX 150 #define LBLKS 125 /* Line pointer blocks in temp file */ 151 #define HBLKS 1 /* struct header fits in BUFSIZ*HBLKS */ 152 #else /* VMUNIX */ 153 #ifdef LARGEF 154 #define LBLKS 20000 155 #else /* !LARGEF */ 156 #define LBLKS 900 157 #endif /* !LARGEF */ 158 #define HBLKS (1 + (FNSIZE + LBLKS * sizeof(bloc)) / BUFSIZ) 159 #endif /* VMUNIX */ 160 #define MAXDIRT 12 /* Max dirtcnt before sync tfile */ 161 162 /* 163 * Size of in-core buffers for temporary file. Since this is 164 * sizeof (char) * (INCORB + 1) * BUFSIZ, it should not be too 165 * large. 166 * 167 * If not defined, no in-core buffers are used. 168 */ 169 #ifdef VMUNIX 170 #if (BUFSIZ - 0) <= 16384 171 #define INCORB (65536/BUFSIZ) 172 #else /* Huge-memory systems. */ 173 #define INCORB 4 174 #endif /* Huge-memory systems. */ 175 #endif /* VMUNIX */ 176 177 /* 178 * Except on VMUNIX, these are a ridiculously small due to the 179 * lousy arglist processing implementation which fixes core 180 * proportional to them. Argv (and hence NARGS) is really unnecessary, 181 * and argument character space not needed except when 182 * arguments exist. Argument lists should be saved before the "zero" 183 * of the incore line information and could then 184 * be reasonably large. 185 */ 186 #undef NCARGS 187 #ifndef VMUNIX 188 #define NARGS 100 /* Maximum number of names in "next" */ 189 #define NCARGS LBSIZE /* Maximum arglist chars in "next" */ 190 #else 191 #define NCARGS 5120 192 #define NARGS (NCARGS/6) 193 #endif 194 195 /* 196 * Output column (and line) are set to this value on cursor addressible 197 * terminals when we lose track of the cursor to force cursor 198 * addressing to occur. 199 */ 200 #define UKCOL -20 /* Prototype unknown column */ 201 202 /* 203 * Attention is the interrupt character (normally 0177 -- delete). 204 * Quit is the quit signal (normally FS -- control-\) and quits open/visual. 205 */ 206 extern int ATTN; 207 #define QUIT ('\\' & 037) 208 209 #define LRGINT INT_MAX /* largest normal length positive integer */ 210 211 #ifdef LONG_BIT 212 #if (LONG_BIT > 32) 213 #define MAXOCT 22 /* Maximum octal digits in a long */ 214 #define BIG 10000000000000000000UL /* largest power of 10 < uns. long */ 215 #define MAXDIGS 20 /* number of digits in BIG */ 216 #else /* LONG_BIT <= 32 */ 217 #define MAXOCT 11 /* Maximum octal digits in a long */ 218 #define BIG 1000000000UL /* largest power of 10 < unsigned long */ 219 #define MAXDIGS 10 /* number of digits in BIG */ 220 #endif /* LONG_BIT <= 32 */ 221 #else /* !LONG_BIT */ 222 #define MAXOCT 11 /* Maximum octal digits in a long */ 223 #define BIG 1000000000 /* largest power of 10 < unsigned long */ 224 #define MAXDIGS 10 /* number of digits in BIG */ 225 #endif /* !LONG_BIT */ 226