File: config.h

package info (click to toggle)
lookup 1.08b-5
  • links: PTS
  • area: contrib
  • in suites: woody
  • size: 1,108 kB
  • ctags: 1,305
  • sloc: ansic: 12,634; makefile: 236; perl: 174; sh: 53
file content (302 lines) | stat: -rw-r--r-- 7,504 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
#ifndef __CONFIG_H__ /* file wrapper */
#define __CONFIG_H__
/*
 * Jeffrey Friedl
 * Omron Corporation			ʳ
 * Nagaokakyoshi, Japan			617Ĺ
 *
 * jfriedl@nff.ncl.omron.co.jp
 *
 * This work is placed under the terms of the GNU General Purpose License
 * (the "GNU Copyleft").
 */

/*
Some overall control of how the library is built.
The default is that this entire file is either comments or ifdef'ed out.
However, you can set or modify things here as you like.
After each comment is an example setting (for many things with values,
perhaps the default as it exists at the time of this writing... for many
yes-no things, the opposite of the default) surrounded by
  #if 0
  #endif

The example is just that, an example... don't make changes without understand
what you're doing, of course.

-----------------------------------------------------------------------------

*/

/* apply_regex.c */

/*
 * APPLY_REGEX_MAX_CHAR_COUNT
 * Tells up to how many characters to check for simultaneously when
 * doing a search.  For example in a regex search of the pattern
 * "this is a|(the) pattern", any line must at least have the characters
 * " aehinpst" somewhere in it. Apply_regex will run down the linked lists
 * of the APPLY_REGEX_MAX_CHAR_COUNT least common characters required in
 * a pattern, and for any line in all of the lists, the regex will be
 * applied.
 *
 * For large databases with random data, a value more than one or two can
 * lead to significant speed increases. Diminishing returns probably hit
 * quickly, though.
 */
#if 0
#  define APPLY_REGEX_MAX_CHAR_COUNT 10
#endif


/* fuzzkana.c */

/*
 * SMALL_TSU_OK
 * Tells which consonant sounds are allowed to be proceeded by a small tsu.
 */
#if 0
# define SMALL_TSU_OK (KID_K|KID_S|KID_T|KID_D|KID_P|KID_W|KID_M)
#endif


/* index.c */

/*
 * USE_SHORT_INDEX_COUNTS
 * If true, an 'elementcount' will be 'unsigned short', 'unsigned' otherwise.
 * The size of a count variable can limit the number of lines that an index
 * can refer to for any specific character (65535 lines for two-byte shorts,
 * for example).  Characters on "too many" lines will be automatically omitted
 * from the index.
 *
 * This is merely a size-of-index vs. index-ability issue.
 */
#if 0
# define USE_SHORT_INDEX_COUNTS	1
#endif

/* jreadline.c */

/*
 * NO_HANDLE_SIGNALS
 * The jreadline package will normally catch signals, clean up the tty
 * state, then deliver them to the program as if jreadline wasn't there.
 * Define this to remove jreadline's doing anything with signals.
 */
#if 0
# define NO_HANDLE_SIGNALS
#endif

/*
 * NO_AUTO_ROMAJI_CONVERSION
 * The jreadline package normally provides automatic romaji->kana conversion
 * (the "access" program doesn't use it, however). Defining this removes the
 * automatic conversion.
 */
#if 0
# define NO_AUTO_ROMAJI_CONVERSION
#endif

/*
 * NON_ANSIFIED_IOCTL
 * If sys/ioctl.h has not yet been ANSIfied, define this.
 */
#if 0
# define NON_ANSIFIED_IOCTL
#endif

/*
 * MAX_INPUT_LINE_LENGTH
 * Maximum length of an input line.
 */
#if 0
# define MAX_INPUT_LINE_LENGTH 200
#endif


/* jregex.c */

/*
 * NO_REGEXEC_MATCH_POINTS
 * Removes support for regexec_match_start and regexec_match_end,
 * Which removes support for \& in replace as well.
 * The support is so painless that it's probably silly to define this.
 */
#if 0
# define NO_REGEXEC_MATCH_POINTS
#endif

/*
 * DONT_WORRY_ABOUT_KATAKANA_DASH_BEING_PART_OF_A_WORD
 * Normally the word-boundary checks will take special care to count
 * a katakana dash as part of a kanji word. This support is removed
 * by defining this. Unless you know you'll be doing a *lot* of word-
 * boundary stuff and that you'll *not* be dealing with a dash, probably
 * silly to remove this support.
 */
#if 0
# define DONT_WORRY_ABOUT_KATAKANA_DASH_BEING_PART_OF_A_WORD
#endif

/*
 * NO_PAREN_INFO
 * Defining this removes support for regexec_paren_info, etc., which
 * is the mechanism by which one can find out what \1, \2, \3, etc. are
 * in a pattern. This also removes the ability to use \1, \2, \3, etc.
 * *in* a pattern (such as in the pattern to find double-words:
 *  "\<(\w+) \1\>").
 *
 * Removing this support by defining this symbol reduces the size of
 * regcomp and regexec, although the speed of regexec will be little
 * affected when paren info isn't requested.
 */
#if 0
# define NO_PAREN_INFO
#endif

/*
 * NO_DEFAULT_PAREN_INFO
 * If defined, there will be no default paren_info stuff allocated.
 * Only matters if NO_PAREN_INFO is not defined, of course.
 */
#if 0
  #ifndef NO_PAREN_INFO
     #define NO_DEFAULT_PAREN_INFO
  #endif
#endif

/*
 * DEFAULT_PAREN_INFO_SIZE
 * Sets the size of the default paren_info. Only matters if both NO_PAREN_INFO
 * and NO_DEFAULT_PAREN_INFO are not defined.
 */
#if 0
  #ifndef NO_PAREN_INFO
     #ifndef NO_DEFAULT_PAREN_INFO
        #define DEFAULT_PAREN_INFO_SIZE 10
     #endif
  #endif
#endif


/*
 * NO_SHOWREGEX
 * Don't compile in the showregex() function.
 * I should just partition this out into another file.
 */
#if 0
# define NO_SHOWREGEX
#endif

/*
 * FAST_REGEXEC
 * If set, removes debug-ability from regexec so that it doesn't have to
 * waste time on checking to see if debugging is turned on. For maximum
 * regexec speed.
 */
#if 0
# define FAST_REGEXEC
#endif

/*
 * UNALIGNED_SHORT_ACCESS_OK
 * If a short pointer can be to any byte (instead of, say, requiring alignment
 * to a 2-byte boundary), set this to true for some small speed optimization.
 */
#if 0
# define UNALIGNED_SHORT_ACCESS_OK
#endif


/* romaji2kana.c */
/*
 * R2K_DEFAULT_FLAGS
 * Sets the default flags for the conversion.
 */
#if 0
# define R2K_DEFAULT_FLAGS  R2K_UNCONVERTED_PUNC_OK|R2K_NONASCII_OK
#endif


/* std_romaji.c */

/* generic */

/*
 * MOVE_MEMORY(from, to, length)
 * Provides a save (i.e. OK to overlap) memory move.
 */
#define MOVE_MEMORY(FROM, TO, LENGTH) \
    (void)bcopy((char*)(FROM), (char*)(TO), (int)(LENGTH))

/*
 * NDEBUG
 * If defined, removes assert() and many other debugging provisions.
 */
#if 0
# define NDEBUG
#endif 

/*
 * USE_LOCAL_OUTPUT
 * If defined, uses local output library (rather than stdio)
 * and allows for switchable Japanese-output encoding.
 */
#define USE_LOCAL_OUTPUT

/*
 * USE_LOCAL_INPUT
 * If true, use local input routines. Used to be useful, but no longer.
 */
#define USE_LOCAL_INPUT 0

/*
 * PROVIDE_PAGER
 *
 * If set to true, provides the means for a local pager (but only if
 * USE_LOCAL_OUTPUT also true.
 */
#ifdef SERVER_CONFIG
#  define PROVIDE_PAGER 0
#else
#  define PROVIDE_PAGER 1
#endif


/*
 * Macro helpers, to allow full blocks to appear like single statements.
 *
 * Used as in:
 *     #define do_it(arg1, arg2)
 *     macro_start {
 *         int ARG1 = (arg1);
 *         int ARG2 = (arg2);
 *         blah blah blah.
 *     } macro_end
 * 
 * This would allow the use of do_it() even in situations such as
 *    
 *    if (something)
 *         do_it(x,y);
 *    else
 *         blahblahblah();
 *
 */
#ifndef macro_start
# define macro_start  do
# define macro_end    while (0)
#endif

/* some general system-V stuff */
#if defined(__svr4__) || defined(__DGUX__)
# define index strchr
# define rindex strrchr
# define bcopy(FROM, TO, LENGTH) memcpy(TO, FROM, LENGTH)
# if !defined(__DGUX__) /* DGUX memset is broken */
#   define bzero(ADDR, LENGTH)     memset(ADDR, LENGTH, 0)
# endif
#endif

/*************************************************************************/
#endif /* file wrapper */