Path: csiph.com!eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!buffer1.nntp.ams1.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail NNTP-Posting-Date: Fri, 19 May 2017 12:52:41 -0500 From: Gareth Owen Newsgroups: comp.lang.c Subject: Re: Some ideas about c? References: <87bmqp7utb.fsf@gmail.com> <2411fc21-015a-bf11-42b4-a9a4ecdba53b@verizon.net> Date: Fri, 19 May 2017 18:52:41 +0100 Message-ID: <87y3tswx7a.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Cancel-Lock: sha1:ft/TXsZoi42hzxeRps/HY3xl7LA= MIME-Version: 1.0 Content-Type: text/plain Lines: 19 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-xkq/9UmnkLlGdiuX6ixQWjEeEcF3eP29voTNdGrvUXZzmQy6ixpV6q47hu9vloVZRbERWDvosZPalEk!+koR4stiSk/gtP8XYmye8pGrHrhTZbJPgaBSfB6bxaMQKRg9A7gEW5WBZmE5o5lS40RAP5o= X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 1868 Xref: csiph.com comp.lang.c:110400 "James R. Kuyper" writes: > On 05/19/2017 08:38 AM, Scott Lurndal wrote: >> Gareth Owen writes: >>> scott@slp53.sl.home (Scott Lurndal) writes: >>> >>>> int main() { char buffer[512]; fputs(fgets(buffer, sizeof(buffer), >>>> stdin), stdout); } >>> >>> Great. Except it doesn't work if the input line is too big. >> >> Sure it does. It just truncates it. And the programmer is, of >> course, aware of that. > > The C++ code that it supposedly replaced had no such > behavior. Therefore, it fails to be a proper replacement for that > code. Thank you James. I kept going back to see if I'd missed something.