<string.h> vs <strings.h>

Chris Torek chris at mimsy.UUCP
Sat Oct 15 08:07:52 AEST 1988


In article <8649 at smoke.ARPA> gwyn at smoke.ARPA (Doug Gwyn) writes:
><strings.h> doesn't declare strtok, so it is assumed to return int
>which is not compatible with the char * being assigned into.
><strings.h> was invented by Berkeley without regard for existing
>practice.

`Existing practise' being, at the time, either PWB or SysIII, neither
of which could be considered somehow more valid than BSD.  I know not
who was truly first, but one could just as easily say `<string.h> was
invented by AT&T USG without regard for existing practise.'  (Actually,
the places to look are V7 and 32/V.)

><string.h> is the official standard header for the str* functions,
>and it does declare strtok.

... and in the future, expect the 4BSD <strings.h> to simply be a
link to <string.h>.  In the meantime, just use the latter; it does
exist in 4.3BSD and is *now* clearly the best choice.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at mimsy.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.std.c mailing list