|
Data Structures |
struct | s_stream |
Defines |
#define | __STREAM_STREAM_H__ 1 |
#define | EOF (-1) |
#define | BUFFER_SIZE 512 |
#define | MODE_READ 1 |
#define | MODE_WRITE 2 |
#define | MODE_RDWR 3 |
#define | MODE_APPEND 4 |
#define | MODE_CREATE 8 |
#define | MODE_TRUNC 16 |
#define | MODE_EOF 32 |
#define | TEST_READ(f) (0 != (MODE_READ & stream->mode)) |
#define | TEST_WRITE(f) (0 != (MODE_WRITE & stream->mode)) |
#define | TEST_WRITING(f) (~0 == (f)->offset) |
#define | TEST_READING(f) ((f)->offset < (f)->size) |
#define | TEST_APPEND(f) (0 != (MODE_APPEND & (f)->mode)) |
#define | TEST_EOF(f) (0 != (MODE_EOF & (f)->mode)) |
Typedefs |
typedef s_stream | t_stream |
Functions |
int | stream_fclose (t_stream *stream) |
int | stream_fgetc (t_stream *stream) |
t_stream * | stream_fopen (char const *path, char const *mode) |
int | stream_fputs (char *str, t_stream *stream) |
int | stream_fsetpos (t_stream *stream, off_t *pos) |
size_t | stream_fwrite (void const *ptr, size_t size, size_t nmemb, t_stream *stream) |
int | stream_fflush (t_stream *stream) |
int | stream_fgetpos (t_stream *stream, fpos_t *pos) |
int | stream_fput (int c, t_stream *stream) |
size_t | stream_fread (void *ptr, size_t size, size_t nmemb, t_stream *stream) |
long | stream_ftell (t_stream *stream) |
void | stream_rewind (t_stream *stream) |
int | stream_fget (t_stream *stream) |
char * | stream_fgets (char *str, int size, t_stream *stream) |
int | stream_fputc (int c, t_stream *stream) |
int | stream_fseek (t_stream *stream, long offset, int whence) |
int | stream_fungetc (t_stream *stream, int c) |