🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #5141

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

#5141
From: Arthur David Olson
Date: Sun, 26 Jun 1988 18:06
19 lines
1372 bytes
In article <8160@brl-smoke.ARPA>, gwyn@brl-smoke.ARPA (Doug Gwyn ) writes:
< In article <11580010@hpisod2.HP.COM> decot@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@brl-smoke.ARPA>, gwyn@brl-smoke.ARPA (Doug Gwyn ) writes:
< In article <2030@pt.cs.cmu.edu> jgm@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@ncifcrf.gov			ADO is a trademark of Ampex.
Technical Details
Message-ID: <8099@elsie.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!pacbell!ames!umd5!cvl!elsie!ado
References: <1309@ark.cs.vu.nl> <11580010@hpisod2.HP.COM> <8160@brl-smoke.ARPA>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!pacbell!ames!umd5!cvl!elsie!ado
From: ado@elsie.UUCP (Arthur David Olson)
Newsgroups: comp.std.c
Subject: Re: char *strcat(), *strcpy(), *fgets();
Summary: Ahem. . .
Message-ID: <8099@elsie.UUCP>
Date: 26 Jun 88 18:06:18 GMT
References: <1309@ark.cs.vu.nl> <11580010@hpisod2.HP.COM> <8160@brl-smoke.ARPA>
Organization: NIH-LEC, Bethesda, MD
Lines: 19