#include
#include
#define MAX 1024
void split_line(char *line);
/*
// read stdin, no parameters.
*/
int main(void) {
char line[MAX];
while((fgets(line, MAX, stdin)) != NULL)
if(strlen(line) > 1)
split_line(line);
return 0;
}
/*
// Split line into words.
*/
void split_line(char *line) {
char delim[] = ".,:;`/\"+-_(){}[]<>*&^%$#@!?~/|\\=1234567890 \t\n";
char *word;
word = strtok(line, delim);
while(word != NULL) {
printf("%s\n", word);
word = strtok(NULL, delim);
}
}