X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4de869aa8bcf5a24acf31227f46f577e4bdb1479..d38fd32fe23b21705687ece2ed3624626b62d8ad:/src/surf/surfxml.l diff --git a/src/surf/surfxml.l b/src/surf/surfxml.l index e82f061aeb..4e1d0b1179 100644 --- a/src/surf/surfxml.l +++ b/src/surf/surfxml.l @@ -39,7 +39,7 @@ const char rcs_flexml[] = /* Generated definitions. */ #define FLEXML_yylineno -#define FLEXML_BUFFERSTACKSIZE 10000000 +#define FLEXML_BUFFERSTACKSIZE 1000000 /* XML processor api. */ #include "surf/surfxml.h" @@ -215,7 +215,8 @@ const char* *statenames=NULL; /* Bypass Flex's default INITIAL state and begin by parsing the XML prolog. */ SET(PROLOG); /* FleXML_init */ - if(!statenames) statenames= (const char **)calloc(IMPOSSIBLE,sizeof(char*)); + next = bufferstack; + if(!statenames) {statenames= (const char **)calloc(IMPOSSIBLE,sizeof(char*)); statenames[PROLOG] = NULL; statenames[DOCTYPE] = NULL; statenames[EPILOG] = NULL; @@ -260,7 +261,7 @@ const char* *statenames=NULL; statenames[ROOT_argument] = NULL; statenames[AL_argument] = NULL; statenames[E_argument] = "argument"; - + } /* COMMENTS and PIs: handled uniformly for efficiency. */ {