home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_10_12
/
1012076c
< prev
next >
Wrap
Text File
|
1992-10-13
|
462b
|
31 lines
/* token2.c: Parse input strings via strtokf() */
#include <stdio.h>
#include <ctype.h>
char *strtokf(char *, int (*)(char));
static int filter(char);
main()
{
char s[81];
while (gets(s))
{
char *tokp, *sp = s;
while ((tokp = strtokf(sp,filter)) != NULL)
{
puts(tokp);
sp = NULL;
}
}
return 0;
}
static int filter(char c)
{
return isalpha(c);
}