Path: utzoo!attcan!uunet!husc6!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.std.c Subject: Re: char *strcat(), *strcpy(), *fgets(); Message-ID: <8145@brl-smoke.ARPA> Date: 23 Jun 88 18:07:34 GMT References:<1719@ogcvax.ogc.edu> <1309@ark.cs.vu.nl> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 29 In article <1309@ark.cs.vu.nl> maart@cs.vu.nl (Maarten Litmaath) writes: >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? "Historical reasons." >Will this feature ever be changed? No. That would break a large number of existing correctly-written programs. >One gets() tired of typing '(void) strcpy(buf, str);'. Oh, I don't know about that. Here is a real example from source code I happened to have open in another layer on my terminal: (void)strcat(strcat(strcat(strcat(strcat(strcpy(fn, TargetDir ), target ), Slash ), approx ), Slash ), CCMAP );