comparison lib-src/etags.c @ 531:0493e9f3c27f

[xemacs-hg @ 2001-05-12 11:16:12 by ben] event-msw.c: eliminate cygwin warnings. dired.c, syswindows.h, win32.c: find the Net* functions the hard way to avoid errors on win 9x. find-paths.el: fix error with null EXCLUDE-REGEXP. font-lock.el: fix problem reported by hrvoje with buffers starting with a space. lib-complete.el: add a variable to control where `find-library' looks, analogous to `find-function-source-path'. etags.c: new version from Francesco. Makefile.in.in: i'm getting real tired of incomplete commits. is this getting worse or something?
author ben
date Sat, 12 May 2001 11:16:25 +0000
parents cd662ad69f40
children 1df7a5cfb04a
comparison
equal deleted inserted replaced
530:c948643d954f 531:0493e9f3c27f
30 * 2001 Nested classes by Francesco Potort́ based on work by Mykola Dzyuba. 30 * 2001 Nested classes by Francesco Potort́ based on work by Mykola Dzyuba.
31 * 31 *
32 * Francesco Potort́ <pot@gnu.org> has maintained it since 1993. 32 * Francesco Potort́ <pot@gnu.org> has maintained it since 1993.
33 */ 33 */
34 34
35 char pot_etags_version[] = "@(#) pot revision number is 14.15"; 35 char pot_etags_version[] = "@(#) pot revision number is 14.20";
36 36
37 #define TRUE 1 37 #define TRUE 1
38 #define FALSE 0 38 #define FALSE 0
39 39
40 #ifdef DEBUG 40 #ifdef DEBUG
56 /* On some systems, Emacs defines static as nothing for the sake 56 /* On some systems, Emacs defines static as nothing for the sake
57 of unexec. We don't want that here since we don't use unexec. */ 57 of unexec. We don't want that here since we don't use unexec. */
58 # undef static 58 # undef static
59 # define ETAGS_REGEXPS /* use the regexp features */ 59 # define ETAGS_REGEXPS /* use the regexp features */
60 # define LONG_OPTIONS /* accept long options */ 60 # define LONG_OPTIONS /* accept long options */
61 #endif /* HAVE_CONFIG_H */ 61 #else
62 # ifndef __STDC__
63 # define static /* remove static for old compilers' sake */
64 # endif
65 #endif /* !HAVE_CONFIG_H */
62 66
63 #ifndef _GNU_SOURCE 67 #ifndef _GNU_SOURCE
64 # define _GNU_SOURCE 1 /* enables some compiler checks on GNU */ 68 # define _GNU_SOURCE 1 /* enables some compiler checks on GNU */
65 #endif 69 #endif
66 70
706 files. {LANGUAGE}/REGEXP/ uses REGEXP for LANGUAGE files only.\n\ 710 files. {LANGUAGE}/REGEXP/ uses REGEXP for LANGUAGE files only.\n\
707 regexfile is a file containing one REGEXP per line.\n\ 711 regexfile is a file containing one REGEXP per line.\n\
708 REGEXP is anchored (as if preceded by ^).\n\ 712 REGEXP is anchored (as if preceded by ^).\n\
709 The form /REGEXP/NAME/ creates a named tag.\n\ 713 The form /REGEXP/NAME/ creates a named tag.\n\
710 For example Tcl named tags can be created with:\n\ 714 For example Tcl named tags can be created with:\n\
711 --regex=/proc[ \\t]+\\([^ \\t]+\\)/\\1/."); 715 --regex=\"/proc[ \\t]+\\([^ \\t]+\\)/\\1/.\"");
712 puts ("-c /REGEXP/, --ignore-case-regex=/REGEXP/ or --ignore-case-regex=@regexfile\n\ 716 puts ("-c /REGEXP/, --ignore-case-regex=/REGEXP/ or --ignore-case-regex=@regexfile\n\
713 Like -r, --regex but ignore case when matching expressions."); 717 Like -r, --regex but ignore case when matching expressions.");
714 puts ("-R, --no-regex\n\ 718 puts ("-R, --no-regex\n\
715 Don't create tags from regexps for the following files."); 719 Don't create tags from regexps for the following files.");
716 #endif /* ETAGS_REGEXPS */ 720 #endif /* ETAGS_REGEXPS */
1941 st_C_objprot, st_C_objimpl, st_C_objend, 1945 st_C_objprot, st_C_objimpl, st_C_objend,
1942 st_C_gnumacro, 1946 st_C_gnumacro,
1943 st_C_ignore, 1947 st_C_ignore,
1944 st_C_javastruct, 1948 st_C_javastruct,
1945 st_C_operator, 1949 st_C_operator,
1946 st_C_class, 1950 st_C_class, st_C_template,
1947 st_C_struct, st_C_extern, st_C_enum, st_C_define, st_C_typedef, st_C_typespec 1951 st_C_struct, st_C_extern, st_C_enum, st_C_define, st_C_typedef, st_C_typespec
1948 }; 1952 };
1949 1953
1950 static unsigned int hash P_((const char *, unsigned int)); 1954 static unsigned int hash P_((const char *, unsigned int));
1951 static struct C_stab_entry * in_word_set P_((const char *, unsigned int)); 1955 static struct C_stab_entry * in_word_set P_((const char *, unsigned int));
1952 static enum sym_type C_symtype P_((char *, int, int)); 1956 static enum sym_type C_symtype P_((char *, int, int));
1953 1957
1954 /* Feed stuff between (but not including) %[ and %] lines to: 1958 /* Feed stuff between (but not including) %[ and %] lines to:
1955 gperf -c -k 1,3 -o -p -r -t 1959 gperf -c -k 1,3 -o -p -r -t
1956 then put a `static' keyword in front of the in_word_set function.
1957 %[ 1960 %[
1958 struct C_stab_entry { char *name; int c_ext; enum sym_type type; } 1961 struct C_stab_entry { char *name; int c_ext; enum sym_type type; }
1959 %% 1962 %%
1960 if, 0, st_C_ignore 1963 if, 0, st_C_ignore
1961 for, 0, st_C_ignore 1964 for, 0, st_C_ignore
1980 extern, 0, st_C_extern 1983 extern, 0, st_C_extern
1981 enum, 0, st_C_enum 1984 enum, 0, st_C_enum
1982 typedef, 0, st_C_typedef 1985 typedef, 0, st_C_typedef
1983 define, 0, st_C_define 1986 define, 0, st_C_define
1984 operator, C_PLPL, st_C_operator 1987 operator, C_PLPL, st_C_operator
1988 template, 0, st_C_template
1985 bool, C_PLPL, st_C_typespec 1989 bool, C_PLPL, st_C_typespec
1986 long, 0, st_C_typespec 1990 long, 0, st_C_typespec
1987 short, 0, st_C_typespec 1991 short, 0, st_C_typespec
1988 int, 0, st_C_typespec 1992 int, 0, st_C_typespec
1989 char, 0, st_C_typespec 1993 char, 0, st_C_typespec
2014 /*%<*/ 2018 /*%<*/
2015 /* C code produced by gperf version 2.7.1 (19981006 egcs) */ 2019 /* C code produced by gperf version 2.7.1 (19981006 egcs) */
2016 /* Command-line: gperf -c -k 1,3 -o -p -r -t */ 2020 /* Command-line: gperf -c -k 1,3 -o -p -r -t */
2017 struct C_stab_entry { char *name; int c_ext; enum sym_type type; }; 2021 struct C_stab_entry { char *name; int c_ext; enum sym_type type; };
2018 2022
2019 #define TOTAL_KEYWORDS 46 2023 #define TOTAL_KEYWORDS 47
2020 #define MIN_WORD_LENGTH 2 2024 #define MIN_WORD_LENGTH 2
2021 #define MAX_WORD_LENGTH 15 2025 #define MAX_WORD_LENGTH 15
2022 #define MIN_HASH_VALUE 13 2026 #define MIN_HASH_VALUE 18
2023 #define MAX_HASH_VALUE 121 2027 #define MAX_HASH_VALUE 138
2024 /* maximum key range = 109, duplicates = 0 */ 2028 /* maximum key range = 121, duplicates = 0 */
2025 2029
2026 #ifdef __GNUC__ 2030 #ifdef __GNUC__
2027 __inline 2031 __inline
2028 #endif 2032 #endif
2029 static unsigned int 2033 static unsigned int
2031 register const char *str; 2035 register const char *str;
2032 register unsigned int len; 2036 register unsigned int len;
2033 { 2037 {
2034 static unsigned char asso_values[] = 2038 static unsigned char asso_values[] =
2035 { 2039 {
2036 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 2040 139, 139, 139, 139, 139, 139, 139, 139, 139, 139,
2037 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 2041 139, 139, 139, 139, 139, 139, 139, 139, 139, 139,
2038 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 2042 139, 139, 139, 139, 139, 139, 139, 139, 139, 139,
2039 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 2043 139, 139, 139, 139, 139, 139, 139, 139, 139, 139,
2040 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 2044 139, 139, 139, 139, 139, 139, 139, 139, 139, 139,
2041 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 2045 139, 139, 139, 139, 139, 139, 139, 139, 139, 139,
2042 122, 122, 122, 122, 57, 122, 122, 122, 55, 6, 2046 139, 139, 139, 139, 63, 139, 139, 139, 33, 44,
2043 60, 122, 122, 122, 122, 122, 122, 122, 122, 122, 2047 62, 139, 139, 139, 139, 139, 139, 139, 139, 139,
2044 51, 122, 122, 10, 2, 122, 122, 122, 122, 122, 2048 42, 139, 139, 12, 32, 139, 139, 139, 139, 139,
2045 122, 122, 122, 122, 122, 122, 122, 2, 52, 59, 2049 139, 139, 139, 139, 139, 139, 139, 34, 59, 37,
2046 49, 38, 56, 41, 122, 22, 122, 122, 9, 32, 2050 24, 58, 33, 3, 139, 16, 139, 139, 42, 60,
2047 33, 60, 26, 122, 1, 28, 46, 59, 44, 51, 2051 18, 11, 39, 139, 23, 57, 4, 63, 6, 20,
2048 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 2052 139, 139, 139, 139, 139, 139, 139, 139, 139, 139,
2049 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 2053 139, 139, 139, 139, 139, 139, 139, 139, 139, 139,
2050 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 2054 139, 139, 139, 139, 139, 139, 139, 139, 139, 139,
2051 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 2055 139, 139, 139, 139, 139, 139, 139, 139, 139, 139,
2052 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 2056 139, 139, 139, 139, 139, 139, 139, 139, 139, 139,
2053 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 2057 139, 139, 139, 139, 139, 139, 139, 139, 139, 139,
2054 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 2058 139, 139, 139, 139, 139, 139, 139, 139, 139, 139,
2055 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 2059 139, 139, 139, 139, 139, 139, 139, 139, 139, 139,
2056 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 2060 139, 139, 139, 139, 139, 139, 139, 139, 139, 139,
2057 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 2061 139, 139, 139, 139, 139, 139, 139, 139, 139, 139,
2058 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 2062 139, 139, 139, 139, 139, 139, 139, 139, 139, 139,
2059 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 2063 139, 139, 139, 139, 139, 139, 139, 139, 139, 139,
2060 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 2064 139, 139, 139, 139, 139, 139, 139, 139, 139, 139,
2061 122, 122, 122, 122, 122, 122 2065 139, 139, 139, 139, 139, 139
2062 }; 2066 };
2063 register int hval = len; 2067 register int hval = len;
2064 2068
2065 switch (hval) 2069 switch (hval)
2066 { 2070 {
2084 register unsigned int len; 2088 register unsigned int len;
2085 { 2089 {
2086 static struct C_stab_entry wordlist[] = 2090 static struct C_stab_entry wordlist[] =
2087 { 2091 {
2088 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, 2092 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
2093 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
2094 {"if", 0, st_C_ignore},
2089 {""}, {""}, {""}, {""}, 2095 {""}, {""}, {""}, {""},
2090 {"ENTRY", 0, st_C_gnumacro}, 2096 {"int", 0, st_C_typespec},
2091 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
2092 {""},
2093 {"if", 0, st_C_ignore},
2094 {""}, {""},
2095 {"SYSCALL", 0, st_C_gnumacro},
2096 {""}, {""}, {""}, {""}, {""}, {""}, {""},
2097 {"struct", 0, st_C_struct},
2098 {"static", 0, st_C_typespec},
2099 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
2100 {"long", 0, st_C_typespec},
2101 {""}, {""}, {""}, {""}, {""},
2102 {"auto", 0, st_C_typespec},
2103 {"return", 0, st_C_ignore},
2104 {"import", C_JAVA, st_C_ignore},
2105 {""},
2106 {"switch", 0, st_C_ignore},
2107 {""},
2108 {"implements", C_JAVA, st_C_javastruct},
2109 {""},
2110 {"for", 0, st_C_ignore},
2111 {"volatile", 0, st_C_typespec},
2112 {""},
2113 {"PSEUDO", 0, st_C_gnumacro},
2114 {""},
2115 {"char", 0, st_C_typespec},
2116 {"class", 0, st_C_class},
2117 {"@protocol", 0, st_C_objprot},
2118 {""}, {""}, 2097 {""}, {""},
2119 {"void", 0, st_C_typespec}, 2098 {"void", 0, st_C_typespec},
2120 {"int", 0, st_C_typespec}, 2099 {""}, {""},
2121 {"explicit", C_PLPL, st_C_typespec}, 2100 {"interface", C_JAVA, st_C_struct},
2122 {""}, 2101 {""},
2123 {"namespace", C_PLPL, st_C_struct}, 2102 {"SYSCALL", 0, st_C_gnumacro},
2124 {"signed", 0, st_C_typespec},
2125 {""}, 2103 {""},
2126 {"interface", C_JAVA, st_C_struct}, 2104 {"return", 0, st_C_ignore},
2105 {""}, {""}, {""}, {""}, {""}, {""}, {""},
2127 {"while", 0, st_C_ignore}, 2106 {"while", 0, st_C_ignore},
2107 {"auto", 0, st_C_typespec},
2108 {""}, {""}, {""}, {""}, {""}, {""},
2109 {"float", 0, st_C_typespec},
2128 {"typedef", 0, st_C_typedef}, 2110 {"typedef", 0, st_C_typedef},
2129 {"typename", C_PLPL, st_C_typespec}, 2111 {"typename", C_PLPL, st_C_typespec},
2130 {""}, {""}, {""}, 2112 {""}, {""}, {""},
2131 {"friend", C_PLPL, st_C_ignore}, 2113 {"friend", C_PLPL, st_C_ignore},
2132 {"mutable", C_PLPL, st_C_typespec}, 2114 {"volatile", 0, st_C_typespec},
2133 {"union", 0, st_C_struct},
2134 {"domain", C_STAR, st_C_struct},
2135 {""}, {""}, 2115 {""}, {""},
2116 {"for", 0, st_C_ignore},
2117 {"const", 0, st_C_typespec},
2118 {"import", C_JAVA, st_C_ignore},
2119 {""},
2120 {"define", 0, st_C_define},
2121 {"long", 0, st_C_typespec},
2122 {"implements", C_JAVA, st_C_javastruct},
2123 {"signed", 0, st_C_typespec},
2124 {""},
2136 {"extern", 0, st_C_extern}, 2125 {"extern", 0, st_C_extern},
2137 {"extends", C_JAVA, st_C_javastruct}, 2126 {"extends", C_JAVA, st_C_javastruct},
2127 {""},
2128 {"mutable", C_PLPL, st_C_typespec},
2129 {"template", 0, st_C_template},
2130 {"short", 0, st_C_typespec},
2131 {"bool", C_PLPL, st_C_typespec},
2132 {"char", 0, st_C_typespec},
2133 {"class", 0, st_C_class},
2134 {"operator", C_PLPL, st_C_operator},
2135 {""},
2136 {"switch", 0, st_C_ignore},
2137 {""},
2138 {"ENTRY", 0, st_C_gnumacro},
2139 {""},
2138 {"package", C_JAVA, st_C_ignore}, 2140 {"package", C_JAVA, st_C_ignore},
2139 {"short", 0, st_C_typespec}, 2141 {"union", 0, st_C_struct},
2140 {"@end", 0, st_C_objend}, 2142 {"@end", 0, st_C_objend},
2141 {"unsigned", 0, st_C_typespec}, 2143 {"struct", 0, st_C_struct},
2144 {"namespace", C_PLPL, st_C_struct},
2145 {""}, {""},
2146 {"domain", C_STAR, st_C_struct},
2147 {"@interface", 0, st_C_objprot},
2148 {"PSEUDO", 0, st_C_gnumacro},
2149 {"double", 0, st_C_typespec},
2142 {""}, 2150 {""},
2143 {"const", 0, st_C_typespec}, 2151 {"@protocol", 0, st_C_objprot},
2152 {""},
2153 {"static", 0, st_C_typespec},
2144 {""}, {""}, 2154 {""}, {""},
2145 {"@interface", 0, st_C_objprot}, 2155 {"DEFUN", 0, st_C_gnumacro},
2156 {""}, {""}, {""}, {""},
2157 {"explicit", C_PLPL, st_C_typespec},
2158 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
2159 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
2160 {""},
2146 {"enum", 0, st_C_enum}, 2161 {"enum", 0, st_C_enum},
2147 {""}, {""}, 2162 {""}, {""},
2148 {"@implementation",0, st_C_objimpl}, 2163 {"unsigned", 0, st_C_typespec},
2149 {""}, 2164 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
2150 {"operator", C_PLPL, st_C_operator}, 2165 {"@implementation",0, st_C_objimpl}
2151 {""}, {""}, {""}, {""},
2152 {"define", 0, st_C_define},
2153 {""}, {""},
2154 {"double", 0, st_C_typespec},
2155 {""},
2156 {"bool", C_PLPL, st_C_typespec},
2157 {""}, {""}, {""},
2158 {"DEFUN", 0, st_C_gnumacro},
2159 {"float", 0, st_C_typespec}
2160 }; 2166 };
2161 2167
2162 if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) 2168 if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
2163 { 2169 {
2164 register int key = hash (str, len); 2170 register int key = hash (str, len);
2521 { 2527 {
2522 case st_C_javastruct: 2528 case st_C_javastruct:
2523 if (structdef == stagseen) 2529 if (structdef == stagseen)
2524 structdef = scolonseen; 2530 structdef = scolonseen;
2525 return FALSE; 2531 return FALSE;
2532 case st_C_template:
2526 case st_C_class: 2533 case st_C_class:
2527 if (cblev == 0 2534 if (cblev == 0
2528 && (*c_extp & C_AUTO) /* automatic detection of C++ language */ 2535 && (*c_extp & C_AUTO) /* automatic detection of C++ language */
2529 && definedef == dnone && structdef == snone 2536 && definedef == dnone && structdef == snone
2530 && typdef == tnone && fvdef == fvnone) 2537 && typdef == tnone && fvdef == fvnone)
2531 *c_extp = (*c_extp | C_PLPL) & ~C_AUTO; 2538 *c_extp = (*c_extp | C_PLPL) & ~C_AUTO;
2539 if (toktype == st_C_template)
2540 break;
2532 /* FALLTHRU */ 2541 /* FALLTHRU */
2533 case st_C_struct: 2542 case st_C_struct:
2534 case st_C_enum: 2543 case st_C_enum:
2535 if (parlev == 0 2544 if (parlev == 0
2536 && fvdef != vignore 2545 && fvdef != vignore
2790 cstack.nl = 0; 2799 cstack.nl = 0;
2791 cstack.cname = xnew (cstack.size, char *); 2800 cstack.cname = xnew (cstack.size, char *);
2792 cstack.cblev = xnew (cstack.size, int); 2801 cstack.cblev = xnew (cstack.size, int);
2793 } 2802 }
2794 2803
2795 tokoff = toklen = 0; /* keep compiler quiet */ 2804 tokoff = toklen = typdefcblev = 0; /* keep compiler quiet */
2796 curndx = newndx = 0; 2805 curndx = newndx = 0;
2797 lineno = 0; 2806 lineno = 0;
2798 charno = 0; 2807 charno = 0;
2799 lp = curlb.buffer; 2808 lp = curlb.buffer;
2800 *lp = 0; 2809 *lp = 0;
3368 case '{': 3377 case '{':
3369 if (definedef != dnone) 3378 if (definedef != dnone)
3370 break; 3379 break;
3371 if (typdef == ttypeseen) 3380 if (typdef == ttypeseen)
3372 { 3381 {
3382 /* Whenever typdef is set to tinbody (currently only
3383 here), typdefcblev should be set to cblev. */
3384 typdef = tinbody;
3373 typdefcblev = cblev; 3385 typdefcblev = cblev;
3374 typdef = tinbody;
3375 } 3386 }
3376 switch (fvdef) 3387 switch (fvdef)
3377 { 3388 {
3378 case flistseen: 3389 case flistseen:
3379 make_C_tag (TRUE); /* a function */ 3390 make_C_tag (TRUE); /* a function */
3431 } 3442 }
3432 else if (cblev > 0) 3443 else if (cblev > 0)
3433 cblev--; 3444 cblev--;
3434 popclass_above (cblev); 3445 popclass_above (cblev);
3435 structdef = snone; 3446 structdef = snone;
3447 /* Only if typdef == tinbody is typdefcblev significant. */
3436 if (typdef == tinbody && cblev <= typdefcblev) 3448 if (typdef == tinbody && cblev <= typdefcblev)
3437 { 3449 {
3438 assert (cblev == typdefcblev); 3450 assert (cblev == typdefcblev);
3439 typdef = tend; 3451 typdef = tend;
3440 } 3452 }
5141 add_regex (regexp_pattern, ignore_case, lang) 5153 add_regex (regexp_pattern, ignore_case, lang)
5142 char *regexp_pattern; 5154 char *regexp_pattern;
5143 bool ignore_case; 5155 bool ignore_case;
5144 language *lang; 5156 language *lang;
5145 { 5157 {
5158 static struct re_pattern_buffer zeropattern;
5146 char *name; 5159 char *name;
5147 const char *err; 5160 const char *err;
5148 struct re_pattern_buffer *patbuf; 5161 struct re_pattern_buffer *patbuf;
5149 pattern *pp; 5162 pattern *pp;
5150 5163
5161 return; 5174 return;
5162 } 5175 }
5163 (void) scan_separators (name); 5176 (void) scan_separators (name);
5164 5177
5165 patbuf = xnew (1, struct re_pattern_buffer); 5178 patbuf = xnew (1, struct re_pattern_buffer);
5166 memset (patbuf, 0, sizeof (struct re_pattern_buffer)); 5179 *patbuf = zeropattern;
5167 5180 if (ignore_case)
5168 /* Translation table to fold case if appropriate. */ 5181 patbuf->translate = lc_trans; /* translation table to fold case */
5169 patbuf->translate = (ignore_case) ? lc_trans : NULL;
5170 patbuf->fastmap = NULL;
5171 patbuf->buffer = NULL;
5172 patbuf->allocated = 0;
5173 5182
5174 err = re_compile_pattern (regexp_pattern, strlen (regexp_pattern), patbuf); 5183 err = re_compile_pattern (regexp_pattern, strlen (regexp_pattern), patbuf);
5175 if (err != NULL) 5184 if (err != NULL)
5176 { 5185 {
5177 error ("%s while compiling pattern", err); 5186 error ("%s while compiling pattern", err);