X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a0c5f40f68a69e5fd2c22643c98aed7570191e21..2c5c14ffd2b2af540f201434bd4d32f9c197507f:/src/xbt/graphxml.c?ds=sidebyside diff --git a/src/xbt/graphxml.c b/src/xbt/graphxml.c index 905fc9edb6..c3353c3761 100644 --- a/src/xbt/graphxml.c +++ b/src/xbt/graphxml.c @@ -1257,24 +1257,13 @@ static int ck_ilimit() #ifdef FLEXML_NEED_BUFFERLIT static void graphxml_bufferliteral(char c, int* pp, const char* text) { - BUFFERSET(*pp); - if (c) { - const char *s = strchr(text, c), *e = strrchr(text, c); - assert(s && e && s <= e); - ++s; - while (s < e) { - if (isspace(*s)) { - BUFFERPUTC(' '); - do ++s; while (s < e && isspace(*s)); - } else - BUFFERPUTC(*s++); - } - } else { - const char *s = text; - while (*s) - BUFFERPUTC(*s++); - } - BUFFERDONE; + const char *s = (c ? strchr(text,c) : text-1), *e = strrchr(text,c); + assert(s <= e); BUFFERSET(*pp); + while (++s