summaryrefslogtreecommitdiff
diff options
authorMartin Quinson <mquinson@debian.org>2016-06-01 11:36:26 +0200
committergit-ubuntu importer <ubuntu-devel-discuss@lists.ubuntu.com>2016-06-01 22:13:09 +0000
commit5f90709f215ab298a08e3bb870babcc631b50765 (patch)
treefed444b561c10a4d2fd01898da478ef60cac219f
parenta048e15b3ad6e617b94ae9028cb8c85c9580093f (diff)
Imported using git-ubuntu import.
Notes
Notes: * Do not produce code with sprintf (security vulnerability). * d/ctrl: Update the standard-version to 3.9.8 (no change needed)
-rw-r--r--debian/changelog7
-rw-r--r--debian/control4
-rw-r--r--debian/patches/no-sprintf23
-rw-r--r--debian/patches/privacy_breach4
-rw-r--r--debian/patches/series2
-rw-r--r--debian/patches/sort-parts233
-rw-r--r--debian/patches/sort_output233
7 files changed, 266 insertions, 240 deletions
diff --git a/debian/changelog b/debian/changelog
index f1f9d19..0b00512 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+flexml (1.9.6-5) unstable; urgency=medium
+
+ * Do not produce code with sprintf (security vulnerability).
+ * d/ctrl: Update the standard-version to 3.9.8 (no change needed)
+
+ -- Martin Quinson <mquinson@debian.org> Wed, 01 Jun 2016 11:36:26 +0200
+
flexml (1.9.6-4) unstable; urgency=medium
* Rework how the output is sorted, so that it still compiles SimGrid.
diff --git a/debian/control b/debian/control
index b6b7733..fee6c66 100644
--- a/debian/control
+++ b/debian/control
@@ -4,10 +4,10 @@ Priority: optional
Maintainer: Martin Quinson <mquinson@debian.org>
Build-Depends: libwww-perl, debhelper (>= 9), liburi-perl,
libdate-calc-perl, flex
-Standards-Version: 3.9.6
+Standards-Version: 3.9.8
Homepage: http://flexml.sourceforge.net/
Vcs-Git: git://anonscm.debian.org/collab-maint/flexml.git
-Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/flexml.git
+Vcs-Browser: https://anonscm.debian.org/gitweb/?p=collab-maint/flexml.git
Package: flexml
Architecture: any
diff --git a/debian/patches/no-sprintf b/debian/patches/no-sprintf
new file mode 100644
index 0000000..2d070a9
--- /dev/null
+++ b/debian/patches/no-sprintf
@@ -0,0 +1,23 @@
+sprintf is seen as a security vulnerability, so we don't want to use it.
+---
+ skel | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+Index: b/skel
+===================================================================
+--- a/skel
++++ b/skel
+@@ -424,11 +424,11 @@ static int fail(const char* fmt, ...)
+ int chars_left, used;
+ va_list ap; va_start(ap, fmt);
+ #ifdef FLEXML_yylineno
+- used = sprintf(flexml_err_msg,
++ used = snprintf(flexml_err_msg,flexml_max_err_msg_size,
+ "Invalid XML (XML input line %d, state %d): ",
+ yylineno, YY_START);
+ #else
+- used = sprintf(flexml_err_msg,
++ used = snprintf(flexml_err_msg,flexml_max_err_msg_size,
+ "Invalid XML (state %d): ",
+ YY_START);
+ #endif
diff --git a/debian/patches/privacy_breach b/debian/patches/privacy_breach
index efcab03..3e916c7 100644
--- a/debian/patches/privacy_breach
+++ b/debian/patches/privacy_breach
@@ -1,3 +1,7 @@
+We dont' want to include a link to the SourceForge logo, because
+downloading it may provide information to this site that is not
+trustworthy.
+
---
FleXML.html | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/debian/patches/series b/debian/patches/series
index ba0e57e..d740a8a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,4 @@
sort-parts
privacy_breach
-sort_output
FTBFS-pedantic
+no-sprintf
diff --git a/debian/patches/sort-parts b/debian/patches/sort-parts
index 56530a7..f1f480e 100644
--- a/debian/patches/sort-parts
+++ b/debian/patches/sort-parts
@@ -1,11 +1,13 @@
Explicitely sort the elements (tags, attributes) in the generated files
-Otherwise, the diff easily become untractable when the a differing
-version of Perl is used.
+Otherwise, the diff easily become untractable from one run to the other.
+More generally, this also participate to the Reproducible effort.
---
- flexml.pl | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+ flexml.pl | 56 +++++++++++++++++------------------
+ testbed/missing-att.stderr.expected | 2 -
+ testbed/multiple-att.stderr.expected | 2 -
+ 3 files changed, 30 insertions(+), 30 deletions(-)
Index: b/flexml.pl
===================================================================
@@ -20,3 +22,226 @@ Index: b/flexml.pl
print $pre . "void STag_${tagprefix}$ctag{$_}(void)$post\n" unless $startok{$_};
print $pre . "void ETag_${tagprefix}$ctag{$_}(void)$post\n" unless $endok{$_};
}
+@@ -236,7 +236,7 @@ sub api_functions { # Print XML applicat
+
+ sub api_types { # Print XML application interface types.
+ print "/* XML application data. */\n" if %atttype;
+- for (keys %atttype) {
++ for (sort keys %atttype) {
+ if (m.($Nmtoken)[/]($Nmtoken).xo) {
+ my ($tag,$attribute) = ($1,$2);
+ print "typedef $typeof{$_} AT_${tagprefix}$ctag{$tag}_$catt{$attribute};\n";
+@@ -254,7 +254,7 @@ sub api_data { # Print XML application i
+ print "extern char *${tagprefix}bufferstack;\n";
+ print "#define ${tagprefix}pcdata (${tagprefix}bufferstack + ${tagprefix}pcdata_ix)\n";
+
+- for (keys %atttype) {
++ for (sort keys %atttype) {
+ if (m.($Nmtoken)[/]($Nmtoken).xo) {
+ print $pre . "AT_${tagprefix}$ctag{$1}_$catt{$2} AX_${tagprefix}$ctag{$1}_$catt{$2};\n";
+ print "#define A_${tagprefix}$ctag{$1}_$catt{$2} ";
+@@ -1004,7 +1004,7 @@ print STDOUT "Post-processing DTD.\n" if
+ }
+
+ # Complete all states with their `empty' equivalents.
+-for my $tag (@tags) {
++for my $tag (sort @tags) {
+
+ # Complete and prune instates and endstates...
+ my %ins = ();
+@@ -1035,13 +1035,13 @@ for my $tag (@tags) {
+ }
+
+ # Completion done...now store'em right back.
+- $instates{$tag} = join ',', keys %ins if %ins;
+- $endstates{$tag} = join ',', keys %ens if %ens;
+- $exittrans{$tag} = join ',', map "$_=>$exits{$_}", keys %exits if %exits;
++ $instates{$tag} = join ',', sort keys %ins if %ins;
++ $endstates{$tag} = join ',', sort keys %ens if %ens;
++ $exittrans{$tag} = join ',', map "$_=>$exits{$_}", sort keys %exits if %exits;
+ }
+
+ if (not %roottags) {
+- for (@tags) { $roottags{$_} = 'true'; }
++ for (sort @tags) { $roottags{$_} = 'true'; }
+ }
+
+ # Handling prefix
+@@ -1118,7 +1118,7 @@ if ($debug) {
+ print '%source = (' . printhash(\%source) . ")\n";
+ print "\n";
+
+- print '@tags = (' . join(',',@tags) . ")\n";
++ print '@tags = (' . join(',',sort @tags) . ")\n";
+ print '%ctag = (' . printhash(\%ctag) . ")\n";
+
+ print '%states = (' . printhash(\%states) . ")\n";
+@@ -1288,7 +1288,7 @@ if ($scanner or $standalone) {
+ }
+ elsif ( /^FLEXML_START_CONDITIONS$/ ) {
+
+- for (@tags) {
++ for (sort @tags) {
+ my $c = $ctag{$_};
+ print "%x"
+ . ($roottags{$_} ? " ROOT_${tagprefix}$c" : "")
+@@ -1317,7 +1317,7 @@ if ($scanner or $standalone) {
+ for ('PROLOG','DOCTYPE','EPILOG','INCOMMENT','INPI','VALUE1','VALUE2','CDATA') {
+ print " ${tagprefix}statenames[$_] = NULL;\n";
+ }
+- for my $tag (@tags) {
++ for my $tag (sort @tags) {
+ my $c = $ctag{$tag};
+ print " ${tagprefix}statenames[ROOT_${tagprefix}$c] = NULL;\n" if $roottags{$tag};
+ print " ${tagprefix}statenames[AL_${tagprefix}$c] = NULL;\n";
+@@ -1333,7 +1333,7 @@ if ($scanner or $standalone) {
+ : ( $uri ? "(\"'$uri'\"|\"\\\"$uri\\\"\")"
+ : "(\"'$dtd'\"|\"\\\"$dtd\\\"\")" );
+
+- for (keys %roottags) {
++ for (sort keys %roottags) {
+ my $c = $ctag{$_};
+ print " \"<!DOCTYPE\"{S}\"$_\"{S}"
+ . "SYSTEM{S}" . $sysid . "{s}\">\" SET(ROOT_${tagprefix}$c);\n";
+@@ -1348,10 +1348,10 @@ if ($scanner or $standalone) {
+ elsif ( /^FLEXML_RULES$/ ) {
+
+ # Dump all parameter entity declarations.
+- for (keys %parameter) { printsource($_); }
++ for (sort keys %parameter) { printsource($_); }
+
+ # Dump all start and empty tag recognition rules.
+- for my $tag (@tags) {
++ for my $tag (sort @tags) {
+
+ my $myctag = $ctag{$tag};
+ my @myattributes = (exists $attlist{$tag} ? split /,/,"$attlist{$tag}" : ());
+@@ -1359,7 +1359,7 @@ if ($scanner or $standalone) {
+
+ # Tag's source element and attribute declarations.
+ printsource($tag);
+- for my $attribute (@myattributes) {
++ for my $attribute (sort @myattributes) {
+ printsource("$tag/$attribute");
+ }
+
+@@ -1368,12 +1368,12 @@ if ($scanner or $standalone) {
+ if (exists $exittrans{$tag}) {
+ $exitswitch .= " switch (YY_START) {\n";
+ my %casesto = ();
+- for (split /,/,$exittrans{$tag}) {
++ for (sort split /,/,$exittrans{$tag}) {
+ if (m/^($Name)=>($Name)$/o) {
+ $casesto{$2} .= "case $1: ";
+ }
+ }
+- for (keys %casesto) {
++ for (sort keys %casesto) {
+ $exitswitch .= " $casesto{$_}SET($_); break;\n"
+ }
+ $exitswitch .= " }\n";
+@@ -1389,7 +1389,7 @@ if ($scanner or $standalone) {
+ if (exists $instates{$tag}) {
+ for (split /,/,$instates{$tag}) { $ins{$_} = 'true'; }
+ }
+- my $str = '<' . join(',', grep {$ins{$_} eq 'false'} keys %ins);
++ my $str = '<' . join(',', grep {$ins{$_} eq 'false'} sort keys %ins);
+ if ($str ne '<') {
+ print "$str>\"<$tag\"{s} FAIL(\"Starting tag <$tag> is not allowed here.\");\n";
+ }
+@@ -1409,7 +1409,7 @@ if ($scanner or $standalone) {
+ # "\"<$tag\"{s} {\n";
+ print ">\"<$tag\"{s} {\n";
+
+- for my $attribute (@myattributes) {
++ for my $attribute (sort @myattributes) {
+ print " AX_${tagprefix}${myctag}_$catt{$attribute} = " . $initof{"$tag/$attribute"} . ";\n";
+ print " ${tagprefix}${myctag}_$catt{$attribute}_isset = 0;\n";
+ }
+@@ -1425,7 +1425,7 @@ if ($scanner or $standalone) {
+ print "\n";
+ print "<AL_${tagprefix}$myctag>{\n";
+
+- for my $attribute (@myattributes) {
++ for my $attribute (sort @myattributes) {
+ my $type; # set by conditions
+
+ if ($type = $enumtype{"$tag/$attribute"}) {
+@@ -1481,7 +1481,7 @@ if ($scanner or $standalone) {
+ # - the end of a start tag means to enter the contents after
+ # checking that all required attributes were set.
+ print " \">\" {\n";
+- for my $attribute (@myattributes) {
++ for my $attribute (sort @myattributes) {
+ if ($required{"$tag/$attribute"}) {
+ print " if (!AX_${tagprefix}$ctag{$tag}_" . variablify($attribute) . ")"
+ . " FAIL(\"Required attribute `$attribute' not set for `$tag' element.\");\n";
+@@ -1496,7 +1496,7 @@ if ($scanner or $standalone) {
+ # - accept and handle empty tags straight away,
+ if ($empty{$tag}) {
+ print " \"/>\" {\n";
+- for my $attribute (@myattributes) {
++ for my $attribute (sort @myattributes) {
+ if ($required{"$tag/$attribute"}) {
+ print " if (!AX_${tagprefix}$ctag{$tag}_" . variablify($attribute) . ")"
+ . " FAIL(\"Required attribute `$attribute' not set for `$tag' element.\");\n";
+@@ -1559,7 +1559,7 @@ if ($scanner or $standalone) {
+ elsif ( /FLEXML_MIXED([,>])/ ) {
+
+ if (%mixed) {
+- print "$`" . join(',', map("IN_$ctag{$_}", keys %mixed)) . "$1$'";
++ print "$`" . join(',', map("IN_$ctag{$_}", sort keys %mixed)) . "$1$'";
+ }
+ else {
+ print "$`IMPOSSIBLE$1$'";
+@@ -1569,7 +1569,7 @@ if ($scanner or $standalone) {
+ elsif ( /FLEXML_NON_MIXED([,>])/ ) {
+
+ my $sep = $`;
+- for (@tags) {
++ for (sort @tags) {
+ print $sep . ($roottags{$_} ? "ROOT_${tagprefix}$ctag{$_}," : "")
+ . "AL_${tagprefix}$ctag{$_}";
+ print ",$states{$_}" if $properempty{$_} or $children{$_};
+@@ -1582,14 +1582,14 @@ if ($scanner or $standalone) {
+
+ print "$`"
+ . join(',', map(($roottags{$_} ? "ROOT_${tagprefix}$ctag{$_}," : "")
+- . "AL_${tagprefix}$ctag{$_},$states{$_}", @tags))
++ . "AL_${tagprefix}$ctag{$_},$states{$_}", sort @tags))
+ . "$1$'";
+
+ }
+ elsif ( /^FLEXML_ENTITIES$/ ) {
+
+ # Process general entities.
+- for my $ent (keys %entity) {
++ for my $ent (sort keys %entity) {
+ printsource("%$ent;");
+ print " \"&$ent;\" ENTITYTEXT(\"" . $entity{$ent} . "\");\n";
+ }
+@@ -1605,8 +1605,8 @@ if ($scanner or $standalone) {
+ elsif ( /^FLEXML_FINAL$/ and not $nofail ) {
+
+ # Catch-all error cases.
+- for my $tag (@tags) {
+- for (split ',',$states{$tag}) {
++ for my $tag (sort @tags) {
++ for (sort split ',',$states{$tag}) {
+ print "<$_>{\n";
+ print " . FAIL(\"Unrecognized `%c' in $_.\",yytext[0]);\n";
+ print " [\\n] FAIL(\"Unrecognized newline in $_.\");\n";
+Index: b/testbed/missing-att.stderr.expected
+===================================================================
+--- a/testbed/missing-att.stderr.expected
++++ b/testbed/missing-att.stderr.expected
+@@ -1 +1 @@
+-Invalid XML (state 13): Required attribute `batt' not set for `bar' element.
++Invalid XML (state 10): Required attribute `batt' not set for `bar' element.
+Index: b/testbed/multiple-att.stderr.expected
+===================================================================
+--- a/testbed/multiple-att.stderr.expected
++++ b/testbed/multiple-att.stderr.expected
+@@ -1 +1 @@
+-Invalid XML (state 13): Multiple definition of attribute batt in <bar>
++Invalid XML (state 10): Multiple definition of attribute batt in <bar>
diff --git a/debian/patches/sort_output b/debian/patches/sort_output
deleted file mode 100644
index 3ad487f..0000000
--- a/debian/patches/sort_output
+++ /dev/null
@@ -1,233 +0,0 @@
----
- flexml.pl | 54 +++++++++++++++++------------------
- testbed/missing-att.stderr.expected | 2 -
- testbed/multiple-att.stderr.expected | 2 -
- 3 files changed, 29 insertions(+), 29 deletions(-)
-
-Index: b/flexml.pl
-===================================================================
---- a/flexml.pl
-+++ b/flexml.pl
-@@ -236,7 +236,7 @@ sub api_functions { # Print XML applicat
-
- sub api_types { # Print XML application interface types.
- print "/* XML application data. */\n" if %atttype;
-- for (keys %atttype) {
-+ for (sort keys %atttype) {
- if (m.($Nmtoken)[/]($Nmtoken).xo) {
- my ($tag,$attribute) = ($1,$2);
- print "typedef $typeof{$_} AT_${tagprefix}$ctag{$tag}_$catt{$attribute};\n";
-@@ -254,7 +254,7 @@ sub api_data { # Print XML application i
- print "extern char *${tagprefix}bufferstack;\n";
- print "#define ${tagprefix}pcdata (${tagprefix}bufferstack + ${tagprefix}pcdata_ix)\n";
-
-- for (keys %atttype) {
-+ for (sort keys %atttype) {
- if (m.($Nmtoken)[/]($Nmtoken).xo) {
- print $pre . "AT_${tagprefix}$ctag{$1}_$catt{$2} AX_${tagprefix}$ctag{$1}_$catt{$2};\n";
- print "#define A_${tagprefix}$ctag{$1}_$catt{$2} ";
-@@ -1004,7 +1004,7 @@ print STDOUT "Post-processing DTD.\n" if
- }
-
- # Complete all states with their `empty' equivalents.
--for my $tag (@tags) {
-+for my $tag (sort @tags) {
-
- # Complete and prune instates and endstates...
- my %ins = ();
-@@ -1035,13 +1035,13 @@ for my $tag (@tags) {
- }
-
- # Completion done...now store'em right back.
-- $instates{$tag} = join ',', keys %ins if %ins;
-- $endstates{$tag} = join ',', keys %ens if %ens;
-- $exittrans{$tag} = join ',', map "$_=>$exits{$_}", keys %exits if %exits;
-+ $instates{$tag} = join ',', sort keys %ins if %ins;
-+ $endstates{$tag} = join ',', sort keys %ens if %ens;
-+ $exittrans{$tag} = join ',', map "$_=>$exits{$_}", sort keys %exits if %exits;
- }
-
- if (not %roottags) {
-- for (@tags) { $roottags{$_} = 'true'; }
-+ for (sort @tags) { $roottags{$_} = 'true'; }
- }
-
- # Handling prefix
-@@ -1118,7 +1118,7 @@ if ($debug) {
- print '%source = (' . printhash(\%source) . ")\n";
- print "\n";
-
-- print '@tags = (' . join(',',@tags) . ")\n";
-+ print '@tags = (' . join(',',sort @tags) . ")\n";
- print '%ctag = (' . printhash(\%ctag) . ")\n";
-
- print '%states = (' . printhash(\%states) . ")\n";
-@@ -1288,7 +1288,7 @@ if ($scanner or $standalone) {
- }
- elsif ( /^FLEXML_START_CONDITIONS$/ ) {
-
-- for (@tags) {
-+ for (sort @tags) {
- my $c = $ctag{$_};
- print "%x"
- . ($roottags{$_} ? " ROOT_${tagprefix}$c" : "")
-@@ -1317,7 +1317,7 @@ if ($scanner or $standalone) {
- for ('PROLOG','DOCTYPE','EPILOG','INCOMMENT','INPI','VALUE1','VALUE2','CDATA') {
- print " ${tagprefix}statenames[$_] = NULL;\n";
- }
-- for my $tag (@tags) {
-+ for my $tag (sort @tags) {
- my $c = $ctag{$tag};
- print " ${tagprefix}statenames[ROOT_${tagprefix}$c] = NULL;\n" if $roottags{$tag};
- print " ${tagprefix}statenames[AL_${tagprefix}$c] = NULL;\n";
-@@ -1333,7 +1333,7 @@ if ($scanner or $standalone) {
- : ( $uri ? "(\"'$uri'\"|\"\\\"$uri\\\"\")"
- : "(\"'$dtd'\"|\"\\\"$dtd\\\"\")" );
-
-- for (keys %roottags) {
-+ for (sort keys %roottags) {
- my $c = $ctag{$_};
- print " \"<!DOCTYPE\"{S}\"$_\"{S}"
- . "SYSTEM{S}" . $sysid . "{s}\">\" SET(ROOT_${tagprefix}$c);\n";
-@@ -1348,10 +1348,10 @@ if ($scanner or $standalone) {
- elsif ( /^FLEXML_RULES$/ ) {
-
- # Dump all parameter entity declarations.
-- for (keys %parameter) { printsource($_); }
-+ for (sort keys %parameter) { printsource($_); }
-
- # Dump all start and empty tag recognition rules.
-- for my $tag (@tags) {
-+ for my $tag (sort @tags) {
-
- my $myctag = $ctag{$tag};
- my @myattributes = (exists $attlist{$tag} ? split /,/,"$attlist{$tag}" : ());
-@@ -1359,7 +1359,7 @@ if ($scanner or $standalone) {
-
- # Tag's source element and attribute declarations.
- printsource($tag);
-- for my $attribute (@myattributes) {
-+ for my $attribute (sort @myattributes) {
- printsource("$tag/$attribute");
- }
-
-@@ -1368,12 +1368,12 @@ if ($scanner or $standalone) {
- if (exists $exittrans{$tag}) {
- $exitswitch .= " switch (YY_START) {\n";
- my %casesto = ();
-- for (split /,/,$exittrans{$tag}) {
-+ for (sort split /,/,$exittrans{$tag}) {
- if (m/^($Name)=>($Name)$/o) {
- $casesto{$2} .= "case $1: ";
- }
- }
-- for (keys %casesto) {
-+ for (sort keys %casesto) {
- $exitswitch .= " $casesto{$_}SET($_); break;\n"
- }
- $exitswitch .= " }\n";
-@@ -1389,7 +1389,7 @@ if ($scanner or $standalone) {
- if (exists $instates{$tag}) {
- for (split /,/,$instates{$tag}) { $ins{$_} = 'true'; }
- }
-- my $str = '<' . join(',', grep {$ins{$_} eq 'false'} keys %ins);
-+ my $str = '<' . join(',', grep {$ins{$_} eq 'false'} sort keys %ins);
- if ($str ne '<') {
- print "$str>\"<$tag\"{s} FAIL(\"Starting tag <$tag> is not allowed here.\");\n";
- }
-@@ -1409,7 +1409,7 @@ if ($scanner or $standalone) {
- # "\"<$tag\"{s} {\n";
- print ">\"<$tag\"{s} {\n";
-
-- for my $attribute (@myattributes) {
-+ for my $attribute (sort @myattributes) {
- print " AX_${tagprefix}${myctag}_$catt{$attribute} = " . $initof{"$tag/$attribute"} . ";\n";
- print " ${tagprefix}${myctag}_$catt{$attribute}_isset = 0;\n";
- }
-@@ -1425,7 +1425,7 @@ if ($scanner or $standalone) {
- print "\n";
- print "<AL_${tagprefix}$myctag>{\n";
-
-- for my $attribute (@myattributes) {
-+ for my $attribute (sort @myattributes) {
- my $type; # set by conditions
-
- if ($type = $enumtype{"$tag/$attribute"}) {
-@@ -1481,7 +1481,7 @@ if ($scanner or $standalone) {
- # - the end of a start tag means to enter the contents after
- # checking that all required attributes were set.
- print " \">\" {\n";
-- for my $attribute (@myattributes) {
-+ for my $attribute (sort @myattributes) {
- if ($required{"$tag/$attribute"}) {
- print " if (!AX_${tagprefix}$ctag{$tag}_" . variablify($attribute) . ")"
- . " FAIL(\"Required attribute `$attribute' not set for `$tag' element.\");\n";
-@@ -1496,7 +1496,7 @@ if ($scanner or $standalone) {
- # - accept and handle empty tags straight away,
- if ($empty{$tag}) {
- print " \"/>\" {\n";
-- for my $attribute (@myattributes) {
-+ for my $attribute (sort @myattributes) {
- if ($required{"$tag/$attribute"}) {
- print " if (!AX_${tagprefix}$ctag{$tag}_" . variablify($attribute) . ")"
- . " FAIL(\"Required attribute `$attribute' not set for `$tag' element.\");\n";
-@@ -1559,7 +1559,7 @@ if ($scanner or $standalone) {
- elsif ( /FLEXML_MIXED([,>])/ ) {
-
- if (%mixed) {
-- print "$`" . join(',', map("IN_$ctag{$_}", keys %mixed)) . "$1$'";
-+ print "$`" . join(',', map("IN_$ctag{$_}", sort keys %mixed)) . "$1$'";
- }
- else {
- print "$`IMPOSSIBLE$1$'";
-@@ -1569,7 +1569,7 @@ if ($scanner or $standalone) {
- elsif ( /FLEXML_NON_MIXED([,>])/ ) {
-
- my $sep = $`;
-- for (@tags) {
-+ for (sort @tags) {
- print $sep . ($roottags{$_} ? "ROOT_${tagprefix}$ctag{$_}," : "")
- . "AL_${tagprefix}$ctag{$_}";
- print ",$states{$_}" if $properempty{$_} or $children{$_};
-@@ -1582,14 +1582,14 @@ if ($scanner or $standalone) {
-
- print "$`"
- . join(',', map(($roottags{$_} ? "ROOT_${tagprefix}$ctag{$_}," : "")
-- . "AL_${tagprefix}$ctag{$_},$states{$_}", @tags))
-+ . "AL_${tagprefix}$ctag{$_},$states{$_}", sort @tags))
- . "$1$'";
-
- }
- elsif ( /^FLEXML_ENTITIES$/ ) {
-
- # Process general entities.
-- for my $ent (keys %entity) {
-+ for my $ent (sort keys %entity) {
- printsource("%$ent;");
- print " \"&$ent;\" ENTITYTEXT(\"" . $entity{$ent} . "\");\n";
- }
-@@ -1605,8 +1605,8 @@ if ($scanner or $standalone) {
- elsif ( /^FLEXML_FINAL$/ and not $nofail ) {
-
- # Catch-all error cases.
-- for my $tag (@tags) {
-- for (split ',',$states{$tag}) {
-+ for my $tag (sort @tags) {
-+ for (sort split ',',$states{$tag}) {
- print "<$_>{\n";
- print " . FAIL(\"Unrecognized `%c' in $_.\",yytext[0]);\n";
- print " [\\n] FAIL(\"Unrecognized newline in $_.\");\n";
-Index: b/testbed/missing-att.stderr.expected
-===================================================================
---- a/testbed/missing-att.stderr.expected
-+++ b/testbed/missing-att.stderr.expected
-@@ -1 +1 @@
--Invalid XML (state 13): Required attribute `batt' not set for `bar' element.
-+Invalid XML (state 10): Required attribute `batt' not set for `bar' element.
-Index: b/testbed/multiple-att.stderr.expected
-===================================================================
---- a/testbed/multiple-att.stderr.expected
-+++ b/testbed/multiple-att.stderr.expected
-@@ -1 +1 @@
--Invalid XML (state 13): Multiple definition of attribute batt in <bar>
-+Invalid XML (state 10): Multiple definition of attribute batt in <bar>