HTML Tidy
0.1
|
Go to the source code of this file.
Data Structures | |
struct | _TidyBuffer |
Functions | |
void TIDY_CALL | tidyBufInit (TidyBuffer *buf) |
void TIDY_CALL | tidyBufInitWithAllocator (TidyBuffer *buf, TidyAllocator *allocator) |
void TIDY_CALL | tidyBufAlloc (TidyBuffer *buf, uint allocSize) |
void TIDY_CALL | tidyBufAllocWithAllocator (TidyBuffer *buf, TidyAllocator *allocator, uint allocSize) |
void TIDY_CALL | tidyBufCheckAlloc (TidyBuffer *buf, uint allocSize, uint chunkSize) |
void TIDY_CALL | tidyBufFree (TidyBuffer *buf) |
void TIDY_CALL | tidyBufClear (TidyBuffer *buf) |
void TIDY_CALL | tidyBufAttach (TidyBuffer *buf, byte *bp, uint size) |
void TIDY_CALL | tidyBufDetach (TidyBuffer *buf) |
void TIDY_CALL | tidyBufAppend (TidyBuffer *buf, void *vp, uint size) |
void TIDY_CALL | tidyBufPutByte (TidyBuffer *buf, byte bv) |
int TIDY_CALL | tidyBufPopByte (TidyBuffer *buf) |
int TIDY_CALL | tidyBufGetByte (TidyBuffer *buf) |
Bool TIDY_CALL | tidyBufEndOfInput (TidyBuffer *buf) |
void TIDY_CALL | tidyBufUngetByte (TidyBuffer *buf, byte bv) |
void TIDY_CALL | tidyInitInputBuffer (TidyInputSource *inp, TidyBuffer *buf) |
void TIDY_CALL | tidyInitOutputBuffer (TidyOutputSink *outp, TidyBuffer *buf) |
(c) 1998-2007 (W3C) MIT, ERCIM, Keio University See tidy.h for the copyright notice.
CVS Info :
Requires buffer to automatically grow as bytes are added. Must keep track of current read and write points.
void TIDY_CALL tidyBufInit | ( | TidyBuffer * | buf | ) |
Initialize data structure using the default allocator
References tidyBufInit(), and tidyBufInitWithAllocator().
Referenced by tidyBufInit().
void TIDY_CALL tidyBufInitWithAllocator | ( | TidyBuffer * | buf, |
TidyAllocator * | allocator | ||
) |
Initialize data structure using the given custom allocator
References _TidyBuffer::allocator, and tidyBufInitWithAllocator().
Referenced by tidyBufAllocWithAllocator(), tidyBufDetach(), tidyBufFree(), tidyBufInit(), and tidyBufInitWithAllocator().
void TIDY_CALL tidyBufAlloc | ( | TidyBuffer * | buf, |
uint | allocSize | ||
) |
Free current buffer, allocate given amount, reset input pointer, use the default allocator
References tidyBufAlloc(), and tidyBufAllocWithAllocator().
Referenced by tidyBufAlloc().
void TIDY_CALL tidyBufAllocWithAllocator | ( | TidyBuffer * | buf, |
TidyAllocator * | allocator, | ||
uint | allocSize | ||
) |
Free current buffer, allocate given amount, reset input pointer, use the given custom allocator
References _TidyBuffer::next, tidyBufAllocWithAllocator(), tidyBufCheckAlloc(), and tidyBufInitWithAllocator().
Referenced by tidyBufAlloc(), and tidyBufAllocWithAllocator().
void TIDY_CALL tidyBufCheckAlloc | ( | TidyBuffer * | buf, |
uint | allocSize, | ||
uint | chunkSize | ||
) |
Expand buffer to given size. Chunk size is minimum growth. Pass 0 for default of 256 bytes.
References _TidyBuffer::allocated, _TidyBuffer::allocator, _TidyBuffer::bp, and tidyBufCheckAlloc().
Referenced by tidyBufAllocWithAllocator(), tidyBufAppend(), tidyBufCheckAlloc(), and tidyBufPutByte().
void TIDY_CALL tidyBufFree | ( | TidyBuffer * | buf | ) |
Free current contents and zero out
References _TidyBuffer::allocator, _TidyBuffer::bp, tidyBufFree(), and tidyBufInitWithAllocator().
Referenced by freeFileSource(), and tidyBufFree().
void TIDY_CALL tidyBufClear | ( | TidyBuffer * | buf | ) |
Set buffer bytes to 0
References _TidyBuffer::allocated, _TidyBuffer::bp, _TidyBuffer::next, _TidyBuffer::size, and tidyBufClear().
Referenced by tidyBufClear().
void TIDY_CALL tidyBufAttach | ( | TidyBuffer * | buf, |
byte * | bp, | ||
uint | size | ||
) |
Attach to existing buffer
References _TidyBuffer::allocated, _TidyBuffer::allocator, _TidyBuffer::bp, _TidyBuffer::next, _TidyBuffer::size, and tidyBufAttach().
Referenced by tidyBufAttach().
void TIDY_CALL tidyBufDetach | ( | TidyBuffer * | buf | ) |
Detach from buffer. Caller must free.
References _TidyBuffer::allocator, tidyBufDetach(), and tidyBufInitWithAllocator().
Referenced by tidyBufDetach().
void TIDY_CALL tidyBufAppend | ( | TidyBuffer * | buf, |
void * | vp, | ||
uint | size | ||
) |
Append bytes to buffer. Expand if necessary.
References _TidyBuffer::bp, _TidyBuffer::size, tidyBufAppend(), and tidyBufCheckAlloc().
Referenced by tidyBufAppend().
void TIDY_CALL tidyBufPutByte | ( | TidyBuffer * | buf, |
byte | bv | ||
) |
Append one byte to buffer. Expand if necessary.
References _TidyBuffer::bp, _TidyBuffer::size, tidyBufCheckAlloc(), and tidyBufPutByte().
Referenced by tidyBufPutByte().
int TIDY_CALL tidyBufPopByte | ( | TidyBuffer * | buf | ) |
Get byte from end of buffer
References _TidyBuffer::bp, _TidyBuffer::size, and tidyBufPopByte().
Referenced by tidyBufPopByte().
int TIDY_CALL tidyBufGetByte | ( | TidyBuffer * | buf | ) |
Get byte from front of buffer. Increment input offset.
References _TidyBuffer::bp, _TidyBuffer::next, tidyBufEndOfInput(), and tidyBufGetByte().
Referenced by tidyBufGetByte().
Bool TIDY_CALL tidyBufEndOfInput | ( | TidyBuffer * | buf | ) |
At end of buffer?
References _TidyBuffer::next, _TidyBuffer::size, and tidyBufEndOfInput().
Referenced by tidyBufEndOfInput(), and tidyBufGetByte().
void TIDY_CALL tidyBufUngetByte | ( | TidyBuffer * | buf, |
byte | bv | ||
) |
Put a byte back into the buffer. Decrement input offset.
References _TidyBuffer::bp, _TidyBuffer::next, and tidyBufUngetByte().
Referenced by tidyBufUngetByte().
void TIDY_CALL tidyInitInputBuffer | ( | TidyInputSource * | inp, |
TidyBuffer * | buf | ||
) |
Initialize a buffer input source
References tidyInitInputBuffer().
Referenced by tidyInitInputBuffer().
void TIDY_CALL tidyInitOutputBuffer | ( | TidyOutputSink * | outp, |
TidyBuffer * | buf | ||
) |
Initialize a buffer output sink
References tidyInitOutputBuffer().
Referenced by tidyInitOutputBuffer().