From 1c0d997c1a12e0916e34aaadc6eb5d3a8cc129bb Mon Sep 17 00:00:00 2001 From: Colin Leroy Date: Tue, 20 Feb 2007 17:42:49 +0000 Subject: [PATCH] 2007-02-20 [colin] 2.7.2cvs56 * autogen.sh * src/matcher_parser_parse.y * src/matcher_parser_lex.l Fix big memory leak in flex, and require flex 2.5.31 --- ChangeLog | 8 ++++++++ PATCHSETS | 1 + autogen.sh | 22 ++++++++++++++++++++++ configure.ac | 2 +- src/matcher_parser_lex.l | 2 ++ src/matcher_parser_parse.y | 7 +++++++ 6 files changed, 41 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5403ea3f4..cddd8593c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-02-20 [colin] 2.7.2cvs56 + + * autogen.sh + * src/matcher_parser_parse.y + * src/matcher_parser_lex.l + Fix big memory leak in flex, and + require flex 2.5.31 + 2007-02-20 [wwp] 2.7.2cvs55 * src/matcher_parser_parse.y diff --git a/PATCHSETS b/PATCHSETS index c1ddeb6d7..5f1614fc2 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -2373,3 +2373,4 @@ ( cvs diff -u -r 1.395.2.283 -r 1.395.2.284 src/summaryview.c; ) > 2.7.2cvs53.patchset ( cvs diff -u -r 1.16.2.10 -r 1.16.2.11 src/matcher_parser_lex.l; cvs diff -u -r 1.8.2.7 -r 1.8.2.8 src/quote_fmt_lex.l; ) > 2.7.2cvs54.patchset ( cvs diff -u -r 1.25.2.22 -r 1.25.2.23 src/matcher_parser_parse.y; ) > 2.7.2cvs55.patchset +( cvs diff -u -r 1.4.2.7 -r 1.4.2.8 autogen.sh; cvs diff -u -r 1.25.2.23 -r 1.25.2.24 src/matcher_parser_parse.y; cvs diff -u -r 1.16.2.11 -r 1.16.2.12 src/matcher_parser_lex.l; ) > 2.7.2cvs56.patchset diff --git a/autogen.sh b/autogen.sh index 0b60d5ca5..9dae8dd34 100644 --- a/autogen.sh +++ b/autogen.sh @@ -47,6 +47,28 @@ if test "$1" = "--build-w32"; then fi # ***** end W32 build script ******* +bisonver=`bison --version` + +if [ "$bisonver" = "" ]; then + echo Bison is needed to compile Claws Mail CVS + exit 1 +fi + +flexver=`flex --version|sed "s/.* //"` + +if [ "$flexver" = "" ]; then + echo Flex 2.5.31 or greater is needed to compile Claws Mail CVS + exit 1 +else + flex_major=`echo $flexver|sed "s/\..*//"` + flex_minor=`echo $flexver|sed "s/$flex_major\.\(.*\)\..*/\1/"` + flex_micro=`echo $flexver|sed "s/$flex_major\.$flex_minor\.\(.*\)/\1/"` + if [ $flex_major -lt 2 -o $flex_minor -lt 5 -o $flex_micro -lt 31 ]; then + echo Flex 2.5.31 or greater is needed to compile Claws Mail CVS + exit 1 + fi +fi + aclocal -I m4 \ && libtoolize --force --copy \ diff --git a/configure.ac b/configure.ac index 9abde0684..2beef2c6d 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=7 MICRO_VERSION=2 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=55 +EXTRA_VERSION=56 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/matcher_parser_lex.l b/src/matcher_parser_lex.l index c12c1ca34..560293a38 100644 --- a/src/matcher_parser_lex.l +++ b/src/matcher_parser_lex.l @@ -26,9 +26,11 @@ #include "codeconv.h" #include "matcher.h" #include "matcher_parser_lex.h" + #ifndef YYSTYPE #include "matcher_parser_parse.h" #endif + #define MAX_STR_CONST 512 static char string_buf[MAX_STR_CONST]; diff --git a/src/matcher_parser_parse.y b/src/matcher_parser_parse.y index 419109c39..415d1548b 100644 --- a/src/matcher_parser_parse.y +++ b/src/matcher_parser_parse.y @@ -73,6 +73,7 @@ void matcher_parserrestart(FILE *input_file); void matcher_parser_init(void); void matcher_parser_switch_to_buffer(void * new_buffer); void matcher_parser_delete_buffer(void * b); +void matcher_parserpop_buffer_state(void); int matcher_parserlex(void); void matcher_parser_start_parsing(FILE *f) @@ -102,6 +103,7 @@ FilteringProp *matcher_parser_get_filtering(gchar *str) matcher_parserlineno = 1; matcher_parse_op = MATCHER_PARSE_NO_EOL; matcher_parserrestart(NULL); + matcher_parserpop_buffer_state(); matcher_parser_init(); bufstate = matcher_parser_scan_string((const char *) tmp_str); matcher_parser_switch_to_buffer(bufstate); @@ -146,6 +148,7 @@ MatcherList *matcher_parser_get_name(gchar *str) matcher_parserlineno = 1; matcher_parse_op = MATCHER_PARSE_NAME; matcher_parserrestart(NULL); + matcher_parserpop_buffer_state(); matcher_parser_init(); bufstate = matcher_parser_scan_string(str); matcher_parserparse(); @@ -168,6 +171,7 @@ MatcherList *matcher_parser_get_enabled(gchar *str) matcher_parserlineno = 1; matcher_parse_op = MATCHER_PARSE_ENABLED; matcher_parserrestart(NULL); + matcher_parserpop_buffer_state(); matcher_parser_init(); bufstate = matcher_parser_scan_string(str); matcher_parserparse(); @@ -190,6 +194,7 @@ MatcherList *matcher_parser_get_account(gchar *str) matcher_parserlineno = 1; matcher_parse_op = MATCHER_PARSE_ACCOUNT; matcher_parserrestart(NULL); + matcher_parserpop_buffer_state(); matcher_parser_init(); bufstate = matcher_parser_scan_string(str); matcher_parserparse(); @@ -213,6 +218,7 @@ MatcherList *matcher_parser_get_cond(gchar *str, gboolean *is_fast) matcher_parserlineno = 1; matcher_parse_op = MATCHER_PARSE_CONDITION; matcher_parserrestart(NULL); + matcher_parserpop_buffer_state(); matcher_parser_init(); bufstate = matcher_parser_scan_string(str); matcher_parserparse(); @@ -237,6 +243,7 @@ GSList *matcher_parser_get_action_list(gchar *str) matcher_parserlineno = 1; matcher_parse_op = MATCHER_PARSE_FILTERING_ACTION; matcher_parserrestart(NULL); + matcher_parserpop_buffer_state(); matcher_parser_init(); bufstate = matcher_parser_scan_string(str); matcher_parserparse(); -- 2.25.1