00001 #ifndef __TIDY_BUFFIO_H__
00002 #define __TIDY_BUFFIO_H__
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include "platform.h"
00021 #include "tidy.h"
00022
00023 #ifdef __cplusplus
00024 extern "C" {
00025 #endif
00026
00027
00028 TIDY_STRUCT
00029 struct _TidyBuffer
00030 {
00031 TidyAllocator* allocator;
00032 byte* bp;
00033 uint size;
00034 uint allocated;
00035 uint next;
00036 };
00037
00038
00039 TIDY_EXPORT void TIDY_CALL tidyBufInit( TidyBuffer* buf );
00040
00041
00042 TIDY_EXPORT void TIDY_CALL tidyBufInitWithAllocator( TidyBuffer* buf, TidyAllocator* allocator );
00043
00044
00045 TIDY_EXPORT void TIDY_CALL tidyBufAlloc( TidyBuffer* buf, uint allocSize );
00046
00047
00048
00049 TIDY_EXPORT void TIDY_CALL tidyBufAllocWithAllocator( TidyBuffer* buf,
00050 TidyAllocator* allocator,
00051 uint allocSize );
00052
00053
00054
00055
00056 TIDY_EXPORT void TIDY_CALL tidyBufCheckAlloc( TidyBuffer* buf,
00057 uint allocSize, uint chunkSize );
00058
00059
00060 TIDY_EXPORT void TIDY_CALL tidyBufFree( TidyBuffer* buf );
00061
00062
00063 TIDY_EXPORT void TIDY_CALL tidyBufClear( TidyBuffer* buf );
00064
00065
00066 TIDY_EXPORT void TIDY_CALL tidyBufAttach( TidyBuffer* buf, byte* bp, uint size );
00067
00068
00069 TIDY_EXPORT void TIDY_CALL tidyBufDetach( TidyBuffer* buf );
00070
00071
00072
00073 TIDY_EXPORT void TIDY_CALL tidyBufAppend( TidyBuffer* buf, void* vp, uint size );
00074
00075
00076 TIDY_EXPORT void TIDY_CALL tidyBufPutByte( TidyBuffer* buf, byte bv );
00077
00078
00079 TIDY_EXPORT int TIDY_CALL tidyBufPopByte( TidyBuffer* buf );
00080
00081
00082
00083 TIDY_EXPORT int TIDY_CALL tidyBufGetByte( TidyBuffer* buf );
00084
00085
00086 TIDY_EXPORT Bool TIDY_CALL tidyBufEndOfInput( TidyBuffer* buf );
00087
00088
00089 TIDY_EXPORT void TIDY_CALL tidyBufUngetByte( TidyBuffer* buf, byte bv );
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100 TIDY_EXPORT void TIDY_CALL tidyInitInputBuffer( TidyInputSource* inp, TidyBuffer* buf );
00101
00102
00103 TIDY_EXPORT void TIDY_CALL tidyInitOutputBuffer( TidyOutputSink* outp, TidyBuffer* buf );
00104
00105 #ifdef __cplusplus
00106 }
00107 #endif
00108 #endif
00109
00110
00111
00112
00113
00114
00115
00116
00117