delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/06/26/22:04:36

Message-ID: <3D1A3735.AFB31E4E@yahoo.com>
Date: Wed, 26 Jun 2002 17:50:45 -0400
From: CBFalconer <cbfalconer AT yahoo DOT com>
Organization: Ched Research
X-Mailer: Mozilla 4.75 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
Subject: Re: FILE in stdio.h
References: <200206262115 DOT g5QLFAN25126 AT speedy DOT ludd DOT luth DOT se>
Reply-To: djgpp-workers AT delorie DOT com

Martin Str|mberg wrote:
> 
> This is in <stdio.h>:
> 
> /* Note that the definitions of these fields are NOT guaranteed!  They
>    may change with any release without notice!  The fact that they
>    are here at all is to comply with ANSI specifictions. */
> 
> typedef struct {
>   int     _cnt;
>   char   *_ptr;
>   char   *_base;
>   size_t  _bufsiz;
>   int     _flag;
>   int     _file;
>   char   *_name_to_remove;
>   size_t  _fillsize;
> } FILE;
> 
> It looks like there's no requirement to reveal the insides of
> FILE in C99.
> 
> Do we want it made into an opaque type?
> 
> Or if I'm wrong, could somebody point out where in the C
> standard the requirement is?

I think it is for practical and implied reasons, rather than
specification.  Without having those fields available it would be
hard to build an efficient getc macro, for example.

-- 
Chuck F (cbfalconer AT yahoo DOT com) (cbfalconer AT worldnet DOT att DOT net)
   Available for consulting/temporary embedded and systems.
   <http://cbfalconer.home.att.net>  USE worldnet address!


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019