1 | /* |
---|
2 | * Copyright 1992, 1993, Geoff Kuenning, Granada Hills, CA |
---|
3 | * All rights reserved. |
---|
4 | * |
---|
5 | * Redistribution and use in source and binary forms, with or without |
---|
6 | * modification, are permitted provided that the following conditions |
---|
7 | * are met: |
---|
8 | * |
---|
9 | * 1. Redistributions of source code must retain the above copyright |
---|
10 | * notice, this list of conditions and the following disclaimer. |
---|
11 | * 2. Redistributions in binary form must reproduce the above copyright |
---|
12 | * notice, this list of conditions and the following disclaimer in the |
---|
13 | * documentation and/or other materials provided with the distribution. |
---|
14 | * 3. All modifications to the source code must be clearly marked as |
---|
15 | * such. Binary redistributions based on modified source code |
---|
16 | * must be clearly marked as modified versions in the documentation |
---|
17 | * and/or other materials provided with the distribution. |
---|
18 | * 4. All advertising materials mentioning features or use of this software |
---|
19 | * must display the following acknowledgment: |
---|
20 | * This product includes software developed by Geoff Kuenning and |
---|
21 | * other unpaid contributors. |
---|
22 | * 5. The name of Geoff Kuenning may not be used to endorse or promote |
---|
23 | * products derived from this software without specific prior |
---|
24 | * written permission. |
---|
25 | * |
---|
26 | * THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND |
---|
27 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
---|
28 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
---|
29 | * ARE DISCLAIMED. IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE |
---|
30 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
---|
31 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
---|
32 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
---|
33 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
---|
34 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
---|
35 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
---|
36 | * SUCH DAMAGE. |
---|
37 | */ |
---|
38 | |
---|
39 | /* |
---|
40 | * This is the configuration file for ispell. Thanks to Bob McQueer |
---|
41 | * for creating it and making the necessary changes elsewhere to |
---|
42 | * support it, and to George Sipe for figuring out how to make it easier |
---|
43 | * to use. |
---|
44 | * |
---|
45 | * WARNING: The Makefile edits this file (config.X) to produce config.h. |
---|
46 | * If you are looking at config.h, you're in the wrong file. |
---|
47 | * |
---|
48 | * Look through this file from top to bottom. If anything needs changing, |
---|
49 | * create the header file "local.h" and define the correct values there; |
---|
50 | * they will override this file. If you don't make any changes to this |
---|
51 | * file, future patching will be easier. |
---|
52 | */ |
---|
53 | |
---|
54 | /* |
---|
55 | * $Id: config.X,v 1.2 2002-09-13 00:40:26 ghudson Exp $ |
---|
56 | * |
---|
57 | * $Log: not supported by cvs2svn $ |
---|
58 | * Revision 1.1.1.1 1997/09/03 21:08:11 ghudson |
---|
59 | * Import of ispell 3.1.20 |
---|
60 | * |
---|
61 | * Revision 1.71 1995/01/08 23:23:28 geoff |
---|
62 | * Add some more configuration variables: HAS_RENAME, MSDOS_BINARY_OPEN, |
---|
63 | * HOME, PDICTHOME, HASHSUFFIX, STATSUFFIX, and COUNTSUFFIX. These are |
---|
64 | * all to make it easier to port ispell to MS-DOS. Change DEFPAFF back |
---|
65 | * to "words" so that only .ispell_words will be independent of language. |
---|
66 | * |
---|
67 | * Revision 1.70 1994/10/25 05:45:57 geoff |
---|
68 | * Fix a tiny typo in a comment. Add a configurable install command. |
---|
69 | * |
---|
70 | * Revision 1.69 1994/09/01 06:06:30 geoff |
---|
71 | * Improve the the documentation of LANGUAGES to include working examples. |
---|
72 | * |
---|
73 | * Revision 1.68 1994/07/28 05:11:34 geoff |
---|
74 | * Log message for previous revision: force MASKBITS to greater than or |
---|
75 | * equal to MASKTYPE_WIDTH (simplifies configuration for 64-bit |
---|
76 | * machines). |
---|
77 | * |
---|
78 | * Revision 1.67 1994/07/28 04:53:34 geoff |
---|
79 | * |
---|
80 | * Revision 1.66 1994/04/27 02:50:46 geoff |
---|
81 | * Change the documentation and defaults for the languages variable to |
---|
82 | * reflect the new method of making American and British dictionary |
---|
83 | * variants. |
---|
84 | * |
---|
85 | * Revision 1.65 1994/04/27 01:50:28 geoff |
---|
86 | * Add MAX_CAPS. |
---|
87 | * |
---|
88 | * Revision 1.64 1994/02/07 08:10:42 geoff |
---|
89 | * Add GENERATE_LIBRARY_PROTOS as a special variable for use only by me. |
---|
90 | * |
---|
91 | * Revision 1.63 1994/01/26 07:44:45 geoff |
---|
92 | * Make yacc configurable through local.h. |
---|
93 | * |
---|
94 | * Revision 1.62 1994/01/25 07:11:20 geoff |
---|
95 | * Get rid of all old RCS log lines in preparation for the 3.1 release. |
---|
96 | * |
---|
97 | */ |
---|
98 | |
---|
99 | /* You may wish to specify your local definitions in this file: */ |
---|
100 | |
---|
101 | #include "local.h" /* local definitions for options */ |
---|
102 | |
---|
103 | /* |
---|
104 | ** Major-differences selection. The default system is BSD; for USG |
---|
105 | ** or non-UNIX systems you should add the appropriate #define to local.h. |
---|
106 | */ |
---|
107 | #ifndef USG |
---|
108 | #undef USG /* Define this in local.h for System V machines */ |
---|
109 | #endif /* USG */ |
---|
110 | |
---|
111 | #include <sys/param.h> |
---|
112 | #include <sys/types.h> |
---|
113 | #ifndef USG |
---|
114 | #include <sys/dir.h> |
---|
115 | #endif /* USG */ |
---|
116 | |
---|
117 | /* |
---|
118 | ** Things that normally go in a Makefile. Define these just like you |
---|
119 | ** might in the Makefile, except you should use #define instead of |
---|
120 | ** make's assignment syntax. Everything must be double-quoted, and |
---|
121 | ** (unlike make) you can't use any sort of $-syntax to pick up the |
---|
122 | ** values of other definitions. |
---|
123 | */ |
---|
124 | #ifndef CC |
---|
125 | #define CC "cc" |
---|
126 | #endif /* CC */ |
---|
127 | #ifndef EMACS |
---|
128 | #define EMACS "emacs" |
---|
129 | #endif /* EMACS */ |
---|
130 | #ifndef LINT |
---|
131 | #define LINT "lint" |
---|
132 | #endif /* LINT */ |
---|
133 | #ifndef CFLAGS |
---|
134 | #define CFLAGS "-O" |
---|
135 | #endif /* CFLAGS */ |
---|
136 | #ifndef LINTFLAGS |
---|
137 | #define LINTFLAGS "" |
---|
138 | #endif /* LINTFLAGS */ |
---|
139 | #ifndef YACC |
---|
140 | #define YACC "yacc" |
---|
141 | #endif /* YACC */ |
---|
142 | |
---|
143 | /* |
---|
144 | ** Libraries that may need to be added to the cc line to get ispell to |
---|
145 | ** link. Normally, this should be null. |
---|
146 | */ |
---|
147 | #ifndef LIBES |
---|
148 | #define LIBES "" |
---|
149 | #endif |
---|
150 | |
---|
151 | /* |
---|
152 | ** TERMLIB - where to get the termcap library. Should be -ltermcap or |
---|
153 | ** -lcurses on most systems. |
---|
154 | */ |
---|
155 | #ifndef TERMLIB |
---|
156 | #define TERMLIB "-ltermcap" |
---|
157 | #endif |
---|
158 | |
---|
159 | /* |
---|
160 | ** REGLIB - where to get the regular-expression routines, if |
---|
161 | ** REGEX_LOOKUP is defined. Should be -lPW on USG systems, null on |
---|
162 | ** BSD systems. |
---|
163 | */ |
---|
164 | #ifndef REGLIB |
---|
165 | #define REGLIB "" |
---|
166 | #endif |
---|
167 | |
---|
168 | /* |
---|
169 | ** Where to install various components of ispell. BINDIR contains |
---|
170 | ** binaries. LIBDIR contains hash tables and affix files. ELISPDIR |
---|
171 | ** contains emacs lisp files (if any) and TEXINFODIR contains emacs |
---|
172 | ** TeXinfo files. MAN1DIR and MAN4DIR will hold the chapter-1 and |
---|
173 | ** chapter-4 manual pages, respectively. |
---|
174 | ** |
---|
175 | ** If you intend to use multiple dictionary files, I would suggest |
---|
176 | ** LIBDIR be a directory which will contain nothing else, so sensible |
---|
177 | ** names can be constructed for the -d option without conflict. |
---|
178 | */ |
---|
179 | #ifndef BINDIR |
---|
180 | #define BINDIR "/usr/local/bin" |
---|
181 | #endif |
---|
182 | #ifndef LIBDIR |
---|
183 | #define LIBDIR "/usr/local/lib" |
---|
184 | #endif |
---|
185 | #ifndef ELISPDIR |
---|
186 | #define ELISPDIR "/usr/local/lib/emacs/site-lisp" |
---|
187 | #endif |
---|
188 | #ifndef TEXINFODIR |
---|
189 | #define TEXINFODIR "/usr/local/info" |
---|
190 | #endif |
---|
191 | #ifndef MAN1DIR |
---|
192 | #define MAN1DIR "/usr/local/man/man1" |
---|
193 | #endif |
---|
194 | #ifndef MAN4DIR |
---|
195 | #define MAN4DIR "/usr/local/man/man4" |
---|
196 | #endif |
---|
197 | |
---|
198 | /* |
---|
199 | ** Extensions to put on manual pages. Usually these are ".1" or ".1l". |
---|
200 | */ |
---|
201 | #ifndef MAN1EXT |
---|
202 | #define MAN1EXT ".1" |
---|
203 | #endif |
---|
204 | #ifndef MAN4EXT |
---|
205 | #define MAN4EXT ".4" |
---|
206 | #endif |
---|
207 | |
---|
208 | /* |
---|
209 | ** List of all hash files (languages) which will be supported by ispell. |
---|
210 | ** |
---|
211 | ** This variable has a complex format so that many options can be |
---|
212 | ** specified. The format is as follows: |
---|
213 | ** |
---|
214 | ** <language>[,<make-options>...] [<language> [,<make-options> ...] ...] |
---|
215 | ** |
---|
216 | ** where |
---|
217 | ** |
---|
218 | ** language is the name of a subdirectory of the |
---|
219 | ** "languages" directory |
---|
220 | ** make-options are options that are to be passed to "make" in |
---|
221 | ** the specified directory. The make-options |
---|
222 | ** should not, in general, specify a target, as |
---|
223 | ** this will be provided by the make process. |
---|
224 | ** |
---|
225 | ** For example, if LANGUAGES is: |
---|
226 | ** |
---|
227 | ** "{american,MASTERDICTS=american.med+,HASHFILES=americanmed+.hash,EXTRADICT=/usr/dict/words /usr/dict/web2} {deutsch,DICTALWAYS=deutsch.sml,DICTOPTIONS=}" |
---|
228 | ** |
---|
229 | ** then the American-English and Deutsch (German) languages will be supported, |
---|
230 | ** and the following variable settings will be passed to the two Makefiles: |
---|
231 | ** |
---|
232 | ** American: |
---|
233 | ** |
---|
234 | ** MASTERDICTS='american.med+' |
---|
235 | ** HASHFILES='americanmed+.hash' |
---|
236 | ** EXTRADICT='/usr/dict/words /usr/dict/web2' |
---|
237 | ** |
---|
238 | ** Deutsch: |
---|
239 | ** |
---|
240 | ** DICTALWAYS='deutsch.sml' |
---|
241 | ** DICTOPTIONS='' |
---|
242 | ** |
---|
243 | ** Notes on the syntax: The makefile is not very robust. If you have |
---|
244 | ** make problems, or if make seems to fail in the language-subdirs |
---|
245 | ** dependency, check your syntax. The makefile adds single quotes to |
---|
246 | ** the individual variables in the LANGUAGES specification, so don't |
---|
247 | ** use quotes of any kind. |
---|
248 | ** |
---|
249 | ** In the future, the first language listed in this variable will |
---|
250 | ** become the default, and the DEFHASH, DEFLANG, and DEFPAFF, |
---|
251 | ** variables will all become obsolete. So be sure to put your default |
---|
252 | ** language first, to make later conversion easier! |
---|
253 | ** |
---|
254 | ** Notes on options for the various languages will be found in the |
---|
255 | ** Makefiles for those languages. Some of those languages may require |
---|
256 | ** you to also change various limits limits like MASKBITS or the |
---|
257 | ** length parameters. |
---|
258 | ** |
---|
259 | ** A special note on the English language: because the British and |
---|
260 | ** American dialects use different spelling, you should usually select |
---|
261 | ** one or the other of these. If you select both, the setting of |
---|
262 | ** MASTERHASH will determine which becomes the language linked to |
---|
263 | ** DEFHASH (which will usually be named english.hash). |
---|
264 | */ |
---|
265 | #ifndef LANGUAGES |
---|
266 | #define LANGUAGES "{american,MASTERDICTS=american.med+,HASHFILES=americanmed+.hash,EXTRADICT=/usr/dict/words}" |
---|
267 | #endif /* LANGUAGES */ |
---|
268 | |
---|
269 | /* |
---|
270 | ** Master hash file for DEFHASH. This is the name of a hash file |
---|
271 | ** built by a language Makefile. It should be the most-popular hash |
---|
272 | ** file on your system, because it is the one that will be used by |
---|
273 | ** default. It must be listed in LANGUAGES, above. |
---|
274 | */ |
---|
275 | #ifndef MASTERHASH |
---|
276 | #define MASTERHASH "americanmed+.hash" |
---|
277 | #endif |
---|
278 | |
---|
279 | /* |
---|
280 | ** Default native-language hash file. This is the name given to the |
---|
281 | ** hash table that will be used if no language is specified to |
---|
282 | ** ispell. It is a link to MASTERHASH, above. |
---|
283 | */ |
---|
284 | #ifndef DEFHASH |
---|
285 | #define DEFHASH "english.hash" |
---|
286 | #endif |
---|
287 | |
---|
288 | /* |
---|
289 | ** Language tables for the default language. This must be the name of |
---|
290 | ** the affix file that was used to generate the MASTERHASH/DEFHASH, |
---|
291 | ** above. |
---|
292 | */ |
---|
293 | #ifndef DEFLANG |
---|
294 | #define DEFLANG "english.aff" |
---|
295 | #endif |
---|
296 | |
---|
297 | /* |
---|
298 | ** Language to use for error messages. If there are no messages in this |
---|
299 | ** language, English will be used instead. |
---|
300 | */ |
---|
301 | #ifndef MSGLANG |
---|
302 | #define MSGLANG "english" |
---|
303 | #endif /* MSGLANG */ |
---|
304 | |
---|
305 | /* |
---|
306 | ** If your sort command accepts the -T switch to set temp file |
---|
307 | ** locations (try it out; it exists but is undocumented on some |
---|
308 | ** systems), make the following variable the null string. Otherwise |
---|
309 | ** leave it as the sed script. |
---|
310 | */ |
---|
311 | #ifndef SORTTMP |
---|
312 | #define SORTTMP "-e '/!!SORTTMP!!/s/=.*$/=/'" |
---|
313 | #endif |
---|
314 | |
---|
315 | /* |
---|
316 | ** If your sort command accepts the -T switch (see above), make the |
---|
317 | ** following variable refer to a temporary directory with lots of |
---|
318 | ** space. Otherwise make it the null string. |
---|
319 | */ |
---|
320 | #ifndef MAKE_SORTTMP |
---|
321 | #define MAKE_SORTTMP "-T ${TMPDIR-/usr/tmp}" |
---|
322 | #endif |
---|
323 | |
---|
324 | /* |
---|
325 | ** INSTALL program. Could be a copy program like cp or something fancier |
---|
326 | ** like /usr/ucb/install -c |
---|
327 | */ |
---|
328 | #ifndef INSTALL |
---|
329 | #define INSTALL "cp" |
---|
330 | #endif |
---|
331 | |
---|
332 | /* |
---|
333 | ** If your system has the rename(2) system call, define HAS_RENAME and |
---|
334 | ** ispell will use that call to rename backup files. Otherwise, it |
---|
335 | ** will use link/unlink. There is no harm in this except on MS-DOS, |
---|
336 | ** which doesn't support link/unlink. |
---|
337 | */ |
---|
338 | #ifndef HAS_RENAME |
---|
339 | #undef HAS_RENAME |
---|
340 | #endif /* HAS_RENAME */ |
---|
341 | |
---|
342 | /* type given to signal() by signal.h */ |
---|
343 | #ifndef SIGNAL_TYPE |
---|
344 | #define SIGNAL_TYPE void |
---|
345 | #endif |
---|
346 | |
---|
347 | /* environment variable for user's word list */ |
---|
348 | #ifndef PDICTVAR |
---|
349 | #define PDICTVAR "WORDLIST" |
---|
350 | #endif |
---|
351 | |
---|
352 | /* prefix part of default word list */ |
---|
353 | #ifndef DEFPDICT |
---|
354 | #define DEFPDICT ".ispell_" |
---|
355 | #endif |
---|
356 | |
---|
357 | /* |
---|
358 | ** suffix part of default word list |
---|
359 | */ |
---|
360 | #ifndef DEFPAFF |
---|
361 | #define DEFPAFF "words" |
---|
362 | #endif |
---|
363 | |
---|
364 | /* old place to look for default word list */ |
---|
365 | #ifndef OLDPDICT |
---|
366 | #define OLDPDICT ".ispell_" |
---|
367 | #endif /* OLDPDICT */ |
---|
368 | #ifndef OLDPAFF |
---|
369 | #define OLDPAFF "words" |
---|
370 | #endif /* OLDPAFF */ |
---|
371 | |
---|
372 | /* environment variable for include file string */ |
---|
373 | #ifndef INCSTRVAR |
---|
374 | #define INCSTRVAR "INCLUDE_STRING" |
---|
375 | #endif |
---|
376 | |
---|
377 | /* default include string */ |
---|
378 | #ifndef DEFINCSTR |
---|
379 | #define DEFINCSTR "&Include_File&" |
---|
380 | #endif |
---|
381 | |
---|
382 | /* mktemp template for temporary file - MUST contain 6 consecutive X's */ |
---|
383 | #ifndef TEMPNAME |
---|
384 | #define TEMPNAME "/tmp/ispellXXXXXX" |
---|
385 | #endif |
---|
386 | |
---|
387 | /* |
---|
388 | ** If REGEX_LOOKUP is undefined, the lookup command (L) will use the look(1) |
---|
389 | ** command (if available) or the egrep command. If REGEX_LOOKUP is defined, |
---|
390 | ** the lookup command will use the internal dictionary and the |
---|
391 | ** regular-expression library (which you must supply separately. There is |
---|
392 | ** a public-domain library available; libraries are also distributed with |
---|
393 | ** both BSD and System V. |
---|
394 | ** |
---|
395 | ** The advantage of no REGEX_LOOKUP is that it is often much faster, especially |
---|
396 | ** if the look(1) command is available, that the words found are presented |
---|
397 | ** in alphabetical order, and that the list of words searched is larger. |
---|
398 | ** The advantage of REGEX_LOOKUP is that ispell doesn't need to spawn another |
---|
399 | ** program, and the list of words searched is exactly the list of (root) words |
---|
400 | ** that ispell will accept. (However, note that words formed with affixes will |
---|
401 | ** not be found; this can produce some artifacts. For example, since |
---|
402 | ** "brother" can be formed as "broth+er", a lookup command might fail to |
---|
403 | ** find "brother.") |
---|
404 | */ |
---|
405 | #ifndef REGEX_LOOKUP |
---|
406 | #undef REGEX_LOOKUP |
---|
407 | #endif /* REGEX_LOOKUP */ |
---|
408 | |
---|
409 | /* |
---|
410 | ** Choose the proper type of regular-expression routines here. BSD |
---|
411 | ** and public-domain systems have routines called re_comp and re_exec; |
---|
412 | ** System V uses regcmp and regex. |
---|
413 | */ |
---|
414 | #ifdef REGEX_LOOKUP |
---|
415 | #ifndef REGCMP |
---|
416 | #ifdef USG |
---|
417 | #define REGCMP(str) regcmp (str, (char *) 0) |
---|
418 | #define REGEX(re, str, dummy) regex (re, str, dummy, dummy, dummy, dummy, \ |
---|
419 | dummy, dummy, dummy, dummy, dummy, dummy) |
---|
420 | #else /* USG */ |
---|
421 | #define REGCMP(str) re_comp (str) |
---|
422 | #define REGEX(re, str, dummy) re_exec (str) |
---|
423 | #endif /* USG */ |
---|
424 | #endif /* REGCMP */ |
---|
425 | #endif /* REGEX_LOOKUP */ |
---|
426 | |
---|
427 | /* look command (if look(1) MAY BE available - ignored if not) */ |
---|
428 | #ifndef REGEX_LOOKUP |
---|
429 | #ifndef LOOK |
---|
430 | #define LOOK "look -df" |
---|
431 | #endif |
---|
432 | #endif /* REGEX_LOOKUP */ |
---|
433 | |
---|
434 | /* path to egrep (use speeded up version if available) */ |
---|
435 | #ifndef EGREPCMD |
---|
436 | #ifdef USG |
---|
437 | #define EGREPCMD "/bin/egrep" |
---|
438 | #else |
---|
439 | #define EGREPCMD "/usr/bin/egrep -i" |
---|
440 | #endif |
---|
441 | #endif |
---|
442 | |
---|
443 | /* path to wordlist for Lookup command (typically /usr/dict/{words|web2}) */ |
---|
444 | /* note that /usr/dict/web2 is usually a bad idea due to obscure words */ |
---|
445 | #ifndef WORDS |
---|
446 | #define WORDS "/usr/dict/words" |
---|
447 | #endif |
---|
448 | |
---|
449 | /* buffer size to use for file names if not in sys/param.h */ |
---|
450 | #ifndef MAXPATHLEN |
---|
451 | #define MAXPATHLEN 240 |
---|
452 | #endif |
---|
453 | |
---|
454 | /* max file name length (will truncate to fit BAKEXT) if not in sys/param.h */ |
---|
455 | #ifndef MAXNAMLEN |
---|
456 | #define MAXNAMLEN 14 |
---|
457 | #endif |
---|
458 | |
---|
459 | /* define if you want .bak file names truncated to MAXNAMLEN characters */ |
---|
460 | #ifndef TRUNCATEBAK |
---|
461 | #undef TRUNCATEBAK |
---|
462 | #endif /* TRUNCATEBAK */ |
---|
463 | |
---|
464 | /* largest word accepted from a file by any input routine, plus one */ |
---|
465 | #ifndef INPUTWORDLEN |
---|
466 | #define INPUTWORDLEN 100 |
---|
467 | #endif |
---|
468 | |
---|
469 | /* largest amount that a word might be extended by adding affixes */ |
---|
470 | #ifndef MAXAFFIXLEN |
---|
471 | #define MAXAFFIXLEN 20 |
---|
472 | #endif |
---|
473 | |
---|
474 | /* |
---|
475 | ** Define the following to suppress the 8-bit character feature. |
---|
476 | ** Unfortunately, this doesn't work as well as it might, because ispell |
---|
477 | ** only strips the 8th bit in some places. For example, it calls strcmp() |
---|
478 | ** quite often without first stripping parity. However, I really wonder |
---|
479 | ** about the utility of this option, so I haven't bothered to fix it. If |
---|
480 | ** you think the stripping feature of NO8BIT is useful, you might let me |
---|
481 | ** (Geoff Kuenning) know. |
---|
482 | ** |
---|
483 | ** Nevertheless, NO8BIT is a useful option for other reasons. If NO8BIT |
---|
484 | ** is defined, ispell will probably use 8-bit characters internally; |
---|
485 | ** this improves time efficiency and saves a small amount of space |
---|
486 | ** in the hash file. Thus, I recommend you specify NO8BIT unless you |
---|
487 | ** actually expect to be spelling files which use a 256-character set. |
---|
488 | */ |
---|
489 | #ifndef NO8BIT |
---|
490 | #undef NO8BIT |
---|
491 | #endif /* NO8BIT */ |
---|
492 | |
---|
493 | /* |
---|
494 | ** Number of mask bits (affix flags) supported. Must be 32, 64, 128, or |
---|
495 | ** 256. If MASKBITS is 32 or 64, there are really only 26 or 58 flags |
---|
496 | ** available, respectively. If it is 32, the flags are named with the |
---|
497 | ** 26 English uppercase letters; lowercase will be converted to uppercase. |
---|
498 | ** If MASKBITS is 64, the 58 flags are named 'A' through 'z' in ASCII |
---|
499 | ** order, including the 6 special characters from 'Z' to 'a': "[\]^_`". |
---|
500 | ** If MASKBITS is 128 or 256, all the 7-bit or 8-bit characters, |
---|
501 | ** respectively, are theoretically available, though a few (newline, slash, |
---|
502 | ** null byte) are pretty hard to actually use successfully. |
---|
503 | ** |
---|
504 | ** Note that a number of non-English affix files depend on having a |
---|
505 | ** larger value for MASKBITS. See the affix files for more |
---|
506 | ** information. |
---|
507 | */ |
---|
508 | #ifndef MASKBITS |
---|
509 | #define MASKBITS 32 |
---|
510 | #endif |
---|
511 | |
---|
512 | /* |
---|
513 | ** C type to use for masks. This should be a type that the processor |
---|
514 | ** accesses efficiently. |
---|
515 | ** |
---|
516 | ** MASKTYPE_WIDTH must correctly reflect the number of bits in a |
---|
517 | ** MASKTYPE. Unfortunately, it is also required to be a constant at |
---|
518 | ** preprocessor time, which means you can't use the sizeof operator to |
---|
519 | ** define it. |
---|
520 | ** |
---|
521 | ** Note that MASKTYPE *must* match MASKTYPE_WIDTH or you may get |
---|
522 | ** division-by-zero errors! |
---|
523 | */ |
---|
524 | #ifndef MASKTYPE |
---|
525 | #define MASKTYPE long |
---|
526 | #endif |
---|
527 | #ifndef MASKTYPE_WIDTH |
---|
528 | #define MASKTYPE_WIDTH 32 |
---|
529 | #endif |
---|
530 | #if MASKBITS < MASKTYPE_WIDTH |
---|
531 | #undef MASKBITS |
---|
532 | #define MASKBITS MASKTYPE_WIDTH |
---|
533 | #endif /* MASKBITS < MASKTYPE_WIDTH */ |
---|
534 | |
---|
535 | |
---|
536 | /* maximum number of include files supported by xgets; set to 0 to disable */ |
---|
537 | #ifndef MAXINCLUDEFILES |
---|
538 | #define MAXINCLUDEFILES 5 |
---|
539 | #endif |
---|
540 | |
---|
541 | /* |
---|
542 | ** Maximum hash table fullness percentage. Larger numbers trade space |
---|
543 | ** for time. |
---|
544 | **/ |
---|
545 | #ifndef MAXPCT |
---|
546 | #define MAXPCT 70 /* Expand table when 70% full */ |
---|
547 | #endif |
---|
548 | |
---|
549 | /* |
---|
550 | ** Maximum number of "string" characters that can be defined in a |
---|
551 | ** language (affix) file. Don't forget that an upper/lower string |
---|
552 | ** character counts as two! |
---|
553 | */ |
---|
554 | #ifndef MAXSTRINGCHARS |
---|
555 | #define MAXSTRINGCHARS 100 |
---|
556 | #endif /* MAXSTRINGCHARS */ |
---|
557 | |
---|
558 | /* |
---|
559 | ** Maximum length of a "string" character. The default is appropriate for |
---|
560 | ** nroff-style characters starting with a backslash. |
---|
561 | */ |
---|
562 | #ifndef MAXSTRINGCHARLEN |
---|
563 | #define MAXSTRINGCHARLEN 10 |
---|
564 | #endif /* MAXSTRINGCHARLEN */ |
---|
565 | |
---|
566 | /* |
---|
567 | ** the NOPARITY mask is applied to user input characters from the terminal |
---|
568 | ** in order to mask out the parity bit. |
---|
569 | */ |
---|
570 | #ifdef NO8BIT |
---|
571 | #define NOPARITY 0x7f |
---|
572 | #else |
---|
573 | #define NOPARITY 0xff |
---|
574 | #endif |
---|
575 | |
---|
576 | |
---|
577 | /* |
---|
578 | ** the terminal mode for ispell, set to CBREAK or RAW |
---|
579 | ** |
---|
580 | */ |
---|
581 | #ifndef TERM_MODE |
---|
582 | #define TERM_MODE CBREAK |
---|
583 | #endif |
---|
584 | |
---|
585 | /* |
---|
586 | ** Define this if you want your columns of words to be of equal length. |
---|
587 | ** This will spread short word lists across the screen instead of down it. |
---|
588 | */ |
---|
589 | #ifndef EQUAL_COLUMNS |
---|
590 | #undef EQUAL_COLUMNS |
---|
591 | #endif /* EQUAL_COLUMNS */ |
---|
592 | |
---|
593 | /* |
---|
594 | ** This is the extension that will be added to backup files |
---|
595 | */ |
---|
596 | #ifndef BAKEXT |
---|
597 | #define BAKEXT ".bak" |
---|
598 | #endif |
---|
599 | |
---|
600 | /* |
---|
601 | ** Define this if you want to suppress the capitalization-checking |
---|
602 | ** feature. This will reduce the size of the hashed dictionary on |
---|
603 | ** most 16-bit and some 32-bit machines. This option is not |
---|
604 | ** recommended. |
---|
605 | */ |
---|
606 | #ifndef NO_CAPITALIZATION_SUPPORT |
---|
607 | #undef NO_CAPITALIZATION_SUPPORT |
---|
608 | #endif /* NO_CAPITALIZATION_SUPPORT */ |
---|
609 | |
---|
610 | /* |
---|
611 | ** Define this if you want your personal dictionary sorted. This may take |
---|
612 | ** a long time for very large dictionaries. Dictionaries larger than |
---|
613 | ** SORTPERSONAL words will not be sorted. Define SORTPERSONAL as zero |
---|
614 | ** to disable this feature. |
---|
615 | */ |
---|
616 | #ifndef SORTPERSONAL |
---|
617 | #define SORTPERSONAL 1000 |
---|
618 | #endif |
---|
619 | |
---|
620 | /* |
---|
621 | ** Define this if you want to use the shell for interpretation of commands |
---|
622 | ** issued via the "L" command, "^Z" under System V, and "!". If this is |
---|
623 | ** not defined then a direct fork()/exec() will be used in place of the |
---|
624 | ** normal system(). This may speed up these operations greately on some |
---|
625 | ** systems. |
---|
626 | */ |
---|
627 | #ifndef USESH |
---|
628 | #undef USESH |
---|
629 | #endif /* USESH */ |
---|
630 | |
---|
631 | /* |
---|
632 | ** Maximum language-table search size. Smaller numbers make ispell |
---|
633 | ** run faster, at the expense of more memory (the lowest reasonable value |
---|
634 | ** is 2). If a given character appears in a significant position in |
---|
635 | ** more than MAXSEARCH suffixes, it will be given its own index table. |
---|
636 | ** If you change this, define INDEXDUMP in lookup.c to be sure your |
---|
637 | ** index table looks reasonable. |
---|
638 | */ |
---|
639 | #ifndef MAXSEARCH |
---|
640 | #define MAXSEARCH 4 |
---|
641 | #endif |
---|
642 | |
---|
643 | /* |
---|
644 | ** Define this if you want to be able to type any command at a "type space |
---|
645 | ** to continue" prompt. |
---|
646 | */ |
---|
647 | #ifndef COMMANDFORSPACE |
---|
648 | #undef COMMANDFORSPACE |
---|
649 | #endif /* COMMANDFORSPACE */ |
---|
650 | |
---|
651 | /* |
---|
652 | ** Memory-allocation increment. Buildhash allocates memory in chunks |
---|
653 | ** of this size, and then subdivides it to get its storage. This saves |
---|
654 | ** much malloc execution time. A good number for this is the system |
---|
655 | ** page size less the malloc storage overhead. |
---|
656 | ** |
---|
657 | ** Define this to zero to revert to using malloc/realloc. This is normally |
---|
658 | ** useful only on systems with limited memory. |
---|
659 | */ |
---|
660 | #ifndef MALLOC_INCREMENT |
---|
661 | #define MALLOC_INCREMENT (4096 - 8) |
---|
662 | #endif |
---|
663 | |
---|
664 | /* |
---|
665 | ** Maximum number of "hits" expected on a word. This is basically the |
---|
666 | ** number of different ways different affixes can produce the same word. |
---|
667 | ** For example, with "english.aff", "brothers" can be produced 3 ways: |
---|
668 | ** "brothers," "brother+s", or "broth+ers". If this is too low, no major |
---|
669 | ** harm will be done, but ispell may occasionally forget a capitalization. |
---|
670 | */ |
---|
671 | #ifndef MAX_HITS |
---|
672 | #define MAX_HITS 10 |
---|
673 | #endif |
---|
674 | |
---|
675 | /* |
---|
676 | ** Maximum number of capitalization variations expected in any word. |
---|
677 | ** Besides the obvious all-lower, all-upper, and capitalized versions, |
---|
678 | ** this includes followcase variants. If this is too low, no real |
---|
679 | ** harm will be done, but ispell may occasionally fail to suggest a |
---|
680 | ** correct capitalization. |
---|
681 | */ |
---|
682 | #ifndef MAX_CAPS |
---|
683 | #define MAX_CAPS 10 |
---|
684 | #endif /* MAX_CAPS */ |
---|
685 | |
---|
686 | /* Define this to ignore spelling check of entire LaTeX bibliography listings */ |
---|
687 | #ifndef IGNOREBIB |
---|
688 | #undef IGNOREBIB |
---|
689 | #endif |
---|
690 | |
---|
691 | /* |
---|
692 | ** Default nroff and TeX special characters. Normally, you won't want to |
---|
693 | ** change this; instead you would override it in the language-definition |
---|
694 | ** file. |
---|
695 | */ |
---|
696 | #ifndef TEXSPECIAL |
---|
697 | #define TEXSPECIAL "()[]{}<>\\$*.%" |
---|
698 | #endif |
---|
699 | |
---|
700 | #ifndef NRSPECIAL |
---|
701 | #define NRSPECIAL "().\\*" |
---|
702 | #endif |
---|
703 | |
---|
704 | /* |
---|
705 | ** Defaults for certain command-line flags. |
---|
706 | */ |
---|
707 | #ifndef DEFNOBACKUPFLAG |
---|
708 | #define DEFNOBACKUPFLAG 0 /* Don't suppress backup file */ |
---|
709 | #endif |
---|
710 | #ifndef DEFTEXFLAG |
---|
711 | #define DEFTEXFLAG 0 /* Default to nroff mode */ |
---|
712 | #endif |
---|
713 | |
---|
714 | /* |
---|
715 | ** Define this if you want ispell to place a limitation on the maximum |
---|
716 | ** size of the screen. On windowed workstations with very large windows, |
---|
717 | ** the size of the window can be too much of a good thing, forcing the |
---|
718 | ** user to look back and forth between the bottom and top of the screen. |
---|
719 | ** If MAX_SCREEN_SIZE is nonzero, screens larger than this will be treated |
---|
720 | ** as if they have only MAX_SCREEN_SIZE lines. A good value for this |
---|
721 | ** variable is 24 or 30. Define it as zero to suppress the feature. |
---|
722 | */ |
---|
723 | #ifndef MAX_SCREEN_SIZE |
---|
724 | #define MAX_SCREEN_SIZE 0 |
---|
725 | #endif |
---|
726 | |
---|
727 | /* |
---|
728 | ** The next three variables are used to provide a variable-size context |
---|
729 | ** display at the bottom of the screen. Normally, the user will see |
---|
730 | ** a number of lines equal to CONTEXTPCT of his screen, rounded down |
---|
731 | ** (thus, with CONTEXTPCT == 10, a 24-line screen will produce two lines |
---|
732 | ** of context). The context will never be greater than MAXCONTEXT or |
---|
733 | ** less than MINCONTEXT. To disable this feature entirely, set MAXCONTEXT |
---|
734 | ** and MINCONTEXT to the same value. To round context percentages up, |
---|
735 | ** define CONTEXTROUNDUP. |
---|
736 | ** |
---|
737 | ** Warning: don't set MAXCONTEXT ridiculously large. There is a |
---|
738 | ** static buffer of size MAXCONTEXT*BUFSIZ; since BUFSIZ is frequently |
---|
739 | ** 1K or larger, this can create a remarkably large executable. |
---|
740 | */ |
---|
741 | #ifndef CONTEXTPCT |
---|
742 | #define CONTEXTPCT 10 /* Use 10% of the screen for context */ |
---|
743 | #endif |
---|
744 | #ifndef MINCONTEXT |
---|
745 | #define MINCONTEXT 2 /* Always show at least 2 lines of context */ |
---|
746 | #endif |
---|
747 | #ifndef MAXCONTEXT |
---|
748 | #define MAXCONTEXT 10 /* Never show more than 10 lines of context */ |
---|
749 | #endif |
---|
750 | #ifndef CONTEXTROUNDUP |
---|
751 | #undef CONTEXTROUNDUP /* Don't round context up */ |
---|
752 | #endif |
---|
753 | |
---|
754 | /* |
---|
755 | ** Define this if you want the context lines to be displayed at the |
---|
756 | ** bottom of the screen, the way they used to be, rather than at the top. |
---|
757 | */ |
---|
758 | #ifndef BOTTOMCONTEXT |
---|
759 | #undef BOTTOMCONTEXT |
---|
760 | #endif /* BOTTOMCONTEXT */ |
---|
761 | |
---|
762 | /* |
---|
763 | ** Define this if you want the "mini-menu," which gives the most important |
---|
764 | ** options at the bottom of the screen, to be the default (in any case, it |
---|
765 | ** can be controlled with the "-M" switch). |
---|
766 | */ |
---|
767 | #ifndef MINIMENU |
---|
768 | #undef MINIMENU |
---|
769 | #endif |
---|
770 | |
---|
771 | /* |
---|
772 | ** You might want to change this to zero if your users want to check |
---|
773 | ** single-letter words against the dictionary. However, you should try |
---|
774 | ** some sample runs using the -W switch before you try it out; you'd |
---|
775 | ** be surprised how many single letters appear in documents. If you increase |
---|
776 | ** MINWORD beyond 1, don't say I didn't warn you that it was a bad idea. |
---|
777 | */ |
---|
778 | #ifndef MINWORD |
---|
779 | #define MINWORD 1 /* Words this short and shorter are always ok */ |
---|
780 | #endif |
---|
781 | |
---|
782 | /* |
---|
783 | ** ANSI C compilers are supposed to provide an include file, |
---|
784 | ** "stdlib.h", which gives function prototypes for all library |
---|
785 | ** routines. Define NO_STDLIB_H if you have a compiler that claims to |
---|
786 | ** be ANSI, but doesn't provide this include file. |
---|
787 | */ |
---|
788 | #ifndef NO_STDLIB_H |
---|
789 | #ifndef __STDC__ |
---|
790 | #define NO_STDLIB_H |
---|
791 | #endif /* __STDC__ */ |
---|
792 | #endif /* NO_STDLIB_H */ |
---|
793 | |
---|
794 | /* |
---|
795 | ** The following define is used by the ispell developer to help |
---|
796 | ** double-check the software. Leave it undefined on other systems |
---|
797 | ** unless you are especially fond of warning messages, or are pursuing |
---|
798 | ** an inexplicable bug that might be related to a type mismatch. |
---|
799 | */ |
---|
800 | #ifndef GENERATE_LIBARARY_PROTOS |
---|
801 | #undef GENERATE_LIBARARY_PROTOS |
---|
802 | #endif /* GENERATE_LIBARARY_PROTOS */ |
---|
803 | |
---|
804 | /* |
---|
805 | ** Symbols below this point are generally intended to cater to |
---|
806 | ** idiosyncracies of specific machines and operating systems. |
---|
807 | ** |
---|
808 | ** MS-DOS users should also define HAS_RENAME, above, if appropriate. |
---|
809 | ** |
---|
810 | ** Define PIECEMEAL_HASH_WRITES if your system can't handle huge write |
---|
811 | ** operations. This is known to be a problem on some MS-DOS systems. |
---|
812 | */ |
---|
813 | #ifndef PIECEMEAL_HASH_WRITES |
---|
814 | #undef PIECEMEAL_HASH_WRITES |
---|
815 | #endif /* PIECEMEAL_HASH_WRITES */ |
---|
816 | |
---|
817 | /* |
---|
818 | ** Redefine GETKEYSTROKE() to getkey() on some MS-DOS systems where |
---|
819 | ** getchar() doesn't operate properly in raw mode. |
---|
820 | */ |
---|
821 | #ifndef GETKEYSTROKE |
---|
822 | #define GETKEYSTROKE() getchar () |
---|
823 | #endif /* GETKEYSTROKE */ |
---|
824 | |
---|
825 | /* |
---|
826 | ** Define MSDOS_BINARY_OPEN to 0x8000 on MS-DOS systems. This can be |
---|
827 | ** done by adding "#include fcntl.h" to your local.h file. |
---|
828 | */ |
---|
829 | #ifndef MSDOS_BINARY_OPEN |
---|
830 | #ifdef O_BINARY |
---|
831 | #define MSDOS_BINARY_OPEN O_BINARY |
---|
832 | #else /* O_BINARY */ |
---|
833 | #define MSDOS_BINARY_OPEN 0 |
---|
834 | #endif /* O_BINARY */ |
---|
835 | #endif /* MSDOS_BINARY_OPEN */ |
---|
836 | |
---|
837 | /* |
---|
838 | ** Environment variable to use to locate the home directory. On DOS |
---|
839 | ** systems you might want to set this to ISPELL_HOME to avoid |
---|
840 | ** conflicts with other programs that look for a HOME environment |
---|
841 | ** variable; on all other systems it should be just HOME. |
---|
842 | */ |
---|
843 | #ifndef HOME |
---|
844 | #define HOME "HOME" |
---|
845 | #endif /* HOME */ |
---|
846 | |
---|
847 | /* |
---|
848 | ** On MS-DOS systems, define PDICTHOME to be the name of a directory |
---|
849 | ** to be used to contain the personal dictionary (.ispell_english, |
---|
850 | ** etc.). On other systems, you can leave it undefined. |
---|
851 | */ |
---|
852 | #ifndef PDICTHOME |
---|
853 | #undef PDICTHOME |
---|
854 | #endif /* PDICTHOME */ |
---|
855 | |
---|
856 | /* |
---|
857 | ** On MS-DOS systems, you can rename the following variables so that |
---|
858 | ** ispell's files have 3-character suffixes. Note that, if you do |
---|
859 | ** this, you will have to redefine any variable above that |
---|
860 | ** incorporates one of the suffixes. |
---|
861 | */ |
---|
862 | #ifndef HASHSUFFIX |
---|
863 | #define HASHSUFFIX ".hash" |
---|
864 | #endif /* HASHSUFFIX */ |
---|
865 | #ifndef STATSUFFIX |
---|
866 | #define STATSUFFIX ".stat" |
---|
867 | #endif /* STATSUFFIX */ |
---|
868 | #ifndef COUNTSUFFIX |
---|
869 | #define COUNTSUFFIX ".cnt" |
---|
870 | #endif /* COUNTSUFFIX */ |
---|