Path: csiph.com!feeder.erje.net!2.eu.feeder.erje.net!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: Sun, 18 Jun 2017 10:20:42 -0500 From: Gareth Owen Newsgroups: comp.lang.c Subject: Re: What is the difference between (r+ and w+) References: Date: Sun, 18 Jun 2017 16:20:42 +0100 Message-ID: <87d1a19vat.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Cancel-Lock: sha1:PLspL/BsL0JCUd5OUiZt1gskSaE= MIME-Version: 1.0 Content-Type: text/plain Lines: 12 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-Zna2maAjRC+XFGIhKbm6bttY2DTxNV3HGl1jf2tr8WjG/ZpPXvoG7rbb/CRqFSge8uUIUzO5Sg4M194!OijntXRk5Lwv9WrPfbtZLjIBh6ppV8z6FHgrU4BO9/W6wtgY7ZN15OdfCDTnTiXtWfwVpks= 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: 1588 Xref: csiph.com comp.lang.c:112473 Richard Heathfield writes: >> If you look at the prototype of freopen: >> >> FILE * freopen(const char *filename,const char *mode,FILE *stream); >> >> we see that your claim doesn't hold since that FILE * must have been >> obtained (eventually) by an fopen. > > No. For example, it can be stdin, stdout, or stderr. In my experience it is rarely used for anything else.