Add struct useful_buf... for code perferring "_" to camelCase.
UsefulBuf style is camelCase with typedefs. Some code style
is "_" and no typedefs. This allows UsefulBuf to be used in
that style. A file renaming all the functions is necessary to
complete that. It is not provided here.
diff --git a/inc/UsefulBuf.h b/inc/UsefulBuf.h
index f248584..fa17b6c 100644
--- a/inc/UsefulBuf.h
+++ b/inc/UsefulBuf.h
@@ -146,7 +146,7 @@
Eeyore's balloon fits beautifully, "it goes in and out like anything".
*/
-typedef struct {
+typedef struct useful_buf_c {
const void *ptr;
size_t len;
} UsefulBufC;
@@ -157,7 +157,7 @@
that is to be filled in. The len is the amount of memory,
not the length of the valid data in the buffer.
*/
-typedef struct {
+typedef struct useful_buf {
void *ptr;
size_t len;
} UsefulBuf;
@@ -639,7 +639,7 @@
can go on the stack or be a C99 function parameter.
*/
-typedef struct {
+typedef struct useful_out_buf {
UsefulBuf UB; // Memory that is being output to
size_t data_len; // length of the data
uint16_t magic; // Used to detect corruption and lack of initialization
@@ -1199,7 +1199,7 @@
#define UIB_MAGIC (0xB00F)
-typedef struct {
+typedef struct useful_input_buf {
// Private data structure
UsefulBufC UB; // Data being parsed
size_t cursor; // Current offset in data being parse