cake
/
libg1m
Archived
1
0
Fork 0

Headers, lol

This commit is contained in:
Thomas Touhey 2017-04-22 21:02:13 +02:00
parent 0db29bafb3
commit 000ec9984f
2 changed files with 9 additions and 9 deletions

View File

@ -141,7 +141,7 @@ extern int g1m_encode_mcsfile(g1m_mcsfile_t *g1m_arg_handle,
g1m_buffer_t *g1m_arg_buffer);
# define g1m_announce_mcsfile(handle, size) \
(g1m_encode_mcsfile(handle, (g1m_buffer_t[]){{ \
.cookie = (size_t*)size, .announce = g1m_announce_callback }}))
(void*)size, 0, NULL, NULL, g1m_announce_callback, NULL}}))
/* open CAS head for decoding, correct it for encoding */
extern int g1m_decode_casfile_head(g1m_mcshead_t *g1m_arg_head,

View File

@ -40,10 +40,10 @@
* In each case, the `cookie` is sent as the first argument to your callbacks.
* Here are their types: */
typedef int (*g1m_buffer_read_t)(void*, unsigned char*, size_t);
typedef int (*g1m_buffer_write_t)(void*, const unsigned char*, size_t);
typedef int (*g1m_buffer_announce_t)(void*, size_t);
typedef void (*g1m_buffer_unannounce_t)(void*);
typedef int g1m_buffer_read_t(void*, unsigned char*, size_t);
typedef int g1m_buffer_write_t(void*, const unsigned char*, size_t);
typedef int g1m_buffer_announce_t(void*, size_t);
typedef void g1m_buffer_unannounce_t(void*);
/* ... and the structure of a buffer: */
@ -52,10 +52,10 @@ typedef struct {
size_t g1m_buffer_offset;
/* callbacks */
g1m_buffer_read_t g1m_buffer_read;
g1m_buffer_write_t g1m_buffer_write;
g1m_buffer_announce_t g1m_buffer_announce;
g1m_buffer_unannounce_t g1m_buffer_unannounce;
g1m_buffer_read_t *g1m_buffer_read;
g1m_buffer_write_t *g1m_buffer_write;
g1m_buffer_announce_t *g1m_buffer_announce;
g1m_buffer_unannounce_t *g1m_buffer_unannounce;
} g1m_buffer_t;
/* ************************************************************************** */
/* File buffer definition */