Changeset 5470


Ignore:
Timestamp:
08/22/10 22:15:24 (15 years ago)
Author:
Eric.Larour
Message:

Making scaled response descriptors possible

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/shared/String/DescriptorIndex.cpp

    r5469 r5470  
    2020       
    2121        char * pch=NULL;
    22        
     22
    2323        /*retrieve first token, separated by underscore: */
    2424        pch = strtok (descriptor,"_");
     
    3030                if(!pch)ISSMERROR("%s%s%s"," scaled descriptor ",descriptor," is not correctly formatted!");
    3131                strcpy(root,pch);
    32                 /*now recover  the index: */
     32                /*now recover  the index if it exists: */
    3333                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                }
    3640                return ScaledEnum;
    3741        }
Note: See TracChangeset for help on using the changeset viewer.