# buffer.h File Reference

`#include <gwenhywfar/gwenhywfarapi.h>`
`#include <gwenhywfar/types.h>`
`#include <gwenhywfar/bufferedio.h>`
`#include <stdio.h>`
`#include <string.h>`

Go to the source code of this file.

## Defines

#define | GWEN_BUFFER_MAX_BOOKMARKS 4
#define | GWEN_BUFFER_MODE_ABORT_ON_MEMFULL 0x0002
#define | GWEN_BUFFER_MODE_DEFAULT
#define | GWEN_BUFFER_MODE_DYNAMIC 0x0001
#define | GWEN_BUFFER_MODE_USE_BIO 0x0004

## Typedefs

typedef GWEN_BUFFER | GWEN_BUFFER

## Functions

GWENHYWFAR_API void | GWEN_Buffer_AddMode (GWEN_BUFFER *bf, GWEN_TYPE_UINT32 mode)
GWENHYWFAR_API int | GWEN_Buffer_AdjustUsedBytes (GWEN_BUFFER *bf)
GWENHYWFAR_API int | GWEN_Buffer_AllocRoom (GWEN_BUFFER *bf, GWEN_TYPE_UINT32 size)
GWENHYWFAR_API int | GWEN_Buffer_AppendBuffer (GWEN_BUFFER *bf, GWEN_BUFFER *sf)
GWENHYWFAR_API int | GWEN_Buffer_AppendByte (GWEN_BUFFER *bf, char c)
GWENHYWFAR_API int | GWEN_Buffer_AppendBytes (GWEN_BUFFER *bf, const char *buffer, GWEN_TYPE_UINT32 size)
GWENHYWFAR_API int | GWEN_Buffer_AppendString (GWEN_BUFFER *bf, const char *buffer)
GWENHYWFAR_API GWEN_TYPE_UINT32 | GWEN_Buffer_BytesLeft (GWEN_BUFFER *bf)
GWENHYWFAR_API int | GWEN_Buffer_Crop (GWEN_BUFFER *bf, GWEN_TYPE_UINT32 pos, GWEN_TYPE_UINT32 l)
GWENHYWFAR_API int | GWEN_Buffer_DecrementPos (GWEN_BUFFER *bf, GWEN_TYPE_UINT32 i)
GWENHYWFAR_API void | GWEN_Buffer_Dump (GWEN_BUFFER *bf, FILE *f, unsigned int insert)
GWENHYWFAR_API GWEN_BUFFER * | GWEN_Buffer_dup (GWEN_BUFFER *bf)
GWENHYWFAR_API int | GWEN_Buffer_FillLeftWithBytes (GWEN_BUFFER *bf, unsigned char c, GWEN_TYPE_UINT32 size)
GWENHYWFAR_API int | GWEN_Buffer_FillWithBytes (GWEN_BUFFER *bf, unsigned char c, GWEN_TYPE_UINT32 size)
GWENHYWFAR_API void | GWEN_Buffer_free (GWEN_BUFFER *bf)
GWENHYWFAR_API GWEN_TYPE_UINT32 | GWEN_Buffer_GetBookmark (GWEN_BUFFER *bf, unsigned int idx)
GWENHYWFAR_API GWEN_TYPE_UINT32 | GWEN_Buffer_GetBytesLeft (GWEN_BUFFER *bf)
GWENHYWFAR_API GWEN_TYPE_UINT32 | GWEN_Buffer_GetHardLimit (GWEN_BUFFER *bf)
GWENHYWFAR_API GWEN_TYPE_UINT32 | GWEN_Buffer_GetMaxUnsegmentedWrite (GWEN_BUFFER *bf)
GWENHYWFAR_API GWEN_TYPE_UINT32 | GWEN_Buffer_GetMode (GWEN_BUFFER *bf)
GWENHYWFAR_API GWEN_TYPE_UINT32 | GWEN_Buffer_GetPos (GWEN_BUFFER *bf)
GWENHYWFAR_API char * | GWEN_Buffer_GetPosPointer (GWEN_BUFFER *bf)
GWENHYWFAR_API GWEN_TYPE_UINT32 | GWEN_Buffer_GetSize (GWEN_BUFFER *bf)
GWENHYWFAR_API char * | GWEN_Buffer_GetStart (GWEN_BUFFER *bf)
GWENHYWFAR_API GWEN_TYPE_UINT32 | GWEN_Buffer_GetStep (GWEN_BUFFER *bf)
GWENHYWFAR_API GWEN_TYPE_UINT32 | GWEN_Buffer_GetUsedBytes (GWEN_BUFFER *bf)
GWENHYWFAR_API int | GWEN_Buffer_IncrementPos (GWEN_BUFFER *bf, GWEN_TYPE_UINT32 i)
GWENHYWFAR_API int | GWEN_Buffer_InsertBuffer (GWEN_BUFFER *bf, GWEN_BUFFER *sf)
GWENHYWFAR_API int | GWEN_Buffer_InsertByte (GWEN_BUFFER *bf, char c)
GWENHYWFAR_API int | GWEN_Buffer_InsertBytes (GWEN_BUFFER *bf, const char *buffer, GWEN_TYPE_UINT32 size)
GWENHYWFAR_API int | GWEN_Buffer_InsertRoom (GWEN_BUFFER *bf, GWEN_TYPE_UINT32 size)
GWENHYWFAR_API int | GWEN_Buffer_InsertString (GWEN_BUFFER *bf, const char *buffer)
GWENHYWFAR_API GWEN_BUFFER * | GWEN_Buffer_new (char *buffer, GWEN_TYPE_UINT32 size, GWEN_TYPE_UINT32 used, int take)
GWENHYWFAR_API int | GWEN_Buffer_PeekByte (GWEN_BUFFER *bf)
GWENHYWFAR_API int | GWEN_Buffer_ReadByte (GWEN_BUFFER *bf)
GWENHYWFAR_API int | GWEN_Buffer_ReadBytes (GWEN_BUFFER *bf, char *buffer, GWEN_TYPE_UINT32 *size)
GWENHYWFAR_API int | GWEN_Buffer_ReserveBytes (GWEN_BUFFER *bf, GWEN_TYPE_UINT32 res)
GWENHYWFAR_API void | GWEN_Buffer_Reset (GWEN_BUFFER *bf)
GWENHYWFAR_API void | GWEN_Buffer_Rewind (GWEN_BUFFER *bf)
GWENHYWFAR_API GWEN_TYPE_UINT32 | GWEN_Buffer_RoomLeft (GWEN_BUFFER *bf)
GWENHYWFAR_API void | GWEN_Buffer_SetBookmark (GWEN_BUFFER *bf, unsigned int idx, GWEN_TYPE_UINT32 v)
GWENHYWFAR_API void | GWEN_Buffer_SetHardLimit (GWEN_BUFFER *bf, GWEN_TYPE_UINT32 l)
GWENHYWFAR_API void | GWEN_Buffer_SetMode (GWEN_BUFFER *bf, GWEN_TYPE_UINT32 mode)
GWENHYWFAR_API int | GWEN_Buffer_SetPos (GWEN_BUFFER *bf, GWEN_TYPE_UINT32 i)
GWENHYWFAR_API void | GWEN_Buffer_SetSourceBIO (GWEN_BUFFER *bf, GWEN_BUFFEREDIO *bio, int take)
GWENHYWFAR_API void | GWEN_Buffer_SetStep (GWEN_BUFFER *bf, GWEN_TYPE_UINT32 step)
GWENHYWFAR_API int | GWEN_Buffer_SetUsedBytes (GWEN_BUFFER *bf, GWEN_TYPE_UINT32 i)
GWENHYWFAR_API void | GWEN_Buffer_SubMode (GWEN_BUFFER *bf, GWEN_TYPE_UINT32 mode)

## Typedef Documentation

typedef struct GWEN_BUFFER GWEN_BUFFER