Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <STDIO_T.H>

Struct __sFILE

struct __sFILE;

Description

Stdio state variables.

The following always hold:

if (_flags&(__SLBF|__SWR)) == (__SLBF|__SWR), _lbfsize is -_bf._size, else _lbfsize is 0 if _flags&__SRD, _w is 0 if _flags&__SWR, _r is 0

This ensures that the getc and putc macros (or inline functions) never try to write or read from a file that is in `read' or `write' mode. (Moreover, they can, and do, automatically switch from read mode to write mode, and back, on "r+" and "w+" files.)

_lbfsize is used only to make the inline line-buffered output stream code as compact as possible.

_ub, _up, and _ur are used when ungetc(int,FILE *) pushes back more characters than fit in the current _bf, or when ungetc(int,FILE *) pushes back a character that does not match the previous one in _bf. When this happens, _ub._base becomes non-nil (i.e., a stream has ungetc(int,FILE *) data iff _ub._base!=NULL) and _up and _ur save the current values of _p and _r.

Members

Defined in __sFILE:


Member data


_p

unsigned char * _p;

Description


_r

int _r;

Description


_w

int _w;

Description


_flags

short _flags;

Description


_file

short _file;

Description


_bf

__sbuf _bf;

Description


_lbfsize

int _lbfsize;

Description


_cookie

void * _cookie;

Description


_read

int(* _read)(void *_cookie, char *_buf, int _n);

Description


_write

int(* _write)(void *_cookie, const char *_buf, int _n);

Description


_seek

_fpos_t(* _seek)(void *_cookie, _fpos_t _offset, int _whence);

Description


_close

int(* _close)(void *_cookie);

Description


_ub

__sbuf _ub;

Description


_up

unsigned char * _up;

Description


_ur

int _ur;

Description


_ubuf

unsigned char _ubuf[3];

Description


_nbuf

unsigned char _nbuf[1];

Description


_lb

__sbuf _lb;

Description


_blksize

int _blksize;

Description


_offset

int _offset;

Description


_data

_reent * _data;

Description