Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

istream68_def.h

Go to the documentation of this file.
00001 
00014 /* Copyright (C) 1998-2003 Benjamin Gerard */
00015 
00016 #ifndef _ISTREAM68_DEF_H_
00017 #define _ISTREAM68_DEF_H_
00018 
00019 #include "file68/istream68.h"
00020 
00026 #define ISTREAM_OPEN_READ_BIT 0
00027 
00029 #define ISTREAM_OPEN_READ  (1<<ISTREAM_OPEN_READ_BIT)
00030 
00032 #define ISTREAM_OPEN_WRITE_BIT 1
00033 
00035 #define ISTREAM_OPEN_WRITE (1<<ISTREAM_OPEN_WRITE_BIT)
00036 
00038 #define ISTREAM_IS_OPEN(V) (!!((V)&(ISTREAM_OPEN_READ|ISTREAM_OPEN_WRITE)))
00039 
00041 #define ISTREAM_IS_OPEN_READ(V) (((V)>>ISTREAM_OPEN_READ_BIT)&1)
00042 
00044 #define ISTREAM_IS_OPEN_WRITE(V) (((V)>>ISTREAM_OPEN_WRITE_BIT)&1)
00045 
00051 typedef const char * (* istream_name_t) (istream_t *);
00052 typedef int (* istream_open_t) (istream_t *);
00053 typedef int (* istream_close_t) (istream_t *);
00054 typedef int (* istream_length_t) (istream_t *);
00055 typedef int (* istream_tell_t) (istream_t *);
00056 typedef int (* istream_seek_t) (istream_t *, int);
00057 typedef int (* istream_read_t) (istream_t *, void *, int);
00058 typedef int (* istream_write_t) (istream_t *, const void *, int);
00059 typedef void (* istream_destroy_t) (istream_t *);
00063 struct _istream_t {
00064   /*const*/ istream_name_t name;     
00065   /*const*/ istream_open_t open;     
00066   /*const*/ istream_close_t close;   
00067   /*const*/ istream_read_t read;     
00068   /*const*/ istream_write_t write;   
00069   /*const*/ istream_length_t length; 
00070   /*const*/ istream_tell_t tell;     
00071   /*const*/ istream_seek_t seekf;    
00072   /*const*/ istream_seek_t seekb;    
00073   /*const*/ istream_destroy_t destroy; 
00074 };
00075 
00076 #endif /* #ifndef _ISTREAM68_DEF_H_ */

Generated on Fri Sep 26 16:27:53 2003 for sc68fordevelopers by doxygen 1.3.3