void TIDY_CALL tidyBufAllocWithAllocator( TidyBuffer* buf, TidyAllocator *allocator, uint allocSize ) { tidyBufInitWithAllocator( buf, allocator ); tidyBufCheckAlloc( buf, allocSize, 0 ); buf->next = 0; }
void TIDY_CALL tidyBufAppend( TidyBuffer* buf, void* vp, uint size ) { assert( buf != NULL ); if ( vp != NULL && size > 0 ) { tidyBufCheckAlloc( buf, buf->size + size, 0 ); memcpy( buf->bp + buf->size, vp, size ); buf->size += size; } }
void TIDY_CALL tidyBufPutByte( TidyBuffer* buf, byte bv ) { assert( buf != NULL ); tidyBufCheckAlloc( buf, buf->size + 1, 0 ); buf->bp[ buf->size++ ] = bv; }
void TIDY_CALL tidyBufAlloc( TidyBuffer* buf, uint allocSize ) { tidyBufInit( buf ); tidyBufCheckAlloc( buf, allocSize, 0 ); buf->next = 0; }
void tidyBufPutByte( TidyBuffer* buf, byte bv ) { assert( buf != null ); tidyBufCheckAlloc( buf, buf->size + 1, 0 ); buf->bp[ buf->size++ ] = bv; }