Update core headers and sources to use relative includes
This commit is contained in:
parent
9e66bd60bd
commit
4c14588d92
@ -1,4 +1,5 @@
|
|||||||
#include "mem_allocator.h"
|
#include "mem_allocator.h"
|
||||||
|
#include "../../../common/aliases/aliases.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
void *wapp_mem_allocator_alloc(const Allocator *allocator, u64 size) {
|
void *wapp_mem_allocator_alloc(const Allocator *allocator, u64 size) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef MEM_ALLOCATOR_H
|
#ifndef MEM_ALLOCATOR_H
|
||||||
#define MEM_ALLOCATOR_H
|
#define MEM_ALLOCATOR_H
|
||||||
|
|
||||||
#include "aliases.h"
|
#include "../../../common/aliases/aliases.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include "mem_arena.h"
|
#include "mem_arena.h"
|
||||||
#include "aliases.h"
|
#include "../../../common/aliases/aliases.h"
|
||||||
#include "misc_utils.h"
|
#include "../../../common/misc/misc_utils.h"
|
||||||
#include "mem_os.h"
|
#include "../../os/mem/mem_os.h"
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#ifndef MEM_ARENA_H
|
#ifndef MEM_ARENA_H
|
||||||
#define MEM_ARENA_H
|
#define MEM_ARENA_H
|
||||||
|
|
||||||
#include "aliases.h"
|
#include "../../../common/aliases/aliases.h"
|
||||||
#include "mem_os.h"
|
#include "../../os/mem/mem_os.h"
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#include "mem_arena_allocator.h"
|
#include "mem_arena_allocator.h"
|
||||||
#include "mem_arena.h"
|
#include "mem_arena.h"
|
||||||
|
#include "../../../common/aliases/aliases.h"
|
||||||
|
#include "../../os/mem/mem_os.h"
|
||||||
|
|
||||||
internal inline void *mem_arena_alloc(u64 size, void *alloc_obj);
|
internal inline void *mem_arena_alloc(u64 size, void *alloc_obj);
|
||||||
internal inline void *mem_arena_alloc_aligned(u64 size, u64 alignment, void *alloc_obj);
|
internal inline void *mem_arena_alloc_aligned(u64 size, u64 alignment, void *alloc_obj);
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#ifndef MEM_ARENA_ALLOCATOR_H
|
#ifndef MEM_ARENA_ALLOCATOR_H
|
||||||
#define MEM_ARENA_ALLOCATOR_H
|
#define MEM_ARENA_ALLOCATOR_H
|
||||||
|
|
||||||
#include "aliases.h"
|
#include "../../../common/aliases/aliases.h"
|
||||||
#include "mem_os.h"
|
#include "../allocator/mem_allocator.h"
|
||||||
#include "mem_allocator.h"
|
#include "../../os/mem/mem_os.h"
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include "aliases.h"
|
|
||||||
#include "mem_utils.h"
|
#include "mem_utils.h"
|
||||||
|
#include "../../../common/aliases/aliases.h"
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef MEM_UTILS_H
|
#ifndef MEM_UTILS_H
|
||||||
#define MEM_UTILS_H
|
#define MEM_UTILS_H
|
||||||
|
|
||||||
#include "aliases.h"
|
#include "../../../common/aliases/aliases.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
BEGIN_C_LINKAGE
|
BEGIN_C_LINKAGE
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#include "cpath.h"
|
#include "cpath.h"
|
||||||
#include "aliases.h"
|
#include "../../../common/aliases/aliases.h"
|
||||||
#include "mem_allocator.h"
|
#include "../../../common/misc/misc_utils.h"
|
||||||
#include "mem_arena_allocator.h"
|
#include "../../mem/allocator/mem_allocator.h"
|
||||||
#include "misc_utils.h"
|
#include "../../mem/arena/mem_arena_allocator.h"
|
||||||
#include "str8.h"
|
#include "../../strings/str8/str8.h"
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
#ifndef CPATH_H
|
#ifndef CPATH_H
|
||||||
#define CPATH_H
|
#define CPATH_H
|
||||||
|
|
||||||
#include "aliases.h"
|
#include "../../../common/aliases/aliases.h"
|
||||||
#include "mem_allocator.h"
|
#include "../../../common/platform/platform.h"
|
||||||
#include "platform.h"
|
#include "../../mem/allocator/mem_allocator.h"
|
||||||
#include "str8.h"
|
#include "../../strings/str8/str8.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
BEGIN_C_LINKAGE
|
BEGIN_C_LINKAGE
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
#include "mem_os.h"
|
#include "mem_os.h"
|
||||||
#include "mem_os_ops.h"
|
#include "mem_os_ops.h"
|
||||||
#include "aliases.h"
|
#include "../../../common/aliases/aliases.h"
|
||||||
#include "platform.h"
|
#include "../../../common/platform/platform.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#if defined(WAPP_PLATFORM_WINDOWS)
|
#if defined(WAPP_PLATFORM_WINDOWS)
|
||||||
#include "mem_os_win.h"
|
#include "win/mem_os_win.h"
|
||||||
#elif defined(WAPP_PLATFORM_POSIX)
|
#elif defined(WAPP_PLATFORM_POSIX)
|
||||||
#include "mem_os_posix.h"
|
#include "posix/mem_os_posix.h"
|
||||||
#else
|
#else
|
||||||
#error "Unrecognised platform"
|
#error "Unrecognised platform"
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#ifndef MEM_OS_H
|
#ifndef MEM_OS_H
|
||||||
#define MEM_OS_H
|
#define MEM_OS_H
|
||||||
|
|
||||||
#include "aliases.h"
|
#include "../../../common/aliases/aliases.h"
|
||||||
#include "platform.h"
|
#include "../../../common/platform/platform.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
BEGIN_C_LINKAGE
|
BEGIN_C_LINKAGE
|
||||||
@ -11,9 +11,9 @@ BEGIN_C_LINKAGE
|
|||||||
#include "mem_os_ops.h"
|
#include "mem_os_ops.h"
|
||||||
|
|
||||||
#if defined(WAPP_PLATFORM_WINDOWS)
|
#if defined(WAPP_PLATFORM_WINDOWS)
|
||||||
#include "mem_os_win.h"
|
#include "win/mem_os_win.h"
|
||||||
#elif defined(WAPP_PLATFORM_POSIX)
|
#elif defined(WAPP_PLATFORM_POSIX)
|
||||||
#include "mem_os_posix.h"
|
#include "posix/mem_os_posix.h"
|
||||||
#else
|
#else
|
||||||
#error "Unrecognised platform"
|
#error "Unrecognised platform"
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
#include "aliases.h"
|
#include "../../../../common/aliases/aliases.h"
|
||||||
#include "platform.h"
|
#include "../../../../common/platform/platform.h"
|
||||||
|
|
||||||
#ifdef WAPP_PLATFORM_POSIX
|
#ifdef WAPP_PLATFORM_POSIX
|
||||||
|
|
||||||
#include "mem_os_ops.h"
|
|
||||||
#include "mem_os_posix.h"
|
#include "mem_os_posix.h"
|
||||||
|
#include "../mem_os_ops.h"
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
|
|
||||||
internal const i32 access_types[] = {
|
internal const i32 access_types[] = {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef MEM_OS_POSIX_H
|
#ifndef MEM_OS_POSIX_H
|
||||||
#define MEM_OS_POSIX_H
|
#define MEM_OS_POSIX_H
|
||||||
|
|
||||||
#include "platform.h"
|
#include "../../../../common/platform/platform.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
BEGIN_C_LINKAGE
|
BEGIN_C_LINKAGE
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
#include "aliases.h"
|
#include "../../../../common/aliases/aliases.h"
|
||||||
#include "platform.h"
|
#include "../../../../common/platform/platform.h"
|
||||||
|
|
||||||
#ifdef WAPP_PLATFORM_WINDOWS
|
#ifdef WAPP_PLATFORM_WINDOWS
|
||||||
|
|
||||||
#include "mem_os_ops.h"
|
|
||||||
#include "mem_os_win.h"
|
#include "mem_os_win.h"
|
||||||
|
#include "../mem_os_ops.h"
|
||||||
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef MEM_OS_WIN_H
|
#ifndef MEM_OS_WIN_H
|
||||||
#define MEM_OS_WIN_H
|
#define MEM_OS_WIN_H
|
||||||
|
|
||||||
#include "platform.h"
|
#include "../../../../common/platform/platform.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
BEGIN_C_LINKAGE
|
BEGIN_C_LINKAGE
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
#include "commander.h"
|
#include "commander.h"
|
||||||
#include "aliases.h"
|
|
||||||
#include "commander_output.h"
|
#include "commander_output.h"
|
||||||
#include "mem_allocator.h"
|
#include "../utils/shell_utils.h"
|
||||||
#include "mem_arena_allocator.h"
|
#include "../../../mem/allocator/mem_allocator.h"
|
||||||
#include "misc_utils.h"
|
#include "../../../mem/arena/mem_arena_allocator.h"
|
||||||
#include "shell_utils.h"
|
#include "../../../strings/str8/str8.h"
|
||||||
#include "str8.h"
|
#include "../../../../common/aliases/aliases.h"
|
||||||
|
#include "../../../../common/misc/misc_utils.h"
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#ifndef COMMANDER_H
|
#ifndef COMMANDER_H
|
||||||
#define COMMANDER_H
|
#define COMMANDER_H
|
||||||
|
|
||||||
#include "aliases.h"
|
|
||||||
#include "commander_output.h"
|
#include "commander_output.h"
|
||||||
#include "str8.h"
|
#include "../../../../common/aliases/aliases.h"
|
||||||
|
#include "../../../strings/str8/str8.h"
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#ifndef COMMANDER_OUTPUT_H
|
#ifndef COMMANDER_OUTPUT_H
|
||||||
#define COMMANDER_OUTPUT_H
|
#define COMMANDER_OUTPUT_H
|
||||||
|
|
||||||
#include "aliases.h"
|
#include "../../../../common/aliases/aliases.h"
|
||||||
#include "platform.h"
|
#include "../../../../common/platform/platform.h"
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
#include "aliases.h"
|
#include "../../../../../common/aliases/aliases.h"
|
||||||
#include "platform.h"
|
#include "../../../../../common/platform/platform.h"
|
||||||
|
|
||||||
#ifdef WAPP_PLATFORM_POSIX
|
#ifdef WAPP_PLATFORM_POSIX
|
||||||
|
|
||||||
#include "commander_output.h"
|
#include "../commander_output.h"
|
||||||
#include "shell_utils.h"
|
#include "../../utils/shell_utils.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
#include "aliases.h"
|
#include "../../../../../common/aliases/aliases.h"
|
||||||
#include "platform.h"
|
#include "../../../../../common/platform/platform.h"
|
||||||
|
|
||||||
#ifdef WAPP_PLATFORM_WINDOWS
|
#ifdef WAPP_PLATFORM_WINDOWS
|
||||||
|
|
||||||
#include "commander_output.h"
|
#include "../commander_output.h"
|
||||||
#include "shell_utils.h"
|
#include "../../utils/shell_utils.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
CMDError get_output_status(FILE *fp, i32 *status_out) {
|
CMDError get_output_status(FILE *fp, i32 *status_out) {
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
#include "aliases.h"
|
#include "../../../../../common/aliases/aliases.h"
|
||||||
#include "platform.h"
|
#include "../../../../../common/platform/platform.h"
|
||||||
#include "str8.h"
|
#include "../../../../strings/str8/str8.h"
|
||||||
|
|
||||||
#ifdef WAPP_PLATFORM_POSIX
|
#ifdef WAPP_PLATFORM_POSIX
|
||||||
|
|
||||||
#include "terminal_colours.h"
|
#include "../terminal_colours.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
internal Str8RO colours[COUNT_TERM_COLOUR] = {
|
internal Str8RO colours[COUNT_TERM_COLOUR] = {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "termcolour.h"
|
#include "termcolour.h"
|
||||||
#include "terminal_colours.h"
|
#include "terminal_colours.h"
|
||||||
|
#include "../../../strings/str8/str8.h"
|
||||||
|
|
||||||
void wapp_shell_termcolour_print_text(Str8RO *text, TerminalColour colour) {
|
void wapp_shell_termcolour_print_text(Str8RO *text, TerminalColour colour) {
|
||||||
if (colour < WAPP_TERM_COLOUR_FG_BLACK || colour > WAPP_TERM_COLOUR_FG_BR_WHITE) {
|
if (colour < WAPP_TERM_COLOUR_FG_BLACK || colour > WAPP_TERM_COLOUR_FG_BR_WHITE) {
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#ifndef TERM_COLOUR_H
|
#ifndef TERM_COLOUR_H
|
||||||
#define TERM_COLOUR_H
|
#define TERM_COLOUR_H
|
||||||
|
|
||||||
#include "aliases.h"
|
|
||||||
#include "terminal_colours.h"
|
#include "terminal_colours.h"
|
||||||
#include "str8.h"
|
#include "../../../../common/aliases/aliases.h"
|
||||||
|
#include "../../../strings/str8/str8.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
BEGIN_C_LINKAGE
|
BEGIN_C_LINKAGE
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
#include "aliases.h"
|
#include "../../../../../common/aliases/aliases.h"
|
||||||
#include "platform.h"
|
#include "../../../../../common/platform/platform.h"
|
||||||
#include "str8.h"
|
#include "../../../../strings/str8/str8.h"
|
||||||
|
|
||||||
#ifdef WAPP_PLATFORM_WINDOWS
|
#ifdef WAPP_PLATFORM_WINDOWS
|
||||||
|
|
||||||
#include "misc_utils.h"
|
#include "../terminal_colours.h"
|
||||||
#include "terminal_colours.h"
|
#include "../../../../../common/misc/misc_utils.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef SHELL_UTILS_H
|
#ifndef SHELL_UTILS_H
|
||||||
#define SHELL_UTILS_H
|
#define SHELL_UTILS_H
|
||||||
|
|
||||||
#include "platform.h"
|
#include "../../../../common/platform/platform.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#ifdef WAPP_PLATFORM_WINDOWS
|
#ifdef WAPP_PLATFORM_WINDOWS
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "str8.h"
|
#include "str8.h"
|
||||||
#include "aliases.h"
|
#include "../../../common/aliases/aliases.h"
|
||||||
#include "mem_allocator.h"
|
#include "../../mem/allocator/mem_allocator.h"
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#ifndef STR8_H
|
#ifndef STR8_H
|
||||||
#define STR8_H
|
#define STR8_H
|
||||||
|
|
||||||
#include "aliases.h"
|
#include "../../../common/aliases/aliases.h"
|
||||||
#include "mem_allocator.h"
|
#include "../../mem/allocator/mem_allocator.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
@ -2,20 +2,20 @@
|
|||||||
#define WAPP_CORE_C
|
#define WAPP_CORE_C
|
||||||
|
|
||||||
#include "wapp_core.h"
|
#include "wapp_core.h"
|
||||||
#include "mem_utils.c"
|
#include "strings/str8/str8.c"
|
||||||
#include "mem_arena.c"
|
#include "os/shell/termcolour/posix/termcolour_posix.c"
|
||||||
#include "mem_arena_allocator.c"
|
#include "os/shell/termcolour/win/termcolour_win.c"
|
||||||
#include "mem_allocator.c"
|
#include "os/shell/termcolour/termcolour.c"
|
||||||
#include "str8.c"
|
#include "os/shell/commander/posix/commander_posix.c"
|
||||||
#include "termcolour_win.c"
|
#include "os/shell/commander/win/commander_win.c"
|
||||||
#include "termcolour_posix.c"
|
#include "os/shell/commander/commander.c"
|
||||||
#include "termcolour.c"
|
#include "os/cpath/cpath.c"
|
||||||
#include "commander_win.c"
|
#include "os/mem/posix/mem_os_posix.c"
|
||||||
#include "commander.c"
|
#include "os/mem/win/mem_os_win.c"
|
||||||
#include "commander_posix.c"
|
#include "os/mem/mem_os.c"
|
||||||
#include "mem_os_win.c"
|
#include "mem/utils/mem_utils.c"
|
||||||
#include "mem_os.c"
|
#include "mem/allocator/mem_allocator.c"
|
||||||
#include "mem_os_posix.c"
|
#include "mem/arena/mem_arena.c"
|
||||||
#include "cpath.c"
|
#include "mem/arena/mem_arena_allocator.c"
|
||||||
|
|
||||||
#endif // !WAPP_CORE_C
|
#endif // !WAPP_CORE_C
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
#ifndef WAPP_CORE_H
|
#ifndef WAPP_CORE_H
|
||||||
#define WAPP_CORE_H
|
#define WAPP_CORE_H
|
||||||
|
|
||||||
#include "mem_arena_allocator.h"
|
#include "strings/str8/str8.h"
|
||||||
#include "mem_arena.h"
|
#include "os/shell/termcolour/termcolour.h"
|
||||||
#include "mem_utils.h"
|
#include "os/shell/termcolour/terminal_colours.h"
|
||||||
#include "mem_allocator.h"
|
#include "os/shell/commander/commander.h"
|
||||||
#include "str8.h"
|
#include "os/shell/commander/commander_output.h"
|
||||||
#include "termcolour.h"
|
#include "os/shell/utils/shell_utils.h"
|
||||||
#include "terminal_colours.h"
|
#include "os/cpath/cpath.h"
|
||||||
#include "shell_utils.h"
|
#include "os/mem/posix/mem_os_posix.h"
|
||||||
#include "commander_output.h"
|
#include "os/mem/win/mem_os_win.h"
|
||||||
#include "commander.h"
|
#include "os/mem/mem_os_ops.h"
|
||||||
#include "mem_os_ops.h"
|
#include "os/mem/mem_os.h"
|
||||||
#include "mem_os_win.h"
|
#include "mem/utils/mem_utils.h"
|
||||||
#include "mem_os.h"
|
#include "mem/allocator/mem_allocator.h"
|
||||||
#include "mem_os_posix.h"
|
#include "mem/arena/mem_arena_allocator.h"
|
||||||
#include "cpath.h"
|
#include "mem/arena/mem_arena.h"
|
||||||
#include "wapp_common.h"
|
#include "../common/wapp_common.h"
|
||||||
|
|
||||||
#endif // !WAPP_CORE_H
|
#endif // !WAPP_CORE_H
|
||||||
|
Loading…
Reference in New Issue
Block a user