Browse Source

upgrading package: flex 2.5.33 -> 2.5.34

master
parent
commit
90749bd644
  1. 258
      flex/flex.patch
  2. 4
      flex/flex.spec

258
flex/flex.patch

@ -1,19 +1,7 @@
Index: Makefile.in
--- Makefile.in.orig 2006-02-21 03:45:12 +0100
+++ Makefile.in 2007-11-04 10:35:32 +0100
@@ -291,7 +291,7 @@
localedir = $(datadir)/locale
-AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" -I@includedir@ -I$(top_srcdir)/intl
+AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" -I$(top_srcdir)/intl
# Run GNU indent on sources. Don't run this unless all the sources compile cleanly.
#
Index: doc/flex.texi
--- doc/flex.texi.orig 2006-02-20 18:30:19 +0100
+++ doc/flex.texi 2006-02-23 15:27:26 +0100
@@ -3807,6 +3807,7 @@
--- doc/flex.texi.orig 2007-09-10 08:16:35 +0200
+++ doc/flex.texi 2007-12-13 09:11:48 +0100
@@ -3888,6 +3888,7 @@
@example
@verbatim
// An example of using the flex C++ scanner class.
@ -21,7 +9,7 @@ Index: doc/flex.texi
%{
int mylineno = 0;
@@ -3835,7 +3836,7 @@
@@ -3916,7 +3917,7 @@
if(c == '\n')
++mylineno;
@ -30,7 +18,7 @@ Index: doc/flex.texi
{
if((c = yyinput()) == '/')
break;
@@ -3845,19 +3846,19 @@
@@ -3926,19 +3927,19 @@
}
}
@ -55,45 +43,10 @@ Index: doc/flex.texi
;
return 0;
Index: flex.skl
--- flex.skl.orig 2006-02-16 23:20:43 +0100
+++ flex.skl 2006-02-23 15:32:55 +0100
@@ -54,6 +54,34 @@ m4_changequote([[, ]])
%# the generated scanner as a C-style comment. This is to aid those who
%# edit the skeleton.
%#
+
+%not-for-header
+%if-c-only
+%if-not-reentrant
+m4_ifelse(M4_YY_PREFIX,yy,,
+#define yy_create_buffer M4_YY_PREFIX[[_create_buffer]]
+#define yy_delete_buffer M4_YY_PREFIX[[_delete_buffer]]
+#define yy_flex_debug M4_YY_PREFIX[[_flex_debug]]
+#define yy_init_buffer M4_YY_PREFIX[[_init_buffer]]
+#define yy_flush_buffer M4_YY_PREFIX[[_flush_buffer]]
+#define yy_load_buffer_state M4_YY_PREFIX[[_load_buffer_state]]
+#define yy_switch_to_buffer M4_YY_PREFIX[[_switch_to_buffer]]
+#define yyin M4_YY_PREFIX[[in]]
+#define yyleng M4_YY_PREFIX[[leng]]
+#define yylex M4_YY_PREFIX[[lex]]
+#define yylineno M4_YY_PREFIX[[lineno]]
+#define yyout M4_YY_PREFIX[[out]]
+#define yyrestart M4_YY_PREFIX[[restart]]
+#define yytext M4_YY_PREFIX[[text]]
+#define yywrap M4_YY_PREFIX[[wrap]]
+#define yyalloc M4_YY_PREFIX[[alloc]]
+#define yyrealloc M4_YY_PREFIX[[realloc]]
+#define yyfree M4_YY_PREFIX[[free]]
+)
+%endif
+%endif
+%ok-for-header
+
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION FLEX_MAJOR_VERSION
#define YY_FLEX_MINOR_VERSION FLEX_MINOR_VERSION
@@ -916,6 +916,18 @@
void yyset_lineno M4_YY_PARAMS( int line_number M4_YY_PROTO_LAST_ARG );
--- flex.skl.orig 2007-09-10 08:16:34 +0200
+++ flex.skl 2007-12-13 09:17:30 +0100
@@ -957,6 +957,18 @@
int yyget_lineno M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
]])
+m4_ifdef( [[M4_YY_REENTRANT]],
@ -108,56 +61,24 @@ Index: flex.skl
+]])
+]])
+
%if-bison-bridge
m4_ifdef( [[M4_YY_NO_GET_LVAL]],,
m4_ifdef( [[M4_YY_NO_SET_LINENO]],,
[[
@@ -1140,9 +1152,9 @@
m4_dnl The bison pure parser is used. Redefine yylex to
m4_dnl accept the lval parameter.
- m4_define( [[M4_YY_LEX_PROTO]],
+ m4_define( [[M4_YY_LEX_PROTO]], [[\]]
[[M4_YY_PARAMS(YYSTYPE * yylval_param M4_YY_PROTO_LAST_ARG)]])
- m4_define( [[M4_YY_LEX_DECLARATION]],
+ m4_define( [[M4_YY_LEX_DECLARATION]], [[\]]
[[YYFARGS1(YYSTYPE *,yylval_param)]])
]])
@@ -1150,9 +1162,9 @@
[[
m4_dnl Locations are used. yylex should also accept the ylloc parameter.
- m4_define( [[M4_YY_LEX_PROTO]],
+ m4_define( [[M4_YY_LEX_PROTO]], [[\]]
[[M4_YY_PARAMS(YYSTYPE * yylval_param, YYLTYPE * yylloc_param M4_YY_PROTO_LAST_ARG)]])
- m4_define( [[M4_YY_LEX_DECLARATION]],
+ m4_define( [[M4_YY_LEX_DECLARATION]], [[\]]
[[YYFARGS2(YYSTYPE *,yylval_param, YYLTYPE *,yylloc_param)]])
]])
@@ -2800,8 +2812,10 @@
void yyset_lineno M4_YY_PARAMS( int line_number M4_YY_PROTO_LAST_ARG );
@@ -2912,8 +2924,10 @@
m4_ifdef( [[M4_YY_HAS_START_STACK_VARS]],
[[
/* Destroy the start condition stack. */
+ if (YY_G(yy_start_stack) != NULL) {
+ if (YY_G(yy_start_stack) != NULL) {
yyfree( YY_G(yy_start_stack) M4_YY_CALL_LAST_ARG );
YY_G(yy_start_stack) = NULL;
+ }
+ }
]])
m4_ifdef( [[M4_YY_USES_REJECT]],
Index: main.c
--- main.c.orig 2006-02-14 19:55:42 +0100
+++ main.c 2006-02-23 15:27:46 +0100
@@ -211,6 +211,7 @@
#if ENABLE_NLS
#if HAVE_LOCALE_H
setlocale (LC_MESSAGES, "");
+ setlocale (LC_CTYPE, "");
textdomain (PACKAGE);
bindtextdomain (PACKAGE, LOCALEDIR);
#endif
@@ -1159,7 +1160,6 @@
--- main.c.orig 2007-09-10 08:16:34 +0200
+++ main.c 2007-12-13 09:18:51 +0100
@@ -1167,7 +1167,6 @@
break;
case OPT_NO_UNISTD_H:
@ -165,7 +86,7 @@ Index: main.c
buf_m4_define( &m4defs_buf, "M4_YY_NO_UNISTD_H",0);
break;
@@ -1274,7 +1274,6 @@
@@ -1282,7 +1281,6 @@
break;
case OPT_STACK:
@ -173,7 +94,7 @@ Index: main.c
buf_m4_define( &m4defs_buf, "M4_YY_STACK_USED",0);
break;
@@ -1331,87 +1330,66 @@
@@ -1339,87 +1337,66 @@
break;
case OPT_NO_YY_PUSH_STATE:
@ -261,7 +182,7 @@ Index: main.c
buf_m4_define( &m4defs_buf, "M4_YY_NO_SET_LLOC",0);
break;
@@ -1564,11 +1542,10 @@
@@ -1572,12 +1549,11 @@
if (reject){
out_m4_define( "M4_YY_USES_REJECT", NULL);
@ -269,27 +190,28 @@ Index: main.c
}
if (!do_yywrap) {
- outn ("\n#define yywrap(n) 1");
+ outn ("\n#define yywrap(M4_YY_CALL_ONLY_ARG) 1");
if (!C_plus_plus) {
- outn ("\n#define yywrap(n) 1");
+ outn ("\n#define yywrap(M4_YY_CALL_ONLY_ARG) 1");
}
outn ("#define YY_SKIP_YYWRAP");
}
Index: scan.c
--- scan.c.orig 2006-02-21 03:45:51 +0100
+++ scan.c 2006-02-23 15:41:40 +0100
@@ -2649,7 +2649,7 @@
case 77:
--- scan.c.orig 2007-12-12 22:05:29 +0100
+++ scan.c 2007-12-13 09:19:28 +0100
@@ -2858,7 +2858,7 @@
case 90:
YY_RULE_SETUP
#line 354 "scan.l"
#line 386 "scan.l"
-ACTION_IFDEF("YY_NO_UNISTD_H", ! option_sense);
+ACTION_M4_IFDEF("M4""_YY_NO_UNISTD_H", ! option_sense);
YY_BREAK
case 78:
case 91:
YY_RULE_SETUP
Index: scan.l
--- scan.l.orig 2006-02-14 20:28:53 +0100
+++ scan.l 2006-02-23 15:27:46 +0100
@@ -351,7 +351,7 @@
--- scan.l.orig 2007-09-10 08:16:34 +0200
+++ scan.l 2007-12-13 09:11:48 +0100
@@ -383,7 +383,7 @@
stack ACTION_M4_IFDEF( "M4""_YY_STACK_USED", option_sense );
stdinit do_stdinit = option_sense;
stdout use_stdout = option_sense;
@ -299,44 +221,9 @@ Index: scan.l
verbose printstats = option_sense;
warn nowarn = ! option_sense;
Index: skel.c
--- skel.c.orig 2006-02-21 03:45:41 +0100
+++ skel.c 2006-02-23 15:43:40 +0100
@@ -59,6 +59,34 @@ const char *skel[] = {
"%# the generated scanner as a C-style comment. This is to aid those who",
"%# edit the skeleton.",
"%#",
+ "",
+ "%not-for-header",
+ "%if-c-only",
+ "%if-not-reentrant",
+ "m4_ifelse(M4_YY_PREFIX,yy,,",
+ "#define yy_create_buffer M4_YY_PREFIX[[_create_buffer]]",
+ "#define yy_delete_buffer M4_YY_PREFIX[[_delete_buffer]]",
+ "#define yy_flex_debug M4_YY_PREFIX[[_flex_debug]]",
+ "#define yy_init_buffer M4_YY_PREFIX[[_init_buffer]]",
+ "#define yy_flush_buffer M4_YY_PREFIX[[_flush_buffer]]",
+ "#define yy_load_buffer_state M4_YY_PREFIX[[_load_buffer_state]]",
+ "#define yy_switch_to_buffer M4_YY_PREFIX[[_switch_to_buffer]]",
+ "#define yyin M4_YY_PREFIX[[in]]",
+ "#define yyleng M4_YY_PREFIX[[leng]]",
+ "#define yylex M4_YY_PREFIX[[lex]]",
+ "#define yylineno M4_YY_PREFIX[[lineno]]",
+ "#define yyout M4_YY_PREFIX[[out]]",
+ "#define yyrestart M4_YY_PREFIX[[restart]]",
+ "#define yytext M4_YY_PREFIX[[text]]",
+ "#define yywrap M4_YY_PREFIX[[wrap]]",
+ "#define yyalloc M4_YY_PREFIX[[alloc]]",
+ "#define yyrealloc M4_YY_PREFIX[[realloc]]",
+ "#define yyfree M4_YY_PREFIX[[free]]",
+ ")",
+ "%endif",
+ "%endif",
+ "%ok-for-header",
+ "",
"#define FLEX_SCANNER",
"#define YY_FLEX_MAJOR_VERSION 2",
"#define YY_FLEX_MINOR_VERSION 5",
@@ -983,6 +983,18 @@
--- skel.c.orig 2007-12-12 22:05:25 +0100
+++ skel.c 2007-12-13 09:23:18 +0100
@@ -1029,6 +1029,18 @@
"void yyset_lineno M4_YY_PARAMS( int line_number M4_YY_PROTO_LAST_ARG );",
"]])",
"",
@ -355,33 +242,20 @@ Index: skel.c
"%if-bison-bridge",
"m4_ifdef( [[M4_YY_NO_GET_LVAL]],,",
"[[",
@@ -1351,9 +1363,9 @@
" m4_dnl The bison pure parser is used. Redefine yylex to",
" m4_dnl accept the lval parameter.",
"",
- " m4_define( [[M4_YY_LEX_PROTO]],",
+ " m4_define( [[M4_YY_LEX_PROTO]], [[\\]]",
" [[M4_YY_PARAMS(YYSTYPE * yylval_param M4_YY_PROTO_LAST_ARG)]])",
- " m4_define( [[M4_YY_LEX_DECLARATION]],",
+ " m4_define( [[M4_YY_LEX_DECLARATION]], [[\\]]",
" [[YYFARGS1(YYSTYPE *,yylval_param)]])",
"]])",
"",
@@ -1361,9 +1373,9 @@
@@ -3123,8 +3135,10 @@
"m4_ifdef( [[M4_YY_HAS_START_STACK_VARS]],",
"[[",
" m4_dnl Locations are used. yylex should also accept the ylloc parameter.",
"",
- " m4_define( [[M4_YY_LEX_PROTO]],",
+ " m4_define( [[M4_YY_LEX_PROTO]], [[\\]]",
" [[M4_YY_PARAMS(YYSTYPE * yylval_param, YYLTYPE * yylloc_param M4_YY_PROTO_LAST_ARG)]])",
- " m4_define( [[M4_YY_LEX_DECLARATION]],",
+ " m4_define( [[M4_YY_LEX_DECLARATION]], [[\\]]",
" [[YYFARGS2(YYSTYPE *,yylval_param, YYLTYPE *,yylloc_param)]])",
" /* Destroy the start condition stack. */",
+ " if (YY_G(yy_start_stack) != NULL) {",
" yyfree( YY_G(yy_start_stack) M4_YY_CALL_LAST_ARG );",
" YY_G(yy_start_stack) = NULL;",
+ " }",
"]])",
"",
"m4_ifdef( [[M4_YY_USES_REJECT]],",
Index: tables.c
--- tables.c.orig 2002-11-27 15:43:24 +0100
+++ tables.c 2006-02-23 15:27:48 +0100
--- tables.c.orig 2006-04-11 18:54:47 +0200
+++ tables.c 2007-12-13 09:11:48 +0100
@@ -86,7 +86,7 @@
th->th_magic = YYTBL_MAGIC;
th->th_hsize = 14 + strlen (version_str) + 1 + strlen (name) + 1;
@ -391,43 +265,3 @@ Index: tables.c
th->th_flags = 0;
th->th_version = copy_string (version_str);
th->th_name = copy_string (name);
Index: scanopt.c
--- scanopt.c.orig 2002-08-29 22:30:25.000000000 +0200
+++ scanopt.c 2007-05-11 17:48:29.000000000 +0200
@@ -789,12 +789,12 @@ int scanopt (svoid, arg, optindex)
}
optarg = pstart + 1;
- arglen = 0;
- while (optarg[arglen])
- arglen++;
-
- if (arglen == 0)
+ if (!*optarg) {
optarg = NULL;
+ arglen = 0;
+ }
+ else
+ arglen = strlen (optarg);
}
/* At this point, we have a long or short option matched at opt_offset into
@@ -812,13 +812,16 @@ int scanopt (svoid, arg, optindex)
/* case: no args allowed */
if (auxp->flags & ARG_NONE) {
- if (optarg) {
+ if (optarg && !is_short) {
scanopt_err (s, opt_offset, is_short, errcode =
SCANOPT_ERR_ARG_NOT_ALLOWED);
INC_INDEX (s, 1);
return errcode;
}
- INC_INDEX (s, 1);
+ else if (!optarg)
+ INC_INDEX (s, 1);
+ else
+ s->subscript++;
return optp->r_val;
}

4
flex/flex.spec

@ -23,7 +23,7 @@
##
# package versions
%define V_new 2.5.33
%define V_new 2.5.34
%define V_old 2.5.4a
%define V_old_maj 2.5.4
@ -38,7 +38,7 @@ Class: CORE
Group: CompilerCompiler
License: BSD
Version: %{V_new}
Release: 20071104
Release: 20071213
# list of sources
Source0: http://switch.dl.sourceforge.net/sourceforge/flex/flex-%{V_new}.tar.gz

Loading…
Cancel
Save