- Timestamp:
- 06/21/12 10:10:34 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/modules/Dakotax/DescriptorIndex.cpp
r12493 r12494 23 23 /*retrieve first token, separated by underscore: */ 24 24 pch = strtok (descriptor,"_"); 25 if(!pch)_error2_(" " << "descriptor " << descriptor << " is not correctly formatted!");25 if(!pch)_error2_(" 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)_error2_(" " << "scaled descriptor " << descriptor << " is not correctly formatted!");30 if(!pch)_error2_(" scaled descriptor " << descriptor << " is not correctly formatted!"); 31 31 memcpy(root,pch,(strlen(pch)+1)*sizeof(char)); 32 32 … … 44 44 /*we have an indexed variable. recover the root: */ 45 45 pch = strtok (NULL, "_"); 46 if(!pch)_error2_(" " << "indexed descriptor " << descriptor << " is not correctly formatted!");46 if(!pch)_error2_(" indexed descriptor " << descriptor << " is not correctly formatted!"); 47 47 memcpy(root,pch,(strlen(pch)+1)*sizeof(char)); 48 48 /*now recover the index: */ 49 49 pch = strtok (NULL, "_"); 50 if(!pch)_error2_(" " << "indexed descriptor " << descriptor << " is not correctly formatted!");50 if(!pch)_error2_(" indexed descriptor " << descriptor << " is not correctly formatted!"); 51 51 sscanf(pch,"%i",pindex); 52 52 return IndexedEnum; … … 55 55 /*we have an indexed variable. recover the root: */ 56 56 pch = strtok (NULL, "_"); 57 if(!pch)_error2_(" " << "nodal descriptor " << descriptor << " is not correctly formatted!");57 if(!pch)_error2_(" nodal descriptor " << descriptor << " is not correctly formatted!"); 58 58 memcpy(root,pch,(strlen(pch)+1)*sizeof(char)); 59 59 /*now recover the index: */ 60 60 pch = strtok (NULL, "_"); 61 if(!pch)_error2_(" " << "nodal descriptor " << descriptor << " is not correctly formatted!");61 if(!pch)_error2_(" nodal descriptor " << descriptor << " is not correctly formatted!"); 62 62 sscanf(pch,"%i",pindex); 63 63 return NodalEnum;
Note:
See TracChangeset
for help on using the changeset viewer.