#define foreach_32(word, wordlist, next) \
for (next = &wordlist[strspn(wordlist, " ")], \
strncpy(word, next, sizeof(word)), \
word[strcspn(word, " ")] = '\0', \
word[sizeof(word) - 1] = '\0', \
next = strchr(next, ' '); \
strlen(word); \
next = next ? &next[strspn(next, " ")] : "", \
strncpy(word, next, sizeof(word)), \
word[strcspn(word, " ")] = '\0', \
word[sizeof(word) - 1] = '\0', \
next = strchr(next, ' '))
或者
#define foreach_token(word, wordlist, next, token)......
阅读全文