Update of /cvsroot/flexml/flexml
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12458
Modified Files:
flexml.pl
Log Message:
Also protect pcdata from multiple definitions, but this is a public symbol
Index: flexml.pl
===================================================================
RCS file: /cvsroot/flexml/flexml/flexml.pl,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- flexml.pl 21 Mar 2006 13:09:12 -0000 1.48
+++ flexml.pl 21 Apr 2006 23:35:51 -0000 1.49
@@ -236,7 +236,7 @@
sub api_data { # Print XML application interface parameters.
my ($pre) = @_;
print "/* FleXML-provided data. */\n";
- print $pre . "const char* pcdata;\n";
+ print $pre . "const char* ${tagprefix}pcdata;\n";
for (keys %atttype) {
if (m.($Nmtoken)[/]($Nmtoken).xo) {
print $pre . "AT_${tagprefix}$ctag{$1}_$catt{$2} A_${tagprefix}$ctag{$1}_$catt{$2};\n";
@@ -1365,8 +1365,8 @@
}
}
print " LEAVE; STag_${tagprefix}$myctag();"
- . (%inmixed ? ' pushbuffer(pcdata);' : '')
- . ($mixed{$tag} ? 'BUFFERSET(pcdata)' : 'pcdata = NULL'). ";"
+ . (%inmixed ? ' pushbuffer('."${tagprefix}".'pcdata);' : '')
+ . ($mixed{$tag} ? 'BUFFERSET('."${tagprefix}".'pcdata)' : "${tagprefix}".'pcdata = NULL'). ";"
. " ENTER($startstate{$tag});\n";
print " }\n";
#
@@ -1380,10 +1380,10 @@
}
}
print " LEAVE; STag_${tagprefix}$myctag();"
- . (%inmixed ? ' pushbuffer(pcdata);' : '')
- . ' pcdata = ' . ($mixed{$tag} ? '""' : 'NULL') . ';'
+ . (%inmixed ? ' pushbuffer('."${tagprefix}".'pcdata);' : '')
+ . " ${tagprefix}".'pcdata = ' . ($mixed{$tag} ? '""' : 'NULL') . ';'
. " ETag_${tagprefix}$myctag();"
- . (%inmixed ? ' pcdata = popbuffer();' : '')
+ . (%inmixed ? " ${tagprefix}".'pcdata = popbuffer();' : '')
. "\n";
#
print $exitswitch;
@@ -1408,7 +1408,7 @@
print " LEAVE;\n";
print " BUFFERDONE;\n" if $mixed{$tag};
print " ETag_${tagprefix}$myctag();\n";
- print " pcdata = popbuffer();\n" if %inmixed;
+ print " ${tagprefix}pcdata = popbuffer();\n" if %inmixed;
print $exitswitch;
print " }\n";
@@ -1613,7 +1613,7 @@
if not $enumtype{"$tag/$att"} =~ m/\b$elt\b/ ;
}
- while ( s|\{\#(PCDATA)\}|pcdata| ) {
+ while ( s|\{\#(PCDATA)\}|${tagprefix}pcdata| ) {
die "\"$ACTIONS\", line $lineno: {#PCDATA} only allowed in end tag.\n"
if $isstart;
die "\"$ACTIONS\", line $lineno: {#PCDATA} only permitted in end tag with Mixed contents.\n"
|