annotate th_datastruct.h @ 457:85fa3d333556

Actually, revert the boolean changes .. meh.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 02 Jan 2018 23:09:29 +0200
parents 347bfd3e017e
children 7fca448847a3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
269
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 /*
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
2 * Various data structure functions
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3 * Programmed and designed by Matti 'ccr' Hamalainen
454
347bfd3e017e Bump copyright years.
Matti Hamalainen <ccr@tnsp.org>
parents: 453
diff changeset
4 * (C) Copyright 2002-2018 Tecnic Software productions (TNSP)
269
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
5 *
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
6 * Please read file 'COPYING' for information on license and distribution.
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
7 */
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8 #ifndef TH_DATASTRUCT_H
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
9 #define TH_DATASTRUCT_H
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
10
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
11 #include "th_util.h"
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
12
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
13
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
14 #ifdef HAVE_CONFIG_H
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
15 #include "config.h"
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
16 #endif
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
17
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
18
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
19 /* Doubly linked list handling
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
20 */
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
21 typedef struct _th_llist_t
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
22 {
350
19d4b3a1a37c Add few comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 269
diff changeset
23 void *data; // Pointer to data payload of this node
19d4b3a1a37c Add few comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 269
diff changeset
24 size_t num; // Number of nodes in the list, meaningful ONLY in the current root node of the list
269
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
25 struct _th_llist_t *prev, *next;
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
26 } th_llist_t;
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
27
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
28
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
29 th_llist_t * th_llist_new(void *data);
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
30 void th_llist_free(th_llist_t *list);
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
31 void th_llist_free_func(th_llist_t *list, void (*freefunc)(void *data));
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
32 void th_llist_free_func_node(th_llist_t *list, void (*freefunc)(th_llist_t *node));
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
33
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
34 void th_llist_append_node(th_llist_t **list, th_llist_t *node);
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
35 th_llist_t * th_llist_append(th_llist_t **list, void *data);
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
36 void th_llist_prepend_node(th_llist_t **list, th_llist_t *node);
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
37 th_llist_t * th_llist_prepend(th_llist_t **list, void *data);
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
38 void th_llist_delete(th_llist_t **list, const void *data);
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
39 void th_llist_delete_node(th_llist_t **list, th_llist_t *node);
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
40 void th_llist_delete_node_fast(th_llist_t **list, th_llist_t *node);
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
41
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
42 th_llist_t * th_llist_get_nth(th_llist_t *list, const size_t n);
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
43 size_t th_llist_length(const th_llist_t *list);
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
44 ssize_t th_llist_position(const th_llist_t *list, const th_llist_t *node);
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
45
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
46 void th_llist_foreach(th_llist_t *list, void (*func)(th_llist_t *node, void *userdata), void *data);
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
47 int th_llist_foreach_cond(th_llist_t *list, int (*func)(th_llist_t *node, void *userdata), void *data, th_llist_t **res);
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
48
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
49 th_llist_t * th_llist_find(th_llist_t *list, const void *data);
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
50 th_llist_t * th_llist_find_func(th_llist_t *list, const void *userdata, int (compare)(const void *, const void *));
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
51
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
52
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
53 /* Ringbuffer implementation
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
54 */
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
55 typedef struct
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
56 {
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
57 char **data;
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
58 int n, size;
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
59 void (*deallocator)(void *);
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
60 } th_ringbuf_t;
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
61
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
62 th_ringbuf_t * th_ringbuf_new(const size_t size, void (*mdeallocator)(void *));
457
85fa3d333556 Actually, revert the boolean changes .. meh.
Matti Hamalainen <ccr@tnsp.org>
parents: 454
diff changeset
63 BOOL th_ringbuf_grow(th_ringbuf_t *buf, const size_t n);
269
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
64 void th_ringbuf_free(th_ringbuf_t *buf);
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
65 void th_ringbuf_add(th_ringbuf_t *buf, void *ptr);
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
66
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
67
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
68 /* Growing buffers
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
69 */
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
70 #define TH_BUFGROW (32)
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
71
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
72
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
73 typedef struct
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
74 {
457
85fa3d333556 Actually, revert the boolean changes .. meh.
Matti Hamalainen <ccr@tnsp.org>
parents: 454
diff changeset
75 BOOL allocated;
269
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
76 uint8_t *data;
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
77 size_t size, len, mingrow;
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
78 } th_growbuf_t;
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
79
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
80
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
81 /* Simple growing string buffer
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
82 */
457
85fa3d333556 Actually, revert the boolean changes .. meh.
Matti Hamalainen <ccr@tnsp.org>
parents: 454
diff changeset
83 BOOL th_strbuf_grow(char **buf, size_t *bufsize, size_t *len, const size_t grow);
85fa3d333556 Actually, revert the boolean changes .. meh.
Matti Hamalainen <ccr@tnsp.org>
parents: 454
diff changeset
84 BOOL th_strbuf_putch(char **buf, size_t *bufsize, size_t *len, const char ch);
85fa3d333556 Actually, revert the boolean changes .. meh.
Matti Hamalainen <ccr@tnsp.org>
parents: 454
diff changeset
85 BOOL th_strbuf_putsn(char **buf, size_t *bufsize, size_t *len, const char *str, const size_t slen);
85fa3d333556 Actually, revert the boolean changes .. meh.
Matti Hamalainen <ccr@tnsp.org>
parents: 454
diff changeset
86 BOOL th_strbuf_puts(char **buf, size_t *bufsize, size_t *len, const char *str);
269
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
87
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
88
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
89 /* Growing byte buffer
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
90 */
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
91 void th_growbuf_init(th_growbuf_t *buf, const size_t mingrow);
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
92 void th_growbuf_clear(th_growbuf_t *buf);
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
93 th_growbuf_t *th_growbuf_new(const size_t mingrow);
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
94 void th_growbuf_free(th_growbuf_t *buf);
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
95
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
96
457
85fa3d333556 Actually, revert the boolean changes .. meh.
Matti Hamalainen <ccr@tnsp.org>
parents: 454
diff changeset
97 BOOL th_growbuf_grow(th_growbuf_t *buf, const size_t grow);
85fa3d333556 Actually, revert the boolean changes .. meh.
Matti Hamalainen <ccr@tnsp.org>
parents: 454
diff changeset
98 BOOL th_growbuf_puts(th_growbuf_t *buf, const char *str, BOOL eos);
85fa3d333556 Actually, revert the boolean changes .. meh.
Matti Hamalainen <ccr@tnsp.org>
parents: 454
diff changeset
99 BOOL th_growbuf_putch(th_growbuf_t *buf, const char ch);
85fa3d333556 Actually, revert the boolean changes .. meh.
Matti Hamalainen <ccr@tnsp.org>
parents: 454
diff changeset
100 BOOL th_growbuf_put_str(th_growbuf_t *buf, const void *s, const size_t len);
85fa3d333556 Actually, revert the boolean changes .. meh.
Matti Hamalainen <ccr@tnsp.org>
parents: 454
diff changeset
101 BOOL th_growbuf_put_u8(th_growbuf_t *buf, const uint8_t val);
85fa3d333556 Actually, revert the boolean changes .. meh.
Matti Hamalainen <ccr@tnsp.org>
parents: 454
diff changeset
102 BOOL th_growbuf_put_u16_be(th_growbuf_t *buf, const uint16_t val);
85fa3d333556 Actually, revert the boolean changes .. meh.
Matti Hamalainen <ccr@tnsp.org>
parents: 454
diff changeset
103 BOOL th_growbuf_put_u16_le(th_growbuf_t *buf, const uint16_t val);
85fa3d333556 Actually, revert the boolean changes .. meh.
Matti Hamalainen <ccr@tnsp.org>
parents: 454
diff changeset
104 BOOL th_growbuf_put_u32_be(th_growbuf_t *buf, const uint32_t val);
85fa3d333556 Actually, revert the boolean changes .. meh.
Matti Hamalainen <ccr@tnsp.org>
parents: 454
diff changeset
105 BOOL th_growbuf_put_u32_le(th_growbuf_t *buf, const uint32_t val);
269
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
106
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
107
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
108 #ifdef __cplusplus
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
109 }
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
110 #endif
fcbdc12f5866 Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
111 #endif // TH_DATASTRUCT_H