gwenhywfar
5.2.0
|
Go to the source code of this file.
Data Structures | |
struct | GWEN_FAST_BUFFER |
Macros | |
#define | GWEN_FAST_BUFFER_FLAGS_DOSMODE 0x00000001 |
#define | GWEN_FASTBUFFER_COPYBYTES(fb1, fb2, var, len) |
#define | GWEN_FASTBUFFER_COPYFORCED(fb1, fb2, var, p, len) |
#define | GWEN_FASTBUFFER_FLUSH(fb, var) |
#define | GWEN_FASTBUFFER_PEEKBYTE(fb, var) |
#define | GWEN_FASTBUFFER_READBYTE(fb, var) |
#define | GWEN_FASTBUFFER_READBYTES(fb, var, p, len) |
#define | GWEN_FASTBUFFER_READFORCED(fb, var, p, len) |
#define | GWEN_FASTBUFFER_READLINE(fb, var, p, len) |
#define | GWEN_FASTBUFFER_READLINEFORCED(fb, var, p, len) |
#define | GWEN_FASTBUFFER_WRITEBYTE(fb, var, chr) |
#define | GWEN_FASTBUFFER_WRITEBYTES(fb, var, p, len) |
#define | GWEN_FASTBUFFER_WRITEFORCED(fb, var, p, len) |
#define | GWEN_FASTBUFFER_WRITELINE(fb, var, p) |
Functions | |
GWENHYWFAR_API void | GWEN_FastBuffer_AddFlags (GWEN_FAST_BUFFER *fb, uint32_t fl) |
GWENHYWFAR_API void | GWEN_FastBuffer_free (GWEN_FAST_BUFFER *fb) |
GWENHYWFAR_API uint32_t | GWEN_FastBuffer_GetBytesRead (const GWEN_FAST_BUFFER *fb) |
GWENHYWFAR_API uint32_t | GWEN_FastBuffer_GetBytesWritten (const GWEN_FAST_BUFFER *fb) |
GWENHYWFAR_API uint32_t | GWEN_FastBuffer_GetFlags (const GWEN_FAST_BUFFER *fb) |
GWENHYWFAR_API GWEN_FAST_BUFFER * | GWEN_FastBuffer_new (uint32_t bsize, GWEN_SYNCIO *io) |
GWENHYWFAR_API int | GWEN_FastBuffer_ReadLine (GWEN_FAST_BUFFER *fb, uint8_t *p, int len) |
GWENHYWFAR_API int | GWEN_FastBuffer_ReadLineToBuffer (GWEN_FAST_BUFFER *fb, GWEN_BUFFER *buf) |
GWENHYWFAR_API void | GWEN_FastBuffer_SetFlags (GWEN_FAST_BUFFER *fb, uint32_t fl) |
GWENHYWFAR_API void | GWEN_FastBuffer_SubFlags (GWEN_FAST_BUFFER *fb, uint32_t fl) |
#define GWEN_FAST_BUFFER_FLAGS_DOSMODE 0x00000001 |
Definition at line 18 of file fastbuffer.h.
#define GWEN_FASTBUFFER_COPYBYTES | ( | fb1, | |
fb2, | |||
var, | |||
len | |||
) |
Copy a number of bytes from one buffer to another one.
fb1 | source fast buffer |
fb2 | destination fast buffer |
var | variable to receive the result (<0: error code, number of bytes read otherwise) |
len | number of bytes to copy |
Definition at line 436 of file fastbuffer.h.
#define GWEN_FASTBUFFER_COPYFORCED | ( | fb1, | |
fb2, | |||
var, | |||
p, | |||
len | |||
) |
Copy a number of bytes to the buffer and make sure that all bytes are copied.
fb1 | source fast buffer |
fb2 | destination fast buffer |
var | variable to receive the result (<0: error code, 0 on success) |
p | pointer to the location to write the bytes from |
len | number of bytes to copy |
Definition at line 480 of file fastbuffer.h.
#define GWEN_FASTBUFFER_FLUSH | ( | fb, | |
var | |||
) |
Flushes the write buffer (i.e. write all remaining bytes from the buffer to the io layer with the flag GWEN_IO_REQUEST_FLAGS_FLUSH set).
Definition at line 161 of file fastbuffer.h.
#define GWEN_FASTBUFFER_PEEKBYTE | ( | fb, | |
var | |||
) |
This macro peeks at the read buffer and returns the next available byte (if any). Consecutive peeks will always return the same byte. Also, the next GWEN_FASTBUFFER_READBYTE will return the same byte as well.
Definition at line 73 of file fastbuffer.h.
#define GWEN_FASTBUFFER_READBYTE | ( | fb, | |
var | |||
) |
Returns the next byte from the buffer (if any). That byte will be placed into "var". In case of an error var will contain an error code instead.
Definition at line 102 of file fastbuffer.h.
#define GWEN_FASTBUFFER_READBYTES | ( | fb, | |
var, | |||
p, | |||
len | |||
) |
Reads a number of bytes from the buffer and stores it at the given memory location.
fb | fast buffer |
var | variable to receive the result (<0: error code, number of bytes read otherwise) |
p | pointer to the location to read the bytes to |
len | number of bytes to read |
Definition at line 183 of file fastbuffer.h.
#define GWEN_FASTBUFFER_READFORCED | ( | fb, | |
var, | |||
p, | |||
len | |||
) |
Definition at line 300 of file fastbuffer.h.
#define GWEN_FASTBUFFER_READLINE | ( | fb, | |
var, | |||
p, | |||
len | |||
) |
Definition at line 215 of file fastbuffer.h.
#define GWEN_FASTBUFFER_READLINEFORCED | ( | fb, | |
var, | |||
p, | |||
len | |||
) |
Definition at line 263 of file fastbuffer.h.
#define GWEN_FASTBUFFER_WRITEBYTE | ( | fb, | |
var, | |||
chr | |||
) |
Writes a byte into the buffer (flushing it if necessary) and returns the result of this operation in "var".
Definition at line 133 of file fastbuffer.h.
#define GWEN_FASTBUFFER_WRITEBYTES | ( | fb, | |
var, | |||
p, | |||
len | |||
) |
Write a number of bytes to the buffer and stores it at the given memory location.
fb | fast buffer |
var | variable to receive the result (<0: error code, number of bytes read otherwise) |
p | pointer to the location to write the bytes from |
len | number of bytes to write |
Definition at line 335 of file fastbuffer.h.
#define GWEN_FASTBUFFER_WRITEFORCED | ( | fb, | |
var, | |||
p, | |||
len | |||
) |
Write a number of bytes to the buffer and make sure that all bytes are written.
fb | fast buffer |
var | variable to receive the result (<0: error code, 0 on success) |
p | pointer to the location to write the bytes from |
len | number of bytes to write |
Definition at line 376 of file fastbuffer.h.
#define GWEN_FASTBUFFER_WRITELINE | ( | fb, | |
var, | |||
p | |||
) |
Definition at line 406 of file fastbuffer.h.
GWENHYWFAR_API void GWEN_FastBuffer_AddFlags | ( | GWEN_FAST_BUFFER * | fb, |
uint32_t | fl | ||
) |
GWENHYWFAR_API void GWEN_FastBuffer_free | ( | GWEN_FAST_BUFFER * | fb | ) |
GWENHYWFAR_API uint32_t GWEN_FastBuffer_GetBytesRead | ( | const GWEN_FAST_BUFFER * | fb | ) |
GWENHYWFAR_API uint32_t GWEN_FastBuffer_GetBytesWritten | ( | const GWEN_FAST_BUFFER * | fb | ) |
GWENHYWFAR_API uint32_t GWEN_FastBuffer_GetFlags | ( | const GWEN_FAST_BUFFER * | fb | ) |
GWENHYWFAR_API GWEN_FAST_BUFFER* GWEN_FastBuffer_new | ( | uint32_t | bsize, |
GWEN_SYNCIO * | io | ||
) |
GWENHYWFAR_API int GWEN_FastBuffer_ReadLine | ( | GWEN_FAST_BUFFER * | fb, |
uint8_t * | p, | ||
int | len | ||
) |
GWENHYWFAR_API int GWEN_FastBuffer_ReadLineToBuffer | ( | GWEN_FAST_BUFFER * | fb, |
GWEN_BUFFER * | buf | ||
) |
GWENHYWFAR_API void GWEN_FastBuffer_SetFlags | ( | GWEN_FAST_BUFFER * | fb, |
uint32_t | fl | ||
) |
GWENHYWFAR_API void GWEN_FastBuffer_SubFlags | ( | GWEN_FAST_BUFFER * | fb, |
uint32_t | fl | ||
) |