Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Stephen Williams <steve@icarus.icarus.com>
Subject: Re: fclose() (fwd)
Date: Mon, 17 Feb 1997 14:55:13 -0800	[thread overview]
Message-ID: <9f7714a012974618b29b4f5ecfcd24db.axp-list@archive.invalid> (raw)

> FILE *f1, *f2;
>
> f1 = fopen("file1", "r");
> fclose(f1);
> f2 = fopen("file2", "r");
> fclose(f1); /* Second close of f1 */

bheadley@interaccess.com said:
> Yeech! I wonder what it does with three potential file *'s. That 
> downright sucks; it's nice that they keep their FILE *'s in a stack 

FILE structures are not necessarily mallocated. ...

The C standard allows (expects?) an implementation to limit the number
of open FILEs, and static arrays are not an unreasonable implementation
in some cases. (Hell, I even considered it myself once.)

-- 
Steve Williams
steve@icarus.com
steve@picturel.com

"The woods are lovely, dark and deep.  But I have promises to keep,
And lines to code before I sleep, And lines to code before I sleep."

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

             reply	other threads:[~1997-02-17 22:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-02-17 22:55 Stephen Williams [this message]
  -- strict thread matches above, loose matches on Subject: below --
1997-02-22  1:02 fclose() (fwd) Eric Smith
     [not found] <gaf@zk3.dec.com>
1997-02-21  4:59 ` Bryan W. Headley
     [not found] <9702181221.AA02768@halfpint.rtp.avanticorp.com>
1997-02-18 16:14 ` Jerry Feldman
     [not found] <9702171536.ZM1175@davros.bwh.com>
1997-02-18 12:21 ` Jim Nance
     [not found] <jlnance@avanticorp.com>
1997-02-17 21:36 ` Bryan W. Headley
1997-02-17 21:18 Jim Nance
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox