92 #include <stdlib.h> |
92 #include <stdlib.h> |
93 #include <stddef.h> |
93 #include <stddef.h> |
94 #include <stdbool.h> |
94 #include <stdbool.h> |
95 |
95 |
96 /** |
96 /** |
97 * Structure that contains a pointer to arbitrary data. |
|
98 */ |
|
99 struct cx_data_ptr_s { |
|
100 /** |
|
101 * A pointer to the data. |
|
102 */ |
|
103 unsigned char const *data; |
|
104 /** |
|
105 * The length of the data. |
|
106 */ |
|
107 size_t len; |
|
108 }; |
|
109 |
|
110 /** |
|
111 * Type for a data pointer with length information. |
|
112 */ |
|
113 typedef struct cx_data_ptr_s CxDataPtr; |
|
114 |
|
115 /** |
|
116 * Function pointer compatible with fwrite-like functions. |
97 * Function pointer compatible with fwrite-like functions. |
117 */ |
98 */ |
118 typedef size_t (*cx_write_func)( |
99 typedef size_t (*cx_write_func)( |
119 void const *, |
100 void const *, |
120 size_t, |
101 size_t, |