Changeset 6412 for issm/trunk/src/c/shared/String/DescriptorIndex.cpp
- Timestamp:
- 10/25/10 08:57:04 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/shared/String/DescriptorIndex.cpp
r5470 r6412 23 23 /*retrieve first token, separated by underscore: */ 24 24 pch = strtok (descriptor,"_"); 25 if(!pch) ISSMERROR("%s%s%s"," descriptor ",descriptor," is not correctly formatted!");25 if(!pch)_error_("%s%s%s"," descriptor ",descriptor," is not correctly formatted!"); 26 26 27 27 if (strncmp(pch,"scaled",6)==0){ 28 28 /*we have a scaled variable. recover the root: */ 29 29 pch = strtok (NULL, "_"); 30 if(!pch) ISSMERROR("%s%s%s"," scaled descriptor ",descriptor," is not correctly formatted!");30 if(!pch)_error_("%s%s%s"," scaled descriptor ",descriptor," is not correctly formatted!"); 31 31 strcpy(root,pch); 32 32 /*now recover the index if it exists: */ … … 43 43 /*we have an indexed variable. recover the root: */ 44 44 pch = strtok (NULL, "_"); 45 if(!pch) ISSMERROR("%s%s%s"," indexed descriptor ",descriptor," is not correctly formatted!");45 if(!pch)_error_("%s%s%s"," indexed descriptor ",descriptor," is not correctly formatted!"); 46 46 strcpy(root,pch); 47 47 /*now recover the index: */ 48 48 pch = strtok (NULL, "_"); 49 if(!pch) ISSMERROR("%s%s%s"," indexed descriptor ",descriptor," is not correctly formatted!");49 if(!pch)_error_("%s%s%s"," indexed descriptor ",descriptor," is not correctly formatted!"); 50 50 sscanf(pch,"%i",pindex); 51 51 return IndexedEnum; … … 54 54 /*we have an indexed variable. recover the root: */ 55 55 pch = strtok (NULL, "_"); 56 if(!pch) ISSMERROR("%s%s%s"," nodal descriptor ",descriptor," is not correctly formatted!");56 if(!pch)_error_("%s%s%s"," nodal descriptor ",descriptor," is not correctly formatted!"); 57 57 strcpy(root,pch); 58 58 /*now recover the index: */ 59 59 pch = strtok (NULL, "_"); 60 if(!pch) ISSMERROR("%s%s%s"," nodal descriptor ",descriptor," is not correctly formatted!");60 if(!pch)_error_("%s%s%s"," nodal descriptor ",descriptor," is not correctly formatted!"); 61 61 sscanf(pch,"%i",pindex); 62 62 return NodalEnum;
Note:
See TracChangeset
for help on using the changeset viewer.