🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #5129

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

#5129
From: Doug Gwyn
Date: Fri, 24 Jun 1988 11:56
5 lines
734 bytes
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(), and we test for NULL before
proceeding (since malloc() can fail).
Technical Details
Message-ID: <8148@brl-smoke.ARPA>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!uwvax!oddjob!ncar!ames!umd5!brl-adm!brl-smoke!gwyn
References: <haddock.4604> <1719@ogcvax.ogc.edu> <1309@ark.cs.vu.nl> <2029@pt.cs.cmu.edu> <2030@pt.cs.cmu.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!uwvax!oddjob!ncar!ames!umd5!brl-adm!brl-smoke!gwyn
From: gwyn@brl-smoke.ARPA (Doug Gwyn )
Newsgroups: comp.std.c
Subject: Re: char *strcat(), *strcpy(), *fgets();
Message-ID: <8148@brl-smoke.ARPA>
Date: 24 Jun 88 11:56:55 GMT
References: <haddock.4604> <1719@ogcvax.ogc.edu> <1309@ark.cs.vu.nl> <2029@pt.cs.cmu.edu> <2030@pt.cs.cmu.edu>
Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>)
Organization: Ballistic Research Lab (BRL), APG, MD.
Lines: 5