/*
* Split a line of the form
* text whitespace text
* into two strings. Also trim off any trailing newline.
* This is destructive on src.
*/
twosplit(src, dest1, dest2)
char *src, *dest1, *dest2;
{
[three lines deleted]
for (p=src; !isspace(*p)/*isalnum(*p) || ispunct(*p)*/; p++)
;
[five more lines deleted]
}
This even makes the comment accurate!
--
der Mouse
USA: {ihnp4,decvax,akgua,utzoo,etc}!utcsri!mcgill-vision!mouse
think!mosart!mcgill-vision!mouse
Europe: mcvax!decvax!utcsri!mcgill-vision!mouse
ARPAnet: utcsri!mcgill-vision!mo...@uw-beaver.arpa
"Come with me a few minutes, mortal, and we shall talk."
- Thanatos (Piers Anthony's Bearing an Hourglass)
Since isspace('\0') is false (at least on our 4.1BSD system), our department
of defensive programming recommends that the above test take the form
> for (p=src; *p != '\0' && !isspace(*p); p++)
> ;
--
Bug/s is a Volkswagen/Warner Brothers trademark.
--
UUCP: ..decvax!seismo!elsie!ado ARPA: elsie!a...@seismo.ARPA
DEC, VAX, Elsie & Ado are Digital, Borden & Ampex trademarks.