mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-25 08:55:11 +01:00
Generate C function arguments.
Also rename "io.buf1" to just "buf1".
This commit is contained in:
1 parent
ee27dffa9e
commit
4c0a659a18
9 files changed
+106
-29
No files matched your search
@@ -29,4 +29,15 @@
|
||||
// TODO: don't hard code this in base-header.h.
|
||||
#define PUFFS_VERSION (0x00001)
|
||||
|
||||
// puffs_base_buf1 is a 1-dimensional buffer (a pointer and capacity) plus
|
||||
// additional indexes into that buffer.
|
||||
//
|
||||
// A value with all fields NULL or zero is a valid, empty buffer.
|
||||
typedef struct {
|
||||
uint8_t* ptr; // Pointer.
|
||||
size_t cap; // Capacity.
|
||||
size_t wi; // Write index. Invariant: wi <= cap.
|
||||
size_t ri; // Read index. Invariant: ri <= wi.
|
||||
} puffs_base_buf1;
|
||||
|
||||
#endif // PUFFS_BASE_HEADER_H
|
||||
Reference in new issue
Block a user