Use abstraction instead of using SDL dependencies.master
@@ -149,11 +149,11 @@ add_executable( | |||||
src/packages/game/IZ_app_config.h | src/packages/game/IZ_app_config.h | ||||
src/packages/game/asset/IZ_asset.c | src/packages/game/asset/IZ_asset.c | ||||
src/packages/game/asset/IZ_asset.h | src/packages/game/asset/IZ_asset.h | ||||
src/packages/string/IZ_string.c | |||||
src/packages/string/IZ_string.h | |||||
src/packages/stdinc/IZ_string.c | |||||
src/packages/stdinc/IZ_string.h | |||||
src/packages/io/IZ_io.c | src/packages/io/IZ_io.c | ||||
src/packages/io/IZ_io.h | src/packages/io/IZ_io.h | ||||
src/packages/log/IZ_log.c src/packages/log/IZ_log.h src/packages/timer/IZ_timer.c src/packages/timer/IZ_timer.h src/packages/compat/IZ_windows.h) | |||||
src/packages/log/IZ_log.c src/packages/log/IZ_log.h src/packages/timer/IZ_timer.c src/packages/timer/IZ_timer.h src/packages/compat/IZ_windows.h src/packages/stdinc/IZ_stdlib.c src/packages/stdinc/IZ_stdlib.h) | |||||
if (WIN32) | if (WIN32) | ||||
target_link_libraries( | target_link_libraries( | ||||
@@ -284,8 +284,8 @@ add_executable( | |||||
src/packages/server/db/IZ_repo.c | src/packages/server/db/IZ_repo.c | ||||
src/packages/server/db/IZ_repo.h | src/packages/server/db/IZ_repo.h | ||||
src/packages/server/IZ_subsystem.h | src/packages/server/IZ_subsystem.h | ||||
src/packages/string/IZ_string.c | |||||
src/packages/string/IZ_string.h | |||||
src/packages/stdinc/IZ_string.c | |||||
src/packages/stdinc/IZ_string.h | |||||
src/packages/io/IZ_io.c | src/packages/io/IZ_io.c | ||||
src/packages/io/IZ_io.h | src/packages/io/IZ_io.h | ||||
src/packages/log/IZ_log.c | src/packages/log/IZ_log.c | ||||
@@ -1,5 +1,5 @@ | |||||
- [X] Improve logging (remove SDL/lws dependency) | - [X] Improve logging (remove SDL/lws dependency) | ||||
- [ ] Unify memset/memcpy/free/malloc functions (remove SDL/lws dependency) | |||||
- [X] Unify memset/memcpy/free/malloc functions (remove SDL/lws dependency) | |||||
- [ ] Fix gamepad mapping | - [ ] Fix gamepad mapping | ||||
- [ ] Provide default mapping | - [ ] Provide default mapping | ||||
- [ ] Allow customization of button mappings | - [ ] Allow customization of button mappings | ||||
@@ -1,7 +1,7 @@ | |||||
#include <stdio.h> | #include <stdio.h> | ||||
#include "minIni.h" | #include "minIni.h" | ||||
#include "../common/IZ_common.h" | #include "../common/IZ_common.h" | ||||
#include "../string/IZ_string.h" | |||||
#include "../stdinc/IZ_string.h" | |||||
#ifdef IZ_WIN64 | #ifdef IZ_WIN64 | ||||
#include <windows.h> | #include <windows.h> | ||||
@@ -6,7 +6,7 @@ | |||||
#include <minIni.h> | #include <minIni.h> | ||||
#include "../common/IZ_common.h" | #include "../common/IZ_common.h" | ||||
#include "../log/IZ_log.h" | #include "../log/IZ_log.h" | ||||
#include "../string/IZ_string.h" | |||||
#include "../stdinc/IZ_string.h" | |||||
typedef enum { | typedef enum { | ||||
IZ_CONFIG_TYPE_VOID, | IZ_CONFIG_TYPE_VOID, | ||||
@@ -11,7 +11,7 @@ | |||||
#include "IZ_app_video.h" | #include "IZ_app_video.h" | ||||
#include "../log/IZ_log.h" | #include "../log/IZ_log.h" | ||||
#include "../log/IZ_intercept.h" | #include "../log/IZ_intercept.h" | ||||
#include "../string/IZ_string.h" | |||||
#include "../stdinc/IZ_string.h" | |||||
#include "../timer/IZ_timer.h" | #include "../timer/IZ_timer.h" | ||||
typedef enum { | typedef enum { | ||||
@@ -4,6 +4,6 @@ | |||||
#include <SDL_filesystem.h> | #include <SDL_filesystem.h> | ||||
#include "IZ_subsystem.h" | #include "IZ_subsystem.h" | ||||
#include "../config/IZ_config.h" | #include "../config/IZ_config.h" | ||||
#include "../string/IZ_string.h" | |||||
#include "../stdinc/IZ_string.h" | |||||
#endif | #endif |
@@ -23,7 +23,7 @@ void IZ_AppHandleOutboundNetworking(struct IZ_App* app) { | |||||
for (player_index = 0; player_index < IZ_PLAYERS; player_index += 1) { | for (player_index = 0; player_index < IZ_PLAYERS; player_index += 1) { | ||||
if (net_state->action[player_index] != input_state->action[player_index]) { | if (net_state->action[player_index] != input_state->action[player_index]) { | ||||
u8 player_actions_count = 1; | u8 player_actions_count = 1; | ||||
IZ_AppActionSyncMessage* msg = SDL_malloc( | |||||
IZ_AppActionSyncMessage* msg = IZ_malloc( | |||||
sizeof(IZ_AppMessageHeader) | sizeof(IZ_AppMessageHeader) | ||||
+ sizeof(u8) | + sizeof(u8) | ||||
+ (sizeof(IZ_AppPlayerActionSyncMessage) * player_actions_count) | + (sizeof(IZ_AppPlayerActionSyncMessage) * player_actions_count) | ||||
@@ -39,7 +39,7 @@ void IZ_AppHandleOutboundNetworking(struct IZ_App* app) { | |||||
msg, | msg, | ||||
sizeof(*msg) | sizeof(*msg) | ||||
); | ); | ||||
SDL_free(msg); | |||||
IZ_free(msg); | |||||
} | } | ||||
net_state->action[player_index] = input_state->action[player_index]; | net_state->action[player_index] = input_state->action[player_index]; | ||||
} | } | ||||
@@ -2,6 +2,7 @@ | |||||
#define IZ_APP_NET_H | #define IZ_APP_NET_H | ||||
#include "IZ_subsystem.h" | #include "IZ_subsystem.h" | ||||
#include "../stdinc/IZ_stdlib.h" | |||||
typedef enum { | typedef enum { | ||||
IZ_MESSAGE_KIND_ACTION_SYNC = 0, | IZ_MESSAGE_KIND_ACTION_SYNC = 0, | ||||
@@ -32,7 +32,7 @@ void IZ_ListTeardown(IZ_List* list) { | |||||
* @return Pointer to the newly created node. | * @return Pointer to the newly created node. | ||||
*/ | */ | ||||
IZ_ListNode** IZ_ListAppendNode(IZ_List* list, void* node_value) { | IZ_ListNode** IZ_ListAppendNode(IZ_List* list, void* node_value) { | ||||
IZ_ListNode* new_node = SDL_malloc(sizeof(IZ_ListNode)); | |||||
IZ_ListNode* new_node = IZ_malloc(sizeof(IZ_ListNode)); | |||||
new_node->value = node_value; | new_node->value = node_value; | ||||
new_node->next = NULL; | new_node->next = NULL; | ||||
list->length += 1; | list->length += 1; | ||||
@@ -83,7 +83,7 @@ void IZ_ListDeleteFirstNode(IZ_List* list, IZ_ListFindPredicate filter) { | |||||
// if there is only one item in the list, root, gets set to NULL | // if there is only one item in the list, root, gets set to NULL | ||||
} | } | ||||
SDL_free(*list->iterator); | |||||
IZ_free(*list->iterator); | |||||
list->iterator = NULL; | list->iterator = NULL; | ||||
if (list->length > 0) { | if (list->length > 0) { | ||||
// avoid underflow | // avoid underflow | ||||
@@ -2,7 +2,7 @@ | |||||
#define IZ_LIST_H | #define IZ_LIST_H | ||||
#include "../../common/IZ_common.h" | #include "../../common/IZ_common.h" | ||||
#include "SDL_stdinc.h" | |||||
#include "../../stdinc/IZ_stdlib.h" | |||||
/** | /** | ||||
* A node in a linked list. | * A node in a linked list. | ||||
@@ -200,7 +200,7 @@ void IZ_JoystickInitializeConfigItems(IZ_ConfigItem config_items[]) { | |||||
char* main_section_name; | char* main_section_name; | ||||
char* control_mapping_section_name; | char* control_mapping_section_name; | ||||
for (player_index = 0; player_index < IZ_PLAYERS; player_index += 1) { | for (player_index = 0; player_index < IZ_PLAYERS; player_index += 1) { | ||||
main_section_name = SDL_malloc(sizeof(char) * 64); | |||||
main_section_name = IZ_calloc(64, sizeof(char)); | |||||
sprintf(main_section_name, "Joystick.%d", player_index); | sprintf(main_section_name, "Joystick.%d", player_index); | ||||
u8 base_index = (player_index * (IZ_CONTROLS - 4 + 2)); | u8 base_index = (player_index * (IZ_CONTROLS - 4 + 2)); | ||||
config_items[base_index] = (IZ_ConfigItem) { | config_items[base_index] = (IZ_ConfigItem) { | ||||
@@ -238,7 +238,7 @@ void IZ_JoystickInitializeConfigItems(IZ_ConfigItem config_items[]) { | |||||
// todo add game controller GUID for determining mappings | // todo add game controller GUID for determining mappings | ||||
control_mapping_section_name = SDL_malloc(sizeof(char) * 64); | |||||
control_mapping_section_name = IZ_calloc(64, sizeof(char)); | |||||
sprintf(control_mapping_section_name, "Joystick.%d.ControlMapping", player_index); | sprintf(control_mapping_section_name, "Joystick.%d.ControlMapping", player_index); | ||||
for (control_index = 4; control_index < IZ_CONTROLS; control_index += 1) { | for (control_index = 4; control_index < IZ_CONTROLS; control_index += 1) { | ||||
config_items[base_index + 3 + (control_index - 4)] = (IZ_ConfigItem) { | config_items[base_index + 3 + (control_index - 4)] = (IZ_ConfigItem) { | ||||
@@ -1,13 +1,13 @@ | |||||
#ifndef IZ_JOYSTICK_H | #ifndef IZ_JOYSTICK_H | ||||
#define IZ_JOYSTICK_H | #define IZ_JOYSTICK_H | ||||
#include <SDL_stdinc.h> | |||||
#include <SDL_joystick.h> | #include <SDL_joystick.h> | ||||
#include <SDL_gamecontroller.h> | #include <SDL_gamecontroller.h> | ||||
#include <SDL_events.h> | #include <SDL_events.h> | ||||
#include <minIni.h> | #include <minIni.h> | ||||
#include "../../config/IZ_config.h" | #include "../../config/IZ_config.h" | ||||
#include "../../string/IZ_string.h" | |||||
#include "../../stdinc/IZ_string.h" | |||||
#include "../../stdinc/IZ_stdlib.h" | |||||
#include "IZ_action.h" | #include "IZ_action.h" | ||||
typedef u8 IZ_PadButton; | typedef u8 IZ_PadButton; | ||||
@@ -54,7 +54,7 @@ void IZ_KeyboardInitializeConfigItems(IZ_ConfigItem config_items[]) { | |||||
u8 control_index; | u8 control_index; | ||||
char* control_mapping_section_name; | char* control_mapping_section_name; | ||||
for (player_index = 0; player_index < IZ_PLAYERS; player_index += 1) { | for (player_index = 0; player_index < IZ_PLAYERS; player_index += 1) { | ||||
control_mapping_section_name = SDL_malloc(sizeof(char) * 64); | |||||
control_mapping_section_name = IZ_calloc(64, sizeof(char)); | |||||
sprintf(control_mapping_section_name, "Keyboard.%d.ControlMapping", player_index); | sprintf(control_mapping_section_name, "Keyboard.%d.ControlMapping", player_index); | ||||
for (control_index = 0; control_index < IZ_CONTROLS; control_index += 1) { | for (control_index = 0; control_index < IZ_CONTROLS; control_index += 1) { | ||||
config_items[player_index * IZ_CONTROLS + control_index] = (IZ_ConfigItem) { | config_items[player_index * IZ_CONTROLS + control_index] = (IZ_ConfigItem) { | ||||
@@ -1,12 +1,12 @@ | |||||
#ifndef IZ_KEYBOARD_H | #ifndef IZ_KEYBOARD_H | ||||
#define IZ_KEYBOARD_H | #define IZ_KEYBOARD_H | ||||
#include <SDL_stdinc.h> | |||||
#include <SDL_keyboard.h> | #include <SDL_keyboard.h> | ||||
#include <SDL_events.h> | #include <SDL_events.h> | ||||
#include <minIni.h> | #include <minIni.h> | ||||
#include "../../config/IZ_config.h" | #include "../../config/IZ_config.h" | ||||
#include "../../string/IZ_string.h" | |||||
#include "../../stdinc/IZ_string.h" | |||||
#include "../../stdinc/IZ_stdlib.h" | |||||
#include "IZ_action.h" | #include "IZ_action.h" | ||||
typedef struct { | typedef struct { | ||||
@@ -76,7 +76,7 @@ void IZ_MIDIInputInitializeConfigItems(IZ_ConfigItem config_items[]) { | |||||
char* main_section_name; | char* main_section_name; | ||||
char* control_mapping_section_name; | char* control_mapping_section_name; | ||||
for (player_index = 0; player_index < IZ_PLAYERS; player_index += 1) { | for (player_index = 0; player_index < IZ_PLAYERS; player_index += 1) { | ||||
main_section_name = SDL_malloc(sizeof(char) * 64); | |||||
main_section_name = IZ_calloc(64, sizeof(char)); | |||||
sprintf(main_section_name, "MIDIInput.%d", player_index); | sprintf(main_section_name, "MIDIInput.%d", player_index); | ||||
u16 base_index = (player_index * (IZ_CONTROLS + 2)); | u16 base_index = (player_index * (IZ_CONTROLS + 2)); | ||||
@@ -110,7 +110,7 @@ void IZ_MIDIInputInitializeConfigItems(IZ_ConfigItem config_items[]) { | |||||
NULL, | NULL, | ||||
}; | }; | ||||
control_mapping_section_name = SDL_malloc(sizeof(char) * 64); | |||||
control_mapping_section_name = IZ_calloc(64, sizeof(char)); | |||||
sprintf(control_mapping_section_name, "MIDIInput.%d.ControlMapping", player_index); | sprintf(control_mapping_section_name, "MIDIInput.%d.ControlMapping", player_index); | ||||
for (control_index = 0; control_index < IZ_CONTROLS; control_index += 1) { | for (control_index = 0; control_index < IZ_CONTROLS; control_index += 1) { | ||||
config_items[base_index + 2 + control_index] = (IZ_ConfigItem) { | config_items[base_index + 2 + control_index] = (IZ_ConfigItem) { | ||||
@@ -1,7 +1,6 @@ | |||||
#ifndef IZ_MIDI_H | #ifndef IZ_MIDI_H | ||||
#define IZ_MIDI_H | #define IZ_MIDI_H | ||||
#include <SDL_stdinc.h> | |||||
#include <string.h> | #include <string.h> | ||||
#ifndef PORTMIDI_INCLUDED | #ifndef PORTMIDI_INCLUDED | ||||
@@ -12,7 +11,8 @@ | |||||
#include <minIni.h> | #include <minIni.h> | ||||
#include "../../config/IZ_config.h" | #include "../../config/IZ_config.h" | ||||
#include "../../midi/IZ_midi.h" | #include "../../midi/IZ_midi.h" | ||||
#include "../../string/IZ_string.h" | |||||
#include "../../stdinc/IZ_string.h" | |||||
#include "../../stdinc/IZ_stdlib.h" | |||||
#include "IZ_action.h" | #include "IZ_action.h" | ||||
#define MIDI_EVENT_BUFFER_SIZE 1024 | #define MIDI_EVENT_BUFFER_SIZE 1024 | ||||
@@ -3,7 +3,7 @@ | |||||
#include "../../../__mocks__/SDL_stdinc.mock.h" | #include "../../../__mocks__/SDL_stdinc.mock.h" | ||||
#include "../../../__mocks__/minIni.mock.h" | #include "../../../__mocks__/minIni.mock.h" | ||||
#include "../../../__mocks__/portmidi.mock.h" | #include "../../../__mocks__/portmidi.mock.h" | ||||
//#include "../../string/IZ_string.h" | |||||
//#include "../../stdinc/IZ_string.h" | |||||
#include "IZ_keyboard.h" | #include "IZ_keyboard.h" | ||||
#include "IZ_joystick.h" | #include "IZ_joystick.h" | ||||
#include "IZ_midi.h" | #include "IZ_midi.h" | ||||
@@ -3,7 +3,7 @@ | |||||
void IZ_PoolInitialize(IZ_Pool* pool, size_t size) { | void IZ_PoolInitialize(IZ_Pool* pool, size_t size) { | ||||
IZ_LogInfo(IZ_LOG_CATEGORY_GLOBAL, "Setting up memory pools..."); | IZ_LogInfo(IZ_LOG_CATEGORY_GLOBAL, "Setting up memory pools..."); | ||||
IZ_ListInitialize(&pool->items); | IZ_ListInitialize(&pool->items); | ||||
pool->memory = SDL_malloc(size); | |||||
pool->memory = IZ_malloc(size); | |||||
IZ_memset(pool->memory, 0, size); | IZ_memset(pool->memory, 0, size); | ||||
pool->allocated_memory = 0; | pool->allocated_memory = 0; | ||||
pool->next_address = 0; | pool->next_address = 0; | ||||
@@ -48,6 +48,6 @@ void IZ_PoolDeallocate(IZ_PoolItem* item) { | |||||
void IZ_PoolTeardown(IZ_Pool* pool) { | void IZ_PoolTeardown(IZ_Pool* pool) { | ||||
IZ_LogInfo(IZ_LOG_CATEGORY_GLOBAL, "Shutting down memory pools..."); | IZ_LogInfo(IZ_LOG_CATEGORY_GLOBAL, "Shutting down memory pools..."); | ||||
SDL_free(pool->memory); | |||||
IZ_free(pool->memory); | |||||
pool->memory = NULL; | pool->memory = NULL; | ||||
} | } |
@@ -1,10 +1,10 @@ | |||||
#ifndef IZ_POOL_H | #ifndef IZ_POOL_H | ||||
#define IZ_POOL_H | #define IZ_POOL_H | ||||
#include <SDL_stdinc.h> | |||||
#include "../../common/IZ_common.h" | #include "../../common/IZ_common.h" | ||||
#include "../../log/IZ_log.h" | #include "../../log/IZ_log.h" | ||||
#include "../../string/IZ_string.h" | |||||
#include "../../stdinc/IZ_string.h" | |||||
#include "../../stdinc/IZ_stdlib.h" | |||||
#include "../data/IZ_list.h" | #include "../data/IZ_list.h" | ||||
#define POOL_MAX_SIZE (1llu << 26) // 64MB | #define POOL_MAX_SIZE (1llu << 26) // 64MB | ||||
@@ -10,7 +10,7 @@ | |||||
#include "../../../config/IZ_config.h" | #include "../../../config/IZ_config.h" | ||||
#include "../../../common/IZ_common.h" | #include "../../../common/IZ_common.h" | ||||
#include "../../../io/IZ_io.h" | #include "../../../io/IZ_io.h" | ||||
#include "../../../string/IZ_string.h" | |||||
#include "../../../stdinc/IZ_string.h" | |||||
#include "../../geometry/IZ_vector2d.h" | #include "../../geometry/IZ_vector2d.h" | ||||
#include "../../input/IZ_input.h" | #include "../../input/IZ_input.h" | ||||
@@ -4,7 +4,7 @@ | |||||
#include <ctype.h> | #include <ctype.h> | ||||
#include "libwebsockets.h" | #include "libwebsockets.h" | ||||
#include "../common/IZ_common.h" | #include "../common/IZ_common.h" | ||||
#include "../string/IZ_string.h" | |||||
#include "../stdinc/IZ_string.h" | |||||
#include "IZ_log.h" | #include "IZ_log.h" | ||||
void IZ_LogInterceptWSMessages(i32); | void IZ_LogInterceptWSMessages(i32); | ||||
@@ -3,7 +3,7 @@ | |||||
#include <stdio.h> | #include <stdio.h> | ||||
#include <string.h> | #include <string.h> | ||||
#include "../string/IZ_string.h" | |||||
#include "../stdinc/IZ_string.h" | |||||
typedef unsigned char IZ_MIDINote; | typedef unsigned char IZ_MIDINote; | ||||
@@ -6,7 +6,7 @@ | |||||
#include "../config/IZ_config.h" | #include "../config/IZ_config.h" | ||||
#include "../common/IZ_common.h" | #include "../common/IZ_common.h" | ||||
#include "../game/input/IZ_action.h" | #include "../game/input/IZ_action.h" | ||||
#include "../string/IZ_string.h" | |||||
#include "../stdinc/IZ_string.h" | |||||
#include "svc/IZ_wsclient.h" | #include "svc/IZ_wsclient.h" | ||||
typedef enum { | typedef enum { | ||||
@@ -4,7 +4,7 @@ | |||||
#include <minIni.h> | #include <minIni.h> | ||||
#include "../config/IZ_config.h" | #include "../config/IZ_config.h" | ||||
#include "../common/IZ_common.h" | #include "../common/IZ_common.h" | ||||
#include "../string/IZ_string.h" | |||||
#include "../stdinc/IZ_string.h" | |||||
#include "core/IZ_websocket.h" | #include "core/IZ_websocket.h" | ||||
#include "svc/IZ_wsserver.h" | #include "svc/IZ_wsserver.h" | ||||
@@ -3,7 +3,7 @@ | |||||
#include "libwebsockets.h" | #include "libwebsockets.h" | ||||
#include "../../common/IZ_common.h" | #include "../../common/IZ_common.h" | ||||
#include "../../string/IZ_string.h" | |||||
#include "../../stdinc/IZ_string.h" | |||||
#define NETWORK_PROTOCOL "izanagi-networking" | #define NETWORK_PROTOCOL "izanagi-networking" | ||||
#define RING_COUNT 32 | #define RING_COUNT 32 | ||||
@@ -2,7 +2,7 @@ | |||||
#define IZ_WSCLIENT_H | #define IZ_WSCLIENT_H | ||||
#include "../../common/IZ_common.h" | #include "../../common/IZ_common.h" | ||||
#include "../../string/IZ_string.h" | |||||
#include "../../stdinc/IZ_string.h" | |||||
#include "../core/IZ_websocket.h" | #include "../core/IZ_websocket.h" | ||||
typedef struct { | typedef struct { | ||||
@@ -5,7 +5,7 @@ | |||||
#include <string.h> | #include <string.h> | ||||
#include "../../common/IZ_common.h" | #include "../../common/IZ_common.h" | ||||
#include "../../io/IZ_io.h" | #include "../../io/IZ_io.h" | ||||
#include "../../string/IZ_string.h" | |||||
#include "../../stdinc/IZ_string.h" | |||||
#include "../core/IZ_websocket.h" | #include "../core/IZ_websocket.h" | ||||
#ifndef S_ISDIR | #ifndef S_ISDIR | ||||
@@ -6,7 +6,7 @@ | |||||
#include "../common/IZ_common.h" | #include "../common/IZ_common.h" | ||||
#include "../net/IZ_net_server.h" | #include "../net/IZ_net_server.h" | ||||
#include "../log/IZ_intercept.h" | #include "../log/IZ_intercept.h" | ||||
#include "../string/IZ_string.h" | |||||
#include "../stdinc/IZ_string.h" | |||||
#include "db/IZ_repo.h" | #include "db/IZ_repo.h" | ||||
#include "IZ_app_config.h" | #include "IZ_app_config.h" | ||||
@@ -3,7 +3,7 @@ | |||||
#include <SDL_filesystem.h> | #include <SDL_filesystem.h> | ||||
#include "../config/IZ_config.h" | #include "../config/IZ_config.h" | ||||
#include "../string/IZ_string.h" | |||||
#include "../stdinc/IZ_string.h" | |||||
#include "IZ_subsystem.h" | #include "IZ_subsystem.h" | ||||
#endif | #endif |
@@ -6,7 +6,7 @@ | |||||
#include <string.h> | #include <string.h> | ||||
#include "../../common/IZ_common.h" | #include "../../common/IZ_common.h" | ||||
#include "../../config/IZ_config.h" | #include "../../config/IZ_config.h" | ||||
#include "../../string/IZ_string.h" | |||||
#include "../../stdinc/IZ_string.h" | |||||
typedef struct { | typedef struct { | ||||
char path[64]; | char path[64]; | ||||
@@ -0,0 +1,13 @@ | |||||
#include "IZ_stdlib.h" | |||||
void* IZ_malloc(size_t size) { | |||||
return malloc(size); | |||||
} | |||||
void* IZ_calloc(unsigned int count, size_t size) { | |||||
return calloc(count, size); | |||||
} | |||||
void IZ_free(void* p) { | |||||
free(p); | |||||
} |
@@ -0,0 +1,10 @@ | |||||
#ifndef IZ_STDLIB_H | |||||
#define IZ_STDLIB_H | |||||
#include <stdlib.h> | |||||
void* IZ_malloc(size_t); | |||||
void* IZ_calloc(unsigned int, size_t); | |||||
void IZ_free(void*); | |||||
#endif //IZ_STDLIB_H |