comparison include/datatypes.h @ 12:0cc2555db371

*: make our string functions not stupid strncat() made everything slow! new addition internally: an EDL_header structure to make things not stupid. if we were using C++ it wouldn't really be necessary, but alas :)
author Paper <paper@paper.us.eu.org>
date Wed, 27 Mar 2024 13:38:30 -0400
parents 0c98b46eaf73
children 41b74137e201
comparison
equal deleted inserted replaced
11:a0bd92c4c0e8 12:0cc2555db371
1 #ifndef __edl__internal__datatypes_h 1 #ifndef __edl__internal__datatypes_h
2 #define __edl__internal__datatypes_h 2 #define __edl__internal__datatypes_h
3 3
4 #include <stddef.h> 4 #include <stddef.h>
5 #include "edl.h" /* EDL_media_type_t */ 5 #include "edl.h" /* EDL_media_type_t */
6 #include "str.h"
6 7
7 size_t EDL_internal_parse_int(const char* input, size_t offset, size_t length, int* int_return); 8 size_t EDL_internal_parse_int(const char* input, size_t offset, size_t length, int* int_return);
8 size_t EDL_internal_parse_double(const char* input, size_t offset, size_t length, double* double_return); 9 size_t EDL_internal_parse_double(const char* input, size_t offset, size_t length, double* double_return);
9 size_t EDL_internal_parse_bool(const char* input, size_t offset, size_t length, bool* bool_return); 10 size_t EDL_internal_parse_bool(const char* input, size_t offset, size_t length, bool* bool_return);
10 size_t EDL_internal_parse_media_type(const char* input, size_t offset, size_t length, EDL_media_type_t* media_return); 11 size_t EDL_internal_parse_media_type(const char* input, size_t offset, size_t length, EDL_media_type_t* media_return);
11 size_t EDL_internal_parse_string(const char* input, size_t offset, size_t length, char** string_return); 12 size_t EDL_internal_parse_string(const char* input, size_t offset, size_t length, char** string_return);
12 13
13 char* EDL_internal_integer_to_string(int value); 14 int EDL_internal_append_integer_to_string(EDL_internal_string* str, int value);
14 char* EDL_internal_double_to_string(double value); 15 int EDL_internal_append_double_to_string(EDL_internal_string* str, double value);
15 char* EDL_internal_bool_to_string(bool value); 16 int EDL_internal_append_bool_to_string(EDL_internal_string* str, bool value);
16 char* EDL_internal_media_type_to_string(EDL_media_type_t value); 17 int EDL_internal_append_media_type_to_string(EDL_internal_string* str, EDL_media_type_t value);
17 18
18 #endif /* __edl__internal__datatypes_h */ 19 #endif /* __edl__internal__datatypes_h */