char *strcat(), *strcpy(), *fgets();

Arthur David Olson ado at elsie.UUCP
Mon Jun 27 04:06:18 AEST 1988


In article <8160 at brl-smoke.ARPA>, gwyn at brl-smoke.ARPA (Doug Gwyn ) writes:
< In article <11580010 at hpisod2.HP.COM> decot at hpisod2.HP.COM (Dave Decot) writes:
< >... there's nothing to prevent adding more useful functions:
< > [strecpy, strecat, strlcpy, strlcat]
< 
< Those are indeed useful, but probably the names should not start with "str",
< to avoid conflicts with possible revisions of the C standard.

While in article <8148 at brl-smoke.ARPA>, gwyn at brl-smoke.ARPA (Doug Gwyn ) writes:
< In article <2030 at pt.cs.cmu.edu> jgm at k.gp.cs.cmu.edu (John Myers) writes:
< >#define SAVESTR(s) (strcpy(malloc(strlen(s)+1),(s)))
< 
< Most of us call this function strdup(). . .

Well. . .strdup is indeed useful, but probably the name should not start with
"str", to avoid conflicts with possible revisions of the C standard.
(Here at elsie we call it "icpyalloc", but then again we're not "most of us.")
-- 
	ado at ncifcrf.gov			ADO is a trademark of Ampex.



More information about the Comp.std.c mailing list