From: compudj Date: Mon, 27 Feb 2006 21:41:24 +0000 (+0000) Subject: genevent xml std X-Git-Tag: v0.12.20~1929 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=bb9014e64a98ba108f6ca0cf005f6791a7c71164;p=lttv.git genevent xml std git-svn-id: http://ltt.polymtl.ca/svn@1560 04897980-b3bd-0310-b5e0-8ef037075253 --- diff --git a/genevent-new/parser.c b/genevent-new/parser.c index 2d8c9c4a..bcae82e1 100644 --- a/genevent-new/parser.c +++ b/genevent-new/parser.c @@ -97,11 +97,26 @@ int getSizeindex(unsigned int value) unsigned long long int getSize(parse_file_t *in) { char *token; + int has_quotes = 0; + unsigned long long int ret; token = getToken(in); + if(token[0] == '"') { + has_quotes = 1; + token = getToken(in); + } if(in->type == NUMBER) { - return strtoull(token, NULL, 0); - } + ret = strtoull(token, NULL, 0); + } else { + goto error; + } + if(has_quotes) { + token = getToken(in); + if(token[0] != '"') goto error; + } + + return ret; +error: in->error(in,"incorrect size specification"); return -1; } @@ -360,21 +375,40 @@ char *getNameAttribute(parse_file_t *in) //for