HPCToolkit
token-iter.h
Go to the documentation of this file.
1
#ifndef TOKEN_ITER
2
#define TOKEN_ITER
3
#include <string.h>
4
#define Token_iterate(tok, s, delim, b) \
5
{ \
6
char* _last; \
7
if (s) { \
8
char _tmp[strlen(s)+1]; \
9
strcpy(_tmp, s); \
10
for(char* tok=strtok_r(_tmp, delim, &_last); tok; tok=strtok_r(NULL, delim, &_last)) b \
11
} \
12
}
13
#endif // TOKEN_ITER
src
tool
hpcrun
utilities
token-iter.h
Generated by
1.8.13