Mercurial > hg > th-libs
annotate th_datastruct.h @ 484:58b744131b86
Rename cross-mingw Makefile properly.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 19 Feb 2019 09:49:41 +0200 |
parents | e4ce60239d16 |
children | 3a852e9f70a6 |
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 |
481 | 4 * (C) Copyright 2002-2019 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 |
459
7fca448847a3
Oops, fix C++ guards in headers.
Matti Hamalainen <ccr@tnsp.org>
parents:
457
diff
changeset
|
13 #ifdef __cplusplus |
7fca448847a3
Oops, fix C++ guards in headers.
Matti Hamalainen <ccr@tnsp.org>
parents:
457
diff
changeset
|
14 extern "C" { |
269
fcbdc12f5866
Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
15 #endif |
fcbdc12f5866
Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
16 |
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 /* 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
|
19 */ |
fcbdc12f5866
Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
20 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
|
21 { |
350 | 22 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
|
23 struct _th_llist_t *prev, *next; |
459
7fca448847a3
Oops, fix C++ guards in headers.
Matti Hamalainen <ccr@tnsp.org>
parents:
457
diff
changeset
|
24 void *data; // Pointer to data payload of this node |
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 } 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
|
26 |
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 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
|
29 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
|
30 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
|
31 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
|
32 |
fcbdc12f5866
Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
33 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
|
34 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
|
35 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
|
36 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
|
37 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
|
38 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
|
39 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
|
40 |
fcbdc12f5866
Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
41 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
|
42 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
|
43 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
|
44 |
fcbdc12f5866
Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
45 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
|
46 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
|
47 |
fcbdc12f5866
Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
48 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
|
49 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
|
50 |
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 /* 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
|
53 */ |
fcbdc12f5866
Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
54 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
|
55 { |
fcbdc12f5866
Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
56 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
|
57 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
|
58 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
|
59 } 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
|
60 |
fcbdc12f5866
Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
61 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
|
62 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
|
63 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
|
64 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
|
65 |
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 /* 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
|
68 */ |
fcbdc12f5866
Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
69 #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
|
70 |
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 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
|
73 { |
457
85fa3d333556
Actually, revert the boolean changes .. meh.
Matti Hamalainen <ccr@tnsp.org>
parents:
454
diff
changeset
|
74 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
|
75 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
|
76 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
|
77 } 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
|
78 |
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 /* 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
|
81 */ |
457
85fa3d333556
Actually, revert the boolean changes .. meh.
Matti Hamalainen <ccr@tnsp.org>
parents:
454
diff
changeset
|
82 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
|
83 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
|
84 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
|
85 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
|
86 |
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 /* 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
|
89 */ |
fcbdc12f5866
Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
90 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
|
91 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
|
92 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
|
93 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
|
94 |
fcbdc12f5866
Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
95 |
457
85fa3d333556
Actually, revert the boolean changes .. meh.
Matti Hamalainen <ccr@tnsp.org>
parents:
454
diff
changeset
|
96 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
|
97 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
|
98 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
|
99 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
|
100 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
|
101 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
|
102 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
|
103 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
|
104 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
|
105 |
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 #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
|
108 } |
fcbdc12f5866
Split data structures (linked lists, growbufs, ringbufs, etc.) code into th_datastruct.[ch] module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
109 #endif |
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 // TH_DATASTRUCT_H |