Go to the documentation of this file.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
00046 TIDY_EXPORT void TIDY_CALL tidyBufAlloc( TidyBuffer* buf, uint allocSize );
00047
00048
00049
00050 TIDY_EXPORT void TIDY_CALL tidyBufAllocWithAllocator( TidyBuffer* buf,
00051 TidyAllocator* allocator,
00052 uint allocSize );
00053
00054
00055
00056
00057 TIDY_EXPORT void TIDY_CALL tidyBufCheckAlloc( TidyBuffer* buf,
00058 uint allocSize, uint chunkSize );
00059
00060
00061 TIDY_EXPORT void TIDY_CALL tidyBufFree( TidyBuffer* buf );
00062
00063
00064 TIDY_EXPORT void TIDY_CALL tidyBufClear( TidyBuffer* buf );
00065
00066
00067 TIDY_EXPORT void TIDY_CALL tidyBufAttach( TidyBuffer* buf, byte* bp, uint size );
00068
00069
00070 TIDY_EXPORT void TIDY_CALL tidyBufDetach( TidyBuffer* buf );
00071
00072
00073
00074 TIDY_EXPORT void TIDY_CALL tidyBufAppend( TidyBuffer* buf, void* vp, uint size );
00075
00076
00077 TIDY_EXPORT void TIDY_CALL tidyBufPutByte( TidyBuffer* buf, byte bv );
00078
00079
00080 TIDY_EXPORT int TIDY_CALL tidyBufPopByte( TidyBuffer* buf );
00081
00082
00083
00084 TIDY_EXPORT int TIDY_CALL tidyBufGetByte( TidyBuffer* buf );
00085
00086
00087 TIDY_EXPORT Bool TIDY_CALL tidyBufEndOfInput( TidyBuffer* buf );
00088
00089
00090 TIDY_EXPORT void TIDY_CALL tidyBufUngetByte( TidyBuffer* buf, byte bv );
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101 TIDY_EXPORT void TIDY_CALL tidyInitInputBuffer( TidyInputSource* inp, TidyBuffer* buf );
00102
00103
00104 TIDY_EXPORT void TIDY_CALL tidyInitOutputBuffer( TidyOutputSink* outp, TidyBuffer* buf );
00105
00106 #ifdef __cplusplus
00107 }
00108 #endif
00109 #endif
00110
00111
00112
00113
00114
00115
00116
00117
00118