From: mquinson Date: Wed, 25 May 2005 11:36:56 +0000 (+0000) Subject: differentiate the types 'char[22]' and 'unsigned char[22]' X-Git-Tag: v3.3~4063 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/4a493e26f3d150dae733d8cda845ba86938932c7?ds=sidebyside differentiate the types 'char[22]' and 'unsigned char[22]' git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@1292 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/gras/DataDesc/ddt_parse.c b/src/gras/DataDesc/ddt_parse.c index c034d63084..d1a495eb73 100644 --- a/src/gras/DataDesc/ddt_parse.c +++ b/src/gras/DataDesc/ddt_parse.c @@ -111,10 +111,15 @@ static void change_to_fixed_array(xbt_dynar_t dynar, long int size) { XBT_IN; xbt_dynar_pop(dynar,&former); - array.type_name=(char*)xbt_malloc(strlen(former.type->name)+20); + array.type_name=(char*)xbt_malloc(strlen(former.type->name)+48); DEBUG2("Array specification (size=%ld, elm='%s'), change pushed type", size,former.type_name); - sprintf(array.type_name,"%s[%ld]",former.type_name,size); + sprintf(array.type_name,"%s%s%s%s[%ld]", + (former.tm.is_unsigned?"u ":""), + (former.tm.is_short?"s ":""), + (former.tm.is_long?"l ":""), + former.type_name, + size); free(former.type_name); array.type = gras_datadesc_array_fixed(array.type_name, former.type, size); /* redeclaration are ignored */