Changeset 774 for trunk/AGRIF/LIB/UtilListe.c
- Timestamp:
- 2007-12-18T17:45:53+01:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/AGRIF/LIB/UtilListe.c
r663 r774 31 31 /* knowledge of the CeCILL-C license and that you accept its terms. */ 32 32 /******************************************************************************/ 33 /* version 1. 6*/33 /* version 1.7 */ 34 34 /******************************************************************************/ 35 35 #include <stdio.h> … … 116 116 { 117 117 if (!strcasecmp(type,"character") && strcasecmp(CharacterSize,"") ) 118 strcpy(curvar->v_dimchar,CharacterSize); 118 { 119 strcpy(curvar->v_dimchar,CharacterSize); 120 Save_Length(CharacterSize,5); 121 } 119 122 120 123 /* On donne la precision de la variable si elle a ete donnee */ … … 123 126 /* */ 124 127 strcpy(curvar->v_vallengspec,""); 125 if ( strcasecmp(vallengspec,"") ) strcpy(curvar->v_vallengspec,vallengspec); 128 if ( strcasecmp(vallengspec,"") ) 129 { 130 strcpy(curvar->v_vallengspec,vallengspec); 131 Save_Length(vallengspec,8); 132 } 126 133 127 134 strcpy(curvar->v_precision,""); 128 if ( strcasecmp(NamePrecision,"") ) strcpy(curvar->v_precision,NamePrecision); 135 if ( strcasecmp(NamePrecision,"") ) 136 { 137 strcpy(curvar->v_precision,NamePrecision); 138 Save_Length(NamePrecision,12); 139 } 129 140 /* Si cette variable a ete declaree dans un module on met curvar->module=1 */ 130 141 if ( inmoduledeclare == 1 || SaveDeclare == 1) … … 134 145 /* Puis on donne le nom du module dans curvar->v_modulename */ 135 146 strcpy(curvar->v_modulename,curmodulename); 147 Save_Length(curmodulename,6); 136 148 /* Si cette variable a ete initialisee */ 137 if (InitialValueGiven == 1 ) strcpy(curvar->v_initialvalue,InitValue); 149 if (InitialValueGiven == 1 ) 150 { 151 strcpy(curvar->v_initialvalue,InitValue); 152 Save_Length(InitValue,14); 153 } 138 154 /* Si cette variable est declaree en save */ 139 155 if (SaveDeclare == 1 ) curvar->v_save = 1; … … 141 157 if (Allocatabledeclare == 1 ) curvar->v_allocatable=1; 142 158 /* if INTENT spec has been given */ 143 if ( strcasecmp(IntentSpec,"") ) strcpy(curvar->v_IntentSpec,IntentSpec); 159 if ( strcasecmp(IntentSpec,"") ) 160 { 161 strcpy(curvar->v_IntentSpec,IntentSpec); 162 Save_Length(IntentSpec,13); 163 } 144 164 } 145 165 … … 190 210 tmpvar->v_pointedvar=parcours->var->v_pointedvar; 191 211 strcpy(tmpvar->v_commoninfile,mainfile); 212 Save_Length(mainfile,10); 192 213 strcpy(tmpvar->v_subroutinename,parcours->var->v_subroutinename); 193 214 tmpvar->v_dimensiongiven=parcours->var->v_dimensiongiven; … … 277 298 v=parcours_var->var; 278 299 strcpy(v->v_dimchar,(lin->dim).last); 300 Save_Length((lin->dim).last,5); 279 301 parcours_var=parcours_var->suiv; 280 302 } … … 316 338 variable *var; 317 339 listdim *dims; 318 char ligne[LONG NOM];319 char listdimension[LONG NOM];340 char ligne[LONG_C]; 341 char listdimension[LONG_C]; 320 342 321 343 var=(variable *) malloc(sizeof(variable)); … … 324 346 /* */ 325 347 strcpy(var->v_nomvar,nom); 348 Save_Length(nom,4); 326 349 /* */ 327 350 strcpy(listdimension,""); 328 351 strcpy(var->v_modulename,curmodulename); 352 Save_Length(curmodulename,6); 329 353 strcpy(var->v_commoninfile,mainfile); 354 Save_Length(mainfile,10); 330 355 strcpy(var->v_subroutinename,subroutinename); 356 Save_Length(subroutinename,11); 331 357 /* */ 332 358 if ( strcasecmp(nameinttypename,"") ) 333 strcpy(var->v_nameinttypename,nameinttypename); 359 { 360 strcpy(var->v_nameinttypename,nameinttypename); 361 Save_Length(nameinttypename,9); 362 } 334 363 if ( optionaldeclare == 1 ) var->v_optionaldeclare = 1; 335 364 if ( pointerdeclare == 1 ) var->v_pointerdeclare = 1; … … 361 390 } 362 391 strcpy(var->v_readedlistdimension,listdimension); 392 Save_Length(listdimension,15); 363 393 /* */ 364 394 var->v_nbdim=num_dims(d); … … 428 458 v=newvar->var; 429 459 strcpy(v->v_typevar,nom); 460 Save_Length(nom,3); 430 461 newvar=newvar->suiv; 431 462 }
Note: See TracChangeset
for help on using the changeset viewer.