Changeset 5470
- Timestamp:
- 08/22/10 22:15:24 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/shared/String/DescriptorIndex.cpp
r5469 r5470 20 20 21 21 char * pch=NULL; 22 22 23 23 /*retrieve first token, separated by underscore: */ 24 24 pch = strtok (descriptor,"_"); … … 30 30 if(!pch)ISSMERROR("%s%s%s"," scaled descriptor ",descriptor," is not correctly formatted!"); 31 31 strcpy(root,pch); 32 /*now recover the index : */32 /*now recover the index if it exists: */ 33 33 pch = strtok (NULL, "_"); 34 sscanf(pch,"%i",pindex); 35 if(!pch)ISSMERROR("%s%s%s"," scaled descriptor ",descriptor," is not correctly formatted!"); 34 if(!pch){ 35 *pindex=-1; 36 } 37 else{ 38 sscanf(pch,"%i",pindex); 39 } 36 40 return ScaledEnum; 37 41 }
Note:
See TracChangeset
for help on using the changeset viewer.