From: William F. D. <wil...@th...> - 2006-08-28 14:42:32
|
Sorry I messed this up for you. Would it be possible for you to check in a tiny test into the testbed/ directory, in the style of the ones that are there, that would fail before your change, but passes after your change? This way we would have 1) a documented case of using >1 flexer; and 2) a test that would hopefully fail if other changes are introduced that do not respect the need for $tagprefix. Since I don't have any such cases yet, I didn't notice the failure I introduced. Will On Sun, 2006-08-27 at 20:47 +0000, Martin Quinson wrote: > Update of /cvsroot/flexml/flexml > In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv5660 > > Modified Files: > flexml.pl > Log Message: > Make sure bufferstack and bufferliteral play well wrt -P option: I have 2 flexers in the same application > > Index: flexml.pl > =================================================================== > RCS file: /cvsroot/flexml/flexml/flexml.pl,v > retrieving revision 1.56 > retrieving revision 1.57 > diff -u -d -r1.56 -r1.57 > --- flexml.pl 24 Aug 2006 20:22:20 -0000 1.56 > +++ flexml.pl 27 Aug 2006 20:47:29 -0000 1.57 > @@ -249,8 +249,8 @@ > my ($pre) = @_; # pre should be a storage class spec like 'static' or 'extern' > print "/* FleXML-provided data. */\n"; > print $pre . "int ${tagprefix}pcdata_ix;\n"; > - print "extern char *bufferstack;\n"; > - print "#define ${tagprefix}pcdata (bufferstack + ${tagprefix}pcdata_ix)\n"; > + print "extern char *${tagprefix}bufferstack;\n"; > + print "#define ${tagprefix}pcdata (${tagprefix}bufferstack + ${tagprefix}pcdata_ix)\n"; > > for (keys %atttype) { > if (m.($Nmtoken)[/]($Nmtoken).xo) { > @@ -260,7 +260,7 @@ > print "AX_${tagprefix}$ctag{$1}_$catt{$2}\n"; > } > else { > - print "(bufferstack + AX_${tagprefix}$ctag{$1}_$catt{$2})\n"; > + print "(${tagprefix}bufferstack + AX_${tagprefix}$ctag{$1}_$catt{$2})\n"; > } > } > } > @@ -1288,7 +1288,7 @@ > > print " /* FleXML_init */\n"; > for my $att (@default_attributes) { > - print " bufferliteral('\\0', &bnext, \"$att\");\n"; > + print " ${tagprefix}bufferliteral('\\0', &bnext, \"$att\");\n"; > } > print " if(!${tagprefix}statenames) {${tagprefix}statenames= (const char **)calloc(IMPOSSIBLE,sizeof(char*));\n"; > for ('PROLOG','DOCTYPE','EPILOG','INCOMMENT','INPI','VALUE1','VALUE2','CDATA') { > @@ -1593,6 +1593,8 @@ > s/element_context/${tagprefix}element_context/g; > s/parse_err_msg/${tagprefix}parse_err_msg/g; > s/rcs_flexml_skeleton/rcs_${tagprefix}flexml_skeleton/g; > + s/bufferliteral/${tagprefix}bufferliteral/g; > + s/bufferstack/${tagprefix}bufferstack/g; > print; > } > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Flexml-commits mailing list > Fle...@li... > https://lists.sourceforge.net/lists/listinfo/flexml-commits -- William F Dowling wil...@th... www.scientific.thomson.com |