fix(core)!: enforce strict C89 compliance
BREAKING CHANGE: Public API now uses unsigned char instead of uint8_t - Remove stdint.h dependency (C99 feature, not C89, I am a fucking idiot) - Replace uint8_t with unsigned char throughout codebase - Affects stk_init() return type and internal functions - Corrects unintended C99 dependency, restoring intended C89 compliance
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
#include "stk.h"
|
||||
#include "platform.h"
|
||||
#include "stk_log.h"
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -16,7 +15,7 @@ extern char (*stk_module_ids)[STK_MOD_ID_BUFFER];
|
||||
|
||||
extern size_t module_count;
|
||||
|
||||
uint8_t stk_initialized = 0;
|
||||
unsigned char stk_initialized = 0;
|
||||
|
||||
static char stk_mod_dir[STK_PATH_MAX_OS] = "mods";
|
||||
static char stk_tmp_name[STK_MOD_ID_BUFFER] = ".tmp";
|
||||
@@ -30,18 +29,18 @@ void platform_directory_watch_stop(void *handle);
|
||||
stk_module_event_t *platform_directory_watch_check(
|
||||
void *handle, char (**file_list)[STK_PATH_MAX], size_t *out_count,
|
||||
char (*loaded_module_ids)[STK_MOD_ID_BUFFER], const size_t loaded_count);
|
||||
uint8_t platform_mkdir(const char *path);
|
||||
uint8_t platform_copy_file(const char *from, const char *to);
|
||||
uint8_t platform_remove_dir(const char *path);
|
||||
unsigned char platform_mkdir(const char *path);
|
||||
unsigned char platform_copy_file(const char *from, const char *to);
|
||||
unsigned char platform_remove_dir(const char *path);
|
||||
|
||||
void extract_module_id(const char *path, char *out_id);
|
||||
int is_mod_loaded(const char *module_id);
|
||||
|
||||
size_t stk_module_count(void);
|
||||
uint8_t stk_module_load(const char *path, int index);
|
||||
uint8_t stk_module_load_init(const char *path, int index);
|
||||
uint8_t stk_module_init_memory(size_t capacity);
|
||||
uint8_t stk_module_realloc_memory(size_t new_capacity);
|
||||
unsigned char stk_module_load(const char *path, int index);
|
||||
unsigned char stk_module_load_init(const char *path, int index);
|
||||
unsigned char stk_module_init_memory(size_t capacity);
|
||||
unsigned char stk_module_realloc_memory(size_t new_capacity);
|
||||
void stk_module_unload(size_t index);
|
||||
void stk_module_unload_all(void);
|
||||
|
||||
@@ -70,7 +69,7 @@ static const char *stk_error_string(int error_code)
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t stk_init(void)
|
||||
unsigned char stk_init(void)
|
||||
{
|
||||
char (*files)[STK_PATH_MAX] = NULL;
|
||||
size_t file_count, i, successful_loads = 0;
|
||||
|
||||
Reference in New Issue
Block a user