🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #5126

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

#5126
From: Mike Khaw
Date: Thu, 23 Jun 1988 18:26
16 lines
945 bytes
From article <1309@ark.cs.vu.nl>, by maart@cs.vu.nl (Maarten Litmaath):
> Why do the functions named above return 'char *', instead of 'int', viz. the
> REALLY useful new size of the first argument string, or the number of chars
> moved?

I suppose it's so that you can do

	strcpy(foo, strcat(bar, fgets(baz, size, stream)));

(Not that I do such things often).

Mike Khaw
-- 
internet: mkhaw@teknowledge.arpa
uucp:	  {uunet|sun|ucbvax|decwrl|uw-beaver}!mkhaw%teknowledge-vaxc.arpa
hardcopy: Teknowledge Inc, 1850 Embarcadero Rd, POB 10119, Palo Alto, CA 94303
Technical Details
Message-ID: <23396@teknowledge-vaxc.ARPA>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!bbn!mit-eddie!uw-beaver!teknowledge-vaxc!mkhaw
References: <1309@ark.cs.vu.nl>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!bbn!mit-eddie!uw-beaver!teknowledge-vaxc!mkhaw
From: mkhaw@teknowledge-vaxc.ARPA (Mike Khaw)
Newsgroups: comp.std.c
Subject: Re: char *strcat(), *strcpy(), *fgets();
Message-ID: <23396@teknowledge-vaxc.ARPA>
Date: 23 Jun 88 18:26:21 GMT
References: <1309@ark.cs.vu.nl>
Organization: Teknowledge, Inc., Palo Alto CA
Lines: 16