1 #ifndef __TIDY_BUFFIO_H__
2 #define __TIDY_BUFFIO_H__
14 #include "tidyplatform.h"
52 uint allocSize, uint chunkSize );
void TIDY_CALL tidyBufAlloc(TidyBuffer *buf, uint allocSize)
Free current buffer, allocate given amount, reset input pointer, use the default allocator.
uint allocated
bytes allocated
int TIDY_CALL tidyBufPopByte(TidyBuffer *buf)
Get byte from end of buffer.
void TIDY_CALL tidyBufAttach(TidyBuffer *buf, byte *bp, uint size)
Attach to existing buffer.
void TIDY_CALL tidyBufClear(TidyBuffer *buf)
Set buffer bytes to 0.
void TIDY_CALL tidyInitInputBuffer(TidyInputSource *inp, TidyBuffer *buf)
Initialize a buffer input source.
int TIDY_CALL tidyBufGetByte(TidyBuffer *buf)
Get byte from front of buffer.
void TIDY_CALL tidyBufUngetByte(TidyBuffer *buf, byte bv)
Put a byte back into the buffer.
void TIDY_CALL tidyBufPutByte(TidyBuffer *buf, byte bv)
Append one byte to buffer.
Bool TIDY_CALL tidyBufEndOfInput(TidyBuffer *buf)
At end of buffer?
Defines HTML Tidy API implemented by tidy library.
void TIDY_CALL tidyInitOutputBuffer(TidyOutputSink *outp, TidyBuffer *buf)
Initialize a buffer output sink.
void TIDY_CALL tidyBufDetach(TidyBuffer *buf)
Detach from buffer.
uint next
Offset of current input position.
byte * bp
Pointer to bytes.
void TIDY_CALL tidyBufAppend(TidyBuffer *buf, void *vp, uint size)
Append bytes to buffer.
uint size
bytes currently in use
void TIDY_CALL tidyBufFree(TidyBuffer *buf)
Free current contents and zero out.
TidyAllocator * allocator
Memory allocator.
void TIDY_CALL tidyBufInit(TidyBuffer *buf)
Initialize data structure using the default allocator.
TIDY_STRUCT struct _TidyInputSource TidyInputSource
TidyInputSource - Delivers raw bytes of input.
void TIDY_CALL tidyBufAllocWithAllocator(TidyBuffer *buf, TidyAllocator *allocator, uint allocSize)
Free current buffer, allocate given amount, reset input pointer, use the given custom allocator...
void TIDY_CALL tidyBufInitWithAllocator(TidyBuffer *buf, TidyAllocator *allocator)
Initialize data structure using the given custom allocator.
void TIDY_CALL tidyBufCheckAlloc(TidyBuffer *buf, uint allocSize, uint chunkSize)
Expand buffer to given size.
TidyBuffer - A chunk of memory.
TIDY_STRUCT struct _TidyOutputSink TidyOutputSink
TidyOutputSink - accepts raw bytes of output.