X-Git-Url: https://git.distorted.org.uk/~mdw/disorder/blobdiff_plain/feda7bfaefd9e5fb705d6893f26428a3109e7226..b0116b5c04b64e9352d1c63f0f667a1d9a5d5c11:/lib/queue.c diff --git a/lib/queue.c b/lib/queue.c index 0f39b23..e39ca5f 100644 --- a/lib/queue.c +++ b/lib/queue.c @@ -194,13 +194,23 @@ static const char *marshall_origin(const struct queue_entry *q, size_t offset) { #define F(n, h) { #n, offsetof(struct queue_entry, n), marshall_##h, unmarshall_##h, free_##h } -static const struct field { +/** @brief A field in a @ref queue_entry */ +static const struct queue_field { + /** @brief Field name */ const char *name; + + /** @brief Offset of value in @ref queue_entry structure */ size_t offset; + + /** @brief Marshaling function */ const char *(*marshall)(const struct queue_entry *q, size_t offset); + + /** @brief Unmarshaling function */ int (*unmarshall)(char *data, struct queue_entry *q, size_t offset, void (*error_handler)(const char *, void *), void *u); + + /** @brief Destructor */ void (*free)(struct queue_entry *q, size_t offset); } fields[] = { /* Keep this table sorted. */