stream.h File Reference

#include <libc.h>

Go to the source code of this file.

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_streamstream_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)


Define Documentation

#define __STREAM_STREAM_H__   1
 

#define BUFFER_SIZE   512
 

#define EOF   (-1)
 

#define MODE_APPEND   4
 

#define MODE_CREATE   8
 

#define MODE_EOF   32
 

#define MODE_RDWR   3
 

#define MODE_READ   1
 

#define MODE_TRUNC   16
 

#define MODE_WRITE   2
 

#define TEST_APPEND  )     (0 != (MODE_APPEND & (f)->mode))
 

#define TEST_EOF  )     (0 != (MODE_EOF & (f)->mode))
 

#define TEST_READ  )     (0 != (MODE_READ & stream->mode))
 

#define TEST_READING  )     ((f)->offset < (f)->size)
 

#define TEST_WRITE  )     (0 != (MODE_WRITE & stream->mode))
 

#define TEST_WRITING  )     (~0 == (f)->offset)
 


Typedef Documentation

typedef struct s_stream t_stream
 


Function Documentation

int stream_fclose t_stream stream  ) 
 

int stream_fflush t_stream stream  ) 
 

int stream_fget t_stream stream  ) 
 

int stream_fgetc t_stream stream  ) 
 

int stream_fgetpos t_stream stream,
fpos_t pos
 

char* stream_fgets char *  str,
int  size,
t_stream stream
 

t_stream* stream_fopen char const *  path,
char const *  mode
 

int stream_fput int  c,
t_stream stream
 

int stream_fputc int  c,
t_stream stream
 

int stream_fputs char *  str,
t_stream stream
 

size_t stream_fread void *  ptr,
size_t  size,
size_t  nmemb,
t_stream stream
 

int stream_fseek t_stream stream,
long  offset,
int  whence
 

int stream_fsetpos t_stream stream,
off_t pos
 

long stream_ftell t_stream stream  ) 
 

int stream_fungetc t_stream stream,
int  c
 

size_t stream_fwrite void const *  ptr,
size_t  size,
size_t  nmemb,
t_stream stream
 

void stream_rewind t_stream stream  ) 
 


Generated on Wed May 24 23:05:58 2006 for LSE/OS by  doxygen 1.4.6