| 272 | |
| 273 | |
| 274 | int CStat::createIntegerTable(char * P_listeStr, |
| 275 | unsigned int ** listeInteger, |
| 276 | int * sizeOfList) |
| 277 | { |
| 278 | int nb=0; |
| 279 | char * ptr = P_listeStr; |
| 280 | char * ptr_prev = P_listeStr; |
| 281 | unsigned int current_int; |
| 282 | |
| 283 | if(isWellFormed(P_listeStr, sizeOfList) == 1) { |
| 284 | (*listeInteger) = new unsigned int[(*sizeOfList)]; |
| 285 | while((*ptr) != ('\0')) { |
| 286 | if((*ptr) == ',') { |
| 287 | sscanf(ptr_prev, "%u", ¤t_int); |
| 288 | if (nb<(*sizeOfList)) |
| 289 | (*listeInteger)[nb] = current_int; |
| 290 | nb++; |
| 291 | ptr_prev = ptr+1; |
| 292 | } |
| 293 | ptr++; |
| 294 | } |
| 295 | // on lit le dernier |
| 296 | sscanf(ptr_prev, "%u", ¤t_int); |
| 297 | if (nb<(*sizeOfList)) |
| 298 | (*listeInteger)[nb] = current_int; |
| 299 | nb++; |
| 300 | return(1); |
| 301 | } |
| 302 | return(0); |
| 303 | } |
| 304 | |
| 305 | |
| 306 | void CStat::setFileName(const char* P_name, const char* P_extension) |
nothing calls this directly
no outgoing calls
no test coverage detected