Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Jan 1996 17:17:05 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        hackers@freebsd.org, jkh@time.cdrom.com
Subject:   Re: Change to stdio.h to export `cookie?'
Message-ID:  <199601180617.RAA30637@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>Those users of our stdio's funopen() call are already familiar with
>the cookie I'm talking about - it's a magic variable in the FILE
>struct which you can set to things for the benefit of your own I/O
>functions.  The only problem is that the API designers didn't provide
>a hook for getting/setting it, leading to code which makes assumptions
>about the inside of the FILE structure.  I don't know if anyone's ever

Since the cookie points to an object that is decided by the caller
of funopen(), it is impossible to know what it points to.

>Any objections to an accessor macro being added to stdio.h?  I don't

It could only work for cookies created by the stdio implementation.
Ick.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199601180617.RAA30637>