# HG changeset patch # User Francesco Potort # Date 989845031 0 # Node ID 9c4fdf982ba2df3627a1fb6f607ae76321b16e22 # Parent bffcf33fd50dded30eda2544b9fd7bb842c5fce4 (add_regex): Reset the whole newly allocated pattern buffer instead of the individual members. It's safer and works with Xemacs. diff -r bffcf33fd50d -r 9c4fdf982ba2 lib-src/etags.c --- a/lib-src/etags.c Mon May 14 12:53:48 2001 +0000 +++ b/lib-src/etags.c Mon May 14 12:57:11 2001 +0000 @@ -32,7 +32,7 @@ * Francesco Potort has maintained it since 1993. */ -char pot_etags_version[] = "@(#) pot revision number is 14.18"; +char pot_etags_version[] = "@(#) pot revision number is 14.20"; #define TRUE 1 #define FALSE 0 @@ -5155,6 +5155,7 @@ bool ignore_case; language *lang; { + static struct re_pattern_buffer zeropattern; char *name; const char *err; struct re_pattern_buffer *patbuf; @@ -5175,11 +5176,9 @@ (void) scan_separators (name); patbuf = xnew (1, struct re_pattern_buffer); - /* Translation table to fold case if appropriate. */ - patbuf->translate = (ignore_case) ? lc_trans : NULL; - patbuf->fastmap = NULL; - patbuf->buffer = NULL; - patbuf->allocated = 0; + *patbuf = zeropattern; + if (ignore_case) + patbuf->translate = lc_trans; /* translation table to fold case */ err = re_compile_pattern (regexp_pattern, strlen (regexp_pattern), patbuf); if (err != NULL)