From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <9f7714a012974618b29b4f5ecfcd24db.axp-list@archive.invalid> X-Archive-Original-Message-ID: <199702172255.OAA18438@icarus.icarus.com> Date: Mon, 17 Feb 1997 14:55:13 -0800 From: Stephen Williams Subject: Re: fclose() (fwd) > 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