comparison src/regex.h @ 13249:c7dea1ffceab

(RE_TRANSLATE_TYPE): Define, if not already defined. (struct re_pattern_buffer): Use RE_TRANSLATE_TYPE.
author Richard M. Stallman <rms@gnu.org>
date Thu, 19 Oct 1995 00:50:14 +0000
parents 8902ebe369bd
children 6e7bb4bd5010
comparison
equal deleted inserted replaced
13248:a7e83f7eb499 13249:c7dea1ffceab
277 the pattern compiler, the fields `buffer', `allocated', `fastmap', 277 the pattern compiler, the fields `buffer', `allocated', `fastmap',
278 `translate', and `no_sub' can be set. After the pattern has been 278 `translate', and `no_sub' can be set. After the pattern has been
279 compiled, the `re_nsub' field is available. All other fields are 279 compiled, the `re_nsub' field is available. All other fields are
280 private to the regex routines. */ 280 private to the regex routines. */
281 281
282 #ifndef RE_TRANSLATE_TYPE
283 #define RE_TRANSLATE_TYPE char *
284 #endif
285
282 struct re_pattern_buffer 286 struct re_pattern_buffer
283 { 287 {
284 /* [[[begin pattern_buffer]]] */ 288 /* [[[begin pattern_buffer]]] */
285 /* Space that holds the compiled pattern. It is declared as 289 /* Space that holds the compiled pattern. It is declared as
286 `unsigned char *' because its elements are 290 `unsigned char *' because its elements are
303 307
304 /* Either a translate table to apply to all characters before 308 /* Either a translate table to apply to all characters before
305 comparing them, or zero for no translation. The translation 309 comparing them, or zero for no translation. The translation
306 is applied to a pattern when it is compiled and to a string 310 is applied to a pattern when it is compiled and to a string
307 when it is matched. */ 311 when it is matched. */
308 char *translate; 312 RE_TRANSLATE_TYPE translate;
309 313
310 /* Number of subexpressions found by the compiler. */ 314 /* Number of subexpressions found by the compiler. */
311 size_t re_nsub; 315 size_t re_nsub;
312 316
313 /* Zero if this pattern cannot match the empty string, one else. 317 /* Zero if this pattern cannot match the empty string, one else.