sc68fordevelopers  2.2.1
Data Structures
istream68_def.h File Reference

generic stream interface. More...

#include "file68/istream68.h"

Go to the source code of this file.

Data Structures

struct  _istream_t
 Input stream structure. More...
 

Macros

Open mode defines.
#define ISTREAM_OPEN_READ_BIT   0
 Read open mode bit. More...
 
#define ISTREAM_OPEN_READ   (1<<ISTREAM_OPEN_READ_BIT)
 Read open mode value. More...
 
#define ISTREAM_OPEN_WRITE_BIT   1
 Write open mode bit. More...
 
#define ISTREAM_OPEN_WRITE   (1<<ISTREAM_OPEN_WRITE_BIT)
 Write open mode value. More...
 
#define ISTREAM_IS_OPEN(V)   (!!((V)&(ISTREAM_OPEN_READ|ISTREAM_OPEN_WRITE)))
 Test if any open flags is set (returns 0 or 1). More...
 
#define ISTREAM_IS_OPEN_READ(V)   (((V)>>ISTREAM_OPEN_READ_BIT)&1)
 Test if READ open flags is set (returns 0 or 1). More...
 
#define ISTREAM_IS_OPEN_WRITE(V)   (((V)>>ISTREAM_OPEN_WRITE_BIT)&1)
 Test if WRITE open flags is set (returns 0 or 1). More...
 

Typedefs

input stream function types.
typedef const char *(* istream_name_t) (istream_t *)
 
typedef int(* istream_open_t) (istream_t *)
 
typedef int(* istream_close_t) (istream_t *)
 
typedef int(* istream_length_t) (istream_t *)
 
typedef int(* istream_tell_t) (istream_t *)
 
typedef int(* istream_seek_t) (istream_t *, int)
 
typedef int(* istream_read_t) (istream_t *, void *, int)
 
typedef int(* istream_write_t) (istream_t *, const void *, int)
 
typedef void(* istream_destroy_t) (istream_t *)
 

Detailed Description

generic stream interface.

Author
benjamin gerard
Date
2003/08/08
Id
istream68_def.h,v 2.5 2003/09/30 06:29:57 benjihan Exp

Generic stream interface definition.

Macro Definition Documentation

#define ISTREAM_OPEN_READ_BIT   0

Read open mode bit.

#define ISTREAM_OPEN_READ   (1<<ISTREAM_OPEN_READ_BIT)

Read open mode value.

#define ISTREAM_OPEN_WRITE_BIT   1

Write open mode bit.

#define ISTREAM_OPEN_WRITE   (1<<ISTREAM_OPEN_WRITE_BIT)

Write open mode value.

#define ISTREAM_IS_OPEN (   V)    (!!((V)&(ISTREAM_OPEN_READ|ISTREAM_OPEN_WRITE)))

Test if any open flags is set (returns 0 or 1).

#define ISTREAM_IS_OPEN_READ (   V)    (((V)>>ISTREAM_OPEN_READ_BIT)&1)

Test if READ open flags is set (returns 0 or 1).

#define ISTREAM_IS_OPEN_WRITE (   V)    (((V)>>ISTREAM_OPEN_WRITE_BIT)&1)

Test if WRITE open flags is set (returns 0 or 1).