Mercurial > libedl
annotate include/str.h @ 7:fee08fa622e1
automake: don't expose private strings API
also use size_t rather than int for array sizes for... obvious reasons
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Mon, 15 Jan 2024 06:42:30 -0500 |
parents | c2408abb258a |
children | 0c98b46eaf73 |
rev | line source |
---|---|
4
c2408abb258a
*: add dumping to string, rename EDL_file to EDL
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
1 #ifndef __edl__internal__str_h |
c2408abb258a
*: add dumping to string, rename EDL_file to EDL
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
2 #define __edl__internal__str_h |
c2408abb258a
*: add dumping to string, rename EDL_file to EDL
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
3 |
c2408abb258a
*: add dumping to string, rename EDL_file to EDL
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
4 #include <stddef.h> |
c2408abb258a
*: add dumping to string, rename EDL_file to EDL
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
5 |
c2408abb258a
*: add dumping to string, rename EDL_file to EDL
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
6 typedef struct { |
c2408abb258a
*: add dumping to string, rename EDL_file to EDL
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
7 size_t size; |
c2408abb258a
*: add dumping to string, rename EDL_file to EDL
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
8 size_t capacity; |
c2408abb258a
*: add dumping to string, rename EDL_file to EDL
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
9 char* data; |
c2408abb258a
*: add dumping to string, rename EDL_file to EDL
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
10 } EDL_internal_string; |
c2408abb258a
*: add dumping to string, rename EDL_file to EDL
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
11 |
c2408abb258a
*: add dumping to string, rename EDL_file to EDL
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
12 int EDL_internal_string_init(EDL_internal_string* str); |
c2408abb258a
*: add dumping to string, rename EDL_file to EDL
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
13 int EDL_internal_string_allocate(EDL_internal_string* str, size_t new_capacity); |
c2408abb258a
*: add dumping to string, rename EDL_file to EDL
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
14 int EDL_internal_string_append(EDL_internal_string* str, const char* data, const size_t length); |
c2408abb258a
*: add dumping to string, rename EDL_file to EDL
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
15 void EDL_internal_string_free(EDL_internal_string* str); |
c2408abb258a
*: add dumping to string, rename EDL_file to EDL
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
16 |
c2408abb258a
*: add dumping to string, rename EDL_file to EDL
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
17 #endif // __edl__internal__str_h |