MCPcopy Create free account
hub / github.com/SIPp/sipp / createIntegerTable

Method createIntegerTable

src/stat.cpp:274–303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

272
273
274int 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", &current_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", &current_int);
297 if (nb<(*sizeOfList))
298 (*listeInteger)[nb] = current_int;
299 nb++;
300 return(1);
301 }
302 return(0);
303}
304
305
306void CStat::setFileName(const char* P_name, const char* P_extension)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected