fixed some warnings

This commit is contained in:
2025-11-10 01:15:18 +05:00
parent f889990728
commit 247d291da6
4 changed files with 179 additions and 203 deletions

View File

@@ -8,8 +8,9 @@
extern "C" {
#endif
#include "tlibc/std.h"
#include <time.h>
#include "tlibc/std.h"
#include "tlibc/string/str.h"
#define false 0
#define true 1
@@ -30,7 +31,7 @@ typedef struct {
} TomlErr;
typedef struct {
char* str;
char* s;
u64 len;
u64 _capacity;
} TomlString;
@@ -96,20 +97,20 @@ void* toml_malloc(u64 size);
void* toml_realloc(void* p, u64 size);
void toml_free(void* p);
char* toml_strdup(cstr str);
char* toml_strndup(cstr str, u64 n);
i32 toml_vasprintf(char** str, cstr format, va_list args);
i32 toml_asprintf(char** str, cstr format, ...);
char* toml_strdup(cstr s);
char* toml_strndup(cstr s, u64 n);
i32 toml_vasprintf(char** s, cstr format, va_list args);
i32 toml_asprintf(char** s, cstr format, ...) ATTRIBUTE_CHECK_FORMAT_PRINTF(2, 3);
const TomlErr* toml_err(void);
void toml_err_clear(void);
TomlString* toml_string_new(void);
TomlString* toml_string_from_str(cstr str);
TomlString* toml_string_from_nstr(cstr str, u64 len);
TomlString* toml_string_from_str(cstr s);
TomlString* toml_string_from_nstr(cstr s, u64 len);
void toml_string_append_char(TomlString* self, char ch);
void toml_string_append_str(TomlString* self, cstr str);
void toml_string_append_nstr(TomlString* self, cstr str, u64 len);
void toml_string_append_str(TomlString* self, cstr s);
void toml_string_append_nstr(TomlString* self, cstr s, u64 len);
TomlString* toml_string_clone(const TomlString* self);
void toml_string_free(TomlString* self);
i32 toml_string_equals(const TomlString* self, const TomlString* other);
@@ -148,12 +149,11 @@ TomlValue* toml_value_new_integer(i64 integer);
TomlValue* toml_value_new_float(f64 flt);
TomlValue* toml_value_new_datetime(void);
TomlValue* toml_value_new_boolean(i32 boolean);
TomlValue* toml_value_from_str(cstr str);
TomlValue* toml_value_from_nstr(cstr str, u64 len);
TomlValue* toml_value_from_str(cstr s);
void toml_value_free(TomlValue* self);
TomlTable* toml_load_str(cstr str);
TomlTable* toml_load_nstr(cstr str, u64 len);
TomlTable* toml_load_str(cstr s);
TomlTable* toml_load_nstr(cstr s, u64 len);
TomlTable* toml_load_file(FILE* file);
TomlTable* toml_load_filename(cstr filename);