From 8a3477aadb912943d066cfe1a07df40417678153 Mon Sep 17 00:00:00 2001 From: VAN BOSSUYT Nicolas Date: Mon, 12 Dec 2022 21:31:22 +0100 Subject: [PATCH 01/13] meta: nuked brutal-ui and brutal-gfx. --- readme.md | 8 - sources/apps/about/build.mk | 4 - sources/apps/about/main.c | 61 - sources/apps/about/manifest.json | 5 - sources/apps/demo/build.mk | 3 - sources/apps/demo/main.c | 52 - sources/apps/demo/manifest.json | 5 - sources/apps/files/build.mk | 4 - sources/apps/files/main.c | 32 - sources/apps/files/manifest.json | 5 - sources/apps/panel/build.mk | 3 - sources/apps/panel/main.c | 44 - sources/apps/panel/manifest.json | 5 - sources/libs/bal/hw/fb.c | 19 +- sources/libs/bal/hw/fb.h | 41 +- sources/libs/brutal-gfx/buf.c | 24 - sources/libs/brutal-gfx/buf.h | 101 - sources/libs/brutal-gfx/color.c | 14 - sources/libs/brutal-gfx/color.h | 206 -- sources/libs/brutal-gfx/dirty.c | 43 - sources/libs/brutal-gfx/dirty.h | 18 - sources/libs/brutal-gfx/fmt.h | 142 - sources/libs/brutal-gfx/font.c | 107 - sources/libs/brutal-gfx/font.h | 114 - sources/libs/brutal-gfx/gfx.c | 611 ---- sources/libs/brutal-gfx/gfx.h | 149 - sources/libs/brutal-gfx/ops.c | 171 - sources/libs/brutal-gfx/ops.h | 11 - sources/libs/brutal-gfx/paint.h | 193 -- sources/libs/brutal-gfx/path.c | 559 --- sources/libs/brutal-gfx/path.h | 92 - sources/libs/brutal-gfx/stroke.c | 81 - sources/libs/brutal-gfx/stroke.h | 34 - sources/libs/brutal-gfx/vga.c | 4612 ------------------------- sources/libs/brutal-input/event.h | 62 + sources/libs/brutal-test/hook-gfx.h | 74 - sources/libs/brutal-ui/app.c | 104 - sources/libs/brutal-ui/app.h | 45 - sources/libs/brutal-ui/button.c | 89 - sources/libs/brutal-ui/button.h | 24 - sources/libs/brutal-ui/color.c | 27 - sources/libs/brutal-ui/color.h | 54 - sources/libs/brutal-ui/event.c | 1 - sources/libs/brutal-ui/event.h | 62 - sources/libs/brutal-ui/font.h | 6 - sources/libs/brutal-ui/frame.c | 6 - sources/libs/brutal-ui/frame.h | 12 - sources/libs/brutal-ui/icon.c | 19 - sources/libs/brutal-ui/icon.h | 12 - sources/libs/brutal-ui/image.c | 28 - sources/libs/brutal-ui/image.h | 13 - sources/libs/brutal-ui/layout.c | 192 - sources/libs/brutal-ui/layout.h | 67 - sources/libs/brutal-ui/panel.c | 18 - sources/libs/brutal-ui/panel.h | 13 - sources/libs/brutal-ui/parser.c | 399 --- sources/libs/brutal-ui/parser.h | 9 - sources/libs/brutal-ui/slider.c | 21 - sources/libs/brutal-ui/slider.h | 14 - sources/libs/brutal-ui/spacer.c | 9 - sources/libs/brutal-ui/spacer.h | 12 - sources/libs/brutal-ui/splitter.c | 17 - sources/libs/brutal-ui/splitter.h | 12 - sources/libs/brutal-ui/switch.c | 17 - sources/libs/brutal-ui/switch.h | 14 - sources/libs/brutal-ui/text.c | 37 - sources/libs/brutal-ui/text.h | 15 - sources/libs/brutal-ui/view.c | 299 -- sources/libs/brutal-ui/view.h | 107 - sources/libs/brutal-ui/win.c | 318 -- sources/libs/brutal-ui/win.h | 89 - sources/libs/codec-ssfn2/spec.h | 66 - sources/libs/codec-ssfn2/ssfn2.c | 433 --- sources/libs/codec-ssfn2/ssfn2.h | 32 - sources/libs/codec-tga/tga.c | 40 - sources/libs/codec-tga/tga.h | 39 - sources/libs/embed/app-decl.h | 13 - sources/libs/embed/app.h | 11 - sources/libs/embed/brutal/app.c | 20 - sources/libs/embed/brutal/app.h | 6 - sources/libs/embed/brutal/win.c | 86 - sources/libs/embed/brutal/win.h | 12 - sources/libs/embed/sdl/app.c | 151 - sources/libs/embed/sdl/app.h | 6 - sources/libs/embed/sdl/win.c | 52 - sources/libs/embed/sdl/win.h | 8 - sources/libs/embed/win-decl.h | 13 - sources/libs/embed/win.h | 17 - sources/libs/hw/ps2/keyboard.c | 10 +- sources/libs/hw/ps2/keyboard.h | 4 +- sources/libs/hw/ps2/mouse.c | 16 +- sources/libs/hw/ps2/mouse.h | 8 +- sources/protos/event.idl | 4 +- sources/protos/ui.idl | 5 - sources/protos/window.idl | 31 - sources/srvs/ps2/main.c | 6 +- sources/srvs/system/main.c | 5 +- sources/srvs/window/build.mk | 3 - sources/srvs/window/client.c | 154 - sources/srvs/window/client.h | 43 - sources/srvs/window/display.c | 47 - sources/srvs/window/display.h | 27 - sources/srvs/window/main.c | 25 - sources/srvs/window/manifest.json | 5 - sources/srvs/window/server.c | 209 -- sources/srvs/window/server.h | 40 - sources/utils/test/brutal/gfx/path.c | 29 - sources/utils/test/brutal/gfx/rect.c | 50 - sources/utils/test/brutal/gfx/text.c | 19 - sources/utils/test/brutal/ui/parser.c | 189 - sysroot/boot/config.json | 12 - 111 files changed, 126 insertions(+), 11710 deletions(-) delete mode 100644 sources/apps/about/build.mk delete mode 100644 sources/apps/about/main.c delete mode 100644 sources/apps/about/manifest.json delete mode 100644 sources/apps/demo/build.mk delete mode 100644 sources/apps/demo/main.c delete mode 100644 sources/apps/demo/manifest.json delete mode 100644 sources/apps/files/build.mk delete mode 100644 sources/apps/files/main.c delete mode 100644 sources/apps/files/manifest.json delete mode 100644 sources/apps/panel/build.mk delete mode 100644 sources/apps/panel/main.c delete mode 100644 sources/apps/panel/manifest.json delete mode 100644 sources/libs/brutal-gfx/buf.c delete mode 100644 sources/libs/brutal-gfx/buf.h delete mode 100644 sources/libs/brutal-gfx/color.c delete mode 100644 sources/libs/brutal-gfx/color.h delete mode 100644 sources/libs/brutal-gfx/dirty.c delete mode 100644 sources/libs/brutal-gfx/dirty.h delete mode 100644 sources/libs/brutal-gfx/fmt.h delete mode 100644 sources/libs/brutal-gfx/font.c delete mode 100644 sources/libs/brutal-gfx/font.h delete mode 100644 sources/libs/brutal-gfx/gfx.c delete mode 100644 sources/libs/brutal-gfx/gfx.h delete mode 100644 sources/libs/brutal-gfx/ops.c delete mode 100644 sources/libs/brutal-gfx/ops.h delete mode 100644 sources/libs/brutal-gfx/paint.h delete mode 100644 sources/libs/brutal-gfx/path.c delete mode 100644 sources/libs/brutal-gfx/path.h delete mode 100644 sources/libs/brutal-gfx/stroke.c delete mode 100644 sources/libs/brutal-gfx/stroke.h delete mode 100644 sources/libs/brutal-gfx/vga.c create mode 100644 sources/libs/brutal-input/event.h delete mode 100644 sources/libs/brutal-test/hook-gfx.h delete mode 100644 sources/libs/brutal-ui/app.c delete mode 100644 sources/libs/brutal-ui/app.h delete mode 100644 sources/libs/brutal-ui/button.c delete mode 100644 sources/libs/brutal-ui/button.h delete mode 100644 sources/libs/brutal-ui/color.c delete mode 100644 sources/libs/brutal-ui/color.h delete mode 100644 sources/libs/brutal-ui/event.c delete mode 100644 sources/libs/brutal-ui/event.h delete mode 100644 sources/libs/brutal-ui/font.h delete mode 100644 sources/libs/brutal-ui/frame.c delete mode 100644 sources/libs/brutal-ui/frame.h delete mode 100644 sources/libs/brutal-ui/icon.c delete mode 100644 sources/libs/brutal-ui/icon.h delete mode 100644 sources/libs/brutal-ui/image.c delete mode 100644 sources/libs/brutal-ui/image.h delete mode 100644 sources/libs/brutal-ui/layout.c delete mode 100644 sources/libs/brutal-ui/layout.h delete mode 100644 sources/libs/brutal-ui/panel.c delete mode 100644 sources/libs/brutal-ui/panel.h delete mode 100644 sources/libs/brutal-ui/parser.c delete mode 100644 sources/libs/brutal-ui/parser.h delete mode 100644 sources/libs/brutal-ui/slider.c delete mode 100644 sources/libs/brutal-ui/slider.h delete mode 100644 sources/libs/brutal-ui/spacer.c delete mode 100644 sources/libs/brutal-ui/spacer.h delete mode 100644 sources/libs/brutal-ui/splitter.c delete mode 100644 sources/libs/brutal-ui/splitter.h delete mode 100644 sources/libs/brutal-ui/switch.c delete mode 100644 sources/libs/brutal-ui/switch.h delete mode 100644 sources/libs/brutal-ui/text.c delete mode 100644 sources/libs/brutal-ui/text.h delete mode 100644 sources/libs/brutal-ui/view.c delete mode 100644 sources/libs/brutal-ui/view.h delete mode 100644 sources/libs/brutal-ui/win.c delete mode 100644 sources/libs/brutal-ui/win.h delete mode 100644 sources/libs/codec-ssfn2/spec.h delete mode 100644 sources/libs/codec-ssfn2/ssfn2.c delete mode 100644 sources/libs/codec-ssfn2/ssfn2.h delete mode 100644 sources/libs/codec-tga/tga.c delete mode 100644 sources/libs/codec-tga/tga.h delete mode 100644 sources/libs/embed/app-decl.h delete mode 100644 sources/libs/embed/app.h delete mode 100644 sources/libs/embed/brutal/app.c delete mode 100644 sources/libs/embed/brutal/app.h delete mode 100644 sources/libs/embed/brutal/win.c delete mode 100644 sources/libs/embed/brutal/win.h delete mode 100644 sources/libs/embed/sdl/app.c delete mode 100644 sources/libs/embed/sdl/app.h delete mode 100644 sources/libs/embed/sdl/win.c delete mode 100644 sources/libs/embed/sdl/win.h delete mode 100644 sources/libs/embed/win-decl.h delete mode 100644 sources/libs/embed/win.h delete mode 100644 sources/protos/ui.idl delete mode 100644 sources/protos/window.idl delete mode 100644 sources/srvs/window/build.mk delete mode 100644 sources/srvs/window/client.c delete mode 100644 sources/srvs/window/client.h delete mode 100644 sources/srvs/window/display.c delete mode 100644 sources/srvs/window/display.h delete mode 100644 sources/srvs/window/main.c delete mode 100644 sources/srvs/window/manifest.json delete mode 100644 sources/srvs/window/server.c delete mode 100644 sources/srvs/window/server.h delete mode 100644 sources/utils/test/brutal/gfx/path.c delete mode 100644 sources/utils/test/brutal/gfx/rect.c delete mode 100644 sources/utils/test/brutal/gfx/text.c delete mode 100644 sources/utils/test/brutal/ui/parser.c diff --git a/readme.md b/readme.md index c3f1a04ce..215727617 100644 --- a/readme.md +++ b/readme.md @@ -35,14 +35,6 @@ - **BRUTAL** exposes its features to developers through clean APIs. - **BRUTAL** features a rich and modern C library complete with fibers, custom allocators, generic data structures, and more... -## Screenshots - -

- -
-BRUTAL running in QEMU 6.2 -

- ## Build Instructions BRUTAL is pretty easy to to build from source using GNUMake, NASM and LLVM. diff --git a/sources/apps/about/build.mk b/sources/apps/about/build.mk deleted file mode 100644 index 966fbd366..000000000 --- a/sources/apps/about/build.mk +++ /dev/null @@ -1,4 +0,0 @@ -PKG_ABOUT_PATH=apps/about - -APPS+=ABOUT - diff --git a/sources/apps/about/main.c b/sources/apps/about/main.c deleted file mode 100644 index 0352086b4..000000000 --- a/sources/apps/about/main.c +++ /dev/null @@ -1,61 +0,0 @@ -#include -#include - -UiView *about_informations(void) -{ - UiView *label_title = ui_text_create(str$("BRUTAL"), UI_FONT_TITLE); - UiView *label_version = ui_text_create(str$("Milestone 5 @ 3b96f95"), UI_FONT_BODY); - UiView *label_website = ui_text_create(str$("brutal.smnx.sh"), UI_FONT_LINK); - UiView *label_license = ui_text_create(str$("The brutal operating system and its core components are licensed under the MIT License."), UI_FONT_BODY); - UiView *button = ui_button_create_with_text(str$("OK")); - ui_view_layout(button, "g-end g-vfill"); - - UiView *container = ui_panel_create(UI_COLOR_BASE00); - ui_view_layout(container, "flex gaps-12 grow-1 ttb m-16"); - - ui_view_mount(container, label_title); - ui_view_mount(container, label_version); - ui_view_mount(container, label_website); - ui_view_mount(container, label_license); - ui_view_mount(container, ui_spacer_create()); - ui_view_mount(container, button); - - return container; -} - -UiWin *about_win_create(UiApp *app) -{ - UiWin *self = ui_win_create(app, m_rectf(150, 150, 500, 300), UI_WIN_NORMAL); - - UiView *container = ui_panel_create(UI_COLOR_BASE00); - ui_view_layout(container, "flex"); - ui_win_mount(self, container); - - UiView *logo = ui_panel_create(UI_COLOR_BASE09); - ui_view_layout(logo, "grow-1"); - ui_view_mount(container, logo); - - UiView *infos = about_informations(); - ui_view_mount(container, infos); - - return self; -} - -int main(int argc, char const *argv[]) -{ - (void)argc; - (void)argv; - - UiApp app; - ui_app_init(&app); - - UiWin *win = about_win_create(&app); - ui_win_show(win); - - int result = ui_app_run(&app); - - ui_win_deref(win); - ui_app_deinit(&app); - - return result; -} diff --git a/sources/apps/about/manifest.json b/sources/apps/about/manifest.json deleted file mode 100644 index a771b5ca8..000000000 --- a/sources/apps/about/manifest.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "about", - "consume": ["system.Server", "window.Server"], - "rights": ["log"] -} diff --git a/sources/apps/demo/build.mk b/sources/apps/demo/build.mk deleted file mode 100644 index 44eb59fda..000000000 --- a/sources/apps/demo/build.mk +++ /dev/null @@ -1,3 +0,0 @@ -PKG_DEMO_PATH=apps/demo - -APPS+=DEMO diff --git a/sources/apps/demo/main.c b/sources/apps/demo/main.c deleted file mode 100644 index c3b7ffab5..000000000 --- a/sources/apps/demo/main.c +++ /dev/null @@ -1,52 +0,0 @@ -#include -#include - -UiWin *demo_win_create(UiApp *app) -{ - UiWin *self = ui_win_create(app, m_rectf(0, 0, 800, 600), UI_WIN_NORMAL); - - UiView *container = ui_panel_create(GFX_DARK_GRAY); - - UiView *toolbar = ui_panel_create(GFX_GRAY); - ui_view_layout(toolbar, "dock-top p-6 max-h-48"); - ui_view_mount(container, toolbar); - - for (int i = 0; i < 5; i++) - { - UiView *item = ui_panel_create(GFX_DIM_GRAY); - ui_view_layout(item, "m-s-4 dock-start min-w-64"); - ui_view_mount(toolbar, item); - } - - ui_win_mount(self, container); - - UiView *button = ui_button_create_with_text(str$("HELLO WORLD!")); - ui_view_layout(button, "m-s-4 dock-start"); - ui_view_mount(toolbar, button); - - UiView *button1 = ui_button_create_with_text(str$("HELLO FRIENDS!")); - ui_view_layout(button1, "m-s-4 dock-start"); - ui_view_mount(toolbar, button1); - - UiView *icon1 = ui_icon_create(); - ui_view_layout(icon1, "dock-fill"); - ui_view_mount(container, icon1); - - return self; -} - -int main(int, char const *[]) -{ - UiApp app; - ui_app_init(&app); - - UiWin *win = demo_win_create(&app); - ui_win_show(win); - - int result = ui_app_run(&app); - - ui_win_deref(win); - ui_app_deinit(&app); - - return result; -} diff --git a/sources/apps/demo/manifest.json b/sources/apps/demo/manifest.json deleted file mode 100644 index 77a5ddb06..000000000 --- a/sources/apps/demo/manifest.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "demo", - "consume": ["system.Server", "window.Server"], - "rights": ["log"] -} diff --git a/sources/apps/files/build.mk b/sources/apps/files/build.mk deleted file mode 100644 index a89816f2a..000000000 --- a/sources/apps/files/build.mk +++ /dev/null @@ -1,4 +0,0 @@ -PKG_FILES_PATH=apps/files - -APPS+=FILES - diff --git a/sources/apps/files/main.c b/sources/apps/files/main.c deleted file mode 100644 index d58027cf9..000000000 --- a/sources/apps/files/main.c +++ /dev/null @@ -1,32 +0,0 @@ -#include -#include - -UiWin *files_win_create(UiApp *app) -{ - UiWin *self = ui_win_create(app, m_rectf(0, 0, 700, 500), UI_WIN_NORMAL); - - UiView *container = ui_panel_create(UI_COLOR_BASE00); - ui_view_layout(container, "flex"); - ui_win_mount(self, container); - - return self; -} - -int main(int argc, char const *argv[]) -{ - (void)argc; - (void)argv; - - UiApp app = {}; - ui_app_init(&app); - - UiWin *win = files_win_create(&app); - ui_win_show(win); - - int result = ui_app_run(&app); - - ui_win_deref(win); - ui_app_deinit(&app); - - return result; -} diff --git a/sources/apps/files/manifest.json b/sources/apps/files/manifest.json deleted file mode 100644 index bd5859115..000000000 --- a/sources/apps/files/manifest.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "files", - "consume": ["system.Server", "window.Server"], - "rights": ["log"] -} diff --git a/sources/apps/panel/build.mk b/sources/apps/panel/build.mk deleted file mode 100644 index f895d53c7..000000000 --- a/sources/apps/panel/build.mk +++ /dev/null @@ -1,3 +0,0 @@ -PKG_PANEL_PATH=apps/panel - -APPS+=PANEL diff --git a/sources/apps/panel/main.c b/sources/apps/panel/main.c deleted file mode 100644 index f94999c5b..000000000 --- a/sources/apps/panel/main.c +++ /dev/null @@ -1,44 +0,0 @@ -#include -#include - -UiWin *about_win_create(UiApp *app) -{ - UiWin *self = ui_win_create(app, m_rectf(0, 0, 800, 48), UI_WIN_DOCK_TOP); - - UiView *container = ui_panel_create(UI_COLOR_BASE00); - ui_view_layout(container, "flex p-8"); - - UiView *btn_applications = ui_button_create_with_text(str$("Applications")); - ui_view_mount(container, btn_applications); - - UiView *lbl_time = ui_text_create(str$("Thue 11 Jan 16:26"), UI_FONT_BODY); - ui_view_layout(lbl_time, "grow-1 place-center"); - - ui_view_mount(container, lbl_time); - - UiView *btn_options = ui_button_create_with_text(str$("...")); - ui_view_mount(container, btn_options); - - ui_win_mount(self, container); - - return self; -} - -int main(int argc, char const *argv[]) -{ - (void)argc; - (void)argv; - - UiApp app; - ui_app_init(&app); - - UiWin *win = about_win_create(&app); - ui_win_show(win); - - int result = ui_app_run(&app); - - ui_win_deref(win); - ui_app_deinit(&app); - - return result; -} diff --git a/sources/apps/panel/manifest.json b/sources/apps/panel/manifest.json deleted file mode 100644 index 4f804517b..000000000 --- a/sources/apps/panel/manifest.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "panel", - "consume": ["system.Server", "window.Server"], - "rights": ["log"] -} diff --git a/sources/libs/bal/hw/fb.c b/sources/libs/bal/hw/fb.c index d3be6c3c8..41e586486 100644 --- a/sources/libs/bal/hw/fb.c +++ b/sources/libs/bal/hw/fb.c @@ -1,18 +1,18 @@ #include -MaybeError bal_fb_init(BalFb *self, int width, int height, GfxFmt fmt) +MaybeError bal_fb_init(BalFb *self, int width, int height, BalFbFmt fmt) { *self = (BalFb){ .width = width, .height = height, - .pitch = gfx_fmt_size(fmt) * width, + .pitch = bal_fb_fmt_size(fmt) * width, .fmt = fmt, }; return bal_mem_init(&self->mem, self->pitch * height); } -MaybeError bal_fb_init_mobj(BalFb *self, BrHandle handle, int width, int height, int pitch, GfxFmt fmt) +MaybeError bal_fb_init_mobj(BalFb *self, BrHandle handle, int width, int height, int pitch, BalFbFmt fmt) { *self = (BalFb){ .width = width, @@ -24,7 +24,7 @@ MaybeError bal_fb_init_mobj(BalFb *self, BrHandle handle, int width, int height, return bal_mem_init_mobj(&self->mem, handle); } -MaybeError bal_fb_init_pmm(BalFb *self, uintptr_t addr, size_t size, int width, int height, int pitch, GfxFmt fmt) +MaybeError bal_fb_init_pmm(BalFb *self, uintptr_t addr, size_t size, int width, int height, int pitch, BalFbFmt fmt) { *self = (BalFb){ .width = width, @@ -63,17 +63,6 @@ BrResult bal_fb_unmap(BalFb *self) return bal_mem_unmap(&self->mem); } -GfxBuf bal_fb_buf(BalFb *self) -{ - return (GfxBuf){ - .width = self->width, - .height = self->height, - .pitch = self->pitch, - .fmt = self->fmt, - .buf = self->mem.buf, - }; -} - void bal_fb_pack(IpcPack *pack, const BalFb *self) { ipc_pack_pod(pack, &self->width); diff --git a/sources/libs/bal/hw/fb.h b/sources/libs/bal/hw/fb.h index 7f768d8a9..59db8102b 100644 --- a/sources/libs/bal/hw/fb.h +++ b/sources/libs/bal/hw/fb.h @@ -1,24 +1,51 @@ #pragma once #include -#include + +typedef enum +{ + BAL_FB_FMT_UNKNOWN, + + BAL_FB_FMT_GS8, + BAL_FB_FMT_RGB888, + BAL_FB_FMT_RGBA8888, + BAL_FB_FMT_BGRA8888, +} BalFbFmt; + +static inline size_t bal_fb_fmt_size(BalFbFmt fmt) +{ + switch (fmt) + { + case BAL_FB_FMT_GS8: + return 1; + case BAL_FB_FMT_RGB888: + return 3; + + case BAL_FB_FMT_RGBA8888: + case BAL_FB_FMT_BGRA8888: + return 4; + + default: + return 0; + } +} typedef struct { int width; int height; int pitch; - GfxFmt fmt; + BalFbFmt fmt; BalMem mem; } BalFb; -MaybeError bal_fb_init(BalFb *self, int width, int height, GfxFmt fmt); +MaybeError bal_fb_init(BalFb *self, int width, int height, BalFbFmt fmt); -MaybeError bal_fb_init_mobj(BalFb *self, BrHandle handle, int width, int height, int pitch, GfxFmt fmt); +MaybeError bal_fb_init_mobj(BalFb *self, BrHandle handle, int width, int height, int pitch, BalFbFmt fmt); -MaybeError bal_fb_init_pmm(BalFb *self, uintptr_t addr, size_t size, int width, int height, int pitch, GfxFmt fmt); +MaybeError bal_fb_init_pmm(BalFb *self, uintptr_t addr, size_t size, int width, int height, int pitch, BalFbFmt fmt); -MaybeError bal_fb_init_mobj(BalFb *self, BrHandle handle, int width, int height, int pitch, GfxFmt fmt); +MaybeError bal_fb_init_mobj(BalFb *self, BrHandle handle, int width, int height, int pitch, BalFbFmt fmt); MaybeError bal_fb_deinit(BalFb *self); @@ -28,8 +55,6 @@ BrResult bal_fb_map(BalFb *self); BrResult bal_fb_unmap(BalFb *self); -GfxBuf bal_fb_buf(BalFb *self); - void bal_fb_pack(IpcPack *pack, const BalFb *self); void bal_fb_unpack(IpcUnpack *pack, BalFb *self); diff --git a/sources/libs/brutal-gfx/buf.c b/sources/libs/brutal-gfx/buf.c deleted file mode 100644 index 4d95da374..000000000 --- a/sources/libs/brutal-gfx/buf.c +++ /dev/null @@ -1,24 +0,0 @@ -#include "buf.h" - -void gfx_surface_init(GfxSurface *self, int width, int height, GfxFmt format, Alloc *alloc) -{ - *self = (GfxSurface){}; - - self->alloc = alloc; - self->buf.fmt = format; - self->buf.width = width; - self->buf.height = height; - self->buf.pitch = gfx_fmt_size(format) * width; - self->buf.buf = alloc_malloc(self->alloc, gfx_fmt_size(format) * width * height); -} - -void gfx_surface_deinit(GfxSurface *self) -{ - alloc_free(self->alloc, self->buf.buf); - *self = (GfxSurface){}; -} - -GfxBuf gfx_surface_buf(GfxSurface *self) -{ - return self->buf; -} diff --git a/sources/libs/brutal-gfx/buf.h b/sources/libs/brutal-gfx/buf.h deleted file mode 100644 index 571ae634d..000000000 --- a/sources/libs/brutal-gfx/buf.h +++ /dev/null @@ -1,101 +0,0 @@ -#pragma once - -#include -#include - -#include "color.h" -#include "fmt.h" - -typedef struct -{ - int width; - int height; - int pitch; - GfxFmt fmt; - void *buf; -} GfxBuf; - -typedef struct -{ - GfxBuf buf; - Alloc *alloc; -} GfxSurface; - -void gfx_surface_init(GfxSurface *self, int width, int height, GfxFmt format, Alloc *alloc); - -void gfx_surface_deinit(GfxSurface *self); - -GfxBuf gfx_surface_buf(GfxSurface *self); - -static inline GfxColor gfx_buf_load_uncheck(const GfxBuf self, int x, int y) -{ - const uint8_t *pixel = ((const uint8_t *)self.buf) + self.pitch * y + x * gfx_fmt_size(self.fmt); - return gfx_fmt_load(self.fmt, pixel); -} - -static inline void gfx_buf_store_unckeck(GfxBuf self, int x, int y, GfxColor color) -{ - uint8_t *pixel = ((uint8_t *)self.buf) + self.pitch * y + x * gfx_fmt_size(self.fmt); - gfx_fmt_store(self.fmt, color, pixel); -} - -static inline GfxColor gfx_buf_load(GfxBuf self, int x, int y) -{ - if (UNLIKELY(x < 0 || x >= self.width || y < 0 || y >= self.height)) - { - return GFX_MAGENTA; - } - - return gfx_buf_load_uncheck(self, x, y); -} - -static inline void gfx_buf_store(GfxBuf self, int x, int y, GfxColor color) -{ - if (UNLIKELY(x < 0 || x >= self.width || y < 0 || y >= self.height)) - { - return; - } - - gfx_buf_store_unckeck(self, x, y, color); -} - -static inline MRectf gfx_buf_bound(GfxBuf self) -{ - return m_rectf(0, 0, self.width, self.height); -} - -static inline size_t gfx_buf_size(GfxBuf self) -{ - return self.width * self.height * gfx_fmt_size(self.fmt); -} - -static inline GfxColor gfx_buf_sample(GfxBuf self, float x, float y) -{ - int xi = (int)x; - int yi = (int)y; - return gfx_buf_load(self, xi, yi); -} - -static inline void gfx_buf_blend_unckeck(GfxBuf self, int x, int y, GfxColor color) -{ - if (color.a == 0xff) - { - return gfx_buf_store(self, x, y, color); - } - - GfxColor bg = gfx_buf_load_uncheck(self, x, y); - GfxColor blend = gfx_blend(color, bg); - gfx_buf_store_unckeck(self, x, y, blend); -} - -static inline void gfx_buf_blend(GfxBuf self, int x, int y, GfxColor color) -{ - if (color.a == 0xff) - { - return gfx_buf_store(self, x, y, color); - } - GfxColor bg = gfx_buf_load(self, x, y); - GfxColor blend = gfx_blend(color, bg); - - gfx_buf_store(self, x, y, blend); -} diff --git a/sources/libs/brutal-gfx/color.c b/sources/libs/brutal-gfx/color.c deleted file mode 100644 index 030de00ef..000000000 --- a/sources/libs/brutal-gfx/color.c +++ /dev/null @@ -1,14 +0,0 @@ -#include - -#include "color.h" - -static MRand rand; - -GfxColor gfx_color_rand(uint8_t alpha) -{ - return gfx_rgba( - m_rand_next_u8(&rand), - m_rand_next_u8(&rand), - m_rand_next_u8(&rand), - alpha); -} diff --git a/sources/libs/brutal-gfx/color.h b/sources/libs/brutal-gfx/color.h deleted file mode 100644 index 672d57610..000000000 --- a/sources/libs/brutal-gfx/color.h +++ /dev/null @@ -1,206 +0,0 @@ -#pragma once - -#include - -typedef struct -{ - uint8_t r, g, b, a; -} GfxColor; - -#define gfx_rgba(R, G, B, A) ((GfxColor){(R), (G), (B), (A)}) -#define gfx_rgb(R, G, B) gfx_rgba(R, G, B, 255) -#define gfx_hex(HEX) gfx_rgba((uint8_t)(HEX >> 16), (uint8_t)(HEX >> 8), (uint8_t)HEX, 255) - -#define GFX_FOREACH_COLOR(COLOR) \ - COLOR(ALICE_BLUE, 0xF0F8FF) \ - COLOR(ANTIQUE_WHITE, 0xFAEBD7) \ - COLOR(AQUA, 0x00FFFF) \ - COLOR(AQUAMARINE, 0x7FFFD4) \ - COLOR(AZURE, 0xF0FFFF) \ - COLOR(BEIGE, 0xF5F5DC) \ - COLOR(BISQUE, 0xFFE4C4) \ - COLOR(BLACK, 0x000000) \ - COLOR(BLANCHED_ALMOND, 0xFFEBCD) \ - COLOR(BLUE, 0x0000FF) \ - COLOR(BLUE_VIOLET, 0x8A2BE2) \ - COLOR(BROWN, 0xA52A2A) \ - COLOR(BURLY_WOOD, 0xDEB887) \ - COLOR(CADET_BLUE, 0x5F9EA0) \ - COLOR(CHARTREUSE, 0x7FFF00) \ - COLOR(CHOCOLATE, 0xD2691E) \ - COLOR(CORAL, 0xFF7F50) \ - COLOR(CORNFLOWER_BLUE, 0x6495ED) \ - COLOR(CORNSILK, 0xFFF8DC) \ - COLOR(CRIMSON, 0xDC143C) \ - COLOR(CYAN, 0x00FFFF) \ - COLOR(DARK_BLUE, 0x00008B) \ - COLOR(DARK_CYAN, 0x008B8B) \ - COLOR(DARK_GOLDEN_ROD, 0xB8860B) \ - COLOR(DARK_GRAY, 0xA9A9A9) \ - COLOR(DARK_GREY, 0xA9A9A9) \ - COLOR(DARK_GREEN, 0x006400) \ - COLOR(DARK_KHAKI, 0xBDB76B) \ - COLOR(DARK_MAGENTA, 0x8B008B) \ - COLOR(DARK_OLIVE_GREEN, 0x556B2F) \ - COLOR(DARK_ORANGE, 0xFF8C00) \ - COLOR(DARK_ORCHID, 0x9932CC) \ - COLOR(DARK_RED, 0x8B0000) \ - COLOR(DARK_SALMON, 0xE9967A) \ - COLOR(DARK_SEA_GREEN, 0x8FBC8F) \ - COLOR(DARK_SLATE_BLUE, 0x483D8B) \ - COLOR(DARK_SLATE_GRAY, 0x2F4F4F) \ - COLOR(DARK_SLATE_GREY, 0x2F4F4F) \ - COLOR(DARK_TURQUOISE, 0x00CED1) \ - COLOR(DARK_VIOLET, 0x9400D3) \ - COLOR(DEEP_PINK, 0xFF1493) \ - COLOR(DEEP_SKY_BLUE, 0x00BFFF) \ - COLOR(DIM_GRAY, 0x696969) \ - COLOR(DIM_GREY, 0x696969) \ - COLOR(DODGER_BLUE, 0x1E90FF) \ - COLOR(FIRE_BRICK, 0xB22222) \ - COLOR(FLORAL_WHITE, 0xFFFAF0) \ - COLOR(FOREST_GREEN, 0x228B22) \ - COLOR(FUCHSIA, 0xFF00FF) \ - COLOR(GAINSBORO, 0xDCDCDC) \ - COLOR(GHOST_WHITE, 0xF8F8FF) \ - COLOR(GOLD, 0xFFD700) \ - COLOR(GOLDEN_ROD, 0xDAA520) \ - COLOR(GRAY, 0x808080) \ - COLOR(GREY, 0x808080) \ - COLOR(GREEN, 0x008000) \ - COLOR(GREEN_YELLOW, 0xADFF2F) \ - COLOR(HONEY_DEW, 0xF0FFF0) \ - COLOR(HOT_PINK, 0xFF69B4) \ - COLOR(INDIAN_RED, 0xCD5C5C) \ - COLOR(INDIGO, 0x4B0082) \ - COLOR(IVORY, 0xFFFFF0) \ - COLOR(KHAKI, 0xF0E68C) \ - COLOR(LAVENDER, 0xE6E6FA) \ - COLOR(LAVENDER_BLUSH, 0xFFF0F5) \ - COLOR(LAWN_GREEN, 0x7CFC00) \ - COLOR(LEMON_CHIFFON, 0xFFFACD) \ - COLOR(LIGHT_BLUE, 0xADD8E6) \ - COLOR(LIGHT_CORAL, 0xF08080) \ - COLOR(LIGHT_CYAN, 0xE0FFFF) \ - COLOR(LIGHT_GOLDEN_ROD_YELLOW, 0xFAFAD2) \ - COLOR(LIGHT_GRAY, 0xD3D3D3) \ - COLOR(LIGHT_GREY, 0xD3D3D3) \ - COLOR(LIGHT_GREEN, 0x90EE90) \ - COLOR(LIGHT_PINK, 0xFFB6C1) \ - COLOR(LIGHT_SALMON, 0xFFA07A) \ - COLOR(LIGHT_SEA_GREEN, 0x20B2AA) \ - COLOR(LIGHT_SKY_BLUE, 0x87CEFA) \ - COLOR(LIGHT_SLATE_GRAY, 0x778899) \ - COLOR(LIGHT_SLATE_GREY, 0x778899) \ - COLOR(LIGHT_STEEL_BLUE, 0xB0C4DE) \ - COLOR(LIGHT_YELLOW, 0xFFFFE0) \ - COLOR(LIME, 0x00FF00) \ - COLOR(LIME_GREEN, 0x32CD32) \ - COLOR(LINEN, 0xFAF0E6) \ - COLOR(MAGENTA, 0xFF00FF) \ - COLOR(MAROON, 0x800000) \ - COLOR(MEDIUM_AQUA_MARINE, 0x66CDAA) \ - COLOR(MEDIUM_BLUE, 0x0000CD) \ - COLOR(MEDIUM_ORCHID, 0xBA55D3) \ - COLOR(MEDIUM_PURPLE, 0x9370DB) \ - COLOR(MEDIUM_SEA_GREEN, 0x3CB371) \ - COLOR(MEDIUM_SLATE_BLUE, 0x7B68EE) \ - COLOR(MEDIUM_SPRING_GREEN, 0x00FA9A) \ - COLOR(MEDIUM_TURQUOISE, 0x48D1CC) \ - COLOR(MEDIUM_VIOLET_RED, 0xC71585) \ - COLOR(MIDNIGHT_BLUE, 0x191970) \ - COLOR(MINT_CREAM, 0xF5FFFA) \ - COLOR(MISTY_ROSE, 0xFFE4E1) \ - COLOR(MOCCASIN, 0xFFE4B5) \ - COLOR(NAVAJO_WHITE, 0xFFDEAD) \ - COLOR(NAVY, 0x000080) \ - COLOR(OLD_LACE, 0xFDF5E6) \ - COLOR(OLIVE, 0x808000) \ - COLOR(OLIVE_DRAB, 0x6B8E23) \ - COLOR(ORANGE, 0xFFA500) \ - COLOR(ORANGE_RED, 0xFF4500) \ - COLOR(ORCHID, 0xDA70D6) \ - COLOR(PALE_GOLDEN_ROD, 0xEEE8AA) \ - COLOR(PALE_GREEN, 0x98FB98) \ - COLOR(PALE_TURQUOISE, 0xAFEEEE) \ - COLOR(PALE_VIOLET_RED, 0xDB7093) \ - COLOR(PAPAYA_WHIP, 0xFFEFD5) \ - COLOR(PEACH_PUFF, 0xFFDAB9) \ - COLOR(PERU, 0xCD853F) \ - COLOR(PINK, 0xFFC0CB) \ - COLOR(PLUM, 0xDDA0DD) \ - COLOR(POWDER_BLUE, 0xB0E0E6) \ - COLOR(PURPLE, 0x800080) \ - COLOR(REBECCA_PURPLE, 0x663399) \ - COLOR(RED, 0xFF0000) \ - COLOR(ROSY_BROWN, 0xBC8F8F) \ - COLOR(ROYAL_BLUE, 0x4169E1) \ - COLOR(SADDLE_BROWN, 0x8B4513) \ - COLOR(SALMON, 0xFA8072) \ - COLOR(SANDY_BROWN, 0xF4A460) \ - COLOR(SEA_GREEN, 0x2E8B57) \ - COLOR(SEA_SHELL, 0xFFF5EE) \ - COLOR(SIENNA, 0xA0522D) \ - COLOR(SILVER, 0xC0C0C0) \ - COLOR(SKY_BLUE, 0x87CEEB) \ - COLOR(SLATE_BLUE, 0x6A5ACD) \ - COLOR(SLATE_GRAY, 0x708090) \ - COLOR(SLATE_GREY, 0x708090) \ - COLOR(SNOW, 0xFFFAFA) \ - COLOR(SPRING_GREEN, 0x00FF7F) \ - COLOR(STEEL_BLUE, 0x4682B4) \ - COLOR(TAN, 0xD2B48C) \ - COLOR(TEAL, 0x008080) \ - COLOR(THISTLE, 0xD8BFD8) \ - COLOR(TOMATO, 0xFF6347) \ - COLOR(TURQUOISE, 0x40E0D0) \ - COLOR(VIOLET, 0xEE82EE) \ - COLOR(WHEAT, 0xF5DEB3) \ - COLOR(WHITE, 0xFFFFFF) \ - COLOR(WHITE_SMOKE, 0xF5F5F5) \ - COLOR(YELLOW, 0xFFFF00) \ - COLOR(YELLOW_GREEN, 0x9ACD32) - -#define COLOR_DECL(NAME, VALUE) \ - static const GfxColor GFX_##NAME = (gfx_hex(VALUE)); - -GFX_FOREACH_COLOR(COLOR_DECL) - -static inline GfxColor gfx_blend(GfxColor fg, GfxColor bg) -{ - if (fg.a == 0xff) - { - return fg; - } - else if (fg.a == 0) - { - return bg; - } - else - { - uint16_t d = 255u * (bg.a + fg.a) - bg.a * fg.a; - - return gfx_rgba( - (bg.r * bg.a * (255u - fg.a) + 255u * fg.a * fg.r) / d, - (bg.g * bg.a * (255u - fg.a) + 255u * fg.a * fg.g) / d, - (bg.b * bg.a * (255u - fg.a) + 255u * fg.a * fg.b) / d, - d / 255u); - } -} - -static inline GfxColor gfx_lerp(GfxColor a, GfxColor b, float t) -{ - return gfx_rgba( - a.r + (b.r - a.r) * t, - a.g + (b.g - a.g) * t, - a.b + (b.b - a.b) * t, - a.a + (b.a - a.a) * t); -} - -GfxColor gfx_color_rand(uint8_t alpha); - -static inline GfxColor gfx_color_with_alpha(GfxColor color, uint8_t alpha) -{ - color.a = alpha; - return color; -} diff --git a/sources/libs/brutal-gfx/dirty.c b/sources/libs/brutal-gfx/dirty.c deleted file mode 100644 index 97f35b936..000000000 --- a/sources/libs/brutal-gfx/dirty.c +++ /dev/null @@ -1,43 +0,0 @@ -#include "dirty.h" - -void gfx_dirty_init(GfxDirty *self, Alloc *alloc) -{ - vec_init(self, alloc); -} - -void gfx_dirty_deinit(GfxDirty *self) -{ - vec_deinit(self); -} - -void gfx_dirty_rect(GfxDirty *self, MRectf rect) -{ - vec_foreach(dirty, self) - { - if (m_rectf_collide_rect(*dirty, rect)) - { - MRectf rects[4]; - m_rectf_substract(rect, *dirty, rects); - - for (int i = 0; i < 4; i++) - { - if (!m_rectf_empty(rects[i])) - gfx_dirty_rect(self, rects[i]); - } - - return; - } - } - - vec_push(self, rect); -} - -bool gfx_dirty_any(GfxDirty *self) -{ - return vec_len(self) > 0; -} - -void gfx_dirty_clear(GfxDirty *self) -{ - vec_clear(self); -} diff --git a/sources/libs/brutal-gfx/dirty.h b/sources/libs/brutal-gfx/dirty.h deleted file mode 100644 index 8ec2f6737..000000000 --- a/sources/libs/brutal-gfx/dirty.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once - -#include -#include - -typedef Vec(MRectf) GfxDirty; - -void gfx_dirty_init(GfxDirty *self, Alloc *alloc); - -void gfx_dirty_deinit(GfxDirty *self); - -void gfx_dirty_rect(GfxDirty *self, MRectf rect); - -bool gfx_dirty_any(GfxDirty *self); - -void gfx_dirty_clear(GfxDirty *self); - -#define gfx_dirty_foreach vec_foreach_v diff --git a/sources/libs/brutal-gfx/fmt.h b/sources/libs/brutal-gfx/fmt.h deleted file mode 100644 index 0229d588d..000000000 --- a/sources/libs/brutal-gfx/fmt.h +++ /dev/null @@ -1,142 +0,0 @@ -#pragma once - -#include - -#include "color.h" - -typedef enum -{ - GFX_FMT_UNKNOWN, - - GFX_FMT_GS8, - GFX_FMT_RGB888, - GFX_FMT_RGBA8888, - GFX_FMT_BGRA8888, -} GfxFmt; - -typedef struct PACKED -{ - uint8_t v; -} GfxFmtGS8; - -typedef struct PACKED -{ - uint8_t r; - uint8_t g; - uint8_t b; -} GfxFmtRGB888; - -typedef struct PACKED -{ - uint8_t r; - uint8_t g; - uint8_t b; - uint8_t a; -} GfxFmtRGBA8888; - -typedef struct PACKED -{ - uint8_t b; - uint8_t g; - uint8_t r; - uint8_t a; -} GfxFmtBGRA8888; - -static inline void gfx_fmt_store(GfxFmt self, GfxColor color, void *dst) -{ - switch (self) - { - case GFX_FMT_GS8: - { - GfxFmtGS8 *p = (GfxFmtGS8 *)dst; - p->v = 0.299 * color.r + 0.587 * color.g + 0.114 * color.b; - break; - } - - case GFX_FMT_RGB888: - { - GfxFmtRGB888 *p = (GfxFmtRGB888 *)dst; - p->r = color.r; - p->g = color.g; - p->b = color.b; - break; - } - - case GFX_FMT_RGBA8888: - { - GfxFmtRGBA8888 *p = (GfxFmtRGBA8888 *)dst; - p->r = color.r; - p->g = color.g; - p->b = color.b; - p->a = color.a; - break; - } - - case GFX_FMT_BGRA8888: - { - GfxFmtBGRA8888 *p = (GfxFmtBGRA8888 *)dst; - p->r = color.r; - p->g = color.g; - p->b = color.b; - p->a = color.a; - break; - } - - default: - panic$("Unknown pixel format {}", self); - } -} - -static inline GfxColor gfx_fmt_load(GfxFmt self, const void *src) -{ - switch (self) - { - case GFX_FMT_GS8: - { - GfxFmtGS8 p = *((GfxFmtGS8 const *)src); - return gfx_rgba(p.v, p.v, p.v, 0); - } - - case GFX_FMT_RGB888: - { - GfxFmtRGB888 p = *((GfxFmtRGB888 const *)src); - return gfx_rgba(p.r, p.g, p.b, 0); - } - - case GFX_FMT_RGBA8888: - { - GfxFmtRGBA8888 p = *((GfxFmtRGBA8888 const *)src); - return gfx_rgba(p.r, p.g, p.b, p.a); - } - - case GFX_FMT_BGRA8888: - { - GfxFmtBGRA8888 p = *((GfxFmtBGRA8888 const *)src); - return gfx_rgba(p.r, p.g, p.b, p.a); - } - - default: - panic$("Unknown pixel format {}", self); - } -} - -static inline size_t gfx_fmt_size(GfxFmt self) -{ - switch (self) - { - case GFX_FMT_GS8: - return sizeof(GfxFmtGS8); - - case GFX_FMT_RGB888: - return sizeof(GfxFmtRGB888); - - case GFX_FMT_RGBA8888: - return sizeof(GfxFmtRGBA8888); - - case GFX_FMT_BGRA8888: - return sizeof(GfxFmtBGRA8888); - - default: - panic$("Unknown pixel format {}", self); - } -} diff --git a/sources/libs/brutal-gfx/font.c b/sources/libs/brutal-gfx/font.c deleted file mode 100644 index ef29325d6..000000000 --- a/sources/libs/brutal-gfx/font.c +++ /dev/null @@ -1,107 +0,0 @@ -#include -#include - -#include "font.h" -#include "gfx.h" - -GfxFontMetrics gfx_font_metrics(GfxFont font, GfxFontStyle style) -{ - return font.metrics(font.ctx, style); -} - -float gfx_font_advance(GfxFont font, GfxFontStyle style, Rune rune) -{ - return font.advance(font.ctx, style, rune); -} - -GfxFontMeasure gfx_font_measure(GfxFont font, GfxFontStyle style, Str str) -{ - float len = 0; - - Rune rune; - while (uft8_next_rune(&str, &rune)) - { - len += gfx_font_advance(font, style, rune); - } - - GfxFontMetrics metrics = gfx_font_metrics(font, style); - - return (GfxFontMeasure){ - .capbound = m_rectf(0, 0, len, metrics.ascend + metrics.descend), - .linebound = m_rectf(0, 0, len, metrics.line_ascend + metrics.line_descend), - .baseline = m_vec2f(0, metrics.ascend), - }; -} - -void gfx_font_render_rune(GfxFont font, GfxFontStyle style, struct _Gfx *gfx, MVec2f baseline, Rune rune) -{ - font.render(font.ctx, style, gfx, baseline, rune); -} - -void gfx_font_render_str(GfxFont font, GfxFontStyle style, struct _Gfx *gfx, MVec2f baseline, Str str) -{ - Rune rune; - while (uft8_next_rune(&str, &rune)) - { - gfx_font_render_rune(font, style, gfx, baseline, rune); - baseline = m_vec2f_add(baseline, m_vec2f(gfx_font_advance(font, style, rune), 0)); - } -} - -/* --- Builtin Font --------------------------------------------------------- */ - -GfxFontMetrics gfx_font_builtin_metrics(MAYBE_UNUSED void *ctx, GfxFontStyle style) -{ - return (GfxFontMetrics){ - .line_ascend = 12 * style.scale, - .ascend = 10 * style.scale, - .captop = 10 * style.scale, - .descend = 3 * style.scale, - .line_descend = 4 * style.scale, - - .advance = GFX_FONT_BUILTIN_WIDTH * style.scale, - }; -} - -float gfx_font_builtin_advance(MAYBE_UNUSED void *ctx, MAYBE_UNUSED GfxFontStyle style, MAYBE_UNUSED Rune rune) -{ - return GFX_FONT_BUILTIN_WIDTH * style.scale; -} - -void gfx_font_builtin_render(MAYBE_UNUSED void *ctx, GfxFontStyle style, Gfx *gfx, MVec2f baseline, Rune rune) -{ - baseline = m_vec2f_add(gfx_peek(gfx)->origin, baseline); - - GfxFontMetrics metrics = gfx_font_builtin_metrics(ctx, style); - uint8_t index = cp437_from_rune(rune); - GfxColor color = gfx_paint_sample(gfx_peek(gfx)->fill, 0, 0); - - for (int y = 0; y < GFX_FONT_BUILTIN_HEIGHT * style.scale; y++) - { - for (int x = 0; x < GFX_FONT_BUILTIN_WIDTH * style.scale; x++) - { - int xx = (GFX_FONT_BUILTIN_WIDTH - (x / style.scale) - 1); - int yy = (int)(index * GFX_FONT_BUILTIN_HEIGHT + (y / style.scale)); - - uint8_t byte = gfx_font_builtin_data[yy]; - uint8_t bit = (byte >> xx) & 0b1; - - MVec2f pos = m_vec2f_add(baseline, m_vec2f(x, y - (metrics.ascend))); - - if (bit && m_rectf_collide_point(gfx_peek(gfx)->clip, pos)) - { - gfx_buf_blend(gfx->buf, pos.x, pos.y, color); - } - } - } -} - -GfxFont gfx_font_builtin(void) -{ - return (GfxFont){ - .ctx = nullptr, - .metrics = gfx_font_builtin_metrics, - .advance = gfx_font_builtin_advance, - .render = gfx_font_builtin_render, - }; -} diff --git a/sources/libs/brutal-gfx/font.h b/sources/libs/brutal-gfx/font.h deleted file mode 100644 index 96f8687c8..000000000 --- a/sources/libs/brutal-gfx/font.h +++ /dev/null @@ -1,114 +0,0 @@ -#pragma once - -#include -#include -#include - -struct _Gfx; - -/** - - <- line_ascend - _____ _ _ <- ascend - / ____| | | | | <- captop - | | __ _ _| |_ ___ _ __ | |__ ___ _ __ __ _ - | | |_ | | | | __/ _ \ '_ \| '_ \ / _ \ '__/ _` | - | |__| | |_| | || __/ | | | |_) | __/ | | (_| | - \_____|\__,_|\__\___|_| |_|_.__/ \___|_| \__, | <- baseline (origin) - __/ | - |___/ <- descend - | ---- | ...advance - <- line_descend - -*/ -typedef struct -{ - float line_ascend; - float ascend; - float captop; - float descend; - float line_descend; - - float advance; -} GfxFontMetrics; - -typedef struct -{ - MRectf capbound; - MRectf linebound; - MVec2f baseline; -} GfxFontMeasure; - -// https://docs.microsoft.com/en-us/typography/opentype/otspec180/fvar -// https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide -typedef struct -{ - /// Used to vary the size of the text - float scale; - - /// Used to vary stroke thicknesses to give variation from lighter to blacker. -#define GFX_FONT_THIN 0.1f -#define GFX_FONT_EXTRA_LIGHT 0.2f -#define GFX_FONT_LIGHT 0.3f -#define GFX_FONT_REGULAR 0.4f -#define GFX_FONT_MEDIUM 0.5f -#define GFX_FONT_SEMI_BOLD 0.6f -#define GFX_FONT_BOLD 0.7f -#define GFX_FONT_EXTRA_BOLD 0.8f -#define GFX_FONT_BLACK 0.9f - float weight; - - /// Used to vary width of text from narrower to wider. - float width; - - /// Used to vary between upright and slanted text. - float slant; - - /// Used to vary between non-italic and italic. - bool italic; - - /// Used to vary between monospace and proportional. - bool monospace; -} GfxFontStyle; - -#define GFX_FONT_DEFAULT \ - (GfxFontStyle) \ - { \ - .scale = 1.0f, \ - .weight = GFX_FONT_REGULAR, \ - .width = 1.0f, \ - .slant = 0.0f, \ - .italic = false, \ - } - -typedef GfxFontMetrics GfxFontMetricsFn(void *ctx, GfxFontStyle style); -typedef float GfxFontAdvanceFn(void *ctx, GfxFontStyle style, Rune rune); -typedef void GfxFontRenderFn(void *ctx, GfxFontStyle style, struct _Gfx *gfx, MVec2f baseline, Rune rune); - -typedef struct -{ - void *ctx; - - GfxFontMetricsFn *metrics; - GfxFontAdvanceFn *advance; - GfxFontRenderFn *render; -} GfxFont; - -GfxFontMetrics gfx_font_metrics(GfxFont font, GfxFontStyle style); - -float gfx_font_advance(GfxFont font, GfxFontStyle style, Rune rune); - -GfxFontMeasure gfx_font_measure(GfxFont font, GfxFontStyle style, Str str); - -void gfx_font_render_rune(GfxFont font, GfxFontStyle style, struct _Gfx *gfx, MVec2f baseline, Rune rune); - -void gfx_font_render_str(GfxFont font, GfxFontStyle style, struct _Gfx *gfx, MVec2f baseline, Str str); - -/* --- Builtin Font --------------------------------------------------------- */ - -#define GFX_FONT_BUILTIN_WIDTH (8) -#define GFX_FONT_BUILTIN_HEIGHT (16) - -extern uint8_t gfx_font_builtin_data[256 * 16]; - -GfxFont gfx_font_builtin(void); diff --git a/sources/libs/brutal-gfx/gfx.c b/sources/libs/brutal-gfx/gfx.c deleted file mode 100644 index 181f1dae3..000000000 --- a/sources/libs/brutal-gfx/gfx.c +++ /dev/null @@ -1,611 +0,0 @@ -#include - -#include "gfx.h" -#include "ops.h" -#include "path.h" - -/* --- Lifetime ------------------------------------------------------------- */ - -void gfx_init(Gfx *self, Alloc *alloc) -{ - *self = (Gfx){}; - - self->alloc = alloc; - vec_init(&self->ctx, alloc); - vec_init(&self->active, alloc); - vec_init(&self->path, alloc); - vec_init(&self->stroke, alloc); -} - -void gfx_deinit(Gfx *self) -{ - vec_deinit(&self->path); - vec_deinit(&self->stroke); - vec_deinit(&self->active); - vec_deinit(&self->ctx); - - if (self->scanline) - { - alloc_free(self->alloc, self->scanline); - } -} - -/* --- Cycle ---------------------------------------------------------------- */ - -void gfx_begin(Gfx *self, GfxBuf buf) -{ - assert_truth(!self->begin); - self->begin = true; - self->buf = buf; - - if (!self->scanline || self->scanline_len < buf.width) - { - if (self->scanline) - { - alloc_free(self->alloc, self->scanline); - } - - self->scanline_len = buf.width; - self->scanline = alloc_malloc(self->alloc, self->scanline_len * sizeof(*self->scanline)); - } - - GfxCtx ctx = (GfxCtx){ - .clip = gfx_buf_bound(buf), - .trans = m_trans2_identity(), - .fill = gfx_paint_fill(GFX_WHITE), - .stroke = (GfxStroke){ - .width = 1, - }, - .font_family = gfx_font_builtin(), - .font_style = GFX_FONT_DEFAULT, - }; - - vec_push(&self->ctx, ctx); -} - -void gfx_end(Gfx *self) -{ - assert_truth(self->begin); - self->begin = false; - - assert_equal(self->ctx.len, 1); - (void)vec_pop(&self->ctx); -} - -void gfx_clear(Gfx *self, GfxColor color) -{ - gfx_ops_rect(self->buf, gfx_peek(self)->clip, color); -} - -/* --- Context -------------------------------------------------------------- */ - -void gfx_push(Gfx *self) -{ - GfxCtx ctx = vec_last(&self->ctx); - vec_push(&self->ctx, ctx); -} - -void gfx_pop(Gfx *self) -{ - (void)vec_pop(&self->ctx); -} - -GfxCtx *gfx_peek(Gfx *self) -{ - return &vec_last(&self->ctx); -} - -void gfx_clip(Gfx *self, MRectf rect) -{ - rect.pos = m_vec2f_add(rect.pos, gfx_peek(self)->origin); - rect = m_rectf_clip_rect(rect, gfx_peek(self)->clip); - gfx_peek(self)->clip = rect; -} - -void gfx_origin(Gfx *self, MVec2f pos) -{ - gfx_peek(self)->origin = m_vec2f_add(pos, gfx_peek(self)->origin); -} - -void gfx_trans(Gfx *self, MTrans2 trans) -{ - gfx_peek(self)->trans = trans; -} - -void gfx_stroke_style(Gfx *self, GfxStroke stroke) -{ - gfx_peek(self)->stroke = stroke; -} - -void gfx_stroke_reset(Gfx *self) -{ - gfx_stroke_style(self, (GfxStroke){.width = 1}); -} - -void gfx_fill_style(Gfx *self, GfxPaint paint) -{ - gfx_peek(self)->fill = paint; -} - -void gfx_fill_reset(Gfx *self) -{ - gfx_fill_style(self, gfx_paint_fill(GFX_BLACK)); -} - -void gfx_font_family(Gfx *self, GfxFont family) -{ - gfx_peek(self)->font_family = family; -} - -void gfx_font_style(Gfx *self, GfxFontStyle style) -{ - gfx_peek(self)->font_style = style; -} - -/* --- Path Building -------------------------------------------------------- */ - -static void append_edge(void *ctx, MEdge edge) -{ - Gfx *gfx = ctx; - vec_push(&gfx->path, edge); -} - -void gfx_begin_path(Gfx *self) -{ - vec_clear(&self->path); - - self->flattener.ctx = self; - self->flattener.append = append_edge; - - gfx_flattener_begin(&self->flattener); -} - -void gfx_close_path(Gfx *self) -{ - GfxPathCmd cmd = { - .type = GFX_CMD_CLOSE_PATH, - }; - - gfx_eval_cmd(self, cmd); -} - -#define RAST_AA 4 - -static int gfx_active_edge_cmp(void const *lhs, void const *rhs) -{ - GfxActiveEdge const *lhsf = lhs; - GfxActiveEdge const *rhsf = rhs; - - return lhsf->x - rhsf->x; -} - -void gfx_fill(Gfx *self, GfxFillRule rule) -{ - const MRectf pbound = m_edges_bound(vec_begin(&self->path), vec_len(&self->path)); - const MRectf rbound = m_rectf_clip_rect(pbound, gfx_peek(self)->clip); - - if (m_rectf_empty(rbound)) - { - return; - } - bool constant_col = gfx_paint_is_constant(gfx_peek(self)->fill); - GfxColor const_color = gfx_paint_sample(gfx_peek(self)->fill, 0, 0); - vec_reserve(&self->active, self->path.len / 2); - for (int y = m_rectf_top(rbound); y < ceilf(m_rectf_bottom(rbound)); y++) - { - mem_set(self->scanline + (int)m_rectf_start(rbound), 0, sizeof(*self->scanline) * ceilf(rbound.width + 1)); - - for (float yy = y; yy < y + 1; yy += 1.0f / RAST_AA) - { - vec_clear(&self->active); - - vec_foreach_v(edge, &self->path) - { - if (m_edge_min_y(edge) <= yy && m_edge_max_y(edge) > yy) - { - GfxActiveEdge active; - active.x = edge.sx + (yy - edge.sy) / (edge.ey - edge.sy) * (edge.ex - edge.sx); - - active.winding = edge.sy > edge.ey ? 1 : -1; - - active.x = m_clamp(active.x, rbound.x, rbound.x + rbound.width); - vec_push(&self->active, active); - } - } - - if (vec_len(&self->active) > 0) - { - qsort(self->active.data, self->active.len, sizeof(GfxActiveEdge), gfx_active_edge_cmp); - - int r = 0; - - for (int i = 0; i + 1 < self->active.len; i++) - { - GfxActiveEdge start_edge = vec_at(&self->active, i); - GfxActiveEdge end_edge = vec_at(&self->active, i + 1); - - if (start_edge.x > m_rectf_end(rbound) || - end_edge.x < m_rectf_start(rbound)) - { - continue; - } - - r += start_edge.winding; - - float begin = start_edge.x; - float end = end_edge.x; - - if ((rule == GFX_FILL_EVENODD && r % 2) || (rule == GFX_FILL_NONZERO && r != 0)) - { - for (float x = begin; x < ceilf(begin); x += 1.0f / RAST_AA) - { - self->scanline[(int)x] += 1.0; - } - - for (float x = floorf(end); x < end; x += 1.0f / RAST_AA) - { - self->scanline[(int)x] += 1.0; - } - - for (int x = (int)(ceilf(begin)); x < (int)(floorf(end)); x++) - { - self->scanline[(int)x] += RAST_AA; - } - } - } - } - } - - for (int x = m_rectf_start(rbound); x < m_rectf_end(rbound); x++) - { - float alpha = m_clamp(self->scanline[x] / (RAST_AA * RAST_AA), 0, 1); - - if (alpha >= 0.003f) - { - float sx = (x - pbound.x) / pbound.width; - float sy = (y - pbound.y) / pbound.height; - - if (constant_col) - { - GfxColor forked_col = const_color; - forked_col.a = forked_col.a * alpha; - - gfx_buf_blend(self->buf, x, y, forked_col); - } - else - { - GfxColor color = gfx_paint_sample(gfx_peek(self)->fill, sx, sy); - color.a = color.a * alpha; - - gfx_buf_blend(self->buf, x, y, color); - } - } - } - } -} - -void gfx_stroke(Gfx *self) -{ - vec_clear(&self->stroke); - gfx_stroke_apply(gfx_peek(self)->stroke, &self->path, &self->stroke); - swap$(&self->path, &self->stroke); - gfx_fill(self, GFX_FILL_NONZERO); - swap$(&self->path, &self->stroke); -} - -void gfx_debug(Gfx *self) -{ - vec_foreach_v(edge, &self->path) - { - gfx_line(self, edge, 1); - } -} - -void gfx_eval_cmd(Gfx *self, GfxPathCmd cmd) -{ - MTrans2 trans = gfx_peek(self)->trans; - - if (!m_trans2_is_identity(trans)) - { - cmd.cp1 = m_trans2_apply_point(trans, cmd.cp1); - cmd.cp2 = m_trans2_apply_point(trans, cmd.cp2); - cmd.point = m_trans2_apply_point(trans, cmd.point); - } - - MVec2f origin = gfx_peek(self)->origin; - - cmd.cp1 = m_vec2f_add(origin, cmd.cp1); - cmd.cp2 = m_vec2f_add(origin, cmd.cp2); - cmd.point = m_vec2f_add(origin, cmd.point); - - gfx_flattener_flatten(&self->flattener, cmd); -} - -void gfx_eval_path(Gfx *self, GfxPath *path) -{ - vec_foreach_v(cmd, path) - { - gfx_eval_cmd(self, cmd); - } -} - -static void eval_cmd(void *ctx, GfxPathCmd cmd) -{ - Gfx *gfx = ctx; - gfx_eval_cmd(gfx, cmd); -} - -void gfx_eval_svg(Gfx *self, Str path) -{ - GfxPathParser parser = { - .ctx = self, - .eval = eval_cmd, - }; - - Scan scan; - scan_init(&scan, path); - gfx_path_parse(&parser, &scan); -} - -void gfx_move_to(Gfx *self, MVec2f point) -{ - GfxPathCmd cmd = { - .type = GFX_CMD_MOVE_TO, - .point = point, - }; - - gfx_eval_cmd(self, cmd); -} - -void gfx_line_to(Gfx *self, MVec2f point) -{ - GfxPathCmd cmd = { - .type = GFX_CMD_LINE_TO, - .point = point, - }; - - gfx_eval_cmd(self, cmd); -} - -void gfx_bezier_to(Gfx *self, MVec2f cp1, MVec2f cp2, MVec2f point) -{ - GfxPathCmd cmd = { - .type = GFX_CMD_CUBIC_TO, - .cp1 = cp1, - .cp2 = cp2, - .point = point, - }; - - gfx_eval_cmd(self, cmd); -} - -void gfx_quadratic_to(Gfx *self, MVec2f cp, MVec2f point) -{ - GfxPathCmd cmd = { - .type = GFX_CMD_QUADRATIC_TO, - .cp = cp, - .point = point, - }; - - gfx_eval_cmd(self, cmd); -} - -void gfx_arc_to(Gfx *self, float rx, float ry, float angle, int flags, MVec2f point) -{ - GfxPathCmd cmd = { - .type = GFX_CMD_ARC_TO, - .rx = rx, - .ry = ry, - .angle = angle, - .flags = flags, - .point = point, - }; - - gfx_eval_cmd(self, cmd); -} - -void gfx_rect(Gfx *self, MRectf rect, float radius) -{ - radius = m_clamp(radius, 0, m_min(rect.width, rect.height) / 2); - - if (radius <= 0.5) - { - gfx_move_to(self, m_vec2f(rect.x + radius, rect.y)); - - gfx_line_to(self, m_vec2f(rect.x + rect.width, rect.y)); - gfx_line_to(self, m_vec2f(rect.x + rect.width, rect.y + rect.height)); - gfx_line_to(self, m_vec2f(rect.x, rect.y + rect.height)); - gfx_line_to(self, m_vec2f(rect.x + radius, rect.y)); - } - else - { - gfx_move_to(self, m_vec2f(rect.x + radius, rect.y)); - - // Top edge - gfx_line_to(self, m_vec2f(rect.x + rect.width - radius, rect.y)); - gfx_quadratic_to(self, m_vec2f(rect.x + rect.width, rect.y), m_vec2f(rect.x + rect.width, rect.y + radius)); - - // Right edge - gfx_line_to(self, m_vec2f(rect.x + rect.width, rect.y + rect.height - radius)); - gfx_quadratic_to(self, m_vec2f(rect.x + rect.width, rect.y + rect.height), m_vec2f(rect.x + rect.width - radius, rect.y + rect.height)); - - // Bottom edge - gfx_line_to(self, m_vec2f(rect.x + radius, rect.y + rect.height)); - gfx_quadratic_to(self, m_vec2f(rect.x, rect.y + rect.height), m_vec2f(rect.x, rect.y + rect.height - radius)); - - // Left edge - gfx_line_to(self, m_vec2f(rect.x, rect.y + radius)); - gfx_quadratic_to(self, m_vec2f(rect.x, rect.y), m_vec2f(rect.x + radius, rect.y)); - } -} - -void gfx_ellipse(Gfx *self, MRectf rect) -{ - for (size_t i = 0; i < 64; i++) - { - float angle = (2 * M_PI * i) / 64; - - gfx_line_to( - self, - m_vec2f( - rect.x + rect.width * cosf(angle), - rect.y + rect.height * sinf(angle))); - } -} - -/* --- Drawing -------------------------------------------------------------- */ - -void gfx_dot(Gfx *self, MVec2f dot, float size) -{ - gfx_begin_path(self); - - gfx_move_to(self, m_vec2f(dot.x - size, dot.y - size)); - gfx_line_to(self, m_vec2f(dot.x + size, dot.y - size)); - gfx_line_to(self, m_vec2f(dot.x + size, dot.y + size)); - gfx_line_to(self, m_vec2f(dot.x - size, dot.y + size)); - - gfx_close_path(self); - - gfx_fill(self, GFX_FILL_EVENODD); -} - -void gfx_line(Gfx *self, MEdge line, float weight) -{ - float sx = line.sx; - float sy = line.sy; - float ex = line.ex; - float ey = line.ey; - - float dx = line.ex - sx; - float dy = line.ey - sy; - float len = sqrtf(dx * dx + dy * dy); - float nx = dx / len; - float ny = dy / len; - float w = weight / 2; - - gfx_begin_path(self); - - gfx_move_to(self, m_vec2f(sx - ny * w, sy + nx * w)); - gfx_line_to(self, m_vec2f(sx + ny * w, sy - nx * w)); - - gfx_line_to(self, m_vec2f(ex + ny * w, ey - nx * w)); - gfx_line_to(self, m_vec2f(ex - ny * w, ey + nx * w)); - - gfx_close_path(self); - - gfx_fill(self, GFX_FILL_EVENODD); -} - -void gfx_text(Gfx *self, MVec2f origin, Str text) -{ - GfxFont family = gfx_peek(self)->font_family; - GfxFontStyle style = gfx_peek(self)->font_style; - gfx_font_render_str(family, style, self, origin, text); -} - -void gfx_fill_rect_aligned(Gfx *self, MRectf rect) -{ - if (m_rectf_empty(rect)) - { - return; - } - - rect.pos = m_vec2f_add(rect.pos, gfx_peek(self)->origin); - MRectf rbound = m_rectf_clip_rect(rect, gfx_peek(self)->clip); - float m_width = 1 / rect.width; - float m_height = 1 / rect.height; - - if (gfx_paint_is_constant(gfx_peek(self)->fill)) - { - GfxColor color = gfx_paint_sample(gfx_peek(self)->fill, 0, 0); - - gfx_ops_rect(self->buf, rbound, color); - } - else - { - - for (int y = m_rectf_top(rbound); y < m_rectf_bottom(rbound); y++) - { - float sy = (y - rect.y) * m_height; - - for (int x = m_rectf_start(rbound); x < m_rectf_end(rbound); x++) - { - float sx = (x - rect.x) * m_width; - GfxColor color = gfx_paint_sample(gfx_peek(self)->fill, sx, sy); - gfx_buf_blend_unckeck(self->buf, x, y, color); - } - } - } -} - -void gfx_fill_rect(Gfx *self, MRectf rect, float radius) -{ - // needed because we need information for future gfx stroke invocation - gfx_begin_path(self); - gfx_rect(self, rect, radius); - gfx_close_path(self); - - if (radius == 0 && m_trans2_is_identity(gfx_peek(self)->trans)) - { - gfx_fill_rect_aligned(self, rect); - } - else - { - gfx_fill(self, GFX_FILL_EVENODD); - } -} - -void gfx_stroke_rect(Gfx *self, MRectf rect, float radius) -{ - gfx_begin_path(self); - gfx_rect(self, rect, radius); - gfx_close_path(self); - - gfx_stroke(self); -} - -void gfx_fill_ellipse(Gfx *self, MRectf rect) -{ - gfx_begin_path(self); - gfx_ellipse(self, rect); - gfx_close_path(self); - - gfx_fill(self, GFX_FILL_EVENODD); -} - -void gfx_stroke_ellipse(Gfx *self, MRectf rect) -{ - gfx_begin_path(self); - gfx_ellipse(self, rect); - gfx_close_path(self); - - gfx_stroke(self); -} - -void gfx_fill_path(Gfx *self, GfxPath *path, GfxFillRule rule) -{ - gfx_begin_path(self); - gfx_eval_path(self, path); - gfx_fill(self, rule); -} - -void gfx_stroke_path(Gfx *self, GfxPath *path) -{ - gfx_begin_path(self); - gfx_eval_path(self, path); - gfx_stroke(self); -} - -void gfx_fill_svg(Gfx *self, Str path, GfxFillRule rule) -{ - gfx_begin_path(self); - gfx_eval_svg(self, path); - gfx_fill(self, rule); -} - -void gfx_stroke_svg(Gfx *self, Str path) -{ - gfx_begin_path(self); - gfx_eval_svg(self, path); - gfx_stroke(self); -} diff --git a/sources/libs/brutal-gfx/gfx.h b/sources/libs/brutal-gfx/gfx.h deleted file mode 100644 index f4b3bd433..000000000 --- a/sources/libs/brutal-gfx/gfx.h +++ /dev/null @@ -1,149 +0,0 @@ -#pragma once - -#include -#include - -#include "font.h" -#include "paint.h" -#include "path.h" -#include "stroke.h" - -typedef struct -{ - MRectf clip; - MVec2f origin; - MTrans2 trans; - - GfxPaint fill; - GfxStroke stroke; - - GfxFont font_family; - GfxFontStyle font_style; -} GfxCtx; - -typedef enum -{ - GFX_FILL_EVENODD, - GFX_FILL_NONZERO, -} GfxFillRule; - -typedef struct -{ - float x; - int winding; -} GfxActiveEdge; - -typedef struct _Gfx -{ - bool begin; - Alloc *alloc; - GfxBuf buf; - Vec(GfxCtx) ctx; - - MEdges path; - MEdges stroke; - - Vec(GfxActiveEdge) active; - GfxPathFlattener flattener; - - float *scanline; - int scanline_len; -} Gfx; - -/* --- Lifetime ------------------------------------------------------------- */ - -void gfx_init(Gfx *self, Alloc *alloc); - -void gfx_deinit(Gfx *self); - -/* --- Cycle ---------------------------------------------------------------- */ - -void gfx_begin(Gfx *self, GfxBuf buf); - -void gfx_end(Gfx *self); - -void gfx_clear(Gfx *self, GfxColor color); - -/* --- Context -------------------------------------------------------------- */ - -void gfx_push(Gfx *self); - -void gfx_pop(Gfx *self); - -GfxCtx *gfx_peek(Gfx *self); - -void gfx_clip(Gfx *self, MRectf rect); - -void gfx_origin(Gfx *self, MVec2f pos); - -void gfx_trans(Gfx *self, MTrans2 trans); - -void gfx_fill_style(Gfx *self, GfxPaint paint); - -void gfx_fill_reset(Gfx *self); - -void gfx_stroke_style(Gfx *self, GfxStroke stroke); - -void gfx_stroke_reset(Gfx *self); - -void gfx_font_family(Gfx *self, GfxFont font); - -void gfx_font_style(Gfx *self, GfxFontStyle style); - -void gfx_color(Gfx *self, GfxColor color); - -/* --- Path Building -------------------------------------------------------- */ - -void gfx_begin_path(Gfx *self); - -void gfx_close_path(Gfx *self); - -void gfx_fill(Gfx *self, GfxFillRule rule); - -void gfx_stroke(Gfx *self); - -void gfx_debug(Gfx *self); - -void gfx_eval_cmd(Gfx *self, GfxPathCmd cmd); - -void gfx_eval_path(Gfx *self, GfxPath *path); - -void gfx_eval_svg(Gfx *self, Str path); - -void gfx_move_to(Gfx *self, MVec2f point); - -void gfx_line_to(Gfx *self, MVec2f point); - -void gfx_bezier_to(Gfx *self, MVec2f cp1, MVec2f cp2, MVec2f point); - -void gfx_quadratic_to(Gfx *self, MVec2f cp2, MVec2f point); - -void gfx_arc_to(Gfx *self, float rx, float ry, float angle, int flags, MVec2f point); - -void gfx_rect(Gfx *self, MRectf rect, float radius); - -void gfx_ellipse(Gfx *self, MRectf rect); - -/* --- Drawing -------------------------------------------------------------- */ - -void gfx_dot(Gfx *self, MVec2f dot, float size); - -void gfx_line(Gfx *self, MEdge line, float weight); - -void gfx_text(Gfx *self, MVec2f origin, Str text); - -void gfx_fill_rect(Gfx *self, MRectf rect, float radius); - -void gfx_stroke_rect(Gfx *self, MRectf rect, float radius); - -void gfx_fill_ellipse(Gfx *self, MRectf rect); - -void gfx_stroke_ellipse(Gfx *self, MRectf rect); - -void gfx_fill_path(Gfx *self, GfxPath *path, GfxFillRule rule); - -void gfx_stroke_path(Gfx *self, GfxPath *path); - -void gfx_fill_svg(Gfx *self, Str path, GfxFillRule rule); - -void gfx_stroke_svg(Gfx *self, Str path); diff --git a/sources/libs/brutal-gfx/ops.c b/sources/libs/brutal-gfx/ops.c deleted file mode 100644 index 01bc1de83..000000000 --- a/sources/libs/brutal-gfx/ops.c +++ /dev/null @@ -1,171 +0,0 @@ -#include - -#include "ops.h" - -/* --- gfx_ops_copy --------------------------------------------------------- */ - -void gfx_ops_copy_same_fmt(GfxBuf dst, GfxBuf src, int x, int y) -{ - for (int yy = 0; yy < src.height; yy++) - { - uint8_t *dst_pixels = ((uint8_t *)dst.buf) + dst.pitch * (yy + y); - uint8_t const *src_pixels = ((uint8_t const *)src.buf) + src.pitch * yy; - - mem_cpy(dst_pixels + x, src_pixels, src.width * gfx_fmt_size(src.fmt)); - } -} - -void gfx_ops_copy(GfxBuf dst, GfxBuf src, int x, int y) -{ - if (dst.fmt == src.fmt && - m_rectf_contains_rect( - gfx_buf_bound(src), - m_rectf_move(gfx_buf_bound(dst), m_vec2f(x, y)))) - { - return gfx_ops_copy_same_fmt(dst, src, x, y); - } - - for (int yy = 0; yy < src.height; yy++) - { - for (int xx = 0; xx < src.width; xx++) - { - GfxColor c = gfx_buf_load(src, xx, yy); - gfx_buf_store(dst, x + xx, y + yy, c); - } - } -} - -/* --- gfx_ops_flip --------------------------------------------------------- */ - -static void gfx_ops_flip_generic(GfxBuf dst, GfxBuf src, MRectf rect) -{ - for (int yy = rect.y; yy < rect.y + rect.height; yy++) - { - for (int xx = rect.x; xx < rect.x + rect.width; xx++) - { - GfxColor c = gfx_buf_load(src, xx, yy); - gfx_buf_store(dst, xx, yy, c); - } - } -} - -static void gfx_ops_flip_same_fmt(GfxBuf dst, GfxBuf src, MRectf rect) -{ - for (int yy = rect.y; yy < rect.y + rect.height; yy++) - { - uint8_t *dst_pixels = ((uint8_t *)dst.buf) + dst.pitch * yy; - uint8_t *src_pixels = ((uint8_t *)src.buf) + src.pitch * yy; - - memcpy(dst_pixels, src_pixels, rect.width * gfx_fmt_size(dst.fmt)); - } -} - -void gfx_ops_flip(GfxBuf dst, GfxBuf src, MRectf rect) -{ - if (dst.fmt == src.fmt) - { - gfx_ops_flip_same_fmt(dst, src, rect); - } - else - { - gfx_ops_flip_generic(dst, src, rect); - } -} - -/* --- gfx_ops_clear -------------------------------------------------------- */ - -static inline void gfx_ops_clear_common(GfxBuf self, GfxColor color, int const size) -{ - uint8_t pixel[64]; - gfx_fmt_store(self.fmt, color, &pixel); - uint8_t *target = self.buf; - - for (int y = 0; y < self.height; y++) - { - for (int x = 0; x < self.width; x++) - { - uint8_t *t = target + self.pitch * y + x * size; - memcpy(t, pixel, size); - } - } -} - -FLATTEN void gfx_ops_clear(GfxBuf self, GfxColor color) -{ - // This code might look redundant, but it let the compiler know the pixel size at compile time. - - size_t size = gfx_fmt_size(self.fmt); - - switch (size) - { - case 1: - gfx_ops_clear_common(self, color, 1); - break; - - case 2: - gfx_ops_clear_common(self, color, 2); - break; - - case 4: - gfx_ops_clear_common(self, color, 4); - break; - - case 8: - gfx_ops_clear_common(self, color, 8); - break; - - default: - assert_lower_equal(size, 64u); - gfx_ops_clear_common(self, color, size); - break; - } -} - -/* --- gfx_ops_rect --------------------------------------------------------- */ - -static inline void gfx_ops_rect_common(GfxBuf self, MRectf rect, GfxColor color, int const size) -{ - uint8_t pixel[64]; - gfx_fmt_store(self.fmt, color, &pixel); - uint8_t *target = self.buf; - - for (int y = rect.y; y < rect.y + rect.height; y++) - { - for (int x = rect.x; x < rect.x + rect.width; x++) - { - uint8_t *t = target + self.pitch * y + x * size; - memcpy(t, pixel, size); - } - } -} - -FLATTEN void gfx_ops_rect(GfxBuf self, MRectf rect, GfxColor color) -{ - // This code might look redundant, but it let the compiler know the pixel size at compile time. - - size_t size = gfx_fmt_size(self.fmt); - - switch (size) - { - case 1: - gfx_ops_rect_common(self, rect, color, 1); - break; - - case 2: - gfx_ops_rect_common(self, rect, color, 2); - break; - - case 4: - gfx_ops_rect_common(self, rect, color, 4); - break; - - case 8: - gfx_ops_rect_common(self, rect, color, 8); - break; - - default: - assert_lower_equal(size, 64u); - gfx_ops_rect_common(self, rect, color, size); - break; - } -} diff --git a/sources/libs/brutal-gfx/ops.h b/sources/libs/brutal-gfx/ops.h deleted file mode 100644 index 77592c511..000000000 --- a/sources/libs/brutal-gfx/ops.h +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once - -#include "buf.h" - -void gfx_ops_copy(GfxBuf dst, GfxBuf src, int x, int y); - -void gfx_ops_flip(GfxBuf dst, GfxBuf src, MRectf rect); - -void gfx_ops_clear(GfxBuf self, GfxColor color); - -void gfx_ops_rect(GfxBuf self, MRectf rect, GfxColor color); diff --git a/sources/libs/brutal-gfx/paint.h b/sources/libs/brutal-gfx/paint.h deleted file mode 100644 index 230618710..000000000 --- a/sources/libs/brutal-gfx/paint.h +++ /dev/null @@ -1,193 +0,0 @@ -#pragma once - -#include - -#include "buf.h" - -typedef enum -{ - GFX_PAINT_NONE, - - GFX_PAINT_FILL, - GFX_PAINT_GRADIENT, - GFX_PAINT_IMAGE, -} GfxPaintType; - -typedef struct -{ - float loc; - GfxColor color; -} GfxGradientStop; - -#define GFX_GRADIENT_MAX_STOPS (16) - -typedef struct -{ - size_t len; - GfxGradientStop stops[GFX_GRADIENT_MAX_STOPS]; -} GfxGradient; - -typedef struct -{ - GfxPaintType type; - - union - { - GfxColor fill_; - - GfxGradient *gradient_; - - struct - { - GfxBuf image; - MRectf source; - } image_; - }; -} GfxPaint; - -static inline GfxPaint gfx_paint_none(void) -{ - return (GfxPaint){ - .type = GFX_PAINT_NONE, - }; -} - -static inline GfxPaint gfx_paint_fill(GfxColor color) -{ - return (GfxPaint){ - .type = GFX_PAINT_FILL, - .fill_ = color, - }; -} - -static inline GfxPaint gfx_paint_gradient(GfxGradient *grad) -{ - return (GfxPaint){ - .type = GFX_PAINT_GRADIENT, - .gradient_ = grad, - }; -} - -static inline GfxPaint gfx_paint_image(GfxBuf buf, MRectf source) -{ - return (GfxPaint){ - .type = GFX_PAINT_IMAGE, - .image_ = { - buf, - source, - }, - }; -} - -static inline bool gfx_paint_is_constant(GfxPaint paint) -{ - switch (paint.type) - { - case GFX_PAINT_NONE: - case GFX_PAINT_FILL: - return true; - default: - return false; - } -} - -static inline GfxColor gfx_paint_sample(GfxPaint paint, float x, float y) -{ - UNUSED(y); - - switch (paint.type) - { - case GFX_PAINT_NONE: - return GFX_MAGENTA; - - case GFX_PAINT_FILL: - return paint.fill_; - - case GFX_PAINT_GRADIENT: - { - GfxGradient *gradient = paint.gradient_; - - if (gradient->len == 0) - { - return GFX_MAGENTA; - } - else if (gradient->len == 1 || x <= gradient->stops[0].loc) - { - return gradient->stops[0].color; - } - else if (x >= gradient->stops[gradient->len - 1].loc) - { - return gradient->stops[gradient->len - 1].color; - } - else - { - for (size_t i = 0; i + 1 < gradient->len; i++) - { - GfxGradientStop a = gradient->stops[i]; - GfxGradientStop b = gradient->stops[i + 1]; - - if (a.loc <= x && x < b.loc) - { - float l = ((x - a.loc) / (b.loc - a.loc)); - return gfx_lerp(a.color, b.color, l); - } - } - - return GFX_MAGENTA; - } - } - - case GFX_PAINT_IMAGE: - { - GfxBuf image = paint.image_.image; - MRectf source = paint.image_.source; - - if (image.width == 0 || image.height == 0) - { - return GFX_MAGENTA; - } - else if (source.width == 0 || source.height == 0) - { - return GFX_MAGENTA; - } - else if (x < 0 || x >= source.width) - { - return GFX_MAGENTA; - } - else if (y < 0 || y >= source.height) - { - return GFX_MAGENTA; - } - else - { - x *= source.width; - y *= source.height; - x += source.x; - y += source.y; - - return gfx_buf_sample(image, x, y); - } - } - - default: - panic$("Unkown paint type {}.", paint.type); - } -} - -static inline bool paint_is_visible(GfxPaint paint) -{ - switch (paint.type) - { - case GFX_PAINT_NONE: - return false; - - case GFX_PAINT_FILL: - return paint.fill_.a != 255; - - case GFX_PAINT_GRADIENT: - return true; - - default: - panic$("Unkown paint type {}.", paint.type); - } -} diff --git a/sources/libs/brutal-gfx/path.c b/sources/libs/brutal-gfx/path.c deleted file mode 100644 index df0a978e1..000000000 --- a/sources/libs/brutal-gfx/path.c +++ /dev/null @@ -1,559 +0,0 @@ -#include -#include -#include - -#include "path.h" - -/* --- Path Object ---------------------------------------------------------- */ - -void gfx_path_init(GfxPath *path, Alloc *alloc) -{ - vec_init(path, alloc); -} - -void gfx_path_deinit(GfxPath *path) -{ - vec_deinit(path); -} - -void gfx_path_dump(GfxPath *path) -{ - vec_foreach_v(cmd, path) - { - switch (cmd.type) - { - default: - log$("bad"); - break; - - case GFX_CMD_NOP: - log$("nop"); - break; - - case GFX_CMD_MOVE_TO: - log$("move-to ({}, {})", cmd.point.x, cmd.point.x); - break; - - case GFX_CMD_CLOSE_PATH: - log$("close-path"); - break; - - case GFX_CMD_LINE_TO: - log$("line-to ({}, {})", cmd.point.x, cmd.point.x); - break; - - case GFX_CMD_CUBIC_TO: - log$("cubic-to ({}, {})", cmd.point.x, cmd.point.x); - break; - - case GFX_CMD_QUADRATIC_TO: - log$("quadratic-to ({}, {})", cmd.point.x, cmd.point.x); - break; - - case GFX_CMD_ARC_TO: - log$("arc-to ({}, {})", cmd.point.x, cmd.point.x); - break; - } - } -} - -void gfx_path_move_to(GfxPath *path, MVec2f p) -{ - GfxPathCmd cmd = { - .type = GFX_CMD_MOVE_TO, - .point = p, - }; - - vec_push(path, cmd); -} - -void gfx_path_close(GfxPath *path) -{ - GfxPathCmd cmd = { - .type = GFX_CMD_CLOSE_PATH, - }; - - vec_push(path, cmd); -} - -void gfx_path_line_to(GfxPath *path, MVec2f p) -{ - GfxPathCmd cmd = { - .type = GFX_CMD_LINE_TO, - .point = p, - }; - - vec_push(path, cmd); -} - -void gfx_path_cubic_to(GfxPath *path, MVec2f cp1, MVec2f cp2, MVec2f p) -{ - GfxPathCmd cmd = { - .type = GFX_CMD_CUBIC_TO, - .cp1 = cp1, - .cp2 = cp2, - .point = p, - }; - - vec_push(path, cmd); -} - -void gfx_path_quadratic_to(GfxPath *path, MVec2f cp, MVec2f p) -{ - GfxPathCmd cmd = { - .type = GFX_CMD_QUADRATIC_TO, - .cp = cp, - .point = p, - }; - - vec_push(path, cmd); -} - -void gfx_path_arc_to(GfxPath *path, float rx, float ry, float angle, int flags, MVec2f p) -{ - GfxPathCmd cmd = { - .type = GFX_CMD_ARC_TO, - .rx = rx, - .ry = ry, - .angle = angle, - .flags = flags, - .point = p, - }; - - vec_push(path, cmd); -} - -/* --- Parser --------------------------------------------------------------- */ - -static void parse_whitespace(Scan *scan) -{ - scan_eat_any(scan, str$(GFX_PATH_WS)); -} - -static bool parse_whitespace_or_comma(Scan *scan) -{ - parse_whitespace(scan); - - if (scan_skip(scan, ',')) - { - parse_whitespace(scan); - return true; - } - - return false; -} - -static float parse_float(Scan *scan) -{ - double result = 0; - scan_next_double(scan, &result); - return result; -} - -static MVec2f parse_coordinate(Scan *scan) -{ - MVec2f result = {}; - result.x = parse_float(scan); - parse_whitespace_or_comma(scan); - result.y = parse_float(scan); - return result; -} - -static int parse_arcflags(Scan *scan) -{ - int flags = 0; - - if (scan_next(scan) == '1') - { - flags |= GFX_PATH_LARGE; - } - - parse_whitespace_or_comma(scan); - - if (scan_next(scan) == '1') - { - flags |= GFX_PATH_SWEEP; - } - - return flags; -} - -static MVec2f eval_reflected_cp(GfxPathParser *self) -{ - return m_vec2f_sub(m_vec2f_mul_v(self->last, 2), self->cp); -} - -static MVec2f eval_point(GfxPathParser *self, bool rel, MVec2f point) -{ - if (rel) - { - return m_vec2f_add(self->last, point); - } - else - { - return point; - } -} - -static void eval_cmd(GfxPathParser *self, GfxPathCmd cmd) -{ - cmd.cp1 = eval_point(self, cmd.rel, cmd.cp1); - cmd.cp2 = eval_point(self, cmd.rel, cmd.cp2); - cmd.point = eval_point(self, cmd.rel, cmd.point); - - if (cmd.type == GFX_CMD_MOVE_TO) - { - self->start = cmd.point; - } - - self->cp = cmd.cp; - self->last = cmd.point; - cmd.rel = false; - - self->eval(self->ctx, cmd); -} - -static void parse_cmd(GfxPathParser *self, Scan *scan, char c) -{ - GfxPathCmd cmd = {}; - cmd.rel = islower(c); - c = tolower(c); - - switch (c) - { - case 'm': - cmd.type = GFX_CMD_MOVE_TO; - cmd.point = parse_coordinate(scan); - cmd.cp = cmd.point; - break; - - case 'z': - cmd.type = GFX_CMD_CLOSE_PATH; - break; - - case 'l': - cmd.type = GFX_CMD_LINE_TO; - cmd.point = parse_coordinate(scan); - cmd.cp = cmd.point; - break; - - case 'h': - { - cmd.type = GFX_CMD_LINE_TO; - cmd.point = m_vec2f(parse_float(scan), cmd.rel ? 0 : self->last.y); - cmd.cp = cmd.point; - break; - } - - case 'v': - cmd.type = GFX_CMD_LINE_TO; - cmd.point = m_vec2f(cmd.rel ? 0 : self->last.x, parse_float(scan)); - cmd.cp = cmd.point; - break; - - case 'c': - cmd.type = GFX_CMD_CUBIC_TO; - cmd.cp1 = parse_coordinate(scan); - parse_whitespace_or_comma(scan); - cmd.cp2 = parse_coordinate(scan); - parse_whitespace_or_comma(scan); - cmd.point = parse_coordinate(scan); - break; - - case 's': - cmd.type = GFX_CMD_CUBIC_TO; - cmd.cp1 = eval_reflected_cp(self); - cmd.cp2 = parse_coordinate(scan); - parse_whitespace_or_comma(scan); - cmd.point = parse_coordinate(scan); - break; - - case 'q': - cmd.type = GFX_CMD_QUADRATIC_TO; - cmd.cp = parse_coordinate(scan); - parse_whitespace_or_comma(scan); - cmd.point = parse_coordinate(scan); - break; - - case 't': - cmd.type = GFX_CMD_QUADRATIC_TO; - cmd.cp = eval_reflected_cp(self); - cmd.point = parse_coordinate(scan); - break; - - case 'a': - cmd.type = GFX_CMD_ARC_TO; - - cmd.rx = parse_float(scan); - parse_whitespace_or_comma(scan); - cmd.ry = parse_float(scan); - parse_whitespace_or_comma(scan); - cmd.angle = parse_float(scan); - parse_whitespace_or_comma(scan); - cmd.flags = parse_arcflags(scan); - parse_whitespace_or_comma(scan); - cmd.point = parse_coordinate(scan); - cmd.cp = cmd.point; - break; - - default: - break; - } - - eval_cmd(self, cmd); -} - -void gfx_path_parse(GfxPathParser *self, Scan *scan) -{ - if (scan_skip_word(scan, str$("none"))) - { - return; - } - - while (!scan_ended(scan) && scan_curr_is_any(scan, str$(GFX_PATH_CMDS))) - { - char cmd = scan_next(scan); - - parse_whitespace(scan); - - do - { - parse_cmd(self, scan, cmd); - parse_whitespace_or_comma(scan); - - // If a moveto is followed by multiple pairs of coordinates, - // the subsequent pairs are treated as implicit lineto commands. - if (cmd == 'm') - cmd = 'l'; - if (cmd == 'M') - cmd = 'L'; - } while (!scan_ended(scan) && !scan_curr_is_any(scan, str$(GFX_PATH_CMDS))); - } -} - -/* --- Flattener ------------------------------------------------------------ */ - -static void flatten_line(GfxPathFlattener *self, MVec2f point) -{ - MEdge edge = m_edge_vec2(self->last, point); - if (m_edge_len(edge) > 0.01) - { - self->append(self->ctx, edge); - self->last = point; - } -} - -static void flatten_cubic_recusive(GfxPathFlattener *self, MVec2f a, MVec2f b, MVec2f c, MVec2f d, int depth) -{ - if (depth > GFX_FLATTEN_MAX_DEPTH) - { - return; - } - - MVec2f delta1 = m_vec2f_sub(d, a); - float delta2 = fabsf((b.x - d.x) * delta1.y - (b.y - d.y) * delta1.x); - float delta3 = fabsf((c.x - d.x) * delta1.y - (c.y - d.y) * delta1.x); - - if ((delta2 + delta3) * (delta2 + delta3) < GFX_FLATTEN_TOLERANCE * (delta1.x * delta1.x + delta1.y * delta1.y)) - { - flatten_line(self, d); - return; - } - - MVec2f ab = m_vec2f_div_v(m_vec2f_add(a, b), 2); - MVec2f bc = m_vec2f_div_v(m_vec2f_add(b, c), 2); - MVec2f cd = m_vec2f_div_v(m_vec2f_add(c, d), 2); - MVec2f abc = m_vec2f_div_v(m_vec2f_add(ab, bc), 2); - MVec2f bcd = m_vec2f_div_v(m_vec2f_add(bc, cd), 2); - MVec2f abcd = m_vec2f_div_v(m_vec2f_add(abc, bcd), 2); - - flatten_cubic_recusive(self, a, ab, abc, abcd, depth + 1); - flatten_cubic_recusive(self, abcd, bcd, cd, d, depth + 1); -} - -static void flatten_cubic(GfxPathFlattener *self, MVec2f cp1, MVec2f cp2, MVec2f point) -{ - flatten_cubic_recusive(self, self->last, cp1, cp2, point, 0); -} - -static void flatten_quadratic(GfxPathFlattener *self, MVec2f cp, MVec2f point) -{ - MVec2f previous = self->last; - - MVec2f cp1 = m_vec2f_add(previous, m_vec2f_mul_v(m_vec2f_sub(cp, previous), 2.0f / 3.0f)); - MVec2f cp2 = m_vec2f_add(point, m_vec2f_mul_v(m_vec2f_sub(cp, point), (2.0f / 3.0f))); - - flatten_cubic(self, cp1, cp2, point); -} - -static void flatten_arc(GfxPathFlattener *self, float rx, float ry, float angle, int flags, MVec2f point) -{ - // Ported from canvg (https://code.google.com/p/canvg/) - float x1 = self->last.x; // start point - float y1 = self->last.y; - float x2 = point.x; - float y2 = point.y; - - float dx = x1 - x2; - float dy = y1 - y2; - float d = sqrtf(dx * dx + dy * dy); - - if (d < 1e-6f || rx < 1e-6f || ry < 1e-6f) - { - // The arc degenerates to a line - flatten_line(self, point); - return; - } - - float rotx = angle / 180.0f * M_PI; // x rotation angle - float sinrx = sinf(rotx); - float cosrx = cosf(rotx); - - // Convert to center point parameterization. - // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes - - // 1) Compute x1', y1' - float x1p = cosrx * dx / 2.0f + sinrx * dy / 2.0f; - float y1p = -sinrx * dx / 2.0f + cosrx * dy / 2.0f; - - d = m_pow2f(x1p) / m_pow2f(rx) + m_pow2f(y1p) / m_pow2f(ry); - - if (d > 1) - { - d = sqrtf(d); - rx *= d; - ry *= d; - } - - // 2) Compute cx', cy' - float sa = m_pow2f(rx) * m_pow2f(ry) - m_pow2f(rx) * m_pow2f(y1p) - m_pow2f(ry) * m_pow2f(x1p); - float sb = m_pow2f(rx) * m_pow2f(y1p) + m_pow2f(ry) * m_pow2f(x1p); - - if (sa < 0.0f) - { - sa = 0.0f; - } - - float s = 0.0f; - - if (sb > 0.0f) - { - s = sqrtf(sa / sb); - } - - bool fa = !!(flags & GFX_PATH_LARGE); - bool fs = !!(flags & GFX_PATH_SWEEP); - - if (fa == fs) - { - s = -s; - } - - float cxp = s * rx * y1p / ry; - float cyp = s * -ry * x1p / rx; - - // 3) Compute cx,cy from cx',cy' - float cx = cosrx * cxp - sinrx * cyp + (x1 + x2) / 2.0f; - float cy = sinrx * cxp + cosrx * cyp + (y1 + y2) / 2.0f; - - // 4) Calculate theta1, and delta theta. - MVec2f u = m_vec2f((x1p - cxp) / rx, (y1p - cyp) / ry); - MVec2f v = m_vec2f((-x1p - cxp) / rx, (-y1p - cyp) / ry); - - float a1 = m_vec2f_angle_with(m_vec2f(1, 0), u); // Initial angle - float da = m_vec2f_angle_with(u, v); - - if (!fs && da > 0) - { - da -= 2 * M_PI; - } - else if (fs && da < 0) - { - da += 2 * M_PI; - } - - // Approximate the arc using cubic spline segments. - MTrans2 t = m_trans2( - cosrx, - sinrx, - -sinrx, - cosrx, - cx, - cy); - - // Split arc into max 90 degree segments. - // The loop assumes an Iter per end point (including start and end), this +1. - int ndivs = (int)(fabsf(da) / (M_PI * 0.5f) + 1.0f); - float hda = (da / (float)ndivs) / 2.0f; - float kappa = fabsf(4.0f / 3.0f * (1.0f - cosf(hda)) / sinf(hda)); - - if (da < 0.0f) - { - kappa = -kappa; - } - - MVec2f current = {}; - MVec2f ptan = {}; - - for (int i = 0; i <= ndivs; i++) - { - float a = a1 + da * (i / (float)ndivs); - - dx = cosf(a); - dy = sinf(a); - - MVec2f p = m_trans2_apply_point(t, m_vec2f(dx * rx, dy * ry)); - MVec2f tan = m_trans2_apply_vector(t, m_vec2f(-dy * rx * kappa, dx * ry * kappa)); - - if (i > 0) - { - flatten_cubic(self, m_vec2f_add(current, ptan), m_vec2f_sub(p, tan), p); - } - - current = p; - ptan = tan; - } - - flatten_line(self, point); -} - -void gfx_flattener_begin(GfxPathFlattener *self) -{ - self->start = (MVec2f){}; - self->last = (MVec2f){}; -} - -void gfx_flattener_flatten(GfxPathFlattener *self, GfxPathCmd cmd) -{ - switch (cmd.type) - { - default: - case GFX_CMD_NOP: - break; - - case GFX_CMD_MOVE_TO: - self->start = cmd.point; - self->last = self->start; - break; - - case GFX_CMD_CLOSE_PATH: - flatten_line(self, self->start); - break; - - case GFX_CMD_LINE_TO: - flatten_line(self, cmd.point); - break; - - case GFX_CMD_CUBIC_TO: - flatten_cubic(self, cmd.cp1, cmd.cp2, cmd.point); - break; - - case GFX_CMD_QUADRATIC_TO: - flatten_quadratic(self, cmd.cp, cmd.point); - break; - - case GFX_CMD_ARC_TO: - flatten_arc(self, cmd.rx, cmd.ry, cmd.angle, cmd.flags, cmd.point); - break; - } -} diff --git a/sources/libs/brutal-gfx/path.h b/sources/libs/brutal-gfx/path.h deleted file mode 100644 index 7425ddde7..000000000 --- a/sources/libs/brutal-gfx/path.h +++ /dev/null @@ -1,92 +0,0 @@ -#pragma once - -#include -#include - -/* --- Path Object ---------------------------------------------------------- */ - -typedef enum -{ - GFX_CMD_NOP, - - GFX_CMD_MOVE_TO, - GFX_CMD_CLOSE_PATH, - GFX_CMD_LINE_TO, - GFX_CMD_CUBIC_TO, - GFX_CMD_QUADRATIC_TO, - GFX_CMD_ARC_TO, -} GfxPathType; - -typedef struct -{ - GfxPathType type; - bool rel; - -#define GFX_PATH_LARGE (1 << 0) -#define GFX_PATH_SWEEP (1 << 1) - int flags; - float rx; - float ry; - float angle; - MVec2f cp1; - union - { - MVec2f cp2; - MVec2f cp; - }; - MVec2f point; -} GfxPathCmd; - -typedef Vec(GfxPathCmd) GfxPath; - -void gfx_path_init(GfxPath *path, Alloc *alloc); - -void gfx_path_deinit(GfxPath *path); - -void gfx_path_dump(GfxPath *path); - -void gfx_path_move_to(GfxPath *path, MVec2f p); - -void gfx_path_close(GfxPath *path); - -void gfx_path_line_to(GfxPath *path, MVec2f p); - -void gfx_path_cubic_to(GfxPath *path, MVec2f cp1, MVec2f cp2, MVec2f p); - -void gfx_path_quadratic_to(GfxPath *path, MVec2f cp, MVec2f p); - -void gfx_path_arc_to(GfxPath *path, float rx, float ry, float angle, int flags, MVec2f p); - -/* --- Parser --------------------------------------------------------------- */ - -#define GFX_PATH_CMDS "MmZzLlHhVvCcSsQqTtAa" -#define GFX_PATH_WS "\n\r\t " - -typedef struct -{ - MVec2f start; - MVec2f cp; - MVec2f last; - void (*eval)(void *ctx, GfxPathCmd cmd); - void *ctx; -} GfxPathParser; - -void gfx_path_parse(GfxPathParser *self, Scan *scan); - -/* --- Flattener ------------------------------------------------------------ */ - -typedef struct -{ - MVec2f start; - MVec2f last; - void (*append)(void *ctx, MEdge edge); - void *ctx; -} GfxPathFlattener; - -#define GFX_FLATTEN_MAX_DEPTH (16) - -#define GFX_FLATTEN_TOLERANCE (0.25f) - -void gfx_flattener_begin(GfxPathFlattener *self); - -void gfx_flattener_flatten(GfxPathFlattener *self, GfxPathCmd cmd); diff --git a/sources/libs/brutal-gfx/stroke.c b/sources/libs/brutal-gfx/stroke.c deleted file mode 100644 index 889f3d338..000000000 --- a/sources/libs/brutal-gfx/stroke.c +++ /dev/null @@ -1,81 +0,0 @@ -#include - -#include "stroke.h" - -void gfx_stroke_join(GfxStrokeJoin join, MEdges *stroke, MEdge curr, MEdge next, MAYBE_UNUSED float dist) -{ - if (join == GFX_STROKE_JOIN_MITTER) - { - MVec2f curr_vec = m_vec2f_sub(curr.end, curr.start); - MVec2f next_vec = m_vec2f_sub(next.start, next.end); - MVec2f diff_vec = m_vec2f_sub(next.start, curr.start); - - float j = m_vec2f_dot(next_vec, diff_vec) / m_vec2f_dot(curr_vec, next_vec); - MVec2f v = m_vec2f_add(curr.start, m_vec2f_mul_v(curr_vec, j)); - - vec_push(stroke, m_edge_vec2(curr.end, v)); - vec_push(stroke, m_edge_vec2(v, next.start)); - } - else if (join == GFX_STROKE_JOIN_ROUND) - { - int divisions = 16; - - MVec2f center = m_vec2f_div_v(m_vec2f_add(curr.end, next.start), 2); - - float curr_angle = m_vec2f_angle(m_vec2f_sub(curr.end, curr.start)).v; - float next_angle = m_vec2f_angle(m_vec2f_sub(next.start, next.end)).v; - - MVec2f p = curr.end; - for (int i = 0; i < divisions; i++) - { - float angle = curr_angle + i * (next_angle - curr_angle) / (divisions - 1); - MVec2f v = m_vec2f(center.x + cos(angle) * dist, center.y + sin(angle) * dist); - vec_push(stroke, m_edge_vec2(p, v)); - p = v; - } - } - else - { - vec_push(stroke, m_edge_vec2(curr.end, next.start)); - } -} - -void gfx_stroke_apply(GfxStroke style, MEdges *path, MEdges *stroke) -{ - float outer_dist, inner_dist; - - if (style.pos == GFX_STOKE_OUTSIDE) - { - outer_dist = style.width; - inner_dist = 0; - } - else if (style.pos == GFX_STOKE_INSIDE) - { - outer_dist = 0; - inner_dist = style.width; - } - else - { - outer_dist = style.width / 2; - inner_dist = -style.width / 2; - } - - for (int i = 0; i < vec_len(path); i++) - { - MEdge curr = vec_at(path, i); - - MEdge outer_curr = m_edge_parallel(curr, outer_dist); - MEdge inner_curr = m_edge_parallel(curr, inner_dist); - - MEdge next = vec_at(path, (i + 1) % vec_len(path)); - - MEdge outer_next = m_edge_parallel(next, outer_dist); - MEdge inner_next = m_edge_parallel(next, inner_dist); - - vec_push(stroke, outer_curr); - vec_push(stroke, m_edge_swap(inner_curr)); - - vec_push(stroke, m_edge_swap(m_edge_vec2(inner_curr.end, inner_next.start))); - gfx_stroke_join(style.join, stroke, outer_curr, outer_next, outer_dist); - } -} diff --git a/sources/libs/brutal-gfx/stroke.h b/sources/libs/brutal-gfx/stroke.h deleted file mode 100644 index b15937f21..000000000 --- a/sources/libs/brutal-gfx/stroke.h +++ /dev/null @@ -1,34 +0,0 @@ -#pragma once - -#include - -typedef enum -{ - GFX_STOKE_INSIDE, - GFX_STOKE_OUTSIDE, - GFX_STOKE_CENTER, -} GfxStrokePos; - -typedef enum -{ - GFX_STROKE_JOIN_BEVEL, - GFX_STROKE_JOIN_MITTER, - GFX_STROKE_JOIN_ROUND, -} GfxStrokeJoin; - -typedef enum -{ - GFX_STROKE_CAP_BUTT, - GFX_STROKE_CAP_ROUND, - GFX_STROKE_CAP_SQUARE, -} GfxStrokeCap; - -typedef struct -{ - GfxStrokePos pos; - GfxStrokeJoin join; - GfxStrokeCap cap; - float width; -} GfxStroke; - -void gfx_stroke_apply(GfxStroke style, MEdges *path, MEdges *stroke); diff --git a/sources/libs/brutal-gfx/vga.c b/sources/libs/brutal-gfx/vga.c deleted file mode 100644 index 913a6b4bd..000000000 --- a/sources/libs/brutal-gfx/vga.c +++ /dev/null @@ -1,4612 +0,0 @@ -#include "font.h" - -uint8_t gfx_font_builtin_data[256 * 16] = { - - /* 0 0x00 '^@' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 1 0x01 '^A' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0x81, /* 10000001 */ - 0xa5, /* 10100101 */ - 0x81, /* 10000001 */ - 0x81, /* 10000001 */ - 0xbd, /* 10111101 */ - 0x99, /* 10011001 */ - 0x81, /* 10000001 */ - 0x81, /* 10000001 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 2 0x02 '^B' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0xff, /* 11111111 */ - 0xdb, /* 11011011 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xc3, /* 11000011 */ - 0xe7, /* 11100111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 3 0x03 '^C' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x6c, /* 01101100 */ - 0xfe, /* 11111110 */ - 0xfe, /* 11111110 */ - 0xfe, /* 11111110 */ - 0xfe, /* 11111110 */ - 0x7c, /* 01111100 */ - 0x38, /* 00111000 */ - 0x10, /* 00010000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 4 0x04 '^D' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x10, /* 00010000 */ - 0x38, /* 00111000 */ - 0x7c, /* 01111100 */ - 0xfe, /* 11111110 */ - 0x7c, /* 01111100 */ - 0x38, /* 00111000 */ - 0x10, /* 00010000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 5 0x05 '^E' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x3c, /* 00111100 */ - 0xe7, /* 11100111 */ - 0xe7, /* 11100111 */ - 0xe7, /* 11100111 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 6 0x06 '^F' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x7e, /* 01111110 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0x7e, /* 01111110 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 7 0x07 '^G' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 8 0x08 '^H' */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xe7, /* 11100111 */ - 0xc3, /* 11000011 */ - 0xc3, /* 11000011 */ - 0xe7, /* 11100111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - - /* 9 0x09 '^I' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x3c, /* 00111100 */ - 0x66, /* 01100110 */ - 0x42, /* 01000010 */ - 0x42, /* 01000010 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 10 0x0a '^J' */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xc3, /* 11000011 */ - 0x99, /* 10011001 */ - 0xbd, /* 10111101 */ - 0xbd, /* 10111101 */ - 0x99, /* 10011001 */ - 0xc3, /* 11000011 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - - /* 11 0x0b '^K' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x1e, /* 00011110 */ - 0x0e, /* 00001110 */ - 0x1a, /* 00011010 */ - 0x32, /* 00110010 */ - 0x78, /* 01111000 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x78, /* 01111000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 12 0x0c '^L' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x3c, /* 00111100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x7e, /* 01111110 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 13 0x0d '^M' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x3f, /* 00111111 */ - 0x33, /* 00110011 */ - 0x3f, /* 00111111 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x70, /* 01110000 */ - 0xf0, /* 11110000 */ - 0xe0, /* 11100000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 14 0x0e '^N' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7f, /* 01111111 */ - 0x63, /* 01100011 */ - 0x7f, /* 01111111 */ - 0x63, /* 01100011 */ - 0x63, /* 01100011 */ - 0x63, /* 01100011 */ - 0x63, /* 01100011 */ - 0x67, /* 01100111 */ - 0xe7, /* 11100111 */ - 0xe6, /* 11100110 */ - 0xc0, /* 11000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 15 0x0f '^O' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0xdb, /* 11011011 */ - 0x3c, /* 00111100 */ - 0xe7, /* 11100111 */ - 0x3c, /* 00111100 */ - 0xdb, /* 11011011 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 16 0x10 '^P' */ - 0x00, /* 00000000 */ - 0x80, /* 10000000 */ - 0xc0, /* 11000000 */ - 0xe0, /* 11100000 */ - 0xf0, /* 11110000 */ - 0xf8, /* 11111000 */ - 0xfe, /* 11111110 */ - 0xf8, /* 11111000 */ - 0xf0, /* 11110000 */ - 0xe0, /* 11100000 */ - 0xc0, /* 11000000 */ - 0x80, /* 10000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 17 0x11 '^Q' */ - 0x00, /* 00000000 */ - 0x02, /* 00000010 */ - 0x06, /* 00000110 */ - 0x0e, /* 00001110 */ - 0x1e, /* 00011110 */ - 0x3e, /* 00111110 */ - 0xfe, /* 11111110 */ - 0x3e, /* 00111110 */ - 0x1e, /* 00011110 */ - 0x0e, /* 00001110 */ - 0x06, /* 00000110 */ - 0x02, /* 00000010 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 18 0x12 '^R' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x7e, /* 01111110 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x7e, /* 01111110 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 19 0x13 '^S' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x00, /* 00000000 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 20 0x14 '^T' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7f, /* 01111111 */ - 0xdb, /* 11011011 */ - 0xdb, /* 11011011 */ - 0xdb, /* 11011011 */ - 0x7b, /* 01111011 */ - 0x1b, /* 00011011 */ - 0x1b, /* 00011011 */ - 0x1b, /* 00011011 */ - 0x1b, /* 00011011 */ - 0x1b, /* 00011011 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 21 0x15 '^U' */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0x60, /* 01100000 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x6c, /* 01101100 */ - 0x38, /* 00111000 */ - 0x0c, /* 00001100 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 22 0x16 '^V' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0xfe, /* 11111110 */ - 0xfe, /* 11111110 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 23 0x17 '^W' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x7e, /* 01111110 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x7e, /* 01111110 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 24 0x18 '^X' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x7e, /* 01111110 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 25 0x19 '^Y' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x7e, /* 01111110 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 26 0x1a '^Z' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x0c, /* 00001100 */ - 0xfe, /* 11111110 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 27 0x1b '^[' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0xfe, /* 11111110 */ - 0x60, /* 01100000 */ - 0x30, /* 00110000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 28 0x1c '^\' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 29 0x1d '^]' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x28, /* 00101000 */ - 0x6c, /* 01101100 */ - 0xfe, /* 11111110 */ - 0x6c, /* 01101100 */ - 0x28, /* 00101000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 30 0x1e '^^' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x10, /* 00010000 */ - 0x38, /* 00111000 */ - 0x38, /* 00111000 */ - 0x7c, /* 01111100 */ - 0x7c, /* 01111100 */ - 0xfe, /* 11111110 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 31 0x1f '^_' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0xfe, /* 11111110 */ - 0x7c, /* 01111100 */ - 0x7c, /* 01111100 */ - 0x38, /* 00111000 */ - 0x38, /* 00111000 */ - 0x10, /* 00010000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 32 0x20 ' ' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 33 0x21 '!' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x3c, /* 00111100 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 34 0x22 '"' */ - 0x00, /* 00000000 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x24, /* 00100100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 35 0x23 '#' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0xfe, /* 11111110 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0xfe, /* 11111110 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 36 0x24 '$' */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc2, /* 11000010 */ - 0xc0, /* 11000000 */ - 0x7c, /* 01111100 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0x86, /* 10000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 37 0x25 '%' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc2, /* 11000010 */ - 0xc6, /* 11000110 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0xc6, /* 11000110 */ - 0x86, /* 10000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 38 0x26 '&' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0x38, /* 00111000 */ - 0x76, /* 01110110 */ - 0xdc, /* 11011100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 39 0x27 ''' */ - 0x00, /* 00000000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 40 0x28 '(' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x0c, /* 00001100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 41 0x29 ')' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 42 0x2a '*' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0xff, /* 11111111 */ - 0x3c, /* 00111100 */ - 0x66, /* 01100110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 43 0x2b '+' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x7e, /* 01111110 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 44 0x2c ',' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 45 0x2d '-' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 46 0x2e '.' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 47 0x2f '/' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x02, /* 00000010 */ - 0x06, /* 00000110 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0xc0, /* 11000000 */ - 0x80, /* 10000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 48 0x30 '0' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xd6, /* 11010110 */ - 0xd6, /* 11010110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x6c, /* 01101100 */ - 0x38, /* 00111000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 49 0x31 '1' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x38, /* 00111000 */ - 0x78, /* 01111000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 50 0x32 '2' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0x06, /* 00000110 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0xc0, /* 11000000 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 51 0x33 '3' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0x3c, /* 00111100 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 52 0x34 '4' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x0c, /* 00001100 */ - 0x1c, /* 00011100 */ - 0x3c, /* 00111100 */ - 0x6c, /* 01101100 */ - 0xcc, /* 11001100 */ - 0xfe, /* 11111110 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x1e, /* 00011110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 53 0x35 '5' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xfc, /* 11111100 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 54 0x36 '6' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x38, /* 00111000 */ - 0x60, /* 01100000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xfc, /* 11111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 55 0x37 '7' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0xc6, /* 11000110 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 56 0x38 '8' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 57 0x39 '9' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7e, /* 01111110 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0x0c, /* 00001100 */ - 0x78, /* 01111000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 58 0x3a ':' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 59 0x3b ';' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 60 0x3c '<' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x06, /* 00000110 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x0c, /* 00001100 */ - 0x06, /* 00000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 61 0x3d '=' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 62 0x3e '>' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x60, /* 01100000 */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x0c, /* 00001100 */ - 0x06, /* 00000110 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 63 0x3f '?' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 64 0x40 '@' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xde, /* 11011110 */ - 0xde, /* 11011110 */ - 0xde, /* 11011110 */ - 0xdc, /* 11011100 */ - 0xc0, /* 11000000 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 65 0x41 'A' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x10, /* 00010000 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 66 0x42 'B' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfc, /* 11111100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x7c, /* 01111100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0xfc, /* 11111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 67 0x43 'C' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x3c, /* 00111100 */ - 0x66, /* 01100110 */ - 0xc2, /* 11000010 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc2, /* 11000010 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 68 0x44 'D' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xf8, /* 11111000 */ - 0x6c, /* 01101100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x6c, /* 01101100 */ - 0xf8, /* 11111000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 69 0x45 'E' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0x66, /* 01100110 */ - 0x62, /* 01100010 */ - 0x68, /* 01101000 */ - 0x78, /* 01111000 */ - 0x68, /* 01101000 */ - 0x60, /* 01100000 */ - 0x62, /* 01100010 */ - 0x66, /* 01100110 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 70 0x46 'F' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0x66, /* 01100110 */ - 0x62, /* 01100010 */ - 0x68, /* 01101000 */ - 0x78, /* 01111000 */ - 0x68, /* 01101000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0xf0, /* 11110000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 71 0x47 'G' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x3c, /* 00111100 */ - 0x66, /* 01100110 */ - 0xc2, /* 11000010 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xde, /* 11011110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x66, /* 01100110 */ - 0x3a, /* 00111010 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 72 0x48 'H' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 73 0x49 'I' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 74 0x4a 'J' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x1e, /* 00011110 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x78, /* 01111000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 75 0x4b 'K' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xe6, /* 11100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x6c, /* 01101100 */ - 0x78, /* 01111000 */ - 0x78, /* 01111000 */ - 0x6c, /* 01101100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0xe6, /* 11100110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 76 0x4c 'L' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xf0, /* 11110000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0x62, /* 01100010 */ - 0x66, /* 01100110 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 77 0x4d 'M' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0xee, /* 11101110 */ - 0xfe, /* 11111110 */ - 0xfe, /* 11111110 */ - 0xd6, /* 11010110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 78 0x4e 'N' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0xe6, /* 11100110 */ - 0xf6, /* 11110110 */ - 0xfe, /* 11111110 */ - 0xde, /* 11011110 */ - 0xce, /* 11001110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 79 0x4f 'O' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 80 0x50 'P' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfc, /* 11111100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x7c, /* 01111100 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0xf0, /* 11110000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 81 0x51 'Q' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xd6, /* 11010110 */ - 0xde, /* 11011110 */ - 0x7c, /* 01111100 */ - 0x0c, /* 00001100 */ - 0x0e, /* 00001110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 82 0x52 'R' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfc, /* 11111100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x7c, /* 01111100 */ - 0x6c, /* 01101100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0xe6, /* 11100110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 83 0x53 'S' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x60, /* 01100000 */ - 0x38, /* 00111000 */ - 0x0c, /* 00001100 */ - 0x06, /* 00000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 84 0x54 'T' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0x7e, /* 01111110 */ - 0x5a, /* 01011010 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 85 0x55 'U' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 86 0x56 'V' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x6c, /* 01101100 */ - 0x38, /* 00111000 */ - 0x10, /* 00010000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 87 0x57 'W' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xd6, /* 11010110 */ - 0xd6, /* 11010110 */ - 0xd6, /* 11010110 */ - 0xfe, /* 11111110 */ - 0xee, /* 11101110 */ - 0x6c, /* 01101100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 88 0x58 'X' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x6c, /* 01101100 */ - 0x7c, /* 01111100 */ - 0x38, /* 00111000 */ - 0x38, /* 00111000 */ - 0x7c, /* 01111100 */ - 0x6c, /* 01101100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 89 0x59 'Y' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 90 0x5a 'Z' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0xc6, /* 11000110 */ - 0x86, /* 10000110 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0xc2, /* 11000010 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 91 0x5b '[' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x3c, /* 00111100 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 92 0x5c '\' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x80, /* 10000000 */ - 0xc0, /* 11000000 */ - 0xe0, /* 11100000 */ - 0x70, /* 01110000 */ - 0x38, /* 00111000 */ - 0x1c, /* 00011100 */ - 0x0e, /* 00001110 */ - 0x06, /* 00000110 */ - 0x02, /* 00000010 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 93 0x5d ']' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x3c, /* 00111100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 94 0x5e '^' */ - 0x10, /* 00010000 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 95 0x5f '_' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xff, /* 11111111 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 96 0x60 '`' */ - 0x00, /* 00000000 */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x0c, /* 00001100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 97 0x61 'a' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x78, /* 01111000 */ - 0x0c, /* 00001100 */ - 0x7c, /* 01111100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 98 0x62 'b' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xe0, /* 11100000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0x78, /* 01111000 */ - 0x6c, /* 01101100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 99 0x63 'c' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 100 0x64 'd' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x1c, /* 00011100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x3c, /* 00111100 */ - 0x6c, /* 01101100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 101 0x65 'e' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 102 0x66 'f' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x1c, /* 00011100 */ - 0x36, /* 00110110 */ - 0x32, /* 00110010 */ - 0x30, /* 00110000 */ - 0x78, /* 01111000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x78, /* 01111000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 103 0x67 'g' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x76, /* 01110110 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x7c, /* 01111100 */ - 0x0c, /* 00001100 */ - 0xcc, /* 11001100 */ - 0x78, /* 01111000 */ - 0x00, /* 00000000 */ - - /* 104 0x68 'h' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xe0, /* 11100000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0x6c, /* 01101100 */ - 0x76, /* 01110110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0xe6, /* 11100110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 105 0x69 'i' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x38, /* 00111000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 106 0x6a 'j' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0x00, /* 00000000 */ - 0x0e, /* 00001110 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - - /* 107 0x6b 'k' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xe0, /* 11100000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0x66, /* 01100110 */ - 0x6c, /* 01101100 */ - 0x78, /* 01111000 */ - 0x78, /* 01111000 */ - 0x6c, /* 01101100 */ - 0x66, /* 01100110 */ - 0xe6, /* 11100110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 108 0x6c 'l' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x38, /* 00111000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 109 0x6d 'm' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xec, /* 11101100 */ - 0xfe, /* 11111110 */ - 0xd6, /* 11010110 */ - 0xd6, /* 11010110 */ - 0xd6, /* 11010110 */ - 0xd6, /* 11010110 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 110 0x6e 'n' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xdc, /* 11011100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 111 0x6f 'o' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 112 0x70 'p' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xdc, /* 11011100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x7c, /* 01111100 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0xf0, /* 11110000 */ - 0x00, /* 00000000 */ - - /* 113 0x71 'q' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x76, /* 01110110 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x7c, /* 01111100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x1e, /* 00011110 */ - 0x00, /* 00000000 */ - - /* 114 0x72 'r' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xdc, /* 11011100 */ - 0x76, /* 01110110 */ - 0x66, /* 01100110 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0xf0, /* 11110000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 115 0x73 's' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0x60, /* 01100000 */ - 0x38, /* 00111000 */ - 0x0c, /* 00001100 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 116 0x74 't' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x10, /* 00010000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0xfc, /* 11111100 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x36, /* 00110110 */ - 0x1c, /* 00011100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 117 0x75 'u' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 118 0x76 'v' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x6c, /* 01101100 */ - 0x38, /* 00111000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 119 0x77 'w' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xd6, /* 11010110 */ - 0xd6, /* 11010110 */ - 0xd6, /* 11010110 */ - 0xfe, /* 11111110 */ - 0x6c, /* 01101100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 120 0x78 'x' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0x6c, /* 01101100 */ - 0x38, /* 00111000 */ - 0x38, /* 00111000 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 121 0x79 'y' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7e, /* 01111110 */ - 0x06, /* 00000110 */ - 0x0c, /* 00001100 */ - 0xf8, /* 11111000 */ - 0x00, /* 00000000 */ - - /* 122 0x7a 'z' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0xcc, /* 11001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 123 0x7b '{' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x0e, /* 00001110 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x70, /* 01110000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x0e, /* 00001110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 124 0x7c '|' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 125 0x7d '}' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x70, /* 01110000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x0e, /* 00001110 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x70, /* 01110000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 126 0x7e '~' */ - 0x00, /* 00000000 */ - 0x76, /* 01110110 */ - 0xdc, /* 11011100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 127 0x7f '' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x10, /* 00010000 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 128 0x80 '€' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x3c, /* 00111100 */ - 0x66, /* 01100110 */ - 0xc2, /* 11000010 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc2, /* 11000010 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x70, /* 01110000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 129 0x81 '' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xcc, /* 11001100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 130 0x82 '‚' */ - 0x00, /* 00000000 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 131 0x83 'ƒ' */ - 0x00, /* 00000000 */ - 0x10, /* 00010000 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0x00, /* 00000000 */ - 0x78, /* 01111000 */ - 0x0c, /* 00001100 */ - 0x7c, /* 01111100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 132 0x84 '„' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xcc, /* 11001100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x78, /* 01111000 */ - 0x0c, /* 00001100 */ - 0x7c, /* 01111100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 133 0x85 '…' */ - 0x00, /* 00000000 */ - 0x60, /* 01100000 */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x78, /* 01111000 */ - 0x0c, /* 00001100 */ - 0x7c, /* 01111100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 134 0x86 '†' */ - 0x00, /* 00000000 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0x38, /* 00111000 */ - 0x00, /* 00000000 */ - 0x78, /* 01111000 */ - 0x0c, /* 00001100 */ - 0x7c, /* 01111100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 135 0x87 '‡' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x18, /* 00011000 */ - 0x70, /* 01110000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 136 0x88 'ˆ' */ - 0x00, /* 00000000 */ - 0x10, /* 00010000 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 137 0x89 '‰' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 138 0x8a 'Š' */ - 0x00, /* 00000000 */ - 0x60, /* 01100000 */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 139 0x8b '‹' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x66, /* 01100110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x38, /* 00111000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 140 0x8c 'Œ' */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x66, /* 01100110 */ - 0x00, /* 00000000 */ - 0x38, /* 00111000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 141 0x8d '' */ - 0x00, /* 00000000 */ - 0x60, /* 01100000 */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x38, /* 00111000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 142 0x8e 'Ž' */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x10, /* 00010000 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 143 0x8f '' */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0x38, /* 00111000 */ - 0x10, /* 00010000 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 144 0x90 '' */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0x66, /* 01100110 */ - 0x62, /* 01100010 */ - 0x68, /* 01101000 */ - 0x78, /* 01111000 */ - 0x68, /* 01101000 */ - 0x62, /* 01100010 */ - 0x66, /* 01100110 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 145 0x91 '‘' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xec, /* 11101100 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x7e, /* 01111110 */ - 0xd8, /* 11011000 */ - 0xd8, /* 11011000 */ - 0x6e, /* 01101110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 146 0x92 '’' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x3e, /* 00111110 */ - 0x6c, /* 01101100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xfe, /* 11111110 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xce, /* 11001110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 147 0x93 '“' */ - 0x00, /* 00000000 */ - 0x10, /* 00010000 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 148 0x94 '”' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 149 0x95 '•' */ - 0x00, /* 00000000 */ - 0x60, /* 01100000 */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 150 0x96 '–' */ - 0x00, /* 00000000 */ - 0x30, /* 00110000 */ - 0x78, /* 01111000 */ - 0xcc, /* 11001100 */ - 0x00, /* 00000000 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 151 0x97 '—' */ - 0x00, /* 00000000 */ - 0x60, /* 01100000 */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 152 0x98 '˜' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7e, /* 01111110 */ - 0x06, /* 00000110 */ - 0x0c, /* 00001100 */ - 0x78, /* 01111000 */ - 0x00, /* 00000000 */ - - /* 153 0x99 '™' */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 154 0x9a 'š' */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 155 0x9b '›' */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 156 0x9c 'œ' */ - 0x00, /* 00000000 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0x64, /* 01100100 */ - 0x60, /* 01100000 */ - 0xf0, /* 11110000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0xe6, /* 11100110 */ - 0xfc, /* 11111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 157 0x9d '' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x7e, /* 01111110 */ - 0x18, /* 00011000 */ - 0x7e, /* 01111110 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 158 0x9e 'ž' */ - 0x00, /* 00000000 */ - 0xf8, /* 11111000 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xf8, /* 11111000 */ - 0xc4, /* 11000100 */ - 0xcc, /* 11001100 */ - 0xde, /* 11011110 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 159 0x9f 'Ÿ' */ - 0x00, /* 00000000 */ - 0x0e, /* 00001110 */ - 0x1b, /* 00011011 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x7e, /* 01111110 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0xd8, /* 11011000 */ - 0x70, /* 01110000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 160 0xa0 ' ' */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0x00, /* 00000000 */ - 0x78, /* 01111000 */ - 0x0c, /* 00001100 */ - 0x7c, /* 01111100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 161 0xa1 '¡' */ - 0x00, /* 00000000 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x00, /* 00000000 */ - 0x38, /* 00111000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 162 0xa2 '¢' */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 163 0xa3 '£' */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0x00, /* 00000000 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 164 0xa4 '¤' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x76, /* 01110110 */ - 0xdc, /* 11011100 */ - 0x00, /* 00000000 */ - 0xdc, /* 11011100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 165 0xa5 '¥' */ - 0x76, /* 01110110 */ - 0xdc, /* 11011100 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0xe6, /* 11100110 */ - 0xf6, /* 11110110 */ - 0xfe, /* 11111110 */ - 0xde, /* 11011110 */ - 0xce, /* 11001110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 166 0xa6 '¦' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x3c, /* 00111100 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0x3e, /* 00111110 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 167 0xa7 '§' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0x38, /* 00111000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 168 0xa8 '¨' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x00, /* 00000000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0xc0, /* 11000000 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 169 0xa9 '©' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 170 0xaa 'ª' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 171 0xab '«' */ - 0x00, /* 00000000 */ - 0x60, /* 01100000 */ - 0xe0, /* 11100000 */ - 0x62, /* 01100010 */ - 0x66, /* 01100110 */ - 0x6c, /* 01101100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0xdc, /* 11011100 */ - 0x86, /* 10000110 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x3e, /* 00111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 172 0xac '¬' */ - 0x00, /* 00000000 */ - 0x60, /* 01100000 */ - 0xe0, /* 11100000 */ - 0x62, /* 01100010 */ - 0x66, /* 01100110 */ - 0x6c, /* 01101100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x66, /* 01100110 */ - 0xce, /* 11001110 */ - 0x9a, /* 10011010 */ - 0x3f, /* 00111111 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 173 0xad '­' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x3c, /* 00111100 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 174 0xae '®' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x36, /* 00110110 */ - 0x6c, /* 01101100 */ - 0xd8, /* 11011000 */ - 0x6c, /* 01101100 */ - 0x36, /* 00110110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 175 0xaf '¯' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xd8, /* 11011000 */ - 0x6c, /* 01101100 */ - 0x36, /* 00110110 */ - 0x6c, /* 01101100 */ - 0xd8, /* 11011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 176 0xb0 '°' */ - 0x11, /* 00010001 */ - 0x44, /* 01000100 */ - 0x11, /* 00010001 */ - 0x44, /* 01000100 */ - 0x11, /* 00010001 */ - 0x44, /* 01000100 */ - 0x11, /* 00010001 */ - 0x44, /* 01000100 */ - 0x11, /* 00010001 */ - 0x44, /* 01000100 */ - 0x11, /* 00010001 */ - 0x44, /* 01000100 */ - 0x11, /* 00010001 */ - 0x44, /* 01000100 */ - 0x11, /* 00010001 */ - 0x44, /* 01000100 */ - - /* 177 0xb1 '±' */ - 0x55, /* 01010101 */ - 0xaa, /* 10101010 */ - 0x55, /* 01010101 */ - 0xaa, /* 10101010 */ - 0x55, /* 01010101 */ - 0xaa, /* 10101010 */ - 0x55, /* 01010101 */ - 0xaa, /* 10101010 */ - 0x55, /* 01010101 */ - 0xaa, /* 10101010 */ - 0x55, /* 01010101 */ - 0xaa, /* 10101010 */ - 0x55, /* 01010101 */ - 0xaa, /* 10101010 */ - 0x55, /* 01010101 */ - 0xaa, /* 10101010 */ - - /* 178 0xb2 '²' */ - 0xdd, /* 11011101 */ - 0x77, /* 01110111 */ - 0xdd, /* 11011101 */ - 0x77, /* 01110111 */ - 0xdd, /* 11011101 */ - 0x77, /* 01110111 */ - 0xdd, /* 11011101 */ - 0x77, /* 01110111 */ - 0xdd, /* 11011101 */ - 0x77, /* 01110111 */ - 0xdd, /* 11011101 */ - 0x77, /* 01110111 */ - 0xdd, /* 11011101 */ - 0x77, /* 01110111 */ - 0xdd, /* 11011101 */ - 0x77, /* 01110111 */ - - /* 179 0xb3 '³' */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* 180 0xb4 '´' */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0xf8, /* 11111000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* 181 0xb5 'µ' */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0xf8, /* 11111000 */ - 0x18, /* 00011000 */ - 0xf8, /* 11111000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* 182 0xb6 '¶' */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0xf6, /* 11110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* 183 0xb7 '·' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* 184 0xb8 '¸' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xf8, /* 11111000 */ - 0x18, /* 00011000 */ - 0xf8, /* 11111000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* 185 0xb9 '¹' */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0xf6, /* 11110110 */ - 0x06, /* 00000110 */ - 0xf6, /* 11110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* 186 0xba 'º' */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* 187 0xbb '»' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0x06, /* 00000110 */ - 0xf6, /* 11110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* 188 0xbc '¼' */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0xf6, /* 11110110 */ - 0x06, /* 00000110 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 189 0xbd '½' */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 190 0xbe '¾' */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0xf8, /* 11111000 */ - 0x18, /* 00011000 */ - 0xf8, /* 11111000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 191 0xbf '¿' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xf8, /* 11111000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* 192 0xc0 'À' */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x1f, /* 00011111 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 193 0xc1 'Á' */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0xff, /* 11111111 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 194 0xc2 'Â' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xff, /* 11111111 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* 195 0xc3 'Ã' */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x1f, /* 00011111 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* 196 0xc4 'Ä' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xff, /* 11111111 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 197 0xc5 'Å' */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0xff, /* 11111111 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* 198 0xc6 'Æ' */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x1f, /* 00011111 */ - 0x18, /* 00011000 */ - 0x1f, /* 00011111 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* 199 0xc7 'Ç' */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x37, /* 00110111 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* 200 0xc8 'È' */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x37, /* 00110111 */ - 0x30, /* 00110000 */ - 0x3f, /* 00111111 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 201 0xc9 'É' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x3f, /* 00111111 */ - 0x30, /* 00110000 */ - 0x37, /* 00110111 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* 202 0xca 'Ê' */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0xf7, /* 11110111 */ - 0x00, /* 00000000 */ - 0xff, /* 11111111 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 203 0xcb 'Ë' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xff, /* 11111111 */ - 0x00, /* 00000000 */ - 0xf7, /* 11110111 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* 204 0xcc 'Ì' */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x37, /* 00110111 */ - 0x30, /* 00110000 */ - 0x37, /* 00110111 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* 205 0xcd 'Í' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xff, /* 11111111 */ - 0x00, /* 00000000 */ - 0xff, /* 11111111 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 206 0xce 'Î' */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0xf7, /* 11110111 */ - 0x00, /* 00000000 */ - 0xf7, /* 11110111 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* 207 0xcf 'Ï' */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0xff, /* 11111111 */ - 0x00, /* 00000000 */ - 0xff, /* 11111111 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 208 0xd0 'Ð' */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0xff, /* 11111111 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 209 0xd1 'Ñ' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xff, /* 11111111 */ - 0x00, /* 00000000 */ - 0xff, /* 11111111 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* 210 0xd2 'Ò' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xff, /* 11111111 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* 211 0xd3 'Ó' */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x3f, /* 00111111 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 212 0xd4 'Ô' */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x1f, /* 00011111 */ - 0x18, /* 00011000 */ - 0x1f, /* 00011111 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 213 0xd5 'Õ' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x1f, /* 00011111 */ - 0x18, /* 00011000 */ - 0x1f, /* 00011111 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* 214 0xd6 'Ö' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x3f, /* 00111111 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* 215 0xd7 '×' */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0xff, /* 11111111 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* 216 0xd8 'Ø' */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0xff, /* 11111111 */ - 0x18, /* 00011000 */ - 0xff, /* 11111111 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* 217 0xd9 'Ù' */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0xf8, /* 11111000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 218 0xda 'Ú' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x1f, /* 00011111 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* 219 0xdb 'Û' */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - - /* 220 0xdc 'Ü' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - - /* 221 0xdd 'Ý' */ - 0xf0, /* 11110000 */ - 0xf0, /* 11110000 */ - 0xf0, /* 11110000 */ - 0xf0, /* 11110000 */ - 0xf0, /* 11110000 */ - 0xf0, /* 11110000 */ - 0xf0, /* 11110000 */ - 0xf0, /* 11110000 */ - 0xf0, /* 11110000 */ - 0xf0, /* 11110000 */ - 0xf0, /* 11110000 */ - 0xf0, /* 11110000 */ - 0xf0, /* 11110000 */ - 0xf0, /* 11110000 */ - 0xf0, /* 11110000 */ - 0xf0, /* 11110000 */ - - /* 222 0xde 'Þ' */ - 0x0f, /* 00001111 */ - 0x0f, /* 00001111 */ - 0x0f, /* 00001111 */ - 0x0f, /* 00001111 */ - 0x0f, /* 00001111 */ - 0x0f, /* 00001111 */ - 0x0f, /* 00001111 */ - 0x0f, /* 00001111 */ - 0x0f, /* 00001111 */ - 0x0f, /* 00001111 */ - 0x0f, /* 00001111 */ - 0x0f, /* 00001111 */ - 0x0f, /* 00001111 */ - 0x0f, /* 00001111 */ - 0x0f, /* 00001111 */ - 0x0f, /* 00001111 */ - - /* 223 0xdf 'ß' */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 224 0xe0 'à' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x76, /* 01110110 */ - 0xdc, /* 11011100 */ - 0xd8, /* 11011000 */ - 0xd8, /* 11011000 */ - 0xd8, /* 11011000 */ - 0xdc, /* 11011100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 225 0xe1 'á' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x78, /* 01111000 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xd8, /* 11011000 */ - 0xcc, /* 11001100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xcc, /* 11001100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 226 0xe2 'â' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 227 0xe3 'ã' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 228 0xe4 'ä' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0xc6, /* 11000110 */ - 0x60, /* 01100000 */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 229 0xe5 'å' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0xd8, /* 11011000 */ - 0xd8, /* 11011000 */ - 0xd8, /* 11011000 */ - 0xd8, /* 11011000 */ - 0xd8, /* 11011000 */ - 0x70, /* 01110000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 230 0xe6 'æ' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x7c, /* 01111100 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0xc0, /* 11000000 */ - 0x00, /* 00000000 */ - - /* 231 0xe7 'ç' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x76, /* 01110110 */ - 0xdc, /* 11011100 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 232 0xe8 'è' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 233 0xe9 'é' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x6c, /* 01101100 */ - 0x38, /* 00111000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 234 0xea 'ê' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0xee, /* 11101110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 235 0xeb 'ë' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x1e, /* 00011110 */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x0c, /* 00001100 */ - 0x3e, /* 00111110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 236 0xec 'ì' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0xdb, /* 11011011 */ - 0xdb, /* 11011011 */ - 0xdb, /* 11011011 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 237 0xed 'í' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x03, /* 00000011 */ - 0x06, /* 00000110 */ - 0x7e, /* 01111110 */ - 0xdb, /* 11011011 */ - 0xdb, /* 11011011 */ - 0xf3, /* 11110011 */ - 0x7e, /* 01111110 */ - 0x60, /* 01100000 */ - 0xc0, /* 11000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 238 0xee 'î' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x1c, /* 00011100 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0x7c, /* 01111100 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0x30, /* 00110000 */ - 0x1c, /* 00011100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 239 0xef 'ï' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 240 0xf0 'ð' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 241 0xf1 'ñ' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x7e, /* 01111110 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 242 0xf2 'ò' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x0c, /* 00001100 */ - 0x06, /* 00000110 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 243 0xf3 'ó' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x0c, /* 00001100 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 244 0xf4 'ô' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x0e, /* 00001110 */ - 0x1b, /* 00011011 */ - 0x1b, /* 00011011 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* 245 0xf5 'õ' */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0xd8, /* 11011000 */ - 0xd8, /* 11011000 */ - 0xd8, /* 11011000 */ - 0x70, /* 01110000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 246 0xf6 'ö' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 247 0xf7 '÷' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x76, /* 01110110 */ - 0xdc, /* 11011100 */ - 0x00, /* 00000000 */ - 0x76, /* 01110110 */ - 0xdc, /* 11011100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 248 0xf8 'ø' */ - 0x00, /* 00000000 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0x38, /* 00111000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 249 0xf9 'ù' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 250 0xfa 'ú' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 251 0xfb 'û' */ - 0x00, /* 00000000 */ - 0x0f, /* 00001111 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0xec, /* 11101100 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0x3c, /* 00111100 */ - 0x1c, /* 00011100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 252 0xfc 'ü' */ - 0x00, /* 00000000 */ - 0x6c, /* 01101100 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 253 0xfd 'ý' */ - 0x00, /* 00000000 */ - 0x3c, /* 00111100 */ - 0x66, /* 01100110 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x32, /* 00110010 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 254 0xfe 'þ' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0x7e, /* 01111110 */ - 0x7e, /* 01111110 */ - 0x7e, /* 01111110 */ - 0x7e, /* 01111110 */ - 0x7e, /* 01111110 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 255 0xff 'ÿ' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ -}; diff --git a/sources/libs/brutal-input/event.h b/sources/libs/brutal-input/event.h new file mode 100644 index 000000000..6dbf3bf58 --- /dev/null +++ b/sources/libs/brutal-input/event.h @@ -0,0 +1,62 @@ +#pragma once + +#include +#include + +enum +{ + INPUT_EVENT_IGNORE, + + INPUT_EVENT_ENTER, + INPUT_EVENT_LEAVE, + INPUT_EVENT_FOCUS_IN, + INPUT_EVENT_FOCUS_OUT, + + INPUT_EVENT_KEYBOARD_UP, + INPUT_EVENT_KEYBOARD_TYPED, + INPUT_EVENT_KEYBOARD_DOWN, + + INPUT_EVENT_MOUSE_UP, + INPUT_EVENT_MOUSE_DOWN, + INPUT_EVENT_MOUSE_MOVE, + INPUT_EVENT_MOUSE_SCROLL, +}; + +typedef uint8_t InputEventType; + +typedef struct +{ + KbKey key; + KbMod modifiers; + Rune rune; +} InputKeyboardEvent; + +typedef struct +{ + MVec2f position; + MVec2f offset; + MVec2f scroll; + MsBtns buttons; +} InputMouseEvent; + +typedef struct +{ + InputEventType type; + bool captured; + + union + { + InputKeyboardEvent keyboard; + InputMouseEvent mouse; + }; +} InputEvent; + +static inline bool input_event_is_keyboard(InputEvent *event) +{ + return event->type >= INPUT_EVENT_KEYBOARD_UP && event->type <= INPUT_EVENT_KEYBOARD_DOWN; +} + +static inline bool input_event_is_mouse(InputEvent *event) +{ + return event->type >= INPUT_EVENT_MOUSE_UP && event->type <= INPUT_EVENT_MOUSE_SCROLL; +} diff --git a/sources/libs/brutal-test/hook-gfx.h b/sources/libs/brutal-test/hook-gfx.h deleted file mode 100644 index 938027a68..000000000 --- a/sources/libs/brutal-test/hook-gfx.h +++ /dev/null @@ -1,74 +0,0 @@ -#pragma once - -#include - -#include "hook-alloc.h" - -/* --- Gfx Surface Hook ----------------------------------------------------- */ - -#define TEST_GFX_SURFACE_HOOK (0x932ba9ac9a4d7219) - -static void *__test_use_gfx_surface_ctor(void *) -{ - GfxSurface *surface = alloc_make(test_use_alloc(), GfxSurface); - gfx_surface_init(surface, 512, 512, GFX_FMT_RGBA8888, test_use_alloc()); - - test_hook_ref(test_self(), TEST_ALLOC_HOOK); - - return surface; -} - -static void __test_use_gfx_surface_dtor(void *surface) -{ - gfx_surface_deinit(surface); - alloc_free(test_use_alloc(), surface); - - test_hook_deref(test_self(), TEST_ALLOC_HOOK); -} - -static inline GfxSurface *test_use_gfx_surface(void) -{ - return test_hook_use( - test_self(), - TEST_GFX_SURFACE_HOOK, - nullptr, - __test_use_gfx_surface_ctor, - __test_use_gfx_surface_dtor); -} - -/* --- Gfx Hook ------------------------------------------------------------- */ - -#define TEST_GFX_HOOK (0x17c2235ee0c5c0a7) - -static void *__test_use_gfx_ctor(void *) -{ - Gfx *gfx = alloc_make(test_use_alloc(), Gfx); - gfx_init(gfx, test_use_alloc()); - gfx_begin(gfx, gfx_surface_buf(test_use_gfx_surface())); - gfx_clear(gfx, GFX_BLACK); - - test_hook_ref(test_self(), TEST_ALLOC_HOOK); - test_hook_ref(test_self(), TEST_GFX_SURFACE_HOOK); - - return gfx; -} - -static void __test_use_gfx_dtor(void *gfx) -{ - gfx_end(gfx); - gfx_deinit(gfx); - alloc_free(test_use_alloc(), gfx); - - test_hook_deref(test_self(), TEST_GFX_SURFACE_HOOK); - test_hook_deref(test_self(), TEST_ALLOC_HOOK); -} - -MAYBE_UNUSED static inline Gfx *test_use_gfx(void) -{ - return test_hook_use( - test_self(), - TEST_GFX_HOOK, - nullptr, - __test_use_gfx_ctor, - __test_use_gfx_dtor); -} diff --git a/sources/libs/brutal-ui/app.c b/sources/libs/brutal-ui/app.c deleted file mode 100644 index 164b45a4e..000000000 --- a/sources/libs/brutal-ui/app.c +++ /dev/null @@ -1,104 +0,0 @@ -#include -#include - -#include "app.h" -#include "win.h" - -static UiApp *_instance; - -UiApp *ui_app_self(void) -{ - assert_not_null(_instance); - return _instance; -} - -void ui_app_init(UiApp *self) -{ - vec_init(&self->windows, alloc_global()); - embed_app_init(self); - self->alive = true; - self->font = gfx_font_builtin(); - ui_palette_init(&self->palette); - _instance = self; -} - -void ui_app_deinit(UiApp *self) -{ - embed_app_deinit(self); - vec_deinit(&self->windows); -} - -int ui_app_run(UiApp *self) -{ - while (self->alive) - { - embed_app_wait(self); - ui_app_pump(self); - } - - return self->result; -} - -void ui_app_pump(UiApp *self) -{ - embed_app_pump(self); -} - -void ui_app_attach_win(UiApp *self, UiWin *win) -{ - vec_push(&self->windows, win); -} - -void ui_app_detach_win(UiApp *self, UiWin *win) -{ - vec_remove(&self->windows, win); -} - -void ui_app_exit(UiApp *self, int result) -{ - self->result = result; - self->alive = false; -} - -void ui_app_font(UiApp *self, GfxFont font) -{ - self->font = font; -} - -GfxColor ui_app_color(UiApp *self, UiRole role) -{ - GfxColor color = GFX_MAGENTA; - ui_palette_color(&self->palette, role, &color); - return color; -} - -void ui_app_overide_color(UiApp *self, UiRole role, GfxColor color) -{ - ui_palette_overide(&self->palette, role, color); -} - -int ui_app_benchmark(UiApp *self) -{ - int frames = 600; - Tick start = tick_now(); - - for (int f = 0; f < frames; f++) - { - vec_foreach_v(win, &self->windows) - { - ui_win_repaint(win); - } - } - - if (!self->alive) - { - return self->result; - } - - Tick end = tick_now(); - float fps = frames / ((float)(end - start) / 1000.0); - - log$("Benchmark ui app took: {}ms for {}frames ({}fps)", (end - start), frames, fps); - - return self->result; -} diff --git a/sources/libs/brutal-ui/app.h b/sources/libs/brutal-ui/app.h deleted file mode 100644 index c3ef756ff..000000000 --- a/sources/libs/brutal-ui/app.h +++ /dev/null @@ -1,45 +0,0 @@ -#pragma once - -#include -#include -#include - -#include "color.h" -#include "event.h" - -typedef struct _UiWin UiWin; - -typedef struct _UiApp -{ - EmbedApp embed; - bool alive; - int result; - GfxFont font; - UiPalette palette; - - Vec(UiWin *) windows; -} UiApp; - -UiApp *ui_app_self(void); - -void ui_app_init(UiApp *self); - -void ui_app_deinit(UiApp *self); - -int ui_app_run(UiApp *self); - -void ui_app_pump(UiApp *self); - -void ui_app_attach_win(UiApp *self, UiWin *win); - -void ui_app_detach_win(UiApp *self, UiWin *win); - -void ui_app_exit(UiApp *self, int result); - -void ui_app_font(UiApp *self, GfxFont font); - -GfxColor ui_app_color(UiApp *self, UiRole role); - -void ui_app_overide_color(UiApp *self, UiRole role, GfxColor color); - -int ui_app_benchmark(UiApp *self); diff --git a/sources/libs/brutal-ui/button.c b/sources/libs/brutal-ui/button.c deleted file mode 100644 index 00305803d..000000000 --- a/sources/libs/brutal-ui/button.c +++ /dev/null @@ -1,89 +0,0 @@ -#include "button.h" - -#include "color.h" -#include "font.h" -#include "text.h" - -void ui_button_repaint(UiView *self, Gfx *gfx) -{ - if (self->flags & UI_VIEW_ENABLED) - { - gfx_fill_style(gfx, gfx_paint_fill(UI_COLOR_BLUE)); - } - else - { - gfx_fill_style(gfx, gfx_paint_fill(UI_COLOR_BASE04)); - } - - gfx_fill_rect(gfx, ui_view_container(self), 4); - - if (ui_button$(self)->press) - { - gfx_fill_style(gfx, gfx_paint_fill(gfx_color_with_alpha(UI_COLOR_BASE09, 75))); - gfx_fill_rect(gfx, ui_view_container(self), 4); - } - else if (ui_button$(self)->over) - { - gfx_fill_style(gfx, gfx_paint_fill(gfx_color_with_alpha(UI_COLOR_BASE09, 50))); - gfx_fill_rect(gfx, ui_view_container(self), 4); - } -} - -void ui_button_event(UiView *self, UiEvent *event) -{ - switch (event->type) - { - case UI_EVENT_MOUSE_UP: - ui_button$(self)->press = false; - ui_view_should_repaint(self); - event->captured = true; - break; - - case UI_EVENT_MOUSE_DOWN: - ui_button$(self)->press = true; - ui_view_should_repaint(self); - event->captured = true; - break; - - case UI_EVENT_ENTER: - ui_button$(self)->over = true; - ui_view_should_repaint(self); - event->captured = true; - break; - - case UI_EVENT_LEAVE: - ui_button$(self)->over = false; - ui_view_should_repaint(self); - event->captured = true; - break; - - default: - break; - } -} - -UiView *ui_button_create(void) -{ - UiView *self = ui_view_create$(UiButton); - - self->flags |= UI_VIEW_GREEDY; - self->repaint = ui_button_repaint; - self->event = ui_button_event; - - ui_view_layout(self, "max-h-36"); - - return self; -} - -UiView *ui_button_create_with_text(Str text) -{ - UiView *self = ui_button_create(); - ui_view_layout(self, "dock p-8"); - - UiView *label = ui_text_create(text, UI_FONT_BODY); - ui_view_layout(label, "dock-fill g-center"); - - ui_view_mount(self, label); - - return self; -} diff --git a/sources/libs/brutal-ui/button.h b/sources/libs/brutal-ui/button.h deleted file mode 100644 index 63a2ebb77..000000000 --- a/sources/libs/brutal-ui/button.h +++ /dev/null @@ -1,24 +0,0 @@ -#pragma once - -#include "view.h" - -typedef enum -{ - UI_BUTTON_STYLE_DEFAULT, - UI_BUTTON_STYLE_TEXT, - UI_BUTTON_STYLE_FILLED, -} UiButtonStyle; - -typedef struct -{ - UiView base; - UiButtonStyle style; - bool press; - bool over; -} UiButton; - -#define ui_button$(VIEW) ((UiButton *)(VIEW)) - -UiView *ui_button_create(void); - -UiView *ui_button_create_with_text(Str text); diff --git a/sources/libs/brutal-ui/color.c b/sources/libs/brutal-ui/color.c deleted file mode 100644 index 5e3838b77..000000000 --- a/sources/libs/brutal-ui/color.c +++ /dev/null @@ -1,27 +0,0 @@ -#include "color.h" - -void ui_palette_init(UiPalette *self) -{ - ui_palette_overide(self, UI_COLOR_ROLE_TEXT, UI_COLOR_BASE09); - ui_palette_overide(self, UI_COLOR_ROLE_BODY, UI_COLOR_BASE00); - ui_palette_overide(self, UI_COLOR_ROLE_ACCENT, UI_COLOR_BLUE); - ui_palette_overide(self, UI_COLOR_ROLE_BORDER, UI_COLOR_BASE02); - ui_palette_overide(self, UI_COLOR_ROLE_PANEL, UI_COLOR_BASE01); -} - -bool ui_palette_color(UiPalette *self, UiRole role, GfxColor *color) -{ - if (self->colors[role].present) - { - *color = self->colors[role].color; - return true; - } - - return false; -} - -void ui_palette_overide(UiPalette *self, UiRole role, GfxColor color) -{ - self->colors[role].present = true; - self->colors[role].color = color; -} diff --git a/sources/libs/brutal-ui/color.h b/sources/libs/brutal-ui/color.h deleted file mode 100644 index 94538f369..000000000 --- a/sources/libs/brutal-ui/color.h +++ /dev/null @@ -1,54 +0,0 @@ -#pragma once - -#include - -#define UI_COLOR_DECL(NAME, VALUE) \ - static const GfxColor UI_COLOR_##NAME = gfx_hex(VALUE); - -UI_COLOR_DECL(LIGHT_RED, 0xFB7185) -UI_COLOR_DECL(LIGHT_BLUE, 0x60A5FA) -UI_COLOR_DECL(LIGHT_GREEN, 0x4ADE80) -UI_COLOR_DECL(LIGHT_ORANGE, 0xFB923C) -UI_COLOR_DECL(ORANGE, 0xF97316) -UI_COLOR_DECL(RED, 0xEF4444) -UI_COLOR_DECL(BLUE, 0x3B82F6) -UI_COLOR_DECL(GREEN, 0x22C55E) - -UI_COLOR_DECL(BASE00, 0x18181B) -UI_COLOR_DECL(BASE01, 0x27272A) -UI_COLOR_DECL(BASE02, 0x3F3F46) -UI_COLOR_DECL(BASE03, 0x52525B) -UI_COLOR_DECL(BASE04, 0x71717A) -UI_COLOR_DECL(BASE05, 0xA1A1AA) -UI_COLOR_DECL(BASE06, 0xD4D4D8) -UI_COLOR_DECL(BASE07, 0xE4E4E7) -UI_COLOR_DECL(BASE08, 0xF4F4F5) -UI_COLOR_DECL(BASE09, 0xFAFAFA) - -typedef enum -{ - UI_COLOR_ROLE_TEXT, - UI_COLOR_ROLE_BODY, - UI_COLOR_ROLE_ACCENT, - UI_COLOR_ROLE_BORDER, - UI_COLOR_ROLE_PANEL, - - __UI_COLOR_ROLE_COUNT, -} UiRole; - -typedef struct -{ - bool present; - GfxColor color; -} UiColor; - -typedef struct -{ - UiColor colors[__UI_COLOR_ROLE_COUNT]; -} UiPalette; - -void ui_palette_init(UiPalette *palette); - -bool ui_palette_color(UiPalette *palette, UiRole role, GfxColor *color); - -void ui_palette_overide(UiPalette *palette, UiRole role, GfxColor color); diff --git a/sources/libs/brutal-ui/event.c b/sources/libs/brutal-ui/event.c deleted file mode 100644 index fe069fce3..000000000 --- a/sources/libs/brutal-ui/event.c +++ /dev/null @@ -1 +0,0 @@ -#include "event.h" diff --git a/sources/libs/brutal-ui/event.h b/sources/libs/brutal-ui/event.h deleted file mode 100644 index ce5492505..000000000 --- a/sources/libs/brutal-ui/event.h +++ /dev/null @@ -1,62 +0,0 @@ -#pragma once - -#include -#include - -enum -{ - UI_EVENT_IGNORE, - - UI_EVENT_ENTER, - UI_EVENT_LEAVE, - UI_EVENT_FOCUS_IN, - UI_EVENT_FOCUS_OUT, - - UI_EVENT_KEYBOARD_UP, - UI_EVENT_KEYBOARD_TYPED, - UI_EVENT_KEYBOARD_DOWN, - - UI_EVENT_MOUSE_UP, - UI_EVENT_MOUSE_DOWN, - UI_EVENT_MOUSE_MOVE, - UI_EVENT_MOUSE_SCROLL, -}; - -typedef uint8_t UiEventType; - -typedef struct -{ - KbKey key; - KbMod modifiers; - Rune rune; -} UiKeyboardEvent; - -typedef struct -{ - MVec2f position; - MVec2f offset; - MVec2f scroll; - MsBtns buttons; -} UiMouseEvent; - -typedef struct -{ - UiEventType type; - bool captured; - - union - { - UiKeyboardEvent keyboard; - UiMouseEvent mouse; - }; -} UiEvent; - -static inline bool ui_event_is_keyboard(UiEvent *event) -{ - return event->type >= UI_EVENT_KEYBOARD_UP && event->type <= UI_EVENT_KEYBOARD_DOWN; -} - -static inline bool ui_event_is_mouse(UiEvent *event) -{ - return event->type >= UI_EVENT_MOUSE_UP && event->type <= UI_EVENT_MOUSE_SCROLL; -} diff --git a/sources/libs/brutal-ui/font.h b/sources/libs/brutal-ui/font.h deleted file mode 100644 index 85cfbe8be..000000000 --- a/sources/libs/brutal-ui/font.h +++ /dev/null @@ -1,6 +0,0 @@ -#include - -static const GfxFontStyle UI_FONT_BODY = {.scale = 1, .weight = GFX_FONT_MEDIUM}; -static const GfxFontStyle UI_FONT_BOLD = {.scale = 1, .weight = GFX_FONT_BOLD}; -static const GfxFontStyle UI_FONT_TITLE = {.scale = 2, .weight = GFX_FONT_BOLD}; -static const GfxFontStyle UI_FONT_LINK = {.scale = 1, .weight = GFX_FONT_MEDIUM}; diff --git a/sources/libs/brutal-ui/frame.c b/sources/libs/brutal-ui/frame.c deleted file mode 100644 index 629dc8b79..000000000 --- a/sources/libs/brutal-ui/frame.c +++ /dev/null @@ -1,6 +0,0 @@ -#include "frame.h" - -UiView *ui_frame_create(void) -{ - return ui_view_create$(UiFrame); -} diff --git a/sources/libs/brutal-ui/frame.h b/sources/libs/brutal-ui/frame.h deleted file mode 100644 index 0f166c824..000000000 --- a/sources/libs/brutal-ui/frame.h +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once - -#include "view.h" - -typedef struct -{ - UiView base; -} UiFrame; - -#define ui_frame$(VIEW) ((UiFrame *)(VIEW)) - -UiView *ui_frame_create(void); diff --git a/sources/libs/brutal-ui/icon.c b/sources/libs/brutal-ui/icon.c deleted file mode 100644 index f8110fa3b..000000000 --- a/sources/libs/brutal-ui/icon.c +++ /dev/null @@ -1,19 +0,0 @@ -#include "icon.h" - -void ui_icon_repaint(MAYBE_UNUSED UiView *self, Gfx *gfx) -{ - gfx_fill_style(gfx, gfx_paint_fill(GFX_RED)); - gfx_fill_rect(gfx, m_rectf(0, 0, 100, 100), 32); - - gfx_fill_style(gfx, gfx_paint_fill(GFX_WHITE)); - gfx_text(gfx, m_vec2f(16, 16), str$("BRUTAL")); -} - -UiView *ui_icon_create(void) -{ - UiView *self = ui_view_create$(UiIcon); - - self->repaint = ui_icon_repaint; - - return self; -} diff --git a/sources/libs/brutal-ui/icon.h b/sources/libs/brutal-ui/icon.h deleted file mode 100644 index dfdb63979..000000000 --- a/sources/libs/brutal-ui/icon.h +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once - -#include "view.h" - -typedef struct -{ - UiView base; -} UiIcon; - -#define ui_icon$(VIEW) ((UiIcon *)(VIEW)) - -UiView *ui_icon_create(void); diff --git a/sources/libs/brutal-ui/image.c b/sources/libs/brutal-ui/image.c deleted file mode 100644 index f64b47dff..000000000 --- a/sources/libs/brutal-ui/image.c +++ /dev/null @@ -1,28 +0,0 @@ -#include "image.h" - -void ui_image_repaint(UiView *self, Gfx *gfx) -{ - GfxBuf buf = gfx_surface_buf(&ui_image$(self)->surface); - MRectf bound = gfx_buf_bound(buf); - gfx_fill_style(gfx, gfx_paint_image(buf, bound)); - - MRectf dest = m_gravity_apply(self->layout.gravity, M_FLOW_LEFT_TO_RIGHT, bound, ui_view_content(self)); - gfx_fill_rect(gfx, dest, 0); -} - -void ui_image_deinit(UiView *self) -{ - gfx_surface_deinit(&ui_image$(self)->surface); -} - -UiView *ui_image_create(GfxSurface surface) -{ - UiView *self = ui_view_create$(UiImage); - - self->repaint = ui_image_repaint; - self->deinit = ui_image_deinit; - - ui_image$(self)->surface = surface; - - return self; -} diff --git a/sources/libs/brutal-ui/image.h b/sources/libs/brutal-ui/image.h deleted file mode 100644 index 6f2c5cc6b..000000000 --- a/sources/libs/brutal-ui/image.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -#include "view.h" - -typedef struct -{ - UiView base; - GfxSurface surface; -} UiImage; - -#define ui_image$(VIEW) ((UiImage *)(VIEW)) - -UiView *ui_image_create(GfxSurface surface); diff --git a/sources/libs/brutal-ui/layout.c b/sources/libs/brutal-ui/layout.c deleted file mode 100644 index e7d00b792..000000000 --- a/sources/libs/brutal-ui/layout.c +++ /dev/null @@ -1,192 +0,0 @@ -#include "layout.h" - -#include "view.h" - -/* --- Compute Size --------------------------------------------------------- */ - -static MVec2f ui_dock_size(UiView *views[], size_t len) -{ - MVec2f total_size = m_vec2f(0, 0); - MVec2f current_size = m_vec2f(0, 0); - MOrientation previous_orientation = M_ORIENTATION_NONE; - - for (size_t i = 0; i < len; i++) - { - UiLayout const *child_layout = &views[i]->layout; - MRectf child_bound = ui_view_size(views[i]); - MOrientation child_orientation = m_dock_orientation(child_layout->dock); - - if (previous_orientation != child_orientation) - { - total_size = m_vec2f_add(total_size, current_size); - - previous_orientation = child_orientation; - current_size = m_vec2f(0, 0); - } - - switch (child_orientation) - { - case M_ORIENTATION_NONE: - current_size = m_vec2f_max(current_size, child_bound.size); - break; - - case M_ORIENTATION_HORIZONTAL: - current_size.x += child_bound.size.x; - current_size.y = m_max(current_size.y, child_bound.size.y); - break; - - case M_ORIENTATION_VERTICAL: - current_size.x = m_max(current_size.x, child_bound.size.x); - current_size.y += child_bound.size.y; - break; - - default: - panic$("Invalid orientation"); - } - } - - total_size = m_vec2f_add(total_size, current_size); - - return total_size; -} - -static MVec2f ui_flex_size(UiLayout const *self, UiView *views[], size_t len) -{ - MVec2f size = m_vec2f(0, 0); - MFlow flow = self->flow; - - for (size_t i = 0; i < len; i++) - { - UiLayout const *child_layout = &views[i]->layout; - MRectf child_bound = ui_view_size(views[i]); - - if (child_layout->dock == M_DOCK_START || - child_layout->dock == M_DOCK_END || - child_layout->dock == M_DOCK_FILL) - { - size.x += m_flow_get_width(flow, child_bound); - } - - if (child_layout->dock == M_DOCK_TOP || - child_layout->dock == M_DOCK_BOTTOM || - child_layout->dock == M_DOCK_FILL) - { - size.y = m_max(m_flow_get_height(flow, child_bound), size.y); - } - } - - size.y += self->gaps.x * (len - 1); - - return size; -} - -static MVec2f ui_max_size(struct _UiView *views[], size_t len) -{ - MVec2f result = m_vec2f(0, 0); - - for (size_t i = 0; i < len; i++) - { - MVec2f size = ui_view_size(views[i]).size; - result.x = m_max(result.x, size.x); - result.y = m_max(result.y, size.y); - } - - return result; -} - -MVec2f ui_layout_size(UiLayout const *self, struct _UiView *views[], size_t len) -{ - switch (self->type) - { - case UI_LAYOUT_DOCK: - return ui_dock_size(views, len); - - case UI_LAYOUT_FLEX: - return ui_flex_size(self, views, len); - - default: - return ui_max_size(views, len); - } -} - -/* --- Layout --------------------------------------------------------------- */ - -static void ui_dock_run(UiLayout const *self, MRectf container, UiView *views[], size_t len) -{ - for (size_t i = 0; i < len; i++) - { - UiView *child = views[i]; - MRectf content = ui_view_size(child); - content = m_dock_apply(child->layout.dock, self->flow, content, &container); - ui_view_place(child, content); - } -} - -static void ui_flex_run(UiLayout const *self, MRectf container, UiView *views[], size_t len) -{ - MFlow flow = self->flow; - - float grows = 0; - float total = 0; - - for (size_t i = 0; i < len; i++) - { - UiView *child = views[i]; - UiLayout child_layout = child->layout; - - if (child_layout.grow > 0.01) - { - grows += child_layout.grow; - } - else - { - total += m_flow_get_width(flow, ui_view_size(child)); - } - } - - float all = m_flow_get_width(flow, container) - self->gaps.x * (len - 1); - float grow_total = m_max(0, all - total); - float grow_unit = (grow_total) / m_max(1, grows); - float start = m_flow_get_start(flow, container); - - for (size_t i = 0; i < len; i++) - { - UiView *child = views[i]; - UiLayout child_layout = child->layout; - MRectf child_bound = {}; - - if (child_layout.grow > 0.01) - { - child_bound = m_flow_set_start(flow, child_bound, start); - child_bound = m_flow_set_width(flow, child_bound, grow_unit * child_layout.grow); - } - else - { - child_bound = ui_view_size(child); - child_bound = m_flow_set_x(flow, child_bound, start); - } - - child_bound = m_flow_set_y(flow, child_bound, m_flow_get_top(flow, container)); - child_bound = m_flow_set_height(flow, child_bound, m_flow_get_height(flow, container)); - - ui_view_place(child, child_bound); - start += m_flow_get_width(flow, child_bound) + self->gaps.x; - } -} - -void ui_layout_run(UiLayout const *self, MRectf container, UiView *views[], size_t len) -{ - switch (self->type) - { - case UI_LAYOUT_DOCK: - ui_dock_run(self, container, views, len); - break; - - case UI_LAYOUT_FLEX: - ui_flex_run(self, container, views, len); - break; - - default: - break; - } -} diff --git a/sources/libs/brutal-ui/layout.h b/sources/libs/brutal-ui/layout.h deleted file mode 100644 index 00328d533..000000000 --- a/sources/libs/brutal-ui/layout.h +++ /dev/null @@ -1,67 +0,0 @@ -#pragma once - -#include -#include - -struct _UiView; - -/* --- Size ----------------------------------------------------------------- */ - -typedef struct -{ - MVec2f min; - MVec2f max; -} UiSize; - -static inline MVec2f ui_size_apply(UiSize size, MVec2f vec) -{ - if (size.min.width) - { - vec.width = m_max(vec.width, size.min.width); - } - - if (size.min.height) - { - vec.height = m_max(vec.height, size.min.height); - } - - if (size.max.width) - { - vec.width = m_min(vec.width, size.max.width); - } - - if (size.max.height) - { - vec.height = m_min(vec.height, size.max.height); - } - - return vec; -} - -/* --- Layouts -------------------------------------------------------------- */ - -typedef enum -{ - UI_LAYOUT_DOCK, - UI_LAYOUT_FLEX, - UI_LAYOUT_GRID, -} UiLayoutType; - -typedef struct -{ - UiLayoutType type; - - UiSize size; - MDock dock; - MGravity gravity; - MGravity placement; - MSpacing padding; - MSpacing margin; - MFlow flow; - float grow; - MVec2f gaps; -} UiLayout; - -MVec2f ui_layout_size(UiLayout const *self, struct _UiView *views[], size_t len); - -void ui_layout_run(UiLayout const *layout, MRectf container, struct _UiView *views[], size_t len); diff --git a/sources/libs/brutal-ui/panel.c b/sources/libs/brutal-ui/panel.c deleted file mode 100644 index 7425c8f00..000000000 --- a/sources/libs/brutal-ui/panel.c +++ /dev/null @@ -1,18 +0,0 @@ -#include "panel.h" - -void ui_panel_repaint(UiView *self, Gfx *gfx) -{ - gfx_fill_style(gfx, gfx_paint_fill(ui_panel$(self)->color)); - gfx_fill_rect(gfx, ui_view_container(self), 0); -} - -UiView *ui_panel_create(GfxColor color) -{ - UiView *self = ui_view_create$(UiPanel); - - self->repaint = ui_panel_repaint; - - ui_panel$(self)->color = color; - - return self; -} diff --git a/sources/libs/brutal-ui/panel.h b/sources/libs/brutal-ui/panel.h deleted file mode 100644 index d641c8991..000000000 --- a/sources/libs/brutal-ui/panel.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -#include "view.h" - -typedef struct -{ - UiView base; - GfxColor color; -} UiPanel; - -#define ui_panel$(VIEW) ((UiPanel *)(VIEW)) - -UiView *ui_panel_create(GfxColor color); diff --git a/sources/libs/brutal-ui/parser.c b/sources/libs/brutal-ui/parser.c deleted file mode 100644 index 30b1070f9..000000000 --- a/sources/libs/brutal-ui/parser.c +++ /dev/null @@ -1,399 +0,0 @@ -#include -#include - -#include "parser.h" - -#define FOR_EACH_KEYWORDS(KEYWORD) \ - KEYWORD(UNKNOW) \ - KEYWORD(NONE) \ - KEYWORD(RESET) \ - \ - KEYWORD(DOCK) \ - KEYWORD(FLEX) \ - KEYWORD(GRID) \ - \ - KEYWORD(G) \ - KEYWORD(GRAVITY) \ - KEYWORD(PLACE) \ - KEYWORD(PLACEMENT) \ - KEYWORD(VERTICAL) \ - KEYWORD(HORIZONTAL) \ - KEYWORD(MIN) \ - KEYWORD(MAX) \ - KEYWORD(W) \ - KEYWORD(WIDTH) \ - KEYWORD(H) \ - KEYWORD(HEIGHT) \ - KEYWORD(X) \ - KEYWORD(Y) \ - \ - KEYWORD(FILL) \ - KEYWORD(HFILL) \ - KEYWORD(VFILL) \ - KEYWORD(S) \ - KEYWORD(START) \ - KEYWORD(T) \ - KEYWORD(TOP) \ - KEYWORD(E) \ - KEYWORD(END) \ - KEYWORD(B) \ - KEYWORD(BOTTOM) \ - KEYWORD(COVER) \ - KEYWORD(FIT) \ - KEYWORD(CENTER) \ - KEYWORD(HCENTER) \ - KEYWORD(VCENTER) \ - KEYWORD(ALL) \ - \ - KEYWORD(P) \ - KEYWORD(PADDING) \ - KEYWORD(M) \ - KEYWORD(MARGIN) \ - \ - KEYWORD(LTR) \ - KEYWORD(RTL) \ - KEYWORD(TTB) \ - KEYWORD(BTT) \ - KEYWORD(GAPS) \ - KEYWORD(GROW) - -typedef enum -{ -#define ITER(NAME) UI_KW_##NAME, - FOR_EACH_KEYWORDS(ITER) -#undef ITER -} UiLayoutKeyword; - -static const char *ui_layout_keyword_names[] = { -#define ITER(NAME) #NAME, - FOR_EACH_KEYWORDS(ITER) -#undef ITER -}; - -static UiLayoutKeyword from_string(Str str) -{ - for (size_t i = 0; i < sizeof(ui_layout_keyword_names) / sizeof(const char *); i++) - { - if (str_eq_ci(str, str$(ui_layout_keyword_names[i]))) - { - return (UiLayoutKeyword)i; - } - } - - return UI_KW_UNKNOW; -} - -static UiLayoutKeyword next_keyword(Scan *scan) -{ - scan_begin(scan); - scan_eat_match(scan, isalpha); - return from_string(scan_end(scan)); -} - -static void eat_whitespace(Scan *scan) -{ - scan_eat_match(scan, isblank); -} - -static MVec2f parse_vec(Scan *scan, MVec2f vec) -{ - switch (next_keyword(scan)) - { - case UI_KW_X: - case UI_KW_W: - case UI_KW_WIDTH: - scan_expect(scan, '-'); - scan_next_float(scan, &vec.width); - break; - - case UI_KW_Y: - case UI_KW_H: - case UI_KW_HEIGHT: - scan_expect(scan, '-'); - scan_next_float(scan, &vec.height); - break; - - default: - scan_throw(scan, str$("Expected width or height"), nullstr); - } - - return vec; -} - -static MGravity parse_gravity(Scan *scan, MGravity gravity) -{ - switch (next_keyword(scan)) - { - case UI_KW_RESET: - gravity = M_GRAVITY_NONE; - break; - - case UI_KW_S: - case UI_KW_START: - gravity |= M_GRAVITY_START; - break; - - case UI_KW_E: - case UI_KW_END: - gravity |= M_GRAVITY_END; - break; - - case UI_KW_T: - case UI_KW_TOP: - gravity |= M_GRAVITY_TOP; - break; - - case UI_KW_B: - case UI_KW_BOTTOM: - gravity |= M_GRAVITY_BOTTOM; - break; - - case UI_KW_CENTER: - gravity |= M_GRAVITY_CENTER; - break; - - case UI_KW_VCENTER: - gravity |= M_GRAVITY_VCENTER; - break; - - case UI_KW_HCENTER: - gravity |= M_GRAVITY_HCENTER; - break; - - case UI_KW_FILL: - gravity |= M_GRAVITY_FILL; - break; - - case UI_KW_VFILL: - gravity |= M_GRAVITY_VFILL; - break; - - case UI_KW_HFILL: - gravity |= M_GRAVITY_HFILL; - break; - - default: - scan_throw(scan, str$("Expected gravity"), nullstr); - break; - } - - return gravity; -} - -static MSpacing parse_spacing(Scan *scan, MSpacing spacing) -{ - if (isdigit(scan_curr(scan))) - { - scan_next_float(scan, &spacing.start); - spacing.end = spacing.start; - spacing.top = spacing.start; - spacing.bottom = spacing.start; - return spacing; - } - - switch (next_keyword(scan)) - { - case UI_KW_RESET: - spacing = (MSpacing){}; - break; - - case UI_KW_S: - case UI_KW_START: - scan_expect(scan, '-'); - scan_next_float(scan, &spacing.start); - break; - - case UI_KW_E: - case UI_KW_END: - scan_expect(scan, '-'); - scan_next_float(scan, &spacing.end); - break; - - case UI_KW_T: - case UI_KW_TOP: - scan_expect(scan, '-'); - scan_next_float(scan, &spacing.top); - break; - - case UI_KW_B: - case UI_KW_BOTTOM: - scan_expect(scan, '-'); - scan_next_float(scan, &spacing.bottom); - break; - - case UI_KW_X: - scan_expect(scan, '-'); - scan_next_float(scan, &spacing.start); - spacing.end = spacing.start; - break; - - case UI_KW_Y: - scan_expect(scan, '-'); - scan_next_float(scan, &spacing.top); - spacing.bottom = spacing.top; - break; - - case UI_KW_ALL: - scan_expect(scan, '-'); - scan_next_float(scan, &spacing.start); - spacing.end = spacing.start; - spacing.top = spacing.start; - spacing.bottom = spacing.start; - break; - - default: - scan_throw(scan, str$("Expected spacing"), nullstr); - break; - } - - return spacing; -} - -void ui_parse_layout(UiLayout *layout, Scan *scan) -{ - eat_whitespace(scan); - - while (!scan_ended(scan)) - { - switch (next_keyword(scan)) - { - case UI_KW_RESET: - *layout = (UiLayout){}; - break; - - case UI_KW_DOCK: - if (scan_skip(scan, '-')) - { - switch (next_keyword(scan)) - { - case UI_KW_NONE: - layout->dock = M_DOCK_NONE; - break; - - case UI_KW_FILL: - layout->dock = M_DOCK_FILL; - break; - - case UI_KW_S: - case UI_KW_START: - layout->dock = M_DOCK_START; - break; - - case UI_KW_E: - case UI_KW_END: - layout->dock = M_DOCK_END; - break; - - case UI_KW_T: - case UI_KW_TOP: - layout->dock = M_DOCK_TOP; - break; - - case UI_KW_B: - case UI_KW_BOTTOM: - layout->dock = M_DOCK_BOTTOM; - break; - - default: - scan_throw(scan, str$("Expected dock"), nullstr); - break; - } - } - else - { - layout->type = UI_LAYOUT_DOCK; - } - break; - - case UI_KW_FLEX: - layout->type = UI_LAYOUT_FLEX; - break; - - case UI_KW_GRID: - layout->type = UI_LAYOUT_GRID; - break; - - case UI_KW_MIN: - scan_expect(scan, '-'); - layout->size.min = parse_vec(scan, layout->size.min); - break; - - case UI_KW_MAX: - scan_expect(scan, '-'); - layout->size.max = parse_vec(scan, layout->size.max); - break; - - case UI_KW_G: - case UI_KW_GRAVITY: - scan_expect(scan, '-'); - layout->gravity = parse_gravity(scan, layout->gravity); - break; - - case UI_KW_PLACE: - case UI_KW_PLACEMENT: - scan_expect(scan, '-'); - layout->placement = parse_gravity(scan, layout->placement); - break; - - case UI_KW_P: - case UI_KW_PADDING: - scan_expect(scan, '-'); - layout->padding = parse_spacing(scan, layout->padding); - break; - - case UI_KW_M: - case UI_KW_MARGIN: - scan_expect(scan, '-'); - layout->margin = parse_spacing(scan, layout->margin); - break; - - case UI_KW_LTR: - layout->flow = M_FLOW_LEFT_TO_RIGHT; - break; - - case UI_KW_RTL: - layout->flow = M_FLOW_RIGHT_TO_LEFT; - break; - - case UI_KW_TTB: - layout->flow = M_FLOW_TOP_TO_BOTTOM; - break; - - case UI_KW_BTT: - layout->flow = M_FLOW_BOTTOM_TO_TOP; - break; - - case UI_KW_GROW: - scan_expect(scan, '-'); - scan_next_float(scan, &layout->grow); - break; - - case UI_KW_GAPS: - scan_expect(scan, '-'); - if (isdigit(scan_curr(scan))) - { - scan_next_float(scan, &layout->gaps.x); - } - else - { - layout->gaps = parse_vec(scan, layout->gaps); - } - - break; - - default: - scan_throw(scan, str$("Unexpected keyword"), nullstr); - break; - } - - eat_whitespace(scan); - } -} - -void ui_parse_layout_str(UiLayout *layout, Str str) -{ - Scan scan; - scan_init(&scan, str); - ui_parse_layout(layout, &scan); - assert_truth(!scan_dump_error(&scan, io_chan_out())); -} diff --git a/sources/libs/brutal-ui/parser.h b/sources/libs/brutal-ui/parser.h deleted file mode 100644 index 3fb67dd8e..000000000 --- a/sources/libs/brutal-ui/parser.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -#include - -#include "layout.h" - -void ui_parse_layout(UiLayout *layout, Scan *scan); - -void ui_parse_layout_str(UiLayout *layout, Str str); diff --git a/sources/libs/brutal-ui/slider.c b/sources/libs/brutal-ui/slider.c deleted file mode 100644 index 1fd7f4507..000000000 --- a/sources/libs/brutal-ui/slider.c +++ /dev/null @@ -1,21 +0,0 @@ -#include "slider.h" - -void ui_slider_repaint(UiView *self, Gfx *gfx) -{ - MRectf track = ui_view_container(self); - MRectf numb = m_rectf(0, 0, track.size.x, track.size.y / 2); - - gfx_fill_style(gfx, gfx_paint_fill(UI_COLOR_BASE09)); - gfx_fill_rect(gfx, track, 8); - gfx_fill_style(gfx, gfx_paint_fill(UI_COLOR_BLUE)); - gfx_fill_rect(gfx, numb, 8); -} - -UiView *ui_slider_create(void) -{ - UiView *self = ui_view_create$(UiSlider); - - self->repaint = ui_slider_repaint; - - return self; -} diff --git a/sources/libs/brutal-ui/slider.h b/sources/libs/brutal-ui/slider.h deleted file mode 100644 index 1db7bd0de..000000000 --- a/sources/libs/brutal-ui/slider.h +++ /dev/null @@ -1,14 +0,0 @@ -#pragma once - -#include "view.h" - -typedef struct -{ - UiView base; - float value; -} UiSlider; - -#define ui_slider$(VIEW) ((UiSlider *)(VIEW)) -#define ui_slider_value$(VIEW) (ui_slider$(VIEW)->value) - -UiView *ui_slider_create(void); diff --git a/sources/libs/brutal-ui/spacer.c b/sources/libs/brutal-ui/spacer.c deleted file mode 100644 index c83b5d770..000000000 --- a/sources/libs/brutal-ui/spacer.c +++ /dev/null @@ -1,9 +0,0 @@ -#include "spacer.h" - -UiView *ui_spacer_create(void) -{ - UiView *self = ui_view_create$(UiSpacer); - ui_view_layout(self, "grow-1"); - - return self; -} diff --git a/sources/libs/brutal-ui/spacer.h b/sources/libs/brutal-ui/spacer.h deleted file mode 100644 index 91116f417..000000000 --- a/sources/libs/brutal-ui/spacer.h +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once - -#include "view.h" - -typedef struct -{ - UiView base; -} UiSpacer; - -#define ui_spacer$(VIEW) ((UiSpacer *)(VIEW)) - -UiView *ui_spacer_create(void); diff --git a/sources/libs/brutal-ui/splitter.c b/sources/libs/brutal-ui/splitter.c deleted file mode 100644 index 2b9fed83a..000000000 --- a/sources/libs/brutal-ui/splitter.c +++ /dev/null @@ -1,17 +0,0 @@ -#include "splitter.h" - -void ui_splitter_repaint(UiView *self, Gfx *gfx) -{ - gfx_fill_style(gfx, gfx_paint_fill(gfx_color_with_alpha(UI_COLOR_BASE09, 100))); - gfx_fill_rect(gfx, ui_view_container(self), 0); -} - -UiView *ui_splitter_create(void) -{ - UiView *self = ui_view_create$(UiSplitter); - - self->repaint = ui_splitter_repaint; - ui_view_layout(self, "min-1"); - - return self; -} diff --git a/sources/libs/brutal-ui/splitter.h b/sources/libs/brutal-ui/splitter.h deleted file mode 100644 index cbc7d40f5..000000000 --- a/sources/libs/brutal-ui/splitter.h +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once - -#include "view.h" - -typedef struct -{ - UiView base; -} UiSplitter; - -#define ui_splitter$(VIEW) ((UiSplitter *)(VIEW)) - -UiView *ui_splitter_create(void); diff --git a/sources/libs/brutal-ui/switch.c b/sources/libs/brutal-ui/switch.c deleted file mode 100644 index 434ef83d4..000000000 --- a/sources/libs/brutal-ui/switch.c +++ /dev/null @@ -1,17 +0,0 @@ -#include "switch.h" - -void ui_switch_repaint(UiView *self, Gfx *gfx) -{ - gfx_fill_style(gfx, gfx_paint_fill(GFX_CYAN)); - gfx_fill_rect(gfx, ui_view_container(self), 0); -} - -UiView *ui_switch_create(void) -{ - UiView *self = ui_view_create$(UiSwitch); - - self->repaint = ui_switch_repaint; - ui_view_layout(self, "max-h-36"); - - return self; -} diff --git a/sources/libs/brutal-ui/switch.h b/sources/libs/brutal-ui/switch.h deleted file mode 100644 index 5ce620f67..000000000 --- a/sources/libs/brutal-ui/switch.h +++ /dev/null @@ -1,14 +0,0 @@ -#pragma once - -#include "view.h" - -typedef struct -{ - UiView base; - bool value; -} UiSwitch; - -#define ui_switch$(VIEW) ((UiSwitch *)(VIEW)) -#define ui_switch_value$(VIEW) (ui_switch$(VIEW)->value) - -UiView *ui_switch_create(void); diff --git a/sources/libs/brutal-ui/text.c b/sources/libs/brutal-ui/text.c deleted file mode 100644 index 57587cc23..000000000 --- a/sources/libs/brutal-ui/text.c +++ /dev/null @@ -1,37 +0,0 @@ -#include "text.h" - -#include "app.h" - -GfxFontMeasure ui_text_measure(UiView *self) -{ - return gfx_font_measure(ui_app_self()->font, ui_text$(self)->font, ui_text$(self)->text); -} - -void ui_text_repaint(UiView *self, Gfx *gfx) -{ - GfxFontMeasure measures = ui_text_measure(self); - MRectf centered = m_gravity_apply(self->layout.gravity, M_FLOW_LEFT_TO_RIGHT, measures.capbound, ui_view_content(self)); - MVec2f orgin = m_vec2f_add(centered.pos, measures.baseline); - - gfx_fill_style(gfx, gfx_paint_fill(ui_view_color(self, UI_COLOR_ROLE_TEXT))); - gfx_font_style(gfx, ui_text$(self)->font); - gfx_text(gfx, orgin, ui_text$(self)->text); -} - -MRectf ui_text_size(UiView *self) -{ - return ui_text_measure(self).linebound; -} - -UiView *ui_text_create(Str text, GfxFontStyle font) -{ - UiView *self = ui_view_create$(UiText); - - self->repaint = ui_text_repaint; - self->size = ui_text_size; - - ui_text$(self)->text = text; - ui_text$(self)->font = font; - - return self; -} diff --git a/sources/libs/brutal-ui/text.h b/sources/libs/brutal-ui/text.h deleted file mode 100644 index 1a567e0a8..000000000 --- a/sources/libs/brutal-ui/text.h +++ /dev/null @@ -1,15 +0,0 @@ -#pragma once - -#include "view.h" - -typedef struct -{ - UiView base; - - Str text; - GfxFontStyle font; -} UiText; - -#define ui_text$(VIEW) ((UiText *)(VIEW)) - -UiView *ui_text_create(Str text, GfxFontStyle font); diff --git a/sources/libs/brutal-ui/view.c b/sources/libs/brutal-ui/view.c deleted file mode 100644 index a440b5209..000000000 --- a/sources/libs/brutal-ui/view.c +++ /dev/null @@ -1,299 +0,0 @@ -#include "view.h" - -#include "app.h" -#include "parser.h" -#include "win.h" - -/* --- Lifecycle ------------------------------------------------------------ */ - -void ui_view_init(UiView *self) -{ - vec_init(&self->children, alloc_global()); - self->bound = m_rectf(0, 0, 100, 100); - self->flags = UI_VIEW_ENABLED | UI_VIEW_VISIBLE; -} - -void ui_view_ref(UiView *self) -{ - self->refcount++; -} - -void ui_view_deref(UiView *self) -{ - self->refcount--; - - if (self->refcount > 0) - { - return; - } - - if (self->deinit) - { - self->deinit(self); - } - - vec_deinit(&self->children); - alloc_free(alloc_global(), self); -} - -/* --- Childrens ------------------------------------------------------------ */ - -void ui_view_mount(UiView *self, UiView *child) -{ - ui_view_ref(child); - ui_view_mounted_to_view(child, self); - vec_push(&self->children, child); -} - -void ui_view_umount(UiView *self, UiView *child) -{ - vec_remove(&self->children, child); - ui_view_unmounted(child); - ui_view_deref(child); -} - -void ui_view_mounted_to_view(UiView *self, UiView *parent) -{ - assert_truth(self->parent == nullptr && self->window == nullptr); - self->parent = parent; -} - -void ui_view_mounted_to_window(UiView *self, struct _UiWin *window) -{ - assert_truth(self->parent == nullptr && self->window == nullptr); - self->window = window; -} - -void ui_view_unmounted(UiView *self) -{ - assert_truth(self->parent != nullptr || self->window != nullptr); - self->parent = nullptr; - self->window = nullptr; -} - -/* --- Properties ----------------------------------------------------------- */ - -MVec2f ui_view_orgin(UiView *self) -{ - return m_vec2f_add(self->scroll, self->bound.pos); -} - -MRectf ui_view_bound(UiView *self) -{ - return self->bound; -} - -MRectf ui_view_content(UiView *self) -{ - return m_spacing_shrink(self->layout.padding, self->layout.flow, ui_view_container(self)); -} - -MRectf ui_view_container(UiView *self) -{ - MRectf rect = self->bound; - rect.pos = m_vec2f(0, 0); - return rect; -} - -void ui_view_resize(UiView *self, MRectf rect) -{ - self->bound = rect; -} - -void ui_view_layout(UiView *self, char const *layout) -{ - ui_parse_layout_str(&self->layout, str$(layout)); - ui_view_should_relayout(self); -} - -GfxColor ui_view_color(UiView *self, UiRole role) -{ - GfxColor color; - if (!ui_palette_color(&self->palette, role, &color)) - { - if (self->parent) - { - color = ui_view_color(self->parent, role); - } - else - { - color = ui_app_color(ui_app_self(), role); - } - } - return color; -} - -void ui_view_overide_color(UiView *self, UiRole role, GfxColor color) -{ - ui_palette_overide(&self->palette, role, color); -} - -struct _UiWin *ui_view_window(UiView *self) -{ - if (self->window) - { - return self->window; - } - - if (self->parent) - { - return ui_view_window(self->parent); - } - - return nullptr; -} - -/* --- Paint ---------------------------------------------------------------- */ - -void ui_view_should_repaint(UiView *self) -{ - ui_view_should_repaint_rect(self, self->bound); -} - -void ui_view_should_repaint_rect(UiView *self, MRectf dirty) -{ - if (!m_rectf_collide_rect(self->bound, dirty)) - { - return; - } - - if (self->parent) - { - dirty.pos = m_vec2f_add(dirty.pos, ui_view_orgin(self->parent)); - ui_view_should_repaint_rect(self->parent, dirty); - } - else if (self->window) - { - ui_win_should_repaint_rect(self->window, dirty); - } -} - -void ui_view_repaint(UiView *self, Gfx *gfx) -{ - gfx_push(gfx); - gfx_origin(gfx, ui_view_orgin(self)); - gfx_clip(gfx, m_rectf(0, 0, self->bound.width, self->bound.height)); - - if (self->repaint) - { - self->repaint(self, gfx); - } - - vec_foreach_v(child, &self->children) - { - ui_view_repaint(child, gfx); - } - - // gfx_fill_style(gfx, gfx_paint_fill(GFX_CYAN)); - // gfx_stroke_rect(gfx, ui_view_container(self), 1); - - gfx_pop(gfx); -} - -/* --- Layout --------------------------------------------------------------- */ - -MRectf ui_view_size(MAYBE_UNUSED UiView *self) -{ - MRectf result; - - UiLayout layout = self->layout; - - if (self->size) - { - result = self->size(self); - } - else - { - result.size = ui_layout_size(&layout, self->children.data, self->children.len); - } - - result = m_spacing_grow(layout.padding, layout.flow, result); - result.size = ui_size_apply(layout.size, result.size); - result = m_spacing_grow(layout.margin, layout.flow, result); - - return result; -} - -void ui_view_place(UiView *self, MRectf container) -{ - UiLayout layout = self->layout; - - MRectf bound = ui_view_size(self); - container = m_gravity_apply(layout.placement, M_FLOW_LEFT_TO_RIGHT, bound, container); - container = m_spacing_shrink(layout.margin, layout.flow, container); - - ui_view_resize(self, container); -} - -void ui_view_relayout(UiView *self) -{ - if (vec_len(&self->children) == 0) - { - return; - } - - if (self->relayout) - { - self->relayout(self); - } - else - { - ui_layout_run( - &self->layout, - ui_view_content(self), - self->children.data, - self->children.len); - } - - vec_foreach_v(child, &self->children) - { - ui_view_relayout(child); - } -} - -void ui_view_should_relayout(UiView *self) -{ - if (self->parent) - { - ui_view_relayout(self->parent); - } - - if (self->window) - { - ui_win_should_relayout(self->window); - } -} - -/* --- Events --------------------------------------------------------------- */ - -UiView *ui_view_lookup(UiView *self, MVec2f pos) -{ - if (self->flags & UI_VIEW_GREEDY) - { - return self; - } - - vec_foreach_v(child, &self->children) - { - if (m_rectf_collide_point(ui_view_bound(child), pos)) - { - pos = m_vec2f_sub(pos, ui_view_orgin(child)); - return ui_view_lookup(child, pos); - } - } - - return self; -} - -void ui_view_dispatch(UiView *self, UiEvent *event) -{ - if (self->event) - { - self->event(self, event); - } - - if (!event->captured && self->parent) - { - ui_view_dispatch(self->parent, event); - } -} diff --git a/sources/libs/brutal-ui/view.h b/sources/libs/brutal-ui/view.h deleted file mode 100644 index d4185d8f5..000000000 --- a/sources/libs/brutal-ui/view.h +++ /dev/null @@ -1,107 +0,0 @@ -#pragma once - -#include "color.h" -#include "event.h" -#include "layout.h" - -#define UI_VIEW_VISIBLE (1 << 0) -#define UI_VIEW_ENABLED (1 << 1) -#define UI_VIEW_GREEDY (1 << 2) - -typedef uint64_t UiFlags; - -typedef struct _UiView UiView; -#define ui_view$(VIEW) ((UiView *)(VIEW)) - -struct _UiView -{ - int refcount; - - UiFlags flags; - MRectf bound; - MVec2f scroll; - - UiLayout layout; - UiPalette palette; - - void (*deinit)(UiView *self); - void (*repaint)(UiView *self, Gfx *painter); - void (*event)(UiView *self, UiEvent *event); - MRectf (*size)(UiView *self); - void (*relayout)(UiView *self); - - struct _UiApp *app; - struct _UiWin *window; - struct _UiView *parent; - Vec(struct _UiView *) children; -}; - -/* --- Lifecycle ------------------------------------------------------------ */ - -#define ui_view_create$(T) ({ \ - UiView *__view = (UiView *)alloc_make(alloc_global(), T); \ - ui_view_init(__view); \ - __view; \ -}) - -void ui_view_init(UiView *self); - -void ui_view_ref(UiView *self); - -void ui_view_deref(UiView *self); - -/* --- Childrens ------------------------------------------------------------ */ - -void ui_view_mount(UiView *self, UiView *child); - -void ui_view_umount(UiView *self, UiView *child); - -void ui_view_mounted_to_view(UiView *self, UiView *parent); - -void ui_view_mounted_to_window(UiView *self, struct _UiWin *parent); - -void ui_view_unmounted(UiView *self); - -/* --- Properties ----------------------------------------------------------- */ - -MVec2f ui_view_orgin(UiView *self); - -MRectf ui_view_bound(UiView *self); - -MRectf ui_view_content(UiView *self); - -MRectf ui_view_container(UiView *self); - -void ui_view_resize(UiView *self, MRectf rect); - -void ui_view_layout(UiView *self, char const *layout); - -GfxColor ui_view_color(UiView *self, UiRole role); - -void ui_view_overide_color(UiView *self, UiRole role, GfxColor color); - -struct _UiWin *ui_view_window(UiView *self); - -/* --- Paint ---------------------------------------------------------------- */ - -void ui_view_should_repaint(UiView *self); - -void ui_view_should_repaint_rect(UiView *self, MRectf dirty); - -void ui_view_repaint(UiView *self, Gfx *gfx); - -/* --- Layout --------------------------------------------------------------- */ - -void ui_view_should_relayout(UiView *self); - -MRectf ui_view_size(UiView *self); - -void ui_view_place(UiView *self, MRectf container); - -void ui_view_relayout(UiView *self); - -/* --- Events --------------------------------------------------------------- */ - -UiView *ui_view_lookup(UiView *self, MVec2f pos); - -void ui_view_dispatch(UiView *self, UiEvent *event); diff --git a/sources/libs/brutal-ui/win.c b/sources/libs/brutal-ui/win.c deleted file mode 100644 index 68727a50d..000000000 --- a/sources/libs/brutal-ui/win.c +++ /dev/null @@ -1,318 +0,0 @@ -#include -#include -#include - -#include "app.h" -#include "view.h" -#include "win.h" - -/* --- Lifecycle ------------------------------------------------------------ */ - -UiWin *ui_win_create(UiApp *app, MRectf bound, UiWinType type) -{ - UiWin *self = alloc_make(alloc_global(), UiWin); - - self->type = type; - self->app = app; - - gfx_init(&self->gfx, alloc_global()); - embed_win_init(self, bound); - ui_app_attach_win(app, self); - - return self; -} - -void ui_win_ref(UiWin *self) -{ - self->refcount++; -} - -void ui_win_deref(UiWin *self) -{ - self->refcount--; - - if (self->refcount > 0) - { - return; - } - - if (self->deinit) - { - self->deinit(self); - } - - ui_app_attach_win(self->app, self); - embed_win_deinit(self); - gfx_deinit(&self->gfx); - - alloc_free(alloc_global(), self); -} - -/* --- Properties --------------------------------------------------------------- */ - -void ui_win_hide(UiWin *self) -{ - embed_win_hide(self); -} - -void ui_win_show(UiWin *self) -{ - ui_win_relayout(self); - ui_win_repaint(self); - embed_win_show(self); - - ui_win_flip_full(self); -} - -bool ui_win_visible(UiWin *self) -{ - return embed_win_visible(self); -} - -MRectf ui_win_bound(UiWin *self) -{ - return m_rectf(0, 0, embed_win_gfx(self).width, embed_win_gfx(self).height); -} - -MRectf ui_win_content(UiWin *self) -{ - MRectf rect = ui_win_bound(self); - rect.pos = (MVec2f){}; - return rect; -} - -void ui_win_mount(UiWin *self, UiView *view) -{ - if (self->root) - { - ui_view_unmounted(self->root); - ui_view_deref(self->root); - self->root = nullptr; - } - - if (view) - { - ui_view_ref(view); - self->root = view; - ui_view_mounted_to_window(view, self); - } -} - -/* --- Paint ---------------------------------------------------------------- */ - -GfxBuf ui_win_gfx(UiWin *self) -{ - return embed_win_gfx(self); -} - -void ui_win_should_repaint(MAYBE_UNUSED UiWin *self) -{ - ui_win_should_repaint_rect(self, ui_win_bound(self)); -} - -void ui_win_should_repaint_rect(UiWin *self, MAYBE_UNUSED MRectf rect) -{ - ui_win_repaint_rect(self, rect); - ui_win_flip(self, rect); -} - -void ui_win_repaint(UiWin *self) -{ - ui_win_repaint_rect(self, ui_win_bound(self)); -} - -void ui_win_repaint_rect(UiWin *self, MRectf rect) -{ - gfx_begin(&self->gfx, ui_win_gfx(self)); - gfx_clip(&self->gfx, rect); - gfx_clear(&self->gfx, GFX_BLACK); - gfx_font_style(&self->gfx, UI_FONT_BODY); - gfx_font_family(&self->gfx, self->app->font); - - if (self->paint) - { - gfx_push(&self->gfx); - self->paint(self, &self->gfx); - gfx_pop(&self->gfx); - } - - if (self->root) - { - gfx_push(&self->gfx); - ui_view_repaint(self->root, &self->gfx); - gfx_pop(&self->gfx); - } - - // gfx_fill_style(&self->gfx, gfx_paint_fill(gfx_color_rand(100))); - // gfx_fill_rect(&self->gfx, rect, 0); - - gfx_end(&self->gfx); -} - -void ui_win_flip(UiWin *self, MRectf rect) -{ - return embed_win_flip(self, rect); -} - -void ui_win_flip_full(UiWin *self) -{ - ui_win_flip(self, ui_win_bound(self)); -} - -/* --- Layout --------------------------------------------------------------- */ - -void ui_win_should_relayout(UiWin *self) -{ - ui_win_relayout(self); - ui_win_repaint(self); -} - -void ui_win_relayout(UiWin *self) -{ - if (!self->root) - { - return; - } - - ui_view_resize(self->root, ui_win_content(self)); - ui_view_relayout(self->root); -} - -/* --- Events --------------------------------------------------------------- */ - -void ui_win_update_overing(UiWin *self, UiEvent *event) -{ - if (!self->root) - return; - - UiView *overing = ui_view_lookup(self->root, event->mouse.position); - - if (self->overing != overing) - { - if (self->overing) - { - UiEvent mouse_leave_event = { - .type = UI_EVENT_LEAVE, - .mouse = event->mouse, - }; - - ui_view_dispatch(self->overing, &mouse_leave_event); - - ui_view_deref(self->overing); - self->overing = nullptr; - } - - if (overing) - { - UiEvent mouse_enter_event = { - .type = UI_EVENT_ENTER, - .mouse = event->mouse, - }; - - ui_view_dispatch(overing, &mouse_enter_event); - - ui_view_ref(overing); - self->overing = overing; - } - } -} - -void ui_win_handle_keyboard_up(UiWin *self, UiEvent *event) -{ - if (self->focus) - { - ui_view_dispatch(self->overing, event); - } -} - -void ui_win_handle_keyboard_down(UiWin *self, UiEvent *event) -{ - if (self->focus) - { - ui_view_dispatch(self->overing, event); - } -} - -void ui_win_handle_mouse_up(UiWin *self, UiEvent *event) -{ - self->grabbed = false; - - if (self->overing) - { - ui_view_dispatch(self->overing, event); - } - - ui_win_update_overing(self, event); -} - -void ui_win_handle_mouse_down(UiWin *self, UiEvent *event) -{ - if (self->focus != self->overing) - { - if (self->focus) - { - ui_view_deref(self->focus); - self->focus = nullptr; - } - - if (self->overing) - { - ui_view_ref(self->overing); - self->focus = self->overing; - } - } - - self->grabbed = true; - - if (self->overing) - { - ui_view_dispatch(self->overing, event); - } -} - -void ui_win_handle_mouse_move(UiWin *self, UiEvent *event) -{ - if (!self->grabbed) - { - ui_win_update_overing(self, event); - } - - if (self->overing) - { - ui_view_dispatch(self->overing, event); - } -} - -void ui_win_dispatch(UiWin *self, UiEvent *event) -{ - switch (event->type) - { - case UI_EVENT_KEYBOARD_UP: - ui_win_handle_keyboard_up(self, event); - break; - - case UI_EVENT_KEYBOARD_DOWN: - ui_win_handle_keyboard_down(self, event); - break; - - case UI_EVENT_MOUSE_UP: - ui_win_handle_mouse_up(self, event); - break; - - case UI_EVENT_MOUSE_DOWN: - ui_win_handle_mouse_down(self, event); - break; - - case UI_EVENT_MOUSE_MOVE: - ui_win_handle_mouse_move(self, event); - break; - - default: - break; - } - - if (!event->captured && self->event) - { - self->event(self, event); - } -} diff --git a/sources/libs/brutal-ui/win.h b/sources/libs/brutal-ui/win.h deleted file mode 100644 index 5e5740912..000000000 --- a/sources/libs/brutal-ui/win.h +++ /dev/null @@ -1,89 +0,0 @@ -#pragma once - -#include -#include - -#include "event.h" - -typedef struct _UiApp UiApp; -typedef struct _UiWin UiWin; - -typedef enum -{ - UI_WIN_NORMAL, - UI_WIN_MODAL, - - UI_WIN_DOCK_TOP, - UI_WIN_DOCK_BOTTOM, - UI_WIN_DOCK_LEFT, - UI_WIN_DOCK_RIGHT, -} UiWinType; - -struct _UiWin -{ - EmbedWin embed; - UiWinType type; - int refcount; - Gfx gfx; - - void (*deinit)(UiWin *self); - void (*paint)(UiWin *self, Gfx *gfx); - void (*event)(UiWin *self, UiEvent *event); - - bool grabbed; - struct _UiView *overing; - struct _UiView *focus; - - struct _UiApp *app; - struct _UiView *root; -}; - -/* --- Lifecycle ------------------------------------------------------------ */ - -UiWin *ui_win_create(UiApp *app, MRectf bound, UiWinType type); - -void ui_win_ref(UiWin *self); - -void ui_win_deref(UiWin *self); - -/* --- Properties ----------------------------------------------------------- */ - -void ui_win_hide(UiWin *self); - -void ui_win_show(UiWin *self); - -bool ui_win_visible(UiWin *self); - -void ui_win_resize(UiWin *self, MRectf bound); - -MRectf ui_win_bound(UiWin *self); - -MRectf ui_win_content(UiWin *self); - -void ui_win_mount(UiWin *self, struct _UiView *view); - -/* --- Paint ---------------------------------------------------------------- */ - -GfxBuf ui_win_gfx(UiWin *self); - -void ui_win_should_repaint(UiWin *self); - -void ui_win_should_repaint_rect(UiWin *self, MRectf rect); - -void ui_win_repaint(UiWin *self); - -void ui_win_repaint_rect(UiWin *self, MRectf rect); - -void ui_win_flip(UiWin *self, MRectf rect); - -void ui_win_flip_full(UiWin *self); - -/* --- Layout --------------------------------------------------------------- */ - -void ui_win_should_relayout(UiWin *self); - -void ui_win_relayout(UiWin *self); - -/* --- Events --------------------------------------------------------------- */ - -void ui_win_dispatch(UiWin *self, UiEvent *event); diff --git a/sources/libs/codec-ssfn2/spec.h b/sources/libs/codec-ssfn2/spec.h deleted file mode 100644 index 0a7169e96..000000000 --- a/sources/libs/codec-ssfn2/spec.h +++ /dev/null @@ -1,66 +0,0 @@ -#pragma once - -#include - -#define SSFN2_MAGIC str$("SFN2") -#define SSFN2_COLLECTION str$("SFNC") -#define SSFN2_ENDMAGIC str$("2NFS") - -/* font family group in font type byte */ -#define SSFN2_TYPE_FAMILY(x) ((x)&15) -#define SSFN2_FAMILY_SERIF 0 -#define SSFN2_FAMILY_SANS 1 -#define SSFN2_FAMILY_DECOR 2 -#define SSFN2_FAMILY_MONOSPACE 3 -#define SSFN2_FAMILY_HAND 4 - -/* font style flags in font type byte */ -#define SSFN2_TYPE_STYLE(x) (((x) >> 4) & 15) -#define SSFN2_STYLE_REGULAR 0 -#define SSFN2_STYLE_BOLD 1 -#define SSFN2_STYLE_ITALIC 2 -#define SSFN2_STYLE_USRDEF1 4 /* user defined variant 1 */ -#define SSFN2_STYLE_USRDEF2 8 /* user defined variant 2 */ - -enum -{ - SSFN2_CMD_MOVE_TO, - SSFN2_CMD_LINE_TO, - SSFN2_CMD_QUAD_CURVE, - SSFN2_CMD_BEZIER_CURVE, -}; - -typedef struct PACKED -{ - le_uint8_t magic[4]; - le_uint32_t size; /* total size in bytes */ -} SSFN2CommonHeader; - -typedef struct PACKED -{ - le_uint8_t type; /* font family and style */ - le_uint8_t features; /* format features and revision */ - - le_uint8_t width; /* overall width of the font */ - le_uint8_t height; /* overall height of the font */ - le_uint8_t baseline; /* horizontal baseline in grid pixels */ - le_uint8_t underline; /* position of under line in grid pixels */ - - le_uint16_t fragments_offs; /* offset of fragments table */ - le_uint32_t characters_offs; /* characters table offset */ - le_uint32_t ligature_offs; /* ligatures table offset */ - le_uint32_t kerning_offs; /* kerning table offset */ - le_uint32_t cmap_offs; /* color map offset */ -} SSFN2FontHeader; - -#define SSFN2_MAX_STR_LEN 255 - -typedef struct PACKED -{ - char font_name[SSFN2_MAX_STR_LEN]; - char family_name[SSFN2_MAX_STR_LEN]; - char subfamily_name[SSFN2_MAX_STR_LEN]; - char revision[SSFN2_MAX_STR_LEN]; - char manufacturer[SSFN2_MAX_STR_LEN]; - char license[SSFN2_MAX_STR_LEN]; -} SSFN2StringTable; diff --git a/sources/libs/codec-ssfn2/ssfn2.c b/sources/libs/codec-ssfn2/ssfn2.c deleted file mode 100644 index 704fbbdd8..000000000 --- a/sources/libs/codec-ssfn2/ssfn2.c +++ /dev/null @@ -1,433 +0,0 @@ -#include -#include -#include - -#include "ssfn2.h" - -static MaybeError ssfn2_load_string(IoReader reader, char *dst) -{ - for (size_t i = 0; i < SSFN2_MAX_STR_LEN; i++) - { - uint8_t c; - TRY(MaybeError, io_read_byte(reader, &c)); - dst[i] = c; - - if (c == '\0') - { - break; - } - } - - return SUCCESS; -} - -static MaybeError ssfn2_load_stringtable(IoReader reader, SSFN2Font *font) -{ - TRY(MaybeError, ssfn2_load_string(reader, font->stringtable.font_name)); - TRY(MaybeError, ssfn2_load_string(reader, font->stringtable.family_name)); - TRY(MaybeError, ssfn2_load_string(reader, font->stringtable.subfamily_name)); - TRY(MaybeError, ssfn2_load_string(reader, font->stringtable.revision)); - TRY(MaybeError, ssfn2_load_string(reader, font->stringtable.manufacturer)); - TRY(MaybeError, ssfn2_load_string(reader, font->stringtable.license)); - - return SUCCESS; -} - -static MaybeError ssfn2_read_point(IoRSeek rseek, SSFN2FontHeader *header, MVec2f pos, MVec2f *result) -{ - uint8_t x, y; - TRY(MaybeError, io_read_byte$(rseek, &x)); - TRY(MaybeError, io_read_byte$(rseek, &y)); - - MVec2f point = m_vec2f_add(pos, m_vec2f(x, y)); - point = m_vec2f_sub(point, m_vec2f(0, le_load$(header->baseline))); - point = m_vec2f_div_v(point, le_load$(header->baseline)); - point = m_vec2f_mul_v(point, 16); - - *result = point; - return SUCCESS; -} - -static MaybeError ssfn2_load_fragment(IoRSeek rseek, SSFN2Font *font, MVec2f pos, size_t offset, GfxPath *path) -{ - // Add font start offset - offset += font->font_start; - uint32_t fragments_offs = font->font_start + le_load$(font->header.fragments_offs); - uint32_t characters_offs = font->font_start + le_load$(font->header.characters_offs); - - if (offset < fragments_offs || offset >= characters_offs) - { - log$("SSFN2: incorrect fragment offset {}", offset); - return ERROR(ERR_BAD_ADDRESS); - } - - size_t prev_offset = TRY(MaybeError, io_tell$(rseek)); - TRY(MaybeError, io_seek$(rseek, io_seek_from_start(offset))); - - uint8_t val; - TRY(MaybeError, io_read_byte$(rseek, &val)); - - if (val & 0x80) - { - log$("Non contour fragment not supported!"); - TRY(MaybeError, io_seek$(rseek, io_seek_from_start(prev_offset))); - return ERROR(ERR_NOT_IMPLEMENTED); - } - - size_t cmd_count = val & 0b00111111; - // contour with more commands (1 extra byte) - if (val & 0b01000000) - { - TRY(MaybeError, io_read_byte$(rseek, &val)); - - cmd_count <<= 8; - cmd_count |= val; - } - cmd_count++; - - // Read all command bytes - size_t cmd_bytes = (cmd_count + 3) / 4; - - if (cmd_bytes > 255) - { - log$("SSFN2: incorrect fragment command count {}", cmd_count); - return ERROR(ERR_BAD_ADDRESS); - } - - uint8_t cmd_data[0b111111111111]; - TRY(MaybeError, io_read$(rseek, cmd_data, cmd_bytes)); - - MVec2f point, cp1, cp2; - size_t cmd_cur = 0; - - for (size_t i = 0; i < (cmd_count / 4) + 1; i++) - { - // 4 commands per byte - for (size_t j = 0; j < 4 && cmd_cur < cmd_count; j++) - { - TRY(MaybeError, ssfn2_read_point(rseek, &font->header, pos, &point)); - - uint8_t cmd = (cmd_data[i] >> (j * 2)) & 0b00000011; - - switch (cmd) - { - case SSFN2_CMD_MOVE_TO: - gfx_path_move_to(path, point); - break; - - case SSFN2_CMD_LINE_TO: - gfx_path_line_to(path, point); - break; - - case SSFN2_CMD_QUAD_CURVE: - TRY(MaybeError, ssfn2_read_point(rseek, &font->header, pos, &cp1)); - - gfx_path_quadratic_to(path, cp1, point); - break; - - case SSFN2_CMD_BEZIER_CURVE: - TRY(MaybeError, ssfn2_read_point(rseek, &font->header, pos, &cp1)); - TRY(MaybeError, ssfn2_read_point(rseek, &font->header, pos, &cp2)); - - gfx_path_cubic_to(path, cp1, cp2, point); - break; - - default: - log$("SSFN2: unknown command {}", cmd); - break; - } - cmd_cur++; - } - } - - TRY(MaybeError, io_seek$(rseek, io_seek_from_start(prev_offset))); - return SUCCESS; -} - -static MaybeError ssfn2_load_mapping(IoRSeek rseek, SSFN2Font *font, Rune rune, uint8_t attrs, Alloc *alloc) -{ - uint8_t glyph_data[5]; - TRY(MaybeError, io_read$(rseek, glyph_data, sizeof(glyph_data))); - - // Large fragments - uint8_t frag_size = attrs & 0x40 ? 6 : 5; - uint8_t num_frags = glyph_data[0]; - - if (rune >= 0x110000) - { - log$("SSFN2: rune out of range {x}", rune); - return ERROR(ERR_BAD_ADDRESS); - } - - SSFN2FontHeader const *header = &font->header; - - // Initialize glyph - font->glyphs[rune] = (SSFN2Glyph){ - .present = true, - .bound = m_vec2f((glyph_data[1] / (float)le_load$(header->baseline)) * 16.0f, - (glyph_data[2] / (float)le_load$(header->baseline) * 16.0f)), - - .advance = m_vec2f((glyph_data[3] / (float)le_load$(header->baseline)) * 16.0f, - (glyph_data[4] / (float)le_load$(header->baseline) * 16.0f)), - }; - - gfx_path_init(&font->glyphs[rune].path, alloc); - - for (size_t frag = 0; frag < num_frags; frag++) - { - uint8_t frag_data[6]; - TRY(MaybeError, io_read$(rseek, frag_data, frag_size)); - - uint8_t x = frag_data[0]; - uint8_t y = frag_data[1]; - - // This is a color - if (x == 0xFF && y == 0xFF) - { - uint8_t color_idx = frag_data[2]; - // Invalid color index. See https://gitlab.com/bztsrc/scalable-font2/-/blob/master/docs/sfn_format.md#fragment-descriptors - if (color_idx > 0xFD) - { - return ERROR(ERR_NOT_FOUND); - } - } - else - { - size_t frag_off = 0; - for (size_t idx = frag_size - 1; idx > 1; idx--) - { - frag_off = frag_off << 8; - frag_off |= frag_data[idx]; - } - - ssfn2_load_fragment(rseek, font, m_vec2f(x, y), frag_off, &font->glyphs[rune].path); - } - } - - return SUCCESS; -} - -static MaybeError ssfn2_load_mappings(IoRSeek rseek, SSFN2Font *font, SSFN2CommonHeader *common_header, Alloc *alloc) -{ - size_t char_offs = le_load$(font->header.characters_offs); - size_t lig_offs = le_load$(font->header.ligature_offs); - size_t kern_offs = le_load$(font->header.kerning_offs); - size_t size = le_load$(common_header->size); - - size_t end = lig_offs ? lig_offs : kern_offs ? kern_offs - : size - 4; - - char_offs += font->font_start; - lig_offs += font->font_start; - kern_offs += font->font_start; - size += font->font_start; - end += font->font_start; - - io_seek$(rseek, io_seek_from_start(char_offs)); - - int rune = 0; - while (TRY(MaybeError, io_tell$(rseek)) < end) - { - uint8_t attrs; - TRY(MaybeError, io_read_byte$(rseek, &attrs)); - - if (attrs == 0b11111111) - { - // Skip UINT_MAX + 1 runes - rune += 65356; - } - else if ((attrs & 0b11000000) == 0b10000000) - { - // Skip up to 64 runes - rune += (attrs & 0b00111111) + 1; - } - else if ((attrs & 0b11000000) == 0b11000000) - { - // Skip up to 16128 runes - uint8_t extra; - TRY(MaybeError, io_read_byte$(rseek, &extra)); - rune += (((attrs & 0b00111111) << 8) | extra) + 1; - } - else - { - // Get a rune - TRY(MaybeError, ssfn2_load_mapping(rseek, font, rune, attrs, alloc)); - rune++; - } - } - - if (rune == 0) - { - log$("SSFN2: didn't load any runes"); - return ERROR(ERR_UNDEFINED); - } - - return SUCCESS; -} - -static void ssfn2_compute_weight(SSFN2Font *font) -{ - font->weight = GFX_FONT_REGULAR; - - Str subfamily = str$(font->stringtable.subfamily_name); - // Weights - if (str_first(subfamily, str$("Black")) >= 0) - font->weight = GFX_FONT_BLACK; - else if (str_first(subfamily, str$("Extra Bold")) >= 0) - font->weight = GFX_FONT_EXTRA_BOLD; - else if (str_first(subfamily, str$("Semi Bold")) >= 0) - font->weight = GFX_FONT_SEMI_BOLD; - else if (str_first(subfamily, str$("Bold")) >= 0) - font->weight = GFX_FONT_BOLD; - else if (str_first(subfamily, str$("Medium")) >= 0) - font->weight = GFX_FONT_MEDIUM; - else if (str_first(subfamily, str$("Regular")) >= 0) - font->weight = GFX_FONT_REGULAR; - else if (str_first(subfamily, str$("Extra Light")) >= 0) - font->weight = GFX_FONT_EXTRA_LIGHT; - else if (str_first(subfamily, str$("Light")) >= 0) - font->weight = GFX_FONT_LIGHT; - else if (str_first(subfamily, str$("Thin")) >= 0) - font->weight = GFX_FONT_THIN; - else - log$("Found no match for subfamily: {}", subfamily); -} - -static MaybeError ssfn2_load_internal(IoRSeek rseek, SSFN2Collection *collection, Alloc *alloc) -{ - - size_t start = TRY(MaybeError, io_tell$(rseek)); - SSFN2CommonHeader common_header; - TRY(MaybeError, io_read$(rseek, (uint8_t *)&common_header, sizeof(SSFN2CommonHeader))); - size_t size = le_load$(common_header.size); - - if (str_eq(str_n$(4, (char const *)common_header.magic), SSFN2_COLLECTION)) - { - while (TRY(MaybeError, io_tell$(rseek)) != start + size) - { - TRY(MaybeError, ssfn2_load_internal(rseek, collection, alloc)); - } - } - else if (str_eq(str_n$(4, (char const *)common_header.magic), SSFN2_MAGIC)) - { - SSFN2Font font; - font.font_start = start; - TRY(MaybeError, io_read$(rseek, (uint8_t *)&font.header, sizeof(SSFN2FontHeader))); - TRY(MaybeError, ssfn2_load_stringtable(io_reader$(rseek), &font)); - - font.glyphs = alloc_make_array(alloc, SSFN2Glyph, 0x110000); - - TRY(MaybeError, ssfn2_load_mappings(rseek, &font, &common_header, alloc)); - - // Seek to the end to verify the end magic - le_uint8_t end_magic[4]; - TRY(MaybeError, io_seek$(rseek, io_seek_from_start(font.font_start + size - 4))); - TRY(MaybeError, io_read$(rseek, (uint8_t *)&end_magic, 4)); - if (!str_eq(str_n$(4, (char const *)end_magic), SSFN2_ENDMAGIC)) - { - return ERROR(ERR_UNDEFINED); - } - - ssfn2_compute_weight(&font); - vec_push(collection, font); - } - else - { - return ERROR(ERR_UNDEFINED); - } - - return SUCCESS; -} - -MaybeError ssfn2_load(IoRSeek rseek, SSFN2Collection *collection, Alloc *alloc) -{ - vec_init(collection, alloc_global()); - - IoRSeek input = rseek; - - if (gzip_probe(rseek)) - { - Buf buf; - buf_init(&buf, 1024, alloc_global()); - IoWriter writer = buf_writer(&buf); - TRY(MaybeError, gzip_decompress_stream(writer, io_reader$(rseek))); - input = buf_rseek(&buf); - } - - return ssfn2_load_internal(input, collection, alloc); -} - -/* --- SSFN2 Font ----------------------------------------------------------- */ - -SSFN2Font *gfx_font_ssfn2_select(void *ctx, GfxFontStyle style) -{ - SSFN2Collection *coll = (SSFN2Collection *)ctx; - - SSFN2Font *candiate = NULL; - uint8_t best_match = 0; - - // Get the best match - vec_foreach(font, coll) - { - uint8_t match = 1; - - if (style.weight == font->weight) - match++; - - uint8_t type = le_load$(font->header.type); - if (style.italic == ((SSFN2_TYPE_STYLE(type) & SSFN2_STYLE_ITALIC) > 0)) - match++; - - if (match > best_match) - { - best_match = match; - candiate = font; - } - } - - assert_truth(candiate); - - return candiate; -} - -GfxFontMetrics gfx_font_ssfn2_metrics(void *ctx, GfxFontStyle style) -{ - SSFN2Font *font = gfx_font_ssfn2_select(ctx, style); - - return (GfxFontMetrics){ - .line_ascend = 12 * style.scale, - .ascend = 10 * style.scale, - .captop = 10 * style.scale, - .descend = 3 * style.scale, - .line_descend = 4 * style.scale, - .advance = le_load$(font->header.width) * style.scale, - }; -} - -float gfx_font_ssfn2_advance(void *ctx, GfxFontStyle style, Rune rune) -{ - SSFN2Font *font = gfx_font_ssfn2_select(ctx, style); - return font->glyphs[rune].advance.x * style.scale; -} - -void gfx_font_ssfn2_render(void *ctx, GfxFontStyle style, Gfx *gfx, MVec2f baseline, Rune rune) -{ - gfx_push(gfx); - SSFN2Font *font = gfx_font_ssfn2_select(ctx, style); - SSFN2Glyph glyph = font->glyphs[rune]; - gfx_origin(gfx, baseline); - gfx_trans(gfx, m_trans2_scale(style.scale)); - gfx_fill_path(gfx, &glyph.path, GFX_FILL_EVENODD); - - gfx_pop(gfx); -} - -GfxFont ssfn2_font(SSFN2Collection *coll) -{ - return (GfxFont){ - .ctx = coll, - .metrics = gfx_font_ssfn2_metrics, - .advance = gfx_font_ssfn2_advance, - .render = gfx_font_ssfn2_render, - }; -} diff --git a/sources/libs/codec-ssfn2/ssfn2.h b/sources/libs/codec-ssfn2/ssfn2.h deleted file mode 100644 index e87492065..000000000 --- a/sources/libs/codec-ssfn2/ssfn2.h +++ /dev/null @@ -1,32 +0,0 @@ -#pragma once - -#include -#include -#include - -#include "spec.h" - -typedef struct -{ - GfxPath path; - MVec2f bound; - MVec2f advance; - bool present; -} SSFN2Glyph; - -typedef struct -{ - size_t font_start; - float weight; - SSFN2FontHeader header; - SSFN2StringTable stringtable; - SSFN2Glyph *glyphs; /* glyphs array */ -} SSFN2Font; - -typedef Vec(SSFN2Font) SSFN2Collection; - -MaybeError ssfn2_load(IoRSeek reader, SSFN2Collection *collection, Alloc *alloc); - -void ssfn2_deinit(SSFN2Font *font); - -GfxFont ssfn2_font(SSFN2Collection *); diff --git a/sources/libs/codec-tga/tga.c b/sources/libs/codec-tga/tga.c deleted file mode 100644 index 1fef2e996..000000000 --- a/sources/libs/codec-tga/tga.c +++ /dev/null @@ -1,40 +0,0 @@ -#include "tga.h" - -IoResult tga_encode(IoWriter writer, GfxBuf surface) -{ - TgaHeader header = (TgaHeader){ - .data_type_code = le$(le_int8_t, TGA_DATATYPE_UNCOMPRESSED_RGB), - .width = le$(le_int16_t, surface.width), - .height = le$(le_int16_t, surface.height), - .bits_per_pixel = le$(le_int8_t, 32), - .image_descriptor = le$(le_int8_t, 0), // by default don't use an alpha channel - }; - - if (surface.fmt == GFX_FMT_RGBA8888) // set the number of bit for the alpha channel - { - header.image_descriptor = le$(le_int8_t, TGA_IMGDESC_ALPHA_BITS); - } - - size_t written = 0; - - written = TRY(IoResult, io_write(writer, (uint8_t *)&header, sizeof(TgaHeader))); - written += TRY(IoResult, io_write(writer, (uint8_t *)surface.buf, gfx_buf_size(surface))); - - return OK(IoResult, written); -} - -GfxBuf tga_decode_in_memory(void *addr, size_t size) -{ - assert_greater_than(size, sizeof(TgaHeader)); - - TgaHeader *header = (TgaHeader *)addr; - void *buf = header + 1; - - return (GfxBuf){ - .width = le_load$(header->width), - .height = le_load$(header->height), - .pitch = le_load$(header->width) * (le_load$(header->bits_per_pixel) / 8), - .fmt = GFX_FMT_RGBA8888, - .buf = buf, - }; -} diff --git a/sources/libs/codec-tga/tga.h b/sources/libs/codec-tga/tga.h deleted file mode 100644 index 15c619d44..000000000 --- a/sources/libs/codec-tga/tga.h +++ /dev/null @@ -1,39 +0,0 @@ -#pragma once - -#include -#include - -// using http://tfc.duke.free.fr/coding/tga_specs.pdf - -#define TGA_IMGDESC_ORIGIN_BITS 0b00110000 -#define TGA_IMGDESC_ALPHA_BITS 0b00001111 - -enum tga_image_origin -{ - TGA_BOTTOM_LEFT = 0b00000000, - TGA_BOTTOM_RIGHT = 0b00010000, - TGA_TOP_LEFT = 0b00100000, - TGA_TOP_RIGHT = 0b00110000, -}; - -typedef struct PACKED -{ - le_int8_t id_len; - le_int8_t colour_map_type; - -#define TGA_DATATYPE_UNCOMPRESSED_RGB (2) - le_int8_t data_type_code; - le_int16_t colour_map_origin; - le_int16_t colour_map_len; - le_int8_t colour_map_depth; - le_int16_t x_origin; - le_int16_t y_origin; - le_int16_t width; - le_int16_t height; - le_int8_t bits_per_pixel; - le_int8_t image_descriptor; -} TgaHeader; - -IoResult tga_encode(IoWriter writer, GfxBuf surface); - -GfxBuf tga_decode_in_memory(void *addr, size_t size); diff --git a/sources/libs/embed/app-decl.h b/sources/libs/embed/app-decl.h deleted file mode 100644 index 7e201f183..000000000 --- a/sources/libs/embed/app-decl.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -#include - -#if defined(SYSTEM_SDL) -# include -#elif defined(SYSTEM_BRUTAL) -# include -#else -# error "Unsupported embedder!" -#endif - -typedef struct _EmbedApp EmbedApp; diff --git a/sources/libs/embed/app.h b/sources/libs/embed/app.h deleted file mode 100644 index 537c7649b..000000000 --- a/sources/libs/embed/app.h +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once - -#include - -void embed_app_init(UiApp *self); - -void embed_app_deinit(UiApp *self); - -void embed_app_pump(UiApp *self); - -void embed_app_wait(UiApp *self); diff --git a/sources/libs/embed/brutal/app.c b/sources/libs/embed/brutal/app.c deleted file mode 100644 index da6678acc..000000000 --- a/sources/libs/embed/brutal/app.c +++ /dev/null @@ -1,20 +0,0 @@ -#include -#include -#include - -void embed_app_init(UiApp *) -{ -} - -void embed_app_deinit(UiApp *) -{ -} - -void embed_app_pump(UiApp *) -{ -} - -void embed_app_wait(UiApp *) -{ - ipc_component_run(ipc_self()); -} diff --git a/sources/libs/embed/brutal/app.h b/sources/libs/embed/brutal/app.h deleted file mode 100644 index 892be9400..000000000 --- a/sources/libs/embed/brutal/app.h +++ /dev/null @@ -1,6 +0,0 @@ -#pragma once - -struct _EmbedApp -{ - int _dummy; -}; diff --git a/sources/libs/embed/brutal/win.c b/sources/libs/embed/brutal/win.c deleted file mode 100644 index 406ed964e..000000000 --- a/sources/libs/embed/brutal/win.c +++ /dev/null @@ -1,86 +0,0 @@ -#include -#include -#include -#include - -/* --- Event Sink Protocol -------------------------------------------------- */ - -static EventError input_sink_dispatch_handler(void *ctx, UiEvent const *req, bool *resp, Alloc *) -{ - UiWin *win = ctx; - UiEvent event = *req; - ui_win_dispatch(win, &event); - - *resp = true; - return IPC_SUCCESS; -} - -static EventSinkVTable _input_sink_vtable = { - input_sink_dispatch_handler, -}; - -/* --- Win Implementation --------------------------------------------------- */ - -void embed_win_init(UiWin *self, MRectf bound) -{ - EmbedWin *embed = &self->embed; - ipc_object_init(base$(embed), ipc_self(), alloc_global()); - event_sink_provide(base$(embed), &_input_sink_vtable); - - IpcCap server = ipc_component_require(ipc_self(), IPC_WINDOW_SERVER_PROTO); - - WindowClientProps props = { - .bound = bound, - .type = self->type, - }; - - window_server_create_rpc(ipc_self(), server, &props, &embed->handle, alloc_global()); - - BalFb surface; - window_client_surface_rpc(ipc_self(), embed->handle, &surface, alloc_global()); - bal_fb_map(&surface); - - self->embed.surface = surface; - - bool success = false; - IpcCap cap = ipc_object_cap(base$(embed), IPC_EVENT_SINK_PROTO); - window_client_listen_rpc(ipc_self(), embed->handle, &cap, &success, alloc_global()); -} - -void embed_win_deinit(UiWin *self) -{ - bal_fb_deinit(&self->embed.surface); - - bool resp; - window_client_close_rpc(ipc_self(), self->embed.handle, &resp, alloc_global()); -} - -void embed_win_show(UiWin *self) -{ - bool resp = false; - window_client_show_rpc(ipc_self(), self->embed.handle, &resp, alloc_global()); -} - -void embed_win_hide(UiWin *self) -{ - bool resp = false; - window_client_hide_rpc(ipc_self(), self->embed.handle, &resp, alloc_global()); -} - -bool embed_win_visible(UiWin *self) -{ - UNUSED(self); - // TODO - return true; -} - -void embed_win_flip(UiWin *self, MRectf rect) -{ - bool resp = false; - window_client_flip_rpc(ipc_self(), self->embed.handle, &rect, &resp, alloc_global()); -} - -GfxBuf embed_win_gfx(UiWin *self) -{ - return bal_fb_buf(&self->embed.surface); -} diff --git a/sources/libs/embed/brutal/win.h b/sources/libs/embed/brutal/win.h deleted file mode 100644 index bdeb0701a..000000000 --- a/sources/libs/embed/brutal/win.h +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once - -#include -#include - -struct _EmbedWin -{ - IpcObject base; - IpcCap handle; // to the object on the server side - - BalFb surface; -}; diff --git a/sources/libs/embed/sdl/app.c b/sources/libs/embed/sdl/app.c deleted file mode 100644 index c25863009..000000000 --- a/sources/libs/embed/sdl/app.c +++ /dev/null @@ -1,151 +0,0 @@ -#include -#include -#include -#include - -void embed_app_init(MAYBE_UNUSED UiApp *self) -{ - SDL_Init(SDL_INIT_VIDEO | SDL_INIT_EVENTS); -} - -void embed_app_deinit(MAYBE_UNUSED UiApp *self) -{ - SDL_QuitSubSystem(SDL_INIT_VIDEO | SDL_INIT_EVENTS); - SDL_Quit(); -} - -static MVec2f _last_mouse_pos = {}; - -UiEvent sdl_event_to_ui_event(SDL_Event e, uint32_t *handle) -{ - UiEvent result = {}; - - switch (e.type) - { - case SDL_WINDOWEVENT: - *handle = e.window.windowID; - break; - - case SDL_KEYDOWN: - *handle = e.key.windowID; - result.type = UI_EVENT_KEYBOARD_DOWN; - break; - - case SDL_KEYUP: - *handle = e.key.windowID; - result.type = UI_EVENT_KEYBOARD_UP; - break; - - case SDL_MOUSEMOTION: - if (e.motion.which == SDL_TOUCH_MOUSEID) - { - return result; - } - - *handle = e.motion.windowID; - result.type = UI_EVENT_MOUSE_MOVE; - - result.mouse.offset.x = e.motion.xrel; - result.mouse.offset.y = e.motion.yrel; - result.mouse.position.x = e.motion.x; - result.mouse.position.y = e.motion.y; - - _last_mouse_pos = result.mouse.position; - - result.mouse.buttons |= (e.motion.state & SDL_BUTTON_LMASK) ? MSBTN_LEFT : 0; - result.mouse.buttons |= (e.motion.state & SDL_BUTTON_MMASK) ? MSBTN_MIDDLE : 0; - result.mouse.buttons |= (e.motion.state & SDL_BUTTON_RMASK) ? MSBTN_RIGHT : 0; - break; - - case SDL_MOUSEBUTTONUP: - if (e.motion.which == SDL_TOUCH_MOUSEID) - { - return result; - } - - result.type = UI_EVENT_MOUSE_UP; - *handle = e.button.windowID; - result.mouse.position = _last_mouse_pos; - - result.mouse.buttons = (e.button.which == SDL_BUTTON_LEFT) ? MSBTN_LEFT : 0; - result.mouse.buttons = (e.button.which == SDL_BUTTON_RIGHT) ? MSBTN_MIDDLE : 0; - result.mouse.buttons = (e.button.which == SDL_BUTTON_MIDDLE) ? MSBTN_RIGHT : 0; - break; - - case SDL_MOUSEBUTTONDOWN: - if (e.motion.which == SDL_TOUCH_MOUSEID) - { - return result; - } - - result.type = UI_EVENT_MOUSE_DOWN; - *handle = e.button.windowID; - result.mouse.position = _last_mouse_pos; - - result.mouse.buttons = (e.button.which == SDL_BUTTON_LEFT) ? MSBTN_LEFT : 0; - result.mouse.buttons = (e.button.which == SDL_BUTTON_RIGHT) ? MSBTN_MIDDLE : 0; - result.mouse.buttons = (e.button.which == SDL_BUTTON_MIDDLE) ? MSBTN_RIGHT : 0; - break; - - case SDL_MOUSEWHEEL: - if (e.wheel.which == SDL_TOUCH_MOUSEID) - { - return result; - } - - *handle = e.wheel.windowID; - result.type = UI_EVENT_MOUSE_SCROLL; - result.mouse.scroll.x = e.wheel.x; - result.mouse.scroll.y = e.wheel.y; - result.mouse.position = _last_mouse_pos; - break; - - default: - break; - } - - return result; -} - -void embed_app_pump(UiApp *self) -{ - SDL_Event e; - - while (SDL_PollEvent(&e) != 0 && self->alive) - { - uint32_t handle = 0; - UiEvent event = sdl_event_to_ui_event(e, &handle); - - switch (e.type) - { - case SDL_QUIT: - ui_app_exit(self, 0); - break; - - case SDL_WINDOWEVENT: - case SDL_KEYDOWN: - case SDL_KEYUP: - case SDL_MOUSEMOTION: - case SDL_MOUSEBUTTONDOWN: - case SDL_MOUSEBUTTONUP: - case SDL_MOUSEWHEEL: - vec_foreach_v(win, &self->windows) - { - if (SDL_GetWindowID(win->embed.sdl_window) == handle) - { - ui_win_dispatch(win, &event); - } - } - break; - - default: - log$("Unhandled SDL event {}", e.type); - break; - } - } -} - -void embed_app_wait(MAYBE_UNUSED UiApp *self) -{ - SDL_WaitEventTimeout(nullptr, 1000); -} diff --git a/sources/libs/embed/sdl/app.h b/sources/libs/embed/sdl/app.h deleted file mode 100644 index 892be9400..000000000 --- a/sources/libs/embed/sdl/app.h +++ /dev/null @@ -1,6 +0,0 @@ -#pragma once - -struct _EmbedApp -{ - int _dummy; -}; diff --git a/sources/libs/embed/sdl/win.c b/sources/libs/embed/sdl/win.c deleted file mode 100644 index 452aed853..000000000 --- a/sources/libs/embed/sdl/win.c +++ /dev/null @@ -1,52 +0,0 @@ -#include -#include - -void embed_win_init(UiWin *self, MRectf bound) -{ - self->embed.sdl_window = SDL_CreateWindow( - "BRUTAL", - SDL_WINDOWPOS_UNDEFINED, - SDL_WINDOWPOS_UNDEFINED, - bound.width, - bound.height, - SDL_WINDOW_HIDDEN | SDL_WINDOW_ALLOW_HIGHDPI); -} - -void embed_win_deinit(UiWin *self) -{ - SDL_DestroyWindow(self->embed.sdl_window); -} - -void embed_win_show(UiWin *self) -{ - SDL_ShowWindow(self->embed.sdl_window); -} - -void embed_win_hide(UiWin *self) -{ - SDL_HideWindow(self->embed.sdl_window); -} - -bool embed_win_visible(UiWin *self) -{ - return SDL_GetWindowFlags(self->embed.sdl_window) & SDL_WINDOW_SHOWN; -} - -void embed_win_flip(UiWin *self, MRectf rect) -{ - SDL_Rect sdl_rect = {rect.x, rect.y, rect.width, rect.height}; - SDL_UpdateWindowSurfaceRects(self->embed.sdl_window, &sdl_rect, 1); -} - -GfxBuf embed_win_gfx(UiWin *self) -{ - SDL_Surface *sdl_surface = SDL_GetWindowSurface(self->embed.sdl_window); - - return (GfxBuf){ - .width = sdl_surface->w, - .height = sdl_surface->h, - .pitch = sdl_surface->pitch, - .fmt = GFX_FMT_BGRA8888, - .buf = sdl_surface->pixels, - }; -} diff --git a/sources/libs/embed/sdl/win.h b/sources/libs/embed/sdl/win.h deleted file mode 100644 index d574d300c..000000000 --- a/sources/libs/embed/sdl/win.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -#include - -struct _EmbedWin -{ - SDL_Window *sdl_window; -}; diff --git a/sources/libs/embed/win-decl.h b/sources/libs/embed/win-decl.h deleted file mode 100644 index 01cfdb1e9..000000000 --- a/sources/libs/embed/win-decl.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -#include - -#if defined(SYSTEM_SDL) -# include -#elif defined(SYSTEM_BRUTAL) -# include -#else -# error "Unsupported embedder!" -#endif - -typedef struct _EmbedWin EmbedWin; diff --git a/sources/libs/embed/win.h b/sources/libs/embed/win.h deleted file mode 100644 index 9ba403613..000000000 --- a/sources/libs/embed/win.h +++ /dev/null @@ -1,17 +0,0 @@ -#pragma once - -#include - -void embed_win_init(UiWin *self, MRectf bound); - -void embed_win_deinit(UiWin *self); - -void embed_win_show(UiWin *self); - -void embed_win_hide(UiWin *self); - -bool embed_win_visible(UiWin *self); - -void embed_win_flip(UiWin *self, MRectf rect); - -GfxBuf embed_win_gfx(UiWin *self); diff --git a/sources/libs/hw/ps2/keyboard.c b/sources/libs/hw/ps2/keyboard.c index caf40f6cb..e01a984b4 100644 --- a/sources/libs/hw/ps2/keyboard.c +++ b/sources/libs/hw/ps2/keyboard.c @@ -1,6 +1,6 @@ +#include #include #include -#include static void ps2_keyboard_handle_code(Ps2Keyboard *ps2, uint8_t packet) { @@ -8,11 +8,11 @@ static void ps2_keyboard_handle_code(Ps2Keyboard *ps2, uint8_t packet) { ps2->kb_escaped = false; KbKey key = (KbKey)((packet & 0x7f) + 0x80); - UiEvent ev = { + InputEvent ev = { .keyboard = { .key = key, }, - .type = packet & 0x80 ? UI_EVENT_KEYBOARD_UP : UI_EVENT_KEYBOARD_DOWN, + .type = packet & 0x80 ? INPUT_EVENT_KEYBOARD_UP : INPUT_EVENT_KEYBOARD_DOWN, }; ps2->callback(ev, ps2->ctx); @@ -25,11 +25,11 @@ static void ps2_keyboard_handle_code(Ps2Keyboard *ps2, uint8_t packet) { KbKey key = (KbKey)((packet & 0x7f)); - UiEvent ev = { + InputEvent ev = { .keyboard = { .key = key, }, - .type = packet & 0x80 ? UI_EVENT_KEYBOARD_UP : UI_EVENT_KEYBOARD_DOWN, + .type = packet & 0x80 ? INPUT_EVENT_KEYBOARD_UP : INPUT_EVENT_KEYBOARD_DOWN, }; ps2->callback(ev, ps2->ctx); diff --git a/sources/libs/hw/ps2/keyboard.h b/sources/libs/hw/ps2/keyboard.h index f485650ab..e5590f600 100644 --- a/sources/libs/hw/ps2/keyboard.h +++ b/sources/libs/hw/ps2/keyboard.h @@ -1,9 +1,9 @@ #pragma once +#include #include -#include -typedef void (*Ps2KeyboardCallback)(UiEvent ev, void *context); +typedef void (*Ps2KeyboardCallback)(InputEvent ev, void *context); typedef struct { diff --git a/sources/libs/hw/ps2/mouse.c b/sources/libs/hw/ps2/mouse.c index 41d7297b1..718424635 100644 --- a/sources/libs/hw/ps2/mouse.c +++ b/sources/libs/hw/ps2/mouse.c @@ -2,29 +2,29 @@ #include #include -UiEventType ps2_mouse_event_type(UiMouseEvent prev, UiMouseEvent next) +InputEventType ps2_mouse_event_type(InputMouseEvent prev, InputMouseEvent next) { if (next.buttons > prev.buttons) { - return UI_EVENT_MOUSE_DOWN; + return INPUT_EVENT_MOUSE_DOWN; } if (next.buttons < prev.buttons) { - return UI_EVENT_MOUSE_UP; + return INPUT_EVENT_MOUSE_UP; } if (m_vec2f_len(prev.offset) > 0) { - return UI_EVENT_MOUSE_MOVE; + return INPUT_EVENT_MOUSE_MOVE; } if (m_vec2f_len(prev.scroll) > 0) { - return UI_EVENT_MOUSE_SCROLL; + return INPUT_EVENT_MOUSE_SCROLL; } - return UI_EVENT_IGNORE; + return INPUT_EVENT_IGNORE; } static void ps2_mouse_handle_packed(Ps2Mouse *self) @@ -55,7 +55,7 @@ static void ps2_mouse_handle_packed(Ps2Mouse *self) } // decode the new mouse packet - UiMouseEvent event = {}; + InputMouseEvent event = {}; event.offset.x = offx; event.offset.y = -offy; @@ -66,7 +66,7 @@ static void ps2_mouse_handle_packed(Ps2Mouse *self) event.buttons |= ((buf[0] >> 2) & 1) ? MSBTN_MIDDLE : 0; self->callback( - (UiEvent){ + (InputEvent){ .type = ps2_mouse_event_type(self->prev, event), .mouse = event, }, diff --git a/sources/libs/hw/ps2/mouse.h b/sources/libs/hw/ps2/mouse.h index 94ef5af04..399ca0873 100644 --- a/sources/libs/hw/ps2/mouse.h +++ b/sources/libs/hw/ps2/mouse.h @@ -1,10 +1,10 @@ #pragma once -#include #include -#include +#include +#include -typedef void (*Ps2MouseCallback)(UiEvent ev, void *ctx); +typedef void (*Ps2MouseCallback)(InputEvent ev, void *ctx); typedef struct { @@ -15,7 +15,7 @@ typedef struct Ps2MouseCallback callback; void *ctx; Ps2Controller *controller; - UiMouseEvent prev; + InputMouseEvent prev; } Ps2Mouse; typedef enum diff --git a/sources/protos/event.idl b/sources/protos/event.idl index 356d958b6..038811144 100644 --- a/sources/protos/event.idl +++ b/sources/protos/event.idl @@ -1,9 +1,9 @@ module event; import base, math; -include brutal-ui; +include brutal-input; -type Event = __ctype(UiEvent); +type Event = __ctype(InputEvent); interface Sink { diff --git a/sources/protos/ui.idl b/sources/protos/ui.idl deleted file mode 100644 index 1e323a6ba..000000000 --- a/sources/protos/ui.idl +++ /dev/null @@ -1,5 +0,0 @@ -module ui; - -include brutal-ui; - -type UiWinType = __ctype; diff --git a/sources/protos/window.idl b/sources/protos/window.idl deleted file mode 100644 index 94d1c3d3a..000000000 --- a/sources/protos/window.idl +++ /dev/null @@ -1,31 +0,0 @@ -module window; - -import base, math, event, ui; - -type WindowClientProps = -{ - MRectf bound, - UiWinType type, -}; - -interface Client -{ - method show -> Bool; - - method hide -> Bool; - - method close -> Bool; - - method flip MRectf -> Bool; - - method move MRectf -> Bool; - - method surface -> IpcFb; - - method listen IpcCap -> Bool; -}; - -interface Server -{ - method create WindowClientProps -> IpcCap; -}; diff --git a/sources/srvs/ps2/main.c b/sources/srvs/ps2/main.c index 1c10e82da..9a91142ae 100644 --- a/sources/srvs/ps2/main.c +++ b/sources/srvs/ps2/main.c @@ -2,18 +2,18 @@ #include #include #include -#include +#include #include #include #include -void ps2_keyboard_callback(UiEvent ev, IpcCap *input_sink) +void ps2_keyboard_callback(InputEvent ev, IpcCap *input_sink) { bool handled = false; event_sink_dispatch_rpc(ipc_self(), *input_sink, &ev, &handled, alloc_global()); } -void ps2_mouse_callback(UiEvent ev, IpcCap *input_sink) +void ps2_mouse_callback(InputEvent ev, IpcCap *input_sink) { bool handled = false; event_sink_dispatch_rpc(ipc_self(), *input_sink, &ev, &handled, alloc_global()); diff --git a/sources/srvs/system/main.c b/sources/srvs/system/main.c index 4538d61c2..4c5a9877d 100644 --- a/sources/srvs/system/main.c +++ b/sources/srvs/system/main.c @@ -1,7 +1,8 @@ +#include #include #include #include -#include + #include "system/bus.h" /* --- System Server Protocol ----------------------------------------------- */ @@ -72,7 +73,7 @@ HwError hw_display_surface_handler(void *self, void *, BalFb *resp, Alloc *) framebuffer->width, framebuffer->height, framebuffer->pitch, - GFX_FMT_BGRA8888); + BAL_FB_FMT_BGRA8888); return IPC_SUCCESS; } diff --git a/sources/srvs/window/build.mk b/sources/srvs/window/build.mk deleted file mode 100644 index 95c4011d9..000000000 --- a/sources/srvs/window/build.mk +++ /dev/null @@ -1,3 +0,0 @@ -PKG_WINDOW_PATH=srvs/window - -SRVS+=WINDOW diff --git a/sources/srvs/window/client.c b/sources/srvs/window/client.c deleted file mode 100644 index a4de11e33..000000000 --- a/sources/srvs/window/client.c +++ /dev/null @@ -1,154 +0,0 @@ -#include -#include -#include "window/client.h" -#include "window/server.h" - -/* --- Window Client Protocol ----------------------------------------------- */ - -static WindowError window_client_show_handler(void *self, void *, bool *resp, Alloc *) -{ - WmClient *client = self; - wm_client_show(client); - *resp = true; - return IPC_SUCCESS; -} - -static WindowError window_client_hide_handler(void *self, void *, bool *resp, Alloc *) -{ - WmClient *client = self; - wm_client_hide(client); - *resp = true; - return IPC_SUCCESS; -} - -static WindowError window_client_close_handler(void *self, void *, bool *resp, Alloc *) -{ - WmClient *client = self; - wm_client_close(client); - *resp = true; - return IPC_SUCCESS; -} - -static WindowError window_client_flip_handler(void *self, MRectf const *req, bool *resp, Alloc *) -{ - WmClient *client = self; - wm_client_flip(client, *req); - *resp = true; - return IPC_SUCCESS; -} - -static WindowError window_client_resize_handler(void *self, MRectf const *req, bool *resp, Alloc *) -{ - WmClient *client = self; - wm_client_resize(client, *req); - *resp = true; - return IPC_SUCCESS; -} - -static WindowError window_client_surface_handler(void *self, void *, BalFb *resp, Alloc *) -{ - WmClient *client = self; - bal_fb_dup(resp, &client->backbuffer); - return IPC_SUCCESS; -} - -static WindowError window_client_listen_handler(void *self, IpcCap const *req, bool *resp, Alloc *) -{ - WmClient *client = self; - client->handle = *req; - *resp = true; - return IPC_SUCCESS; -} - -static WindowClientVTable _window_client_vtable = { - window_client_show_handler, - window_client_hide_handler, - window_client_close_handler, - window_client_flip_handler, - window_client_resize_handler, - window_client_surface_handler, - window_client_listen_handler, -}; - -/* --- Window Manager Client ------------------------------------------------ */ - -WmClient *wm_client_create(struct _WmServer *server, MRectf bound, UiWinType type) -{ - WmClient *self = alloc_make(alloc_global(), WmClient); - - ipc_object_init(base$(self), ipc_self(), alloc_global()); - - self->server = server; - self->bound = bound; - self->type = type; - - gfx_surface_init(&self->frontbuffer, bound.width, bound.height, GFX_FMT_RGBA8888, alloc_global()); - bal_fb_init(&self->backbuffer, bound.width, bound.height, GFX_FMT_RGBA8888); - bal_fb_map(&self->backbuffer); - - window_client_provide(base$(self), &_window_client_vtable); - - return self; -} - -void wm_client_destroy(WmClient *self) -{ - bal_fb_deinit(&self->backbuffer); - gfx_surface_deinit(&self->frontbuffer); - ipc_object_deinit(base$(self)); - alloc_free(alloc_global(), self); -} - -GfxBuf wm_client_frontbuffer(WmClient *self) -{ - return gfx_surface_buf(&self->frontbuffer); -} - -GfxBuf wm_client_backbuffer(WmClient *self) -{ - return bal_fb_buf(&self->backbuffer); -} - -void wm_client_show(WmClient *self) -{ - self->visible = true; - wm_server_should_render(self->server, self->bound); -} - -void wm_client_hide(WmClient *self) -{ - self->visible = false; - wm_server_should_render(self->server, self->bound); -} - -void wm_client_close(WmClient *self) -{ - self->visible = false; - wm_server_should_render(self->server, self->bound); -} - -void wm_client_flip(WmClient *self, MRectf bound) -{ - gfx_ops_copy(wm_client_frontbuffer(self), wm_client_backbuffer(self), 0, 0); - - bound.pos = m_vec2f_add(bound.pos, self->bound.pos); - wm_server_should_render(self->server, bound); -} - -void wm_client_resize(WmClient *self, MRectf bound) -{ - wm_server_should_render(self->server, self->bound); - self->bound = bound; - wm_server_should_render(self->server, self->bound); -} - -void wm_client_dispatch(WmClient *self, UiEvent event) -{ - if (ui_event_is_mouse(&event)) - { - event.mouse.position = m_vec2f_sub(event.mouse.position, self->bound.pos); - } - - bool resp; - event_sink_dispatch_rpc(ipc_self(), self->handle, &event, &resp, alloc_global()); -} diff --git a/sources/srvs/window/client.h b/sources/srvs/window/client.h deleted file mode 100644 index 928e9af08..000000000 --- a/sources/srvs/window/client.h +++ /dev/null @@ -1,43 +0,0 @@ -#pragma once - -#include -#include -#include -#include -#include - -typedef struct -{ - IpcObject base; - IpcCap handle; // to the object on the client side - - UiWinType type; - - bool visible; - MRectf bound; - - GfxSurface frontbuffer; - BalFb backbuffer; - - struct _WmServer *server; -} WmClient; - -WmClient *wm_client_create(struct _WmServer *server, MRectf bound, UiWinType type); - -void wm_client_destroy(WmClient *self); - -GfxBuf wm_client_frontbuffer(WmClient *self); - -GfxBuf wm_client_backbuffer(WmClient *self); - -void wm_client_show(WmClient *self); - -void wm_client_hide(WmClient *self); - -void wm_client_close(WmClient *self); - -void wm_client_flip(WmClient *self, MRectf bound); - -void wm_client_resize(WmClient *self, MRectf bound); - -void wm_client_dispatch(WmClient *self, UiEvent event); diff --git a/sources/srvs/window/display.c b/sources/srvs/window/display.c deleted file mode 100644 index e36b15238..000000000 --- a/sources/srvs/window/display.c +++ /dev/null @@ -1,47 +0,0 @@ -#include "window/display.h" - -void wm_display_init(WmDisplay *self, BalFb frontbuffer, Alloc *alloc) -{ - self->frontbuffer = frontbuffer; - bal_fb_map(&self->frontbuffer); - gfx_surface_init(&self->backbuffer, frontbuffer.width, frontbuffer.height, GFX_FMT_RGBA8888, alloc); - gfx_init(&self->gfx, alloc); -} - -void wm_display_deinit(WmDisplay *self) -{ - gfx_surface_deinit(&self->backbuffer); - gfx_deinit(&self->gfx); -} - -GfxBuf wm_display_frontbuffer(WmDisplay *self) -{ - return bal_fb_buf(&self->frontbuffer); -} - -GfxBuf wm_display_backbuffer(WmDisplay *self) -{ - return gfx_surface_buf(&self->backbuffer); -} - -Gfx *wm_display_begin(WmDisplay *self) -{ - gfx_begin(&self->gfx, wm_display_backbuffer(self)); - - return &self->gfx; -} - -void wm_display_flip(WmDisplay *self, MRectf rect) -{ - gfx_ops_flip(wm_display_frontbuffer(self), wm_display_backbuffer(self), rect); -} - -void wm_display_end(WmDisplay *self) -{ - gfx_end(&self->gfx); -} - -MRectf wm_display_bound(WmDisplay *self) -{ - return gfx_buf_bound(wm_display_backbuffer(self)); -} diff --git a/sources/srvs/window/display.h b/sources/srvs/window/display.h deleted file mode 100644 index 7306e3bf5..000000000 --- a/sources/srvs/window/display.h +++ /dev/null @@ -1,27 +0,0 @@ -#pragma once - -#include -#include - -typedef struct -{ - BalFb frontbuffer; - GfxSurface backbuffer; - Gfx gfx; -} WmDisplay; - -void wm_display_init(WmDisplay *self, BalFb frontbuffer, Alloc *alloc); - -GfxBuf wm_display_frontbuffer(WmDisplay *self); - -GfxBuf wm_display_backbuffer(WmDisplay *self); - -void wm_display_deinit(WmDisplay *self); - -Gfx *wm_display_begin(WmDisplay *self); - -void wm_display_flip(WmDisplay *self, MRectf rect); - -void wm_display_end(WmDisplay *self); - -MRectf wm_display_bound(WmDisplay *self); diff --git a/sources/srvs/window/main.c b/sources/srvs/window/main.c deleted file mode 100644 index d55271fe8..000000000 --- a/sources/srvs/window/main.c +++ /dev/null @@ -1,25 +0,0 @@ -#include -#include -#include -#include "window/server.h" - -int ipc_component_main(IpcComponent *self) -{ - IpcCap bus_server = ipc_component_require(self, IPC_SYSTEM_SERVER_PROTO); - IpcCap hw_display = ipc_component_require(self, IPC_HW_DISPLAY_PROTO); - - BalFb surface = {}; - hw_display_surface_rpc(self, hw_display, &surface, alloc_global()); - - WmDisplay display = {}; - wm_display_init(&display, surface, alloc_global()); - - WmServer server = {}; - wm_server_init(&server, &display); - wm_server_expose(&server, bus_server); - - wm_server_should_render_all(&server); - wm_server_render(&server); - - return ipc_component_run(self); -} diff --git a/sources/srvs/window/manifest.json b/sources/srvs/window/manifest.json deleted file mode 100644 index a04ee5c55..000000000 --- a/sources/srvs/window/manifest.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "window", - "consume": ["system.Server", "hw.Display"], - "rights": ["log"] -} diff --git a/sources/srvs/window/server.c b/sources/srvs/window/server.c deleted file mode 100644 index 0d8817455..000000000 --- a/sources/srvs/window/server.c +++ /dev/null @@ -1,209 +0,0 @@ -#include -#include -#include -#include - -#include "window/server.h" - -/* --- Input Sink Protocol -------------------------------------------------- */ - -static EventError input_sink_dispatch_handler(void *ctx, UiEvent const *req, bool *resp, Alloc *) -{ - WmServer *wm = ctx; - wm_server_dispatch(wm, *req); - - *resp = true; - return IPC_SUCCESS; -} - -static EventSinkVTable _input_sink_vtable = { - input_sink_dispatch_handler, -}; - -/* --- Window Manager Server Protocol --------------------------------------- */ - -WindowError window_server_create_handler(void *self, WindowClientProps const *req, IpcCap *resp, Alloc *) -{ - WmServer *server = self; - - WmClient *client = wm_client_create(server, req->bound, req->type); - vec_push(&server->clients, client); - *resp = ipc_object_cap(base$(client), IPC_WINDOW_CLIENT_PROTO); - - return IPC_SUCCESS; -} - -WindowServerVTable _window_server_vtable = { - window_server_create_handler, -}; - -/* --- Render loop ---------------------------------------------------------- */ - -static void *wm_render_fiber(void *ctx) -{ - WmServer *self = ctx; - - while (true) - { - if (gfx_dirty_any(&self->display_dirty)) - { - wm_server_render(self); - } - - fiber_sleep(16); - } - - return nullptr; -} - -/* --- Window Manager Server ------------------------------------------------ */ - -void wm_server_init(WmServer *self, WmDisplay *display) -{ - ipc_object_init(base$(self), ipc_self(), alloc_global()); - - self->display = display; - self->mouse = m_vec2f(0, 0); - gfx_dirty_init(&self->display_dirty, alloc_global()); - vec_init(&self->clients, alloc_global()); - - self->window_server = window_server_provide(base$(self), &_window_server_vtable); - self->input_sink = event_sink_provide(base$(self), &_input_sink_vtable); - self->render_fiber = fiber_start(wm_render_fiber, self); -} - -void wm_server_deinit(WmServer *self) -{ - vec_deinit(&self->clients); - gfx_dirty_deinit(&self->display_dirty); - ipc_object_deinit(base$(self)); -} - -void wm_server_dispatch(WmServer *self, UiEvent event) -{ - if (ui_event_is_mouse(&event)) - { - if (event.type == UI_EVENT_MOUSE_MOVE) - { - MRectf mouse_bound = { - .pos = m_vec2f_sub(self->mouse, m_vec2f(8, 8)), - .size = m_vec2f(42, 42), - }; - - wm_server_should_render(self, mouse_bound); - - self->mouse = m_vec2f_add(self->mouse, event.mouse.offset); - self->mouse = m_rectf_clamp_vec2(wm_display_bound(self->display), self->mouse); - - mouse_bound = (MRectf){ - .pos = self->mouse, - .size = m_vec2f(32, 32), - }; - - wm_server_should_render(self, mouse_bound); - } - - event.mouse.position = self->mouse; - } - - WmClient *client = wm_server_client_at(self, self->mouse); - if (client) - { - wm_client_dispatch(client, event); - } -} - -static void wm_server_render_cursor(WmServer *self, Gfx *gfx) -{ - gfx_push(gfx); - gfx_origin(gfx, m_vec2f_sub(self->mouse, m_vec2f(1, 1))); - gfx_fill_style(gfx, gfx_paint_fill(GFX_BLACK)); - gfx_fill_svg(gfx, str$("M 0 0 L 16 12.279 L 9.049 13.449 L 13.374 22.266 L 9.778 24 L 5.428 15.121 L -0 19.823 Z"), GFX_FILL_EVENODD); - - gfx_stroke_style(gfx, (GfxStroke){.pos = GFX_STOKE_OUTSIDE, .width = 1}); - gfx_fill_style(gfx, gfx_paint_fill(UI_COLOR_BASE09)); - gfx_stroke(gfx); - - gfx_pop(gfx); -} - -static void wm_server_render_clients(WmServer *self, Gfx *gfx) -{ - vec_foreach_v(client, &self->clients) - { - GfxBuf backbuffer = wm_client_backbuffer(client); - gfx_fill_style(gfx, gfx_paint_image(backbuffer, gfx_buf_bound(backbuffer))); - - if (client->type == UI_WIN_NORMAL) - { - gfx_fill_rect(gfx, client->bound, 8); - } - else - { - gfx_fill_rect(gfx, client->bound, 0); - } - - gfx_stroke_style(gfx, (GfxStroke){.pos = GFX_STOKE_INSIDE, .width = 1}); - gfx_fill_style(gfx, gfx_paint_fill(UI_COLOR_BASE02)); - gfx_stroke(gfx); - } -} - -void wm_server_should_render(WmServer *self, MRectf rect) -{ - gfx_dirty_rect(&self->display_dirty, rect); -} - -void wm_server_should_render_all(WmServer *self) -{ - wm_server_should_render(self, wm_display_bound(self->display)); -} - -void wm_server_render(WmServer *self) -{ - Gfx *gfx = wm_display_begin(self->display); - - gfx_dirty_foreach(dirty, &self->display_dirty) - { - gfx_push(gfx); - gfx_clip(gfx, dirty); - - gfx_clear(gfx, GFX_GAINSBORO); - - wm_server_render_clients(self, gfx); - wm_server_render_cursor(self, gfx); - - // gfx_fill_style(gfx, gfx_paint_fill(gfx_color_rand(50))); - // gfx_fill_rect(gfx, dirty, 0); - - gfx_pop(gfx); - } - - gfx_dirty_foreach(dirty, &self->display_dirty) - { - wm_display_flip(self->display, dirty); - } - - wm_display_end(self->display); - - gfx_dirty_clear(&self->display_dirty); -} - -void wm_server_expose(WmServer *self, IpcCap bus_server) -{ - system_server_expose_rpc(ipc_self(), bus_server, &self->input_sink, alloc_global()); - system_server_expose_rpc(ipc_self(), bus_server, &self->window_server, alloc_global()); -} - -WmClient *wm_server_client_at(WmServer *self, MVec2f vec) -{ - vec_foreach_v(client, &self->clients) - { - if (m_rectf_collide_point(client->bound, vec)) - { - return client; - } - } - - return nullptr; -} diff --git a/sources/srvs/window/server.h b/sources/srvs/window/server.h deleted file mode 100644 index e84124530..000000000 --- a/sources/srvs/window/server.h +++ /dev/null @@ -1,40 +0,0 @@ -#pragma once - -#include -#include "window/client.h" -#include "window/display.h" - -typedef struct _WmServer -{ - IpcObject base; - - IpcCap window_server; - IpcCap input_sink; - Fiber *render_fiber; - - GfxDirty display_dirty; - WmDisplay *display; - - MVec2f mouse; - Vec(WmClient *) clients; -} WmServer; - -void wm_server_init(WmServer *self, WmDisplay *display); - -void wm_server_deinit(WmServer *self); - -void wm_server_dispatch(WmServer *self, UiEvent event); - -void wm_server_should_layout(WmServer *self); - -void wm_server_layout(WmServer *self); - -void wm_server_should_render(WmServer *self, MRectf rect); - -void wm_server_should_render_all(WmServer *self); - -void wm_server_render(WmServer *self); - -void wm_server_expose(WmServer *self, IpcCap bus); - -WmClient *wm_server_client_at(WmServer *self, MVec2f vec); diff --git a/sources/utils/test/brutal/gfx/path.c b/sources/utils/test/brutal/gfx/path.c deleted file mode 100644 index 8ff7c7a4d..000000000 --- a/sources/utils/test/brutal/gfx/path.c +++ /dev/null @@ -1,29 +0,0 @@ -#include -#include -#include - -static char const *_logo = "M86 86L43 43L0 0H43H86V43V86ZM43 43L43 0L86 43H43ZM129 86C105.252 86 86 66.7482 86 43C86 19.2518 105.252 0 129 0C152.748 0 172 19.2518 172 43C172 66.7482 152.748 86 129 86ZM107.5 43C107.5 54.8741 117.126 64.5 129 64.5C140.874 64.5 150.5 54.8741 150.5 43C150.5 31.1259 140.874 21.5 129 21.5C117.126 21.5 107.5 31.1259 107.5 43ZM86 129C86 137.505 88.5219 145.818 93.2468 152.89C97.9717 159.961 104.687 165.472 112.545 168.727C120.402 171.981 129.048 172.833 137.389 171.174C145.73 169.515 153.392 165.419 159.406 159.406C165.419 153.392 169.515 145.73 171.174 137.389C172.833 129.048 171.981 120.402 168.727 112.545C165.472 104.687 159.961 97.9717 152.89 93.2468C145.818 88.5219 137.505 86 129 86H86H43V43L0 43L43 86H0V172H86V129ZM86 129H129V86L86 129ZM21.5 150.5V107.5H64.5V150.5H21.5Z"; - -test$(gfx_fill_path) -{ - gfx_origin(test_use_gfx(), m_vec2f(64, 64)); - gfx_fill_style(test_use_gfx(), gfx_paint_fill(GFX_WHITE)); - gfx_fill_svg(test_use_gfx(), str$(_logo), GFX_FILL_EVENODD); -} - -test$(gfx_fill_path_rotated) -{ - MTrans2 trans = m_trans2_rotate(1 / 16.0); - gfx_origin(test_use_gfx(), m_vec2f(500, 300)); - gfx_trans(test_use_gfx(), trans); - - gfx_fill_style(test_use_gfx(), gfx_paint_fill(GFX_WHITE)); - gfx_fill_svg(test_use_gfx(), str$(_logo), GFX_FILL_EVENODD); -} - -test$(gfx_stroke_path) -{ - gfx_origin(test_use_gfx(), m_vec2f(64, 64)); - gfx_fill_style(test_use_gfx(), gfx_paint_fill(GFX_WHITE)); - gfx_stroke_svg(test_use_gfx(), str$(_logo)); -} diff --git a/sources/utils/test/brutal/gfx/rect.c b/sources/utils/test/brutal/gfx/rect.c deleted file mode 100644 index 813f09c51..000000000 --- a/sources/utils/test/brutal/gfx/rect.c +++ /dev/null @@ -1,50 +0,0 @@ -#include -#include -#include - -test$(gfx_fill_rect) -{ - gfx_fill_style(test_use_gfx(), gfx_paint_fill(UI_COLOR_BASE02)); - - gfx_fill_rect(test_use_gfx(), m_rectf(10, 10, 512, 50), 0); -} - -test$(gfx_fill_rect_rounded) -{ - gfx_fill_style(test_use_gfx(), gfx_paint_fill(UI_COLOR_BASE02)); - - gfx_fill_rect(test_use_gfx(), m_rectf(10, 10, 512, 50), 32); -} - -test$(gfx_fill_rect_gradient) -{ - GfxGradient grad = { - .len = 5, - .stops = { - { - .loc = 0.0f, - .color = UI_COLOR_LIGHT_BLUE, - }, - { - .loc = 0.25f, - .color = UI_COLOR_LIGHT_RED, - }, - { - .loc = 0.5f, - .color = UI_COLOR_BASE08, - }, - { - .loc = 0.75f, - .color = UI_COLOR_LIGHT_RED, - }, - { - .loc = 1.f, - .color = UI_COLOR_LIGHT_BLUE, - }, - }, - - }; - - gfx_fill_style(test_use_gfx(), gfx_paint_gradient(&grad)); - gfx_fill_rect(test_use_gfx(), m_rectf(10, 10, 512, 512), 32); -} diff --git a/sources/utils/test/brutal/gfx/text.c b/sources/utils/test/brutal/gfx/text.c deleted file mode 100644 index 53e0cc52d..000000000 --- a/sources/utils/test/brutal/gfx/text.c +++ /dev/null @@ -1,19 +0,0 @@ -#include -#include -#include - -test$(gfx_basic_text) -{ - gfx_fill_style(test_use_gfx(), gfx_paint_fill(UI_COLOR_BASE08)); - - float scale = 1.f; - float pos = 64.f; - - for (int i = 0; i < 8; i++) - { - gfx_font_style(test_use_gfx(), (GfxFontStyle){.scale = scale}); - gfx_text(test_use_gfx(), m_vec2f(18, pos), str$("The quick brown fox jumps over the lazy dog.")); - scale *= 1.25; - pos += scale * 16; - } -} diff --git a/sources/utils/test/brutal/ui/parser.c b/sources/utils/test/brutal/ui/parser.c deleted file mode 100644 index ccd300dea..000000000 --- a/sources/utils/test/brutal/ui/parser.c +++ /dev/null @@ -1,189 +0,0 @@ -#include -#include - -static UiLayout try_parse_layout(char const *str) -{ - Scan scan; - scan_init(&scan, str$(str)); - - UiLayout layout = {}; - ui_parse_layout(&layout, &scan); - expect$(!scan_dump_error(&scan, io_chan_err())); - - return layout; -} - -#define TEST_CASE(STR, EXPECTED) \ - test_case$(STR ": " #EXPECTED) \ - { \ - assert_truth(try_parse_layout(STR) EXPECTED); \ - } - -test$(ui_parse_layout_dock) -{ - TEST_CASE("dock", .type == UI_LAYOUT_DOCK); - TEST_CASE("dock-start", .dock == M_DOCK_START); - TEST_CASE("dock-s", .dock == M_DOCK_START); - TEST_CASE("dock-end", .dock == M_DOCK_END); - TEST_CASE("dock-e", .dock == M_DOCK_END); - TEST_CASE("dock-top", .dock == M_DOCK_TOP); - TEST_CASE("dock-t", .dock == M_DOCK_TOP); - TEST_CASE("dock-bottom", .dock == M_DOCK_BOTTOM); - TEST_CASE("dock-b", .dock == M_DOCK_BOTTOM); - TEST_CASE("dock-fill", .dock == M_DOCK_FILL); - TEST_CASE("dock-none", .dock == M_DOCK_NONE); -} - -test$(ui_parse_layout_flex) -{ - TEST_CASE("flex", .type == UI_LAYOUT_FLEX); - - TEST_CASE("grow-3", .grow > 2.9); - TEST_CASE("gaps-3", .gaps.x > 2.9); - TEST_CASE("gaps-x-3", .gaps.x > 2.9); - TEST_CASE("gaps-y-3", .gaps.y > 2.9); -} - -test$(ui_parse_layout_grid) -{ - TEST_CASE("grid", .type == UI_LAYOUT_GRID); -} - -test$(ui_parse_layout_min_max) -{ - TEST_CASE("min-width-3", .size.min.width > 2.9); - TEST_CASE("min-height-3", .size.min.height > 2.9); - TEST_CASE("max-width-3", .size.max.width > 2.9); - TEST_CASE("max-height-3", .size.max.height > 2.9); - - TEST_CASE("min-w-3", .size.min.width > 2.9); - TEST_CASE("min-h-3", .size.min.height > 2.9); - TEST_CASE("max-w-3", .size.max.width > 2.9); - TEST_CASE("max-h-3", .size.max.height > 2.9); - - TEST_CASE("min-x-3", .size.min.width > 2.9); - TEST_CASE("min-y-3", .size.min.height > 2.9); - TEST_CASE("max-x-3", .size.max.width > 2.9); - TEST_CASE("max-y-3", .size.max.height > 2.9); -} - -test$(ui_parse_layout_grivity) -{ - TEST_CASE("gravity-reset", .gravity == M_GRAVITY_NONE); - TEST_CASE("gravity-s", .gravity == M_GRAVITY_START); - TEST_CASE("gravity-start", .gravity == M_GRAVITY_START); - TEST_CASE("gravity-e", .gravity == M_GRAVITY_END); - TEST_CASE("gravity-end", .gravity == M_GRAVITY_END); - TEST_CASE("gravity-t", .gravity == M_GRAVITY_TOP); - TEST_CASE("gravity-top", .gravity == M_GRAVITY_TOP); - TEST_CASE("gravity-b", .gravity == M_GRAVITY_BOTTOM); - TEST_CASE("gravity-bottom", .gravity == M_GRAVITY_BOTTOM); - TEST_CASE("gravity-center", .gravity == M_GRAVITY_CENTER); - TEST_CASE("gravity-vcenter", .gravity == M_GRAVITY_VCENTER); - TEST_CASE("gravity-hcenter", .gravity == M_GRAVITY_HCENTER); - TEST_CASE("gravity-fill", .gravity == M_GRAVITY_FILL); - TEST_CASE("gravity-vfill", .gravity == M_GRAVITY_VFILL); - TEST_CASE("gravity-hfill", .gravity == M_GRAVITY_HFILL); - - TEST_CASE("g-reset", .gravity == M_GRAVITY_NONE); - TEST_CASE("g-s", .gravity == M_GRAVITY_START); - TEST_CASE("g-start", .gravity == M_GRAVITY_START); - TEST_CASE("g-e", .gravity == M_GRAVITY_END); - TEST_CASE("g-end", .gravity == M_GRAVITY_END); - TEST_CASE("g-t", .gravity == M_GRAVITY_TOP); - TEST_CASE("g-top", .gravity == M_GRAVITY_TOP); - TEST_CASE("g-b", .gravity == M_GRAVITY_BOTTOM); - TEST_CASE("g-bottom", .gravity == M_GRAVITY_BOTTOM); - TEST_CASE("g-center", .gravity == M_GRAVITY_CENTER); - TEST_CASE("g-vcenter", .gravity == M_GRAVITY_VCENTER); - TEST_CASE("g-hcenter", .gravity == M_GRAVITY_HCENTER); - TEST_CASE("g-fill", .gravity == M_GRAVITY_FILL); - TEST_CASE("g-vfill", .gravity == M_GRAVITY_VFILL); - TEST_CASE("g-hfill", .gravity == M_GRAVITY_HFILL); -} - -test$(ui_parse_layout_placement) -{ - TEST_CASE("placement-reset", .placement == M_GRAVITY_NONE); - TEST_CASE("placement-s", .placement == M_GRAVITY_START); - TEST_CASE("placement-start", .placement == M_GRAVITY_START); - TEST_CASE("placement-e", .placement == M_GRAVITY_END); - TEST_CASE("placement-end", .placement == M_GRAVITY_END); - TEST_CASE("placement-t", .placement == M_GRAVITY_TOP); - TEST_CASE("placement-top", .placement == M_GRAVITY_TOP); - TEST_CASE("placement-b", .placement == M_GRAVITY_BOTTOM); - TEST_CASE("placement-bottom", .placement == M_GRAVITY_BOTTOM); - TEST_CASE("placement-center", .placement == M_GRAVITY_CENTER); - TEST_CASE("placement-vcenter", .placement == M_GRAVITY_VCENTER); - TEST_CASE("placement-hcenter", .placement == M_GRAVITY_HCENTER); - TEST_CASE("placement-fill", .placement == M_GRAVITY_FILL); - TEST_CASE("placement-vfill", .placement == M_GRAVITY_VFILL); - TEST_CASE("placement-hfill", .placement == M_GRAVITY_HFILL); - - TEST_CASE("place-reset", .placement == M_GRAVITY_NONE); - TEST_CASE("place-s", .placement == M_GRAVITY_START); - TEST_CASE("place-start", .placement == M_GRAVITY_START); - TEST_CASE("place-e", .placement == M_GRAVITY_END); - TEST_CASE("place-end", .placement == M_GRAVITY_END); - TEST_CASE("place-t", .placement == M_GRAVITY_TOP); - TEST_CASE("place-top", .placement == M_GRAVITY_TOP); - TEST_CASE("place-b", .placement == M_GRAVITY_BOTTOM); - TEST_CASE("place-bottom", .placement == M_GRAVITY_BOTTOM); - TEST_CASE("place-center", .placement == M_GRAVITY_CENTER); - TEST_CASE("place-vcenter", .placement == M_GRAVITY_VCENTER); - TEST_CASE("place-hcenter", .placement == M_GRAVITY_HCENTER); - TEST_CASE("place-fill", .placement == M_GRAVITY_FILL); - TEST_CASE("place-vfill", .placement == M_GRAVITY_VFILL); - TEST_CASE("place-hfill", .placement == M_GRAVITY_HFILL); -} - -test$(ui_parse_layout_spacing) -{ - TEST_CASE("padding-3", .padding.start > 2.9); - TEST_CASE("padding-3", .padding.end > 2.9); - TEST_CASE("padding-3", .padding.top > 2.9); - TEST_CASE("padding-3", .padding.bottom > 2.9); - - TEST_CASE("p-3", .padding.start > 2.9); - TEST_CASE("p-3", .padding.end > 2.9); - TEST_CASE("p-3", .padding.top > 2.9); - TEST_CASE("p-3", .padding.bottom > 2.9); - - TEST_CASE("padding-start-3", .padding.start > 2.9); - TEST_CASE("padding-end-3", .padding.end > 2.9); - TEST_CASE("padding-top-3", .padding.top > 2.9); - TEST_CASE("padding-bottom-3", .padding.bottom > 2.9); - - TEST_CASE("p-s-3", .padding.start > 2.9); - TEST_CASE("p-e-3", .padding.end > 2.9); - TEST_CASE("p-t-3", .padding.top > 2.9); - TEST_CASE("p-b-3", .padding.bottom > 2.9); - - TEST_CASE("margin-3", .margin.start > 2.9); - TEST_CASE("margin-3", .margin.end > 2.9); - TEST_CASE("margin-3", .margin.top > 2.9); - TEST_CASE("margin-3", .margin.bottom > 2.9); - - TEST_CASE("m-3", .margin.start > 2.9); - TEST_CASE("m-3", .margin.end > 2.9); - TEST_CASE("m-3", .margin.top > 2.9); - TEST_CASE("m-3", .margin.bottom > 2.9); - - TEST_CASE("margin-start-3", .margin.start > 2.9); - TEST_CASE("margin-end-3", .margin.end > 2.9); - TEST_CASE("margin-top-3", .margin.top > 2.9); - TEST_CASE("margin-bottom-3", .margin.bottom > 2.9); - - TEST_CASE("m-s-3", .margin.start > 2.9); - TEST_CASE("m-e-3", .margin.end > 2.9); - TEST_CASE("m-t-3", .margin.top > 2.9); - TEST_CASE("m-b-3", .margin.bottom > 2.9); -} - -test$(ui_parse_layout_flow) -{ - TEST_CASE("ltr", .flow == M_FLOW_LEFT_TO_RIGHT); - TEST_CASE("rtl", .flow == M_FLOW_RIGHT_TO_LEFT); - TEST_CASE("ttb", .flow == M_FLOW_TOP_TO_BOTTOM); - TEST_CASE("btt", .flow == M_FLOW_BOTTOM_TO_TOP); -} diff --git a/sysroot/boot/config.json b/sysroot/boot/config.json index ec20af26e..3195cffae 100644 --- a/sysroot/boot/config.json +++ b/sysroot/boot/config.json @@ -27,18 +27,6 @@ { "name": "ps2", "path": "/pkgs/ps2" - }, - { - "name": "window", - "path": "/pkgs/window" - }, - { - "name": "about", - "path": "/pkgs/about" - }, - { - "name": "panel", - "path": "/pkgs/panel" } ] } From 5041e12e41612240feba209ef9687eb3976e2947 Mon Sep 17 00:00:00 2001 From: VAN BOSSUYT Nicolas Date: Mon, 12 Dec 2022 21:40:37 +0100 Subject: [PATCH 02/13] meta: fix build. --- sources/libs/brutal-math/trans2.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/libs/brutal-math/trans2.h b/sources/libs/brutal-math/trans2.h index e479bab8b..fe1ed95ba 100644 --- a/sources/libs/brutal-math/trans2.h +++ b/sources/libs/brutal-math/trans2.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include "vec2.h" From 3f9b3825684a3d4fa4bed998c1cf8e3e7d61cb53 Mon Sep 17 00:00:00 2001 From: VAN BOSSUYT Nicolas Date: Mon, 12 Dec 2022 21:47:33 +0100 Subject: [PATCH 03/13] brutal-input: fix events header. --- sources/libs/brutal-input/event.h | 4 ++- sources/utils/fontinfo/build.mk | 3 --- sources/utils/fontinfo/main.c | 40 ---------------------------- sources/utils/fontinfo/manifest.json | 1 - 4 files changed, 3 insertions(+), 45 deletions(-) delete mode 100644 sources/utils/fontinfo/build.mk delete mode 100644 sources/utils/fontinfo/main.c delete mode 100644 sources/utils/fontinfo/manifest.json diff --git a/sources/libs/brutal-input/event.h b/sources/libs/brutal-input/event.h index 6dbf3bf58..c5b3c880c 100644 --- a/sources/libs/brutal-input/event.h +++ b/sources/libs/brutal-input/event.h @@ -1,8 +1,10 @@ #pragma once -#include #include +#include "keyboard.h" +#include "mouse.h" + enum { INPUT_EVENT_IGNORE, diff --git a/sources/utils/fontinfo/build.mk b/sources/utils/fontinfo/build.mk deleted file mode 100644 index ae7fb4eea..000000000 --- a/sources/utils/fontinfo/build.mk +++ /dev/null @@ -1,3 +0,0 @@ -PKG_FONTINFO_PATH=utils/fontinfo - -UTILS+=FONTINFO diff --git a/sources/utils/fontinfo/main.c b/sources/utils/fontinfo/main.c deleted file mode 100644 index f462ad71d..000000000 --- a/sources/utils/fontinfo/main.c +++ /dev/null @@ -1,40 +0,0 @@ -#include -#include - -int main(int argc, char const *argv[]) -{ - if (argc < 2) - { - log$("Usage: fontinfo [OPTION]... [INPUT]", argv[0]); - return -1; - } - - IoFile source_file; - UNWRAP_OR_PANIC(io_file_view(&source_file, str$(argv[1])), "File not found!"); - - HeapAlloc heap; - heap_alloc_init(&heap, NODE_DEFAULT); - - SSFN2Collection ssfn_coll; - if (!ssfn2_load(io_file_rseek(&source_file), &ssfn_coll, base$(&heap)).succ) - { - return -1; - } - - log$("SSFN2 Font Collection: {} entries", ssfn_coll.len); - - size_t idx = 0; - vec_foreach(font, &ssfn_coll) - { - log$(""); - log$("[{}] Name: {}", idx, font->stringtable.font_name); - log$("[{}] Family: {}", idx, font->stringtable.family_name); - log$("[{}] Subfamily: {}", idx, font->stringtable.subfamily_name); - - idx++; - } - - heap_alloc_deinit(&heap); - - return 0; -} diff --git a/sources/utils/fontinfo/manifest.json b/sources/utils/fontinfo/manifest.json deleted file mode 100644 index 0967ef424..000000000 --- a/sources/utils/fontinfo/manifest.json +++ /dev/null @@ -1 +0,0 @@ -{} From a3576ccda10a39f190e7e22ba22d83d202f54e5b Mon Sep 17 00:00:00 2001 From: VAN BOSSUYT Nicolas Date: Mon, 12 Dec 2022 23:39:22 +0100 Subject: [PATCH 04/13] stdc: added support for c++. --- sources/libs/brutal-base/std.h | 2 -- sources/libs/brutal-debug/log.c | 2 +- sources/libs/brutal-debug/log.h | 3 +- sources/libs/embed/log.h | 2 +- sources/libs/stdc-ansi/assert.h | 6 ++++ sources/libs/stdc-ansi/ctype.h | 6 ++++ sources/libs/stdc-ansi/endian.h | 6 ++++ sources/libs/stdc-ansi/errno.h | 6 ++++ sources/libs/stdc-ansi/fenv.h | 6 ++++ sources/libs/stdc-ansi/locale.h | 6 ++++ sources/libs/stdc-ansi/stdio.h | 6 ++++ sources/libs/stdc-ansi/stdlib.c | 50 ++++++++++++++++---------------- sources/libs/stdc-ansi/stdlib.h | 34 +++++++++++++--------- sources/libs/stdc-ansi/string.c | 16 +++++----- sources/libs/stdc-ansi/string.h | 20 ++++++++----- sources/libs/stdc-base/prelude.h | 14 +++++++++ sources/libs/stdc-math/math.h | 3 +- sources/libs/stdc-posix/string.h | 10 +++---- 18 files changed, 132 insertions(+), 66 deletions(-) create mode 100644 sources/libs/stdc-base/prelude.h diff --git a/sources/libs/brutal-base/std.h b/sources/libs/brutal-base/std.h index a8f744b21..e553ef89b 100644 --- a/sources/libs/brutal-base/std.h +++ b/sources/libs/brutal-base/std.h @@ -5,5 +5,3 @@ #include #include #include - -#define noreturn _Noreturn diff --git a/sources/libs/brutal-debug/log.c b/sources/libs/brutal-debug/log.c index 0e992b43f..2437f042c 100644 --- a/sources/libs/brutal-debug/log.c +++ b/sources/libs/brutal-debug/log.c @@ -25,7 +25,7 @@ void log_impl(LogLevel level, Loc loc, Str fmt, AnyVa args) embed_log_unlock(); } -noreturn void panic_impl(LogLevel level, Loc loc, Str fmt, AnyVa args) +_Noreturn void panic_impl(LogLevel level, Loc loc, Str fmt, AnyVa args) { log_unlock_impl(level, loc, fmt, args); embed_log_panic(); diff --git a/sources/libs/brutal-debug/log.h b/sources/libs/brutal-debug/log.h index c0ad2a9b1..f3e6efcc3 100644 --- a/sources/libs/brutal-debug/log.h +++ b/sources/libs/brutal-debug/log.h @@ -11,7 +11,8 @@ typedef enum /* --- Locked log functions ------------------------------------------------- */ void log_impl(LogLevel level, Loc loc, Str fmt, AnyVa args); -noreturn void panic_impl(LogLevel level, Loc loc, Str fmt, AnyVa args); + +_Noreturn void panic_impl(LogLevel level, Loc loc, Str fmt, AnyVa args); #define panic$(fmt, ...) \ panic_impl(LOG_PANIC, loc$(), str$(fmt), any_va$(__VA_ARGS__)); diff --git a/sources/libs/embed/log.h b/sources/libs/embed/log.h index ce66dc27c..61f7c7bf6 100644 --- a/sources/libs/embed/log.h +++ b/sources/libs/embed/log.h @@ -6,6 +6,6 @@ void embed_log_lock(void); void embed_log_unlock(void); -noreturn void embed_log_panic(void); +_Noreturn void embed_log_panic(void); IoWriter embed_log_writer(void); diff --git a/sources/libs/stdc-ansi/assert.h b/sources/libs/stdc-ansi/assert.h index 3ebea11f7..baa1d434b 100644 --- a/sources/libs/stdc-ansi/assert.h +++ b/sources/libs/stdc-ansi/assert.h @@ -1,5 +1,9 @@ #pragma once +#include + +STDC_BEGIN_HEADER + /* --- 7.2 Diagnostics ------------------------------------------------------ */ void assert_failed_impl(void); @@ -15,3 +19,5 @@ void assert_failed_impl(void); #endif #define static_assert _Static_assert + +STDC_END_HEADER diff --git a/sources/libs/stdc-ansi/ctype.h b/sources/libs/stdc-ansi/ctype.h index 7391f50ac..13aaffad8 100644 --- a/sources/libs/stdc-ansi/ctype.h +++ b/sources/libs/stdc-ansi/ctype.h @@ -1,7 +1,11 @@ #pragma once +#include + /* --- 7.4 Character - handling --------------------------------------------- */ +STDC_BEGIN_HEADER + /* --- 7.4.1 Character classification - Copying functions ------------------- */ int isalnum(int c); @@ -31,3 +35,5 @@ int isxdigit(int c); int tolower(int c); int toupper(int c); + +STDC_END_HEADER diff --git a/sources/libs/stdc-ansi/endian.h b/sources/libs/stdc-ansi/endian.h index a8fe14cb6..0ed7cf7ce 100644 --- a/sources/libs/stdc-ansi/endian.h +++ b/sources/libs/stdc-ansi/endian.h @@ -1,5 +1,11 @@ #pragma once +#include + +STDC_BEGIN_HEADER + #define __LITTLE_ENDIAN 1234 #define __BIG_ENDIAN 4321 #define __BYTE_ORDER __LITTLE_ENDIAN + +STDC_END_HEADER diff --git a/sources/libs/stdc-ansi/errno.h b/sources/libs/stdc-ansi/errno.h index 10d7fb1de..f32dec803 100644 --- a/sources/libs/stdc-ansi/errno.h +++ b/sources/libs/stdc-ansi/errno.h @@ -1,5 +1,9 @@ #pragma once +#include + +STDC_BEGIN_HEADER + extern int *_errno(void); /* --- 7.5 Errors ----------------------------------------------------------- */ @@ -15,6 +19,8 @@ extern int *_errno(void); /* Result too large. */ #define ERANGE 71 +STDC_END_HEADER + #if __has_include_next() # include_next #endif diff --git a/sources/libs/stdc-ansi/fenv.h b/sources/libs/stdc-ansi/fenv.h index a2beeb175..1873631d2 100644 --- a/sources/libs/stdc-ansi/fenv.h +++ b/sources/libs/stdc-ansi/fenv.h @@ -1,7 +1,11 @@ #pragma once +#include + /* --- 7.6 - Floating-point environment ------------------------------------- */ +STDC_BEGIN_HEADER + typedef struct { int _dummy; @@ -43,3 +47,5 @@ int fesetround(int); int fetestexcept(int); int feupdateenv(fenv_t const *); + +STDC_END_HEADER diff --git a/sources/libs/stdc-ansi/locale.h b/sources/libs/stdc-ansi/locale.h index fecfe0837..b10ee0f06 100644 --- a/sources/libs/stdc-ansi/locale.h +++ b/sources/libs/stdc-ansi/locale.h @@ -1,7 +1,11 @@ #pragma once +#include + /* --- 7.11 - Localization -------------------------------------------------- */ +STDC_BEGIN_HEADER + struct lconv { char *decimal_point; @@ -45,4 +49,6 @@ char *setlocale(int category, char const *locale); struct lconv *localeconv(void); +STDC_END_HEADER + #include_next diff --git a/sources/libs/stdc-ansi/stdio.h b/sources/libs/stdc-ansi/stdio.h index d63000252..3502f573f 100644 --- a/sources/libs/stdc-ansi/stdio.h +++ b/sources/libs/stdc-ansi/stdio.h @@ -1,9 +1,15 @@ #pragma once +#include + /* --- 7.21 - Input/Output -------------------------------------------------- */ +STDC_BEGIN_HEADER + /* --- 7.21.1 - Introduction ------------------------------------------------ */ #define SEEK_CUR 0 #define SEEK_END 1 #define SEEK_SET 2 + +STDC_END_HEADER diff --git a/sources/libs/stdc-ansi/stdlib.c b/sources/libs/stdc-ansi/stdlib.c index 895d0c985..f420fc2b6 100644 --- a/sources/libs/stdc-ansi/stdlib.c +++ b/sources/libs/stdc-ansi/stdlib.c @@ -1,12 +1,12 @@ -#include -#include -#include -#include #include #include #include #include #include +#include +#include +#include +#include /* --- 7.22 - General utilities --------------------------------------------- */ @@ -40,43 +40,43 @@ long long atoll(char const *nptr) return res; } -// long int strtol(char const *restrict nptr, -// char **restrict endptr, +// long int strtol(char const *STDC_RESTRICT nptr, +// char **STDC_RESTRICT endptr, // int base); -// long long int strtoll(char const *restrict nptr, -// char **restrict endptr, +// long long int strtoll(char const *STDC_RESTRICT nptr, +// char **STDC_RESTRICT endptr, // int base); -// unsigned long int strtoul(char const *restrict nptr, -// char **restrict endptr, +// unsigned long int strtoul(char const *STDC_RESTRICT nptr, +// char **STDC_RESTRICT endptr, // int base); -// unsigned long long int strtoull(char *const restrict nptr, -// char **restrict endptr, +// unsigned long long int strtoull(char *const STDC_RESTRICT nptr, +// char **STDC_RESTRICT endptr, // int base); -// double strtod(char const *restrict nptr, -// char **restrict endptr); +// double strtod(char const *STDC_RESTRICT nptr, +// char **STDC_RESTRICT endptr); -// float strtof(char const *restrict nptr, -// char **restrict endptr); +// float strtof(char const *STDC_RESTRICT nptr, +// char **STDC_RESTRICT endptr); -// long double strtold(char const *restrict nptr, char **restrict endptr); +// long double strtold(char const *STDC_RESTRICT nptr, char **STDC_RESTRICT endptr); -// int strfromd(char *restrict s, +// int strfromd(char *STDC_RESTRICT s, // size_t n, -// char const *restrict format, +// char const *STDC_RESTRICT format, // double fp); -// int strfromf(char *restrict s, +// int strfromf(char *STDC_RESTRICT s, // size_t n, -// char const *restrict format, +// char const *STDC_RESTRICT format, // floatf p); // int strfroml(char *restricts, // size_t n, -// char const *restrict format, +// char const *STDC_RESTRICT format, // long double fp); /* --- 7.22.2 - Pseudo-random sequence generation functions ----------------- */ @@ -231,10 +231,10 @@ lldiv_t lldiv(long long number, long long denom) // int mblen(char const *s, size_t n); -// int mbtowc(wchar_t *restrict pwc, char const *restrict s, size_t n); +// int mbtowc(wchar_t *STDC_RESTRICT pwc, char const *STDC_RESTRICT s, size_t n); // int wctomb(char *s, wchar_t wc); -// size_t mbstowcs(wchar_t *restrict pwcs, char const *restrict s, size_t n); +// size_t mbstowcs(wchar_t *STDC_RESTRICT pwcs, char const *STDC_RESTRICT s, size_t n); -// size_t mcstombs(char *restrict s, wchar_t const *restrict pwcs, size_t n); +// size_t mcstombs(char *STDC_RESTRICT s, wchar_t const *STDC_RESTRICT pwcs, size_t n); diff --git a/sources/libs/stdc-ansi/stdlib.h b/sources/libs/stdc-ansi/stdlib.h index a1fc972e8..6299bf75b 100644 --- a/sources/libs/stdc-ansi/stdlib.h +++ b/sources/libs/stdc-ansi/stdlib.h @@ -1,9 +1,13 @@ #pragma once -#include +#include /* --- 7.22 - General utilities --------------------------------------------- */ +#include + +STDC_BEGIN_HEADER + #ifndef NULL # define NULL ((void *)0) #endif @@ -43,25 +47,25 @@ long atol(char const *nptr); long long atoll(char const *nptr); -long int strtol(char const *restrict nptr, char **restrict endptr, int base); +long int strtol(char const *STDC_RESTRICT nptr, char **STDC_RESTRICT endptr, int base); -long long int strtoll(char const *restrict nptr, char **restrict endptr, int base); +long long int strtoll(char const *STDC_RESTRICT nptr, char **STDC_RESTRICT endptr, int base); -unsigned long int strtoul(char const *restrict nptr, char **restrict endptr, int base); +unsigned long int strtoul(char const *STDC_RESTRICT nptr, char **STDC_RESTRICT endptr, int base); -unsigned long long int strtoull(char const *restrict nptr, char **restrict endptr, int base); +unsigned long long int strtoull(char const *STDC_RESTRICT nptr, char **STDC_RESTRICT endptr, int base); -double strtod(char const *restrict nptr, char **restrict endptr); +double strtod(char const *STDC_RESTRICT nptr, char **STDC_RESTRICT endptr); -float strtof(char const *restrict nptr, char **restrict endptr); +float strtof(char const *STDC_RESTRICT nptr, char **STDC_RESTRICT endptr); -long double strtold(char const *restrict nptr, char **restrict endptr); +long double strtold(char const *STDC_RESTRICT nptr, char **STDC_RESTRICT endptr); -int strfromd(char *restrict s, size_t n, char const *restrict format, double fp); +int strfromd(char *STDC_RESTRICT s, size_t n, char const *STDC_RESTRICT format, double fp); -int strfromf(char *restrict s, size_t n, char const *restrict format, float p); +int strfromf(char *STDC_RESTRICT s, size_t n, char const *STDC_RESTRICT format, float p); -int strfroml(char *restricts, size_t n, char const *restrict format, long double fp); +int strfroml(char *restricts, size_t n, char const *STDC_RESTRICT format, long double fp); /* --- 7.22.2 - Pseudo-random sequence generation functions ----------------- */ @@ -130,10 +134,12 @@ lldiv_t lldiv(long long number, long long denom); int mblen(char const *s, size_t n); -int mbtowc(wchar_t *restrict pwc, char const *restrict s, size_t n); +int mbtowc(wchar_t *STDC_RESTRICT pwc, char const *STDC_RESTRICT s, size_t n); int wctomb(char *s, wchar_t wc); -size_t mbstowcs(wchar_t *restrict pwcs, char const *restrict s, size_t n); +size_t mbstowcs(wchar_t *STDC_RESTRICT pwcs, char const *STDC_RESTRICT s, size_t n); + +size_t mcstombs(char *STDC_RESTRICT s, wchar_t const *STDC_RESTRICT pwcs, size_t n); -size_t mcstombs(char *restrict s, wchar_t const *restrict pwcs, size_t n); +STDC_END_HEADER diff --git a/sources/libs/stdc-ansi/string.c b/sources/libs/stdc-ansi/string.c index 6eb56577f..5bf0b70a2 100644 --- a/sources/libs/stdc-ansi/string.c +++ b/sources/libs/stdc-ansi/string.c @@ -2,13 +2,13 @@ /* --- 7.24 - String handling ----------------------------------------------- */ -#include #include #include +#include /* --- 7.24.2 - Copying functions ------------------------------------------- */ -void *memcpy(void *restrict s1, void const *restrict s2, size_t n) +void *memcpy(void *STDC_RESTRICT s1, void const *STDC_RESTRICT s2, size_t n) { return mem_cpy(s1, s2, n); } @@ -36,7 +36,7 @@ void *memmove(void *s1, void const *s2, size_t n) return s1; } -char *strcpy(char *restrict s1, char const *restrict s2) +char *strcpy(char *STDC_RESTRICT s1, char const *STDC_RESTRICT s2) { size_t i = 0; @@ -49,7 +49,7 @@ char *strcpy(char *restrict s1, char const *restrict s2) return s1; } -char *strncpy(char *restrict s1, char const *restrict s2, size_t n) +char *strncpy(char *STDC_RESTRICT s1, char const *STDC_RESTRICT s2, size_t n) { size_t i = 0; @@ -64,7 +64,7 @@ char *strncpy(char *restrict s1, char const *restrict s2, size_t n) /* --- 7.24.3 - Concatenation functions ------------------------------------- */ -char *strcat(char *restrict s1, char const *restrict s2) +char *strcat(char *STDC_RESTRICT s1, char const *STDC_RESTRICT s2) { size_t l2 = strlen(s2); s1 = s1 + strlen(s1); // append to the last @@ -79,7 +79,7 @@ char *strcat(char *restrict s1, char const *restrict s2) return s1; } -char *strncat(char *restrict s1, char const *restrict s2, size_t n) +char *strncat(char *STDC_RESTRICT s1, char const *STDC_RESTRICT s2, size_t n) { size_t l2 = strlen(s2); size_t i = 0; @@ -141,7 +141,7 @@ int strncmp(char const *s1, char const *s2, size_t n) return (int)*s1 - (int)*s2; } -// size_t strxfrm(char *restrict s1, char const *restrict s2, size_t n) {} +// size_t strxfrm(char *STDC_RESTRICT s1, char const *STDC_RESTRICT s2, size_t n) {} /* --- 7.24.5 - Search functions -------------------------------------------- */ @@ -185,7 +185,7 @@ char *strrchr(char const *s, int c) // char *strstr(char const *s1, char const *s2) {} -// char *strtok(char *restrict s1, char const *restrict s2) {} +// char *strtok(char *STDC_RESTRICT s1, char const *STDC_RESTRICT s2) {} /* --- 7.24.6 - Miscellaneous functions ------------------------------------- */ diff --git a/sources/libs/stdc-ansi/string.h b/sources/libs/stdc-ansi/string.h index 22227fc91..c162fb3a7 100644 --- a/sources/libs/stdc-ansi/string.h +++ b/sources/libs/stdc-ansi/string.h @@ -1,24 +1,28 @@ #pragma once +#include + /* --- 7.24 - String handling ----------------------------------------------- */ #include +STDC_BEGIN_HEADER + /* --- 7.24.2 - Copying functions ------------------------------------------- */ -void *memcpy(void *restrict s1, void const *restrict s2, size_t n); +void *memcpy(void *STDC_RESTRICT s1, void const *STDC_RESTRICT s2, size_t n); void *memmove(void *s1, void const *s2, size_t n); -char *strcpy(char *restrict s1, char const *restrict s2); +char *strcpy(char *STDC_RESTRICT s1, char const *STDC_RESTRICT s2); -char *strncpy(char *restrict s1, char const *restrict s2, size_t n); +char *strncpy(char *STDC_RESTRICT s1, char const *STDC_RESTRICT s2, size_t n); /* --- 7.24.3 - Concatenation functions ------------------------------------- */ -char *strcat(char *restrict s1, char const *restrict s2); +char *strcat(char *STDC_RESTRICT s1, char const *STDC_RESTRICT s2); -char *strncat(char *restrict s1, char const *restrict s2, size_t n); +char *strncat(char *STDC_RESTRICT s1, char const *STDC_RESTRICT s2, size_t n); /* --- 7.24.4 - Comparison functions ---------------------------------------- */ @@ -30,7 +34,7 @@ int strcoll(char const *s1, char const *s2); int strncmp(char const *s1, char const *s2, size_t n); -size_t strxfrm(char *restrict s1, char const *restrict s2, size_t n); +size_t strxfrm(char *STDC_RESTRICT s1, char const *STDC_RESTRICT s2, size_t n); /* --- 7.24.5 - Search functions -------------------------------------------- */ @@ -48,7 +52,7 @@ size_t strspn(char const *s1, char const *s2); char *strstr(char const *s1, char const *s2); -char *strtok(char *restrict s1, char const *restrict s2); +char *strtok(char *STDC_RESTRICT s1, char const *STDC_RESTRICT s2); /* --- 7.24.6 - Miscellaneous functions ------------------------------------- */ @@ -58,6 +62,8 @@ char *strerror(int errnum); size_t strlen(char const *s); +STDC_END_HEADER + #if __has_include_next() # include_next #endif diff --git a/sources/libs/stdc-base/prelude.h b/sources/libs/stdc-base/prelude.h new file mode 100644 index 000000000..781c9ed29 --- /dev/null +++ b/sources/libs/stdc-base/prelude.h @@ -0,0 +1,14 @@ +#pragma once + +#define STDC_RESTRICT __restrict +#define STDC_NORETURN __attribute__((noreturn)) + +#ifdef __cplusplus +# define STDC_BEGIN_HEADER \ + extern "C" \ + { +# define STDC_END_HEADER } +#else +# define STDC_BEGIN_HEADER +# define STDC_END_HEADER +#endif diff --git a/sources/libs/stdc-math/math.h b/sources/libs/stdc-math/math.h index f7c0756a0..9a872271d 100644 --- a/sources/libs/stdc-math/math.h +++ b/sources/libs/stdc-math/math.h @@ -18,8 +18,7 @@ double fabs(double x); float fabsf(float x); long double fabsl(long double x); -#define PI (3.14159265358979323846264338327f) -#define M_PI PI +#define M_PI (3.14159265358979323846264338327f) #define M_PI_2 (M_PI / 2.0) #define M_PI_4 (M_PI / 4.0) diff --git a/sources/libs/stdc-posix/string.h b/sources/libs/stdc-posix/string.h index afde0a08e..0700de250 100644 --- a/sources/libs/stdc-posix/string.h +++ b/sources/libs/stdc-posix/string.h @@ -2,11 +2,11 @@ #include -void *memccpy(void *restrict s1, void const *restrict s2, int c, size_t n); +void *memccpy(void *STDC_RESTRICT s1, void const *STDC_RESTRICT s2, int c, size_t n); -char *stpcpy(char *restrict s1, char const *restrict s2); +char *stpcpy(char *STDC_RESTRICT s1, char const *STDC_RESTRICT s2); -char *stpncpy(char *restrict s1, char const *restrict s2, size_t n); +char *stpncpy(char *STDC_RESTRICT s1, char const *STDC_RESTRICT s2, size_t n); int strcoll_l(char const *, char const *, locale_t); @@ -22,6 +22,6 @@ size_t strnlen(char const *, size_t); char *strsignal(int); -char *strtok_r(char *restrict s1, char const *restrict s2, char **restrict rest); +char *strtok_r(char *STDC_RESTRICT s1, char const *STDC_RESTRICT s2, char **STDC_RESTRICT rest); -size_t strxfrm_l(char *restrict s1, char const *restrict s2, size_t, locale_t); +size_t strxfrm_l(char *STDC_RESTRICT s1, char const *STDC_RESTRICT s2, size_t, locale_t); From af5bf64a93f07dc316e8e7dd6aca631602e80d7f Mon Sep 17 00:00:00 2001 From: VAN BOSSUYT Nicolas Date: Tue, 13 Dec 2022 00:04:23 +0100 Subject: [PATCH 05/13] stdc-math: added support for C++ --- sources/libs/stdc-math/math.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sources/libs/stdc-math/math.h b/sources/libs/stdc-math/math.h index 9a872271d..22a190276 100644 --- a/sources/libs/stdc-math/math.h +++ b/sources/libs/stdc-math/math.h @@ -1,6 +1,9 @@ #pragma once #include +#include + +STDC_BEGIN_HEADER #ifndef NAN # define NAN (0.0 / 0.0) @@ -362,3 +365,5 @@ long double fminl(long double x, long double y); double fma(double, double, double); float fmaf(float, float, float); long double fmal(long double, long double, long double); + +STDC_END_HEADER From b6113b5f983cd8042b472b548cbdc278656f0f0c Mon Sep 17 00:00:00 2001 From: Supercip971 Date: Sun, 19 Feb 2023 12:02:22 -0400 Subject: [PATCH 06/13] build: started working on osdk rewrite (wip) bumblebuild more like bumblecool - This commit will be stashed --- .gitignore | 1 + compile_flags.txt | 19 ++-- meta/targets/brutal-x86_64.json | 81 +++++++++++++++++ .../targets/brutal-x86_64.ld | 0 meta/targets/kernel-x86_64.json | 87 +++++++++++++++++++ meta/targets/kernel-x86_64.ld | 67 ++++++++++++++ .../build/boards/riscv64-qemu/build.mk | 0 .../build/boards/riscv64-qemu/link.ld | 0 .../build/boards/riscv64-unleashed/build.mk | 0 .../build/boards/riscv64-unleashed/link.ld | 0 .../build/boards/x86_64-pc/build.mk | 0 .../build/boards/x86_64-pc/link.ld | 0 {sources => src}/build/configs/debug.mk | 0 {sources => src}/build/configs/devel.mk | 0 {sources => src}/build/configs/fast.mk | 0 {sources => src}/build/configs/san.mk | 0 {sources => src}/build/host/build.mk | 0 {sources => src}/build/kernel/build.mk | 0 {sources => src}/build/loader/loader.mk | 0 {sources => src}/build/scripts/dump.sh | 0 {sources => src}/build/scripts/env-darwin.sh | 0 .../build/scripts/fix-kvm-debian-wsl.sh | 0 .../build/scripts/header-builder.py | 0 .../build/scripts/manifest-builder.py | 0 .../build/scripts/setup-darwin.sh | 0 .../build/scripts/setup-ubuntu.sh | 0 {sources => src}/build/target/build.mk | 0 {sources => src}/build/target/riscv64-link.ld | 0 src/build/target/x86_64-link.ld | 27 ++++++ {sources => src}/kernel/arch.h | 2 +- {sources => src}/kernel/channel.c | 5 +- {sources => src}/kernel/channel.h | 2 +- {sources => src}/kernel/context.h | 0 {sources => src}/kernel/cpu.c | 0 {sources => src}/kernel/cpu.h | 0 {sources => src}/kernel/domain.c | 0 {sources => src}/kernel/domain.h | 0 {sources => src}/kernel/event.c | 0 {sources => src}/kernel/event.h | 0 {sources => src}/kernel/heap.h | 0 {sources => src}/kernel/init.c | 0 {sources => src}/kernel/init.h | 0 {sources => src}/kernel/kernel.c | 0 {sources => src}/kernel/kernel.h | 0 {sources => src}/kernel/memory.c | 0 {sources => src}/kernel/memory.h | 0 {sources => src}/kernel/mmap.h | 0 {sources => src}/kernel/object.c | 0 {sources => src}/kernel/object.h | 0 {sources => src}/kernel/parcel.c | 0 {sources => src}/kernel/parcel.h | 0 {sources => src}/kernel/pmm.c | 0 {sources => src}/kernel/pmm.h | 0 {sources => src}/kernel/riscv64/arch.c | 0 {sources => src}/kernel/riscv64/arch.h | 0 {sources => src}/kernel/riscv64/arch_boot.s | 0 {sources => src}/kernel/riscv64/asm.h | 0 {sources => src}/kernel/riscv64/boot.c | 0 {sources => src}/kernel/riscv64/context.c | 0 {sources => src}/kernel/riscv64/context.h | 0 {sources => src}/kernel/riscv64/cpu.c | 0 {sources => src}/kernel/riscv64/cpu.h | 0 {sources => src}/kernel/riscv64/heap.c | 0 {sources => src}/kernel/riscv64/interrupts.c | 0 {sources => src}/kernel/riscv64/interrupts.h | 0 {sources => src}/kernel/riscv64/interrupts.s | 0 {sources => src}/kernel/riscv64/paging.h | 0 {sources => src}/kernel/riscv64/sifive_uart.c | 0 {sources => src}/kernel/riscv64/sifive_uart.h | 0 {sources => src}/kernel/riscv64/uart8250.c | 0 {sources => src}/kernel/riscv64/uart8250.h | 0 .../kernel/riscv64/unleashed/gpio.h | 0 {sources => src}/kernel/riscv64/vmm.c | 0 {sources => src}/kernel/sched.c | 0 {sources => src}/kernel/sched.h | 0 {sources => src}/kernel/space.c | 0 {sources => src}/kernel/space.h | 0 {sources => src}/kernel/syscalls.c | 0 {sources => src}/kernel/syscalls.h | 0 {sources => src}/kernel/task.c | 0 {sources => src}/kernel/task.h | 0 {sources => src}/kernel/tasking.c | 0 {sources => src}/kernel/tasking.h | 0 {sources => src}/kernel/vmm.h | 0 {sources => src}/kernel/x86_64/apic.c | 0 {sources => src}/kernel/x86_64/apic.h | 0 {sources => src}/kernel/x86_64/arch.c | 0 {sources => src}/kernel/x86_64/asm.h | 0 {sources => src}/kernel/x86_64/boot.c | 0 {sources => src}/kernel/x86_64/boot.s | 0 {sources => src}/kernel/x86_64/cmos.c | 0 {sources => src}/kernel/x86_64/cmos.h | 0 {sources => src}/kernel/x86_64/com.c | 0 {sources => src}/kernel/x86_64/com.h | 0 {sources => src}/kernel/x86_64/context.c | 0 {sources => src}/kernel/x86_64/context.h | 0 {sources => src}/kernel/x86_64/cpu.c | 0 {sources => src}/kernel/x86_64/cpu.h | 0 {sources => src}/kernel/x86_64/cpuid.c | 0 {sources => src}/kernel/x86_64/cpuid.h | 0 {sources => src}/kernel/x86_64/gdt.c | 0 {sources => src}/kernel/x86_64/gdt.h | 0 {sources => src}/kernel/x86_64/gdt.s | 0 {sources => src}/kernel/x86_64/heap.c | 0 {sources => src}/kernel/x86_64/hpet.c | 0 {sources => src}/kernel/x86_64/hpet.h | 0 {sources => src}/kernel/x86_64/idt.c | 0 {sources => src}/kernel/x86_64/idt.h | 0 {sources => src}/kernel/x86_64/idt.s | 0 {sources => src}/kernel/x86_64/interrupts.c | 0 {sources => src}/kernel/x86_64/interrupts.h | 0 {sources => src}/kernel/x86_64/interrupts.s | 0 {sources => src}/kernel/x86_64/paging.h | 0 {sources => src}/kernel/x86_64/pic.c | 0 {sources => src}/kernel/x86_64/pic.h | 0 {sources => src}/kernel/x86_64/simd.c | 0 {sources => src}/kernel/x86_64/simd.h | 0 {sources => src}/kernel/x86_64/smp.c | 0 {sources => src}/kernel/x86_64/smp.h | 0 {sources => src}/kernel/x86_64/smp.s | 0 {sources => src}/kernel/x86_64/syscall.c | 0 {sources => src}/kernel/x86_64/syscall.h | 0 {sources => src}/kernel/x86_64/syscall.s | 0 {sources => src}/kernel/x86_64/vmm.c | 0 {sources => src}/libs/.build.mk | 0 {sources => src}/libs/asan/asan.c | 2 + src/libs/asan/manifest.json | 7 ++ {sources => src}/libs/bal/abi.h | 0 {sources => src}/libs/bal/abi/helpers.c | 0 {sources => src}/libs/bal/abi/helpers.h | 1 + {sources => src}/libs/bal/abi/syscalls.c | 0 {sources => src}/libs/bal/abi/syscalls.h | 0 {sources => src}/libs/bal/abi/types.h | 2 +- {sources => src}/libs/bal/abi/wrappers.c | 1 - {sources => src}/libs/bal/abi/wrappers.h | 0 {sources => src}/libs/bal/boot.h | 0 {sources => src}/libs/bal/boot/handover.c | 6 +- {sources => src}/libs/bal/boot/handover.h | 3 +- {sources => src}/libs/bal/hw.h | 0 {sources => src}/libs/bal/hw/fb.c | 0 {sources => src}/libs/bal/hw/fb.h | 0 {sources => src}/libs/bal/hw/io.c | 4 +- {sources => src}/libs/bal/hw/io.h | 2 +- {sources => src}/libs/bal/hw/mem.c | 4 +- {sources => src}/libs/bal/hw/mem.h | 4 +- src/libs/bal/manifest.json | 11 +++ {sources => src}/libs/bal/task.h | 0 {sources => src}/libs/bal/task/exec.c | 8 +- {sources => src}/libs/bal/task/task.c | 0 {sources => src}/libs/bal/task/task.h | 0 {sources => src}/libs/brutal-alloc/base.c | 2 + {sources => src}/libs/brutal-alloc/base.h | 5 +- {sources => src}/libs/brutal-alloc/global.c | 2 + {sources => src}/libs/brutal-alloc/global.h | 0 {sources => src}/libs/brutal-alloc/heap.c | 5 +- {sources => src}/libs/brutal-alloc/heap.h | 0 src/libs/brutal-alloc/manifest.json | 11 +++ {sources => src}/libs/brutal-alloc/pool.c | 1 - {sources => src}/libs/brutal-alloc/pool.h | 0 {sources => src}/libs/brutal-base/any.h | 0 .../libs/brutal-base/attributes.h | 0 {sources => src}/libs/brutal-base/banned.h | 0 {sources => src}/libs/brutal-base/cast.h | 0 .../libs/brutal-base}/clamp.h | 0 {sources => src}/libs/brutal-base/count.h | 0 {sources => src}/libs/brutal-base/defs.h | 0 {sources => src}/libs/brutal-base/endian.h | 0 {sources => src}/libs/brutal-base/error.h | 0 {sources => src}/libs/brutal-base/iter.h | 0 {sources => src}/libs/brutal-base/keywords.h | 0 {sources => src}/libs/brutal-base/loc.h | 0 {sources => src}/libs/brutal-base/macros.h | 0 src/libs/brutal-base/manifest.json | 7 ++ {sources => src}/libs/brutal-base/map.h | 0 {sources => src}/libs/brutal-base/range.h | 3 +- {sources => src}/libs/brutal-base/result.h | 0 {sources => src}/libs/brutal-base/slice.h | 0 {sources => src}/libs/brutal-base/std.h | 0 {sources => src}/libs/brutal-base/str.h | 1 + {sources => src}/libs/brutal-base/types.h | 0 {sources => src}/libs/brutal-base/vaopt.h | 0 {sources => src}/libs/brutal-cli/clear.c | 2 +- {sources => src}/libs/brutal-cli/clear.h | 2 +- {sources => src}/libs/brutal-cli/cursor.c | 2 +- {sources => src}/libs/brutal-cli/cursor.h | 2 +- {sources => src}/libs/brutal-cli/fmt.c | 5 +- {sources => src}/libs/brutal-cli/fmt.h | 3 +- src/libs/brutal-cli/manifest.json | 12 +++ {sources => src}/libs/brutal-cli/spinners.c | 3 +- {sources => src}/libs/brutal-cli/spinners.h | 2 +- {sources => src}/libs/brutal-cli/style.c | 3 +- {sources => src}/libs/brutal-cli/style.h | 4 +- {sources => src}/libs/brutal-debug/assert.h | 3 +- {sources => src}/libs/brutal-debug/log.c | 2 +- {sources => src}/libs/brutal-debug/log.h | 3 +- src/libs/brutal-debug/manifest.json | 8 ++ {sources => src}/libs/brutal-ds/bits.c | 4 +- {sources => src}/libs/brutal-ds/bits.h | 2 +- src/libs/brutal-ds/manifest.json | 12 +++ {sources => src}/libs/brutal-ds/map.c | 4 +- {sources => src}/libs/brutal-ds/map.h | 2 +- {sources => src}/libs/brutal-ds/range.c | 2 +- {sources => src}/libs/brutal-ds/range.h | 1 + {sources => src}/libs/brutal-ds/ring.c | 1 + {sources => src}/libs/brutal-ds/ring.h | 2 +- {sources => src}/libs/brutal-ds/slot.c | 3 +- {sources => src}/libs/brutal-ds/slot.h | 2 +- {sources => src}/libs/brutal-ds/vec.c | 3 +- {sources => src}/libs/brutal-ds/vec.h | 5 +- {sources => src}/libs/brutal-fibers/fibers.c | 7 +- {sources => src}/libs/brutal-fibers/fibers.h | 3 +- src/libs/brutal-fibers/manifest.json | 10 +++ {sources => src}/libs/brutal-fmt/case.c | 9 +- {sources => src}/libs/brutal-fmt/case.h | 6 +- {sources => src}/libs/brutal-fmt/fmt.c | 9 +- {sources => src}/libs/brutal-fmt/fmt.h | 7 +- {sources => src}/libs/brutal-fmt/funcs.c | 2 +- {sources => src}/libs/brutal-fmt/funcs.h | 0 src/libs/brutal-fmt/manifest.json | 13 +++ {sources => src}/libs/brutal-glob/glob.c | 1 - {sources => src}/libs/brutal-glob/glob.h | 2 +- src/libs/brutal-glob/manifest.json | 8 ++ {sources => src}/libs/brutal-hash/adler32.c | 1 + {sources => src}/libs/brutal-hash/adler32.h | 2 +- {sources => src}/libs/brutal-hash/crc32.c | 2 +- {sources => src}/libs/brutal-hash/crc32.h | 2 +- {sources => src}/libs/brutal-hash/fnv.c | 0 {sources => src}/libs/brutal-hash/fnv.h | 2 +- src/libs/brutal-hash/manifest.json | 9 ++ {sources => src}/libs/brutal-input/event.h | 3 +- {sources => src}/libs/brutal-input/keyboard.h | 3 +- src/libs/brutal-input/manifest.json | 10 +++ {sources => src}/libs/brutal-input/mouse.h | 2 +- {sources => src}/libs/brutal-io/base.c | 2 +- {sources => src}/libs/brutal-io/base.h | 4 +- {sources => src}/libs/brutal-io/bitbuf.h | 2 +- {sources => src}/libs/brutal-io/buf.c | 5 +- {sources => src}/libs/brutal-io/buf.h | 2 +- {sources => src}/libs/brutal-io/chan.c | 0 {sources => src}/libs/brutal-io/chan.h | 0 {sources => src}/libs/brutal-io/emit.c | 0 {sources => src}/libs/brutal-io/emit.h | 0 {sources => src}/libs/brutal-io/file.c | 0 {sources => src}/libs/brutal-io/file.h | 0 {sources => src}/libs/brutal-io/funcs.c | 0 {sources => src}/libs/brutal-io/funcs.h | 0 src/libs/brutal-io/manifest.json | 14 +++ {sources => src}/libs/brutal-io/mem.c | 0 {sources => src}/libs/brutal-io/mem.h | 0 {sources => src}/libs/brutal-io/path.c | 0 {sources => src}/libs/brutal-io/path.h | 0 {sources => src}/libs/brutal-io/rbits.h | 0 {sources => src}/libs/brutal-io/traits.h | 0 {sources => src}/libs/brutal-io/wbits.h | 0 {sources => src}/libs/brutal-io/window.c | 0 {sources => src}/libs/brutal-io/window.h | 2 +- {sources => src}/libs/brutal-math/angle.h | 0 .../entropy.c => src/libs/brutal-math/clamp.h | 0 {sources => src}/libs/brutal-math/dock.c | 0 {sources => src}/libs/brutal-math/dock.h | 0 {sources => src}/libs/brutal-math/easing.c | 0 {sources => src}/libs/brutal-math/easing.h | 0 {sources => src}/libs/brutal-math/edge.h | 5 +- {sources => src}/libs/brutal-math/flow.c | 0 {sources => src}/libs/brutal-math/flow.h | 0 {sources => src}/libs/brutal-math/funcs.h | 0 {sources => src}/libs/brutal-math/gravity.c | 0 {sources => src}/libs/brutal-math/gravity.h | 0 src/libs/brutal-math/manifest.json | 10 +++ .../libs/brutal-math/orientation.h | 0 {sources => src}/libs/brutal-math/rand.c | 0 {sources => src}/libs/brutal-math/rand.h | 3 +- {sources => src}/libs/brutal-math/rect.h | 3 +- {sources => src}/libs/brutal-math/spacing.c | 0 {sources => src}/libs/brutal-math/spacing.h | 0 {sources => src}/libs/brutal-math/trans2.h | 2 +- {sources => src}/libs/brutal-math/vec2.h | 0 {sources => src}/libs/brutal-mem/const.h | 0 {sources => src}/libs/brutal-mem/copy.c | 0 {sources => src}/libs/brutal-mem/funcs.h | 3 +- src/libs/brutal-mem/manifest.json | 8 ++ {sources => src}/libs/brutal-mem/move.c | 0 {sources => src}/libs/brutal-mem/pages.h | 0 {sources => src}/libs/brutal-mem/set.c | 0 {sources => src}/libs/brutal-mem/units.h | 2 +- {sources => src}/libs/brutal-mem/volatile.h | 4 +- {sources => src}/libs/brutal-parse/lex.c | 0 {sources => src}/libs/brutal-parse/lex.h | 0 {sources => src}/libs/brutal-parse/lexeme.h | 0 src/libs/brutal-parse/manifest.json | 14 +++ {sources => src}/libs/brutal-parse/nums.c | 0 {sources => src}/libs/brutal-parse/nums.h | 0 {sources => src}/libs/brutal-parse/scan.c | 0 {sources => src}/libs/brutal-parse/scan.h | 3 +- {sources => src}/libs/brutal-sync/lock.c | 0 {sources => src}/libs/brutal-sync/lock.h | 0 {sources => src}/libs/brutal-sync/ref.h | 0 {sources => src}/libs/brutal-sync/rwlock.c | 0 {sources => src}/libs/brutal-sync/rwlock.h | 0 {sources => src}/libs/brutal-task/task.c | 0 {sources => src}/libs/brutal-task/task.h | 0 {sources => src}/libs/brutal-test/expect.h | 0 .../libs/brutal-test/hook-alloc.h | 0 {sources => src}/libs/brutal-test/runner.c | 0 {sources => src}/libs/brutal-test/runner.h | 0 {sources => src}/libs/brutal-text/cp437.c | 0 {sources => src}/libs/brutal-text/cp437.h | 0 {sources => src}/libs/brutal-text/rune.h | 2 +- {sources => src}/libs/brutal-text/str.c | 0 {sources => src}/libs/brutal-text/str.h | 3 +- {sources => src}/libs/brutal-text/utf16.c | 0 {sources => src}/libs/brutal-text/utf16.h | 0 {sources => src}/libs/brutal-text/utf8.c | 0 {sources => src}/libs/brutal-text/utf8.h | 3 +- {sources => src}/libs/brutal-text/vals.h | 0 {sources => src}/libs/brutal-text/witty.c | 0 {sources => src}/libs/brutal-text/witty.h | 0 {sources => src}/libs/brutal-time/constants.h | 0 {sources => src}/libs/brutal-time/convert.c | 0 {sources => src}/libs/brutal-time/convert.h | 0 {sources => src}/libs/brutal-time/query.c | 0 {sources => src}/libs/brutal-time/query.h | 0 {sources => src}/libs/brutal-time/types.h | 3 +- {sources => src}/libs/bvm/base/res.h | 0 {sources => src}/libs/bvm/ctx.h | 0 {sources => src}/libs/bvm/ctx/global.c | 0 {sources => src}/libs/bvm/ctx/global.h | 0 {sources => src}/libs/bvm/ctx/local.c | 0 {sources => src}/libs/bvm/ctx/local.h | 0 {sources => src}/libs/bvm/eval.h | 0 {sources => src}/libs/bvm/eval/eval.c | 0 {sources => src}/libs/bvm/eval/eval.h | 0 {sources => src}/libs/bvm/eval/instr.c | 0 {sources => src}/libs/bvm/eval/instr.h | 0 {sources => src}/libs/bvm/obj.h | 0 {sources => src}/libs/bvm/obj/func.c | 0 {sources => src}/libs/bvm/obj/func.h | 0 {sources => src}/libs/bvm/obj/obj.c | 0 {sources => src}/libs/bvm/obj/obj.h | 0 {sources => src}/libs/bvm/obj/val.c | 0 {sources => src}/libs/bvm/obj/val.h | 0 {sources => src}/libs/cc/ast.h | 0 {sources => src}/libs/cc/ast/decl.h | 0 {sources => src}/libs/cc/ast/expr.c | 0 {sources => src}/libs/cc/ast/expr.h | 0 {sources => src}/libs/cc/ast/stmt.c | 0 {sources => src}/libs/cc/ast/stmt.h | 0 {sources => src}/libs/cc/ast/type.c | 0 {sources => src}/libs/cc/ast/type.h | 0 {sources => src}/libs/cc/ast/unit.c | 0 {sources => src}/libs/cc/ast/unit.h | 0 {sources => src}/libs/cc/ast/val.c | 0 {sources => src}/libs/cc/ast/val.h | 0 {sources => src}/libs/cc/builder.h | 0 {sources => src}/libs/cc/builder/decl.c | 0 {sources => src}/libs/cc/builder/decl.h | 0 {sources => src}/libs/cc/builder/expr.c | 0 {sources => src}/libs/cc/builder/expr.h | 0 {sources => src}/libs/cc/builder/stmt.c | 0 {sources => src}/libs/cc/builder/stmt.h | 0 {sources => src}/libs/cc/builder/type.c | 0 {sources => src}/libs/cc/builder/type.h | 0 {sources => src}/libs/cc/builder/unit.c | 0 {sources => src}/libs/cc/builder/unit.h | 0 {sources => src}/libs/cc/builder/val.c | 0 {sources => src}/libs/cc/builder/val.h | 0 {sources => src}/libs/cc/dump.h | 0 {sources => src}/libs/cc/dump/dump.c | 0 {sources => src}/libs/cc/lex.h | 0 {sources => src}/libs/cc/lex/lexemes.h | 0 {sources => src}/libs/cc/lex/lexer.c | 0 {sources => src}/libs/cc/lex/lexer.h | 0 {sources => src}/libs/cc/lex/pproc.c | 0 {sources => src}/libs/cc/lex/pproc.h | 0 {sources => src}/libs/cc/parse.h | 0 {sources => src}/libs/cc/parse/cval.c | 0 {sources => src}/libs/cc/parse/decl.c | 0 {sources => src}/libs/cc/parse/expr.c | 0 {sources => src}/libs/cc/parse/misc.c | 0 {sources => src}/libs/cc/parse/parser.h | 0 {sources => src}/libs/cc/parse/stmt.c | 0 {sources => src}/libs/cc/parse/type.c | 0 {sources => src}/libs/cc/parse/unit.c | 0 {sources => src}/libs/cc/sema.h | 0 {sources => src}/libs/cc/sema/cast.c | 0 {sources => src}/libs/cc/sema/cast.h | 0 {sources => src}/libs/cc/sema/scope.c | 0 {sources => src}/libs/cc/sema/scope.h | 0 {sources => src}/libs/cc/sema/sema.c | 0 {sources => src}/libs/cc/sema/sema.h | 0 {sources => src}/libs/cc/sema/visit.c | 0 {sources => src}/libs/cc/sema/visit.h | 0 .../libs/cc/sema/visit_statement.c | 0 {sources => src}/libs/cc/trans.h | 0 {sources => src}/libs/cc/trans/decl.c | 0 {sources => src}/libs/cc/trans/expr.c | 0 {sources => src}/libs/cc/trans/stmt.c | 0 {sources => src}/libs/cc/trans/type.c | 0 {sources => src}/libs/cc/trans/unit.c | 0 {sources => src}/libs/cc/trans/val.c | 0 .../libs/codec-deflate/constants.h | 0 {sources => src}/libs/codec-deflate/deflate.c | 0 {sources => src}/libs/codec-deflate/deflate.h | 0 {sources => src}/libs/codec-deflate/errors.h | 0 {sources => src}/libs/codec-deflate/huff.h | 0 {sources => src}/libs/codec-deflate/inflate.c | 0 {sources => src}/libs/codec-deflate/inflate.h | 0 {sources => src}/libs/codec-gzip/gzip.c | 0 {sources => src}/libs/codec-gzip/gzip.h | 0 {sources => src}/libs/codec-zlib/zlib.c | 0 {sources => src}/libs/codec-zlib/zlib.h | 0 {sources => src}/libs/elf/elf.c | 0 {sources => src}/libs/elf/elf.h | 4 +- {sources => src}/libs/embed/arm64/backtrace.c | 1 + {sources => src}/libs/embed/brutal/chan.c | 0 {sources => src}/libs/embed/brutal/debug.c | 0 {sources => src}/libs/embed/brutal/entry.c | 0 {sources => src}/libs/embed/brutal/file.c | 0 {sources => src}/libs/embed/brutal/file.h | 0 {sources => src}/libs/embed/brutal/log.c | 0 {sources => src}/libs/embed/brutal/mem.c | 0 {sources => src}/libs/embed/brutal/sync.c | 0 {sources => src}/libs/embed/brutal/task.c | 0 {sources => src}/libs/embed/brutal/time.c | 0 .../libs/embed/brutal/x86_64/crt0.s | 0 .../libs/embed/brutal/x86_64/crti.s | 0 .../libs/embed/brutal/x86_64/crtn.s | 0 {sources => src}/libs/embed/chan.h | 0 {sources => src}/libs/embed/crypto.h | 2 +- {sources => src}/libs/embed/debug.h | 5 +- {sources => src}/libs/embed/efi/chan.c | 0 {sources => src}/libs/embed/efi/chkstk.c | 0 {sources => src}/libs/embed/efi/debug.c | 0 {sources => src}/libs/embed/efi/file.c | 0 {sources => src}/libs/embed/efi/file.h | 0 {sources => src}/libs/embed/efi/log.c | 0 {sources => src}/libs/embed/efi/mem.c | 0 {sources => src}/libs/embed/file-decl.h | 1 - {sources => src}/libs/embed/file.h | 0 {sources => src}/libs/embed/kernel/debug.c | 0 {sources => src}/libs/embed/kernel/log.c | 0 {sources => src}/libs/embed/kernel/mem.c | 0 {sources => src}/libs/embed/kernel/sync.c | 0 {sources => src}/libs/embed/log.h | 2 +- src/libs/embed/manifest.json | 7 ++ {sources => src}/libs/embed/mem.h | 2 +- {sources => src}/libs/embed/posix/chan.c | 0 {sources => src}/libs/embed/posix/crypto.c | 0 {sources => src}/libs/embed/posix/debug.c | 0 {sources => src}/libs/embed/posix/err.c | 0 {sources => src}/libs/embed/posix/err.h | 0 {sources => src}/libs/embed/posix/file.c | 0 {sources => src}/libs/embed/posix/file.h | 0 {sources => src}/libs/embed/posix/log.c | 0 {sources => src}/libs/embed/posix/mem.c | 0 {sources => src}/libs/embed/posix/sync.c | 0 {sources => src}/libs/embed/posix/task.c | 0 {sources => src}/libs/embed/posix/time.c | 0 .../libs/embed/riscv64/backtrace.c | 0 {sources => src}/libs/embed/riscv64/fibers.s | 0 {sources => src}/libs/embed/sync.h | 0 {sources => src}/libs/embed/task.h | 1 - {sources => src}/libs/embed/time.h | 0 .../libs/embed/x86_64/backtrace.c | 2 +- {sources => src}/libs/embed/x86_64/copy.c | 0 {sources => src}/libs/embed/x86_64/fibers.s | 0 {sources => src}/libs/embed/x86_64/pause.c | 0 {sources => src}/libs/embed/x86_64/set.c | 0 {sources => src}/libs/fs/block.c | 0 {sources => src}/libs/fs/block.h | 0 {sources => src}/libs/fs/ext2/block.c | 0 {sources => src}/libs/fs/ext2/block.h | 0 {sources => src}/libs/fs/ext2/cache.c | 0 {sources => src}/libs/fs/ext2/cache.h | 0 {sources => src}/libs/fs/ext2/ext2.c | 0 {sources => src}/libs/fs/ext2/ext2.h | 0 {sources => src}/libs/fs/ext2/structure.c | 0 {sources => src}/libs/fs/ext2/structure.h | 0 {sources => src}/libs/fs/fs.h | 0 {sources => src}/libs/handover/builder.c | 0 {sources => src}/libs/handover/builder.h | 0 {sources => src}/libs/handover/handover.c | 0 {sources => src}/libs/handover/handover.h | 0 {sources => src}/libs/hw/acpi/base.c | 0 {sources => src}/libs/hw/acpi/base.h | 0 {sources => src}/libs/hw/acpi/hpet.h | 0 {sources => src}/libs/hw/acpi/madt.c | 0 {sources => src}/libs/hw/acpi/madt.h | 0 {sources => src}/libs/hw/acpi/mcfg.h | 0 {sources => src}/libs/hw/acpi/rsdt.c | 0 {sources => src}/libs/hw/acpi/rsdt.h | 0 {sources => src}/libs/hw/acpi/stdh.h | 0 {sources => src}/libs/hw/ahci/ahci.c | 0 {sources => src}/libs/hw/ahci/ahci.h | 0 {sources => src}/libs/hw/ahci/device.c | 0 {sources => src}/libs/hw/ahci/device.h | 0 {sources => src}/libs/hw/ahci/fis.h | 0 {sources => src}/libs/hw/ahci/hba.h | 0 {sources => src}/libs/hw/efi/lib.c | 0 {sources => src}/libs/hw/efi/lib.h | 0 {sources => src}/libs/hw/efi/protos.h | 0 {sources => src}/libs/hw/efi/protos/dpp.h | 0 {sources => src}/libs/hw/efi/protos/fp.h | 0 {sources => src}/libs/hw/efi/protos/gop.h | 0 {sources => src}/libs/hw/efi/protos/lip.h | 0 {sources => src}/libs/hw/efi/protos/sfsp.h | 0 {sources => src}/libs/hw/efi/protos/stip.h | 0 {sources => src}/libs/hw/efi/protos/stop.h | 0 {sources => src}/libs/hw/efi/srvs.h | 0 {sources => src}/libs/hw/efi/srvs/bs.h | 0 {sources => src}/libs/hw/efi/srvs/rs.h | 0 {sources => src}/libs/hw/efi/tables.h | 0 {sources => src}/libs/hw/efi/tables/ct.h | 0 {sources => src}/libs/hw/efi/tables/st.h | 0 {sources => src}/libs/hw/efi/tty.c | 0 {sources => src}/libs/hw/efi/tty.h | 0 {sources => src}/libs/hw/efi/types.h | 0 {sources => src}/libs/hw/fdt/fdt.c | 0 {sources => src}/libs/hw/fdt/fdt.h | 0 {sources => src}/libs/hw/fdt/handover.c | 0 {sources => src}/libs/hw/fdt/handover.h | 0 {sources => src}/libs/hw/pci/addr.h | 0 {sources => src}/libs/hw/pci/capabilities.c | 0 {sources => src}/libs/hw/pci/capabilities.h | 0 {sources => src}/libs/hw/pci/config.h | 0 {sources => src}/libs/hw/pci/group.c | 0 {sources => src}/libs/hw/pci/group.h | 0 {sources => src}/libs/hw/pci/pci.c | 0 {sources => src}/libs/hw/pci/pci.h | 0 {sources => src}/libs/hw/ps2/controller.c | 0 {sources => src}/libs/hw/ps2/controller.h | 0 {sources => src}/libs/hw/ps2/keyboard.c | 0 {sources => src}/libs/hw/ps2/keyboard.h | 0 {sources => src}/libs/hw/ps2/mouse.c | 0 {sources => src}/libs/hw/ps2/mouse.h | 0 {sources => src}/libs/hw/ps2/ps2.h | 0 {sources => src}/libs/hw/uart/uart.c | 0 {sources => src}/libs/hw/uart/uart.h | 0 {sources => src}/libs/hw/virtio/config.c | 0 {sources => src}/libs/hw/virtio/config.h | 0 {sources => src}/libs/hw/virtio/device.c | 0 {sources => src}/libs/hw/virtio/device.h | 0 .../libs/hw/virtio/device/block.c | 0 .../libs/hw/virtio/device/block.h | 0 .../libs/hw/virtio/device/entropy.c | 0 .../libs/hw/virtio/device/entropy.h | 0 {sources => src}/libs/hw/virtio/features.h | 0 .../libs/hw/virtio/notification.c | 0 .../libs/hw/virtio/notification.h | 0 {sources => src}/libs/hw/virtio/splitvqueue.c | 0 {sources => src}/libs/hw/virtio/splitvqueue.h | 0 {sources => src}/libs/hw/virtio/virtqueue.h | 0 {sources => src}/libs/idl/ast.h | 0 {sources => src}/libs/idl/ast/builder.c | 0 {sources => src}/libs/idl/ast/builder.h | 0 {sources => src}/libs/idl/ast/iface.h | 0 {sources => src}/libs/idl/ast/query.c | 0 {sources => src}/libs/idl/ast/query.h | 0 {sources => src}/libs/idl/ast/types.h | 0 {sources => src}/libs/idl/cgen.h | 0 {sources => src}/libs/idl/cgen/binding.c | 0 {sources => src}/libs/idl/cgen/dispatch.c | 0 {sources => src}/libs/idl/cgen/handler.c | 0 {sources => src}/libs/idl/cgen/header.c | 0 {sources => src}/libs/idl/cgen/includes.c | 0 {sources => src}/libs/idl/cgen/method.c | 0 {sources => src}/libs/idl/cgen/pack.c | 0 {sources => src}/libs/idl/cgen/provider.c | 0 {sources => src}/libs/idl/cgen/source.c | 0 {sources => src}/libs/idl/cgen/types.c | 0 {sources => src}/libs/idl/cgen/unpack.c | 0 {sources => src}/libs/idl/json.c | 0 {sources => src}/libs/idl/json.h | 0 {sources => src}/libs/idl/parse.c | 0 {sources => src}/libs/idl/parse.h | 0 {sources => src}/libs/idl/sema.c | 0 {sources => src}/libs/idl/sema.h | 0 {sources => src}/libs/ipc/capability.h | 0 {sources => src}/libs/ipc/component.c | 0 {sources => src}/libs/ipc/component.h | 0 {sources => src}/libs/ipc/hooks.c | 0 {sources => src}/libs/ipc/hooks.h | 0 {sources => src}/libs/ipc/interface.h | 0 {sources => src}/libs/ipc/ipc.h | 0 {sources => src}/libs/ipc/pack.c | 0 {sources => src}/libs/ipc/pack.h | 3 +- {sources => src}/libs/ipc/unpack.c | 0 {sources => src}/libs/ipc/unpack.h | 4 +- {sources => src}/libs/json/emit.c | 0 {sources => src}/libs/json/emit.h | 0 {sources => src}/libs/json/objects.c | 0 {sources => src}/libs/json/objects.h | 0 {sources => src}/libs/json/parser.c | 0 {sources => src}/libs/json/parser.h | 0 {sources => src}/libs/stdc-ansi/assert.h | 0 {sources => src}/libs/stdc-ansi/ctype.c | 0 {sources => src}/libs/stdc-ansi/ctype.h | 0 {sources => src}/libs/stdc-ansi/endian.h | 0 {sources => src}/libs/stdc-ansi/errno.c | 0 {sources => src}/libs/stdc-ansi/errno.h | 0 {sources => src}/libs/stdc-ansi/fenv.h | 0 {sources => src}/libs/stdc-ansi/locale.h | 0 {sources => src}/libs/stdc-ansi/qsort.c | 0 {sources => src}/libs/stdc-ansi/stdio.h | 0 {sources => src}/libs/stdc-ansi/stdlib.c | 0 {sources => src}/libs/stdc-ansi/stdlib.h | 0 {sources => src}/libs/stdc-ansi/string.c | 0 {sources => src}/libs/stdc-ansi/string.h | 0 {sources => src}/libs/stdc-base/prelude.h | 0 {sources => src}/libs/stdc-ext/string.c | 0 {sources => src}/libs/stdc-ext/string.h | 0 {sources => src}/libs/stdc-math/__cos.c | 0 {sources => src}/libs/stdc-math/__cosdf.c | 0 {sources => src}/libs/stdc-math/__cosl.c | 0 {sources => src}/libs/stdc-math/__expo2.c | 0 {sources => src}/libs/stdc-math/__expo2f.c | 0 .../libs/stdc-math/__fpclassify.c | 0 .../libs/stdc-math/__fpclassifyf.c | 0 .../libs/stdc-math/__fpclassifyl.c | 0 {sources => src}/libs/stdc-math/__invtrigl.c | 0 {sources => src}/libs/stdc-math/__invtrigl.h | 0 {sources => src}/libs/stdc-math/__polevll.c | 0 {sources => src}/libs/stdc-math/__rem_pio2.c | 0 .../libs/stdc-math/__rem_pio2_large.c | 0 {sources => src}/libs/stdc-math/__rem_pio2f.c | 0 {sources => src}/libs/stdc-math/__rem_pio2l.c | 0 {sources => src}/libs/stdc-math/__signbit.c | 0 {sources => src}/libs/stdc-math/__signbitf.c | 0 {sources => src}/libs/stdc-math/__signbitl.c | 0 {sources => src}/libs/stdc-math/__sin.c | 0 {sources => src}/libs/stdc-math/__sindf.c | 0 {sources => src}/libs/stdc-math/__sinl.c | 0 {sources => src}/libs/stdc-math/__tan.c | 0 {sources => src}/libs/stdc-math/__tandf.c | 0 {sources => src}/libs/stdc-math/__tanl.c | 0 {sources => src}/libs/stdc-math/acos.c | 0 {sources => src}/libs/stdc-math/acosf.c | 0 {sources => src}/libs/stdc-math/acosh.c | 0 {sources => src}/libs/stdc-math/acoshf.c | 0 {sources => src}/libs/stdc-math/acoshl.c | 0 {sources => src}/libs/stdc-math/acosl.c | 0 {sources => src}/libs/stdc-math/asin.c | 0 {sources => src}/libs/stdc-math/asinf.c | 0 {sources => src}/libs/stdc-math/asinh.c | 0 {sources => src}/libs/stdc-math/asinhf.c | 0 {sources => src}/libs/stdc-math/asinhl.c | 0 {sources => src}/libs/stdc-math/asinl.c | 0 {sources => src}/libs/stdc-math/atan.c | 0 {sources => src}/libs/stdc-math/atan2.c | 0 {sources => src}/libs/stdc-math/atan2f.c | 0 {sources => src}/libs/stdc-math/atan2l.c | 0 {sources => src}/libs/stdc-math/atanf.c | 0 {sources => src}/libs/stdc-math/atanh.c | 0 {sources => src}/libs/stdc-math/atanhf.c | 0 {sources => src}/libs/stdc-math/atanhl.c | 0 {sources => src}/libs/stdc-math/atanl.c | 0 {sources => src}/libs/stdc-math/cbrt.c | 0 {sources => src}/libs/stdc-math/cbrtf.c | 0 {sources => src}/libs/stdc-math/cbrtl.c | 0 {sources => src}/libs/stdc-math/ceil.c | 0 {sources => src}/libs/stdc-math/ceilf.c | 0 {sources => src}/libs/stdc-math/ceill.c | 0 {sources => src}/libs/stdc-math/copysign.c | 0 {sources => src}/libs/stdc-math/copysignf.c | 0 {sources => src}/libs/stdc-math/copysignl.c | 0 {sources => src}/libs/stdc-math/cos.c | 0 {sources => src}/libs/stdc-math/cosf.c | 0 {sources => src}/libs/stdc-math/cosh.c | 0 {sources => src}/libs/stdc-math/coshf.c | 0 {sources => src}/libs/stdc-math/coshl.c | 0 {sources => src}/libs/stdc-math/cosl.c | 0 {sources => src}/libs/stdc-math/erf.c | 0 {sources => src}/libs/stdc-math/erff.c | 0 {sources => src}/libs/stdc-math/erfl.c | 0 {sources => src}/libs/stdc-math/exp.c | 0 {sources => src}/libs/stdc-math/exp10.c | 0 {sources => src}/libs/stdc-math/exp10f.c | 0 {sources => src}/libs/stdc-math/exp10l.c | 0 {sources => src}/libs/stdc-math/exp2.c | 0 {sources => src}/libs/stdc-math/exp2f.c | 0 {sources => src}/libs/stdc-math/exp2l.c | 0 {sources => src}/libs/stdc-math/expf.c | 0 {sources => src}/libs/stdc-math/expl.c | 0 {sources => src}/libs/stdc-math/expm1.c | 0 {sources => src}/libs/stdc-math/expm1f.c | 0 {sources => src}/libs/stdc-math/expm1l.c | 0 {sources => src}/libs/stdc-math/fabs.c | 0 {sources => src}/libs/stdc-math/fabsf.c | 0 {sources => src}/libs/stdc-math/fabsl.c | 0 {sources => src}/libs/stdc-math/fdim.c | 0 {sources => src}/libs/stdc-math/fdimf.c | 0 {sources => src}/libs/stdc-math/fdiml.c | 0 {sources => src}/libs/stdc-math/finite.c | 0 {sources => src}/libs/stdc-math/finitef.c | 0 {sources => src}/libs/stdc-math/floor.c | 0 {sources => src}/libs/stdc-math/floorf.c | 0 {sources => src}/libs/stdc-math/floorl.c | 0 {sources => src}/libs/stdc-math/fma.c | 0 {sources => src}/libs/stdc-math/fmaf.c | 0 {sources => src}/libs/stdc-math/fmal.c | 0 {sources => src}/libs/stdc-math/fmax.c | 0 {sources => src}/libs/stdc-math/fmaxf.c | 0 {sources => src}/libs/stdc-math/fmaxl.c | 0 {sources => src}/libs/stdc-math/fmin.c | 0 {sources => src}/libs/stdc-math/fminf.c | 0 {sources => src}/libs/stdc-math/fminl.c | 0 {sources => src}/libs/stdc-math/fmod.c | 0 {sources => src}/libs/stdc-math/fmodf.c | 0 {sources => src}/libs/stdc-math/fmodl.c | 0 {sources => src}/libs/stdc-math/frexp.c | 0 {sources => src}/libs/stdc-math/frexpf.c | 0 {sources => src}/libs/stdc-math/frexpl.c | 0 {sources => src}/libs/stdc-math/hypot.c | 0 {sources => src}/libs/stdc-math/hypotf.c | 0 {sources => src}/libs/stdc-math/hypotl.c | 0 {sources => src}/libs/stdc-math/ilogb.c | 0 {sources => src}/libs/stdc-math/ilogbf.c | 0 {sources => src}/libs/stdc-math/ilogbl.c | 0 {sources => src}/libs/stdc-math/j0.c | 0 {sources => src}/libs/stdc-math/j0f.c | 0 {sources => src}/libs/stdc-math/j1.c | 0 {sources => src}/libs/stdc-math/j1f.c | 0 {sources => src}/libs/stdc-math/jn.c | 0 {sources => src}/libs/stdc-math/jnf.c | 0 {sources => src}/libs/stdc-math/ldexp.c | 0 {sources => src}/libs/stdc-math/ldexpf.c | 0 {sources => src}/libs/stdc-math/ldexpl.c | 0 {sources => src}/libs/stdc-math/lgamma.c | 0 {sources => src}/libs/stdc-math/lgamma_r.c | 0 {sources => src}/libs/stdc-math/lgammaf.c | 0 {sources => src}/libs/stdc-math/lgammaf_r.c | 0 {sources => src}/libs/stdc-math/lgammal.c | 0 {sources => src}/libs/stdc-math/libm.h | 0 {sources => src}/libs/stdc-math/llrint.c | 0 {sources => src}/libs/stdc-math/llrintf.c | 0 {sources => src}/libs/stdc-math/llrintl.c | 0 {sources => src}/libs/stdc-math/llround.c | 0 {sources => src}/libs/stdc-math/llroundf.c | 0 {sources => src}/libs/stdc-math/llroundl.c | 0 {sources => src}/libs/stdc-math/log.c | 0 {sources => src}/libs/stdc-math/log10.c | 0 {sources => src}/libs/stdc-math/log10f.c | 0 {sources => src}/libs/stdc-math/log10l.c | 0 {sources => src}/libs/stdc-math/log1p.c | 0 {sources => src}/libs/stdc-math/log1pf.c | 0 {sources => src}/libs/stdc-math/log1pl.c | 0 {sources => src}/libs/stdc-math/log2.c | 0 {sources => src}/libs/stdc-math/log2f.c | 0 {sources => src}/libs/stdc-math/log2l.c | 0 {sources => src}/libs/stdc-math/logb.c | 0 {sources => src}/libs/stdc-math/logbf.c | 0 {sources => src}/libs/stdc-math/logbl.c | 0 {sources => src}/libs/stdc-math/logf.c | 0 {sources => src}/libs/stdc-math/logl.c | 0 {sources => src}/libs/stdc-math/lrint.c | 0 {sources => src}/libs/stdc-math/lrintf.c | 0 {sources => src}/libs/stdc-math/lrintl.c | 0 {sources => src}/libs/stdc-math/lround.c | 0 {sources => src}/libs/stdc-math/lroundf.c | 0 {sources => src}/libs/stdc-math/lroundl.c | 0 {sources => src}/libs/stdc-math/math.h | 0 {sources => src}/libs/stdc-math/modf.c | 0 {sources => src}/libs/stdc-math/modff.c | 0 {sources => src}/libs/stdc-math/modfl.c | 0 {sources => src}/libs/stdc-math/nan.c | 0 {sources => src}/libs/stdc-math/nanf.c | 0 {sources => src}/libs/stdc-math/nanl.c | 0 {sources => src}/libs/stdc-math/nearbyint.c | 0 {sources => src}/libs/stdc-math/nearbyintf.c | 0 {sources => src}/libs/stdc-math/nearbyintl.c | 0 {sources => src}/libs/stdc-math/nextafter.c | 0 {sources => src}/libs/stdc-math/nextafterf.c | 0 {sources => src}/libs/stdc-math/nextafterl.c | 0 {sources => src}/libs/stdc-math/nexttoward.c | 0 {sources => src}/libs/stdc-math/nexttowardf.c | 0 {sources => src}/libs/stdc-math/nexttowardl.c | 0 {sources => src}/libs/stdc-math/pow.c | 0 {sources => src}/libs/stdc-math/powf.c | 0 {sources => src}/libs/stdc-math/powl.c | 0 {sources => src}/libs/stdc-math/remainder.c | 0 {sources => src}/libs/stdc-math/remainderf.c | 0 {sources => src}/libs/stdc-math/remainderl.c | 0 {sources => src}/libs/stdc-math/remquo.c | 0 {sources => src}/libs/stdc-math/remquof.c | 0 {sources => src}/libs/stdc-math/remquol.c | 0 {sources => src}/libs/stdc-math/rint.c | 0 {sources => src}/libs/stdc-math/rintf.c | 0 {sources => src}/libs/stdc-math/rintl.c | 0 {sources => src}/libs/stdc-math/round.c | 0 {sources => src}/libs/stdc-math/roundf.c | 0 {sources => src}/libs/stdc-math/roundl.c | 0 {sources => src}/libs/stdc-math/scalb.c | 0 {sources => src}/libs/stdc-math/scalbf.c | 0 {sources => src}/libs/stdc-math/scalbln.c | 0 {sources => src}/libs/stdc-math/scalblnf.c | 0 {sources => src}/libs/stdc-math/scalblnl.c | 0 {sources => src}/libs/stdc-math/scalbn.c | 0 {sources => src}/libs/stdc-math/scalbnf.c | 0 {sources => src}/libs/stdc-math/scalbnl.c | 0 {sources => src}/libs/stdc-math/signgam.c | 0 {sources => src}/libs/stdc-math/significand.c | 0 .../libs/stdc-math/significandf.c | 0 {sources => src}/libs/stdc-math/sin.c | 0 {sources => src}/libs/stdc-math/sincos.c | 0 {sources => src}/libs/stdc-math/sincosf.c | 0 {sources => src}/libs/stdc-math/sincosl.c | 0 {sources => src}/libs/stdc-math/sinf.c | 0 {sources => src}/libs/stdc-math/sinh.c | 0 {sources => src}/libs/stdc-math/sinhf.c | 0 {sources => src}/libs/stdc-math/sinhl.c | 0 {sources => src}/libs/stdc-math/sinl.c | 0 {sources => src}/libs/stdc-math/sqrt.c | 0 {sources => src}/libs/stdc-math/sqrtf.c | 0 {sources => src}/libs/stdc-math/sqrtl.c | 0 {sources => src}/libs/stdc-math/tan.c | 0 {sources => src}/libs/stdc-math/tanf.c | 0 {sources => src}/libs/stdc-math/tanh.c | 0 {sources => src}/libs/stdc-math/tanhf.c | 0 {sources => src}/libs/stdc-math/tanhl.c | 0 {sources => src}/libs/stdc-math/tanl.c | 0 {sources => src}/libs/stdc-math/tgamma.c | 0 {sources => src}/libs/stdc-math/tgammaf.c | 0 {sources => src}/libs/stdc-math/tgammal.c | 0 {sources => src}/libs/stdc-math/trunc.c | 0 {sources => src}/libs/stdc-math/truncf.c | 0 {sources => src}/libs/stdc-math/truncl.c | 0 {sources => src}/libs/stdc-posix/errno.h | 0 {sources => src}/libs/stdc-posix/locale.h | 0 .../libs/stdc-posix/locale/local_t.h | 0 {sources => src}/libs/stdc-posix/string.h | 0 {sources => src}/libs/ubsan/ubsan.c | 0 {sources => src}/loader/config.c | 0 {sources => src}/loader/config.h | 0 {sources => src}/loader/main.c | 0 {sources => src}/loader/memory.c | 0 {sources => src}/loader/memory.h | 0 {sources => src}/loader/protocol.c | 0 {sources => src}/loader/protocol.h | 0 {sources => src}/protos/.build.mk | 0 {sources => src}/protos/base.idl | 0 {sources => src}/protos/boot.idl | 0 {sources => src}/protos/event.idl | 0 {sources => src}/protos/hw.idl | 0 {sources => src}/protos/math.idl | 0 {sources => src}/protos/pci.idl | 0 {sources => src}/protos/system.idl | 0 {sources => src}/srvs/acpi/build.mk | 0 {sources => src}/srvs/acpi/main.c | 0 {sources => src}/srvs/acpi/manifest.json | 0 {sources => src}/srvs/ahci/build.mk | 0 {sources => src}/srvs/ahci/main.c | 0 {sources => src}/srvs/ahci/manifest.json | 0 {sources => src}/srvs/device/device.h | 0 {sources => src}/srvs/device/main.c | 0 {sources => src}/srvs/device/manifest.json | 0 {sources => src}/srvs/pci/build.mk | 0 {sources => src}/srvs/pci/main.c | 0 {sources => src}/srvs/pci/manifest.json | 0 {sources => src}/srvs/ps2/build.mk | 0 {sources => src}/srvs/ps2/main.c | 0 {sources => src}/srvs/ps2/manifest.json | 0 {sources => src}/srvs/ps2/ps2.h | 0 {sources => src}/srvs/storage/manifest.json | 0 {sources => src}/srvs/system/build.mk | 0 {sources => src}/srvs/system/bus.c | 0 {sources => src}/srvs/system/bus.h | 0 {sources => src}/srvs/system/main.c | 0 {sources => src}/srvs/system/manifest.json | 0 {sources => src}/srvs/system/unit.c | 0 {sources => src}/srvs/system/unit.h | 0 {sources => src}/utils/bvm/build.mk | 0 {sources => src}/utils/bvm/main.c | 0 .../utils/cc => src/utils/bvm}/manifest.json | 0 {sources => src}/utils/cc/build.mk | 0 {sources => src}/utils/cc/main.c | 0 .../fstools => src/utils/cc}/manifest.json | 0 {sources => src}/utils/fstools/build.mk | 0 {sources => src}/utils/fstools/main.c | 0 .../idl => src/utils/fstools}/manifest.json | 0 {sources => src}/utils/gunzip/build.mk | 0 {sources => src}/utils/gunzip/main.c | 0 {sources => src}/utils/gunzip/manifest.json | 0 {sources => src}/utils/gzip/build.mk | 0 {sources => src}/utils/gzip/main.c | 0 {sources => src}/utils/gzip/manifest.json | 0 {sources => src}/utils/hello/build.mk | 0 {sources => src}/utils/hello/main.c | 0 {sources => src}/utils/idgen/build.mk | 0 {sources => src}/utils/idgen/main.c | 0 {sources => src}/utils/idl/build.mk | 0 {sources => src}/utils/idl/main.c | 0 .../test => src/utils/idl}/manifest.json | 0 .../utils/test/brutal/alloc/heap.c | 0 .../utils/test/brutal/base/endian.c | 0 .../utils/test/brutal/codec/deflate.c | 0 .../utils/test/brutal/codec/gzip.c | 0 .../utils/test/brutal/codec/inflate.c | 0 .../utils/test/brutal/codec/zlib.c | 0 {sources => src}/utils/test/brutal/ds/map.c | 0 {sources => src}/utils/test/brutal/ds/range.c | 0 {sources => src}/utils/test/brutal/ds/slot.c | 0 {sources => src}/utils/test/brutal/ds/vec.c | 0 {sources => src}/utils/test/brutal/fmt/case.c | 0 .../utils/test/brutal/fmt/format.c | 0 .../utils/test/brutal/fmt/printf.c | 0 .../utils/test/brutal/glob/glob.c | 0 .../utils/test/brutal/io/bit_write.c | 0 .../utils/test/brutal/tests/expect.c | 0 .../utils/test/brutal/tests/test.c | 0 {sources => src}/utils/test/build.mk | 0 {sources => src}/utils/test/cc/cc.h | 0 {sources => src}/utils/test/cc/pproc.c | 0 {sources => src}/utils/test/json/json.c | 0 {sources => src}/utils/test/main.c | 0 src/utils/test/manifest.json | 0 915 files changed, 600 insertions(+), 128 deletions(-) create mode 100644 meta/targets/brutal-x86_64.json rename sources/build/target/x86_64-link.ld => meta/targets/brutal-x86_64.ld (100%) create mode 100644 meta/targets/kernel-x86_64.json create mode 100644 meta/targets/kernel-x86_64.ld rename {sources => src}/build/boards/riscv64-qemu/build.mk (100%) rename {sources => src}/build/boards/riscv64-qemu/link.ld (100%) rename {sources => src}/build/boards/riscv64-unleashed/build.mk (100%) rename {sources => src}/build/boards/riscv64-unleashed/link.ld (100%) rename {sources => src}/build/boards/x86_64-pc/build.mk (100%) rename {sources => src}/build/boards/x86_64-pc/link.ld (100%) rename {sources => src}/build/configs/debug.mk (100%) rename {sources => src}/build/configs/devel.mk (100%) rename {sources => src}/build/configs/fast.mk (100%) rename {sources => src}/build/configs/san.mk (100%) rename {sources => src}/build/host/build.mk (100%) rename {sources => src}/build/kernel/build.mk (100%) rename {sources => src}/build/loader/loader.mk (100%) rename {sources => src}/build/scripts/dump.sh (100%) rename {sources => src}/build/scripts/env-darwin.sh (100%) rename {sources => src}/build/scripts/fix-kvm-debian-wsl.sh (100%) rename {sources => src}/build/scripts/header-builder.py (100%) rename {sources => src}/build/scripts/manifest-builder.py (100%) rename {sources => src}/build/scripts/setup-darwin.sh (100%) rename {sources => src}/build/scripts/setup-ubuntu.sh (100%) rename {sources => src}/build/target/build.mk (100%) rename {sources => src}/build/target/riscv64-link.ld (100%) create mode 100644 src/build/target/x86_64-link.ld rename {sources => src}/kernel/arch.h (93%) rename {sources => src}/kernel/channel.c (97%) rename {sources => src}/kernel/channel.h (93%) rename {sources => src}/kernel/context.h (100%) rename {sources => src}/kernel/cpu.c (100%) rename {sources => src}/kernel/cpu.h (100%) rename {sources => src}/kernel/domain.c (100%) rename {sources => src}/kernel/domain.h (100%) rename {sources => src}/kernel/event.c (100%) rename {sources => src}/kernel/event.h (100%) rename {sources => src}/kernel/heap.h (100%) rename {sources => src}/kernel/init.c (100%) rename {sources => src}/kernel/init.h (100%) rename {sources => src}/kernel/kernel.c (100%) rename {sources => src}/kernel/kernel.h (100%) rename {sources => src}/kernel/memory.c (100%) rename {sources => src}/kernel/memory.h (100%) rename {sources => src}/kernel/mmap.h (100%) rename {sources => src}/kernel/object.c (100%) rename {sources => src}/kernel/object.h (100%) rename {sources => src}/kernel/parcel.c (100%) rename {sources => src}/kernel/parcel.h (100%) rename {sources => src}/kernel/pmm.c (100%) rename {sources => src}/kernel/pmm.h (100%) rename {sources => src}/kernel/riscv64/arch.c (100%) rename {sources => src}/kernel/riscv64/arch.h (100%) rename {sources => src}/kernel/riscv64/arch_boot.s (100%) rename {sources => src}/kernel/riscv64/asm.h (100%) rename {sources => src}/kernel/riscv64/boot.c (100%) rename {sources => src}/kernel/riscv64/context.c (100%) rename {sources => src}/kernel/riscv64/context.h (100%) rename {sources => src}/kernel/riscv64/cpu.c (100%) rename {sources => src}/kernel/riscv64/cpu.h (100%) rename {sources => src}/kernel/riscv64/heap.c (100%) rename {sources => src}/kernel/riscv64/interrupts.c (100%) rename {sources => src}/kernel/riscv64/interrupts.h (100%) rename {sources => src}/kernel/riscv64/interrupts.s (100%) rename {sources => src}/kernel/riscv64/paging.h (100%) rename {sources => src}/kernel/riscv64/sifive_uart.c (100%) rename {sources => src}/kernel/riscv64/sifive_uart.h (100%) rename {sources => src}/kernel/riscv64/uart8250.c (100%) rename {sources => src}/kernel/riscv64/uart8250.h (100%) rename {sources => src}/kernel/riscv64/unleashed/gpio.h (100%) rename {sources => src}/kernel/riscv64/vmm.c (100%) rename {sources => src}/kernel/sched.c (100%) rename {sources => src}/kernel/sched.h (100%) rename {sources => src}/kernel/space.c (100%) rename {sources => src}/kernel/space.h (100%) rename {sources => src}/kernel/syscalls.c (100%) rename {sources => src}/kernel/syscalls.h (100%) rename {sources => src}/kernel/task.c (100%) rename {sources => src}/kernel/task.h (100%) rename {sources => src}/kernel/tasking.c (100%) rename {sources => src}/kernel/tasking.h (100%) rename {sources => src}/kernel/vmm.h (100%) rename {sources => src}/kernel/x86_64/apic.c (100%) rename {sources => src}/kernel/x86_64/apic.h (100%) rename {sources => src}/kernel/x86_64/arch.c (100%) rename {sources => src}/kernel/x86_64/asm.h (100%) rename {sources => src}/kernel/x86_64/boot.c (100%) rename {sources => src}/kernel/x86_64/boot.s (100%) rename {sources => src}/kernel/x86_64/cmos.c (100%) rename {sources => src}/kernel/x86_64/cmos.h (100%) rename {sources => src}/kernel/x86_64/com.c (100%) rename {sources => src}/kernel/x86_64/com.h (100%) rename {sources => src}/kernel/x86_64/context.c (100%) rename {sources => src}/kernel/x86_64/context.h (100%) rename {sources => src}/kernel/x86_64/cpu.c (100%) rename {sources => src}/kernel/x86_64/cpu.h (100%) rename {sources => src}/kernel/x86_64/cpuid.c (100%) rename {sources => src}/kernel/x86_64/cpuid.h (100%) rename {sources => src}/kernel/x86_64/gdt.c (100%) rename {sources => src}/kernel/x86_64/gdt.h (100%) rename {sources => src}/kernel/x86_64/gdt.s (100%) rename {sources => src}/kernel/x86_64/heap.c (100%) rename {sources => src}/kernel/x86_64/hpet.c (100%) rename {sources => src}/kernel/x86_64/hpet.h (100%) rename {sources => src}/kernel/x86_64/idt.c (100%) rename {sources => src}/kernel/x86_64/idt.h (100%) rename {sources => src}/kernel/x86_64/idt.s (100%) rename {sources => src}/kernel/x86_64/interrupts.c (100%) rename {sources => src}/kernel/x86_64/interrupts.h (100%) rename {sources => src}/kernel/x86_64/interrupts.s (100%) rename {sources => src}/kernel/x86_64/paging.h (100%) rename {sources => src}/kernel/x86_64/pic.c (100%) rename {sources => src}/kernel/x86_64/pic.h (100%) rename {sources => src}/kernel/x86_64/simd.c (100%) rename {sources => src}/kernel/x86_64/simd.h (100%) rename {sources => src}/kernel/x86_64/smp.c (100%) rename {sources => src}/kernel/x86_64/smp.h (100%) rename {sources => src}/kernel/x86_64/smp.s (100%) rename {sources => src}/kernel/x86_64/syscall.c (100%) rename {sources => src}/kernel/x86_64/syscall.h (100%) rename {sources => src}/kernel/x86_64/syscall.s (100%) rename {sources => src}/kernel/x86_64/vmm.c (100%) rename {sources => src}/libs/.build.mk (100%) rename {sources => src}/libs/asan/asan.c (99%) create mode 100644 src/libs/asan/manifest.json rename {sources => src}/libs/bal/abi.h (100%) rename {sources => src}/libs/bal/abi/helpers.c (100%) rename {sources => src}/libs/bal/abi/helpers.h (89%) rename {sources => src}/libs/bal/abi/syscalls.c (100%) rename {sources => src}/libs/bal/abi/syscalls.h (100%) rename {sources => src}/libs/bal/abi/types.h (99%) rename {sources => src}/libs/bal/abi/wrappers.c (97%) rename {sources => src}/libs/bal/abi/wrappers.h (100%) rename {sources => src}/libs/bal/boot.h (100%) rename {sources => src}/libs/bal/boot/handover.c (97%) rename {sources => src}/libs/bal/boot/handover.h (96%) rename {sources => src}/libs/bal/hw.h (100%) rename {sources => src}/libs/bal/hw/fb.c (100%) rename {sources => src}/libs/bal/hw/fb.h (100%) rename {sources => src}/libs/bal/hw/io.c (98%) rename {sources => src}/libs/bal/hw/io.h (98%) rename {sources => src}/libs/bal/hw/mem.c (97%) rename {sources => src}/libs/bal/hw/mem.h (97%) create mode 100644 src/libs/bal/manifest.json rename {sources => src}/libs/bal/task.h (100%) rename {sources => src}/libs/bal/task/exec.c (97%) rename {sources => src}/libs/bal/task/task.c (100%) rename {sources => src}/libs/bal/task/task.h (100%) rename {sources => src}/libs/brutal-alloc/base.c (92%) rename {sources => src}/libs/brutal-alloc/base.h (95%) rename {sources => src}/libs/brutal-alloc/global.c (93%) rename {sources => src}/libs/brutal-alloc/global.h (100%) rename {sources => src}/libs/brutal-alloc/heap.c (98%) rename {sources => src}/libs/brutal-alloc/heap.h (100%) create mode 100644 src/libs/brutal-alloc/manifest.json rename {sources => src}/libs/brutal-alloc/pool.c (96%) rename {sources => src}/libs/brutal-alloc/pool.h (100%) rename {sources => src}/libs/brutal-base/any.h (100%) rename {sources => src}/libs/brutal-base/attributes.h (100%) rename {sources => src}/libs/brutal-base/banned.h (100%) rename {sources => src}/libs/brutal-base/cast.h (100%) rename {sources/libs/brutal-math => src/libs/brutal-base}/clamp.h (100%) rename {sources => src}/libs/brutal-base/count.h (100%) rename {sources => src}/libs/brutal-base/defs.h (100%) rename {sources => src}/libs/brutal-base/endian.h (100%) rename {sources => src}/libs/brutal-base/error.h (100%) rename {sources => src}/libs/brutal-base/iter.h (100%) rename {sources => src}/libs/brutal-base/keywords.h (100%) rename {sources => src}/libs/brutal-base/loc.h (100%) rename {sources => src}/libs/brutal-base/macros.h (100%) create mode 100644 src/libs/brutal-base/manifest.json rename {sources => src}/libs/brutal-base/map.h (100%) rename {sources => src}/libs/brutal-base/range.h (99%) rename {sources => src}/libs/brutal-base/result.h (100%) rename {sources => src}/libs/brutal-base/slice.h (100%) rename {sources => src}/libs/brutal-base/std.h (100%) rename {sources => src}/libs/brutal-base/str.h (99%) rename {sources => src}/libs/brutal-base/types.h (100%) rename {sources => src}/libs/brutal-base/vaopt.h (100%) rename {sources => src}/libs/brutal-cli/clear.c (94%) rename {sources => src}/libs/brutal-cli/clear.h (91%) rename {sources => src}/libs/brutal-cli/cursor.c (97%) rename {sources => src}/libs/brutal-cli/cursor.h (94%) rename {sources => src}/libs/brutal-cli/fmt.c (96%) rename {sources => src}/libs/brutal-cli/fmt.h (75%) create mode 100644 src/libs/brutal-cli/manifest.json rename {sources => src}/libs/brutal-cli/spinners.c (93%) rename {sources => src}/libs/brutal-cli/spinners.h (84%) rename {sources => src}/libs/brutal-cli/style.c (98%) rename {sources => src}/libs/brutal-cli/style.h (93%) rename {sources => src}/libs/brutal-debug/assert.h (99%) rename {sources => src}/libs/brutal-debug/log.c (96%) rename {sources => src}/libs/brutal-debug/log.h (92%) create mode 100644 src/libs/brutal-debug/manifest.json rename {sources => src}/libs/brutal-ds/bits.c (96%) rename {sources => src}/libs/brutal-ds/bits.h (97%) create mode 100644 src/libs/brutal-ds/manifest.json rename {sources => src}/libs/brutal-ds/map.c (96%) rename {sources => src}/libs/brutal-ds/map.h (98%) rename {sources => src}/libs/brutal-ds/range.c (98%) rename {sources => src}/libs/brutal-ds/range.h (92%) rename {sources => src}/libs/brutal-ds/ring.c (97%) rename {sources => src}/libs/brutal-ds/ring.h (97%) rename {sources => src}/libs/brutal-ds/slot.c (96%) rename {sources => src}/libs/brutal-ds/slot.h (98%) rename {sources => src}/libs/brutal-ds/vec.c (98%) rename {sources => src}/libs/brutal-ds/vec.h (98%) rename {sources => src}/libs/brutal-fibers/fibers.c (97%) rename {sources => src}/libs/brutal-fibers/fibers.h (96%) create mode 100644 src/libs/brutal-fibers/manifest.json rename {sources => src}/libs/brutal-fmt/case.c (97%) rename {sources => src}/libs/brutal-fmt/case.h (93%) rename {sources => src}/libs/brutal-fmt/fmt.c (98%) rename {sources => src}/libs/brutal-fmt/fmt.h (92%) rename {sources => src}/libs/brutal-fmt/funcs.c (99%) rename {sources => src}/libs/brutal-fmt/funcs.h (100%) create mode 100644 src/libs/brutal-fmt/manifest.json rename {sources => src}/libs/brutal-glob/glob.c (99%) rename {sources => src}/libs/brutal-glob/glob.h (96%) create mode 100644 src/libs/brutal-glob/manifest.json rename {sources => src}/libs/brutal-hash/adler32.c (97%) rename {sources => src}/libs/brutal-hash/adler32.h (90%) rename {sources => src}/libs/brutal-hash/crc32.c (98%) rename {sources => src}/libs/brutal-hash/crc32.h (93%) rename {sources => src}/libs/brutal-hash/fnv.c (100%) rename {sources => src}/libs/brutal-hash/fnv.h (96%) create mode 100644 src/libs/brutal-hash/manifest.json rename {sources => src}/libs/brutal-input/event.h (94%) rename {sources => src}/libs/brutal-input/keyboard.h (98%) create mode 100644 src/libs/brutal-input/manifest.json rename {sources => src}/libs/brutal-input/mouse.h (81%) rename {sources => src}/libs/brutal-io/base.c (95%) rename {sources => src}/libs/brutal-io/base.h (84%) rename {sources => src}/libs/brutal-io/bitbuf.h (88%) rename {sources => src}/libs/brutal-io/buf.c (97%) rename {sources => src}/libs/brutal-io/buf.h (97%) rename {sources => src}/libs/brutal-io/chan.c (100%) rename {sources => src}/libs/brutal-io/chan.h (100%) rename {sources => src}/libs/brutal-io/emit.c (100%) rename {sources => src}/libs/brutal-io/emit.h (100%) rename {sources => src}/libs/brutal-io/file.c (100%) rename {sources => src}/libs/brutal-io/file.h (100%) rename {sources => src}/libs/brutal-io/funcs.c (100%) rename {sources => src}/libs/brutal-io/funcs.h (100%) create mode 100644 src/libs/brutal-io/manifest.json rename {sources => src}/libs/brutal-io/mem.c (100%) rename {sources => src}/libs/brutal-io/mem.h (100%) rename {sources => src}/libs/brutal-io/path.c (100%) rename {sources => src}/libs/brutal-io/path.h (100%) rename {sources => src}/libs/brutal-io/rbits.h (100%) rename {sources => src}/libs/brutal-io/traits.h (100%) rename {sources => src}/libs/brutal-io/wbits.h (100%) rename {sources => src}/libs/brutal-io/window.c (100%) rename {sources => src}/libs/brutal-io/window.h (95%) rename {sources => src}/libs/brutal-math/angle.h (100%) rename sources/libs/hw/virtio/device/entropy.c => src/libs/brutal-math/clamp.h (100%) rename {sources => src}/libs/brutal-math/dock.c (100%) rename {sources => src}/libs/brutal-math/dock.h (100%) rename {sources => src}/libs/brutal-math/easing.c (100%) rename {sources => src}/libs/brutal-math/easing.h (100%) rename {sources => src}/libs/brutal-math/edge.h (97%) rename {sources => src}/libs/brutal-math/flow.c (100%) rename {sources => src}/libs/brutal-math/flow.h (100%) rename {sources => src}/libs/brutal-math/funcs.h (100%) rename {sources => src}/libs/brutal-math/gravity.c (100%) rename {sources => src}/libs/brutal-math/gravity.h (100%) create mode 100644 src/libs/brutal-math/manifest.json rename {sources => src}/libs/brutal-math/orientation.h (100%) rename {sources => src}/libs/brutal-math/rand.c (100%) rename {sources => src}/libs/brutal-math/rand.h (95%) rename {sources => src}/libs/brutal-math/rect.h (99%) rename {sources => src}/libs/brutal-math/spacing.c (100%) rename {sources => src}/libs/brutal-math/spacing.h (100%) rename {sources => src}/libs/brutal-math/trans2.h (98%) rename {sources => src}/libs/brutal-math/vec2.h (100%) rename {sources => src}/libs/brutal-mem/const.h (100%) rename {sources => src}/libs/brutal-mem/copy.c (100%) rename {sources => src}/libs/brutal-mem/funcs.h (80%) create mode 100644 src/libs/brutal-mem/manifest.json rename {sources => src}/libs/brutal-mem/move.c (100%) rename {sources => src}/libs/brutal-mem/pages.h (100%) rename {sources => src}/libs/brutal-mem/set.c (100%) rename {sources => src}/libs/brutal-mem/units.h (87%) rename {sources => src}/libs/brutal-mem/volatile.h (95%) rename {sources => src}/libs/brutal-parse/lex.c (100%) rename {sources => src}/libs/brutal-parse/lex.h (100%) rename {sources => src}/libs/brutal-parse/lexeme.h (100%) create mode 100644 src/libs/brutal-parse/manifest.json rename {sources => src}/libs/brutal-parse/nums.c (100%) rename {sources => src}/libs/brutal-parse/nums.h (100%) rename {sources => src}/libs/brutal-parse/scan.c (100%) rename {sources => src}/libs/brutal-parse/scan.h (98%) rename {sources => src}/libs/brutal-sync/lock.c (100%) rename {sources => src}/libs/brutal-sync/lock.h (100%) rename {sources => src}/libs/brutal-sync/ref.h (100%) rename {sources => src}/libs/brutal-sync/rwlock.c (100%) rename {sources => src}/libs/brutal-sync/rwlock.h (100%) rename {sources => src}/libs/brutal-task/task.c (100%) rename {sources => src}/libs/brutal-task/task.h (100%) rename {sources => src}/libs/brutal-test/expect.h (100%) rename {sources => src}/libs/brutal-test/hook-alloc.h (100%) rename {sources => src}/libs/brutal-test/runner.c (100%) rename {sources => src}/libs/brutal-test/runner.h (100%) rename {sources => src}/libs/brutal-text/cp437.c (100%) rename {sources => src}/libs/brutal-text/cp437.h (100%) rename {sources => src}/libs/brutal-text/rune.h (56%) rename {sources => src}/libs/brutal-text/str.c (100%) rename {sources => src}/libs/brutal-text/str.h (88%) rename {sources => src}/libs/brutal-text/utf16.c (100%) rename {sources => src}/libs/brutal-text/utf16.h (100%) rename {sources => src}/libs/brutal-text/utf8.c (100%) rename {sources => src}/libs/brutal-text/utf8.h (91%) rename {sources => src}/libs/brutal-text/vals.h (100%) rename {sources => src}/libs/brutal-text/witty.c (100%) rename {sources => src}/libs/brutal-text/witty.h (100%) rename {sources => src}/libs/brutal-time/constants.h (100%) rename {sources => src}/libs/brutal-time/convert.c (100%) rename {sources => src}/libs/brutal-time/convert.h (100%) rename {sources => src}/libs/brutal-time/query.c (100%) rename {sources => src}/libs/brutal-time/query.h (100%) rename {sources => src}/libs/brutal-time/types.h (92%) rename {sources => src}/libs/bvm/base/res.h (100%) rename {sources => src}/libs/bvm/ctx.h (100%) rename {sources => src}/libs/bvm/ctx/global.c (100%) rename {sources => src}/libs/bvm/ctx/global.h (100%) rename {sources => src}/libs/bvm/ctx/local.c (100%) rename {sources => src}/libs/bvm/ctx/local.h (100%) rename {sources => src}/libs/bvm/eval.h (100%) rename {sources => src}/libs/bvm/eval/eval.c (100%) rename {sources => src}/libs/bvm/eval/eval.h (100%) rename {sources => src}/libs/bvm/eval/instr.c (100%) rename {sources => src}/libs/bvm/eval/instr.h (100%) rename {sources => src}/libs/bvm/obj.h (100%) rename {sources => src}/libs/bvm/obj/func.c (100%) rename {sources => src}/libs/bvm/obj/func.h (100%) rename {sources => src}/libs/bvm/obj/obj.c (100%) rename {sources => src}/libs/bvm/obj/obj.h (100%) rename {sources => src}/libs/bvm/obj/val.c (100%) rename {sources => src}/libs/bvm/obj/val.h (100%) rename {sources => src}/libs/cc/ast.h (100%) rename {sources => src}/libs/cc/ast/decl.h (100%) rename {sources => src}/libs/cc/ast/expr.c (100%) rename {sources => src}/libs/cc/ast/expr.h (100%) rename {sources => src}/libs/cc/ast/stmt.c (100%) rename {sources => src}/libs/cc/ast/stmt.h (100%) rename {sources => src}/libs/cc/ast/type.c (100%) rename {sources => src}/libs/cc/ast/type.h (100%) rename {sources => src}/libs/cc/ast/unit.c (100%) rename {sources => src}/libs/cc/ast/unit.h (100%) rename {sources => src}/libs/cc/ast/val.c (100%) rename {sources => src}/libs/cc/ast/val.h (100%) rename {sources => src}/libs/cc/builder.h (100%) rename {sources => src}/libs/cc/builder/decl.c (100%) rename {sources => src}/libs/cc/builder/decl.h (100%) rename {sources => src}/libs/cc/builder/expr.c (100%) rename {sources => src}/libs/cc/builder/expr.h (100%) rename {sources => src}/libs/cc/builder/stmt.c (100%) rename {sources => src}/libs/cc/builder/stmt.h (100%) rename {sources => src}/libs/cc/builder/type.c (100%) rename {sources => src}/libs/cc/builder/type.h (100%) rename {sources => src}/libs/cc/builder/unit.c (100%) rename {sources => src}/libs/cc/builder/unit.h (100%) rename {sources => src}/libs/cc/builder/val.c (100%) rename {sources => src}/libs/cc/builder/val.h (100%) rename {sources => src}/libs/cc/dump.h (100%) rename {sources => src}/libs/cc/dump/dump.c (100%) rename {sources => src}/libs/cc/lex.h (100%) rename {sources => src}/libs/cc/lex/lexemes.h (100%) rename {sources => src}/libs/cc/lex/lexer.c (100%) rename {sources => src}/libs/cc/lex/lexer.h (100%) rename {sources => src}/libs/cc/lex/pproc.c (100%) rename {sources => src}/libs/cc/lex/pproc.h (100%) rename {sources => src}/libs/cc/parse.h (100%) rename {sources => src}/libs/cc/parse/cval.c (100%) rename {sources => src}/libs/cc/parse/decl.c (100%) rename {sources => src}/libs/cc/parse/expr.c (100%) rename {sources => src}/libs/cc/parse/misc.c (100%) rename {sources => src}/libs/cc/parse/parser.h (100%) rename {sources => src}/libs/cc/parse/stmt.c (100%) rename {sources => src}/libs/cc/parse/type.c (100%) rename {sources => src}/libs/cc/parse/unit.c (100%) rename {sources => src}/libs/cc/sema.h (100%) rename {sources => src}/libs/cc/sema/cast.c (100%) rename {sources => src}/libs/cc/sema/cast.h (100%) rename {sources => src}/libs/cc/sema/scope.c (100%) rename {sources => src}/libs/cc/sema/scope.h (100%) rename {sources => src}/libs/cc/sema/sema.c (100%) rename {sources => src}/libs/cc/sema/sema.h (100%) rename {sources => src}/libs/cc/sema/visit.c (100%) rename {sources => src}/libs/cc/sema/visit.h (100%) rename {sources => src}/libs/cc/sema/visit_statement.c (100%) rename {sources => src}/libs/cc/trans.h (100%) rename {sources => src}/libs/cc/trans/decl.c (100%) rename {sources => src}/libs/cc/trans/expr.c (100%) rename {sources => src}/libs/cc/trans/stmt.c (100%) rename {sources => src}/libs/cc/trans/type.c (100%) rename {sources => src}/libs/cc/trans/unit.c (100%) rename {sources => src}/libs/cc/trans/val.c (100%) rename {sources => src}/libs/codec-deflate/constants.h (100%) rename {sources => src}/libs/codec-deflate/deflate.c (100%) rename {sources => src}/libs/codec-deflate/deflate.h (100%) rename {sources => src}/libs/codec-deflate/errors.h (100%) rename {sources => src}/libs/codec-deflate/huff.h (100%) rename {sources => src}/libs/codec-deflate/inflate.c (100%) rename {sources => src}/libs/codec-deflate/inflate.h (100%) rename {sources => src}/libs/codec-gzip/gzip.c (100%) rename {sources => src}/libs/codec-gzip/gzip.h (100%) rename {sources => src}/libs/codec-zlib/zlib.c (100%) rename {sources => src}/libs/codec-zlib/zlib.h (100%) rename {sources => src}/libs/elf/elf.c (100%) rename {sources => src}/libs/elf/elf.h (95%) rename {sources => src}/libs/embed/arm64/backtrace.c (84%) rename {sources => src}/libs/embed/brutal/chan.c (100%) rename {sources => src}/libs/embed/brutal/debug.c (100%) rename {sources => src}/libs/embed/brutal/entry.c (100%) rename {sources => src}/libs/embed/brutal/file.c (100%) rename {sources => src}/libs/embed/brutal/file.h (100%) rename {sources => src}/libs/embed/brutal/log.c (100%) rename {sources => src}/libs/embed/brutal/mem.c (100%) rename {sources => src}/libs/embed/brutal/sync.c (100%) rename {sources => src}/libs/embed/brutal/task.c (100%) rename {sources => src}/libs/embed/brutal/time.c (100%) rename {sources => src}/libs/embed/brutal/x86_64/crt0.s (100%) rename {sources => src}/libs/embed/brutal/x86_64/crti.s (100%) rename {sources => src}/libs/embed/brutal/x86_64/crtn.s (100%) rename {sources => src}/libs/embed/chan.h (100%) rename {sources => src}/libs/embed/crypto.h (69%) rename {sources => src}/libs/embed/debug.h (65%) rename {sources => src}/libs/embed/efi/chan.c (100%) rename {sources => src}/libs/embed/efi/chkstk.c (100%) rename {sources => src}/libs/embed/efi/debug.c (100%) rename {sources => src}/libs/embed/efi/file.c (100%) rename {sources => src}/libs/embed/efi/file.h (100%) rename {sources => src}/libs/embed/efi/log.c (100%) rename {sources => src}/libs/embed/efi/mem.c (100%) rename {sources => src}/libs/embed/file-decl.h (93%) rename {sources => src}/libs/embed/file.h (100%) rename {sources => src}/libs/embed/kernel/debug.c (100%) rename {sources => src}/libs/embed/kernel/log.c (100%) rename {sources => src}/libs/embed/kernel/mem.c (100%) rename {sources => src}/libs/embed/kernel/sync.c (100%) rename {sources => src}/libs/embed/log.h (82%) create mode 100644 src/libs/embed/manifest.json rename {sources => src}/libs/embed/mem.h (95%) rename {sources => src}/libs/embed/posix/chan.c (100%) rename {sources => src}/libs/embed/posix/crypto.c (100%) rename {sources => src}/libs/embed/posix/debug.c (100%) rename {sources => src}/libs/embed/posix/err.c (100%) rename {sources => src}/libs/embed/posix/err.h (100%) rename {sources => src}/libs/embed/posix/file.c (100%) rename {sources => src}/libs/embed/posix/file.h (100%) rename {sources => src}/libs/embed/posix/log.c (100%) rename {sources => src}/libs/embed/posix/mem.c (100%) rename {sources => src}/libs/embed/posix/sync.c (100%) rename {sources => src}/libs/embed/posix/task.c (100%) rename {sources => src}/libs/embed/posix/time.c (100%) rename {sources => src}/libs/embed/riscv64/backtrace.c (100%) rename {sources => src}/libs/embed/riscv64/fibers.s (100%) rename {sources => src}/libs/embed/sync.h (100%) rename {sources => src}/libs/embed/task.h (86%) rename {sources => src}/libs/embed/time.h (100%) rename {sources => src}/libs/embed/x86_64/backtrace.c (95%) rename {sources => src}/libs/embed/x86_64/copy.c (100%) rename {sources => src}/libs/embed/x86_64/fibers.s (100%) rename {sources => src}/libs/embed/x86_64/pause.c (100%) rename {sources => src}/libs/embed/x86_64/set.c (100%) rename {sources => src}/libs/fs/block.c (100%) rename {sources => src}/libs/fs/block.h (100%) rename {sources => src}/libs/fs/ext2/block.c (100%) rename {sources => src}/libs/fs/ext2/block.h (100%) rename {sources => src}/libs/fs/ext2/cache.c (100%) rename {sources => src}/libs/fs/ext2/cache.h (100%) rename {sources => src}/libs/fs/ext2/ext2.c (100%) rename {sources => src}/libs/fs/ext2/ext2.h (100%) rename {sources => src}/libs/fs/ext2/structure.c (100%) rename {sources => src}/libs/fs/ext2/structure.h (100%) rename {sources => src}/libs/fs/fs.h (100%) rename {sources => src}/libs/handover/builder.c (100%) rename {sources => src}/libs/handover/builder.h (100%) rename {sources => src}/libs/handover/handover.c (100%) rename {sources => src}/libs/handover/handover.h (100%) rename {sources => src}/libs/hw/acpi/base.c (100%) rename {sources => src}/libs/hw/acpi/base.h (100%) rename {sources => src}/libs/hw/acpi/hpet.h (100%) rename {sources => src}/libs/hw/acpi/madt.c (100%) rename {sources => src}/libs/hw/acpi/madt.h (100%) rename {sources => src}/libs/hw/acpi/mcfg.h (100%) rename {sources => src}/libs/hw/acpi/rsdt.c (100%) rename {sources => src}/libs/hw/acpi/rsdt.h (100%) rename {sources => src}/libs/hw/acpi/stdh.h (100%) rename {sources => src}/libs/hw/ahci/ahci.c (100%) rename {sources => src}/libs/hw/ahci/ahci.h (100%) rename {sources => src}/libs/hw/ahci/device.c (100%) rename {sources => src}/libs/hw/ahci/device.h (100%) rename {sources => src}/libs/hw/ahci/fis.h (100%) rename {sources => src}/libs/hw/ahci/hba.h (100%) rename {sources => src}/libs/hw/efi/lib.c (100%) rename {sources => src}/libs/hw/efi/lib.h (100%) rename {sources => src}/libs/hw/efi/protos.h (100%) rename {sources => src}/libs/hw/efi/protos/dpp.h (100%) rename {sources => src}/libs/hw/efi/protos/fp.h (100%) rename {sources => src}/libs/hw/efi/protos/gop.h (100%) rename {sources => src}/libs/hw/efi/protos/lip.h (100%) rename {sources => src}/libs/hw/efi/protos/sfsp.h (100%) rename {sources => src}/libs/hw/efi/protos/stip.h (100%) rename {sources => src}/libs/hw/efi/protos/stop.h (100%) rename {sources => src}/libs/hw/efi/srvs.h (100%) rename {sources => src}/libs/hw/efi/srvs/bs.h (100%) rename {sources => src}/libs/hw/efi/srvs/rs.h (100%) rename {sources => src}/libs/hw/efi/tables.h (100%) rename {sources => src}/libs/hw/efi/tables/ct.h (100%) rename {sources => src}/libs/hw/efi/tables/st.h (100%) rename {sources => src}/libs/hw/efi/tty.c (100%) rename {sources => src}/libs/hw/efi/tty.h (100%) rename {sources => src}/libs/hw/efi/types.h (100%) rename {sources => src}/libs/hw/fdt/fdt.c (100%) rename {sources => src}/libs/hw/fdt/fdt.h (100%) rename {sources => src}/libs/hw/fdt/handover.c (100%) rename {sources => src}/libs/hw/fdt/handover.h (100%) rename {sources => src}/libs/hw/pci/addr.h (100%) rename {sources => src}/libs/hw/pci/capabilities.c (100%) rename {sources => src}/libs/hw/pci/capabilities.h (100%) rename {sources => src}/libs/hw/pci/config.h (100%) rename {sources => src}/libs/hw/pci/group.c (100%) rename {sources => src}/libs/hw/pci/group.h (100%) rename {sources => src}/libs/hw/pci/pci.c (100%) rename {sources => src}/libs/hw/pci/pci.h (100%) rename {sources => src}/libs/hw/ps2/controller.c (100%) rename {sources => src}/libs/hw/ps2/controller.h (100%) rename {sources => src}/libs/hw/ps2/keyboard.c (100%) rename {sources => src}/libs/hw/ps2/keyboard.h (100%) rename {sources => src}/libs/hw/ps2/mouse.c (100%) rename {sources => src}/libs/hw/ps2/mouse.h (100%) rename {sources => src}/libs/hw/ps2/ps2.h (100%) rename {sources => src}/libs/hw/uart/uart.c (100%) rename {sources => src}/libs/hw/uart/uart.h (100%) rename {sources => src}/libs/hw/virtio/config.c (100%) rename {sources => src}/libs/hw/virtio/config.h (100%) rename {sources => src}/libs/hw/virtio/device.c (100%) rename {sources => src}/libs/hw/virtio/device.h (100%) rename {sources => src}/libs/hw/virtio/device/block.c (100%) rename {sources => src}/libs/hw/virtio/device/block.h (100%) rename sources/utils/bvm/manifest.json => src/libs/hw/virtio/device/entropy.c (100%) rename {sources => src}/libs/hw/virtio/device/entropy.h (100%) rename {sources => src}/libs/hw/virtio/features.h (100%) rename {sources => src}/libs/hw/virtio/notification.c (100%) rename {sources => src}/libs/hw/virtio/notification.h (100%) rename {sources => src}/libs/hw/virtio/splitvqueue.c (100%) rename {sources => src}/libs/hw/virtio/splitvqueue.h (100%) rename {sources => src}/libs/hw/virtio/virtqueue.h (100%) rename {sources => src}/libs/idl/ast.h (100%) rename {sources => src}/libs/idl/ast/builder.c (100%) rename {sources => src}/libs/idl/ast/builder.h (100%) rename {sources => src}/libs/idl/ast/iface.h (100%) rename {sources => src}/libs/idl/ast/query.c (100%) rename {sources => src}/libs/idl/ast/query.h (100%) rename {sources => src}/libs/idl/ast/types.h (100%) rename {sources => src}/libs/idl/cgen.h (100%) rename {sources => src}/libs/idl/cgen/binding.c (100%) rename {sources => src}/libs/idl/cgen/dispatch.c (100%) rename {sources => src}/libs/idl/cgen/handler.c (100%) rename {sources => src}/libs/idl/cgen/header.c (100%) rename {sources => src}/libs/idl/cgen/includes.c (100%) rename {sources => src}/libs/idl/cgen/method.c (100%) rename {sources => src}/libs/idl/cgen/pack.c (100%) rename {sources => src}/libs/idl/cgen/provider.c (100%) rename {sources => src}/libs/idl/cgen/source.c (100%) rename {sources => src}/libs/idl/cgen/types.c (100%) rename {sources => src}/libs/idl/cgen/unpack.c (100%) rename {sources => src}/libs/idl/json.c (100%) rename {sources => src}/libs/idl/json.h (100%) rename {sources => src}/libs/idl/parse.c (100%) rename {sources => src}/libs/idl/parse.h (100%) rename {sources => src}/libs/idl/sema.c (100%) rename {sources => src}/libs/idl/sema.h (100%) rename {sources => src}/libs/ipc/capability.h (100%) rename {sources => src}/libs/ipc/component.c (100%) rename {sources => src}/libs/ipc/component.h (100%) rename {sources => src}/libs/ipc/hooks.c (100%) rename {sources => src}/libs/ipc/hooks.h (100%) rename {sources => src}/libs/ipc/interface.h (100%) rename {sources => src}/libs/ipc/ipc.h (100%) rename {sources => src}/libs/ipc/pack.c (100%) rename {sources => src}/libs/ipc/pack.h (94%) rename {sources => src}/libs/ipc/unpack.c (100%) rename {sources => src}/libs/ipc/unpack.h (93%) rename {sources => src}/libs/json/emit.c (100%) rename {sources => src}/libs/json/emit.h (100%) rename {sources => src}/libs/json/objects.c (100%) rename {sources => src}/libs/json/objects.h (100%) rename {sources => src}/libs/json/parser.c (100%) rename {sources => src}/libs/json/parser.h (100%) rename {sources => src}/libs/stdc-ansi/assert.h (100%) rename {sources => src}/libs/stdc-ansi/ctype.c (100%) rename {sources => src}/libs/stdc-ansi/ctype.h (100%) rename {sources => src}/libs/stdc-ansi/endian.h (100%) rename {sources => src}/libs/stdc-ansi/errno.c (100%) rename {sources => src}/libs/stdc-ansi/errno.h (100%) rename {sources => src}/libs/stdc-ansi/fenv.h (100%) rename {sources => src}/libs/stdc-ansi/locale.h (100%) rename {sources => src}/libs/stdc-ansi/qsort.c (100%) rename {sources => src}/libs/stdc-ansi/stdio.h (100%) rename {sources => src}/libs/stdc-ansi/stdlib.c (100%) rename {sources => src}/libs/stdc-ansi/stdlib.h (100%) rename {sources => src}/libs/stdc-ansi/string.c (100%) rename {sources => src}/libs/stdc-ansi/string.h (100%) rename {sources => src}/libs/stdc-base/prelude.h (100%) rename {sources => src}/libs/stdc-ext/string.c (100%) rename {sources => src}/libs/stdc-ext/string.h (100%) rename {sources => src}/libs/stdc-math/__cos.c (100%) rename {sources => src}/libs/stdc-math/__cosdf.c (100%) rename {sources => src}/libs/stdc-math/__cosl.c (100%) rename {sources => src}/libs/stdc-math/__expo2.c (100%) rename {sources => src}/libs/stdc-math/__expo2f.c (100%) rename {sources => src}/libs/stdc-math/__fpclassify.c (100%) rename {sources => src}/libs/stdc-math/__fpclassifyf.c (100%) rename {sources => src}/libs/stdc-math/__fpclassifyl.c (100%) rename {sources => src}/libs/stdc-math/__invtrigl.c (100%) rename {sources => src}/libs/stdc-math/__invtrigl.h (100%) rename {sources => src}/libs/stdc-math/__polevll.c (100%) rename {sources => src}/libs/stdc-math/__rem_pio2.c (100%) rename {sources => src}/libs/stdc-math/__rem_pio2_large.c (100%) rename {sources => src}/libs/stdc-math/__rem_pio2f.c (100%) rename {sources => src}/libs/stdc-math/__rem_pio2l.c (100%) rename {sources => src}/libs/stdc-math/__signbit.c (100%) rename {sources => src}/libs/stdc-math/__signbitf.c (100%) rename {sources => src}/libs/stdc-math/__signbitl.c (100%) rename {sources => src}/libs/stdc-math/__sin.c (100%) rename {sources => src}/libs/stdc-math/__sindf.c (100%) rename {sources => src}/libs/stdc-math/__sinl.c (100%) rename {sources => src}/libs/stdc-math/__tan.c (100%) rename {sources => src}/libs/stdc-math/__tandf.c (100%) rename {sources => src}/libs/stdc-math/__tanl.c (100%) rename {sources => src}/libs/stdc-math/acos.c (100%) rename {sources => src}/libs/stdc-math/acosf.c (100%) rename {sources => src}/libs/stdc-math/acosh.c (100%) rename {sources => src}/libs/stdc-math/acoshf.c (100%) rename {sources => src}/libs/stdc-math/acoshl.c (100%) rename {sources => src}/libs/stdc-math/acosl.c (100%) rename {sources => src}/libs/stdc-math/asin.c (100%) rename {sources => src}/libs/stdc-math/asinf.c (100%) rename {sources => src}/libs/stdc-math/asinh.c (100%) rename {sources => src}/libs/stdc-math/asinhf.c (100%) rename {sources => src}/libs/stdc-math/asinhl.c (100%) rename {sources => src}/libs/stdc-math/asinl.c (100%) rename {sources => src}/libs/stdc-math/atan.c (100%) rename {sources => src}/libs/stdc-math/atan2.c (100%) rename {sources => src}/libs/stdc-math/atan2f.c (100%) rename {sources => src}/libs/stdc-math/atan2l.c (100%) rename {sources => src}/libs/stdc-math/atanf.c (100%) rename {sources => src}/libs/stdc-math/atanh.c (100%) rename {sources => src}/libs/stdc-math/atanhf.c (100%) rename {sources => src}/libs/stdc-math/atanhl.c (100%) rename {sources => src}/libs/stdc-math/atanl.c (100%) rename {sources => src}/libs/stdc-math/cbrt.c (100%) rename {sources => src}/libs/stdc-math/cbrtf.c (100%) rename {sources => src}/libs/stdc-math/cbrtl.c (100%) rename {sources => src}/libs/stdc-math/ceil.c (100%) rename {sources => src}/libs/stdc-math/ceilf.c (100%) rename {sources => src}/libs/stdc-math/ceill.c (100%) rename {sources => src}/libs/stdc-math/copysign.c (100%) rename {sources => src}/libs/stdc-math/copysignf.c (100%) rename {sources => src}/libs/stdc-math/copysignl.c (100%) rename {sources => src}/libs/stdc-math/cos.c (100%) rename {sources => src}/libs/stdc-math/cosf.c (100%) rename {sources => src}/libs/stdc-math/cosh.c (100%) rename {sources => src}/libs/stdc-math/coshf.c (100%) rename {sources => src}/libs/stdc-math/coshl.c (100%) rename {sources => src}/libs/stdc-math/cosl.c (100%) rename {sources => src}/libs/stdc-math/erf.c (100%) rename {sources => src}/libs/stdc-math/erff.c (100%) rename {sources => src}/libs/stdc-math/erfl.c (100%) rename {sources => src}/libs/stdc-math/exp.c (100%) rename {sources => src}/libs/stdc-math/exp10.c (100%) rename {sources => src}/libs/stdc-math/exp10f.c (100%) rename {sources => src}/libs/stdc-math/exp10l.c (100%) rename {sources => src}/libs/stdc-math/exp2.c (100%) rename {sources => src}/libs/stdc-math/exp2f.c (100%) rename {sources => src}/libs/stdc-math/exp2l.c (100%) rename {sources => src}/libs/stdc-math/expf.c (100%) rename {sources => src}/libs/stdc-math/expl.c (100%) rename {sources => src}/libs/stdc-math/expm1.c (100%) rename {sources => src}/libs/stdc-math/expm1f.c (100%) rename {sources => src}/libs/stdc-math/expm1l.c (100%) rename {sources => src}/libs/stdc-math/fabs.c (100%) rename {sources => src}/libs/stdc-math/fabsf.c (100%) rename {sources => src}/libs/stdc-math/fabsl.c (100%) rename {sources => src}/libs/stdc-math/fdim.c (100%) rename {sources => src}/libs/stdc-math/fdimf.c (100%) rename {sources => src}/libs/stdc-math/fdiml.c (100%) rename {sources => src}/libs/stdc-math/finite.c (100%) rename {sources => src}/libs/stdc-math/finitef.c (100%) rename {sources => src}/libs/stdc-math/floor.c (100%) rename {sources => src}/libs/stdc-math/floorf.c (100%) rename {sources => src}/libs/stdc-math/floorl.c (100%) rename {sources => src}/libs/stdc-math/fma.c (100%) rename {sources => src}/libs/stdc-math/fmaf.c (100%) rename {sources => src}/libs/stdc-math/fmal.c (100%) rename {sources => src}/libs/stdc-math/fmax.c (100%) rename {sources => src}/libs/stdc-math/fmaxf.c (100%) rename {sources => src}/libs/stdc-math/fmaxl.c (100%) rename {sources => src}/libs/stdc-math/fmin.c (100%) rename {sources => src}/libs/stdc-math/fminf.c (100%) rename {sources => src}/libs/stdc-math/fminl.c (100%) rename {sources => src}/libs/stdc-math/fmod.c (100%) rename {sources => src}/libs/stdc-math/fmodf.c (100%) rename {sources => src}/libs/stdc-math/fmodl.c (100%) rename {sources => src}/libs/stdc-math/frexp.c (100%) rename {sources => src}/libs/stdc-math/frexpf.c (100%) rename {sources => src}/libs/stdc-math/frexpl.c (100%) rename {sources => src}/libs/stdc-math/hypot.c (100%) rename {sources => src}/libs/stdc-math/hypotf.c (100%) rename {sources => src}/libs/stdc-math/hypotl.c (100%) rename {sources => src}/libs/stdc-math/ilogb.c (100%) rename {sources => src}/libs/stdc-math/ilogbf.c (100%) rename {sources => src}/libs/stdc-math/ilogbl.c (100%) rename {sources => src}/libs/stdc-math/j0.c (100%) rename {sources => src}/libs/stdc-math/j0f.c (100%) rename {sources => src}/libs/stdc-math/j1.c (100%) rename {sources => src}/libs/stdc-math/j1f.c (100%) rename {sources => src}/libs/stdc-math/jn.c (100%) rename {sources => src}/libs/stdc-math/jnf.c (100%) rename {sources => src}/libs/stdc-math/ldexp.c (100%) rename {sources => src}/libs/stdc-math/ldexpf.c (100%) rename {sources => src}/libs/stdc-math/ldexpl.c (100%) rename {sources => src}/libs/stdc-math/lgamma.c (100%) rename {sources => src}/libs/stdc-math/lgamma_r.c (100%) rename {sources => src}/libs/stdc-math/lgammaf.c (100%) rename {sources => src}/libs/stdc-math/lgammaf_r.c (100%) rename {sources => src}/libs/stdc-math/lgammal.c (100%) rename {sources => src}/libs/stdc-math/libm.h (100%) rename {sources => src}/libs/stdc-math/llrint.c (100%) rename {sources => src}/libs/stdc-math/llrintf.c (100%) rename {sources => src}/libs/stdc-math/llrintl.c (100%) rename {sources => src}/libs/stdc-math/llround.c (100%) rename {sources => src}/libs/stdc-math/llroundf.c (100%) rename {sources => src}/libs/stdc-math/llroundl.c (100%) rename {sources => src}/libs/stdc-math/log.c (100%) rename {sources => src}/libs/stdc-math/log10.c (100%) rename {sources => src}/libs/stdc-math/log10f.c (100%) rename {sources => src}/libs/stdc-math/log10l.c (100%) rename {sources => src}/libs/stdc-math/log1p.c (100%) rename {sources => src}/libs/stdc-math/log1pf.c (100%) rename {sources => src}/libs/stdc-math/log1pl.c (100%) rename {sources => src}/libs/stdc-math/log2.c (100%) rename {sources => src}/libs/stdc-math/log2f.c (100%) rename {sources => src}/libs/stdc-math/log2l.c (100%) rename {sources => src}/libs/stdc-math/logb.c (100%) rename {sources => src}/libs/stdc-math/logbf.c (100%) rename {sources => src}/libs/stdc-math/logbl.c (100%) rename {sources => src}/libs/stdc-math/logf.c (100%) rename {sources => src}/libs/stdc-math/logl.c (100%) rename {sources => src}/libs/stdc-math/lrint.c (100%) rename {sources => src}/libs/stdc-math/lrintf.c (100%) rename {sources => src}/libs/stdc-math/lrintl.c (100%) rename {sources => src}/libs/stdc-math/lround.c (100%) rename {sources => src}/libs/stdc-math/lroundf.c (100%) rename {sources => src}/libs/stdc-math/lroundl.c (100%) rename {sources => src}/libs/stdc-math/math.h (100%) rename {sources => src}/libs/stdc-math/modf.c (100%) rename {sources => src}/libs/stdc-math/modff.c (100%) rename {sources => src}/libs/stdc-math/modfl.c (100%) rename {sources => src}/libs/stdc-math/nan.c (100%) rename {sources => src}/libs/stdc-math/nanf.c (100%) rename {sources => src}/libs/stdc-math/nanl.c (100%) rename {sources => src}/libs/stdc-math/nearbyint.c (100%) rename {sources => src}/libs/stdc-math/nearbyintf.c (100%) rename {sources => src}/libs/stdc-math/nearbyintl.c (100%) rename {sources => src}/libs/stdc-math/nextafter.c (100%) rename {sources => src}/libs/stdc-math/nextafterf.c (100%) rename {sources => src}/libs/stdc-math/nextafterl.c (100%) rename {sources => src}/libs/stdc-math/nexttoward.c (100%) rename {sources => src}/libs/stdc-math/nexttowardf.c (100%) rename {sources => src}/libs/stdc-math/nexttowardl.c (100%) rename {sources => src}/libs/stdc-math/pow.c (100%) rename {sources => src}/libs/stdc-math/powf.c (100%) rename {sources => src}/libs/stdc-math/powl.c (100%) rename {sources => src}/libs/stdc-math/remainder.c (100%) rename {sources => src}/libs/stdc-math/remainderf.c (100%) rename {sources => src}/libs/stdc-math/remainderl.c (100%) rename {sources => src}/libs/stdc-math/remquo.c (100%) rename {sources => src}/libs/stdc-math/remquof.c (100%) rename {sources => src}/libs/stdc-math/remquol.c (100%) rename {sources => src}/libs/stdc-math/rint.c (100%) rename {sources => src}/libs/stdc-math/rintf.c (100%) rename {sources => src}/libs/stdc-math/rintl.c (100%) rename {sources => src}/libs/stdc-math/round.c (100%) rename {sources => src}/libs/stdc-math/roundf.c (100%) rename {sources => src}/libs/stdc-math/roundl.c (100%) rename {sources => src}/libs/stdc-math/scalb.c (100%) rename {sources => src}/libs/stdc-math/scalbf.c (100%) rename {sources => src}/libs/stdc-math/scalbln.c (100%) rename {sources => src}/libs/stdc-math/scalblnf.c (100%) rename {sources => src}/libs/stdc-math/scalblnl.c (100%) rename {sources => src}/libs/stdc-math/scalbn.c (100%) rename {sources => src}/libs/stdc-math/scalbnf.c (100%) rename {sources => src}/libs/stdc-math/scalbnl.c (100%) rename {sources => src}/libs/stdc-math/signgam.c (100%) rename {sources => src}/libs/stdc-math/significand.c (100%) rename {sources => src}/libs/stdc-math/significandf.c (100%) rename {sources => src}/libs/stdc-math/sin.c (100%) rename {sources => src}/libs/stdc-math/sincos.c (100%) rename {sources => src}/libs/stdc-math/sincosf.c (100%) rename {sources => src}/libs/stdc-math/sincosl.c (100%) rename {sources => src}/libs/stdc-math/sinf.c (100%) rename {sources => src}/libs/stdc-math/sinh.c (100%) rename {sources => src}/libs/stdc-math/sinhf.c (100%) rename {sources => src}/libs/stdc-math/sinhl.c (100%) rename {sources => src}/libs/stdc-math/sinl.c (100%) rename {sources => src}/libs/stdc-math/sqrt.c (100%) rename {sources => src}/libs/stdc-math/sqrtf.c (100%) rename {sources => src}/libs/stdc-math/sqrtl.c (100%) rename {sources => src}/libs/stdc-math/tan.c (100%) rename {sources => src}/libs/stdc-math/tanf.c (100%) rename {sources => src}/libs/stdc-math/tanh.c (100%) rename {sources => src}/libs/stdc-math/tanhf.c (100%) rename {sources => src}/libs/stdc-math/tanhl.c (100%) rename {sources => src}/libs/stdc-math/tanl.c (100%) rename {sources => src}/libs/stdc-math/tgamma.c (100%) rename {sources => src}/libs/stdc-math/tgammaf.c (100%) rename {sources => src}/libs/stdc-math/tgammal.c (100%) rename {sources => src}/libs/stdc-math/trunc.c (100%) rename {sources => src}/libs/stdc-math/truncf.c (100%) rename {sources => src}/libs/stdc-math/truncl.c (100%) rename {sources => src}/libs/stdc-posix/errno.h (100%) rename {sources => src}/libs/stdc-posix/locale.h (100%) rename {sources => src}/libs/stdc-posix/locale/local_t.h (100%) rename {sources => src}/libs/stdc-posix/string.h (100%) rename {sources => src}/libs/ubsan/ubsan.c (100%) rename {sources => src}/loader/config.c (100%) rename {sources => src}/loader/config.h (100%) rename {sources => src}/loader/main.c (100%) rename {sources => src}/loader/memory.c (100%) rename {sources => src}/loader/memory.h (100%) rename {sources => src}/loader/protocol.c (100%) rename {sources => src}/loader/protocol.h (100%) rename {sources => src}/protos/.build.mk (100%) rename {sources => src}/protos/base.idl (100%) rename {sources => src}/protos/boot.idl (100%) rename {sources => src}/protos/event.idl (100%) rename {sources => src}/protos/hw.idl (100%) rename {sources => src}/protos/math.idl (100%) rename {sources => src}/protos/pci.idl (100%) rename {sources => src}/protos/system.idl (100%) rename {sources => src}/srvs/acpi/build.mk (100%) rename {sources => src}/srvs/acpi/main.c (100%) rename {sources => src}/srvs/acpi/manifest.json (100%) rename {sources => src}/srvs/ahci/build.mk (100%) rename {sources => src}/srvs/ahci/main.c (100%) rename {sources => src}/srvs/ahci/manifest.json (100%) rename {sources => src}/srvs/device/device.h (100%) rename {sources => src}/srvs/device/main.c (100%) rename {sources => src}/srvs/device/manifest.json (100%) rename {sources => src}/srvs/pci/build.mk (100%) rename {sources => src}/srvs/pci/main.c (100%) rename {sources => src}/srvs/pci/manifest.json (100%) rename {sources => src}/srvs/ps2/build.mk (100%) rename {sources => src}/srvs/ps2/main.c (100%) rename {sources => src}/srvs/ps2/manifest.json (100%) rename {sources => src}/srvs/ps2/ps2.h (100%) rename {sources => src}/srvs/storage/manifest.json (100%) rename {sources => src}/srvs/system/build.mk (100%) rename {sources => src}/srvs/system/bus.c (100%) rename {sources => src}/srvs/system/bus.h (100%) rename {sources => src}/srvs/system/main.c (100%) rename {sources => src}/srvs/system/manifest.json (100%) rename {sources => src}/srvs/system/unit.c (100%) rename {sources => src}/srvs/system/unit.h (100%) rename {sources => src}/utils/bvm/build.mk (100%) rename {sources => src}/utils/bvm/main.c (100%) rename {sources/utils/cc => src/utils/bvm}/manifest.json (100%) rename {sources => src}/utils/cc/build.mk (100%) rename {sources => src}/utils/cc/main.c (100%) rename {sources/utils/fstools => src/utils/cc}/manifest.json (100%) rename {sources => src}/utils/fstools/build.mk (100%) rename {sources => src}/utils/fstools/main.c (100%) rename {sources/utils/idl => src/utils/fstools}/manifest.json (100%) rename {sources => src}/utils/gunzip/build.mk (100%) rename {sources => src}/utils/gunzip/main.c (100%) rename {sources => src}/utils/gunzip/manifest.json (100%) rename {sources => src}/utils/gzip/build.mk (100%) rename {sources => src}/utils/gzip/main.c (100%) rename {sources => src}/utils/gzip/manifest.json (100%) rename {sources => src}/utils/hello/build.mk (100%) rename {sources => src}/utils/hello/main.c (100%) rename {sources => src}/utils/idgen/build.mk (100%) rename {sources => src}/utils/idgen/main.c (100%) rename {sources => src}/utils/idl/build.mk (100%) rename {sources => src}/utils/idl/main.c (100%) rename {sources/utils/test => src/utils/idl}/manifest.json (100%) rename {sources => src}/utils/test/brutal/alloc/heap.c (100%) rename {sources => src}/utils/test/brutal/base/endian.c (100%) rename {sources => src}/utils/test/brutal/codec/deflate.c (100%) rename {sources => src}/utils/test/brutal/codec/gzip.c (100%) rename {sources => src}/utils/test/brutal/codec/inflate.c (100%) rename {sources => src}/utils/test/brutal/codec/zlib.c (100%) rename {sources => src}/utils/test/brutal/ds/map.c (100%) rename {sources => src}/utils/test/brutal/ds/range.c (100%) rename {sources => src}/utils/test/brutal/ds/slot.c (100%) rename {sources => src}/utils/test/brutal/ds/vec.c (100%) rename {sources => src}/utils/test/brutal/fmt/case.c (100%) rename {sources => src}/utils/test/brutal/fmt/format.c (100%) rename {sources => src}/utils/test/brutal/fmt/printf.c (100%) rename {sources => src}/utils/test/brutal/glob/glob.c (100%) rename {sources => src}/utils/test/brutal/io/bit_write.c (100%) rename {sources => src}/utils/test/brutal/tests/expect.c (100%) rename {sources => src}/utils/test/brutal/tests/test.c (100%) rename {sources => src}/utils/test/build.mk (100%) rename {sources => src}/utils/test/cc/cc.h (100%) rename {sources => src}/utils/test/cc/pproc.c (100%) rename {sources => src}/utils/test/json/json.c (100%) rename {sources => src}/utils/test/main.c (100%) create mode 100644 src/utils/test/manifest.json diff --git a/.gitignore b/.gitignore index 4695775bc..724fa5083 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ *.ko *.obj *.elf +.osdk/ # Linker output *.ilk diff --git a/compile_flags.txt b/compile_flags.txt index 12d93f4dc..3069d445f 100644 --- a/compile_flags.txt +++ b/compile_flags.txt @@ -1,5 +1,6 @@ -std=gnu2x -D__brutal__ +-DSYSTEM_BRUTAL -Wall -Wextra -Werror @@ -7,15 +8,15 @@ -Wignored-attributes -Wunknown-attributes -Wimplicit-fallthrough --Isources/ --Isources/apps --Isources/srvs --Isources/utils --Isources/libs --Isources/libs/hw --Isources/libs/stdc-ansi --Isources/libs/stdc-posix --Isources/libs/stdc-ext +-Isrc/ +-Isrc/apps +-Isrc/srvs +-Isrc/utils +-Isrc/libs +-Isrc/libs/hw +-Isrc/libs/stdc-ansi +-Isrc/libs/stdc-posix +-Isrc/libs/stdc-ext -Ibin/generated -Ibin/generated/headers -Ithirdparty diff --git a/meta/targets/brutal-x86_64.json b/meta/targets/brutal-x86_64.json new file mode 100644 index 000000000..7b0f7d6ed --- /dev/null +++ b/meta/targets/brutal-x86_64.json @@ -0,0 +1,81 @@ +{ + "id": "brutal-x86_64", + "type": "target", + "props": { + "toolchain": "clang", + "arch": "x86_64", + "bits": "64", + "sys": "munix", + "abi": "sysv", + "encoding": "utf8", + "freestanding": false, + "host": false + }, + "tools": { + "cc": { + "cmd": [ + "@latest", + "clang" + ], + "args": [ + "-target", + "x86_64-none-elf", + "-ffreestanding", + "-mno-80387", + "-mno-mmx", + "-mno-3dnow", + "-mno-sse", + "-mno-sse2" + ] + }, + "cxx": { + "cmd": [ + "@latest", + "clang++" + ], + "args": [ + "-target", + "x86_64-none-elf", + "-ffreestanding", + "-mno-80387", + "-mno-mmx", + "-mno-3dnow", + "-mno-sse", + "-mno-sse2" + ] + }, + "ld": { + "cmd": [ + "@latest", + "ld.lld" + ], + "args": [ + "-m", + "elf_x86_64", + "-Tmeta/targets/brutal-x86_64.ld", + "-z", + "max-page-size=0x1000" + ], + "files": [ + "meta/targets/brutal-x86_64.ld" + ] + }, + "ar": { + "cmd": [ + "@latest", + "llvm-ar" + ], + "args": [ + "rcs" + ] + }, + "as": { + "cmd": "clang", + "args": [ + "-target", + "x86_64-none-elf", + "-c" + ] + } + } +} \ No newline at end of file diff --git a/sources/build/target/x86_64-link.ld b/meta/targets/brutal-x86_64.ld similarity index 100% rename from sources/build/target/x86_64-link.ld rename to meta/targets/brutal-x86_64.ld diff --git a/meta/targets/kernel-x86_64.json b/meta/targets/kernel-x86_64.json new file mode 100644 index 000000000..64877644e --- /dev/null +++ b/meta/targets/kernel-x86_64.json @@ -0,0 +1,87 @@ +{ + "id": "kernel-x86_64", + "type": "target", + "props": { + "toolchain": "clang", + "arch": "x86_64", + "bits": "64", + "sys": "munix", + "abi": "sysv", + "encoding": "utf8", + "freestanding": true, + "host": false + }, + "tools": { + "cc": { + "cmd": [ + "@latest", + "clang" + ], + "args": [ + "-target", + "x86_64-none-elf", + "-ffreestanding", + "-fno-stack-protector", + "-mno-80387", + "-mno-mmx", + "-mno-3dnow", + "-mno-sse", + "-mno-sse2", + "-mno-red-zone", + "-mcmodel=kernel" + ] + }, + "cxx": { + "cmd": [ + "@latest", + "clang++" + ], + "args": [ + "-target", + "x86_64-none-elf", + "-ffreestanding", + "-fno-stack-protector", + "-mno-80387", + "-mno-mmx", + "-mno-3dnow", + "-mno-sse", + "-mno-sse2", + "-mno-red-zone", + "-mcmodel=kernel" + ] + }, + "ld": { + "cmd": [ + "@latest", + "ld.lld" + ], + "args": [ + "-m", + "elf_x86_64", + "-Tmeta/targets/kernel-x86_64.ld", + "-z", + "max-page-size=0x1000" + ], + "files": [ + "meta/targets/kernel-x86_64.ld" + ] + }, + "ar": { + "cmd": [ + "@latest", + "llvm-ar" + ], + "args": [ + "rcs" + ] + }, + "as": { + "cmd": "clang", + "args": [ + "-target", + "x86_64-none-elf", + "-c" + ] + } + } +} \ No newline at end of file diff --git a/meta/targets/kernel-x86_64.ld b/meta/targets/kernel-x86_64.ld new file mode 100644 index 000000000..4250052eb --- /dev/null +++ b/meta/targets/kernel-x86_64.ld @@ -0,0 +1,67 @@ +/* Tell the linker that we want an x86_64 ELF64 output file */ +OUTPUT_FORMAT(elf64-x86-64) +OUTPUT_ARCH(i386:x86-64) + +/* We want the symbol _start to be our entry point */ +ENTRY(_start) + +/* Define the program headers we want so the bootloader gives us the right */ +/* MMU permissions */ +PHDRS +{ + text PT_LOAD FLAGS((1 << 0) | (1 << 2)) ; /* Execute + Read */ + rodata PT_LOAD FLAGS((1 << 2)) ; /* Read only */ + data PT_LOAD FLAGS((1 << 1) | (1 << 2)) ; /* Write + Read */ +} + +SECTIONS +{ + /* We wanna be placed in the topmost 2GiB of the address space, for optimisations */ + /* and because that is what the Limine spec mandates. */ + /* Any address in this region will do, but often 0xffffffff80000000 is chosen as */ + /* that is the beginning of the region. */ + . = 0xffffffff80000000; + + text_start_addr = .; + + .text : { + *(.text .text.*) + } :text + + text_end_addr = .; + + /* Move to the next memory page for .rodata */ + . += CONSTANT(MAXPAGESIZE); + + rodata_start_addr = .; + + PROVIDE(symbol_table = 1); + + .rodata : { + *(.rodata .rodata.*) + } :rodata + + rodata_end_addr = .; + + /* Move to the next memory page for .data */ + . += CONSTANT(MAXPAGESIZE); + + data_start_addr = .; + + .data : { + *(.data .data.*) + } :data + + .bss : { + *(COMMON) + *(.bss .bss.*) + } :data + + data_end_addr = .; + + /* Discard .note.* and .eh_frame since they may cause issues on some hosts. */ + /DISCARD/ : { + *(.eh_frame) + *(.note .note.*) + } +} \ No newline at end of file diff --git a/sources/build/boards/riscv64-qemu/build.mk b/src/build/boards/riscv64-qemu/build.mk similarity index 100% rename from sources/build/boards/riscv64-qemu/build.mk rename to src/build/boards/riscv64-qemu/build.mk diff --git a/sources/build/boards/riscv64-qemu/link.ld b/src/build/boards/riscv64-qemu/link.ld similarity index 100% rename from sources/build/boards/riscv64-qemu/link.ld rename to src/build/boards/riscv64-qemu/link.ld diff --git a/sources/build/boards/riscv64-unleashed/build.mk b/src/build/boards/riscv64-unleashed/build.mk similarity index 100% rename from sources/build/boards/riscv64-unleashed/build.mk rename to src/build/boards/riscv64-unleashed/build.mk diff --git a/sources/build/boards/riscv64-unleashed/link.ld b/src/build/boards/riscv64-unleashed/link.ld similarity index 100% rename from sources/build/boards/riscv64-unleashed/link.ld rename to src/build/boards/riscv64-unleashed/link.ld diff --git a/sources/build/boards/x86_64-pc/build.mk b/src/build/boards/x86_64-pc/build.mk similarity index 100% rename from sources/build/boards/x86_64-pc/build.mk rename to src/build/boards/x86_64-pc/build.mk diff --git a/sources/build/boards/x86_64-pc/link.ld b/src/build/boards/x86_64-pc/link.ld similarity index 100% rename from sources/build/boards/x86_64-pc/link.ld rename to src/build/boards/x86_64-pc/link.ld diff --git a/sources/build/configs/debug.mk b/src/build/configs/debug.mk similarity index 100% rename from sources/build/configs/debug.mk rename to src/build/configs/debug.mk diff --git a/sources/build/configs/devel.mk b/src/build/configs/devel.mk similarity index 100% rename from sources/build/configs/devel.mk rename to src/build/configs/devel.mk diff --git a/sources/build/configs/fast.mk b/src/build/configs/fast.mk similarity index 100% rename from sources/build/configs/fast.mk rename to src/build/configs/fast.mk diff --git a/sources/build/configs/san.mk b/src/build/configs/san.mk similarity index 100% rename from sources/build/configs/san.mk rename to src/build/configs/san.mk diff --git a/sources/build/host/build.mk b/src/build/host/build.mk similarity index 100% rename from sources/build/host/build.mk rename to src/build/host/build.mk diff --git a/sources/build/kernel/build.mk b/src/build/kernel/build.mk similarity index 100% rename from sources/build/kernel/build.mk rename to src/build/kernel/build.mk diff --git a/sources/build/loader/loader.mk b/src/build/loader/loader.mk similarity index 100% rename from sources/build/loader/loader.mk rename to src/build/loader/loader.mk diff --git a/sources/build/scripts/dump.sh b/src/build/scripts/dump.sh similarity index 100% rename from sources/build/scripts/dump.sh rename to src/build/scripts/dump.sh diff --git a/sources/build/scripts/env-darwin.sh b/src/build/scripts/env-darwin.sh similarity index 100% rename from sources/build/scripts/env-darwin.sh rename to src/build/scripts/env-darwin.sh diff --git a/sources/build/scripts/fix-kvm-debian-wsl.sh b/src/build/scripts/fix-kvm-debian-wsl.sh similarity index 100% rename from sources/build/scripts/fix-kvm-debian-wsl.sh rename to src/build/scripts/fix-kvm-debian-wsl.sh diff --git a/sources/build/scripts/header-builder.py b/src/build/scripts/header-builder.py similarity index 100% rename from sources/build/scripts/header-builder.py rename to src/build/scripts/header-builder.py diff --git a/sources/build/scripts/manifest-builder.py b/src/build/scripts/manifest-builder.py similarity index 100% rename from sources/build/scripts/manifest-builder.py rename to src/build/scripts/manifest-builder.py diff --git a/sources/build/scripts/setup-darwin.sh b/src/build/scripts/setup-darwin.sh similarity index 100% rename from sources/build/scripts/setup-darwin.sh rename to src/build/scripts/setup-darwin.sh diff --git a/sources/build/scripts/setup-ubuntu.sh b/src/build/scripts/setup-ubuntu.sh similarity index 100% rename from sources/build/scripts/setup-ubuntu.sh rename to src/build/scripts/setup-ubuntu.sh diff --git a/sources/build/target/build.mk b/src/build/target/build.mk similarity index 100% rename from sources/build/target/build.mk rename to src/build/target/build.mk diff --git a/sources/build/target/riscv64-link.ld b/src/build/target/riscv64-link.ld similarity index 100% rename from sources/build/target/riscv64-link.ld rename to src/build/target/riscv64-link.ld diff --git a/src/build/target/x86_64-link.ld b/src/build/target/x86_64-link.ld new file mode 100644 index 000000000..b2d06b328 --- /dev/null +++ b/src/build/target/x86_64-link.ld @@ -0,0 +1,27 @@ +ENTRY(_start) + +SECTIONS +{ + . = 4M; + + .text : ALIGN(4K) + { + *(.text) + } + + .rodata : ALIGN(4K) + { + *(.rodata) + } + + .data : ALIGN(4K) + { + *(.data) + } + + .bss : ALIGN(4K) + { + *(COMMON) + *(.bss) + } +} \ No newline at end of file diff --git a/sources/kernel/arch.h b/src/kernel/arch.h similarity index 93% rename from sources/kernel/arch.h rename to src/kernel/arch.h index e86e1abdb..f3a22f54e 100644 --- a/sources/kernel/arch.h +++ b/src/kernel/arch.h @@ -2,7 +2,7 @@ #include #include -#include +#include #include "kernel/tasking.h" diff --git a/sources/kernel/channel.c b/src/kernel/channel.c similarity index 97% rename from sources/kernel/channel.c rename to src/kernel/channel.c index 3ef267e90..81512e20c 100644 --- a/sources/kernel/channel.c +++ b/src/kernel/channel.c @@ -1,6 +1,7 @@ #include "kernel/channel.h" -#include -#include +#include +#include +#include #include "kernel/kernel.h" #include "kernel/sched.h" diff --git a/sources/kernel/channel.h b/src/kernel/channel.h similarity index 93% rename from sources/kernel/channel.h rename to src/kernel/channel.h index 07feb5638..11e8cb806 100644 --- a/sources/kernel/channel.h +++ b/src/kernel/channel.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include "kernel/parcel.h" typedef struct diff --git a/sources/kernel/context.h b/src/kernel/context.h similarity index 100% rename from sources/kernel/context.h rename to src/kernel/context.h diff --git a/sources/kernel/cpu.c b/src/kernel/cpu.c similarity index 100% rename from sources/kernel/cpu.c rename to src/kernel/cpu.c diff --git a/sources/kernel/cpu.h b/src/kernel/cpu.h similarity index 100% rename from sources/kernel/cpu.h rename to src/kernel/cpu.h diff --git a/sources/kernel/domain.c b/src/kernel/domain.c similarity index 100% rename from sources/kernel/domain.c rename to src/kernel/domain.c diff --git a/sources/kernel/domain.h b/src/kernel/domain.h similarity index 100% rename from sources/kernel/domain.h rename to src/kernel/domain.h diff --git a/sources/kernel/event.c b/src/kernel/event.c similarity index 100% rename from sources/kernel/event.c rename to src/kernel/event.c diff --git a/sources/kernel/event.h b/src/kernel/event.h similarity index 100% rename from sources/kernel/event.h rename to src/kernel/event.h diff --git a/sources/kernel/heap.h b/src/kernel/heap.h similarity index 100% rename from sources/kernel/heap.h rename to src/kernel/heap.h diff --git a/sources/kernel/init.c b/src/kernel/init.c similarity index 100% rename from sources/kernel/init.c rename to src/kernel/init.c diff --git a/sources/kernel/init.h b/src/kernel/init.h similarity index 100% rename from sources/kernel/init.h rename to src/kernel/init.h diff --git a/sources/kernel/kernel.c b/src/kernel/kernel.c similarity index 100% rename from sources/kernel/kernel.c rename to src/kernel/kernel.c diff --git a/sources/kernel/kernel.h b/src/kernel/kernel.h similarity index 100% rename from sources/kernel/kernel.h rename to src/kernel/kernel.h diff --git a/sources/kernel/memory.c b/src/kernel/memory.c similarity index 100% rename from sources/kernel/memory.c rename to src/kernel/memory.c diff --git a/sources/kernel/memory.h b/src/kernel/memory.h similarity index 100% rename from sources/kernel/memory.h rename to src/kernel/memory.h diff --git a/sources/kernel/mmap.h b/src/kernel/mmap.h similarity index 100% rename from sources/kernel/mmap.h rename to src/kernel/mmap.h diff --git a/sources/kernel/object.c b/src/kernel/object.c similarity index 100% rename from sources/kernel/object.c rename to src/kernel/object.c diff --git a/sources/kernel/object.h b/src/kernel/object.h similarity index 100% rename from sources/kernel/object.h rename to src/kernel/object.h diff --git a/sources/kernel/parcel.c b/src/kernel/parcel.c similarity index 100% rename from sources/kernel/parcel.c rename to src/kernel/parcel.c diff --git a/sources/kernel/parcel.h b/src/kernel/parcel.h similarity index 100% rename from sources/kernel/parcel.h rename to src/kernel/parcel.h diff --git a/sources/kernel/pmm.c b/src/kernel/pmm.c similarity index 100% rename from sources/kernel/pmm.c rename to src/kernel/pmm.c diff --git a/sources/kernel/pmm.h b/src/kernel/pmm.h similarity index 100% rename from sources/kernel/pmm.h rename to src/kernel/pmm.h diff --git a/sources/kernel/riscv64/arch.c b/src/kernel/riscv64/arch.c similarity index 100% rename from sources/kernel/riscv64/arch.c rename to src/kernel/riscv64/arch.c diff --git a/sources/kernel/riscv64/arch.h b/src/kernel/riscv64/arch.h similarity index 100% rename from sources/kernel/riscv64/arch.h rename to src/kernel/riscv64/arch.h diff --git a/sources/kernel/riscv64/arch_boot.s b/src/kernel/riscv64/arch_boot.s similarity index 100% rename from sources/kernel/riscv64/arch_boot.s rename to src/kernel/riscv64/arch_boot.s diff --git a/sources/kernel/riscv64/asm.h b/src/kernel/riscv64/asm.h similarity index 100% rename from sources/kernel/riscv64/asm.h rename to src/kernel/riscv64/asm.h diff --git a/sources/kernel/riscv64/boot.c b/src/kernel/riscv64/boot.c similarity index 100% rename from sources/kernel/riscv64/boot.c rename to src/kernel/riscv64/boot.c diff --git a/sources/kernel/riscv64/context.c b/src/kernel/riscv64/context.c similarity index 100% rename from sources/kernel/riscv64/context.c rename to src/kernel/riscv64/context.c diff --git a/sources/kernel/riscv64/context.h b/src/kernel/riscv64/context.h similarity index 100% rename from sources/kernel/riscv64/context.h rename to src/kernel/riscv64/context.h diff --git a/sources/kernel/riscv64/cpu.c b/src/kernel/riscv64/cpu.c similarity index 100% rename from sources/kernel/riscv64/cpu.c rename to src/kernel/riscv64/cpu.c diff --git a/sources/kernel/riscv64/cpu.h b/src/kernel/riscv64/cpu.h similarity index 100% rename from sources/kernel/riscv64/cpu.h rename to src/kernel/riscv64/cpu.h diff --git a/sources/kernel/riscv64/heap.c b/src/kernel/riscv64/heap.c similarity index 100% rename from sources/kernel/riscv64/heap.c rename to src/kernel/riscv64/heap.c diff --git a/sources/kernel/riscv64/interrupts.c b/src/kernel/riscv64/interrupts.c similarity index 100% rename from sources/kernel/riscv64/interrupts.c rename to src/kernel/riscv64/interrupts.c diff --git a/sources/kernel/riscv64/interrupts.h b/src/kernel/riscv64/interrupts.h similarity index 100% rename from sources/kernel/riscv64/interrupts.h rename to src/kernel/riscv64/interrupts.h diff --git a/sources/kernel/riscv64/interrupts.s b/src/kernel/riscv64/interrupts.s similarity index 100% rename from sources/kernel/riscv64/interrupts.s rename to src/kernel/riscv64/interrupts.s diff --git a/sources/kernel/riscv64/paging.h b/src/kernel/riscv64/paging.h similarity index 100% rename from sources/kernel/riscv64/paging.h rename to src/kernel/riscv64/paging.h diff --git a/sources/kernel/riscv64/sifive_uart.c b/src/kernel/riscv64/sifive_uart.c similarity index 100% rename from sources/kernel/riscv64/sifive_uart.c rename to src/kernel/riscv64/sifive_uart.c diff --git a/sources/kernel/riscv64/sifive_uart.h b/src/kernel/riscv64/sifive_uart.h similarity index 100% rename from sources/kernel/riscv64/sifive_uart.h rename to src/kernel/riscv64/sifive_uart.h diff --git a/sources/kernel/riscv64/uart8250.c b/src/kernel/riscv64/uart8250.c similarity index 100% rename from sources/kernel/riscv64/uart8250.c rename to src/kernel/riscv64/uart8250.c diff --git a/sources/kernel/riscv64/uart8250.h b/src/kernel/riscv64/uart8250.h similarity index 100% rename from sources/kernel/riscv64/uart8250.h rename to src/kernel/riscv64/uart8250.h diff --git a/sources/kernel/riscv64/unleashed/gpio.h b/src/kernel/riscv64/unleashed/gpio.h similarity index 100% rename from sources/kernel/riscv64/unleashed/gpio.h rename to src/kernel/riscv64/unleashed/gpio.h diff --git a/sources/kernel/riscv64/vmm.c b/src/kernel/riscv64/vmm.c similarity index 100% rename from sources/kernel/riscv64/vmm.c rename to src/kernel/riscv64/vmm.c diff --git a/sources/kernel/sched.c b/src/kernel/sched.c similarity index 100% rename from sources/kernel/sched.c rename to src/kernel/sched.c diff --git a/sources/kernel/sched.h b/src/kernel/sched.h similarity index 100% rename from sources/kernel/sched.h rename to src/kernel/sched.h diff --git a/sources/kernel/space.c b/src/kernel/space.c similarity index 100% rename from sources/kernel/space.c rename to src/kernel/space.c diff --git a/sources/kernel/space.h b/src/kernel/space.h similarity index 100% rename from sources/kernel/space.h rename to src/kernel/space.h diff --git a/sources/kernel/syscalls.c b/src/kernel/syscalls.c similarity index 100% rename from sources/kernel/syscalls.c rename to src/kernel/syscalls.c diff --git a/sources/kernel/syscalls.h b/src/kernel/syscalls.h similarity index 100% rename from sources/kernel/syscalls.h rename to src/kernel/syscalls.h diff --git a/sources/kernel/task.c b/src/kernel/task.c similarity index 100% rename from sources/kernel/task.c rename to src/kernel/task.c diff --git a/sources/kernel/task.h b/src/kernel/task.h similarity index 100% rename from sources/kernel/task.h rename to src/kernel/task.h diff --git a/sources/kernel/tasking.c b/src/kernel/tasking.c similarity index 100% rename from sources/kernel/tasking.c rename to src/kernel/tasking.c diff --git a/sources/kernel/tasking.h b/src/kernel/tasking.h similarity index 100% rename from sources/kernel/tasking.h rename to src/kernel/tasking.h diff --git a/sources/kernel/vmm.h b/src/kernel/vmm.h similarity index 100% rename from sources/kernel/vmm.h rename to src/kernel/vmm.h diff --git a/sources/kernel/x86_64/apic.c b/src/kernel/x86_64/apic.c similarity index 100% rename from sources/kernel/x86_64/apic.c rename to src/kernel/x86_64/apic.c diff --git a/sources/kernel/x86_64/apic.h b/src/kernel/x86_64/apic.h similarity index 100% rename from sources/kernel/x86_64/apic.h rename to src/kernel/x86_64/apic.h diff --git a/sources/kernel/x86_64/arch.c b/src/kernel/x86_64/arch.c similarity index 100% rename from sources/kernel/x86_64/arch.c rename to src/kernel/x86_64/arch.c diff --git a/sources/kernel/x86_64/asm.h b/src/kernel/x86_64/asm.h similarity index 100% rename from sources/kernel/x86_64/asm.h rename to src/kernel/x86_64/asm.h diff --git a/sources/kernel/x86_64/boot.c b/src/kernel/x86_64/boot.c similarity index 100% rename from sources/kernel/x86_64/boot.c rename to src/kernel/x86_64/boot.c diff --git a/sources/kernel/x86_64/boot.s b/src/kernel/x86_64/boot.s similarity index 100% rename from sources/kernel/x86_64/boot.s rename to src/kernel/x86_64/boot.s diff --git a/sources/kernel/x86_64/cmos.c b/src/kernel/x86_64/cmos.c similarity index 100% rename from sources/kernel/x86_64/cmos.c rename to src/kernel/x86_64/cmos.c diff --git a/sources/kernel/x86_64/cmos.h b/src/kernel/x86_64/cmos.h similarity index 100% rename from sources/kernel/x86_64/cmos.h rename to src/kernel/x86_64/cmos.h diff --git a/sources/kernel/x86_64/com.c b/src/kernel/x86_64/com.c similarity index 100% rename from sources/kernel/x86_64/com.c rename to src/kernel/x86_64/com.c diff --git a/sources/kernel/x86_64/com.h b/src/kernel/x86_64/com.h similarity index 100% rename from sources/kernel/x86_64/com.h rename to src/kernel/x86_64/com.h diff --git a/sources/kernel/x86_64/context.c b/src/kernel/x86_64/context.c similarity index 100% rename from sources/kernel/x86_64/context.c rename to src/kernel/x86_64/context.c diff --git a/sources/kernel/x86_64/context.h b/src/kernel/x86_64/context.h similarity index 100% rename from sources/kernel/x86_64/context.h rename to src/kernel/x86_64/context.h diff --git a/sources/kernel/x86_64/cpu.c b/src/kernel/x86_64/cpu.c similarity index 100% rename from sources/kernel/x86_64/cpu.c rename to src/kernel/x86_64/cpu.c diff --git a/sources/kernel/x86_64/cpu.h b/src/kernel/x86_64/cpu.h similarity index 100% rename from sources/kernel/x86_64/cpu.h rename to src/kernel/x86_64/cpu.h diff --git a/sources/kernel/x86_64/cpuid.c b/src/kernel/x86_64/cpuid.c similarity index 100% rename from sources/kernel/x86_64/cpuid.c rename to src/kernel/x86_64/cpuid.c diff --git a/sources/kernel/x86_64/cpuid.h b/src/kernel/x86_64/cpuid.h similarity index 100% rename from sources/kernel/x86_64/cpuid.h rename to src/kernel/x86_64/cpuid.h diff --git a/sources/kernel/x86_64/gdt.c b/src/kernel/x86_64/gdt.c similarity index 100% rename from sources/kernel/x86_64/gdt.c rename to src/kernel/x86_64/gdt.c diff --git a/sources/kernel/x86_64/gdt.h b/src/kernel/x86_64/gdt.h similarity index 100% rename from sources/kernel/x86_64/gdt.h rename to src/kernel/x86_64/gdt.h diff --git a/sources/kernel/x86_64/gdt.s b/src/kernel/x86_64/gdt.s similarity index 100% rename from sources/kernel/x86_64/gdt.s rename to src/kernel/x86_64/gdt.s diff --git a/sources/kernel/x86_64/heap.c b/src/kernel/x86_64/heap.c similarity index 100% rename from sources/kernel/x86_64/heap.c rename to src/kernel/x86_64/heap.c diff --git a/sources/kernel/x86_64/hpet.c b/src/kernel/x86_64/hpet.c similarity index 100% rename from sources/kernel/x86_64/hpet.c rename to src/kernel/x86_64/hpet.c diff --git a/sources/kernel/x86_64/hpet.h b/src/kernel/x86_64/hpet.h similarity index 100% rename from sources/kernel/x86_64/hpet.h rename to src/kernel/x86_64/hpet.h diff --git a/sources/kernel/x86_64/idt.c b/src/kernel/x86_64/idt.c similarity index 100% rename from sources/kernel/x86_64/idt.c rename to src/kernel/x86_64/idt.c diff --git a/sources/kernel/x86_64/idt.h b/src/kernel/x86_64/idt.h similarity index 100% rename from sources/kernel/x86_64/idt.h rename to src/kernel/x86_64/idt.h diff --git a/sources/kernel/x86_64/idt.s b/src/kernel/x86_64/idt.s similarity index 100% rename from sources/kernel/x86_64/idt.s rename to src/kernel/x86_64/idt.s diff --git a/sources/kernel/x86_64/interrupts.c b/src/kernel/x86_64/interrupts.c similarity index 100% rename from sources/kernel/x86_64/interrupts.c rename to src/kernel/x86_64/interrupts.c diff --git a/sources/kernel/x86_64/interrupts.h b/src/kernel/x86_64/interrupts.h similarity index 100% rename from sources/kernel/x86_64/interrupts.h rename to src/kernel/x86_64/interrupts.h diff --git a/sources/kernel/x86_64/interrupts.s b/src/kernel/x86_64/interrupts.s similarity index 100% rename from sources/kernel/x86_64/interrupts.s rename to src/kernel/x86_64/interrupts.s diff --git a/sources/kernel/x86_64/paging.h b/src/kernel/x86_64/paging.h similarity index 100% rename from sources/kernel/x86_64/paging.h rename to src/kernel/x86_64/paging.h diff --git a/sources/kernel/x86_64/pic.c b/src/kernel/x86_64/pic.c similarity index 100% rename from sources/kernel/x86_64/pic.c rename to src/kernel/x86_64/pic.c diff --git a/sources/kernel/x86_64/pic.h b/src/kernel/x86_64/pic.h similarity index 100% rename from sources/kernel/x86_64/pic.h rename to src/kernel/x86_64/pic.h diff --git a/sources/kernel/x86_64/simd.c b/src/kernel/x86_64/simd.c similarity index 100% rename from sources/kernel/x86_64/simd.c rename to src/kernel/x86_64/simd.c diff --git a/sources/kernel/x86_64/simd.h b/src/kernel/x86_64/simd.h similarity index 100% rename from sources/kernel/x86_64/simd.h rename to src/kernel/x86_64/simd.h diff --git a/sources/kernel/x86_64/smp.c b/src/kernel/x86_64/smp.c similarity index 100% rename from sources/kernel/x86_64/smp.c rename to src/kernel/x86_64/smp.c diff --git a/sources/kernel/x86_64/smp.h b/src/kernel/x86_64/smp.h similarity index 100% rename from sources/kernel/x86_64/smp.h rename to src/kernel/x86_64/smp.h diff --git a/sources/kernel/x86_64/smp.s b/src/kernel/x86_64/smp.s similarity index 100% rename from sources/kernel/x86_64/smp.s rename to src/kernel/x86_64/smp.s diff --git a/sources/kernel/x86_64/syscall.c b/src/kernel/x86_64/syscall.c similarity index 100% rename from sources/kernel/x86_64/syscall.c rename to src/kernel/x86_64/syscall.c diff --git a/sources/kernel/x86_64/syscall.h b/src/kernel/x86_64/syscall.h similarity index 100% rename from sources/kernel/x86_64/syscall.h rename to src/kernel/x86_64/syscall.h diff --git a/sources/kernel/x86_64/syscall.s b/src/kernel/x86_64/syscall.s similarity index 100% rename from sources/kernel/x86_64/syscall.s rename to src/kernel/x86_64/syscall.s diff --git a/sources/kernel/x86_64/vmm.c b/src/kernel/x86_64/vmm.c similarity index 100% rename from sources/kernel/x86_64/vmm.c rename to src/kernel/x86_64/vmm.c diff --git a/sources/libs/.build.mk b/src/libs/.build.mk similarity index 100% rename from sources/libs/.build.mk rename to src/libs/.build.mk diff --git a/sources/libs/asan/asan.c b/src/libs/asan/asan.c similarity index 99% rename from sources/libs/asan/asan.c rename to src/libs/asan/asan.c index 696a0ccd4..da185c9c4 100644 --- a/sources/libs/asan/asan.c +++ b/src/libs/asan/asan.c @@ -1,3 +1,5 @@ +#include + void asan_shadow_check_load(unsigned long address, size_t size, void *return_address) { (void)address; diff --git a/src/libs/asan/manifest.json b/src/libs/asan/manifest.json new file mode 100644 index 000000000..c4c3124a7 --- /dev/null +++ b/src/libs/asan/manifest.json @@ -0,0 +1,7 @@ +{ + "id": "asan", + "type": "lib", + "description": "Address sanitization library", + "requires": [ + ] +} \ No newline at end of file diff --git a/sources/libs/bal/abi.h b/src/libs/bal/abi.h similarity index 100% rename from sources/libs/bal/abi.h rename to src/libs/bal/abi.h diff --git a/sources/libs/bal/abi/helpers.c b/src/libs/bal/abi/helpers.c similarity index 100% rename from sources/libs/bal/abi/helpers.c rename to src/libs/bal/abi/helpers.c diff --git a/sources/libs/bal/abi/helpers.h b/src/libs/bal/abi/helpers.h similarity index 89% rename from sources/libs/bal/abi/helpers.h rename to src/libs/bal/abi/helpers.h index c811f024d..8f39e4231 100644 --- a/sources/libs/bal/abi/helpers.h +++ b/src/libs/bal/abi/helpers.h @@ -1,6 +1,7 @@ #pragma once #include +#include char const *br_syscall_to_string(BrSyscall syscall); diff --git a/sources/libs/bal/abi/syscalls.c b/src/libs/bal/abi/syscalls.c similarity index 100% rename from sources/libs/bal/abi/syscalls.c rename to src/libs/bal/abi/syscalls.c diff --git a/sources/libs/bal/abi/syscalls.h b/src/libs/bal/abi/syscalls.h similarity index 100% rename from sources/libs/bal/abi/syscalls.h rename to src/libs/bal/abi/syscalls.h diff --git a/sources/libs/bal/abi/types.h b/src/libs/bal/abi/types.h similarity index 99% rename from sources/libs/bal/abi/types.h rename to src/libs/bal/abi/types.h index 191c52a1b..c646791f4 100644 --- a/sources/libs/bal/abi/types.h +++ b/src/libs/bal/abi/types.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include /* --- Syscalls IDs --------------------------------------------------------- */ diff --git a/sources/libs/bal/abi/wrappers.c b/src/libs/bal/abi/wrappers.c similarity index 97% rename from sources/libs/bal/abi/wrappers.c rename to src/libs/bal/abi/wrappers.c index 67ce6a09e..fd56cac01 100644 --- a/sources/libs/bal/abi/wrappers.c +++ b/src/libs/bal/abi/wrappers.c @@ -1,6 +1,5 @@ #include #include -#include BrResult bal_unmap(BrHandle space, void *base, size_t len) { diff --git a/sources/libs/bal/abi/wrappers.h b/src/libs/bal/abi/wrappers.h similarity index 100% rename from sources/libs/bal/abi/wrappers.h rename to src/libs/bal/abi/wrappers.h diff --git a/sources/libs/bal/boot.h b/src/libs/bal/boot.h similarity index 100% rename from sources/libs/bal/boot.h rename to src/libs/bal/boot.h diff --git a/sources/libs/bal/boot/handover.c b/src/libs/bal/boot/handover.c similarity index 97% rename from sources/libs/bal/boot/handover.c rename to src/libs/bal/boot/handover.c index a0ba49534..f362cae82 100644 --- a/sources/libs/bal/boot/handover.c +++ b/src/libs/bal/boot/handover.c @@ -1,6 +1,8 @@ +#include +#include +#include #include -#include -#include + HandoverModule const *handover_find_module(Handover const *handover, Str name) { diff --git a/sources/libs/bal/boot/handover.h b/src/libs/bal/boot/handover.h similarity index 96% rename from sources/libs/bal/boot/handover.h rename to src/libs/bal/boot/handover.h index f7dcd48de..18c5ef886 100644 --- a/sources/libs/bal/boot/handover.h +++ b/src/libs/bal/boot/handover.h @@ -1,6 +1,7 @@ #pragma once -#include +#include +#include // "handover" in ascii #define HANDOVER_TAG 0x68616e646f766572 diff --git a/sources/libs/bal/hw.h b/src/libs/bal/hw.h similarity index 100% rename from sources/libs/bal/hw.h rename to src/libs/bal/hw.h diff --git a/sources/libs/bal/hw/fb.c b/src/libs/bal/hw/fb.c similarity index 100% rename from sources/libs/bal/hw/fb.c rename to src/libs/bal/hw/fb.c diff --git a/sources/libs/bal/hw/fb.h b/src/libs/bal/hw/fb.h similarity index 100% rename from sources/libs/bal/hw/fb.h rename to src/libs/bal/hw/fb.h diff --git a/sources/libs/bal/hw/io.c b/src/libs/bal/hw/io.c similarity index 98% rename from sources/libs/bal/hw/io.c rename to src/libs/bal/hw/io.c index c114d318c..ccb09d74f 100644 --- a/sources/libs/bal/hw/io.c +++ b/src/libs/bal/hw/io.c @@ -1,7 +1,7 @@ #include #include -#include -#include +#include +#include BalIo bal_io_mem(BalMem *mem) { diff --git a/sources/libs/bal/hw/io.h b/src/libs/bal/hw/io.h similarity index 98% rename from sources/libs/bal/hw/io.h rename to src/libs/bal/hw/io.h index 6a23e7391..65eb64af1 100644 --- a/sources/libs/bal/hw/io.h +++ b/src/libs/bal/hw/io.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include typedef enum { diff --git a/sources/libs/bal/hw/mem.c b/src/libs/bal/hw/mem.c similarity index 97% rename from sources/libs/bal/hw/mem.c rename to src/libs/bal/hw/mem.c index ca254eced..04afbce1b 100644 --- a/sources/libs/bal/hw/mem.c +++ b/src/libs/bal/hw/mem.c @@ -1,6 +1,6 @@ #include -#include -#include +#include +#include MaybeError bal_mem_init_mobj(BalMem *self, BrHandle handle) { diff --git a/sources/libs/bal/hw/mem.h b/src/libs/bal/hw/mem.h similarity index 97% rename from sources/libs/bal/hw/mem.h rename to src/libs/bal/hw/mem.h index 09871ba70..f801d01ec 100644 --- a/sources/libs/bal/hw/mem.h +++ b/src/libs/bal/hw/mem.h @@ -3,8 +3,8 @@ #include #include #include -#include -#include +#include + typedef struct { diff --git a/src/libs/bal/manifest.json b/src/libs/bal/manifest.json new file mode 100644 index 000000000..2df829208 --- /dev/null +++ b/src/libs/bal/manifest.json @@ -0,0 +1,11 @@ +{ + "id": "bal", + "type": "lib", + "description": "Brutal kernel abstraction layer", + "requires": [ + "ipc", + "brutal-debug", + "brutal-mem", + "elf" + ] +} \ No newline at end of file diff --git a/sources/libs/bal/task.h b/src/libs/bal/task.h similarity index 100% rename from sources/libs/bal/task.h rename to src/libs/bal/task.h diff --git a/sources/libs/bal/task/exec.c b/src/libs/bal/task/exec.c similarity index 97% rename from sources/libs/bal/task/exec.c rename to src/libs/bal/task/exec.c index ef543a826..66ba88c2e 100644 --- a/sources/libs/bal/task/exec.c +++ b/src/libs/bal/task/exec.c @@ -1,6 +1,12 @@ #include #include -#include + +#include +#include + +#include +#include + #include static void bal_exec_load(BrHandle space, Elf64Header const *elf_header, BrHandle elf_memory) diff --git a/sources/libs/bal/task/task.c b/src/libs/bal/task/task.c similarity index 100% rename from sources/libs/bal/task/task.c rename to src/libs/bal/task/task.c diff --git a/sources/libs/bal/task/task.h b/src/libs/bal/task/task.h similarity index 100% rename from sources/libs/bal/task/task.h rename to src/libs/bal/task/task.h diff --git a/sources/libs/brutal-alloc/base.c b/src/libs/brutal-alloc/base.c similarity index 92% rename from sources/libs/brutal-alloc/base.c rename to src/libs/brutal-alloc/base.c index 6d0c5b6de..8f448a337 100644 --- a/sources/libs/brutal-alloc/base.c +++ b/src/libs/brutal-alloc/base.c @@ -1,5 +1,7 @@ #include "base.h" +#include + void *alloc_malloc(Alloc *self, size_t size) { void *ptr = alloc_acquire(self, size); diff --git a/sources/libs/brutal-alloc/base.h b/src/libs/brutal-alloc/base.h similarity index 95% rename from sources/libs/brutal-alloc/base.h rename to src/libs/brutal-alloc/base.h index ccf66a0e2..01ba13448 100644 --- a/sources/libs/brutal-alloc/base.h +++ b/src/libs/brutal-alloc/base.h @@ -1,7 +1,8 @@ #pragma once -#include -#include +#include +#include +#include typedef struct _Alloc Alloc; diff --git a/sources/libs/brutal-alloc/global.c b/src/libs/brutal-alloc/global.c similarity index 93% rename from sources/libs/brutal-alloc/global.c rename to src/libs/brutal-alloc/global.c index 0e1d6297b..f8b7f31fb 100644 --- a/sources/libs/brutal-alloc/global.c +++ b/src/libs/brutal-alloc/global.c @@ -1,5 +1,7 @@ #include +#include +#include "global.h" #include "heap.h" void *alloc_global_acquire(MAYBE_UNUSED Alloc *alloc, size_t size) diff --git a/sources/libs/brutal-alloc/global.h b/src/libs/brutal-alloc/global.h similarity index 100% rename from sources/libs/brutal-alloc/global.h rename to src/libs/brutal-alloc/global.h diff --git a/sources/libs/brutal-alloc/heap.c b/src/libs/brutal-alloc/heap.c similarity index 98% rename from sources/libs/brutal-alloc/heap.c rename to src/libs/brutal-alloc/heap.c index d7b804b68..000870820 100644 --- a/sources/libs/brutal-alloc/heap.c +++ b/src/libs/brutal-alloc/heap.c @@ -1,4 +1,7 @@ -#include +#include +#include +#include +#include #include #include "heap.h" diff --git a/sources/libs/brutal-alloc/heap.h b/src/libs/brutal-alloc/heap.h similarity index 100% rename from sources/libs/brutal-alloc/heap.h rename to src/libs/brutal-alloc/heap.h diff --git a/src/libs/brutal-alloc/manifest.json b/src/libs/brutal-alloc/manifest.json new file mode 100644 index 000000000..ba6d950d9 --- /dev/null +++ b/src/libs/brutal-alloc/manifest.json @@ -0,0 +1,11 @@ +{ + "id": "brutal-alloc", + "type": "lib", + "description": "Brutal memory allocation", + "requires": [ + "embed", + "brutal-debug", + "brutal-base", + "brutal-mem" + ] +} \ No newline at end of file diff --git a/sources/libs/brutal-alloc/pool.c b/src/libs/brutal-alloc/pool.c similarity index 96% rename from sources/libs/brutal-alloc/pool.c rename to src/libs/brutal-alloc/pool.c index 6e1738cf6..a4697744d 100644 --- a/sources/libs/brutal-alloc/pool.c +++ b/src/libs/brutal-alloc/pool.c @@ -1,4 +1,3 @@ -#include #include "pool.h" diff --git a/sources/libs/brutal-alloc/pool.h b/src/libs/brutal-alloc/pool.h similarity index 100% rename from sources/libs/brutal-alloc/pool.h rename to src/libs/brutal-alloc/pool.h diff --git a/sources/libs/brutal-base/any.h b/src/libs/brutal-base/any.h similarity index 100% rename from sources/libs/brutal-base/any.h rename to src/libs/brutal-base/any.h diff --git a/sources/libs/brutal-base/attributes.h b/src/libs/brutal-base/attributes.h similarity index 100% rename from sources/libs/brutal-base/attributes.h rename to src/libs/brutal-base/attributes.h diff --git a/sources/libs/brutal-base/banned.h b/src/libs/brutal-base/banned.h similarity index 100% rename from sources/libs/brutal-base/banned.h rename to src/libs/brutal-base/banned.h diff --git a/sources/libs/brutal-base/cast.h b/src/libs/brutal-base/cast.h similarity index 100% rename from sources/libs/brutal-base/cast.h rename to src/libs/brutal-base/cast.h diff --git a/sources/libs/brutal-math/clamp.h b/src/libs/brutal-base/clamp.h similarity index 100% rename from sources/libs/brutal-math/clamp.h rename to src/libs/brutal-base/clamp.h diff --git a/sources/libs/brutal-base/count.h b/src/libs/brutal-base/count.h similarity index 100% rename from sources/libs/brutal-base/count.h rename to src/libs/brutal-base/count.h diff --git a/sources/libs/brutal-base/defs.h b/src/libs/brutal-base/defs.h similarity index 100% rename from sources/libs/brutal-base/defs.h rename to src/libs/brutal-base/defs.h diff --git a/sources/libs/brutal-base/endian.h b/src/libs/brutal-base/endian.h similarity index 100% rename from sources/libs/brutal-base/endian.h rename to src/libs/brutal-base/endian.h diff --git a/sources/libs/brutal-base/error.h b/src/libs/brutal-base/error.h similarity index 100% rename from sources/libs/brutal-base/error.h rename to src/libs/brutal-base/error.h diff --git a/sources/libs/brutal-base/iter.h b/src/libs/brutal-base/iter.h similarity index 100% rename from sources/libs/brutal-base/iter.h rename to src/libs/brutal-base/iter.h diff --git a/sources/libs/brutal-base/keywords.h b/src/libs/brutal-base/keywords.h similarity index 100% rename from sources/libs/brutal-base/keywords.h rename to src/libs/brutal-base/keywords.h diff --git a/sources/libs/brutal-base/loc.h b/src/libs/brutal-base/loc.h similarity index 100% rename from sources/libs/brutal-base/loc.h rename to src/libs/brutal-base/loc.h diff --git a/sources/libs/brutal-base/macros.h b/src/libs/brutal-base/macros.h similarity index 100% rename from sources/libs/brutal-base/macros.h rename to src/libs/brutal-base/macros.h diff --git a/src/libs/brutal-base/manifest.json b/src/libs/brutal-base/manifest.json new file mode 100644 index 000000000..a61d5fb1c --- /dev/null +++ b/src/libs/brutal-base/manifest.json @@ -0,0 +1,7 @@ +{ + "id": "brutal-base", + "type": "lib", + "description": "Brutal base and utility library", + "requires": [ + ] +} \ No newline at end of file diff --git a/sources/libs/brutal-base/map.h b/src/libs/brutal-base/map.h similarity index 100% rename from sources/libs/brutal-base/map.h rename to src/libs/brutal-base/map.h diff --git a/sources/libs/brutal-base/range.h b/src/libs/brutal-base/range.h similarity index 99% rename from sources/libs/brutal-base/range.h rename to src/libs/brutal-base/range.h index 5adca9441..ebf5431cd 100644 --- a/sources/libs/brutal-base/range.h +++ b/src/libs/brutal-base/range.h @@ -1,7 +1,6 @@ #pragma once -#include - +#include "clamp.h" #include "macros.h" #include "std.h" diff --git a/sources/libs/brutal-base/result.h b/src/libs/brutal-base/result.h similarity index 100% rename from sources/libs/brutal-base/result.h rename to src/libs/brutal-base/result.h diff --git a/sources/libs/brutal-base/slice.h b/src/libs/brutal-base/slice.h similarity index 100% rename from sources/libs/brutal-base/slice.h rename to src/libs/brutal-base/slice.h diff --git a/sources/libs/brutal-base/std.h b/src/libs/brutal-base/std.h similarity index 100% rename from sources/libs/brutal-base/std.h rename to src/libs/brutal-base/std.h diff --git a/sources/libs/brutal-base/str.h b/src/libs/brutal-base/str.h similarity index 99% rename from sources/libs/brutal-base/str.h rename to src/libs/brutal-base/str.h index a51bd690c..e639bf7bc 100644 --- a/sources/libs/brutal-base/str.h +++ b/src/libs/brutal-base/str.h @@ -1,6 +1,7 @@ #pragma once #include "std.h" +#include "macros.h" /* --- Null Terminated String ----------------------------------------------- */ diff --git a/sources/libs/brutal-base/types.h b/src/libs/brutal-base/types.h similarity index 100% rename from sources/libs/brutal-base/types.h rename to src/libs/brutal-base/types.h diff --git a/sources/libs/brutal-base/vaopt.h b/src/libs/brutal-base/vaopt.h similarity index 100% rename from sources/libs/brutal-base/vaopt.h rename to src/libs/brutal-base/vaopt.h diff --git a/sources/libs/brutal-cli/clear.c b/src/libs/brutal-cli/clear.c similarity index 94% rename from sources/libs/brutal-cli/clear.c rename to src/libs/brutal-cli/clear.c index 99cbc0b8f..adc78c736 100644 --- a/sources/libs/brutal-cli/clear.c +++ b/src/libs/brutal-cli/clear.c @@ -1,4 +1,4 @@ -#include +#include #include "clear.h" diff --git a/sources/libs/brutal-cli/clear.h b/src/libs/brutal-cli/clear.h similarity index 91% rename from sources/libs/brutal-cli/clear.h rename to src/libs/brutal-cli/clear.h index 81de253d3..5a35436e5 100644 --- a/sources/libs/brutal-cli/clear.h +++ b/src/libs/brutal-cli/clear.h @@ -1,6 +1,6 @@ #pragma once -#include +#include void cli_clear_display(IoWriter writer); diff --git a/sources/libs/brutal-cli/cursor.c b/src/libs/brutal-cli/cursor.c similarity index 97% rename from sources/libs/brutal-cli/cursor.c rename to src/libs/brutal-cli/cursor.c index 12cf910ca..bb370282e 100644 --- a/sources/libs/brutal-cli/cursor.c +++ b/src/libs/brutal-cli/cursor.c @@ -1,4 +1,4 @@ -#include +#include #include "cursor.h" diff --git a/sources/libs/brutal-cli/cursor.h b/src/libs/brutal-cli/cursor.h similarity index 94% rename from sources/libs/brutal-cli/cursor.h rename to src/libs/brutal-cli/cursor.h index 921cd3d10..548ad870a 100644 --- a/sources/libs/brutal-cli/cursor.h +++ b/src/libs/brutal-cli/cursor.h @@ -1,6 +1,6 @@ #pragma once -#include +#include void cli_cursor_up(IoWriter writer, int count); diff --git a/sources/libs/brutal-cli/fmt.c b/src/libs/brutal-cli/fmt.c similarity index 96% rename from sources/libs/brutal-cli/fmt.c rename to src/libs/brutal-cli/fmt.c index c89c21b6b..013af490d 100644 --- a/sources/libs/brutal-cli/fmt.c +++ b/src/libs/brutal-cli/fmt.c @@ -1,5 +1,6 @@ -#include -#include +#include +#include +#include #include "fmt.h" #include "style.h" diff --git a/sources/libs/brutal-cli/fmt.h b/src/libs/brutal-cli/fmt.h similarity index 75% rename from sources/libs/brutal-cli/fmt.h rename to src/libs/brutal-cli/fmt.h index a8da1eea2..cfc00dbd0 100644 --- a/sources/libs/brutal-cli/fmt.h +++ b/src/libs/brutal-cli/fmt.h @@ -1,6 +1,7 @@ #pragma once -#include +#include +#include IoResult cli_fmt(IoWriter writer, Str format, AnyVa args); diff --git a/src/libs/brutal-cli/manifest.json b/src/libs/brutal-cli/manifest.json new file mode 100644 index 000000000..2bf9f6d13 --- /dev/null +++ b/src/libs/brutal-cli/manifest.json @@ -0,0 +1,12 @@ +{ + "id": "brutal-cli", + "type": "lib", + "description": "Brutal command line interface utility library", + "requires": [ + "brutal-fmt", + "brutal-io", + "brutal-time", + "brutal-base", + "brutal-parse" + ] +} \ No newline at end of file diff --git a/sources/libs/brutal-cli/spinners.c b/src/libs/brutal-cli/spinners.c similarity index 93% rename from sources/libs/brutal-cli/spinners.c rename to src/libs/brutal-cli/spinners.c index b545d0315..664b4fe67 100644 --- a/sources/libs/brutal-cli/spinners.c +++ b/src/libs/brutal-cli/spinners.c @@ -1,5 +1,4 @@ -#include -#include +#include #include "spinners.h" diff --git a/sources/libs/brutal-cli/spinners.h b/src/libs/brutal-cli/spinners.h similarity index 84% rename from sources/libs/brutal-cli/spinners.h rename to src/libs/brutal-cli/spinners.h index e02c84aae..dd30516fc 100644 --- a/sources/libs/brutal-cli/spinners.h +++ b/src/libs/brutal-cli/spinners.h @@ -1,6 +1,6 @@ #pragma once -#include +#include typedef struct { diff --git a/sources/libs/brutal-cli/style.c b/src/libs/brutal-cli/style.c similarity index 98% rename from sources/libs/brutal-cli/style.c rename to src/libs/brutal-cli/style.c index 23a4f327d..04a47be78 100644 --- a/sources/libs/brutal-cli/style.c +++ b/src/libs/brutal-cli/style.c @@ -1,4 +1,5 @@ -#include +#include +#include #include "style.h" diff --git a/sources/libs/brutal-cli/style.h b/src/libs/brutal-cli/style.h similarity index 93% rename from sources/libs/brutal-cli/style.h rename to src/libs/brutal-cli/style.h index c0dd34bb4..3d8c4321a 100644 --- a/sources/libs/brutal-cli/style.h +++ b/src/libs/brutal-cli/style.h @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include +#include typedef enum { diff --git a/sources/libs/brutal-debug/assert.h b/src/libs/brutal-debug/assert.h similarity index 99% rename from sources/libs/brutal-debug/assert.h rename to src/libs/brutal-debug/assert.h index 2a9f1aca4..5ed342a95 100644 --- a/sources/libs/brutal-debug/assert.h +++ b/src/libs/brutal-debug/assert.h @@ -1,7 +1,6 @@ #pragma once -#include - +#include #include "log.h" #define assert_not_null(EXPR) ( \ diff --git a/sources/libs/brutal-debug/log.c b/src/libs/brutal-debug/log.c similarity index 96% rename from sources/libs/brutal-debug/log.c rename to src/libs/brutal-debug/log.c index 2437f042c..f2b94565b 100644 --- a/sources/libs/brutal-debug/log.c +++ b/src/libs/brutal-debug/log.c @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/sources/libs/brutal-debug/log.h b/src/libs/brutal-debug/log.h similarity index 92% rename from sources/libs/brutal-debug/log.h rename to src/libs/brutal-debug/log.h index f3e6efcc3..ad7d9af0f 100644 --- a/sources/libs/brutal-debug/log.h +++ b/src/libs/brutal-debug/log.h @@ -1,6 +1,7 @@ #pragma once -#include +#include +#include typedef enum { diff --git a/src/libs/brutal-debug/manifest.json b/src/libs/brutal-debug/manifest.json new file mode 100644 index 000000000..ef6ccafe6 --- /dev/null +++ b/src/libs/brutal-debug/manifest.json @@ -0,0 +1,8 @@ +{ + "id": "brutal-debug", + "type": "lib", + "description": "Brutal debugging utility library", + "requires": [ + "brutal-base" + ] +} \ No newline at end of file diff --git a/sources/libs/brutal-ds/bits.c b/src/libs/brutal-ds/bits.c similarity index 96% rename from sources/libs/brutal-ds/bits.c rename to src/libs/brutal-ds/bits.c index e57087902..c86a5f6fd 100644 --- a/sources/libs/brutal-ds/bits.c +++ b/src/libs/brutal-ds/bits.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include "bits.h" diff --git a/sources/libs/brutal-ds/bits.h b/src/libs/brutal-ds/bits.h similarity index 97% rename from sources/libs/brutal-ds/bits.h rename to src/libs/brutal-ds/bits.h index d5da97ebb..8cae8cca1 100644 --- a/sources/libs/brutal-ds/bits.h +++ b/src/libs/brutal-ds/bits.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #define BITS_BYTE_INDEX(index) ((index) / 8) #define BITS_BIT_INDEX(index) ((index) % 8) diff --git a/src/libs/brutal-ds/manifest.json b/src/libs/brutal-ds/manifest.json new file mode 100644 index 000000000..525555846 --- /dev/null +++ b/src/libs/brutal-ds/manifest.json @@ -0,0 +1,12 @@ +{ + "id": "brutal-ds", + "type": "lib", + "description": "Brutal data structures utility library", + "requires": [ + "brutal-mem", + "brutal-debug", + "brutal-base", + "brutal-hash", + "brutal-alloc" + ] +} \ No newline at end of file diff --git a/sources/libs/brutal-ds/map.c b/src/libs/brutal-ds/map.c similarity index 96% rename from sources/libs/brutal-ds/map.c rename to src/libs/brutal-ds/map.c index 05709c0cd..465a18775 100644 --- a/sources/libs/brutal-ds/map.c +++ b/src/libs/brutal-ds/map.c @@ -1,4 +1,6 @@ -#include +#include +#include +#include #include "map.h" diff --git a/sources/libs/brutal-ds/map.h b/src/libs/brutal-ds/map.h similarity index 98% rename from sources/libs/brutal-ds/map.h rename to src/libs/brutal-ds/map.h index 30d3a5b6a..ca75a5da0 100644 --- a/sources/libs/brutal-ds/map.h +++ b/src/libs/brutal-ds/map.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include "vec.h" diff --git a/sources/libs/brutal-ds/range.c b/src/libs/brutal-ds/range.c similarity index 98% rename from sources/libs/brutal-ds/range.c rename to src/libs/brutal-ds/range.c index 5502bb244..6ce381b9d 100644 --- a/sources/libs/brutal-ds/range.c +++ b/src/libs/brutal-ds/range.c @@ -1,6 +1,6 @@ -#include #include "range.h" +#include void range_alloc_init(RangeAlloc *self, Alloc *alloc) { diff --git a/sources/libs/brutal-ds/range.h b/src/libs/brutal-ds/range.h similarity index 92% rename from sources/libs/brutal-ds/range.h rename to src/libs/brutal-ds/range.h index 1a7106aa2..f64575daa 100644 --- a/sources/libs/brutal-ds/range.h +++ b/src/libs/brutal-ds/range.h @@ -1,5 +1,6 @@ #pragma once +#include #include "vec.h" typedef Vec(USizeRange) RangeAlloc; diff --git a/sources/libs/brutal-ds/ring.c b/src/libs/brutal-ds/ring.c similarity index 97% rename from sources/libs/brutal-ds/ring.c rename to src/libs/brutal-ds/ring.c index cd3b4b401..61b5ae030 100644 --- a/sources/libs/brutal-ds/ring.c +++ b/src/libs/brutal-ds/ring.c @@ -1,4 +1,5 @@ #include "ring.h" +#include void ring_init_impl(RingImpl *impl, int capacity, int data_size, Alloc *alloc) { diff --git a/sources/libs/brutal-ds/ring.h b/src/libs/brutal-ds/ring.h similarity index 97% rename from sources/libs/brutal-ds/ring.h rename to src/libs/brutal-ds/ring.h index 33ccb3aac..9f0a7ce78 100644 --- a/sources/libs/brutal-ds/ring.h +++ b/src/libs/brutal-ds/ring.h @@ -1,6 +1,6 @@ #pragma once -#include +#include typedef struct { diff --git a/sources/libs/brutal-ds/slot.c b/src/libs/brutal-ds/slot.c similarity index 96% rename from sources/libs/brutal-ds/slot.c rename to src/libs/brutal-ds/slot.c index ab218af04..022bd4ca8 100644 --- a/sources/libs/brutal-ds/slot.c +++ b/src/libs/brutal-ds/slot.c @@ -1,4 +1,5 @@ -#include +#include +#include #include "slot.h" diff --git a/sources/libs/brutal-ds/slot.h b/src/libs/brutal-ds/slot.h similarity index 98% rename from sources/libs/brutal-ds/slot.h rename to src/libs/brutal-ds/slot.h index 0de329622..20d56651c 100644 --- a/sources/libs/brutal-ds/slot.h +++ b/src/libs/brutal-ds/slot.h @@ -1,6 +1,6 @@ #pragma once -#include +#include typedef int SlotIndex; diff --git a/sources/libs/brutal-ds/vec.c b/src/libs/brutal-ds/vec.c similarity index 98% rename from sources/libs/brutal-ds/vec.c rename to src/libs/brutal-ds/vec.c index 78c9a0309..ab75fc430 100644 --- a/sources/libs/brutal-ds/vec.c +++ b/src/libs/brutal-ds/vec.c @@ -5,7 +5,8 @@ * under the terms of the MIT license. See LICENSE for details. */ -#include +#include +#include #include "vec.h" diff --git a/sources/libs/brutal-ds/vec.h b/src/libs/brutal-ds/vec.h similarity index 98% rename from sources/libs/brutal-ds/vec.h rename to src/libs/brutal-ds/vec.h index c97536bfa..59041d0db 100644 --- a/sources/libs/brutal-ds/vec.h +++ b/src/libs/brutal-ds/vec.h @@ -1,7 +1,8 @@ #pragma once -#include -#include +#include +#include +#include typedef struct { diff --git a/sources/libs/brutal-fibers/fibers.c b/src/libs/brutal-fibers/fibers.c similarity index 97% rename from sources/libs/brutal-fibers/fibers.c rename to src/libs/brutal-fibers/fibers.c index 5667cf691..b0a1bb17d 100644 --- a/sources/libs/brutal-fibers/fibers.c +++ b/src/libs/brutal-fibers/fibers.c @@ -1,7 +1,8 @@ -#include -#include -#include +#include +#include +#include +#include #include "fibers.h" static Fiber *_current = nullptr; diff --git a/sources/libs/brutal-fibers/fibers.h b/src/libs/brutal-fibers/fibers.h similarity index 96% rename from sources/libs/brutal-fibers/fibers.h rename to src/libs/brutal-fibers/fibers.h index 8df0186ac..20017b580 100644 --- a/sources/libs/brutal-fibers/fibers.h +++ b/src/libs/brutal-fibers/fibers.h @@ -1,7 +1,6 @@ #pragma once -#include -#include +#include #define FIBER_STACK_SIZE KiB(16) diff --git a/src/libs/brutal-fibers/manifest.json b/src/libs/brutal-fibers/manifest.json new file mode 100644 index 000000000..6a1128a10 --- /dev/null +++ b/src/libs/brutal-fibers/manifest.json @@ -0,0 +1,10 @@ +{ + "id": "brutal-fibers", + "type": "lib", + "description": "Brutal fibers/coroutines utility library", + "requires": [ + "brutal-alloc", + "brutal-time", + "brutal-base" + ] +} \ No newline at end of file diff --git a/sources/libs/brutal-fmt/case.c b/src/libs/brutal-fmt/case.c similarity index 97% rename from sources/libs/brutal-fmt/case.c rename to src/libs/brutal-fmt/case.c index 9b7698801..d69655a07 100644 --- a/sources/libs/brutal-fmt/case.c +++ b/src/libs/brutal-fmt/case.c @@ -1,8 +1,5 @@ -#include -#include -#include #include - +#include #include "case.h" Buf case_to_default(Str str, Alloc *alloc) @@ -388,8 +385,10 @@ Buf case_change(Case c, Str str, Alloc *alloc) case CASE_SPONGE: return case_to_sponge(str, alloc); + // FIXME: Add a panic case, or a way to panic without + // brutal-debug, as brutal debug depends on brutal-fmt. default: - panic$("unknown text casing {}", c); + return case_to_default(str, alloc); } } diff --git a/sources/libs/brutal-fmt/case.h b/src/libs/brutal-fmt/case.h similarity index 93% rename from sources/libs/brutal-fmt/case.h rename to src/libs/brutal-fmt/case.h index 5abd5e184..9d91fef87 100644 --- a/sources/libs/brutal-fmt/case.h +++ b/src/libs/brutal-fmt/case.h @@ -1,6 +1,10 @@ #pragma once -#include + +#include +#include +#include + typedef enum { diff --git a/sources/libs/brutal-fmt/fmt.c b/src/libs/brutal-fmt/fmt.c similarity index 98% rename from sources/libs/brutal-fmt/fmt.c rename to src/libs/brutal-fmt/fmt.c index 482790411..c662af65c 100644 --- a/sources/libs/brutal-fmt/fmt.c +++ b/src/libs/brutal-fmt/fmt.c @@ -1,10 +1,11 @@ #define _BRUTAL_SOURCE -#include -#include -#include #include - +#include +#include +#include +#include +#include #include "fmt.h" #include "funcs.h" diff --git a/sources/libs/brutal-fmt/fmt.h b/src/libs/brutal-fmt/fmt.h similarity index 92% rename from sources/libs/brutal-fmt/fmt.h rename to src/libs/brutal-fmt/fmt.h index a80a78ecf..6b27e4875 100644 --- a/sources/libs/brutal-fmt/fmt.h +++ b/src/libs/brutal-fmt/fmt.h @@ -1,9 +1,8 @@ #pragma once -#include -#include -#include - +#include +#include +#include #include "case.h" typedef enum diff --git a/sources/libs/brutal-fmt/funcs.c b/src/libs/brutal-fmt/funcs.c similarity index 99% rename from sources/libs/brutal-fmt/funcs.c rename to src/libs/brutal-fmt/funcs.c index b6078b3e3..a55b64ca1 100644 --- a/sources/libs/brutal-fmt/funcs.c +++ b/src/libs/brutal-fmt/funcs.c @@ -1,5 +1,5 @@ #include "funcs.h" - +#include IoResult fmt_format(IoWriter writer, Str format, AnyVa args) { size_t current = 0; diff --git a/sources/libs/brutal-fmt/funcs.h b/src/libs/brutal-fmt/funcs.h similarity index 100% rename from sources/libs/brutal-fmt/funcs.h rename to src/libs/brutal-fmt/funcs.h diff --git a/src/libs/brutal-fmt/manifest.json b/src/libs/brutal-fmt/manifest.json new file mode 100644 index 000000000..0120298c7 --- /dev/null +++ b/src/libs/brutal-fmt/manifest.json @@ -0,0 +1,13 @@ +{ + "id": "brutal-fmt", + "type": "lib", + "description": "Brutal text format utility library", + "requires": [ + "brutal-parse", + "brutal-text", + "brutal-debug", + "brutal-io", + "libc", + "brutal-alloc" + ] +} \ No newline at end of file diff --git a/sources/libs/brutal-glob/glob.c b/src/libs/brutal-glob/glob.c similarity index 99% rename from sources/libs/brutal-glob/glob.c rename to src/libs/brutal-glob/glob.c index 461de0428..65c64296c 100644 --- a/sources/libs/brutal-glob/glob.c +++ b/src/libs/brutal-glob/glob.c @@ -1,4 +1,3 @@ -#include #include "glob.h" diff --git a/sources/libs/brutal-glob/glob.h b/src/libs/brutal-glob/glob.h similarity index 96% rename from sources/libs/brutal-glob/glob.h rename to src/libs/brutal-glob/glob.h index 8a9197f09..6750f09de 100644 --- a/sources/libs/brutal-glob/glob.h +++ b/src/libs/brutal-glob/glob.h @@ -1,6 +1,6 @@ #pragma once -#include +#include /** @brief Match a stream of charaters using glob patterns diff --git a/src/libs/brutal-glob/manifest.json b/src/libs/brutal-glob/manifest.json new file mode 100644 index 000000000..d86d617cc --- /dev/null +++ b/src/libs/brutal-glob/manifest.json @@ -0,0 +1,8 @@ +{ + "id": "brutal-glob", + "type": "lib", + "description": "Brutal text 'regex' utility library", + "requires": [ + "brutal-parse" + ] +} \ No newline at end of file diff --git a/sources/libs/brutal-hash/adler32.c b/src/libs/brutal-hash/adler32.c similarity index 97% rename from sources/libs/brutal-hash/adler32.c rename to src/libs/brutal-hash/adler32.c index 00e397d3e..ac2e9752a 100644 --- a/sources/libs/brutal-hash/adler32.c +++ b/src/libs/brutal-hash/adler32.c @@ -1,4 +1,5 @@ #include "adler32.h" +#include #define A32_BASE 65521 diff --git a/sources/libs/brutal-hash/adler32.h b/src/libs/brutal-hash/adler32.h similarity index 90% rename from sources/libs/brutal-hash/adler32.h rename to src/libs/brutal-hash/adler32.h index e4c9dceeb..9dbbbbd3d 100644 --- a/sources/libs/brutal-hash/adler32.h +++ b/src/libs/brutal-hash/adler32.h @@ -1,6 +1,6 @@ #pragma once -#include +#include typedef struct { diff --git a/sources/libs/brutal-hash/crc32.c b/src/libs/brutal-hash/crc32.c similarity index 98% rename from sources/libs/brutal-hash/crc32.c rename to src/libs/brutal-hash/crc32.c index 0c703381e..82fa201a3 100644 --- a/sources/libs/brutal-hash/crc32.c +++ b/src/libs/brutal-hash/crc32.c @@ -1,5 +1,5 @@ #include "crc32.h" - +#include static uint32_t const crc32tab[16] = { 0x00000000, 0x1DB71064, 0x3B6E20C8, 0x26D930AC, 0x76DC4190, 0x6B6B51F4, 0x4DB26158, 0x5005713C, 0xEDB88320, 0xF00F9344, diff --git a/sources/libs/brutal-hash/crc32.h b/src/libs/brutal-hash/crc32.h similarity index 93% rename from sources/libs/brutal-hash/crc32.h rename to src/libs/brutal-hash/crc32.h index d0cad5651..b721b0313 100644 --- a/sources/libs/brutal-hash/crc32.h +++ b/src/libs/brutal-hash/crc32.h @@ -1,6 +1,6 @@ #pragma once -#include +#include typedef struct { diff --git a/sources/libs/brutal-hash/fnv.c b/src/libs/brutal-hash/fnv.c similarity index 100% rename from sources/libs/brutal-hash/fnv.c rename to src/libs/brutal-hash/fnv.c diff --git a/sources/libs/brutal-hash/fnv.h b/src/libs/brutal-hash/fnv.h similarity index 96% rename from sources/libs/brutal-hash/fnv.h rename to src/libs/brutal-hash/fnv.h index 2c1296b22..a1f3305e5 100644 --- a/sources/libs/brutal-hash/fnv.h +++ b/src/libs/brutal-hash/fnv.h @@ -1,6 +1,6 @@ #pragma once -#include +#include /* Based on https://github.com/haipome/fnv */ diff --git a/src/libs/brutal-hash/manifest.json b/src/libs/brutal-hash/manifest.json new file mode 100644 index 000000000..e2f45b3cb --- /dev/null +++ b/src/libs/brutal-hash/manifest.json @@ -0,0 +1,9 @@ +{ + "id": "brutal-hash", + "type": "lib", + "description": "Brutal hashing utility library", + "requires": [ + "brutal-base", + "brutal-io" + ] +} \ No newline at end of file diff --git a/sources/libs/brutal-input/event.h b/src/libs/brutal-input/event.h similarity index 94% rename from sources/libs/brutal-input/event.h rename to src/libs/brutal-input/event.h index c5b3c880c..d2ab31cb7 100644 --- a/sources/libs/brutal-input/event.h +++ b/src/libs/brutal-input/event.h @@ -1,6 +1,7 @@ #pragma once -#include +#include +#include #include "keyboard.h" #include "mouse.h" diff --git a/sources/libs/brutal-input/keyboard.h b/src/libs/brutal-input/keyboard.h similarity index 98% rename from sources/libs/brutal-input/keyboard.h rename to src/libs/brutal-input/keyboard.h index 5241e514b..133b7135d 100644 --- a/sources/libs/brutal-input/keyboard.h +++ b/src/libs/brutal-input/keyboard.h @@ -1,6 +1,7 @@ #pragma once -#include +#include +#include #define FOREACH_KB_KEY(KEY) \ KEY(KBKEY_INVALID, 0x0) \ diff --git a/src/libs/brutal-input/manifest.json b/src/libs/brutal-input/manifest.json new file mode 100644 index 000000000..235f75af8 --- /dev/null +++ b/src/libs/brutal-input/manifest.json @@ -0,0 +1,10 @@ +{ + "id": "brutal-input", + "type": "lib", + "description": "Brutal user input utility library", + "requires": [ + "brutal-math", + "brutal-base", + "brutal-text" + ] +} \ No newline at end of file diff --git a/sources/libs/brutal-input/mouse.h b/src/libs/brutal-input/mouse.h similarity index 81% rename from sources/libs/brutal-input/mouse.h rename to src/libs/brutal-input/mouse.h index 0ac8fa945..838475373 100644 --- a/sources/libs/brutal-input/mouse.h +++ b/src/libs/brutal-input/mouse.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #define MSBTN_LEFT (1 << 0) #define MSBTN_MIDDLE (1 << 1) diff --git a/sources/libs/brutal-io/base.c b/src/libs/brutal-io/base.c similarity index 95% rename from sources/libs/brutal-io/base.c rename to src/libs/brutal-io/base.c index 785c98f4c..5759261e2 100644 --- a/sources/libs/brutal-io/base.c +++ b/src/libs/brutal-io/base.c @@ -1,4 +1,4 @@ -#include +#include #include "base.h" diff --git a/sources/libs/brutal-io/base.h b/src/libs/brutal-io/base.h similarity index 84% rename from sources/libs/brutal-io/base.h rename to src/libs/brutal-io/base.h index da4350f84..730f82390 100644 --- a/sources/libs/brutal-io/base.h +++ b/src/libs/brutal-io/base.h @@ -1,6 +1,8 @@ #pragma once -#include +#include +#include +#include #define IO_MAP_READ (1 << 0) #define IO_MAP_WRITE (1 << 1) diff --git a/sources/libs/brutal-io/bitbuf.h b/src/libs/brutal-io/bitbuf.h similarity index 88% rename from sources/libs/brutal-io/bitbuf.h rename to src/libs/brutal-io/bitbuf.h index b165d2a02..16db72ad1 100644 --- a/sources/libs/brutal-io/bitbuf.h +++ b/src/libs/brutal-io/bitbuf.h @@ -1,6 +1,6 @@ #pragma once -#include +#include typedef uint_fast64_t BitBuf; diff --git a/sources/libs/brutal-io/buf.c b/src/libs/brutal-io/buf.c similarity index 97% rename from sources/libs/brutal-io/buf.c rename to src/libs/brutal-io/buf.c index 6676995d7..2aa1a4749 100644 --- a/sources/libs/brutal-io/buf.c +++ b/src/libs/brutal-io/buf.c @@ -1,6 +1,5 @@ -#include -#include - +#include +#include #include "buf.h" void buf_init(Buf *self, size_t capacity, Alloc *alloc) diff --git a/sources/libs/brutal-io/buf.h b/src/libs/brutal-io/buf.h similarity index 97% rename from sources/libs/brutal-io/buf.h rename to src/libs/brutal-io/buf.h index 47b72cf74..55beede0d 100644 --- a/sources/libs/brutal-io/buf.h +++ b/src/libs/brutal-io/buf.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include "traits.h" diff --git a/sources/libs/brutal-io/chan.c b/src/libs/brutal-io/chan.c similarity index 100% rename from sources/libs/brutal-io/chan.c rename to src/libs/brutal-io/chan.c diff --git a/sources/libs/brutal-io/chan.h b/src/libs/brutal-io/chan.h similarity index 100% rename from sources/libs/brutal-io/chan.h rename to src/libs/brutal-io/chan.h diff --git a/sources/libs/brutal-io/emit.c b/src/libs/brutal-io/emit.c similarity index 100% rename from sources/libs/brutal-io/emit.c rename to src/libs/brutal-io/emit.c diff --git a/sources/libs/brutal-io/emit.h b/src/libs/brutal-io/emit.h similarity index 100% rename from sources/libs/brutal-io/emit.h rename to src/libs/brutal-io/emit.h diff --git a/sources/libs/brutal-io/file.c b/src/libs/brutal-io/file.c similarity index 100% rename from sources/libs/brutal-io/file.c rename to src/libs/brutal-io/file.c diff --git a/sources/libs/brutal-io/file.h b/src/libs/brutal-io/file.h similarity index 100% rename from sources/libs/brutal-io/file.h rename to src/libs/brutal-io/file.h diff --git a/sources/libs/brutal-io/funcs.c b/src/libs/brutal-io/funcs.c similarity index 100% rename from sources/libs/brutal-io/funcs.c rename to src/libs/brutal-io/funcs.c diff --git a/sources/libs/brutal-io/funcs.h b/src/libs/brutal-io/funcs.h similarity index 100% rename from sources/libs/brutal-io/funcs.h rename to src/libs/brutal-io/funcs.h diff --git a/src/libs/brutal-io/manifest.json b/src/libs/brutal-io/manifest.json new file mode 100644 index 000000000..39b53b75b --- /dev/null +++ b/src/libs/brutal-io/manifest.json @@ -0,0 +1,14 @@ +{ + "id": "brutal-io", + "type": "lib", + "description": "Brutal input/output utility library", + "requires": [ + "brutal-debug", + "brutal-base", + "brutal-math", + "brutal-alloc", + "embed", + "brutal-fmt", + "brutal-text" + ] +} \ No newline at end of file diff --git a/sources/libs/brutal-io/mem.c b/src/libs/brutal-io/mem.c similarity index 100% rename from sources/libs/brutal-io/mem.c rename to src/libs/brutal-io/mem.c diff --git a/sources/libs/brutal-io/mem.h b/src/libs/brutal-io/mem.h similarity index 100% rename from sources/libs/brutal-io/mem.h rename to src/libs/brutal-io/mem.h diff --git a/sources/libs/brutal-io/path.c b/src/libs/brutal-io/path.c similarity index 100% rename from sources/libs/brutal-io/path.c rename to src/libs/brutal-io/path.c diff --git a/sources/libs/brutal-io/path.h b/src/libs/brutal-io/path.h similarity index 100% rename from sources/libs/brutal-io/path.h rename to src/libs/brutal-io/path.h diff --git a/sources/libs/brutal-io/rbits.h b/src/libs/brutal-io/rbits.h similarity index 100% rename from sources/libs/brutal-io/rbits.h rename to src/libs/brutal-io/rbits.h diff --git a/sources/libs/brutal-io/traits.h b/src/libs/brutal-io/traits.h similarity index 100% rename from sources/libs/brutal-io/traits.h rename to src/libs/brutal-io/traits.h diff --git a/sources/libs/brutal-io/wbits.h b/src/libs/brutal-io/wbits.h similarity index 100% rename from sources/libs/brutal-io/wbits.h rename to src/libs/brutal-io/wbits.h diff --git a/sources/libs/brutal-io/window.c b/src/libs/brutal-io/window.c similarity index 100% rename from sources/libs/brutal-io/window.c rename to src/libs/brutal-io/window.c diff --git a/sources/libs/brutal-io/window.h b/src/libs/brutal-io/window.h similarity index 95% rename from sources/libs/brutal-io/window.h rename to src/libs/brutal-io/window.h index 8854a8ed6..6f439f3a7 100644 --- a/sources/libs/brutal-io/window.h +++ b/src/libs/brutal-io/window.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include "traits.h" diff --git a/sources/libs/brutal-math/angle.h b/src/libs/brutal-math/angle.h similarity index 100% rename from sources/libs/brutal-math/angle.h rename to src/libs/brutal-math/angle.h diff --git a/sources/libs/hw/virtio/device/entropy.c b/src/libs/brutal-math/clamp.h similarity index 100% rename from sources/libs/hw/virtio/device/entropy.c rename to src/libs/brutal-math/clamp.h diff --git a/sources/libs/brutal-math/dock.c b/src/libs/brutal-math/dock.c similarity index 100% rename from sources/libs/brutal-math/dock.c rename to src/libs/brutal-math/dock.c diff --git a/sources/libs/brutal-math/dock.h b/src/libs/brutal-math/dock.h similarity index 100% rename from sources/libs/brutal-math/dock.h rename to src/libs/brutal-math/dock.h diff --git a/sources/libs/brutal-math/easing.c b/src/libs/brutal-math/easing.c similarity index 100% rename from sources/libs/brutal-math/easing.c rename to src/libs/brutal-math/easing.c diff --git a/sources/libs/brutal-math/easing.h b/src/libs/brutal-math/easing.h similarity index 100% rename from sources/libs/brutal-math/easing.h rename to src/libs/brutal-math/easing.h diff --git a/sources/libs/brutal-math/edge.h b/src/libs/brutal-math/edge.h similarity index 97% rename from sources/libs/brutal-math/edge.h rename to src/libs/brutal-math/edge.h index c44956a49..0e649c14d 100644 --- a/sources/libs/brutal-math/edge.h +++ b/src/libs/brutal-math/edge.h @@ -1,8 +1,7 @@ #pragma once -#include -#include - +#include +#include #include "clamp.h" #include "rect.h" #include "vec2.h" diff --git a/sources/libs/brutal-math/flow.c b/src/libs/brutal-math/flow.c similarity index 100% rename from sources/libs/brutal-math/flow.c rename to src/libs/brutal-math/flow.c diff --git a/sources/libs/brutal-math/flow.h b/src/libs/brutal-math/flow.h similarity index 100% rename from sources/libs/brutal-math/flow.h rename to src/libs/brutal-math/flow.h diff --git a/sources/libs/brutal-math/funcs.h b/src/libs/brutal-math/funcs.h similarity index 100% rename from sources/libs/brutal-math/funcs.h rename to src/libs/brutal-math/funcs.h diff --git a/sources/libs/brutal-math/gravity.c b/src/libs/brutal-math/gravity.c similarity index 100% rename from sources/libs/brutal-math/gravity.c rename to src/libs/brutal-math/gravity.c diff --git a/sources/libs/brutal-math/gravity.h b/src/libs/brutal-math/gravity.h similarity index 100% rename from sources/libs/brutal-math/gravity.h rename to src/libs/brutal-math/gravity.h diff --git a/src/libs/brutal-math/manifest.json b/src/libs/brutal-math/manifest.json new file mode 100644 index 000000000..18aea53fa --- /dev/null +++ b/src/libs/brutal-math/manifest.json @@ -0,0 +1,10 @@ +{ + "id": "brutal-math", + "type": "lib", + "description": "Brutal math utility library", + "requires": [ + "libc", + "brutal-ds", + "embed" + ] +} \ No newline at end of file diff --git a/sources/libs/brutal-math/orientation.h b/src/libs/brutal-math/orientation.h similarity index 100% rename from sources/libs/brutal-math/orientation.h rename to src/libs/brutal-math/orientation.h diff --git a/sources/libs/brutal-math/rand.c b/src/libs/brutal-math/rand.c similarity index 100% rename from sources/libs/brutal-math/rand.c rename to src/libs/brutal-math/rand.c diff --git a/sources/libs/brutal-math/rand.h b/src/libs/brutal-math/rand.h similarity index 95% rename from sources/libs/brutal-math/rand.h rename to src/libs/brutal-math/rand.h index a5c28408e..490fbd80d 100644 --- a/sources/libs/brutal-math/rand.h +++ b/src/libs/brutal-math/rand.h @@ -1,6 +1,7 @@ #pragma once -#include +#include +#include typedef struct { diff --git a/sources/libs/brutal-math/rect.h b/src/libs/brutal-math/rect.h similarity index 99% rename from sources/libs/brutal-math/rect.h rename to src/libs/brutal-math/rect.h index 2c878f6f0..9daafee45 100644 --- a/sources/libs/brutal-math/rect.h +++ b/src/libs/brutal-math/rect.h @@ -1,6 +1,7 @@ #pragma once -#include + +#include #include "vec2.h" diff --git a/sources/libs/brutal-math/spacing.c b/src/libs/brutal-math/spacing.c similarity index 100% rename from sources/libs/brutal-math/spacing.c rename to src/libs/brutal-math/spacing.c diff --git a/sources/libs/brutal-math/spacing.h b/src/libs/brutal-math/spacing.h similarity index 100% rename from sources/libs/brutal-math/spacing.h rename to src/libs/brutal-math/spacing.h diff --git a/sources/libs/brutal-math/trans2.h b/src/libs/brutal-math/trans2.h similarity index 98% rename from sources/libs/brutal-math/trans2.h rename to src/libs/brutal-math/trans2.h index fe1ed95ba..f7b323e5a 100644 --- a/sources/libs/brutal-math/trans2.h +++ b/src/libs/brutal-math/trans2.h @@ -1,7 +1,7 @@ #pragma once -#include #include +#include #include "vec2.h" diff --git a/sources/libs/brutal-math/vec2.h b/src/libs/brutal-math/vec2.h similarity index 100% rename from sources/libs/brutal-math/vec2.h rename to src/libs/brutal-math/vec2.h diff --git a/sources/libs/brutal-mem/const.h b/src/libs/brutal-mem/const.h similarity index 100% rename from sources/libs/brutal-mem/const.h rename to src/libs/brutal-mem/const.h diff --git a/sources/libs/brutal-mem/copy.c b/src/libs/brutal-mem/copy.c similarity index 100% rename from sources/libs/brutal-mem/copy.c rename to src/libs/brutal-mem/copy.c diff --git a/sources/libs/brutal-mem/funcs.h b/src/libs/brutal-mem/funcs.h similarity index 80% rename from sources/libs/brutal-mem/funcs.h rename to src/libs/brutal-mem/funcs.h index 0954b0b6f..186070573 100644 --- a/sources/libs/brutal-mem/funcs.h +++ b/src/libs/brutal-mem/funcs.h @@ -1,6 +1,7 @@ #pragma once -#include +#include +#include void *mem_cpy(void *s1, void const *s2, size_t n); diff --git a/src/libs/brutal-mem/manifest.json b/src/libs/brutal-mem/manifest.json new file mode 100644 index 000000000..ac8513ed2 --- /dev/null +++ b/src/libs/brutal-mem/manifest.json @@ -0,0 +1,8 @@ +{ + "id": "brutal-mem", + "type": "lib", + "description": "Brutal memory utility library", + "requires": [ + "embed" + ] +} \ No newline at end of file diff --git a/sources/libs/brutal-mem/move.c b/src/libs/brutal-mem/move.c similarity index 100% rename from sources/libs/brutal-mem/move.c rename to src/libs/brutal-mem/move.c diff --git a/sources/libs/brutal-mem/pages.h b/src/libs/brutal-mem/pages.h similarity index 100% rename from sources/libs/brutal-mem/pages.h rename to src/libs/brutal-mem/pages.h diff --git a/sources/libs/brutal-mem/set.c b/src/libs/brutal-mem/set.c similarity index 100% rename from sources/libs/brutal-mem/set.c rename to src/libs/brutal-mem/set.c diff --git a/sources/libs/brutal-mem/units.h b/src/libs/brutal-mem/units.h similarity index 87% rename from sources/libs/brutal-mem/units.h rename to src/libs/brutal-mem/units.h index a936f315f..7ec41c6aa 100644 --- a/sources/libs/brutal-mem/units.h +++ b/src/libs/brutal-mem/units.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #define KiB(VAL) ((uintptr_t)(VAL)*1024) diff --git a/sources/libs/brutal-mem/volatile.h b/src/libs/brutal-mem/volatile.h similarity index 95% rename from sources/libs/brutal-mem/volatile.h rename to src/libs/brutal-mem/volatile.h index 399caf3e2..86b1b48ae 100644 --- a/sources/libs/brutal-mem/volatile.h +++ b/src/libs/brutal-mem/volatile.h @@ -1,6 +1,6 @@ #pragma once - -#include +#include +#include static inline void volatile_write8(uintptr_t address, uint8_t value) { diff --git a/sources/libs/brutal-parse/lex.c b/src/libs/brutal-parse/lex.c similarity index 100% rename from sources/libs/brutal-parse/lex.c rename to src/libs/brutal-parse/lex.c diff --git a/sources/libs/brutal-parse/lex.h b/src/libs/brutal-parse/lex.h similarity index 100% rename from sources/libs/brutal-parse/lex.h rename to src/libs/brutal-parse/lex.h diff --git a/sources/libs/brutal-parse/lexeme.h b/src/libs/brutal-parse/lexeme.h similarity index 100% rename from sources/libs/brutal-parse/lexeme.h rename to src/libs/brutal-parse/lexeme.h diff --git a/src/libs/brutal-parse/manifest.json b/src/libs/brutal-parse/manifest.json new file mode 100644 index 000000000..48b4b767e --- /dev/null +++ b/src/libs/brutal-parse/manifest.json @@ -0,0 +1,14 @@ +{ + "id": "brutal-parse", + "type": "lib", + "description": "Brutal parsing utility library", + "requires": [ + "brutal-ds", + "brutal-text", + "brutal-debug", + "libc", + "brutal-fmt", + "brutal-io", + "brutal-alloc" + ] +} \ No newline at end of file diff --git a/sources/libs/brutal-parse/nums.c b/src/libs/brutal-parse/nums.c similarity index 100% rename from sources/libs/brutal-parse/nums.c rename to src/libs/brutal-parse/nums.c diff --git a/sources/libs/brutal-parse/nums.h b/src/libs/brutal-parse/nums.h similarity index 100% rename from sources/libs/brutal-parse/nums.h rename to src/libs/brutal-parse/nums.h diff --git a/sources/libs/brutal-parse/scan.c b/src/libs/brutal-parse/scan.c similarity index 100% rename from sources/libs/brutal-parse/scan.c rename to src/libs/brutal-parse/scan.c diff --git a/sources/libs/brutal-parse/scan.h b/src/libs/brutal-parse/scan.h similarity index 98% rename from sources/libs/brutal-parse/scan.h rename to src/libs/brutal-parse/scan.h index 58c3934bf..fd62503f3 100644 --- a/sources/libs/brutal-parse/scan.h +++ b/src/libs/brutal-parse/scan.h @@ -1,7 +1,6 @@ #pragma once -#include -#include +#include #include typedef int(ScanMatch)(int); diff --git a/sources/libs/brutal-sync/lock.c b/src/libs/brutal-sync/lock.c similarity index 100% rename from sources/libs/brutal-sync/lock.c rename to src/libs/brutal-sync/lock.c diff --git a/sources/libs/brutal-sync/lock.h b/src/libs/brutal-sync/lock.h similarity index 100% rename from sources/libs/brutal-sync/lock.h rename to src/libs/brutal-sync/lock.h diff --git a/sources/libs/brutal-sync/ref.h b/src/libs/brutal-sync/ref.h similarity index 100% rename from sources/libs/brutal-sync/ref.h rename to src/libs/brutal-sync/ref.h diff --git a/sources/libs/brutal-sync/rwlock.c b/src/libs/brutal-sync/rwlock.c similarity index 100% rename from sources/libs/brutal-sync/rwlock.c rename to src/libs/brutal-sync/rwlock.c diff --git a/sources/libs/brutal-sync/rwlock.h b/src/libs/brutal-sync/rwlock.h similarity index 100% rename from sources/libs/brutal-sync/rwlock.h rename to src/libs/brutal-sync/rwlock.h diff --git a/sources/libs/brutal-task/task.c b/src/libs/brutal-task/task.c similarity index 100% rename from sources/libs/brutal-task/task.c rename to src/libs/brutal-task/task.c diff --git a/sources/libs/brutal-task/task.h b/src/libs/brutal-task/task.h similarity index 100% rename from sources/libs/brutal-task/task.h rename to src/libs/brutal-task/task.h diff --git a/sources/libs/brutal-test/expect.h b/src/libs/brutal-test/expect.h similarity index 100% rename from sources/libs/brutal-test/expect.h rename to src/libs/brutal-test/expect.h diff --git a/sources/libs/brutal-test/hook-alloc.h b/src/libs/brutal-test/hook-alloc.h similarity index 100% rename from sources/libs/brutal-test/hook-alloc.h rename to src/libs/brutal-test/hook-alloc.h diff --git a/sources/libs/brutal-test/runner.c b/src/libs/brutal-test/runner.c similarity index 100% rename from sources/libs/brutal-test/runner.c rename to src/libs/brutal-test/runner.c diff --git a/sources/libs/brutal-test/runner.h b/src/libs/brutal-test/runner.h similarity index 100% rename from sources/libs/brutal-test/runner.h rename to src/libs/brutal-test/runner.h diff --git a/sources/libs/brutal-text/cp437.c b/src/libs/brutal-text/cp437.c similarity index 100% rename from sources/libs/brutal-text/cp437.c rename to src/libs/brutal-text/cp437.c diff --git a/sources/libs/brutal-text/cp437.h b/src/libs/brutal-text/cp437.h similarity index 100% rename from sources/libs/brutal-text/cp437.h rename to src/libs/brutal-text/cp437.h diff --git a/sources/libs/brutal-text/rune.h b/src/libs/brutal-text/rune.h similarity index 56% rename from sources/libs/brutal-text/rune.h rename to src/libs/brutal-text/rune.h index f805632ed..00f3806ca 100644 --- a/sources/libs/brutal-text/rune.h +++ b/src/libs/brutal-text/rune.h @@ -1,5 +1,5 @@ #pragma once -#include +#include typedef uint32_t Rune; diff --git a/sources/libs/brutal-text/str.c b/src/libs/brutal-text/str.c similarity index 100% rename from sources/libs/brutal-text/str.c rename to src/libs/brutal-text/str.c diff --git a/sources/libs/brutal-text/str.h b/src/libs/brutal-text/str.h similarity index 88% rename from sources/libs/brutal-text/str.h rename to src/libs/brutal-text/str.h index 473cf44bb..94cf0a09d 100644 --- a/sources/libs/brutal-text/str.h +++ b/src/libs/brutal-text/str.h @@ -1,6 +1,7 @@ #pragma once -#include +#include +#include Str str_dup(Str const str, Alloc *alloc); diff --git a/sources/libs/brutal-text/utf16.c b/src/libs/brutal-text/utf16.c similarity index 100% rename from sources/libs/brutal-text/utf16.c rename to src/libs/brutal-text/utf16.c diff --git a/sources/libs/brutal-text/utf16.h b/src/libs/brutal-text/utf16.h similarity index 100% rename from sources/libs/brutal-text/utf16.h rename to src/libs/brutal-text/utf16.h diff --git a/sources/libs/brutal-text/utf8.c b/src/libs/brutal-text/utf8.c similarity index 100% rename from sources/libs/brutal-text/utf8.c rename to src/libs/brutal-text/utf8.c diff --git a/sources/libs/brutal-text/utf8.h b/src/libs/brutal-text/utf8.h similarity index 91% rename from sources/libs/brutal-text/utf8.h rename to src/libs/brutal-text/utf8.h index 8393cb81f..7938898bd 100644 --- a/sources/libs/brutal-text/utf8.h +++ b/src/libs/brutal-text/utf8.h @@ -1,6 +1,7 @@ #pragma once -#include +#include +#include #include "rune.h" #include "str.h" diff --git a/sources/libs/brutal-text/vals.h b/src/libs/brutal-text/vals.h similarity index 100% rename from sources/libs/brutal-text/vals.h rename to src/libs/brutal-text/vals.h diff --git a/sources/libs/brutal-text/witty.c b/src/libs/brutal-text/witty.c similarity index 100% rename from sources/libs/brutal-text/witty.c rename to src/libs/brutal-text/witty.c diff --git a/sources/libs/brutal-text/witty.h b/src/libs/brutal-text/witty.h similarity index 100% rename from sources/libs/brutal-text/witty.h rename to src/libs/brutal-text/witty.h diff --git a/sources/libs/brutal-time/constants.h b/src/libs/brutal-time/constants.h similarity index 100% rename from sources/libs/brutal-time/constants.h rename to src/libs/brutal-time/constants.h diff --git a/sources/libs/brutal-time/convert.c b/src/libs/brutal-time/convert.c similarity index 100% rename from sources/libs/brutal-time/convert.c rename to src/libs/brutal-time/convert.c diff --git a/sources/libs/brutal-time/convert.h b/src/libs/brutal-time/convert.h similarity index 100% rename from sources/libs/brutal-time/convert.h rename to src/libs/brutal-time/convert.h diff --git a/sources/libs/brutal-time/query.c b/src/libs/brutal-time/query.c similarity index 100% rename from sources/libs/brutal-time/query.c rename to src/libs/brutal-time/query.c diff --git a/sources/libs/brutal-time/query.h b/src/libs/brutal-time/query.h similarity index 100% rename from sources/libs/brutal-time/query.h rename to src/libs/brutal-time/query.h diff --git a/sources/libs/brutal-time/types.h b/src/libs/brutal-time/types.h similarity index 92% rename from sources/libs/brutal-time/types.h rename to src/libs/brutal-time/types.h index 36653bc04..49613ffa3 100644 --- a/sources/libs/brutal-time/types.h +++ b/src/libs/brutal-time/types.h @@ -1,6 +1,7 @@ #pragma once -#include +#include +#include typedef uint64_t Tick; typedef uint64_t TimeStamp; diff --git a/sources/libs/bvm/base/res.h b/src/libs/bvm/base/res.h similarity index 100% rename from sources/libs/bvm/base/res.h rename to src/libs/bvm/base/res.h diff --git a/sources/libs/bvm/ctx.h b/src/libs/bvm/ctx.h similarity index 100% rename from sources/libs/bvm/ctx.h rename to src/libs/bvm/ctx.h diff --git a/sources/libs/bvm/ctx/global.c b/src/libs/bvm/ctx/global.c similarity index 100% rename from sources/libs/bvm/ctx/global.c rename to src/libs/bvm/ctx/global.c diff --git a/sources/libs/bvm/ctx/global.h b/src/libs/bvm/ctx/global.h similarity index 100% rename from sources/libs/bvm/ctx/global.h rename to src/libs/bvm/ctx/global.h diff --git a/sources/libs/bvm/ctx/local.c b/src/libs/bvm/ctx/local.c similarity index 100% rename from sources/libs/bvm/ctx/local.c rename to src/libs/bvm/ctx/local.c diff --git a/sources/libs/bvm/ctx/local.h b/src/libs/bvm/ctx/local.h similarity index 100% rename from sources/libs/bvm/ctx/local.h rename to src/libs/bvm/ctx/local.h diff --git a/sources/libs/bvm/eval.h b/src/libs/bvm/eval.h similarity index 100% rename from sources/libs/bvm/eval.h rename to src/libs/bvm/eval.h diff --git a/sources/libs/bvm/eval/eval.c b/src/libs/bvm/eval/eval.c similarity index 100% rename from sources/libs/bvm/eval/eval.c rename to src/libs/bvm/eval/eval.c diff --git a/sources/libs/bvm/eval/eval.h b/src/libs/bvm/eval/eval.h similarity index 100% rename from sources/libs/bvm/eval/eval.h rename to src/libs/bvm/eval/eval.h diff --git a/sources/libs/bvm/eval/instr.c b/src/libs/bvm/eval/instr.c similarity index 100% rename from sources/libs/bvm/eval/instr.c rename to src/libs/bvm/eval/instr.c diff --git a/sources/libs/bvm/eval/instr.h b/src/libs/bvm/eval/instr.h similarity index 100% rename from sources/libs/bvm/eval/instr.h rename to src/libs/bvm/eval/instr.h diff --git a/sources/libs/bvm/obj.h b/src/libs/bvm/obj.h similarity index 100% rename from sources/libs/bvm/obj.h rename to src/libs/bvm/obj.h diff --git a/sources/libs/bvm/obj/func.c b/src/libs/bvm/obj/func.c similarity index 100% rename from sources/libs/bvm/obj/func.c rename to src/libs/bvm/obj/func.c diff --git a/sources/libs/bvm/obj/func.h b/src/libs/bvm/obj/func.h similarity index 100% rename from sources/libs/bvm/obj/func.h rename to src/libs/bvm/obj/func.h diff --git a/sources/libs/bvm/obj/obj.c b/src/libs/bvm/obj/obj.c similarity index 100% rename from sources/libs/bvm/obj/obj.c rename to src/libs/bvm/obj/obj.c diff --git a/sources/libs/bvm/obj/obj.h b/src/libs/bvm/obj/obj.h similarity index 100% rename from sources/libs/bvm/obj/obj.h rename to src/libs/bvm/obj/obj.h diff --git a/sources/libs/bvm/obj/val.c b/src/libs/bvm/obj/val.c similarity index 100% rename from sources/libs/bvm/obj/val.c rename to src/libs/bvm/obj/val.c diff --git a/sources/libs/bvm/obj/val.h b/src/libs/bvm/obj/val.h similarity index 100% rename from sources/libs/bvm/obj/val.h rename to src/libs/bvm/obj/val.h diff --git a/sources/libs/cc/ast.h b/src/libs/cc/ast.h similarity index 100% rename from sources/libs/cc/ast.h rename to src/libs/cc/ast.h diff --git a/sources/libs/cc/ast/decl.h b/src/libs/cc/ast/decl.h similarity index 100% rename from sources/libs/cc/ast/decl.h rename to src/libs/cc/ast/decl.h diff --git a/sources/libs/cc/ast/expr.c b/src/libs/cc/ast/expr.c similarity index 100% rename from sources/libs/cc/ast/expr.c rename to src/libs/cc/ast/expr.c diff --git a/sources/libs/cc/ast/expr.h b/src/libs/cc/ast/expr.h similarity index 100% rename from sources/libs/cc/ast/expr.h rename to src/libs/cc/ast/expr.h diff --git a/sources/libs/cc/ast/stmt.c b/src/libs/cc/ast/stmt.c similarity index 100% rename from sources/libs/cc/ast/stmt.c rename to src/libs/cc/ast/stmt.c diff --git a/sources/libs/cc/ast/stmt.h b/src/libs/cc/ast/stmt.h similarity index 100% rename from sources/libs/cc/ast/stmt.h rename to src/libs/cc/ast/stmt.h diff --git a/sources/libs/cc/ast/type.c b/src/libs/cc/ast/type.c similarity index 100% rename from sources/libs/cc/ast/type.c rename to src/libs/cc/ast/type.c diff --git a/sources/libs/cc/ast/type.h b/src/libs/cc/ast/type.h similarity index 100% rename from sources/libs/cc/ast/type.h rename to src/libs/cc/ast/type.h diff --git a/sources/libs/cc/ast/unit.c b/src/libs/cc/ast/unit.c similarity index 100% rename from sources/libs/cc/ast/unit.c rename to src/libs/cc/ast/unit.c diff --git a/sources/libs/cc/ast/unit.h b/src/libs/cc/ast/unit.h similarity index 100% rename from sources/libs/cc/ast/unit.h rename to src/libs/cc/ast/unit.h diff --git a/sources/libs/cc/ast/val.c b/src/libs/cc/ast/val.c similarity index 100% rename from sources/libs/cc/ast/val.c rename to src/libs/cc/ast/val.c diff --git a/sources/libs/cc/ast/val.h b/src/libs/cc/ast/val.h similarity index 100% rename from sources/libs/cc/ast/val.h rename to src/libs/cc/ast/val.h diff --git a/sources/libs/cc/builder.h b/src/libs/cc/builder.h similarity index 100% rename from sources/libs/cc/builder.h rename to src/libs/cc/builder.h diff --git a/sources/libs/cc/builder/decl.c b/src/libs/cc/builder/decl.c similarity index 100% rename from sources/libs/cc/builder/decl.c rename to src/libs/cc/builder/decl.c diff --git a/sources/libs/cc/builder/decl.h b/src/libs/cc/builder/decl.h similarity index 100% rename from sources/libs/cc/builder/decl.h rename to src/libs/cc/builder/decl.h diff --git a/sources/libs/cc/builder/expr.c b/src/libs/cc/builder/expr.c similarity index 100% rename from sources/libs/cc/builder/expr.c rename to src/libs/cc/builder/expr.c diff --git a/sources/libs/cc/builder/expr.h b/src/libs/cc/builder/expr.h similarity index 100% rename from sources/libs/cc/builder/expr.h rename to src/libs/cc/builder/expr.h diff --git a/sources/libs/cc/builder/stmt.c b/src/libs/cc/builder/stmt.c similarity index 100% rename from sources/libs/cc/builder/stmt.c rename to src/libs/cc/builder/stmt.c diff --git a/sources/libs/cc/builder/stmt.h b/src/libs/cc/builder/stmt.h similarity index 100% rename from sources/libs/cc/builder/stmt.h rename to src/libs/cc/builder/stmt.h diff --git a/sources/libs/cc/builder/type.c b/src/libs/cc/builder/type.c similarity index 100% rename from sources/libs/cc/builder/type.c rename to src/libs/cc/builder/type.c diff --git a/sources/libs/cc/builder/type.h b/src/libs/cc/builder/type.h similarity index 100% rename from sources/libs/cc/builder/type.h rename to src/libs/cc/builder/type.h diff --git a/sources/libs/cc/builder/unit.c b/src/libs/cc/builder/unit.c similarity index 100% rename from sources/libs/cc/builder/unit.c rename to src/libs/cc/builder/unit.c diff --git a/sources/libs/cc/builder/unit.h b/src/libs/cc/builder/unit.h similarity index 100% rename from sources/libs/cc/builder/unit.h rename to src/libs/cc/builder/unit.h diff --git a/sources/libs/cc/builder/val.c b/src/libs/cc/builder/val.c similarity index 100% rename from sources/libs/cc/builder/val.c rename to src/libs/cc/builder/val.c diff --git a/sources/libs/cc/builder/val.h b/src/libs/cc/builder/val.h similarity index 100% rename from sources/libs/cc/builder/val.h rename to src/libs/cc/builder/val.h diff --git a/sources/libs/cc/dump.h b/src/libs/cc/dump.h similarity index 100% rename from sources/libs/cc/dump.h rename to src/libs/cc/dump.h diff --git a/sources/libs/cc/dump/dump.c b/src/libs/cc/dump/dump.c similarity index 100% rename from sources/libs/cc/dump/dump.c rename to src/libs/cc/dump/dump.c diff --git a/sources/libs/cc/lex.h b/src/libs/cc/lex.h similarity index 100% rename from sources/libs/cc/lex.h rename to src/libs/cc/lex.h diff --git a/sources/libs/cc/lex/lexemes.h b/src/libs/cc/lex/lexemes.h similarity index 100% rename from sources/libs/cc/lex/lexemes.h rename to src/libs/cc/lex/lexemes.h diff --git a/sources/libs/cc/lex/lexer.c b/src/libs/cc/lex/lexer.c similarity index 100% rename from sources/libs/cc/lex/lexer.c rename to src/libs/cc/lex/lexer.c diff --git a/sources/libs/cc/lex/lexer.h b/src/libs/cc/lex/lexer.h similarity index 100% rename from sources/libs/cc/lex/lexer.h rename to src/libs/cc/lex/lexer.h diff --git a/sources/libs/cc/lex/pproc.c b/src/libs/cc/lex/pproc.c similarity index 100% rename from sources/libs/cc/lex/pproc.c rename to src/libs/cc/lex/pproc.c diff --git a/sources/libs/cc/lex/pproc.h b/src/libs/cc/lex/pproc.h similarity index 100% rename from sources/libs/cc/lex/pproc.h rename to src/libs/cc/lex/pproc.h diff --git a/sources/libs/cc/parse.h b/src/libs/cc/parse.h similarity index 100% rename from sources/libs/cc/parse.h rename to src/libs/cc/parse.h diff --git a/sources/libs/cc/parse/cval.c b/src/libs/cc/parse/cval.c similarity index 100% rename from sources/libs/cc/parse/cval.c rename to src/libs/cc/parse/cval.c diff --git a/sources/libs/cc/parse/decl.c b/src/libs/cc/parse/decl.c similarity index 100% rename from sources/libs/cc/parse/decl.c rename to src/libs/cc/parse/decl.c diff --git a/sources/libs/cc/parse/expr.c b/src/libs/cc/parse/expr.c similarity index 100% rename from sources/libs/cc/parse/expr.c rename to src/libs/cc/parse/expr.c diff --git a/sources/libs/cc/parse/misc.c b/src/libs/cc/parse/misc.c similarity index 100% rename from sources/libs/cc/parse/misc.c rename to src/libs/cc/parse/misc.c diff --git a/sources/libs/cc/parse/parser.h b/src/libs/cc/parse/parser.h similarity index 100% rename from sources/libs/cc/parse/parser.h rename to src/libs/cc/parse/parser.h diff --git a/sources/libs/cc/parse/stmt.c b/src/libs/cc/parse/stmt.c similarity index 100% rename from sources/libs/cc/parse/stmt.c rename to src/libs/cc/parse/stmt.c diff --git a/sources/libs/cc/parse/type.c b/src/libs/cc/parse/type.c similarity index 100% rename from sources/libs/cc/parse/type.c rename to src/libs/cc/parse/type.c diff --git a/sources/libs/cc/parse/unit.c b/src/libs/cc/parse/unit.c similarity index 100% rename from sources/libs/cc/parse/unit.c rename to src/libs/cc/parse/unit.c diff --git a/sources/libs/cc/sema.h b/src/libs/cc/sema.h similarity index 100% rename from sources/libs/cc/sema.h rename to src/libs/cc/sema.h diff --git a/sources/libs/cc/sema/cast.c b/src/libs/cc/sema/cast.c similarity index 100% rename from sources/libs/cc/sema/cast.c rename to src/libs/cc/sema/cast.c diff --git a/sources/libs/cc/sema/cast.h b/src/libs/cc/sema/cast.h similarity index 100% rename from sources/libs/cc/sema/cast.h rename to src/libs/cc/sema/cast.h diff --git a/sources/libs/cc/sema/scope.c b/src/libs/cc/sema/scope.c similarity index 100% rename from sources/libs/cc/sema/scope.c rename to src/libs/cc/sema/scope.c diff --git a/sources/libs/cc/sema/scope.h b/src/libs/cc/sema/scope.h similarity index 100% rename from sources/libs/cc/sema/scope.h rename to src/libs/cc/sema/scope.h diff --git a/sources/libs/cc/sema/sema.c b/src/libs/cc/sema/sema.c similarity index 100% rename from sources/libs/cc/sema/sema.c rename to src/libs/cc/sema/sema.c diff --git a/sources/libs/cc/sema/sema.h b/src/libs/cc/sema/sema.h similarity index 100% rename from sources/libs/cc/sema/sema.h rename to src/libs/cc/sema/sema.h diff --git a/sources/libs/cc/sema/visit.c b/src/libs/cc/sema/visit.c similarity index 100% rename from sources/libs/cc/sema/visit.c rename to src/libs/cc/sema/visit.c diff --git a/sources/libs/cc/sema/visit.h b/src/libs/cc/sema/visit.h similarity index 100% rename from sources/libs/cc/sema/visit.h rename to src/libs/cc/sema/visit.h diff --git a/sources/libs/cc/sema/visit_statement.c b/src/libs/cc/sema/visit_statement.c similarity index 100% rename from sources/libs/cc/sema/visit_statement.c rename to src/libs/cc/sema/visit_statement.c diff --git a/sources/libs/cc/trans.h b/src/libs/cc/trans.h similarity index 100% rename from sources/libs/cc/trans.h rename to src/libs/cc/trans.h diff --git a/sources/libs/cc/trans/decl.c b/src/libs/cc/trans/decl.c similarity index 100% rename from sources/libs/cc/trans/decl.c rename to src/libs/cc/trans/decl.c diff --git a/sources/libs/cc/trans/expr.c b/src/libs/cc/trans/expr.c similarity index 100% rename from sources/libs/cc/trans/expr.c rename to src/libs/cc/trans/expr.c diff --git a/sources/libs/cc/trans/stmt.c b/src/libs/cc/trans/stmt.c similarity index 100% rename from sources/libs/cc/trans/stmt.c rename to src/libs/cc/trans/stmt.c diff --git a/sources/libs/cc/trans/type.c b/src/libs/cc/trans/type.c similarity index 100% rename from sources/libs/cc/trans/type.c rename to src/libs/cc/trans/type.c diff --git a/sources/libs/cc/trans/unit.c b/src/libs/cc/trans/unit.c similarity index 100% rename from sources/libs/cc/trans/unit.c rename to src/libs/cc/trans/unit.c diff --git a/sources/libs/cc/trans/val.c b/src/libs/cc/trans/val.c similarity index 100% rename from sources/libs/cc/trans/val.c rename to src/libs/cc/trans/val.c diff --git a/sources/libs/codec-deflate/constants.h b/src/libs/codec-deflate/constants.h similarity index 100% rename from sources/libs/codec-deflate/constants.h rename to src/libs/codec-deflate/constants.h diff --git a/sources/libs/codec-deflate/deflate.c b/src/libs/codec-deflate/deflate.c similarity index 100% rename from sources/libs/codec-deflate/deflate.c rename to src/libs/codec-deflate/deflate.c diff --git a/sources/libs/codec-deflate/deflate.h b/src/libs/codec-deflate/deflate.h similarity index 100% rename from sources/libs/codec-deflate/deflate.h rename to src/libs/codec-deflate/deflate.h diff --git a/sources/libs/codec-deflate/errors.h b/src/libs/codec-deflate/errors.h similarity index 100% rename from sources/libs/codec-deflate/errors.h rename to src/libs/codec-deflate/errors.h diff --git a/sources/libs/codec-deflate/huff.h b/src/libs/codec-deflate/huff.h similarity index 100% rename from sources/libs/codec-deflate/huff.h rename to src/libs/codec-deflate/huff.h diff --git a/sources/libs/codec-deflate/inflate.c b/src/libs/codec-deflate/inflate.c similarity index 100% rename from sources/libs/codec-deflate/inflate.c rename to src/libs/codec-deflate/inflate.c diff --git a/sources/libs/codec-deflate/inflate.h b/src/libs/codec-deflate/inflate.h similarity index 100% rename from sources/libs/codec-deflate/inflate.h rename to src/libs/codec-deflate/inflate.h diff --git a/sources/libs/codec-gzip/gzip.c b/src/libs/codec-gzip/gzip.c similarity index 100% rename from sources/libs/codec-gzip/gzip.c rename to src/libs/codec-gzip/gzip.c diff --git a/sources/libs/codec-gzip/gzip.h b/src/libs/codec-gzip/gzip.h similarity index 100% rename from sources/libs/codec-gzip/gzip.h rename to src/libs/codec-gzip/gzip.h diff --git a/sources/libs/codec-zlib/zlib.c b/src/libs/codec-zlib/zlib.c similarity index 100% rename from sources/libs/codec-zlib/zlib.c rename to src/libs/codec-zlib/zlib.c diff --git a/sources/libs/codec-zlib/zlib.h b/src/libs/codec-zlib/zlib.h similarity index 100% rename from sources/libs/codec-zlib/zlib.h rename to src/libs/codec-zlib/zlib.h diff --git a/sources/libs/elf/elf.c b/src/libs/elf/elf.c similarity index 100% rename from sources/libs/elf/elf.c rename to src/libs/elf/elf.c diff --git a/sources/libs/elf/elf.h b/src/libs/elf/elf.h similarity index 95% rename from sources/libs/elf/elf.h rename to src/libs/elf/elf.h index 4c75c70c3..ee1e38426 100644 --- a/sources/libs/elf/elf.h +++ b/src/libs/elf/elf.h @@ -1,6 +1,8 @@ #pragma once -#include +#include +#include +#include #define ELF_HEADER_MAGIC "\177ELF" diff --git a/sources/libs/embed/arm64/backtrace.c b/src/libs/embed/arm64/backtrace.c similarity index 84% rename from sources/libs/embed/arm64/backtrace.c rename to src/libs/embed/arm64/backtrace.c index 7480884d4..3839537d8 100644 --- a/sources/libs/embed/arm64/backtrace.c +++ b/src/libs/embed/arm64/backtrace.c @@ -1,4 +1,5 @@ #include +#include struct _StackFrame { diff --git a/sources/libs/embed/brutal/chan.c b/src/libs/embed/brutal/chan.c similarity index 100% rename from sources/libs/embed/brutal/chan.c rename to src/libs/embed/brutal/chan.c diff --git a/sources/libs/embed/brutal/debug.c b/src/libs/embed/brutal/debug.c similarity index 100% rename from sources/libs/embed/brutal/debug.c rename to src/libs/embed/brutal/debug.c diff --git a/sources/libs/embed/brutal/entry.c b/src/libs/embed/brutal/entry.c similarity index 100% rename from sources/libs/embed/brutal/entry.c rename to src/libs/embed/brutal/entry.c diff --git a/sources/libs/embed/brutal/file.c b/src/libs/embed/brutal/file.c similarity index 100% rename from sources/libs/embed/brutal/file.c rename to src/libs/embed/brutal/file.c diff --git a/sources/libs/embed/brutal/file.h b/src/libs/embed/brutal/file.h similarity index 100% rename from sources/libs/embed/brutal/file.h rename to src/libs/embed/brutal/file.h diff --git a/sources/libs/embed/brutal/log.c b/src/libs/embed/brutal/log.c similarity index 100% rename from sources/libs/embed/brutal/log.c rename to src/libs/embed/brutal/log.c diff --git a/sources/libs/embed/brutal/mem.c b/src/libs/embed/brutal/mem.c similarity index 100% rename from sources/libs/embed/brutal/mem.c rename to src/libs/embed/brutal/mem.c diff --git a/sources/libs/embed/brutal/sync.c b/src/libs/embed/brutal/sync.c similarity index 100% rename from sources/libs/embed/brutal/sync.c rename to src/libs/embed/brutal/sync.c diff --git a/sources/libs/embed/brutal/task.c b/src/libs/embed/brutal/task.c similarity index 100% rename from sources/libs/embed/brutal/task.c rename to src/libs/embed/brutal/task.c diff --git a/sources/libs/embed/brutal/time.c b/src/libs/embed/brutal/time.c similarity index 100% rename from sources/libs/embed/brutal/time.c rename to src/libs/embed/brutal/time.c diff --git a/sources/libs/embed/brutal/x86_64/crt0.s b/src/libs/embed/brutal/x86_64/crt0.s similarity index 100% rename from sources/libs/embed/brutal/x86_64/crt0.s rename to src/libs/embed/brutal/x86_64/crt0.s diff --git a/sources/libs/embed/brutal/x86_64/crti.s b/src/libs/embed/brutal/x86_64/crti.s similarity index 100% rename from sources/libs/embed/brutal/x86_64/crti.s rename to src/libs/embed/brutal/x86_64/crti.s diff --git a/sources/libs/embed/brutal/x86_64/crtn.s b/src/libs/embed/brutal/x86_64/crtn.s similarity index 100% rename from sources/libs/embed/brutal/x86_64/crtn.s rename to src/libs/embed/brutal/x86_64/crtn.s diff --git a/sources/libs/embed/chan.h b/src/libs/embed/chan.h similarity index 100% rename from sources/libs/embed/chan.h rename to src/libs/embed/chan.h diff --git a/sources/libs/embed/crypto.h b/src/libs/embed/crypto.h similarity index 69% rename from sources/libs/embed/crypto.h rename to src/libs/embed/crypto.h index 074a59b94..55aae616f 100644 --- a/sources/libs/embed/crypto.h +++ b/src/libs/embed/crypto.h @@ -1,5 +1,5 @@ #pragma once -#include +#include size_t embed_crypto_entropy(void *buf, size_t len); diff --git a/sources/libs/embed/debug.h b/src/libs/embed/debug.h similarity index 65% rename from sources/libs/embed/debug.h rename to src/libs/embed/debug.h index 86f87c742..87ddd3f3b 100644 --- a/sources/libs/embed/debug.h +++ b/src/libs/embed/debug.h @@ -1,8 +1,7 @@ #pragma once -#include -#include - +#include +#include void embed_log_prefix(IoWriter writer); size_t embed_debug_backtrace(uintptr_t *buf, size_t cap); diff --git a/sources/libs/embed/efi/chan.c b/src/libs/embed/efi/chan.c similarity index 100% rename from sources/libs/embed/efi/chan.c rename to src/libs/embed/efi/chan.c diff --git a/sources/libs/embed/efi/chkstk.c b/src/libs/embed/efi/chkstk.c similarity index 100% rename from sources/libs/embed/efi/chkstk.c rename to src/libs/embed/efi/chkstk.c diff --git a/sources/libs/embed/efi/debug.c b/src/libs/embed/efi/debug.c similarity index 100% rename from sources/libs/embed/efi/debug.c rename to src/libs/embed/efi/debug.c diff --git a/sources/libs/embed/efi/file.c b/src/libs/embed/efi/file.c similarity index 100% rename from sources/libs/embed/efi/file.c rename to src/libs/embed/efi/file.c diff --git a/sources/libs/embed/efi/file.h b/src/libs/embed/efi/file.h similarity index 100% rename from sources/libs/embed/efi/file.h rename to src/libs/embed/efi/file.h diff --git a/sources/libs/embed/efi/log.c b/src/libs/embed/efi/log.c similarity index 100% rename from sources/libs/embed/efi/log.c rename to src/libs/embed/efi/log.c diff --git a/sources/libs/embed/efi/mem.c b/src/libs/embed/efi/mem.c similarity index 100% rename from sources/libs/embed/efi/mem.c rename to src/libs/embed/efi/mem.c diff --git a/sources/libs/embed/file-decl.h b/src/libs/embed/file-decl.h similarity index 93% rename from sources/libs/embed/file-decl.h rename to src/libs/embed/file-decl.h index 61bb4d679..3af5b4950 100644 --- a/sources/libs/embed/file-decl.h +++ b/src/libs/embed/file-decl.h @@ -1,6 +1,5 @@ #pragma once -#include #if defined(SYSTEM_EFI) # include diff --git a/sources/libs/embed/file.h b/src/libs/embed/file.h similarity index 100% rename from sources/libs/embed/file.h rename to src/libs/embed/file.h diff --git a/sources/libs/embed/kernel/debug.c b/src/libs/embed/kernel/debug.c similarity index 100% rename from sources/libs/embed/kernel/debug.c rename to src/libs/embed/kernel/debug.c diff --git a/sources/libs/embed/kernel/log.c b/src/libs/embed/kernel/log.c similarity index 100% rename from sources/libs/embed/kernel/log.c rename to src/libs/embed/kernel/log.c diff --git a/sources/libs/embed/kernel/mem.c b/src/libs/embed/kernel/mem.c similarity index 100% rename from sources/libs/embed/kernel/mem.c rename to src/libs/embed/kernel/mem.c diff --git a/sources/libs/embed/kernel/sync.c b/src/libs/embed/kernel/sync.c similarity index 100% rename from sources/libs/embed/kernel/sync.c rename to src/libs/embed/kernel/sync.c diff --git a/sources/libs/embed/log.h b/src/libs/embed/log.h similarity index 82% rename from sources/libs/embed/log.h rename to src/libs/embed/log.h index 61f7c7bf6..7c025965e 100644 --- a/sources/libs/embed/log.h +++ b/src/libs/embed/log.h @@ -1,6 +1,6 @@ #pragma once -#include +#include void embed_log_lock(void); diff --git a/src/libs/embed/manifest.json b/src/libs/embed/manifest.json new file mode 100644 index 000000000..bb537e54c --- /dev/null +++ b/src/libs/embed/manifest.json @@ -0,0 +1,7 @@ +{ + "id": "embed", + "type": "lib", + "description": "Embed utility library", + "requires": [ + ] +} \ No newline at end of file diff --git a/sources/libs/embed/mem.h b/src/libs/embed/mem.h similarity index 95% rename from sources/libs/embed/mem.h rename to src/libs/embed/mem.h index 6dfd446b3..b8a2c5fc9 100644 --- a/sources/libs/embed/mem.h +++ b/src/libs/embed/mem.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #if defined(__x86_64__) # define EMBED_HAS_MEMSET 1 diff --git a/sources/libs/embed/posix/chan.c b/src/libs/embed/posix/chan.c similarity index 100% rename from sources/libs/embed/posix/chan.c rename to src/libs/embed/posix/chan.c diff --git a/sources/libs/embed/posix/crypto.c b/src/libs/embed/posix/crypto.c similarity index 100% rename from sources/libs/embed/posix/crypto.c rename to src/libs/embed/posix/crypto.c diff --git a/sources/libs/embed/posix/debug.c b/src/libs/embed/posix/debug.c similarity index 100% rename from sources/libs/embed/posix/debug.c rename to src/libs/embed/posix/debug.c diff --git a/sources/libs/embed/posix/err.c b/src/libs/embed/posix/err.c similarity index 100% rename from sources/libs/embed/posix/err.c rename to src/libs/embed/posix/err.c diff --git a/sources/libs/embed/posix/err.h b/src/libs/embed/posix/err.h similarity index 100% rename from sources/libs/embed/posix/err.h rename to src/libs/embed/posix/err.h diff --git a/sources/libs/embed/posix/file.c b/src/libs/embed/posix/file.c similarity index 100% rename from sources/libs/embed/posix/file.c rename to src/libs/embed/posix/file.c diff --git a/sources/libs/embed/posix/file.h b/src/libs/embed/posix/file.h similarity index 100% rename from sources/libs/embed/posix/file.h rename to src/libs/embed/posix/file.h diff --git a/sources/libs/embed/posix/log.c b/src/libs/embed/posix/log.c similarity index 100% rename from sources/libs/embed/posix/log.c rename to src/libs/embed/posix/log.c diff --git a/sources/libs/embed/posix/mem.c b/src/libs/embed/posix/mem.c similarity index 100% rename from sources/libs/embed/posix/mem.c rename to src/libs/embed/posix/mem.c diff --git a/sources/libs/embed/posix/sync.c b/src/libs/embed/posix/sync.c similarity index 100% rename from sources/libs/embed/posix/sync.c rename to src/libs/embed/posix/sync.c diff --git a/sources/libs/embed/posix/task.c b/src/libs/embed/posix/task.c similarity index 100% rename from sources/libs/embed/posix/task.c rename to src/libs/embed/posix/task.c diff --git a/sources/libs/embed/posix/time.c b/src/libs/embed/posix/time.c similarity index 100% rename from sources/libs/embed/posix/time.c rename to src/libs/embed/posix/time.c diff --git a/sources/libs/embed/riscv64/backtrace.c b/src/libs/embed/riscv64/backtrace.c similarity index 100% rename from sources/libs/embed/riscv64/backtrace.c rename to src/libs/embed/riscv64/backtrace.c diff --git a/sources/libs/embed/riscv64/fibers.s b/src/libs/embed/riscv64/fibers.s similarity index 100% rename from sources/libs/embed/riscv64/fibers.s rename to src/libs/embed/riscv64/fibers.s diff --git a/sources/libs/embed/sync.h b/src/libs/embed/sync.h similarity index 100% rename from sources/libs/embed/sync.h rename to src/libs/embed/sync.h diff --git a/sources/libs/embed/task.h b/src/libs/embed/task.h similarity index 86% rename from sources/libs/embed/task.h rename to src/libs/embed/task.h index 49fb39d00..733b872f1 100644 --- a/sources/libs/embed/task.h +++ b/src/libs/embed/task.h @@ -1,6 +1,5 @@ #pragma once -#include int embed_task_self(void); diff --git a/sources/libs/embed/time.h b/src/libs/embed/time.h similarity index 100% rename from sources/libs/embed/time.h rename to src/libs/embed/time.h diff --git a/sources/libs/embed/x86_64/backtrace.c b/src/libs/embed/x86_64/backtrace.c similarity index 95% rename from sources/libs/embed/x86_64/backtrace.c rename to src/libs/embed/x86_64/backtrace.c index 0470e298e..204b69eb1 100644 --- a/sources/libs/embed/x86_64/backtrace.c +++ b/src/libs/embed/x86_64/backtrace.c @@ -1,5 +1,5 @@ -#include +#include struct _StackFrame { struct _StackFrame *rbp; diff --git a/sources/libs/embed/x86_64/copy.c b/src/libs/embed/x86_64/copy.c similarity index 100% rename from sources/libs/embed/x86_64/copy.c rename to src/libs/embed/x86_64/copy.c diff --git a/sources/libs/embed/x86_64/fibers.s b/src/libs/embed/x86_64/fibers.s similarity index 100% rename from sources/libs/embed/x86_64/fibers.s rename to src/libs/embed/x86_64/fibers.s diff --git a/sources/libs/embed/x86_64/pause.c b/src/libs/embed/x86_64/pause.c similarity index 100% rename from sources/libs/embed/x86_64/pause.c rename to src/libs/embed/x86_64/pause.c diff --git a/sources/libs/embed/x86_64/set.c b/src/libs/embed/x86_64/set.c similarity index 100% rename from sources/libs/embed/x86_64/set.c rename to src/libs/embed/x86_64/set.c diff --git a/sources/libs/fs/block.c b/src/libs/fs/block.c similarity index 100% rename from sources/libs/fs/block.c rename to src/libs/fs/block.c diff --git a/sources/libs/fs/block.h b/src/libs/fs/block.h similarity index 100% rename from sources/libs/fs/block.h rename to src/libs/fs/block.h diff --git a/sources/libs/fs/ext2/block.c b/src/libs/fs/ext2/block.c similarity index 100% rename from sources/libs/fs/ext2/block.c rename to src/libs/fs/ext2/block.c diff --git a/sources/libs/fs/ext2/block.h b/src/libs/fs/ext2/block.h similarity index 100% rename from sources/libs/fs/ext2/block.h rename to src/libs/fs/ext2/block.h diff --git a/sources/libs/fs/ext2/cache.c b/src/libs/fs/ext2/cache.c similarity index 100% rename from sources/libs/fs/ext2/cache.c rename to src/libs/fs/ext2/cache.c diff --git a/sources/libs/fs/ext2/cache.h b/src/libs/fs/ext2/cache.h similarity index 100% rename from sources/libs/fs/ext2/cache.h rename to src/libs/fs/ext2/cache.h diff --git a/sources/libs/fs/ext2/ext2.c b/src/libs/fs/ext2/ext2.c similarity index 100% rename from sources/libs/fs/ext2/ext2.c rename to src/libs/fs/ext2/ext2.c diff --git a/sources/libs/fs/ext2/ext2.h b/src/libs/fs/ext2/ext2.h similarity index 100% rename from sources/libs/fs/ext2/ext2.h rename to src/libs/fs/ext2/ext2.h diff --git a/sources/libs/fs/ext2/structure.c b/src/libs/fs/ext2/structure.c similarity index 100% rename from sources/libs/fs/ext2/structure.c rename to src/libs/fs/ext2/structure.c diff --git a/sources/libs/fs/ext2/structure.h b/src/libs/fs/ext2/structure.h similarity index 100% rename from sources/libs/fs/ext2/structure.h rename to src/libs/fs/ext2/structure.h diff --git a/sources/libs/fs/fs.h b/src/libs/fs/fs.h similarity index 100% rename from sources/libs/fs/fs.h rename to src/libs/fs/fs.h diff --git a/sources/libs/handover/builder.c b/src/libs/handover/builder.c similarity index 100% rename from sources/libs/handover/builder.c rename to src/libs/handover/builder.c diff --git a/sources/libs/handover/builder.h b/src/libs/handover/builder.h similarity index 100% rename from sources/libs/handover/builder.h rename to src/libs/handover/builder.h diff --git a/sources/libs/handover/handover.c b/src/libs/handover/handover.c similarity index 100% rename from sources/libs/handover/handover.c rename to src/libs/handover/handover.c diff --git a/sources/libs/handover/handover.h b/src/libs/handover/handover.h similarity index 100% rename from sources/libs/handover/handover.h rename to src/libs/handover/handover.h diff --git a/sources/libs/hw/acpi/base.c b/src/libs/hw/acpi/base.c similarity index 100% rename from sources/libs/hw/acpi/base.c rename to src/libs/hw/acpi/base.c diff --git a/sources/libs/hw/acpi/base.h b/src/libs/hw/acpi/base.h similarity index 100% rename from sources/libs/hw/acpi/base.h rename to src/libs/hw/acpi/base.h diff --git a/sources/libs/hw/acpi/hpet.h b/src/libs/hw/acpi/hpet.h similarity index 100% rename from sources/libs/hw/acpi/hpet.h rename to src/libs/hw/acpi/hpet.h diff --git a/sources/libs/hw/acpi/madt.c b/src/libs/hw/acpi/madt.c similarity index 100% rename from sources/libs/hw/acpi/madt.c rename to src/libs/hw/acpi/madt.c diff --git a/sources/libs/hw/acpi/madt.h b/src/libs/hw/acpi/madt.h similarity index 100% rename from sources/libs/hw/acpi/madt.h rename to src/libs/hw/acpi/madt.h diff --git a/sources/libs/hw/acpi/mcfg.h b/src/libs/hw/acpi/mcfg.h similarity index 100% rename from sources/libs/hw/acpi/mcfg.h rename to src/libs/hw/acpi/mcfg.h diff --git a/sources/libs/hw/acpi/rsdt.c b/src/libs/hw/acpi/rsdt.c similarity index 100% rename from sources/libs/hw/acpi/rsdt.c rename to src/libs/hw/acpi/rsdt.c diff --git a/sources/libs/hw/acpi/rsdt.h b/src/libs/hw/acpi/rsdt.h similarity index 100% rename from sources/libs/hw/acpi/rsdt.h rename to src/libs/hw/acpi/rsdt.h diff --git a/sources/libs/hw/acpi/stdh.h b/src/libs/hw/acpi/stdh.h similarity index 100% rename from sources/libs/hw/acpi/stdh.h rename to src/libs/hw/acpi/stdh.h diff --git a/sources/libs/hw/ahci/ahci.c b/src/libs/hw/ahci/ahci.c similarity index 100% rename from sources/libs/hw/ahci/ahci.c rename to src/libs/hw/ahci/ahci.c diff --git a/sources/libs/hw/ahci/ahci.h b/src/libs/hw/ahci/ahci.h similarity index 100% rename from sources/libs/hw/ahci/ahci.h rename to src/libs/hw/ahci/ahci.h diff --git a/sources/libs/hw/ahci/device.c b/src/libs/hw/ahci/device.c similarity index 100% rename from sources/libs/hw/ahci/device.c rename to src/libs/hw/ahci/device.c diff --git a/sources/libs/hw/ahci/device.h b/src/libs/hw/ahci/device.h similarity index 100% rename from sources/libs/hw/ahci/device.h rename to src/libs/hw/ahci/device.h diff --git a/sources/libs/hw/ahci/fis.h b/src/libs/hw/ahci/fis.h similarity index 100% rename from sources/libs/hw/ahci/fis.h rename to src/libs/hw/ahci/fis.h diff --git a/sources/libs/hw/ahci/hba.h b/src/libs/hw/ahci/hba.h similarity index 100% rename from sources/libs/hw/ahci/hba.h rename to src/libs/hw/ahci/hba.h diff --git a/sources/libs/hw/efi/lib.c b/src/libs/hw/efi/lib.c similarity index 100% rename from sources/libs/hw/efi/lib.c rename to src/libs/hw/efi/lib.c diff --git a/sources/libs/hw/efi/lib.h b/src/libs/hw/efi/lib.h similarity index 100% rename from sources/libs/hw/efi/lib.h rename to src/libs/hw/efi/lib.h diff --git a/sources/libs/hw/efi/protos.h b/src/libs/hw/efi/protos.h similarity index 100% rename from sources/libs/hw/efi/protos.h rename to src/libs/hw/efi/protos.h diff --git a/sources/libs/hw/efi/protos/dpp.h b/src/libs/hw/efi/protos/dpp.h similarity index 100% rename from sources/libs/hw/efi/protos/dpp.h rename to src/libs/hw/efi/protos/dpp.h diff --git a/sources/libs/hw/efi/protos/fp.h b/src/libs/hw/efi/protos/fp.h similarity index 100% rename from sources/libs/hw/efi/protos/fp.h rename to src/libs/hw/efi/protos/fp.h diff --git a/sources/libs/hw/efi/protos/gop.h b/src/libs/hw/efi/protos/gop.h similarity index 100% rename from sources/libs/hw/efi/protos/gop.h rename to src/libs/hw/efi/protos/gop.h diff --git a/sources/libs/hw/efi/protos/lip.h b/src/libs/hw/efi/protos/lip.h similarity index 100% rename from sources/libs/hw/efi/protos/lip.h rename to src/libs/hw/efi/protos/lip.h diff --git a/sources/libs/hw/efi/protos/sfsp.h b/src/libs/hw/efi/protos/sfsp.h similarity index 100% rename from sources/libs/hw/efi/protos/sfsp.h rename to src/libs/hw/efi/protos/sfsp.h diff --git a/sources/libs/hw/efi/protos/stip.h b/src/libs/hw/efi/protos/stip.h similarity index 100% rename from sources/libs/hw/efi/protos/stip.h rename to src/libs/hw/efi/protos/stip.h diff --git a/sources/libs/hw/efi/protos/stop.h b/src/libs/hw/efi/protos/stop.h similarity index 100% rename from sources/libs/hw/efi/protos/stop.h rename to src/libs/hw/efi/protos/stop.h diff --git a/sources/libs/hw/efi/srvs.h b/src/libs/hw/efi/srvs.h similarity index 100% rename from sources/libs/hw/efi/srvs.h rename to src/libs/hw/efi/srvs.h diff --git a/sources/libs/hw/efi/srvs/bs.h b/src/libs/hw/efi/srvs/bs.h similarity index 100% rename from sources/libs/hw/efi/srvs/bs.h rename to src/libs/hw/efi/srvs/bs.h diff --git a/sources/libs/hw/efi/srvs/rs.h b/src/libs/hw/efi/srvs/rs.h similarity index 100% rename from sources/libs/hw/efi/srvs/rs.h rename to src/libs/hw/efi/srvs/rs.h diff --git a/sources/libs/hw/efi/tables.h b/src/libs/hw/efi/tables.h similarity index 100% rename from sources/libs/hw/efi/tables.h rename to src/libs/hw/efi/tables.h diff --git a/sources/libs/hw/efi/tables/ct.h b/src/libs/hw/efi/tables/ct.h similarity index 100% rename from sources/libs/hw/efi/tables/ct.h rename to src/libs/hw/efi/tables/ct.h diff --git a/sources/libs/hw/efi/tables/st.h b/src/libs/hw/efi/tables/st.h similarity index 100% rename from sources/libs/hw/efi/tables/st.h rename to src/libs/hw/efi/tables/st.h diff --git a/sources/libs/hw/efi/tty.c b/src/libs/hw/efi/tty.c similarity index 100% rename from sources/libs/hw/efi/tty.c rename to src/libs/hw/efi/tty.c diff --git a/sources/libs/hw/efi/tty.h b/src/libs/hw/efi/tty.h similarity index 100% rename from sources/libs/hw/efi/tty.h rename to src/libs/hw/efi/tty.h diff --git a/sources/libs/hw/efi/types.h b/src/libs/hw/efi/types.h similarity index 100% rename from sources/libs/hw/efi/types.h rename to src/libs/hw/efi/types.h diff --git a/sources/libs/hw/fdt/fdt.c b/src/libs/hw/fdt/fdt.c similarity index 100% rename from sources/libs/hw/fdt/fdt.c rename to src/libs/hw/fdt/fdt.c diff --git a/sources/libs/hw/fdt/fdt.h b/src/libs/hw/fdt/fdt.h similarity index 100% rename from sources/libs/hw/fdt/fdt.h rename to src/libs/hw/fdt/fdt.h diff --git a/sources/libs/hw/fdt/handover.c b/src/libs/hw/fdt/handover.c similarity index 100% rename from sources/libs/hw/fdt/handover.c rename to src/libs/hw/fdt/handover.c diff --git a/sources/libs/hw/fdt/handover.h b/src/libs/hw/fdt/handover.h similarity index 100% rename from sources/libs/hw/fdt/handover.h rename to src/libs/hw/fdt/handover.h diff --git a/sources/libs/hw/pci/addr.h b/src/libs/hw/pci/addr.h similarity index 100% rename from sources/libs/hw/pci/addr.h rename to src/libs/hw/pci/addr.h diff --git a/sources/libs/hw/pci/capabilities.c b/src/libs/hw/pci/capabilities.c similarity index 100% rename from sources/libs/hw/pci/capabilities.c rename to src/libs/hw/pci/capabilities.c diff --git a/sources/libs/hw/pci/capabilities.h b/src/libs/hw/pci/capabilities.h similarity index 100% rename from sources/libs/hw/pci/capabilities.h rename to src/libs/hw/pci/capabilities.h diff --git a/sources/libs/hw/pci/config.h b/src/libs/hw/pci/config.h similarity index 100% rename from sources/libs/hw/pci/config.h rename to src/libs/hw/pci/config.h diff --git a/sources/libs/hw/pci/group.c b/src/libs/hw/pci/group.c similarity index 100% rename from sources/libs/hw/pci/group.c rename to src/libs/hw/pci/group.c diff --git a/sources/libs/hw/pci/group.h b/src/libs/hw/pci/group.h similarity index 100% rename from sources/libs/hw/pci/group.h rename to src/libs/hw/pci/group.h diff --git a/sources/libs/hw/pci/pci.c b/src/libs/hw/pci/pci.c similarity index 100% rename from sources/libs/hw/pci/pci.c rename to src/libs/hw/pci/pci.c diff --git a/sources/libs/hw/pci/pci.h b/src/libs/hw/pci/pci.h similarity index 100% rename from sources/libs/hw/pci/pci.h rename to src/libs/hw/pci/pci.h diff --git a/sources/libs/hw/ps2/controller.c b/src/libs/hw/ps2/controller.c similarity index 100% rename from sources/libs/hw/ps2/controller.c rename to src/libs/hw/ps2/controller.c diff --git a/sources/libs/hw/ps2/controller.h b/src/libs/hw/ps2/controller.h similarity index 100% rename from sources/libs/hw/ps2/controller.h rename to src/libs/hw/ps2/controller.h diff --git a/sources/libs/hw/ps2/keyboard.c b/src/libs/hw/ps2/keyboard.c similarity index 100% rename from sources/libs/hw/ps2/keyboard.c rename to src/libs/hw/ps2/keyboard.c diff --git a/sources/libs/hw/ps2/keyboard.h b/src/libs/hw/ps2/keyboard.h similarity index 100% rename from sources/libs/hw/ps2/keyboard.h rename to src/libs/hw/ps2/keyboard.h diff --git a/sources/libs/hw/ps2/mouse.c b/src/libs/hw/ps2/mouse.c similarity index 100% rename from sources/libs/hw/ps2/mouse.c rename to src/libs/hw/ps2/mouse.c diff --git a/sources/libs/hw/ps2/mouse.h b/src/libs/hw/ps2/mouse.h similarity index 100% rename from sources/libs/hw/ps2/mouse.h rename to src/libs/hw/ps2/mouse.h diff --git a/sources/libs/hw/ps2/ps2.h b/src/libs/hw/ps2/ps2.h similarity index 100% rename from sources/libs/hw/ps2/ps2.h rename to src/libs/hw/ps2/ps2.h diff --git a/sources/libs/hw/uart/uart.c b/src/libs/hw/uart/uart.c similarity index 100% rename from sources/libs/hw/uart/uart.c rename to src/libs/hw/uart/uart.c diff --git a/sources/libs/hw/uart/uart.h b/src/libs/hw/uart/uart.h similarity index 100% rename from sources/libs/hw/uart/uart.h rename to src/libs/hw/uart/uart.h diff --git a/sources/libs/hw/virtio/config.c b/src/libs/hw/virtio/config.c similarity index 100% rename from sources/libs/hw/virtio/config.c rename to src/libs/hw/virtio/config.c diff --git a/sources/libs/hw/virtio/config.h b/src/libs/hw/virtio/config.h similarity index 100% rename from sources/libs/hw/virtio/config.h rename to src/libs/hw/virtio/config.h diff --git a/sources/libs/hw/virtio/device.c b/src/libs/hw/virtio/device.c similarity index 100% rename from sources/libs/hw/virtio/device.c rename to src/libs/hw/virtio/device.c diff --git a/sources/libs/hw/virtio/device.h b/src/libs/hw/virtio/device.h similarity index 100% rename from sources/libs/hw/virtio/device.h rename to src/libs/hw/virtio/device.h diff --git a/sources/libs/hw/virtio/device/block.c b/src/libs/hw/virtio/device/block.c similarity index 100% rename from sources/libs/hw/virtio/device/block.c rename to src/libs/hw/virtio/device/block.c diff --git a/sources/libs/hw/virtio/device/block.h b/src/libs/hw/virtio/device/block.h similarity index 100% rename from sources/libs/hw/virtio/device/block.h rename to src/libs/hw/virtio/device/block.h diff --git a/sources/utils/bvm/manifest.json b/src/libs/hw/virtio/device/entropy.c similarity index 100% rename from sources/utils/bvm/manifest.json rename to src/libs/hw/virtio/device/entropy.c diff --git a/sources/libs/hw/virtio/device/entropy.h b/src/libs/hw/virtio/device/entropy.h similarity index 100% rename from sources/libs/hw/virtio/device/entropy.h rename to src/libs/hw/virtio/device/entropy.h diff --git a/sources/libs/hw/virtio/features.h b/src/libs/hw/virtio/features.h similarity index 100% rename from sources/libs/hw/virtio/features.h rename to src/libs/hw/virtio/features.h diff --git a/sources/libs/hw/virtio/notification.c b/src/libs/hw/virtio/notification.c similarity index 100% rename from sources/libs/hw/virtio/notification.c rename to src/libs/hw/virtio/notification.c diff --git a/sources/libs/hw/virtio/notification.h b/src/libs/hw/virtio/notification.h similarity index 100% rename from sources/libs/hw/virtio/notification.h rename to src/libs/hw/virtio/notification.h diff --git a/sources/libs/hw/virtio/splitvqueue.c b/src/libs/hw/virtio/splitvqueue.c similarity index 100% rename from sources/libs/hw/virtio/splitvqueue.c rename to src/libs/hw/virtio/splitvqueue.c diff --git a/sources/libs/hw/virtio/splitvqueue.h b/src/libs/hw/virtio/splitvqueue.h similarity index 100% rename from sources/libs/hw/virtio/splitvqueue.h rename to src/libs/hw/virtio/splitvqueue.h diff --git a/sources/libs/hw/virtio/virtqueue.h b/src/libs/hw/virtio/virtqueue.h similarity index 100% rename from sources/libs/hw/virtio/virtqueue.h rename to src/libs/hw/virtio/virtqueue.h diff --git a/sources/libs/idl/ast.h b/src/libs/idl/ast.h similarity index 100% rename from sources/libs/idl/ast.h rename to src/libs/idl/ast.h diff --git a/sources/libs/idl/ast/builder.c b/src/libs/idl/ast/builder.c similarity index 100% rename from sources/libs/idl/ast/builder.c rename to src/libs/idl/ast/builder.c diff --git a/sources/libs/idl/ast/builder.h b/src/libs/idl/ast/builder.h similarity index 100% rename from sources/libs/idl/ast/builder.h rename to src/libs/idl/ast/builder.h diff --git a/sources/libs/idl/ast/iface.h b/src/libs/idl/ast/iface.h similarity index 100% rename from sources/libs/idl/ast/iface.h rename to src/libs/idl/ast/iface.h diff --git a/sources/libs/idl/ast/query.c b/src/libs/idl/ast/query.c similarity index 100% rename from sources/libs/idl/ast/query.c rename to src/libs/idl/ast/query.c diff --git a/sources/libs/idl/ast/query.h b/src/libs/idl/ast/query.h similarity index 100% rename from sources/libs/idl/ast/query.h rename to src/libs/idl/ast/query.h diff --git a/sources/libs/idl/ast/types.h b/src/libs/idl/ast/types.h similarity index 100% rename from sources/libs/idl/ast/types.h rename to src/libs/idl/ast/types.h diff --git a/sources/libs/idl/cgen.h b/src/libs/idl/cgen.h similarity index 100% rename from sources/libs/idl/cgen.h rename to src/libs/idl/cgen.h diff --git a/sources/libs/idl/cgen/binding.c b/src/libs/idl/cgen/binding.c similarity index 100% rename from sources/libs/idl/cgen/binding.c rename to src/libs/idl/cgen/binding.c diff --git a/sources/libs/idl/cgen/dispatch.c b/src/libs/idl/cgen/dispatch.c similarity index 100% rename from sources/libs/idl/cgen/dispatch.c rename to src/libs/idl/cgen/dispatch.c diff --git a/sources/libs/idl/cgen/handler.c b/src/libs/idl/cgen/handler.c similarity index 100% rename from sources/libs/idl/cgen/handler.c rename to src/libs/idl/cgen/handler.c diff --git a/sources/libs/idl/cgen/header.c b/src/libs/idl/cgen/header.c similarity index 100% rename from sources/libs/idl/cgen/header.c rename to src/libs/idl/cgen/header.c diff --git a/sources/libs/idl/cgen/includes.c b/src/libs/idl/cgen/includes.c similarity index 100% rename from sources/libs/idl/cgen/includes.c rename to src/libs/idl/cgen/includes.c diff --git a/sources/libs/idl/cgen/method.c b/src/libs/idl/cgen/method.c similarity index 100% rename from sources/libs/idl/cgen/method.c rename to src/libs/idl/cgen/method.c diff --git a/sources/libs/idl/cgen/pack.c b/src/libs/idl/cgen/pack.c similarity index 100% rename from sources/libs/idl/cgen/pack.c rename to src/libs/idl/cgen/pack.c diff --git a/sources/libs/idl/cgen/provider.c b/src/libs/idl/cgen/provider.c similarity index 100% rename from sources/libs/idl/cgen/provider.c rename to src/libs/idl/cgen/provider.c diff --git a/sources/libs/idl/cgen/source.c b/src/libs/idl/cgen/source.c similarity index 100% rename from sources/libs/idl/cgen/source.c rename to src/libs/idl/cgen/source.c diff --git a/sources/libs/idl/cgen/types.c b/src/libs/idl/cgen/types.c similarity index 100% rename from sources/libs/idl/cgen/types.c rename to src/libs/idl/cgen/types.c diff --git a/sources/libs/idl/cgen/unpack.c b/src/libs/idl/cgen/unpack.c similarity index 100% rename from sources/libs/idl/cgen/unpack.c rename to src/libs/idl/cgen/unpack.c diff --git a/sources/libs/idl/json.c b/src/libs/idl/json.c similarity index 100% rename from sources/libs/idl/json.c rename to src/libs/idl/json.c diff --git a/sources/libs/idl/json.h b/src/libs/idl/json.h similarity index 100% rename from sources/libs/idl/json.h rename to src/libs/idl/json.h diff --git a/sources/libs/idl/parse.c b/src/libs/idl/parse.c similarity index 100% rename from sources/libs/idl/parse.c rename to src/libs/idl/parse.c diff --git a/sources/libs/idl/parse.h b/src/libs/idl/parse.h similarity index 100% rename from sources/libs/idl/parse.h rename to src/libs/idl/parse.h diff --git a/sources/libs/idl/sema.c b/src/libs/idl/sema.c similarity index 100% rename from sources/libs/idl/sema.c rename to src/libs/idl/sema.c diff --git a/sources/libs/idl/sema.h b/src/libs/idl/sema.h similarity index 100% rename from sources/libs/idl/sema.h rename to src/libs/idl/sema.h diff --git a/sources/libs/ipc/capability.h b/src/libs/ipc/capability.h similarity index 100% rename from sources/libs/ipc/capability.h rename to src/libs/ipc/capability.h diff --git a/sources/libs/ipc/component.c b/src/libs/ipc/component.c similarity index 100% rename from sources/libs/ipc/component.c rename to src/libs/ipc/component.c diff --git a/sources/libs/ipc/component.h b/src/libs/ipc/component.h similarity index 100% rename from sources/libs/ipc/component.h rename to src/libs/ipc/component.h diff --git a/sources/libs/ipc/hooks.c b/src/libs/ipc/hooks.c similarity index 100% rename from sources/libs/ipc/hooks.c rename to src/libs/ipc/hooks.c diff --git a/sources/libs/ipc/hooks.h b/src/libs/ipc/hooks.h similarity index 100% rename from sources/libs/ipc/hooks.h rename to src/libs/ipc/hooks.h diff --git a/sources/libs/ipc/interface.h b/src/libs/ipc/interface.h similarity index 100% rename from sources/libs/ipc/interface.h rename to src/libs/ipc/interface.h diff --git a/sources/libs/ipc/ipc.h b/src/libs/ipc/ipc.h similarity index 100% rename from sources/libs/ipc/ipc.h rename to src/libs/ipc/ipc.h diff --git a/sources/libs/ipc/pack.c b/src/libs/ipc/pack.c similarity index 100% rename from sources/libs/ipc/pack.c rename to src/libs/ipc/pack.c diff --git a/sources/libs/ipc/pack.h b/src/libs/ipc/pack.h similarity index 94% rename from sources/libs/ipc/pack.h rename to src/libs/ipc/pack.h index 8ddd29d0a..db101f35c 100644 --- a/sources/libs/ipc/pack.h +++ b/src/libs/ipc/pack.h @@ -1,8 +1,7 @@ #pragma once #include -#include -#include +#include typedef struct { diff --git a/sources/libs/ipc/unpack.c b/src/libs/ipc/unpack.c similarity index 100% rename from sources/libs/ipc/unpack.c rename to src/libs/ipc/unpack.c diff --git a/sources/libs/ipc/unpack.h b/src/libs/ipc/unpack.h similarity index 93% rename from sources/libs/ipc/unpack.h rename to src/libs/ipc/unpack.h index 4a173d8b6..9066af81c 100644 --- a/sources/libs/ipc/unpack.h +++ b/src/libs/ipc/unpack.h @@ -1,8 +1,8 @@ #pragma once #include -#include -#include +#include +#include typedef struct { diff --git a/sources/libs/json/emit.c b/src/libs/json/emit.c similarity index 100% rename from sources/libs/json/emit.c rename to src/libs/json/emit.c diff --git a/sources/libs/json/emit.h b/src/libs/json/emit.h similarity index 100% rename from sources/libs/json/emit.h rename to src/libs/json/emit.h diff --git a/sources/libs/json/objects.c b/src/libs/json/objects.c similarity index 100% rename from sources/libs/json/objects.c rename to src/libs/json/objects.c diff --git a/sources/libs/json/objects.h b/src/libs/json/objects.h similarity index 100% rename from sources/libs/json/objects.h rename to src/libs/json/objects.h diff --git a/sources/libs/json/parser.c b/src/libs/json/parser.c similarity index 100% rename from sources/libs/json/parser.c rename to src/libs/json/parser.c diff --git a/sources/libs/json/parser.h b/src/libs/json/parser.h similarity index 100% rename from sources/libs/json/parser.h rename to src/libs/json/parser.h diff --git a/sources/libs/stdc-ansi/assert.h b/src/libs/stdc-ansi/assert.h similarity index 100% rename from sources/libs/stdc-ansi/assert.h rename to src/libs/stdc-ansi/assert.h diff --git a/sources/libs/stdc-ansi/ctype.c b/src/libs/stdc-ansi/ctype.c similarity index 100% rename from sources/libs/stdc-ansi/ctype.c rename to src/libs/stdc-ansi/ctype.c diff --git a/sources/libs/stdc-ansi/ctype.h b/src/libs/stdc-ansi/ctype.h similarity index 100% rename from sources/libs/stdc-ansi/ctype.h rename to src/libs/stdc-ansi/ctype.h diff --git a/sources/libs/stdc-ansi/endian.h b/src/libs/stdc-ansi/endian.h similarity index 100% rename from sources/libs/stdc-ansi/endian.h rename to src/libs/stdc-ansi/endian.h diff --git a/sources/libs/stdc-ansi/errno.c b/src/libs/stdc-ansi/errno.c similarity index 100% rename from sources/libs/stdc-ansi/errno.c rename to src/libs/stdc-ansi/errno.c diff --git a/sources/libs/stdc-ansi/errno.h b/src/libs/stdc-ansi/errno.h similarity index 100% rename from sources/libs/stdc-ansi/errno.h rename to src/libs/stdc-ansi/errno.h diff --git a/sources/libs/stdc-ansi/fenv.h b/src/libs/stdc-ansi/fenv.h similarity index 100% rename from sources/libs/stdc-ansi/fenv.h rename to src/libs/stdc-ansi/fenv.h diff --git a/sources/libs/stdc-ansi/locale.h b/src/libs/stdc-ansi/locale.h similarity index 100% rename from sources/libs/stdc-ansi/locale.h rename to src/libs/stdc-ansi/locale.h diff --git a/sources/libs/stdc-ansi/qsort.c b/src/libs/stdc-ansi/qsort.c similarity index 100% rename from sources/libs/stdc-ansi/qsort.c rename to src/libs/stdc-ansi/qsort.c diff --git a/sources/libs/stdc-ansi/stdio.h b/src/libs/stdc-ansi/stdio.h similarity index 100% rename from sources/libs/stdc-ansi/stdio.h rename to src/libs/stdc-ansi/stdio.h diff --git a/sources/libs/stdc-ansi/stdlib.c b/src/libs/stdc-ansi/stdlib.c similarity index 100% rename from sources/libs/stdc-ansi/stdlib.c rename to src/libs/stdc-ansi/stdlib.c diff --git a/sources/libs/stdc-ansi/stdlib.h b/src/libs/stdc-ansi/stdlib.h similarity index 100% rename from sources/libs/stdc-ansi/stdlib.h rename to src/libs/stdc-ansi/stdlib.h diff --git a/sources/libs/stdc-ansi/string.c b/src/libs/stdc-ansi/string.c similarity index 100% rename from sources/libs/stdc-ansi/string.c rename to src/libs/stdc-ansi/string.c diff --git a/sources/libs/stdc-ansi/string.h b/src/libs/stdc-ansi/string.h similarity index 100% rename from sources/libs/stdc-ansi/string.h rename to src/libs/stdc-ansi/string.h diff --git a/sources/libs/stdc-base/prelude.h b/src/libs/stdc-base/prelude.h similarity index 100% rename from sources/libs/stdc-base/prelude.h rename to src/libs/stdc-base/prelude.h diff --git a/sources/libs/stdc-ext/string.c b/src/libs/stdc-ext/string.c similarity index 100% rename from sources/libs/stdc-ext/string.c rename to src/libs/stdc-ext/string.c diff --git a/sources/libs/stdc-ext/string.h b/src/libs/stdc-ext/string.h similarity index 100% rename from sources/libs/stdc-ext/string.h rename to src/libs/stdc-ext/string.h diff --git a/sources/libs/stdc-math/__cos.c b/src/libs/stdc-math/__cos.c similarity index 100% rename from sources/libs/stdc-math/__cos.c rename to src/libs/stdc-math/__cos.c diff --git a/sources/libs/stdc-math/__cosdf.c b/src/libs/stdc-math/__cosdf.c similarity index 100% rename from sources/libs/stdc-math/__cosdf.c rename to src/libs/stdc-math/__cosdf.c diff --git a/sources/libs/stdc-math/__cosl.c b/src/libs/stdc-math/__cosl.c similarity index 100% rename from sources/libs/stdc-math/__cosl.c rename to src/libs/stdc-math/__cosl.c diff --git a/sources/libs/stdc-math/__expo2.c b/src/libs/stdc-math/__expo2.c similarity index 100% rename from sources/libs/stdc-math/__expo2.c rename to src/libs/stdc-math/__expo2.c diff --git a/sources/libs/stdc-math/__expo2f.c b/src/libs/stdc-math/__expo2f.c similarity index 100% rename from sources/libs/stdc-math/__expo2f.c rename to src/libs/stdc-math/__expo2f.c diff --git a/sources/libs/stdc-math/__fpclassify.c b/src/libs/stdc-math/__fpclassify.c similarity index 100% rename from sources/libs/stdc-math/__fpclassify.c rename to src/libs/stdc-math/__fpclassify.c diff --git a/sources/libs/stdc-math/__fpclassifyf.c b/src/libs/stdc-math/__fpclassifyf.c similarity index 100% rename from sources/libs/stdc-math/__fpclassifyf.c rename to src/libs/stdc-math/__fpclassifyf.c diff --git a/sources/libs/stdc-math/__fpclassifyl.c b/src/libs/stdc-math/__fpclassifyl.c similarity index 100% rename from sources/libs/stdc-math/__fpclassifyl.c rename to src/libs/stdc-math/__fpclassifyl.c diff --git a/sources/libs/stdc-math/__invtrigl.c b/src/libs/stdc-math/__invtrigl.c similarity index 100% rename from sources/libs/stdc-math/__invtrigl.c rename to src/libs/stdc-math/__invtrigl.c diff --git a/sources/libs/stdc-math/__invtrigl.h b/src/libs/stdc-math/__invtrigl.h similarity index 100% rename from sources/libs/stdc-math/__invtrigl.h rename to src/libs/stdc-math/__invtrigl.h diff --git a/sources/libs/stdc-math/__polevll.c b/src/libs/stdc-math/__polevll.c similarity index 100% rename from sources/libs/stdc-math/__polevll.c rename to src/libs/stdc-math/__polevll.c diff --git a/sources/libs/stdc-math/__rem_pio2.c b/src/libs/stdc-math/__rem_pio2.c similarity index 100% rename from sources/libs/stdc-math/__rem_pio2.c rename to src/libs/stdc-math/__rem_pio2.c diff --git a/sources/libs/stdc-math/__rem_pio2_large.c b/src/libs/stdc-math/__rem_pio2_large.c similarity index 100% rename from sources/libs/stdc-math/__rem_pio2_large.c rename to src/libs/stdc-math/__rem_pio2_large.c diff --git a/sources/libs/stdc-math/__rem_pio2f.c b/src/libs/stdc-math/__rem_pio2f.c similarity index 100% rename from sources/libs/stdc-math/__rem_pio2f.c rename to src/libs/stdc-math/__rem_pio2f.c diff --git a/sources/libs/stdc-math/__rem_pio2l.c b/src/libs/stdc-math/__rem_pio2l.c similarity index 100% rename from sources/libs/stdc-math/__rem_pio2l.c rename to src/libs/stdc-math/__rem_pio2l.c diff --git a/sources/libs/stdc-math/__signbit.c b/src/libs/stdc-math/__signbit.c similarity index 100% rename from sources/libs/stdc-math/__signbit.c rename to src/libs/stdc-math/__signbit.c diff --git a/sources/libs/stdc-math/__signbitf.c b/src/libs/stdc-math/__signbitf.c similarity index 100% rename from sources/libs/stdc-math/__signbitf.c rename to src/libs/stdc-math/__signbitf.c diff --git a/sources/libs/stdc-math/__signbitl.c b/src/libs/stdc-math/__signbitl.c similarity index 100% rename from sources/libs/stdc-math/__signbitl.c rename to src/libs/stdc-math/__signbitl.c diff --git a/sources/libs/stdc-math/__sin.c b/src/libs/stdc-math/__sin.c similarity index 100% rename from sources/libs/stdc-math/__sin.c rename to src/libs/stdc-math/__sin.c diff --git a/sources/libs/stdc-math/__sindf.c b/src/libs/stdc-math/__sindf.c similarity index 100% rename from sources/libs/stdc-math/__sindf.c rename to src/libs/stdc-math/__sindf.c diff --git a/sources/libs/stdc-math/__sinl.c b/src/libs/stdc-math/__sinl.c similarity index 100% rename from sources/libs/stdc-math/__sinl.c rename to src/libs/stdc-math/__sinl.c diff --git a/sources/libs/stdc-math/__tan.c b/src/libs/stdc-math/__tan.c similarity index 100% rename from sources/libs/stdc-math/__tan.c rename to src/libs/stdc-math/__tan.c diff --git a/sources/libs/stdc-math/__tandf.c b/src/libs/stdc-math/__tandf.c similarity index 100% rename from sources/libs/stdc-math/__tandf.c rename to src/libs/stdc-math/__tandf.c diff --git a/sources/libs/stdc-math/__tanl.c b/src/libs/stdc-math/__tanl.c similarity index 100% rename from sources/libs/stdc-math/__tanl.c rename to src/libs/stdc-math/__tanl.c diff --git a/sources/libs/stdc-math/acos.c b/src/libs/stdc-math/acos.c similarity index 100% rename from sources/libs/stdc-math/acos.c rename to src/libs/stdc-math/acos.c diff --git a/sources/libs/stdc-math/acosf.c b/src/libs/stdc-math/acosf.c similarity index 100% rename from sources/libs/stdc-math/acosf.c rename to src/libs/stdc-math/acosf.c diff --git a/sources/libs/stdc-math/acosh.c b/src/libs/stdc-math/acosh.c similarity index 100% rename from sources/libs/stdc-math/acosh.c rename to src/libs/stdc-math/acosh.c diff --git a/sources/libs/stdc-math/acoshf.c b/src/libs/stdc-math/acoshf.c similarity index 100% rename from sources/libs/stdc-math/acoshf.c rename to src/libs/stdc-math/acoshf.c diff --git a/sources/libs/stdc-math/acoshl.c b/src/libs/stdc-math/acoshl.c similarity index 100% rename from sources/libs/stdc-math/acoshl.c rename to src/libs/stdc-math/acoshl.c diff --git a/sources/libs/stdc-math/acosl.c b/src/libs/stdc-math/acosl.c similarity index 100% rename from sources/libs/stdc-math/acosl.c rename to src/libs/stdc-math/acosl.c diff --git a/sources/libs/stdc-math/asin.c b/src/libs/stdc-math/asin.c similarity index 100% rename from sources/libs/stdc-math/asin.c rename to src/libs/stdc-math/asin.c diff --git a/sources/libs/stdc-math/asinf.c b/src/libs/stdc-math/asinf.c similarity index 100% rename from sources/libs/stdc-math/asinf.c rename to src/libs/stdc-math/asinf.c diff --git a/sources/libs/stdc-math/asinh.c b/src/libs/stdc-math/asinh.c similarity index 100% rename from sources/libs/stdc-math/asinh.c rename to src/libs/stdc-math/asinh.c diff --git a/sources/libs/stdc-math/asinhf.c b/src/libs/stdc-math/asinhf.c similarity index 100% rename from sources/libs/stdc-math/asinhf.c rename to src/libs/stdc-math/asinhf.c diff --git a/sources/libs/stdc-math/asinhl.c b/src/libs/stdc-math/asinhl.c similarity index 100% rename from sources/libs/stdc-math/asinhl.c rename to src/libs/stdc-math/asinhl.c diff --git a/sources/libs/stdc-math/asinl.c b/src/libs/stdc-math/asinl.c similarity index 100% rename from sources/libs/stdc-math/asinl.c rename to src/libs/stdc-math/asinl.c diff --git a/sources/libs/stdc-math/atan.c b/src/libs/stdc-math/atan.c similarity index 100% rename from sources/libs/stdc-math/atan.c rename to src/libs/stdc-math/atan.c diff --git a/sources/libs/stdc-math/atan2.c b/src/libs/stdc-math/atan2.c similarity index 100% rename from sources/libs/stdc-math/atan2.c rename to src/libs/stdc-math/atan2.c diff --git a/sources/libs/stdc-math/atan2f.c b/src/libs/stdc-math/atan2f.c similarity index 100% rename from sources/libs/stdc-math/atan2f.c rename to src/libs/stdc-math/atan2f.c diff --git a/sources/libs/stdc-math/atan2l.c b/src/libs/stdc-math/atan2l.c similarity index 100% rename from sources/libs/stdc-math/atan2l.c rename to src/libs/stdc-math/atan2l.c diff --git a/sources/libs/stdc-math/atanf.c b/src/libs/stdc-math/atanf.c similarity index 100% rename from sources/libs/stdc-math/atanf.c rename to src/libs/stdc-math/atanf.c diff --git a/sources/libs/stdc-math/atanh.c b/src/libs/stdc-math/atanh.c similarity index 100% rename from sources/libs/stdc-math/atanh.c rename to src/libs/stdc-math/atanh.c diff --git a/sources/libs/stdc-math/atanhf.c b/src/libs/stdc-math/atanhf.c similarity index 100% rename from sources/libs/stdc-math/atanhf.c rename to src/libs/stdc-math/atanhf.c diff --git a/sources/libs/stdc-math/atanhl.c b/src/libs/stdc-math/atanhl.c similarity index 100% rename from sources/libs/stdc-math/atanhl.c rename to src/libs/stdc-math/atanhl.c diff --git a/sources/libs/stdc-math/atanl.c b/src/libs/stdc-math/atanl.c similarity index 100% rename from sources/libs/stdc-math/atanl.c rename to src/libs/stdc-math/atanl.c diff --git a/sources/libs/stdc-math/cbrt.c b/src/libs/stdc-math/cbrt.c similarity index 100% rename from sources/libs/stdc-math/cbrt.c rename to src/libs/stdc-math/cbrt.c diff --git a/sources/libs/stdc-math/cbrtf.c b/src/libs/stdc-math/cbrtf.c similarity index 100% rename from sources/libs/stdc-math/cbrtf.c rename to src/libs/stdc-math/cbrtf.c diff --git a/sources/libs/stdc-math/cbrtl.c b/src/libs/stdc-math/cbrtl.c similarity index 100% rename from sources/libs/stdc-math/cbrtl.c rename to src/libs/stdc-math/cbrtl.c diff --git a/sources/libs/stdc-math/ceil.c b/src/libs/stdc-math/ceil.c similarity index 100% rename from sources/libs/stdc-math/ceil.c rename to src/libs/stdc-math/ceil.c diff --git a/sources/libs/stdc-math/ceilf.c b/src/libs/stdc-math/ceilf.c similarity index 100% rename from sources/libs/stdc-math/ceilf.c rename to src/libs/stdc-math/ceilf.c diff --git a/sources/libs/stdc-math/ceill.c b/src/libs/stdc-math/ceill.c similarity index 100% rename from sources/libs/stdc-math/ceill.c rename to src/libs/stdc-math/ceill.c diff --git a/sources/libs/stdc-math/copysign.c b/src/libs/stdc-math/copysign.c similarity index 100% rename from sources/libs/stdc-math/copysign.c rename to src/libs/stdc-math/copysign.c diff --git a/sources/libs/stdc-math/copysignf.c b/src/libs/stdc-math/copysignf.c similarity index 100% rename from sources/libs/stdc-math/copysignf.c rename to src/libs/stdc-math/copysignf.c diff --git a/sources/libs/stdc-math/copysignl.c b/src/libs/stdc-math/copysignl.c similarity index 100% rename from sources/libs/stdc-math/copysignl.c rename to src/libs/stdc-math/copysignl.c diff --git a/sources/libs/stdc-math/cos.c b/src/libs/stdc-math/cos.c similarity index 100% rename from sources/libs/stdc-math/cos.c rename to src/libs/stdc-math/cos.c diff --git a/sources/libs/stdc-math/cosf.c b/src/libs/stdc-math/cosf.c similarity index 100% rename from sources/libs/stdc-math/cosf.c rename to src/libs/stdc-math/cosf.c diff --git a/sources/libs/stdc-math/cosh.c b/src/libs/stdc-math/cosh.c similarity index 100% rename from sources/libs/stdc-math/cosh.c rename to src/libs/stdc-math/cosh.c diff --git a/sources/libs/stdc-math/coshf.c b/src/libs/stdc-math/coshf.c similarity index 100% rename from sources/libs/stdc-math/coshf.c rename to src/libs/stdc-math/coshf.c diff --git a/sources/libs/stdc-math/coshl.c b/src/libs/stdc-math/coshl.c similarity index 100% rename from sources/libs/stdc-math/coshl.c rename to src/libs/stdc-math/coshl.c diff --git a/sources/libs/stdc-math/cosl.c b/src/libs/stdc-math/cosl.c similarity index 100% rename from sources/libs/stdc-math/cosl.c rename to src/libs/stdc-math/cosl.c diff --git a/sources/libs/stdc-math/erf.c b/src/libs/stdc-math/erf.c similarity index 100% rename from sources/libs/stdc-math/erf.c rename to src/libs/stdc-math/erf.c diff --git a/sources/libs/stdc-math/erff.c b/src/libs/stdc-math/erff.c similarity index 100% rename from sources/libs/stdc-math/erff.c rename to src/libs/stdc-math/erff.c diff --git a/sources/libs/stdc-math/erfl.c b/src/libs/stdc-math/erfl.c similarity index 100% rename from sources/libs/stdc-math/erfl.c rename to src/libs/stdc-math/erfl.c diff --git a/sources/libs/stdc-math/exp.c b/src/libs/stdc-math/exp.c similarity index 100% rename from sources/libs/stdc-math/exp.c rename to src/libs/stdc-math/exp.c diff --git a/sources/libs/stdc-math/exp10.c b/src/libs/stdc-math/exp10.c similarity index 100% rename from sources/libs/stdc-math/exp10.c rename to src/libs/stdc-math/exp10.c diff --git a/sources/libs/stdc-math/exp10f.c b/src/libs/stdc-math/exp10f.c similarity index 100% rename from sources/libs/stdc-math/exp10f.c rename to src/libs/stdc-math/exp10f.c diff --git a/sources/libs/stdc-math/exp10l.c b/src/libs/stdc-math/exp10l.c similarity index 100% rename from sources/libs/stdc-math/exp10l.c rename to src/libs/stdc-math/exp10l.c diff --git a/sources/libs/stdc-math/exp2.c b/src/libs/stdc-math/exp2.c similarity index 100% rename from sources/libs/stdc-math/exp2.c rename to src/libs/stdc-math/exp2.c diff --git a/sources/libs/stdc-math/exp2f.c b/src/libs/stdc-math/exp2f.c similarity index 100% rename from sources/libs/stdc-math/exp2f.c rename to src/libs/stdc-math/exp2f.c diff --git a/sources/libs/stdc-math/exp2l.c b/src/libs/stdc-math/exp2l.c similarity index 100% rename from sources/libs/stdc-math/exp2l.c rename to src/libs/stdc-math/exp2l.c diff --git a/sources/libs/stdc-math/expf.c b/src/libs/stdc-math/expf.c similarity index 100% rename from sources/libs/stdc-math/expf.c rename to src/libs/stdc-math/expf.c diff --git a/sources/libs/stdc-math/expl.c b/src/libs/stdc-math/expl.c similarity index 100% rename from sources/libs/stdc-math/expl.c rename to src/libs/stdc-math/expl.c diff --git a/sources/libs/stdc-math/expm1.c b/src/libs/stdc-math/expm1.c similarity index 100% rename from sources/libs/stdc-math/expm1.c rename to src/libs/stdc-math/expm1.c diff --git a/sources/libs/stdc-math/expm1f.c b/src/libs/stdc-math/expm1f.c similarity index 100% rename from sources/libs/stdc-math/expm1f.c rename to src/libs/stdc-math/expm1f.c diff --git a/sources/libs/stdc-math/expm1l.c b/src/libs/stdc-math/expm1l.c similarity index 100% rename from sources/libs/stdc-math/expm1l.c rename to src/libs/stdc-math/expm1l.c diff --git a/sources/libs/stdc-math/fabs.c b/src/libs/stdc-math/fabs.c similarity index 100% rename from sources/libs/stdc-math/fabs.c rename to src/libs/stdc-math/fabs.c diff --git a/sources/libs/stdc-math/fabsf.c b/src/libs/stdc-math/fabsf.c similarity index 100% rename from sources/libs/stdc-math/fabsf.c rename to src/libs/stdc-math/fabsf.c diff --git a/sources/libs/stdc-math/fabsl.c b/src/libs/stdc-math/fabsl.c similarity index 100% rename from sources/libs/stdc-math/fabsl.c rename to src/libs/stdc-math/fabsl.c diff --git a/sources/libs/stdc-math/fdim.c b/src/libs/stdc-math/fdim.c similarity index 100% rename from sources/libs/stdc-math/fdim.c rename to src/libs/stdc-math/fdim.c diff --git a/sources/libs/stdc-math/fdimf.c b/src/libs/stdc-math/fdimf.c similarity index 100% rename from sources/libs/stdc-math/fdimf.c rename to src/libs/stdc-math/fdimf.c diff --git a/sources/libs/stdc-math/fdiml.c b/src/libs/stdc-math/fdiml.c similarity index 100% rename from sources/libs/stdc-math/fdiml.c rename to src/libs/stdc-math/fdiml.c diff --git a/sources/libs/stdc-math/finite.c b/src/libs/stdc-math/finite.c similarity index 100% rename from sources/libs/stdc-math/finite.c rename to src/libs/stdc-math/finite.c diff --git a/sources/libs/stdc-math/finitef.c b/src/libs/stdc-math/finitef.c similarity index 100% rename from sources/libs/stdc-math/finitef.c rename to src/libs/stdc-math/finitef.c diff --git a/sources/libs/stdc-math/floor.c b/src/libs/stdc-math/floor.c similarity index 100% rename from sources/libs/stdc-math/floor.c rename to src/libs/stdc-math/floor.c diff --git a/sources/libs/stdc-math/floorf.c b/src/libs/stdc-math/floorf.c similarity index 100% rename from sources/libs/stdc-math/floorf.c rename to src/libs/stdc-math/floorf.c diff --git a/sources/libs/stdc-math/floorl.c b/src/libs/stdc-math/floorl.c similarity index 100% rename from sources/libs/stdc-math/floorl.c rename to src/libs/stdc-math/floorl.c diff --git a/sources/libs/stdc-math/fma.c b/src/libs/stdc-math/fma.c similarity index 100% rename from sources/libs/stdc-math/fma.c rename to src/libs/stdc-math/fma.c diff --git a/sources/libs/stdc-math/fmaf.c b/src/libs/stdc-math/fmaf.c similarity index 100% rename from sources/libs/stdc-math/fmaf.c rename to src/libs/stdc-math/fmaf.c diff --git a/sources/libs/stdc-math/fmal.c b/src/libs/stdc-math/fmal.c similarity index 100% rename from sources/libs/stdc-math/fmal.c rename to src/libs/stdc-math/fmal.c diff --git a/sources/libs/stdc-math/fmax.c b/src/libs/stdc-math/fmax.c similarity index 100% rename from sources/libs/stdc-math/fmax.c rename to src/libs/stdc-math/fmax.c diff --git a/sources/libs/stdc-math/fmaxf.c b/src/libs/stdc-math/fmaxf.c similarity index 100% rename from sources/libs/stdc-math/fmaxf.c rename to src/libs/stdc-math/fmaxf.c diff --git a/sources/libs/stdc-math/fmaxl.c b/src/libs/stdc-math/fmaxl.c similarity index 100% rename from sources/libs/stdc-math/fmaxl.c rename to src/libs/stdc-math/fmaxl.c diff --git a/sources/libs/stdc-math/fmin.c b/src/libs/stdc-math/fmin.c similarity index 100% rename from sources/libs/stdc-math/fmin.c rename to src/libs/stdc-math/fmin.c diff --git a/sources/libs/stdc-math/fminf.c b/src/libs/stdc-math/fminf.c similarity index 100% rename from sources/libs/stdc-math/fminf.c rename to src/libs/stdc-math/fminf.c diff --git a/sources/libs/stdc-math/fminl.c b/src/libs/stdc-math/fminl.c similarity index 100% rename from sources/libs/stdc-math/fminl.c rename to src/libs/stdc-math/fminl.c diff --git a/sources/libs/stdc-math/fmod.c b/src/libs/stdc-math/fmod.c similarity index 100% rename from sources/libs/stdc-math/fmod.c rename to src/libs/stdc-math/fmod.c diff --git a/sources/libs/stdc-math/fmodf.c b/src/libs/stdc-math/fmodf.c similarity index 100% rename from sources/libs/stdc-math/fmodf.c rename to src/libs/stdc-math/fmodf.c diff --git a/sources/libs/stdc-math/fmodl.c b/src/libs/stdc-math/fmodl.c similarity index 100% rename from sources/libs/stdc-math/fmodl.c rename to src/libs/stdc-math/fmodl.c diff --git a/sources/libs/stdc-math/frexp.c b/src/libs/stdc-math/frexp.c similarity index 100% rename from sources/libs/stdc-math/frexp.c rename to src/libs/stdc-math/frexp.c diff --git a/sources/libs/stdc-math/frexpf.c b/src/libs/stdc-math/frexpf.c similarity index 100% rename from sources/libs/stdc-math/frexpf.c rename to src/libs/stdc-math/frexpf.c diff --git a/sources/libs/stdc-math/frexpl.c b/src/libs/stdc-math/frexpl.c similarity index 100% rename from sources/libs/stdc-math/frexpl.c rename to src/libs/stdc-math/frexpl.c diff --git a/sources/libs/stdc-math/hypot.c b/src/libs/stdc-math/hypot.c similarity index 100% rename from sources/libs/stdc-math/hypot.c rename to src/libs/stdc-math/hypot.c diff --git a/sources/libs/stdc-math/hypotf.c b/src/libs/stdc-math/hypotf.c similarity index 100% rename from sources/libs/stdc-math/hypotf.c rename to src/libs/stdc-math/hypotf.c diff --git a/sources/libs/stdc-math/hypotl.c b/src/libs/stdc-math/hypotl.c similarity index 100% rename from sources/libs/stdc-math/hypotl.c rename to src/libs/stdc-math/hypotl.c diff --git a/sources/libs/stdc-math/ilogb.c b/src/libs/stdc-math/ilogb.c similarity index 100% rename from sources/libs/stdc-math/ilogb.c rename to src/libs/stdc-math/ilogb.c diff --git a/sources/libs/stdc-math/ilogbf.c b/src/libs/stdc-math/ilogbf.c similarity index 100% rename from sources/libs/stdc-math/ilogbf.c rename to src/libs/stdc-math/ilogbf.c diff --git a/sources/libs/stdc-math/ilogbl.c b/src/libs/stdc-math/ilogbl.c similarity index 100% rename from sources/libs/stdc-math/ilogbl.c rename to src/libs/stdc-math/ilogbl.c diff --git a/sources/libs/stdc-math/j0.c b/src/libs/stdc-math/j0.c similarity index 100% rename from sources/libs/stdc-math/j0.c rename to src/libs/stdc-math/j0.c diff --git a/sources/libs/stdc-math/j0f.c b/src/libs/stdc-math/j0f.c similarity index 100% rename from sources/libs/stdc-math/j0f.c rename to src/libs/stdc-math/j0f.c diff --git a/sources/libs/stdc-math/j1.c b/src/libs/stdc-math/j1.c similarity index 100% rename from sources/libs/stdc-math/j1.c rename to src/libs/stdc-math/j1.c diff --git a/sources/libs/stdc-math/j1f.c b/src/libs/stdc-math/j1f.c similarity index 100% rename from sources/libs/stdc-math/j1f.c rename to src/libs/stdc-math/j1f.c diff --git a/sources/libs/stdc-math/jn.c b/src/libs/stdc-math/jn.c similarity index 100% rename from sources/libs/stdc-math/jn.c rename to src/libs/stdc-math/jn.c diff --git a/sources/libs/stdc-math/jnf.c b/src/libs/stdc-math/jnf.c similarity index 100% rename from sources/libs/stdc-math/jnf.c rename to src/libs/stdc-math/jnf.c diff --git a/sources/libs/stdc-math/ldexp.c b/src/libs/stdc-math/ldexp.c similarity index 100% rename from sources/libs/stdc-math/ldexp.c rename to src/libs/stdc-math/ldexp.c diff --git a/sources/libs/stdc-math/ldexpf.c b/src/libs/stdc-math/ldexpf.c similarity index 100% rename from sources/libs/stdc-math/ldexpf.c rename to src/libs/stdc-math/ldexpf.c diff --git a/sources/libs/stdc-math/ldexpl.c b/src/libs/stdc-math/ldexpl.c similarity index 100% rename from sources/libs/stdc-math/ldexpl.c rename to src/libs/stdc-math/ldexpl.c diff --git a/sources/libs/stdc-math/lgamma.c b/src/libs/stdc-math/lgamma.c similarity index 100% rename from sources/libs/stdc-math/lgamma.c rename to src/libs/stdc-math/lgamma.c diff --git a/sources/libs/stdc-math/lgamma_r.c b/src/libs/stdc-math/lgamma_r.c similarity index 100% rename from sources/libs/stdc-math/lgamma_r.c rename to src/libs/stdc-math/lgamma_r.c diff --git a/sources/libs/stdc-math/lgammaf.c b/src/libs/stdc-math/lgammaf.c similarity index 100% rename from sources/libs/stdc-math/lgammaf.c rename to src/libs/stdc-math/lgammaf.c diff --git a/sources/libs/stdc-math/lgammaf_r.c b/src/libs/stdc-math/lgammaf_r.c similarity index 100% rename from sources/libs/stdc-math/lgammaf_r.c rename to src/libs/stdc-math/lgammaf_r.c diff --git a/sources/libs/stdc-math/lgammal.c b/src/libs/stdc-math/lgammal.c similarity index 100% rename from sources/libs/stdc-math/lgammal.c rename to src/libs/stdc-math/lgammal.c diff --git a/sources/libs/stdc-math/libm.h b/src/libs/stdc-math/libm.h similarity index 100% rename from sources/libs/stdc-math/libm.h rename to src/libs/stdc-math/libm.h diff --git a/sources/libs/stdc-math/llrint.c b/src/libs/stdc-math/llrint.c similarity index 100% rename from sources/libs/stdc-math/llrint.c rename to src/libs/stdc-math/llrint.c diff --git a/sources/libs/stdc-math/llrintf.c b/src/libs/stdc-math/llrintf.c similarity index 100% rename from sources/libs/stdc-math/llrintf.c rename to src/libs/stdc-math/llrintf.c diff --git a/sources/libs/stdc-math/llrintl.c b/src/libs/stdc-math/llrintl.c similarity index 100% rename from sources/libs/stdc-math/llrintl.c rename to src/libs/stdc-math/llrintl.c diff --git a/sources/libs/stdc-math/llround.c b/src/libs/stdc-math/llround.c similarity index 100% rename from sources/libs/stdc-math/llround.c rename to src/libs/stdc-math/llround.c diff --git a/sources/libs/stdc-math/llroundf.c b/src/libs/stdc-math/llroundf.c similarity index 100% rename from sources/libs/stdc-math/llroundf.c rename to src/libs/stdc-math/llroundf.c diff --git a/sources/libs/stdc-math/llroundl.c b/src/libs/stdc-math/llroundl.c similarity index 100% rename from sources/libs/stdc-math/llroundl.c rename to src/libs/stdc-math/llroundl.c diff --git a/sources/libs/stdc-math/log.c b/src/libs/stdc-math/log.c similarity index 100% rename from sources/libs/stdc-math/log.c rename to src/libs/stdc-math/log.c diff --git a/sources/libs/stdc-math/log10.c b/src/libs/stdc-math/log10.c similarity index 100% rename from sources/libs/stdc-math/log10.c rename to src/libs/stdc-math/log10.c diff --git a/sources/libs/stdc-math/log10f.c b/src/libs/stdc-math/log10f.c similarity index 100% rename from sources/libs/stdc-math/log10f.c rename to src/libs/stdc-math/log10f.c diff --git a/sources/libs/stdc-math/log10l.c b/src/libs/stdc-math/log10l.c similarity index 100% rename from sources/libs/stdc-math/log10l.c rename to src/libs/stdc-math/log10l.c diff --git a/sources/libs/stdc-math/log1p.c b/src/libs/stdc-math/log1p.c similarity index 100% rename from sources/libs/stdc-math/log1p.c rename to src/libs/stdc-math/log1p.c diff --git a/sources/libs/stdc-math/log1pf.c b/src/libs/stdc-math/log1pf.c similarity index 100% rename from sources/libs/stdc-math/log1pf.c rename to src/libs/stdc-math/log1pf.c diff --git a/sources/libs/stdc-math/log1pl.c b/src/libs/stdc-math/log1pl.c similarity index 100% rename from sources/libs/stdc-math/log1pl.c rename to src/libs/stdc-math/log1pl.c diff --git a/sources/libs/stdc-math/log2.c b/src/libs/stdc-math/log2.c similarity index 100% rename from sources/libs/stdc-math/log2.c rename to src/libs/stdc-math/log2.c diff --git a/sources/libs/stdc-math/log2f.c b/src/libs/stdc-math/log2f.c similarity index 100% rename from sources/libs/stdc-math/log2f.c rename to src/libs/stdc-math/log2f.c diff --git a/sources/libs/stdc-math/log2l.c b/src/libs/stdc-math/log2l.c similarity index 100% rename from sources/libs/stdc-math/log2l.c rename to src/libs/stdc-math/log2l.c diff --git a/sources/libs/stdc-math/logb.c b/src/libs/stdc-math/logb.c similarity index 100% rename from sources/libs/stdc-math/logb.c rename to src/libs/stdc-math/logb.c diff --git a/sources/libs/stdc-math/logbf.c b/src/libs/stdc-math/logbf.c similarity index 100% rename from sources/libs/stdc-math/logbf.c rename to src/libs/stdc-math/logbf.c diff --git a/sources/libs/stdc-math/logbl.c b/src/libs/stdc-math/logbl.c similarity index 100% rename from sources/libs/stdc-math/logbl.c rename to src/libs/stdc-math/logbl.c diff --git a/sources/libs/stdc-math/logf.c b/src/libs/stdc-math/logf.c similarity index 100% rename from sources/libs/stdc-math/logf.c rename to src/libs/stdc-math/logf.c diff --git a/sources/libs/stdc-math/logl.c b/src/libs/stdc-math/logl.c similarity index 100% rename from sources/libs/stdc-math/logl.c rename to src/libs/stdc-math/logl.c diff --git a/sources/libs/stdc-math/lrint.c b/src/libs/stdc-math/lrint.c similarity index 100% rename from sources/libs/stdc-math/lrint.c rename to src/libs/stdc-math/lrint.c diff --git a/sources/libs/stdc-math/lrintf.c b/src/libs/stdc-math/lrintf.c similarity index 100% rename from sources/libs/stdc-math/lrintf.c rename to src/libs/stdc-math/lrintf.c diff --git a/sources/libs/stdc-math/lrintl.c b/src/libs/stdc-math/lrintl.c similarity index 100% rename from sources/libs/stdc-math/lrintl.c rename to src/libs/stdc-math/lrintl.c diff --git a/sources/libs/stdc-math/lround.c b/src/libs/stdc-math/lround.c similarity index 100% rename from sources/libs/stdc-math/lround.c rename to src/libs/stdc-math/lround.c diff --git a/sources/libs/stdc-math/lroundf.c b/src/libs/stdc-math/lroundf.c similarity index 100% rename from sources/libs/stdc-math/lroundf.c rename to src/libs/stdc-math/lroundf.c diff --git a/sources/libs/stdc-math/lroundl.c b/src/libs/stdc-math/lroundl.c similarity index 100% rename from sources/libs/stdc-math/lroundl.c rename to src/libs/stdc-math/lroundl.c diff --git a/sources/libs/stdc-math/math.h b/src/libs/stdc-math/math.h similarity index 100% rename from sources/libs/stdc-math/math.h rename to src/libs/stdc-math/math.h diff --git a/sources/libs/stdc-math/modf.c b/src/libs/stdc-math/modf.c similarity index 100% rename from sources/libs/stdc-math/modf.c rename to src/libs/stdc-math/modf.c diff --git a/sources/libs/stdc-math/modff.c b/src/libs/stdc-math/modff.c similarity index 100% rename from sources/libs/stdc-math/modff.c rename to src/libs/stdc-math/modff.c diff --git a/sources/libs/stdc-math/modfl.c b/src/libs/stdc-math/modfl.c similarity index 100% rename from sources/libs/stdc-math/modfl.c rename to src/libs/stdc-math/modfl.c diff --git a/sources/libs/stdc-math/nan.c b/src/libs/stdc-math/nan.c similarity index 100% rename from sources/libs/stdc-math/nan.c rename to src/libs/stdc-math/nan.c diff --git a/sources/libs/stdc-math/nanf.c b/src/libs/stdc-math/nanf.c similarity index 100% rename from sources/libs/stdc-math/nanf.c rename to src/libs/stdc-math/nanf.c diff --git a/sources/libs/stdc-math/nanl.c b/src/libs/stdc-math/nanl.c similarity index 100% rename from sources/libs/stdc-math/nanl.c rename to src/libs/stdc-math/nanl.c diff --git a/sources/libs/stdc-math/nearbyint.c b/src/libs/stdc-math/nearbyint.c similarity index 100% rename from sources/libs/stdc-math/nearbyint.c rename to src/libs/stdc-math/nearbyint.c diff --git a/sources/libs/stdc-math/nearbyintf.c b/src/libs/stdc-math/nearbyintf.c similarity index 100% rename from sources/libs/stdc-math/nearbyintf.c rename to src/libs/stdc-math/nearbyintf.c diff --git a/sources/libs/stdc-math/nearbyintl.c b/src/libs/stdc-math/nearbyintl.c similarity index 100% rename from sources/libs/stdc-math/nearbyintl.c rename to src/libs/stdc-math/nearbyintl.c diff --git a/sources/libs/stdc-math/nextafter.c b/src/libs/stdc-math/nextafter.c similarity index 100% rename from sources/libs/stdc-math/nextafter.c rename to src/libs/stdc-math/nextafter.c diff --git a/sources/libs/stdc-math/nextafterf.c b/src/libs/stdc-math/nextafterf.c similarity index 100% rename from sources/libs/stdc-math/nextafterf.c rename to src/libs/stdc-math/nextafterf.c diff --git a/sources/libs/stdc-math/nextafterl.c b/src/libs/stdc-math/nextafterl.c similarity index 100% rename from sources/libs/stdc-math/nextafterl.c rename to src/libs/stdc-math/nextafterl.c diff --git a/sources/libs/stdc-math/nexttoward.c b/src/libs/stdc-math/nexttoward.c similarity index 100% rename from sources/libs/stdc-math/nexttoward.c rename to src/libs/stdc-math/nexttoward.c diff --git a/sources/libs/stdc-math/nexttowardf.c b/src/libs/stdc-math/nexttowardf.c similarity index 100% rename from sources/libs/stdc-math/nexttowardf.c rename to src/libs/stdc-math/nexttowardf.c diff --git a/sources/libs/stdc-math/nexttowardl.c b/src/libs/stdc-math/nexttowardl.c similarity index 100% rename from sources/libs/stdc-math/nexttowardl.c rename to src/libs/stdc-math/nexttowardl.c diff --git a/sources/libs/stdc-math/pow.c b/src/libs/stdc-math/pow.c similarity index 100% rename from sources/libs/stdc-math/pow.c rename to src/libs/stdc-math/pow.c diff --git a/sources/libs/stdc-math/powf.c b/src/libs/stdc-math/powf.c similarity index 100% rename from sources/libs/stdc-math/powf.c rename to src/libs/stdc-math/powf.c diff --git a/sources/libs/stdc-math/powl.c b/src/libs/stdc-math/powl.c similarity index 100% rename from sources/libs/stdc-math/powl.c rename to src/libs/stdc-math/powl.c diff --git a/sources/libs/stdc-math/remainder.c b/src/libs/stdc-math/remainder.c similarity index 100% rename from sources/libs/stdc-math/remainder.c rename to src/libs/stdc-math/remainder.c diff --git a/sources/libs/stdc-math/remainderf.c b/src/libs/stdc-math/remainderf.c similarity index 100% rename from sources/libs/stdc-math/remainderf.c rename to src/libs/stdc-math/remainderf.c diff --git a/sources/libs/stdc-math/remainderl.c b/src/libs/stdc-math/remainderl.c similarity index 100% rename from sources/libs/stdc-math/remainderl.c rename to src/libs/stdc-math/remainderl.c diff --git a/sources/libs/stdc-math/remquo.c b/src/libs/stdc-math/remquo.c similarity index 100% rename from sources/libs/stdc-math/remquo.c rename to src/libs/stdc-math/remquo.c diff --git a/sources/libs/stdc-math/remquof.c b/src/libs/stdc-math/remquof.c similarity index 100% rename from sources/libs/stdc-math/remquof.c rename to src/libs/stdc-math/remquof.c diff --git a/sources/libs/stdc-math/remquol.c b/src/libs/stdc-math/remquol.c similarity index 100% rename from sources/libs/stdc-math/remquol.c rename to src/libs/stdc-math/remquol.c diff --git a/sources/libs/stdc-math/rint.c b/src/libs/stdc-math/rint.c similarity index 100% rename from sources/libs/stdc-math/rint.c rename to src/libs/stdc-math/rint.c diff --git a/sources/libs/stdc-math/rintf.c b/src/libs/stdc-math/rintf.c similarity index 100% rename from sources/libs/stdc-math/rintf.c rename to src/libs/stdc-math/rintf.c diff --git a/sources/libs/stdc-math/rintl.c b/src/libs/stdc-math/rintl.c similarity index 100% rename from sources/libs/stdc-math/rintl.c rename to src/libs/stdc-math/rintl.c diff --git a/sources/libs/stdc-math/round.c b/src/libs/stdc-math/round.c similarity index 100% rename from sources/libs/stdc-math/round.c rename to src/libs/stdc-math/round.c diff --git a/sources/libs/stdc-math/roundf.c b/src/libs/stdc-math/roundf.c similarity index 100% rename from sources/libs/stdc-math/roundf.c rename to src/libs/stdc-math/roundf.c diff --git a/sources/libs/stdc-math/roundl.c b/src/libs/stdc-math/roundl.c similarity index 100% rename from sources/libs/stdc-math/roundl.c rename to src/libs/stdc-math/roundl.c diff --git a/sources/libs/stdc-math/scalb.c b/src/libs/stdc-math/scalb.c similarity index 100% rename from sources/libs/stdc-math/scalb.c rename to src/libs/stdc-math/scalb.c diff --git a/sources/libs/stdc-math/scalbf.c b/src/libs/stdc-math/scalbf.c similarity index 100% rename from sources/libs/stdc-math/scalbf.c rename to src/libs/stdc-math/scalbf.c diff --git a/sources/libs/stdc-math/scalbln.c b/src/libs/stdc-math/scalbln.c similarity index 100% rename from sources/libs/stdc-math/scalbln.c rename to src/libs/stdc-math/scalbln.c diff --git a/sources/libs/stdc-math/scalblnf.c b/src/libs/stdc-math/scalblnf.c similarity index 100% rename from sources/libs/stdc-math/scalblnf.c rename to src/libs/stdc-math/scalblnf.c diff --git a/sources/libs/stdc-math/scalblnl.c b/src/libs/stdc-math/scalblnl.c similarity index 100% rename from sources/libs/stdc-math/scalblnl.c rename to src/libs/stdc-math/scalblnl.c diff --git a/sources/libs/stdc-math/scalbn.c b/src/libs/stdc-math/scalbn.c similarity index 100% rename from sources/libs/stdc-math/scalbn.c rename to src/libs/stdc-math/scalbn.c diff --git a/sources/libs/stdc-math/scalbnf.c b/src/libs/stdc-math/scalbnf.c similarity index 100% rename from sources/libs/stdc-math/scalbnf.c rename to src/libs/stdc-math/scalbnf.c diff --git a/sources/libs/stdc-math/scalbnl.c b/src/libs/stdc-math/scalbnl.c similarity index 100% rename from sources/libs/stdc-math/scalbnl.c rename to src/libs/stdc-math/scalbnl.c diff --git a/sources/libs/stdc-math/signgam.c b/src/libs/stdc-math/signgam.c similarity index 100% rename from sources/libs/stdc-math/signgam.c rename to src/libs/stdc-math/signgam.c diff --git a/sources/libs/stdc-math/significand.c b/src/libs/stdc-math/significand.c similarity index 100% rename from sources/libs/stdc-math/significand.c rename to src/libs/stdc-math/significand.c diff --git a/sources/libs/stdc-math/significandf.c b/src/libs/stdc-math/significandf.c similarity index 100% rename from sources/libs/stdc-math/significandf.c rename to src/libs/stdc-math/significandf.c diff --git a/sources/libs/stdc-math/sin.c b/src/libs/stdc-math/sin.c similarity index 100% rename from sources/libs/stdc-math/sin.c rename to src/libs/stdc-math/sin.c diff --git a/sources/libs/stdc-math/sincos.c b/src/libs/stdc-math/sincos.c similarity index 100% rename from sources/libs/stdc-math/sincos.c rename to src/libs/stdc-math/sincos.c diff --git a/sources/libs/stdc-math/sincosf.c b/src/libs/stdc-math/sincosf.c similarity index 100% rename from sources/libs/stdc-math/sincosf.c rename to src/libs/stdc-math/sincosf.c diff --git a/sources/libs/stdc-math/sincosl.c b/src/libs/stdc-math/sincosl.c similarity index 100% rename from sources/libs/stdc-math/sincosl.c rename to src/libs/stdc-math/sincosl.c diff --git a/sources/libs/stdc-math/sinf.c b/src/libs/stdc-math/sinf.c similarity index 100% rename from sources/libs/stdc-math/sinf.c rename to src/libs/stdc-math/sinf.c diff --git a/sources/libs/stdc-math/sinh.c b/src/libs/stdc-math/sinh.c similarity index 100% rename from sources/libs/stdc-math/sinh.c rename to src/libs/stdc-math/sinh.c diff --git a/sources/libs/stdc-math/sinhf.c b/src/libs/stdc-math/sinhf.c similarity index 100% rename from sources/libs/stdc-math/sinhf.c rename to src/libs/stdc-math/sinhf.c diff --git a/sources/libs/stdc-math/sinhl.c b/src/libs/stdc-math/sinhl.c similarity index 100% rename from sources/libs/stdc-math/sinhl.c rename to src/libs/stdc-math/sinhl.c diff --git a/sources/libs/stdc-math/sinl.c b/src/libs/stdc-math/sinl.c similarity index 100% rename from sources/libs/stdc-math/sinl.c rename to src/libs/stdc-math/sinl.c diff --git a/sources/libs/stdc-math/sqrt.c b/src/libs/stdc-math/sqrt.c similarity index 100% rename from sources/libs/stdc-math/sqrt.c rename to src/libs/stdc-math/sqrt.c diff --git a/sources/libs/stdc-math/sqrtf.c b/src/libs/stdc-math/sqrtf.c similarity index 100% rename from sources/libs/stdc-math/sqrtf.c rename to src/libs/stdc-math/sqrtf.c diff --git a/sources/libs/stdc-math/sqrtl.c b/src/libs/stdc-math/sqrtl.c similarity index 100% rename from sources/libs/stdc-math/sqrtl.c rename to src/libs/stdc-math/sqrtl.c diff --git a/sources/libs/stdc-math/tan.c b/src/libs/stdc-math/tan.c similarity index 100% rename from sources/libs/stdc-math/tan.c rename to src/libs/stdc-math/tan.c diff --git a/sources/libs/stdc-math/tanf.c b/src/libs/stdc-math/tanf.c similarity index 100% rename from sources/libs/stdc-math/tanf.c rename to src/libs/stdc-math/tanf.c diff --git a/sources/libs/stdc-math/tanh.c b/src/libs/stdc-math/tanh.c similarity index 100% rename from sources/libs/stdc-math/tanh.c rename to src/libs/stdc-math/tanh.c diff --git a/sources/libs/stdc-math/tanhf.c b/src/libs/stdc-math/tanhf.c similarity index 100% rename from sources/libs/stdc-math/tanhf.c rename to src/libs/stdc-math/tanhf.c diff --git a/sources/libs/stdc-math/tanhl.c b/src/libs/stdc-math/tanhl.c similarity index 100% rename from sources/libs/stdc-math/tanhl.c rename to src/libs/stdc-math/tanhl.c diff --git a/sources/libs/stdc-math/tanl.c b/src/libs/stdc-math/tanl.c similarity index 100% rename from sources/libs/stdc-math/tanl.c rename to src/libs/stdc-math/tanl.c diff --git a/sources/libs/stdc-math/tgamma.c b/src/libs/stdc-math/tgamma.c similarity index 100% rename from sources/libs/stdc-math/tgamma.c rename to src/libs/stdc-math/tgamma.c diff --git a/sources/libs/stdc-math/tgammaf.c b/src/libs/stdc-math/tgammaf.c similarity index 100% rename from sources/libs/stdc-math/tgammaf.c rename to src/libs/stdc-math/tgammaf.c diff --git a/sources/libs/stdc-math/tgammal.c b/src/libs/stdc-math/tgammal.c similarity index 100% rename from sources/libs/stdc-math/tgammal.c rename to src/libs/stdc-math/tgammal.c diff --git a/sources/libs/stdc-math/trunc.c b/src/libs/stdc-math/trunc.c similarity index 100% rename from sources/libs/stdc-math/trunc.c rename to src/libs/stdc-math/trunc.c diff --git a/sources/libs/stdc-math/truncf.c b/src/libs/stdc-math/truncf.c similarity index 100% rename from sources/libs/stdc-math/truncf.c rename to src/libs/stdc-math/truncf.c diff --git a/sources/libs/stdc-math/truncl.c b/src/libs/stdc-math/truncl.c similarity index 100% rename from sources/libs/stdc-math/truncl.c rename to src/libs/stdc-math/truncl.c diff --git a/sources/libs/stdc-posix/errno.h b/src/libs/stdc-posix/errno.h similarity index 100% rename from sources/libs/stdc-posix/errno.h rename to src/libs/stdc-posix/errno.h diff --git a/sources/libs/stdc-posix/locale.h b/src/libs/stdc-posix/locale.h similarity index 100% rename from sources/libs/stdc-posix/locale.h rename to src/libs/stdc-posix/locale.h diff --git a/sources/libs/stdc-posix/locale/local_t.h b/src/libs/stdc-posix/locale/local_t.h similarity index 100% rename from sources/libs/stdc-posix/locale/local_t.h rename to src/libs/stdc-posix/locale/local_t.h diff --git a/sources/libs/stdc-posix/string.h b/src/libs/stdc-posix/string.h similarity index 100% rename from sources/libs/stdc-posix/string.h rename to src/libs/stdc-posix/string.h diff --git a/sources/libs/ubsan/ubsan.c b/src/libs/ubsan/ubsan.c similarity index 100% rename from sources/libs/ubsan/ubsan.c rename to src/libs/ubsan/ubsan.c diff --git a/sources/loader/config.c b/src/loader/config.c similarity index 100% rename from sources/loader/config.c rename to src/loader/config.c diff --git a/sources/loader/config.h b/src/loader/config.h similarity index 100% rename from sources/loader/config.h rename to src/loader/config.h diff --git a/sources/loader/main.c b/src/loader/main.c similarity index 100% rename from sources/loader/main.c rename to src/loader/main.c diff --git a/sources/loader/memory.c b/src/loader/memory.c similarity index 100% rename from sources/loader/memory.c rename to src/loader/memory.c diff --git a/sources/loader/memory.h b/src/loader/memory.h similarity index 100% rename from sources/loader/memory.h rename to src/loader/memory.h diff --git a/sources/loader/protocol.c b/src/loader/protocol.c similarity index 100% rename from sources/loader/protocol.c rename to src/loader/protocol.c diff --git a/sources/loader/protocol.h b/src/loader/protocol.h similarity index 100% rename from sources/loader/protocol.h rename to src/loader/protocol.h diff --git a/sources/protos/.build.mk b/src/protos/.build.mk similarity index 100% rename from sources/protos/.build.mk rename to src/protos/.build.mk diff --git a/sources/protos/base.idl b/src/protos/base.idl similarity index 100% rename from sources/protos/base.idl rename to src/protos/base.idl diff --git a/sources/protos/boot.idl b/src/protos/boot.idl similarity index 100% rename from sources/protos/boot.idl rename to src/protos/boot.idl diff --git a/sources/protos/event.idl b/src/protos/event.idl similarity index 100% rename from sources/protos/event.idl rename to src/protos/event.idl diff --git a/sources/protos/hw.idl b/src/protos/hw.idl similarity index 100% rename from sources/protos/hw.idl rename to src/protos/hw.idl diff --git a/sources/protos/math.idl b/src/protos/math.idl similarity index 100% rename from sources/protos/math.idl rename to src/protos/math.idl diff --git a/sources/protos/pci.idl b/src/protos/pci.idl similarity index 100% rename from sources/protos/pci.idl rename to src/protos/pci.idl diff --git a/sources/protos/system.idl b/src/protos/system.idl similarity index 100% rename from sources/protos/system.idl rename to src/protos/system.idl diff --git a/sources/srvs/acpi/build.mk b/src/srvs/acpi/build.mk similarity index 100% rename from sources/srvs/acpi/build.mk rename to src/srvs/acpi/build.mk diff --git a/sources/srvs/acpi/main.c b/src/srvs/acpi/main.c similarity index 100% rename from sources/srvs/acpi/main.c rename to src/srvs/acpi/main.c diff --git a/sources/srvs/acpi/manifest.json b/src/srvs/acpi/manifest.json similarity index 100% rename from sources/srvs/acpi/manifest.json rename to src/srvs/acpi/manifest.json diff --git a/sources/srvs/ahci/build.mk b/src/srvs/ahci/build.mk similarity index 100% rename from sources/srvs/ahci/build.mk rename to src/srvs/ahci/build.mk diff --git a/sources/srvs/ahci/main.c b/src/srvs/ahci/main.c similarity index 100% rename from sources/srvs/ahci/main.c rename to src/srvs/ahci/main.c diff --git a/sources/srvs/ahci/manifest.json b/src/srvs/ahci/manifest.json similarity index 100% rename from sources/srvs/ahci/manifest.json rename to src/srvs/ahci/manifest.json diff --git a/sources/srvs/device/device.h b/src/srvs/device/device.h similarity index 100% rename from sources/srvs/device/device.h rename to src/srvs/device/device.h diff --git a/sources/srvs/device/main.c b/src/srvs/device/main.c similarity index 100% rename from sources/srvs/device/main.c rename to src/srvs/device/main.c diff --git a/sources/srvs/device/manifest.json b/src/srvs/device/manifest.json similarity index 100% rename from sources/srvs/device/manifest.json rename to src/srvs/device/manifest.json diff --git a/sources/srvs/pci/build.mk b/src/srvs/pci/build.mk similarity index 100% rename from sources/srvs/pci/build.mk rename to src/srvs/pci/build.mk diff --git a/sources/srvs/pci/main.c b/src/srvs/pci/main.c similarity index 100% rename from sources/srvs/pci/main.c rename to src/srvs/pci/main.c diff --git a/sources/srvs/pci/manifest.json b/src/srvs/pci/manifest.json similarity index 100% rename from sources/srvs/pci/manifest.json rename to src/srvs/pci/manifest.json diff --git a/sources/srvs/ps2/build.mk b/src/srvs/ps2/build.mk similarity index 100% rename from sources/srvs/ps2/build.mk rename to src/srvs/ps2/build.mk diff --git a/sources/srvs/ps2/main.c b/src/srvs/ps2/main.c similarity index 100% rename from sources/srvs/ps2/main.c rename to src/srvs/ps2/main.c diff --git a/sources/srvs/ps2/manifest.json b/src/srvs/ps2/manifest.json similarity index 100% rename from sources/srvs/ps2/manifest.json rename to src/srvs/ps2/manifest.json diff --git a/sources/srvs/ps2/ps2.h b/src/srvs/ps2/ps2.h similarity index 100% rename from sources/srvs/ps2/ps2.h rename to src/srvs/ps2/ps2.h diff --git a/sources/srvs/storage/manifest.json b/src/srvs/storage/manifest.json similarity index 100% rename from sources/srvs/storage/manifest.json rename to src/srvs/storage/manifest.json diff --git a/sources/srvs/system/build.mk b/src/srvs/system/build.mk similarity index 100% rename from sources/srvs/system/build.mk rename to src/srvs/system/build.mk diff --git a/sources/srvs/system/bus.c b/src/srvs/system/bus.c similarity index 100% rename from sources/srvs/system/bus.c rename to src/srvs/system/bus.c diff --git a/sources/srvs/system/bus.h b/src/srvs/system/bus.h similarity index 100% rename from sources/srvs/system/bus.h rename to src/srvs/system/bus.h diff --git a/sources/srvs/system/main.c b/src/srvs/system/main.c similarity index 100% rename from sources/srvs/system/main.c rename to src/srvs/system/main.c diff --git a/sources/srvs/system/manifest.json b/src/srvs/system/manifest.json similarity index 100% rename from sources/srvs/system/manifest.json rename to src/srvs/system/manifest.json diff --git a/sources/srvs/system/unit.c b/src/srvs/system/unit.c similarity index 100% rename from sources/srvs/system/unit.c rename to src/srvs/system/unit.c diff --git a/sources/srvs/system/unit.h b/src/srvs/system/unit.h similarity index 100% rename from sources/srvs/system/unit.h rename to src/srvs/system/unit.h diff --git a/sources/utils/bvm/build.mk b/src/utils/bvm/build.mk similarity index 100% rename from sources/utils/bvm/build.mk rename to src/utils/bvm/build.mk diff --git a/sources/utils/bvm/main.c b/src/utils/bvm/main.c similarity index 100% rename from sources/utils/bvm/main.c rename to src/utils/bvm/main.c diff --git a/sources/utils/cc/manifest.json b/src/utils/bvm/manifest.json similarity index 100% rename from sources/utils/cc/manifest.json rename to src/utils/bvm/manifest.json diff --git a/sources/utils/cc/build.mk b/src/utils/cc/build.mk similarity index 100% rename from sources/utils/cc/build.mk rename to src/utils/cc/build.mk diff --git a/sources/utils/cc/main.c b/src/utils/cc/main.c similarity index 100% rename from sources/utils/cc/main.c rename to src/utils/cc/main.c diff --git a/sources/utils/fstools/manifest.json b/src/utils/cc/manifest.json similarity index 100% rename from sources/utils/fstools/manifest.json rename to src/utils/cc/manifest.json diff --git a/sources/utils/fstools/build.mk b/src/utils/fstools/build.mk similarity index 100% rename from sources/utils/fstools/build.mk rename to src/utils/fstools/build.mk diff --git a/sources/utils/fstools/main.c b/src/utils/fstools/main.c similarity index 100% rename from sources/utils/fstools/main.c rename to src/utils/fstools/main.c diff --git a/sources/utils/idl/manifest.json b/src/utils/fstools/manifest.json similarity index 100% rename from sources/utils/idl/manifest.json rename to src/utils/fstools/manifest.json diff --git a/sources/utils/gunzip/build.mk b/src/utils/gunzip/build.mk similarity index 100% rename from sources/utils/gunzip/build.mk rename to src/utils/gunzip/build.mk diff --git a/sources/utils/gunzip/main.c b/src/utils/gunzip/main.c similarity index 100% rename from sources/utils/gunzip/main.c rename to src/utils/gunzip/main.c diff --git a/sources/utils/gunzip/manifest.json b/src/utils/gunzip/manifest.json similarity index 100% rename from sources/utils/gunzip/manifest.json rename to src/utils/gunzip/manifest.json diff --git a/sources/utils/gzip/build.mk b/src/utils/gzip/build.mk similarity index 100% rename from sources/utils/gzip/build.mk rename to src/utils/gzip/build.mk diff --git a/sources/utils/gzip/main.c b/src/utils/gzip/main.c similarity index 100% rename from sources/utils/gzip/main.c rename to src/utils/gzip/main.c diff --git a/sources/utils/gzip/manifest.json b/src/utils/gzip/manifest.json similarity index 100% rename from sources/utils/gzip/manifest.json rename to src/utils/gzip/manifest.json diff --git a/sources/utils/hello/build.mk b/src/utils/hello/build.mk similarity index 100% rename from sources/utils/hello/build.mk rename to src/utils/hello/build.mk diff --git a/sources/utils/hello/main.c b/src/utils/hello/main.c similarity index 100% rename from sources/utils/hello/main.c rename to src/utils/hello/main.c diff --git a/sources/utils/idgen/build.mk b/src/utils/idgen/build.mk similarity index 100% rename from sources/utils/idgen/build.mk rename to src/utils/idgen/build.mk diff --git a/sources/utils/idgen/main.c b/src/utils/idgen/main.c similarity index 100% rename from sources/utils/idgen/main.c rename to src/utils/idgen/main.c diff --git a/sources/utils/idl/build.mk b/src/utils/idl/build.mk similarity index 100% rename from sources/utils/idl/build.mk rename to src/utils/idl/build.mk diff --git a/sources/utils/idl/main.c b/src/utils/idl/main.c similarity index 100% rename from sources/utils/idl/main.c rename to src/utils/idl/main.c diff --git a/sources/utils/test/manifest.json b/src/utils/idl/manifest.json similarity index 100% rename from sources/utils/test/manifest.json rename to src/utils/idl/manifest.json diff --git a/sources/utils/test/brutal/alloc/heap.c b/src/utils/test/brutal/alloc/heap.c similarity index 100% rename from sources/utils/test/brutal/alloc/heap.c rename to src/utils/test/brutal/alloc/heap.c diff --git a/sources/utils/test/brutal/base/endian.c b/src/utils/test/brutal/base/endian.c similarity index 100% rename from sources/utils/test/brutal/base/endian.c rename to src/utils/test/brutal/base/endian.c diff --git a/sources/utils/test/brutal/codec/deflate.c b/src/utils/test/brutal/codec/deflate.c similarity index 100% rename from sources/utils/test/brutal/codec/deflate.c rename to src/utils/test/brutal/codec/deflate.c diff --git a/sources/utils/test/brutal/codec/gzip.c b/src/utils/test/brutal/codec/gzip.c similarity index 100% rename from sources/utils/test/brutal/codec/gzip.c rename to src/utils/test/brutal/codec/gzip.c diff --git a/sources/utils/test/brutal/codec/inflate.c b/src/utils/test/brutal/codec/inflate.c similarity index 100% rename from sources/utils/test/brutal/codec/inflate.c rename to src/utils/test/brutal/codec/inflate.c diff --git a/sources/utils/test/brutal/codec/zlib.c b/src/utils/test/brutal/codec/zlib.c similarity index 100% rename from sources/utils/test/brutal/codec/zlib.c rename to src/utils/test/brutal/codec/zlib.c diff --git a/sources/utils/test/brutal/ds/map.c b/src/utils/test/brutal/ds/map.c similarity index 100% rename from sources/utils/test/brutal/ds/map.c rename to src/utils/test/brutal/ds/map.c diff --git a/sources/utils/test/brutal/ds/range.c b/src/utils/test/brutal/ds/range.c similarity index 100% rename from sources/utils/test/brutal/ds/range.c rename to src/utils/test/brutal/ds/range.c diff --git a/sources/utils/test/brutal/ds/slot.c b/src/utils/test/brutal/ds/slot.c similarity index 100% rename from sources/utils/test/brutal/ds/slot.c rename to src/utils/test/brutal/ds/slot.c diff --git a/sources/utils/test/brutal/ds/vec.c b/src/utils/test/brutal/ds/vec.c similarity index 100% rename from sources/utils/test/brutal/ds/vec.c rename to src/utils/test/brutal/ds/vec.c diff --git a/sources/utils/test/brutal/fmt/case.c b/src/utils/test/brutal/fmt/case.c similarity index 100% rename from sources/utils/test/brutal/fmt/case.c rename to src/utils/test/brutal/fmt/case.c diff --git a/sources/utils/test/brutal/fmt/format.c b/src/utils/test/brutal/fmt/format.c similarity index 100% rename from sources/utils/test/brutal/fmt/format.c rename to src/utils/test/brutal/fmt/format.c diff --git a/sources/utils/test/brutal/fmt/printf.c b/src/utils/test/brutal/fmt/printf.c similarity index 100% rename from sources/utils/test/brutal/fmt/printf.c rename to src/utils/test/brutal/fmt/printf.c diff --git a/sources/utils/test/brutal/glob/glob.c b/src/utils/test/brutal/glob/glob.c similarity index 100% rename from sources/utils/test/brutal/glob/glob.c rename to src/utils/test/brutal/glob/glob.c diff --git a/sources/utils/test/brutal/io/bit_write.c b/src/utils/test/brutal/io/bit_write.c similarity index 100% rename from sources/utils/test/brutal/io/bit_write.c rename to src/utils/test/brutal/io/bit_write.c diff --git a/sources/utils/test/brutal/tests/expect.c b/src/utils/test/brutal/tests/expect.c similarity index 100% rename from sources/utils/test/brutal/tests/expect.c rename to src/utils/test/brutal/tests/expect.c diff --git a/sources/utils/test/brutal/tests/test.c b/src/utils/test/brutal/tests/test.c similarity index 100% rename from sources/utils/test/brutal/tests/test.c rename to src/utils/test/brutal/tests/test.c diff --git a/sources/utils/test/build.mk b/src/utils/test/build.mk similarity index 100% rename from sources/utils/test/build.mk rename to src/utils/test/build.mk diff --git a/sources/utils/test/cc/cc.h b/src/utils/test/cc/cc.h similarity index 100% rename from sources/utils/test/cc/cc.h rename to src/utils/test/cc/cc.h diff --git a/sources/utils/test/cc/pproc.c b/src/utils/test/cc/pproc.c similarity index 100% rename from sources/utils/test/cc/pproc.c rename to src/utils/test/cc/pproc.c diff --git a/sources/utils/test/json/json.c b/src/utils/test/json/json.c similarity index 100% rename from sources/utils/test/json/json.c rename to src/utils/test/json/json.c diff --git a/sources/utils/test/main.c b/src/utils/test/main.c similarity index 100% rename from sources/utils/test/main.c rename to src/utils/test/main.c diff --git a/src/utils/test/manifest.json b/src/utils/test/manifest.json new file mode 100644 index 000000000..e69de29bb From 5d832f039df031c47ac395be1a507fc5bac3e4b6 Mon Sep 17 00:00:00 2001 From: Supercip971 Date: Sun, 19 Feb 2023 12:36:12 -0400 Subject: [PATCH 07/13] osdk-trans: replace module import in the kernel and in its dependencies --- src/kernel/cpu.c | 2 +- src/kernel/domain.c | 3 +-- src/kernel/domain.h | 1 + src/kernel/event.c | 5 ++--- src/kernel/init.c | 6 ++++-- src/kernel/kernel.c | 2 +- src/kernel/memory.c | 4 ++-- src/kernel/memory.h | 2 -- src/kernel/object.c | 3 ++- src/kernel/object.h | 5 +++-- src/kernel/pmm.c | 13 ++++++++----- src/kernel/pmm.h | 1 - src/kernel/sched.c | 4 ++-- src/kernel/space.c | 4 ++-- src/kernel/space.h | 1 + src/kernel/syscalls.c | 3 ++- src/kernel/task.h | 4 ++-- src/kernel/x86_64/apic.c | 4 ++-- src/kernel/x86_64/arch.c | 1 + src/kernel/x86_64/asm.h | 2 +- src/kernel/x86_64/boot.c | 2 +- src/kernel/x86_64/cmos.c | 3 ++- src/kernel/x86_64/cmos.h | 2 +- src/kernel/x86_64/com.c | 1 + src/kernel/x86_64/com.h | 2 +- src/kernel/x86_64/context.c | 4 ++-- src/kernel/x86_64/context.h | 1 + src/kernel/x86_64/cpu.c | 2 +- src/kernel/x86_64/cpuid.c | 2 +- src/kernel/x86_64/cpuid.h | 2 +- src/kernel/x86_64/gdt.c | 2 +- src/kernel/x86_64/gdt.h | 3 ++- src/kernel/x86_64/heap.c | 5 +++-- src/kernel/x86_64/hpet.c | 4 ++-- src/kernel/x86_64/idt.c | 1 - src/kernel/x86_64/idt.h | 5 ++++- src/kernel/x86_64/interrupts.c | 6 +++--- src/kernel/x86_64/interrupts.h | 2 +- src/kernel/x86_64/paging.h | 3 ++- src/kernel/x86_64/simd.c | 5 +++-- src/kernel/x86_64/simd.h | 2 +- src/kernel/x86_64/smp.c | 6 ++++-- src/kernel/x86_64/syscall.c | 2 +- src/kernel/x86_64/syscall.h | 2 +- src/kernel/x86_64/vmm.c | 7 +++++-- src/libs/brutal-sync/lock.h | 7 ++++++- src/libs/brutal-sync/ref.h | 2 +- src/libs/brutal-sync/rwlock.c | 5 +++-- src/libs/hw/acpi/base.h | 2 +- src/libs/hw/acpi/madt.h | 1 + src/libs/hw/acpi/rsdt.h | 1 + src/libs/hw/acpi/stdh.h | 6 ++++-- 52 files changed, 100 insertions(+), 70 deletions(-) diff --git a/src/kernel/cpu.c b/src/kernel/cpu.c index 6a153203d..e53a0a691 100644 --- a/src/kernel/cpu.c +++ b/src/kernel/cpu.c @@ -1,5 +1,5 @@ #include "kernel/cpu.h" -#include +#include void cpu_begin_interrupt(void) { diff --git a/src/kernel/domain.c b/src/kernel/domain.c index 8a9dc0f83..d17fd1a5b 100644 --- a/src/kernel/domain.c +++ b/src/kernel/domain.c @@ -1,6 +1,5 @@ #include "kernel/domain.h" -#include -#include +#include void domain_destroy(Domain *self) { diff --git a/src/kernel/domain.h b/src/kernel/domain.h index d88bc9684..c67c34b8b 100644 --- a/src/kernel/domain.h +++ b/src/kernel/domain.h @@ -1,6 +1,7 @@ #pragma once #include "kernel/object.h" +#include typedef struct { diff --git a/src/kernel/event.c b/src/kernel/event.c index 23aebd3ce..ff37c333f 100644 --- a/src/kernel/event.c +++ b/src/kernel/event.c @@ -1,7 +1,6 @@ #include "kernel/event.h" -#include -#include -#include +#include +#include static RwLock _lock = {}; static Vec(EventBinding) _bindings = {}; diff --git a/src/kernel/init.c b/src/kernel/init.c index 98790a0f3..23e12661b 100644 --- a/src/kernel/init.c +++ b/src/kernel/init.c @@ -1,5 +1,7 @@ -#include -#include +#include +#include +#include +#include #include "kernel/heap.h" #include "kernel/init.h" diff --git a/src/kernel/kernel.c b/src/kernel/kernel.c index 208c8272f..923834921 100644 --- a/src/kernel/kernel.c +++ b/src/kernel/kernel.c @@ -1,4 +1,4 @@ -#include +#include void kernel_splash(void) { diff --git a/src/kernel/memory.c b/src/kernel/memory.c index d4d3773ff..70acabce8 100644 --- a/src/kernel/memory.c +++ b/src/kernel/memory.c @@ -1,6 +1,6 @@ #include "kernel/memory.h" -#include -#include +#include +#include void memory_destroy(Memory *self) { diff --git a/src/kernel/memory.h b/src/kernel/memory.h index 94ac3f35f..52eecaae3 100644 --- a/src/kernel/memory.h +++ b/src/kernel/memory.h @@ -1,7 +1,5 @@ #pragma once -#include -#include #include "kernel/domain.h" #include "kernel/heap.h" #include "kernel/pmm.h" diff --git a/src/kernel/object.c b/src/kernel/object.c index 22cea07ee..c8cfeb62a 100644 --- a/src/kernel/object.c +++ b/src/kernel/object.c @@ -1,5 +1,6 @@ #include "kernel/object.h" -#include +#include +#include static _Atomic BrHandle _id = 1; static _Atomic bool _init = false; diff --git a/src/kernel/object.h b/src/kernel/object.h index 05b82b189..0e8e2a8cd 100644 --- a/src/kernel/object.h +++ b/src/kernel/object.h @@ -1,8 +1,9 @@ #pragma once #include -#include -#include +#include +#include +#include typedef void ObjectDtor(void *object); diff --git a/src/kernel/pmm.c b/src/kernel/pmm.c index afe0dfe2a..29b1af069 100644 --- a/src/kernel/pmm.c +++ b/src/kernel/pmm.c @@ -1,9 +1,12 @@ #include "kernel/pmm.h" -#include -#include -#include -#include - +#include +#include +#include +#include +#include + +#include +#include #include "kernel/arch.h" #include "kernel/mmap.h" diff --git a/src/kernel/pmm.h b/src/kernel/pmm.h index 2734bf544..1cda7c529 100644 --- a/src/kernel/pmm.h +++ b/src/kernel/pmm.h @@ -2,7 +2,6 @@ #include #include -#include #define PMM_USED (true) #define PMM_UNUSED (false) diff --git a/src/kernel/sched.c b/src/kernel/sched.c index f85ee8c01..87e32d43a 100644 --- a/src/kernel/sched.c +++ b/src/kernel/sched.c @@ -1,6 +1,6 @@ #include "kernel/sched.h" -#include -#include +#include +#include #include "kernel/arch.h" #include "kernel/cpu.h" diff --git a/src/kernel/space.c b/src/kernel/space.c index 46bcb41b1..93c3ac0e3 100644 --- a/src/kernel/space.c +++ b/src/kernel/space.c @@ -1,6 +1,6 @@ #include "kernel/space.h" -#include -#include +#include +#include /* --- Memory Mappings ------------------------------------------------------ */ diff --git a/src/kernel/space.h b/src/kernel/space.h index 983771333..200a072d3 100644 --- a/src/kernel/space.h +++ b/src/kernel/space.h @@ -2,6 +2,7 @@ #include "kernel/memory.h" #include "kernel/vmm.h" +#include typedef struct { diff --git a/src/kernel/syscalls.c b/src/kernel/syscalls.c index b9af0a0be..29414aca2 100644 --- a/src/kernel/syscalls.c +++ b/src/kernel/syscalls.c @@ -1,5 +1,6 @@ #include -#include +#include +#include #include #include "kernel/arch.h" diff --git a/src/kernel/task.h b/src/kernel/task.h index f6c703162..b8aeff92d 100644 --- a/src/kernel/task.h +++ b/src/kernel/task.h @@ -1,8 +1,8 @@ #pragma once #include -#include -#include +#include +#include #include "kernel/channel.h" #include "kernel/context.h" diff --git a/src/kernel/x86_64/apic.c b/src/kernel/x86_64/apic.c index 53e933137..145f96b86 100644 --- a/src/kernel/x86_64/apic.c +++ b/src/kernel/x86_64/apic.c @@ -1,7 +1,7 @@ #include +#include #include -#include -#include +#include #include "kernel/mmap.h" #include "kernel/x86_64/apic.h" #include "kernel/x86_64/asm.h" diff --git a/src/kernel/x86_64/arch.c b/src/kernel/x86_64/arch.c index e1996b992..7a0aed48d 100644 --- a/src/kernel/x86_64/arch.c +++ b/src/kernel/x86_64/arch.c @@ -2,6 +2,7 @@ #include "kernel/cpu.h" #include "kernel/x86_64/apic.h" #include "kernel/x86_64/asm.h" +#include #include "kernel/x86_64/cmos.h" #include "kernel/x86_64/com.h" #include "kernel/x86_64/smp.h" diff --git a/src/kernel/x86_64/asm.h b/src/kernel/x86_64/asm.h index ee07897d4..a0e57a428 100644 --- a/src/kernel/x86_64/asm.h +++ b/src/kernel/x86_64/asm.h @@ -1,6 +1,6 @@ #pragma once -#include +#include static inline void asm_cli(void) { asm volatile("cli"); } diff --git a/src/kernel/x86_64/boot.c b/src/kernel/x86_64/boot.c index 5d923ce3a..7eec25beb 100644 --- a/src/kernel/x86_64/boot.c +++ b/src/kernel/x86_64/boot.c @@ -1,4 +1,4 @@ -#include +#include #include "kernel/arch.h" #include "kernel/event.h" #include "kernel/init.h" diff --git a/src/kernel/x86_64/cmos.c b/src/kernel/x86_64/cmos.c index 38b5dfd98..7032151c9 100644 --- a/src/kernel/x86_64/cmos.c +++ b/src/kernel/x86_64/cmos.c @@ -1,5 +1,6 @@ #include "kernel/x86_64/cmos.h" -#include +#include +#include #include "kernel/x86_64/asm.h" static Lock _lock; diff --git a/src/kernel/x86_64/cmos.h b/src/kernel/x86_64/cmos.h index d8b152ad5..53822c10d 100644 --- a/src/kernel/x86_64/cmos.h +++ b/src/kernel/x86_64/cmos.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #define CMOS_ADDRESS 0x70 #define CMOS_DATA 0x71 diff --git a/src/kernel/x86_64/com.c b/src/kernel/x86_64/com.c index c43a35493..45a38a7c9 100644 --- a/src/kernel/x86_64/com.c +++ b/src/kernel/x86_64/com.c @@ -1,3 +1,4 @@ +#include #include "kernel/x86_64/com.h" #include "kernel/x86_64/asm.h" diff --git a/src/kernel/x86_64/com.h b/src/kernel/x86_64/com.h index 49d1c9d79..133fd4ab0 100644 --- a/src/kernel/x86_64/com.h +++ b/src/kernel/x86_64/com.h @@ -1,6 +1,6 @@ #pragma once -#include +#include enum com_port { diff --git a/src/kernel/x86_64/context.c b/src/kernel/x86_64/context.c index f46b3185c..ab239bb12 100644 --- a/src/kernel/x86_64/context.c +++ b/src/kernel/x86_64/context.c @@ -1,6 +1,6 @@ #include "kernel/context.h" -#include -#include +#include +#include #include "kernel/x86_64/asm.h" #include "kernel/x86_64/gdt.h" #include "kernel/x86_64/simd.h" diff --git a/src/kernel/x86_64/context.h b/src/kernel/x86_64/context.h index b4a67325a..8c105fec2 100644 --- a/src/kernel/x86_64/context.h +++ b/src/kernel/x86_64/context.h @@ -1,5 +1,6 @@ #pragma once +#include #include "kernel/x86_64/interrupts.h" struct _Context diff --git a/src/kernel/x86_64/cpu.c b/src/kernel/x86_64/cpu.c index 98e9c9f39..22280ed87 100644 --- a/src/kernel/x86_64/cpu.c +++ b/src/kernel/x86_64/cpu.c @@ -1,5 +1,5 @@ #include "kernel/cpu.h" -#include +#include #include "kernel/heap.h" #include "kernel/kernel.h" #include "kernel/x86_64/apic.h" diff --git a/src/kernel/x86_64/cpuid.c b/src/kernel/x86_64/cpuid.c index 61c12e44b..7cc0f6f87 100644 --- a/src/kernel/x86_64/cpuid.c +++ b/src/kernel/x86_64/cpuid.c @@ -1,5 +1,5 @@ #include "kernel/x86_64/cpuid.h" -#include +#include CpuidResult cpuid(uint32_t leaf, uint32_t subleaf) { diff --git a/src/kernel/x86_64/cpuid.h b/src/kernel/x86_64/cpuid.h index 568c4b7dc..855bda473 100644 --- a/src/kernel/x86_64/cpuid.h +++ b/src/kernel/x86_64/cpuid.h @@ -1,6 +1,6 @@ #pragma once -#include +#include // doc: https://www.amd.com/system/files/TechDocs/25481.pdf diff --git a/src/kernel/x86_64/gdt.c b/src/kernel/x86_64/gdt.c index f341f68b8..25a4c69a0 100644 --- a/src/kernel/x86_64/gdt.c +++ b/src/kernel/x86_64/gdt.c @@ -1,5 +1,5 @@ #include "kernel/x86_64/gdt.h" -#include +#include static Tss _tss = { .reserved = 0, diff --git a/src/kernel/x86_64/gdt.h b/src/kernel/x86_64/gdt.h index cb2abc464..5eeeb3f4e 100644 --- a/src/kernel/x86_64/gdt.h +++ b/src/kernel/x86_64/gdt.h @@ -1,6 +1,7 @@ #pragma once -#include +#include +#include #define GDT_ENTRY_COUNT 5 #define GDT_SEGMENT (0b00010000) diff --git a/src/kernel/x86_64/heap.c b/src/kernel/x86_64/heap.c index 3d037795a..40acb1397 100644 --- a/src/kernel/x86_64/heap.c +++ b/src/kernel/x86_64/heap.c @@ -1,6 +1,7 @@ #include "kernel/heap.h" -#include -#include +#include +#include +#include #include "kernel/mmap.h" #include "kernel/pmm.h" diff --git a/src/kernel/x86_64/hpet.c b/src/kernel/x86_64/hpet.c index 57e406e5d..4946596d6 100644 --- a/src/kernel/x86_64/hpet.c +++ b/src/kernel/x86_64/hpet.c @@ -1,7 +1,7 @@ #include #include -#include -#include +#include +#include #include "kernel/x86_64/hpet.h" diff --git a/src/kernel/x86_64/idt.c b/src/kernel/x86_64/idt.c index 9c3734c0a..9dd43d5eb 100644 --- a/src/kernel/x86_64/idt.c +++ b/src/kernel/x86_64/idt.c @@ -1,5 +1,4 @@ #include "kernel/x86_64/idt.h" -#include #include "kernel/arch.h" #include "kernel/x86_64/apic.h" #include "kernel/x86_64/gdt.h" diff --git a/src/kernel/x86_64/idt.h b/src/kernel/x86_64/idt.h index 2b4991d92..3c06ca93f 100644 --- a/src/kernel/x86_64/idt.h +++ b/src/kernel/x86_64/idt.h @@ -1,6 +1,9 @@ #pragma once -#include +#include +#include + + enum { diff --git a/src/kernel/x86_64/interrupts.c b/src/kernel/x86_64/interrupts.c index 30da0e9fb..5149abb11 100644 --- a/src/kernel/x86_64/interrupts.c +++ b/src/kernel/x86_64/interrupts.c @@ -1,6 +1,6 @@ -#include -#include -#include +#include +#include +#include #include "kernel/x86_64/apic.h" #include "kernel/x86_64/asm.h" diff --git a/src/kernel/x86_64/interrupts.h b/src/kernel/x86_64/interrupts.h index bc73525b5..b3dc94ef2 100644 --- a/src/kernel/x86_64/interrupts.h +++ b/src/kernel/x86_64/interrupts.h @@ -1,6 +1,6 @@ #pragma once -#include +#include typedef struct PACKED { diff --git a/src/kernel/x86_64/paging.h b/src/kernel/x86_64/paging.h index 2fdbb8537..86da7e169 100644 --- a/src/kernel/x86_64/paging.h +++ b/src/kernel/x86_64/paging.h @@ -1,7 +1,8 @@ #pragma once #include -#include +#include +#include typedef union PACKED { diff --git a/src/kernel/x86_64/simd.c b/src/kernel/x86_64/simd.c index 1b3263e86..1c45a9428 100644 --- a/src/kernel/x86_64/simd.c +++ b/src/kernel/x86_64/simd.c @@ -1,5 +1,6 @@ -#include -#include +#include +#include +#include #include "kernel/x86_64/asm.h" #include "kernel/x86_64/cpuid.h" diff --git a/src/kernel/x86_64/simd.h b/src/kernel/x86_64/simd.h index 31531e6ba..2757caeca 100644 --- a/src/kernel/x86_64/simd.h +++ b/src/kernel/x86_64/simd.h @@ -1,6 +1,6 @@ #pragma once -#include +#include void simd_initialize(void); diff --git a/src/kernel/x86_64/smp.c b/src/kernel/x86_64/smp.c index 13d61abca..1dcdea778 100644 --- a/src/kernel/x86_64/smp.c +++ b/src/kernel/x86_64/smp.c @@ -1,5 +1,7 @@ -#include -#include +#include +#include +#include +#include #include #include "kernel/x86_64/apic.h" diff --git a/src/kernel/x86_64/syscall.c b/src/kernel/x86_64/syscall.c index d3032289a..1d6535de0 100644 --- a/src/kernel/x86_64/syscall.c +++ b/src/kernel/x86_64/syscall.c @@ -1,5 +1,5 @@ #include "kernel/x86_64/syscall.h" -#include +#include #include "kernel/heap.h" #include "kernel/kernel.h" #include "kernel/syscalls.h" diff --git a/src/kernel/x86_64/syscall.h b/src/kernel/x86_64/syscall.h index 52aac9496..4d32b7185 100644 --- a/src/kernel/x86_64/syscall.h +++ b/src/kernel/x86_64/syscall.h @@ -1,6 +1,6 @@ #pragma once -#include +#include void syscall_initialize(void); diff --git a/src/kernel/x86_64/vmm.c b/src/kernel/x86_64/vmm.c index 6c61edc45..ebd2c9acd 100644 --- a/src/kernel/x86_64/vmm.c +++ b/src/kernel/x86_64/vmm.c @@ -1,6 +1,9 @@ #include "kernel/vmm.h" -#include -#include +#include +#include +#include +#include +#include #include "kernel/x86_64/asm.h" #include "kernel/x86_64/paging.h" diff --git a/src/libs/brutal-sync/lock.h b/src/libs/brutal-sync/lock.h index 9aca2cb2e..59496e836 100644 --- a/src/libs/brutal-sync/lock.h +++ b/src/libs/brutal-sync/lock.h @@ -1,6 +1,11 @@ #pragma once -#include +#include +#include +#include +#include +#include + typedef struct { diff --git a/src/libs/brutal-sync/ref.h b/src/libs/brutal-sync/ref.h index f179ffbb4..b90e12f76 100644 --- a/src/libs/brutal-sync/ref.h +++ b/src/libs/brutal-sync/ref.h @@ -1,6 +1,6 @@ #pragma once -#include +#include typedef enum { diff --git a/src/libs/brutal-sync/rwlock.c b/src/libs/brutal-sync/rwlock.c index 06f2f70d5..f6f32d1a3 100644 --- a/src/libs/brutal-sync/rwlock.c +++ b/src/libs/brutal-sync/rwlock.c @@ -1,7 +1,8 @@ -#include #include - +#include +#include #include "rwlock.h" +#include void rwlock_acquire_read(RwLock *self) { diff --git a/src/libs/hw/acpi/base.h b/src/libs/hw/acpi/base.h index 4ea635a77..1d6c5adc1 100644 --- a/src/libs/hw/acpi/base.h +++ b/src/libs/hw/acpi/base.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #ifndef __kernel__ # include #endif diff --git a/src/libs/hw/acpi/madt.h b/src/libs/hw/acpi/madt.h index 6cb05a6a6..eecf73008 100644 --- a/src/libs/hw/acpi/madt.h +++ b/src/libs/hw/acpi/madt.h @@ -2,6 +2,7 @@ #include #include +#include typedef enum { diff --git a/src/libs/hw/acpi/rsdt.h b/src/libs/hw/acpi/rsdt.h index 3668721ee..91cdb7278 100644 --- a/src/libs/hw/acpi/rsdt.h +++ b/src/libs/hw/acpi/rsdt.h @@ -2,6 +2,7 @@ #include #include +#include typedef struct PACKED _AcpiRsdt { diff --git a/src/libs/hw/acpi/stdh.h b/src/libs/hw/acpi/stdh.h index b0ea53601..cc5d45d99 100644 --- a/src/libs/hw/acpi/stdh.h +++ b/src/libs/hw/acpi/stdh.h @@ -1,7 +1,9 @@ #pragma once -#include -#include +#include +#include +#include + typedef struct PACKED { From e7c79e2ac74e14ff982c373ceeb0b0076e9223a0 Mon Sep 17 00:00:00 2001 From: Supercip971 Date: Sun, 19 Feb 2023 12:50:10 -0400 Subject: [PATCH 08/13] osdk-trans: rework kernel file structure + improve loader includes --- src/kernel/{ => arch}/riscv64/arch.c | 2 +- src/kernel/{ => arch}/riscv64/arch.h | 0 src/kernel/{ => arch}/riscv64/arch_boot.s | 0 src/kernel/{ => arch}/riscv64/asm.h | 0 src/kernel/{ => arch}/riscv64/boot.c | 10 ++--- src/kernel/{ => arch}/riscv64/context.c | 2 +- src/kernel/{ => arch}/riscv64/context.h | 0 src/kernel/{ => arch}/riscv64/cpu.c | 8 ++-- src/kernel/{ => arch}/riscv64/cpu.h | 2 +- src/kernel/{ => arch}/riscv64/heap.c | 6 +-- src/kernel/{ => arch}/riscv64/interrupts.c | 4 +- src/kernel/{ => arch}/riscv64/interrupts.h | 0 src/kernel/{ => arch}/riscv64/interrupts.s | 0 src/kernel/{ => arch}/riscv64/paging.h | 0 src/kernel/{ => arch}/riscv64/sifive_uart.c | 2 +- src/kernel/{ => arch}/riscv64/sifive_uart.h | 0 src/kernel/{ => arch}/riscv64/uart8250.c | 2 +- src/kernel/{ => arch}/riscv64/uart8250.h | 0 .../{ => arch}/riscv64/unleashed/gpio.h | 0 src/kernel/{ => arch}/riscv64/vmm.c | 10 ++--- src/kernel/{ => arch}/x86_64/apic.c | 12 +++--- src/kernel/{ => arch}/x86_64/apic.h | 2 +- src/kernel/{ => arch}/x86_64/arch.c | 12 +++--- src/kernel/{ => arch}/x86_64/asm.h | 0 src/kernel/{ => arch}/x86_64/boot.c | 38 +++++++++---------- src/kernel/{ => arch}/x86_64/boot.s | 0 src/kernel/{ => arch}/x86_64/cmos.c | 4 +- src/kernel/{ => arch}/x86_64/cmos.h | 0 src/kernel/{ => arch}/x86_64/com.c | 4 +- src/kernel/{ => arch}/x86_64/com.h | 0 src/kernel/{ => arch}/x86_64/context.c | 10 ++--- src/kernel/{ => arch}/x86_64/context.h | 2 +- src/kernel/{ => arch}/x86_64/cpu.c | 12 +++--- src/kernel/{ => arch}/x86_64/cpu.h | 4 +- src/kernel/{ => arch}/x86_64/cpuid.c | 2 +- src/kernel/{ => arch}/x86_64/cpuid.h | 0 src/kernel/{ => arch}/x86_64/gdt.c | 2 +- src/kernel/{ => arch}/x86_64/gdt.h | 0 src/kernel/{ => arch}/x86_64/gdt.s | 0 src/kernel/{ => arch}/x86_64/heap.c | 6 +-- src/kernel/{ => arch}/x86_64/hpet.c | 4 +- src/kernel/{ => arch}/x86_64/hpet.h | 0 src/kernel/{ => arch}/x86_64/idt.c | 6 +-- src/kernel/{ => arch}/x86_64/idt.h | 0 src/kernel/{ => arch}/x86_64/idt.s | 0 src/kernel/{ => arch}/x86_64/interrupts.c | 26 ++++++------- src/kernel/{ => arch}/x86_64/interrupts.h | 0 src/kernel/{ => arch}/x86_64/interrupts.s | 0 src/kernel/{ => arch}/x86_64/paging.h | 0 src/kernel/{ => arch}/x86_64/pic.c | 4 +- src/kernel/{ => arch}/x86_64/pic.h | 0 src/kernel/{ => arch}/x86_64/simd.c | 6 +-- src/kernel/{ => arch}/x86_64/simd.h | 0 src/kernel/{ => arch}/x86_64/smp.c | 20 +++++----- src/kernel/{ => arch}/x86_64/smp.h | 0 src/kernel/{ => arch}/x86_64/smp.s | 0 src/kernel/{ => arch}/x86_64/syscall.c | 16 ++++---- src/kernel/{ => arch}/x86_64/syscall.h | 0 src/kernel/{ => arch}/x86_64/syscall.s | 0 src/kernel/{ => arch}/x86_64/vmm.c | 10 ++--- src/kernel/{ => core}/arch.h | 2 +- src/kernel/{ => core}/channel.c | 6 +-- src/kernel/{ => core}/channel.h | 2 +- src/kernel/{ => core}/context.h | 4 +- src/kernel/{ => core}/cpu.c | 2 +- src/kernel/{ => core}/cpu.h | 2 +- src/kernel/{ => core}/domain.c | 2 +- src/kernel/{ => core}/domain.h | 2 +- src/kernel/{ => core}/event.c | 2 +- src/kernel/{ => core}/event.h | 4 +- src/kernel/{ => core}/heap.h | 2 +- src/kernel/{ => core}/init.c | 10 ++--- src/kernel/{ => core}/init.h | 2 +- src/kernel/{ => core}/kernel.c | 0 src/kernel/{ => core}/kernel.h | 0 src/kernel/{ => core}/memory.c | 2 +- src/kernel/{ => core}/memory.h | 6 +-- src/kernel/{ => core}/mmap.h | 0 src/kernel/{ => core}/object.c | 2 +- src/kernel/{ => core}/object.h | 0 src/kernel/{ => core}/parcel.c | 2 +- src/kernel/{ => core}/parcel.h | 2 +- src/kernel/{ => core}/pmm.c | 4 +- src/kernel/{ => core}/pmm.h | 0 src/kernel/{ => core}/sched.c | 4 +- src/kernel/{ => core}/sched.h | 4 +- src/kernel/{ => core}/space.c | 2 +- src/kernel/{ => core}/space.h | 4 +- src/kernel/{ => core}/syscalls.c | 14 +++---- src/kernel/{ => core}/syscalls.h | 0 src/kernel/{ => core}/task.c | 10 ++--- src/kernel/{ => core}/task.h | 6 +-- src/kernel/{ => core}/tasking.c | 8 ++-- src/kernel/{ => core}/tasking.h | 0 src/kernel/{ => core}/vmm.h | 2 +- src/libs/embed/kernel/debug.c | 2 +- src/libs/embed/kernel/mem.c | 2 +- src/libs/embed/kernel/sync.c | 2 +- 98 files changed, 185 insertions(+), 185 deletions(-) rename src/kernel/{ => arch}/riscv64/arch.c (94%) rename src/kernel/{ => arch}/riscv64/arch.h (100%) rename src/kernel/{ => arch}/riscv64/arch_boot.s (100%) rename src/kernel/{ => arch}/riscv64/asm.h (100%) rename src/kernel/{ => arch}/riscv64/boot.c (86%) rename src/kernel/{ => arch}/riscv64/context.c (94%) rename src/kernel/{ => arch}/riscv64/context.h (100%) rename src/kernel/{ => arch}/riscv64/cpu.c (87%) rename src/kernel/{ => arch}/riscv64/cpu.h (91%) rename src/kernel/{ => arch}/riscv64/heap.c (87%) rename src/kernel/{ => arch}/riscv64/interrupts.c (97%) rename src/kernel/{ => arch}/riscv64/interrupts.h (100%) rename src/kernel/{ => arch}/riscv64/interrupts.s (100%) rename src/kernel/{ => arch}/riscv64/paging.h (100%) rename src/kernel/{ => arch}/riscv64/sifive_uart.c (90%) rename src/kernel/{ => arch}/riscv64/sifive_uart.h (100%) rename src/kernel/{ => arch}/riscv64/uart8250.c (94%) rename src/kernel/{ => arch}/riscv64/uart8250.h (100%) rename src/kernel/{ => arch}/riscv64/unleashed/gpio.h (100%) rename src/kernel/{ => arch}/riscv64/vmm.c (95%) rename src/kernel/{ => arch}/x86_64/apic.c (96%) rename src/kernel/{ => arch}/x86_64/apic.h (99%) rename src/kernel/{ => arch}/x86_64/arch.c (84%) rename src/kernel/{ => arch}/x86_64/asm.h (100%) rename src/kernel/{ => arch}/x86_64/boot.c (69%) rename src/kernel/{ => arch}/x86_64/boot.s (100%) rename src/kernel/{ => arch}/x86_64/cmos.c (93%) rename src/kernel/{ => arch}/x86_64/cmos.h (100%) rename src/kernel/{ => arch}/x86_64/com.c (95%) rename src/kernel/{ => arch}/x86_64/com.h (100%) rename src/kernel/{ => arch}/x86_64/context.c (88%) rename src/kernel/{ => arch}/x86_64/context.h (87%) rename src/kernel/{ => arch}/x86_64/cpu.c (87%) rename src/kernel/{ => arch}/x86_64/cpu.h (83%) rename src/kernel/{ => arch}/x86_64/cpuid.c (94%) rename src/kernel/{ => arch}/x86_64/cpuid.h (100%) rename src/kernel/{ => arch}/x86_64/gdt.c (98%) rename src/kernel/{ => arch}/x86_64/gdt.h (100%) rename src/kernel/{ => arch}/x86_64/gdt.s (100%) rename src/kernel/{ => arch}/x86_64/heap.c (93%) rename src/kernel/{ => arch}/x86_64/hpet.c (94%) rename src/kernel/{ => arch}/x86_64/hpet.h (100%) rename src/kernel/{ => arch}/x86_64/idt.c (90%) rename src/kernel/{ => arch}/x86_64/idt.h (100%) rename src/kernel/{ => arch}/x86_64/idt.s (100%) rename src/kernel/{ => arch}/x86_64/interrupts.c (91%) rename src/kernel/{ => arch}/x86_64/interrupts.h (100%) rename src/kernel/{ => arch}/x86_64/interrupts.s (100%) rename src/kernel/{ => arch}/x86_64/paging.h (100%) rename src/kernel/{ => arch}/x86_64/pic.c (55%) rename src/kernel/{ => arch}/x86_64/pic.h (100%) rename src/kernel/{ => arch}/x86_64/simd.c (94%) rename src/kernel/{ => arch}/x86_64/simd.h (100%) rename src/kernel/{ => arch}/x86_64/smp.c (91%) rename src/kernel/{ => arch}/x86_64/smp.h (100%) rename src/kernel/{ => arch}/x86_64/smp.s (100%) rename src/kernel/{ => arch}/x86_64/syscall.c (80%) rename src/kernel/{ => arch}/x86_64/syscall.h (100%) rename src/kernel/{ => arch}/x86_64/syscall.s (100%) rename src/kernel/{ => arch}/x86_64/vmm.c (98%) rename src/kernel/{ => core}/arch.h (93%) rename src/kernel/{ => core}/channel.c (97%) rename src/kernel/{ => core}/channel.h (93%) rename src/kernel/{ => core}/context.h (79%) rename src/kernel/{ => core}/cpu.c (97%) rename src/kernel/{ => core}/cpu.h (95%) rename src/kernel/{ => core}/domain.c (98%) rename src/kernel/{ => core}/domain.h (93%) rename src/kernel/{ => core}/event.c (99%) rename src/kernel/{ => core}/event.h (88%) rename src/kernel/{ => core}/heap.h (92%) rename src/kernel/{ => core}/init.c (96%) rename src/kernel/{ => core}/init.h (75%) rename src/kernel/{ => core}/kernel.c (100%) rename src/kernel/{ => core}/kernel.h (100%) rename src/kernel/{ => core}/memory.c (98%) rename src/kernel/{ => core}/memory.h (87%) rename src/kernel/{ => core}/mmap.h (100%) rename src/kernel/{ => core}/object.c (98%) rename src/kernel/{ => core}/object.h (100%) rename src/kernel/{ => core}/parcel.c (97%) rename src/kernel/{ => core}/parcel.h (91%) rename src/kernel/{ => core}/pmm.c (99%) rename src/kernel/{ => core}/pmm.h (100%) rename src/kernel/{ => core}/sched.c (99%) rename src/kernel/{ => core}/sched.h (90%) rename src/kernel/{ => core}/space.c (99%) rename src/kernel/{ => core}/space.h (92%) rename src/kernel/{ => core}/syscalls.c (98%) rename src/kernel/{ => core}/syscalls.h (100%) rename src/kernel/{ => core}/task.c (91%) rename src/kernel/{ => core}/task.h (93%) rename src/kernel/{ => core}/tasking.c (92%) rename src/kernel/{ => core}/tasking.h (100%) rename src/kernel/{ => core}/vmm.h (96%) diff --git a/src/kernel/riscv64/arch.c b/src/kernel/arch/riscv64/arch.c similarity index 94% rename from src/kernel/riscv64/arch.c rename to src/kernel/arch/riscv64/arch.c index 5483927bd..74b7402e9 100644 --- a/src/kernel/riscv64/arch.c +++ b/src/kernel/arch/riscv64/arch.c @@ -1,5 +1,5 @@ #include "kernel/arch.h" -#include "kernel/riscv64/arch.h" +#include "kernel/arch/riscv64/arch.h" static bool _init = false; static IoWriter _writer; diff --git a/src/kernel/riscv64/arch.h b/src/kernel/arch/riscv64/arch.h similarity index 100% rename from src/kernel/riscv64/arch.h rename to src/kernel/arch/riscv64/arch.h diff --git a/src/kernel/riscv64/arch_boot.s b/src/kernel/arch/riscv64/arch_boot.s similarity index 100% rename from src/kernel/riscv64/arch_boot.s rename to src/kernel/arch/riscv64/arch_boot.s diff --git a/src/kernel/riscv64/asm.h b/src/kernel/arch/riscv64/asm.h similarity index 100% rename from src/kernel/riscv64/asm.h rename to src/kernel/arch/riscv64/asm.h diff --git a/src/kernel/riscv64/boot.c b/src/kernel/arch/riscv64/boot.c similarity index 86% rename from src/kernel/riscv64/boot.c rename to src/kernel/arch/riscv64/boot.c index 6ceb6fc16..6e8c5dfda 100644 --- a/src/kernel/riscv64/boot.c +++ b/src/kernel/arch/riscv64/boot.c @@ -5,11 +5,11 @@ #include #include #include "kernel/arch.h" -#include "kernel/pmm.h" -#include "kernel/riscv64/arch.h" -#include "kernel/riscv64/interrupts.h" -#include "kernel/riscv64/uart8250.h" -#include "kernel/vmm.h" +"kernel/core/pmm.h" +#include "kernel/arch/riscv64/arch.h" +#include "kernel/arch/riscv64/interrupts.h" +#include "kernel/arch/riscv64/uart8250.h" +"kernel/core/vmm.h" static Uart *_uart = NULL; static Handover _handover = {}; diff --git a/src/kernel/riscv64/context.c b/src/kernel/arch/riscv64/context.c similarity index 94% rename from src/kernel/riscv64/context.c rename to src/kernel/arch/riscv64/context.c index 35973ff44..c3a89c472 100644 --- a/src/kernel/riscv64/context.c +++ b/src/kernel/arch/riscv64/context.c @@ -1,4 +1,4 @@ -#include "kernel/context.h" +"kernel/core/context.h" #include #include diff --git a/src/kernel/riscv64/context.h b/src/kernel/arch/riscv64/context.h similarity index 100% rename from src/kernel/riscv64/context.h rename to src/kernel/arch/riscv64/context.h diff --git a/src/kernel/riscv64/cpu.c b/src/kernel/arch/riscv64/cpu.c similarity index 87% rename from src/kernel/riscv64/cpu.c rename to src/kernel/arch/riscv64/cpu.c index d2fdb563b..a4cfb8c29 100644 --- a/src/kernel/riscv64/cpu.c +++ b/src/kernel/arch/riscv64/cpu.c @@ -1,8 +1,8 @@ -#include "kernel/cpu.h" +"kernel/core/cpu.h" #include -#include "kernel/heap.h" -#include "kernel/kernel.h" -#include "kernel/riscv64/cpu.h" +"kernel/core/heap.h" +"kernel/core/kernel.h" +#include "kernel/arch/riscv64/cpu.h" static CpuImpl _cpus[MAX_CPU_COUNT] = {}; static size_t _len = 0; diff --git a/src/kernel/riscv64/cpu.h b/src/kernel/arch/riscv64/cpu.h similarity index 91% rename from src/kernel/riscv64/cpu.h rename to src/kernel/arch/riscv64/cpu.h index 9168562f9..86fb57b2c 100644 --- a/src/kernel/riscv64/cpu.h +++ b/src/kernel/arch/riscv64/cpu.h @@ -1,6 +1,6 @@ #pragma once -#include "kernel/cpu.h" +"kernel/core/cpu.h" #define MAX_CPU_COUNT 255 diff --git a/src/kernel/riscv64/heap.c b/src/kernel/arch/riscv64/heap.c similarity index 87% rename from src/kernel/riscv64/heap.c rename to src/kernel/arch/riscv64/heap.c index c731e19dc..b7e58d939 100644 --- a/src/kernel/riscv64/heap.c +++ b/src/kernel/arch/riscv64/heap.c @@ -1,7 +1,7 @@ -#include "kernel/heap.h" +"kernel/core/heap.h" #include -#include "kernel/mmap.h" -#include "kernel/pmm.h" +"kernel/core/mmap.h" +"kernel/core/pmm.h" static Lock _lock; diff --git a/src/kernel/riscv64/interrupts.c b/src/kernel/arch/riscv64/interrupts.c similarity index 97% rename from src/kernel/riscv64/interrupts.c rename to src/kernel/arch/riscv64/interrupts.c index 23138da23..bb3c15dff 100644 --- a/src/kernel/riscv64/interrupts.c +++ b/src/kernel/arch/riscv64/interrupts.c @@ -1,7 +1,7 @@ -#include "kernel/riscv64/interrupts.h" +#include "kernel/arch/riscv64/interrupts.h" #include #include -#include "kernel/riscv64/asm.h" +#include "kernel/arch/riscv64/asm.h" extern void interrupt_common(void); diff --git a/src/kernel/riscv64/interrupts.h b/src/kernel/arch/riscv64/interrupts.h similarity index 100% rename from src/kernel/riscv64/interrupts.h rename to src/kernel/arch/riscv64/interrupts.h diff --git a/src/kernel/riscv64/interrupts.s b/src/kernel/arch/riscv64/interrupts.s similarity index 100% rename from src/kernel/riscv64/interrupts.s rename to src/kernel/arch/riscv64/interrupts.s diff --git a/src/kernel/riscv64/paging.h b/src/kernel/arch/riscv64/paging.h similarity index 100% rename from src/kernel/riscv64/paging.h rename to src/kernel/arch/riscv64/paging.h diff --git a/src/kernel/riscv64/sifive_uart.c b/src/kernel/arch/riscv64/sifive_uart.c similarity index 90% rename from src/kernel/riscv64/sifive_uart.c rename to src/kernel/arch/riscv64/sifive_uart.c index 36819e748..28ef9f4ee 100644 --- a/src/kernel/riscv64/sifive_uart.c +++ b/src/kernel/arch/riscv64/sifive_uart.c @@ -1,4 +1,4 @@ -#include "kernel/riscv64/sifive_uart.h" +#include "kernel/arch/riscv64/sifive_uart.h" #include static Uart _self; diff --git a/src/kernel/riscv64/sifive_uart.h b/src/kernel/arch/riscv64/sifive_uart.h similarity index 100% rename from src/kernel/riscv64/sifive_uart.h rename to src/kernel/arch/riscv64/sifive_uart.h diff --git a/src/kernel/riscv64/uart8250.c b/src/kernel/arch/riscv64/uart8250.c similarity index 94% rename from src/kernel/riscv64/uart8250.c rename to src/kernel/arch/riscv64/uart8250.c index f0f4b04ba..9a2447a22 100644 --- a/src/kernel/riscv64/uart8250.c +++ b/src/kernel/arch/riscv64/uart8250.c @@ -1,4 +1,4 @@ -#include "kernel/riscv64/uart8250.h" +#include "kernel/arch/riscv64/uart8250.h" #include #include diff --git a/src/kernel/riscv64/uart8250.h b/src/kernel/arch/riscv64/uart8250.h similarity index 100% rename from src/kernel/riscv64/uart8250.h rename to src/kernel/arch/riscv64/uart8250.h diff --git a/src/kernel/riscv64/unleashed/gpio.h b/src/kernel/arch/riscv64/unleashed/gpio.h similarity index 100% rename from src/kernel/riscv64/unleashed/gpio.h rename to src/kernel/arch/riscv64/unleashed/gpio.h diff --git a/src/kernel/riscv64/vmm.c b/src/kernel/arch/riscv64/vmm.c similarity index 95% rename from src/kernel/riscv64/vmm.c rename to src/kernel/arch/riscv64/vmm.c index 4115476c1..4dde81ef2 100644 --- a/src/kernel/riscv64/vmm.c +++ b/src/kernel/arch/riscv64/vmm.c @@ -1,10 +1,10 @@ -#include "kernel/vmm.h" +"kernel/core/vmm.h" #include #include -#include "kernel/heap.h" -#include "kernel/mmap.h" -#include "kernel/riscv64/asm.h" -#include "kernel/riscv64/paging.h" +"kernel/core/heap.h" +"kernel/core/mmap.h" +#include "kernel/arch/riscv64/asm.h" +#include "kernel/arch/riscv64/paging.h" static int _levels = DEFAULT_PAGING_DEPTH; static Lock _lock = {}; diff --git a/src/kernel/x86_64/apic.c b/src/kernel/arch/x86_64/apic.c similarity index 96% rename from src/kernel/x86_64/apic.c rename to src/kernel/arch/x86_64/apic.c index 145f96b86..be610f6fb 100644 --- a/src/kernel/x86_64/apic.c +++ b/src/kernel/arch/x86_64/apic.c @@ -2,12 +2,12 @@ #include #include #include -#include "kernel/mmap.h" -#include "kernel/x86_64/apic.h" -#include "kernel/x86_64/asm.h" -#include "kernel/x86_64/cpu.h" -#include "kernel/x86_64/hpet.h" -#include "kernel/x86_64/pic.h" +"kernel/core/mmap.h" +#include "kernel/arch/x86_64/apic.h" +#include "kernel/arch/x86_64/asm.h" +#include "kernel/arch/x86_64/cpu.h" +#include "kernel/arch/x86_64/hpet.h" +#include "kernel/arch/x86_64/pic.h" /* --- Lapic ---------------------------------------------------------------- */ diff --git a/src/kernel/x86_64/apic.h b/src/kernel/arch/x86_64/apic.h similarity index 99% rename from src/kernel/x86_64/apic.h rename to src/kernel/arch/x86_64/apic.h index ac9db1a74..e76e0cf29 100644 --- a/src/kernel/x86_64/apic.h +++ b/src/kernel/arch/x86_64/apic.h @@ -1,7 +1,7 @@ #pragma once #include -#include "kernel/cpu.h" +"kernel/core/cpu.h" /* --- LApic ---------------------------------------------------------------- */ diff --git a/src/kernel/x86_64/arch.c b/src/kernel/arch/x86_64/arch.c similarity index 84% rename from src/kernel/x86_64/arch.c rename to src/kernel/arch/x86_64/arch.c index 7a0aed48d..2fbabb156 100644 --- a/src/kernel/x86_64/arch.c +++ b/src/kernel/arch/x86_64/arch.c @@ -1,11 +1,11 @@ #include "kernel/arch.h" -#include "kernel/cpu.h" -#include "kernel/x86_64/apic.h" -#include "kernel/x86_64/asm.h" +"kernel/core/cpu.h" +#include "kernel/arch/x86_64/apic.h" +#include "kernel/arch/x86_64/asm.h" #include -#include "kernel/x86_64/cmos.h" -#include "kernel/x86_64/com.h" -#include "kernel/x86_64/smp.h" +#include "kernel/arch/x86_64/cmos.h" +#include "kernel/arch/x86_64/com.h" +#include "kernel/arch/x86_64/smp.h" static IoResult arch_debug_write(MAYBE_UNUSED void *context, uint8_t const *data, size_t size) { diff --git a/src/kernel/x86_64/asm.h b/src/kernel/arch/x86_64/asm.h similarity index 100% rename from src/kernel/x86_64/asm.h rename to src/kernel/arch/x86_64/asm.h diff --git a/src/kernel/x86_64/boot.c b/src/kernel/arch/x86_64/boot.c similarity index 69% rename from src/kernel/x86_64/boot.c rename to src/kernel/arch/x86_64/boot.c index 7eec25beb..fbc8d70ba 100644 --- a/src/kernel/x86_64/boot.c +++ b/src/kernel/arch/x86_64/boot.c @@ -1,24 +1,24 @@ #include #include "kernel/arch.h" -#include "kernel/event.h" -#include "kernel/init.h" -#include "kernel/kernel.h" -#include "kernel/mmap.h" -#include "kernel/pmm.h" -#include "kernel/sched.h" -#include "kernel/tasking.h" -#include "kernel/vmm.h" -#include "kernel/x86_64/apic.h" -#include "kernel/x86_64/asm.h" -#include "kernel/x86_64/com.h" -#include "kernel/x86_64/cpu.h" -#include "kernel/x86_64/gdt.h" -#include "kernel/x86_64/hpet.h" -#include "kernel/x86_64/idt.h" -#include "kernel/x86_64/pic.h" -#include "kernel/x86_64/simd.h" -#include "kernel/x86_64/smp.h" -#include "kernel/x86_64/syscall.h" +"kernel/core/event.h" +"kernel/core/init.h" +"kernel/core/kernel.h" +"kernel/core/mmap.h" +"kernel/core/pmm.h" +"kernel/core/sched.h" +"kernel/core/tasking.h" +"kernel/core/vmm.h" +#include "kernel/arch/x86_64/apic.h" +#include "kernel/arch/x86_64/asm.h" +#include "kernel/arch/x86_64/com.h" +#include "kernel/arch/x86_64/cpu.h" +#include "kernel/arch/x86_64/gdt.h" +#include "kernel/arch/x86_64/hpet.h" +#include "kernel/arch/x86_64/idt.h" +#include "kernel/arch/x86_64/pic.h" +#include "kernel/arch/x86_64/simd.h" +#include "kernel/arch/x86_64/smp.h" +#include "kernel/arch/x86_64/syscall.h" static atomic_int _ready = 0; diff --git a/src/kernel/x86_64/boot.s b/src/kernel/arch/x86_64/boot.s similarity index 100% rename from src/kernel/x86_64/boot.s rename to src/kernel/arch/x86_64/boot.s diff --git a/src/kernel/x86_64/cmos.c b/src/kernel/arch/x86_64/cmos.c similarity index 93% rename from src/kernel/x86_64/cmos.c rename to src/kernel/arch/x86_64/cmos.c index 7032151c9..a74e02a19 100644 --- a/src/kernel/x86_64/cmos.c +++ b/src/kernel/arch/x86_64/cmos.c @@ -1,7 +1,7 @@ -#include "kernel/x86_64/cmos.h" +#include "kernel/arch/x86_64/cmos.h" #include #include -#include "kernel/x86_64/asm.h" +#include "kernel/arch/x86_64/asm.h" static Lock _lock; diff --git a/src/kernel/x86_64/cmos.h b/src/kernel/arch/x86_64/cmos.h similarity index 100% rename from src/kernel/x86_64/cmos.h rename to src/kernel/arch/x86_64/cmos.h diff --git a/src/kernel/x86_64/com.c b/src/kernel/arch/x86_64/com.c similarity index 95% rename from src/kernel/x86_64/com.c rename to src/kernel/arch/x86_64/com.c index 45a38a7c9..852c2f398 100644 --- a/src/kernel/x86_64/com.c +++ b/src/kernel/arch/x86_64/com.c @@ -1,7 +1,7 @@ #include -#include "kernel/x86_64/com.h" +#include "kernel/arch/x86_64/com.h" -#include "kernel/x86_64/asm.h" +#include "kernel/arch/x86_64/asm.h" void com_write_reg(enum com_port port, enum com_register reg, uint8_t value) { diff --git a/src/kernel/x86_64/com.h b/src/kernel/arch/x86_64/com.h similarity index 100% rename from src/kernel/x86_64/com.h rename to src/kernel/arch/x86_64/com.h diff --git a/src/kernel/x86_64/context.c b/src/kernel/arch/x86_64/context.c similarity index 88% rename from src/kernel/x86_64/context.c rename to src/kernel/arch/x86_64/context.c index ab239bb12..e7cba4443 100644 --- a/src/kernel/x86_64/context.c +++ b/src/kernel/arch/x86_64/context.c @@ -1,10 +1,10 @@ -#include "kernel/context.h" +"kernel/core/context.h" #include #include -#include "kernel/x86_64/asm.h" -#include "kernel/x86_64/gdt.h" -#include "kernel/x86_64/simd.h" -#include "kernel/x86_64/syscall.h" +#include "kernel/arch/x86_64/asm.h" +#include "kernel/arch/x86_64/gdt.h" +#include "kernel/arch/x86_64/simd.h" +#include "kernel/arch/x86_64/syscall.h" Context *context_create(void) { diff --git a/src/kernel/x86_64/context.h b/src/kernel/arch/x86_64/context.h similarity index 87% rename from src/kernel/x86_64/context.h rename to src/kernel/arch/x86_64/context.h index 8c105fec2..7bcdd775a 100644 --- a/src/kernel/x86_64/context.h +++ b/src/kernel/arch/x86_64/context.h @@ -1,7 +1,7 @@ #pragma once #include -#include "kernel/x86_64/interrupts.h" +#include "kernel/arch/x86_64/interrupts.h" struct _Context { diff --git a/src/kernel/x86_64/cpu.c b/src/kernel/arch/x86_64/cpu.c similarity index 87% rename from src/kernel/x86_64/cpu.c rename to src/kernel/arch/x86_64/cpu.c index 22280ed87..707f772dd 100644 --- a/src/kernel/x86_64/cpu.c +++ b/src/kernel/arch/x86_64/cpu.c @@ -1,10 +1,10 @@ -#include "kernel/cpu.h" +"kernel/core/cpu.h" #include -#include "kernel/heap.h" -#include "kernel/kernel.h" -#include "kernel/x86_64/apic.h" -#include "kernel/x86_64/asm.h" -#include "kernel/x86_64/cpu.h" +"kernel/core/heap.h" +"kernel/core/kernel.h" +#include "kernel/arch/x86_64/apic.h" +#include "kernel/arch/x86_64/asm.h" +#include "kernel/arch/x86_64/cpu.h" static size_t _len = 0; static CpuImpl _cpus[MAX_CPU_COUNT] = {}; diff --git a/src/kernel/x86_64/cpu.h b/src/kernel/arch/x86_64/cpu.h similarity index 83% rename from src/kernel/x86_64/cpu.h rename to src/kernel/arch/x86_64/cpu.h index 0bb22f71f..421af64d9 100644 --- a/src/kernel/x86_64/cpu.h +++ b/src/kernel/arch/x86_64/cpu.h @@ -1,7 +1,7 @@ #pragma once -#include "kernel/cpu.h" -#include "kernel/x86_64/gdt.h" +"kernel/core/cpu.h" +#include "kernel/arch/x86_64/gdt.h" #define MAX_CPU_COUNT 255 diff --git a/src/kernel/x86_64/cpuid.c b/src/kernel/arch/x86_64/cpuid.c similarity index 94% rename from src/kernel/x86_64/cpuid.c rename to src/kernel/arch/x86_64/cpuid.c index 7cc0f6f87..06920e936 100644 --- a/src/kernel/x86_64/cpuid.c +++ b/src/kernel/arch/x86_64/cpuid.c @@ -1,4 +1,4 @@ -#include "kernel/x86_64/cpuid.h" +#include "kernel/arch/x86_64/cpuid.h" #include CpuidResult cpuid(uint32_t leaf, uint32_t subleaf) diff --git a/src/kernel/x86_64/cpuid.h b/src/kernel/arch/x86_64/cpuid.h similarity index 100% rename from src/kernel/x86_64/cpuid.h rename to src/kernel/arch/x86_64/cpuid.h diff --git a/src/kernel/x86_64/gdt.c b/src/kernel/arch/x86_64/gdt.c similarity index 98% rename from src/kernel/x86_64/gdt.c rename to src/kernel/arch/x86_64/gdt.c index 25a4c69a0..5f4975b1a 100644 --- a/src/kernel/x86_64/gdt.c +++ b/src/kernel/arch/x86_64/gdt.c @@ -1,4 +1,4 @@ -#include "kernel/x86_64/gdt.h" +#include "kernel/arch/x86_64/gdt.h" #include static Tss _tss = { diff --git a/src/kernel/x86_64/gdt.h b/src/kernel/arch/x86_64/gdt.h similarity index 100% rename from src/kernel/x86_64/gdt.h rename to src/kernel/arch/x86_64/gdt.h diff --git a/src/kernel/x86_64/gdt.s b/src/kernel/arch/x86_64/gdt.s similarity index 100% rename from src/kernel/x86_64/gdt.s rename to src/kernel/arch/x86_64/gdt.s diff --git a/src/kernel/x86_64/heap.c b/src/kernel/arch/x86_64/heap.c similarity index 93% rename from src/kernel/x86_64/heap.c rename to src/kernel/arch/x86_64/heap.c index 40acb1397..faf99aa6a 100644 --- a/src/kernel/x86_64/heap.c +++ b/src/kernel/arch/x86_64/heap.c @@ -1,10 +1,10 @@ -#include "kernel/heap.h" +"kernel/core/heap.h" #include #include #include -#include "kernel/mmap.h" -#include "kernel/pmm.h" +"kernel/core/mmap.h" +"kernel/core/pmm.h" static Lock _lock; diff --git a/src/kernel/x86_64/hpet.c b/src/kernel/arch/x86_64/hpet.c similarity index 94% rename from src/kernel/x86_64/hpet.c rename to src/kernel/arch/x86_64/hpet.c index 4946596d6..88bd06312 100644 --- a/src/kernel/x86_64/hpet.c +++ b/src/kernel/arch/x86_64/hpet.c @@ -3,9 +3,9 @@ #include #include -#include "kernel/x86_64/hpet.h" +#include "kernel/arch/x86_64/hpet.h" -#include "kernel/mmap.h" +"kernel/core/mmap.h" static uintptr_t _base = 0; static uint64_t _clock = 0; diff --git a/src/kernel/x86_64/hpet.h b/src/kernel/arch/x86_64/hpet.h similarity index 100% rename from src/kernel/x86_64/hpet.h rename to src/kernel/arch/x86_64/hpet.h diff --git a/src/kernel/x86_64/idt.c b/src/kernel/arch/x86_64/idt.c similarity index 90% rename from src/kernel/x86_64/idt.c rename to src/kernel/arch/x86_64/idt.c index 9dd43d5eb..8ac800bb5 100644 --- a/src/kernel/x86_64/idt.c +++ b/src/kernel/arch/x86_64/idt.c @@ -1,7 +1,7 @@ -#include "kernel/x86_64/idt.h" +#include "kernel/arch/x86_64/idt.h" #include "kernel/arch.h" -#include "kernel/x86_64/apic.h" -#include "kernel/x86_64/gdt.h" +#include "kernel/arch/x86_64/apic.h" +#include "kernel/arch/x86_64/gdt.h" extern uintptr_t __interrupt_vector[256]; diff --git a/src/kernel/x86_64/idt.h b/src/kernel/arch/x86_64/idt.h similarity index 100% rename from src/kernel/x86_64/idt.h rename to src/kernel/arch/x86_64/idt.h diff --git a/src/kernel/x86_64/idt.s b/src/kernel/arch/x86_64/idt.s similarity index 100% rename from src/kernel/x86_64/idt.s rename to src/kernel/arch/x86_64/idt.s diff --git a/src/kernel/x86_64/interrupts.c b/src/kernel/arch/x86_64/interrupts.c similarity index 91% rename from src/kernel/x86_64/interrupts.c rename to src/kernel/arch/x86_64/interrupts.c index 5149abb11..55b7df264 100644 --- a/src/kernel/x86_64/interrupts.c +++ b/src/kernel/arch/x86_64/interrupts.c @@ -2,19 +2,19 @@ #include #include -#include "kernel/x86_64/apic.h" -#include "kernel/x86_64/asm.h" -#include "kernel/x86_64/cmos.h" -#include "kernel/x86_64/interrupts.h" -#include "kernel/x86_64/pic.h" -#include "kernel/x86_64/simd.h" -#include "kernel/x86_64/smp.h" -#include "kernel/x86_64/syscall.h" - -#include "kernel/context.h" -#include "kernel/cpu.h" -#include "kernel/event.h" -#include "kernel/sched.h" +#include "kernel/arch/x86_64/apic.h" +#include "kernel/arch/x86_64/asm.h" +#include "kernel/arch/x86_64/cmos.h" +#include "kernel/arch/x86_64/interrupts.h" +#include "kernel/arch/x86_64/pic.h" +#include "kernel/arch/x86_64/simd.h" +#include "kernel/arch/x86_64/smp.h" +#include "kernel/arch/x86_64/syscall.h" + +"kernel/core/context.h" +"kernel/core/cpu.h" +"kernel/core/event.h" +"kernel/core/sched.h" static char *_exception_messages[32] = { "DivisionByZero", diff --git a/src/kernel/x86_64/interrupts.h b/src/kernel/arch/x86_64/interrupts.h similarity index 100% rename from src/kernel/x86_64/interrupts.h rename to src/kernel/arch/x86_64/interrupts.h diff --git a/src/kernel/x86_64/interrupts.s b/src/kernel/arch/x86_64/interrupts.s similarity index 100% rename from src/kernel/x86_64/interrupts.s rename to src/kernel/arch/x86_64/interrupts.s diff --git a/src/kernel/x86_64/paging.h b/src/kernel/arch/x86_64/paging.h similarity index 100% rename from src/kernel/x86_64/paging.h rename to src/kernel/arch/x86_64/paging.h diff --git a/src/kernel/x86_64/pic.c b/src/kernel/arch/x86_64/pic.c similarity index 55% rename from src/kernel/x86_64/pic.c rename to src/kernel/arch/x86_64/pic.c index 6f6e760cb..768f825e1 100644 --- a/src/kernel/x86_64/pic.c +++ b/src/kernel/arch/x86_64/pic.c @@ -1,5 +1,5 @@ -#include "kernel/x86_64/pic.h" -#include "kernel/x86_64/asm.h" +#include "kernel/arch/x86_64/pic.h" +#include "kernel/arch/x86_64/asm.h" void pic_disable(void) { diff --git a/src/kernel/x86_64/pic.h b/src/kernel/arch/x86_64/pic.h similarity index 100% rename from src/kernel/x86_64/pic.h rename to src/kernel/arch/x86_64/pic.h diff --git a/src/kernel/x86_64/simd.c b/src/kernel/arch/x86_64/simd.c similarity index 94% rename from src/kernel/x86_64/simd.c rename to src/kernel/arch/x86_64/simd.c index 1c45a9428..becdc0383 100644 --- a/src/kernel/x86_64/simd.c +++ b/src/kernel/arch/x86_64/simd.c @@ -2,9 +2,9 @@ #include #include -#include "kernel/x86_64/asm.h" -#include "kernel/x86_64/cpuid.h" -#include "kernel/x86_64/simd.h" +#include "kernel/arch/x86_64/asm.h" +#include "kernel/arch/x86_64/cpuid.h" +#include "kernel/arch/x86_64/simd.h" static ALIGNED(MEM_PAGE_SIZE) uint8_t _smid_initial_context[MEM_PAGE_SIZE] = {}; diff --git a/src/kernel/x86_64/simd.h b/src/kernel/arch/x86_64/simd.h similarity index 100% rename from src/kernel/x86_64/simd.h rename to src/kernel/arch/x86_64/simd.h diff --git a/src/kernel/x86_64/smp.c b/src/kernel/arch/x86_64/smp.c similarity index 91% rename from src/kernel/x86_64/smp.c rename to src/kernel/arch/x86_64/smp.c index 1dcdea778..ec2010c13 100644 --- a/src/kernel/x86_64/smp.c +++ b/src/kernel/arch/x86_64/smp.c @@ -4,18 +4,18 @@ #include #include -#include "kernel/x86_64/apic.h" -#include "kernel/x86_64/asm.h" -#include "kernel/x86_64/cpu.h" -#include "kernel/x86_64/hpet.h" -#include "kernel/x86_64/smp.h" +#include "kernel/arch/x86_64/apic.h" +#include "kernel/arch/x86_64/asm.h" +#include "kernel/arch/x86_64/cpu.h" +#include "kernel/arch/x86_64/hpet.h" +#include "kernel/arch/x86_64/smp.h" #include "kernel/arch.h" -#include "kernel/heap.h" -#include "kernel/kernel.h" -#include "kernel/mmap.h" -#include "kernel/pmm.h" -#include "kernel/vmm.h" +"kernel/core/heap.h" +"kernel/core/kernel.h" +"kernel/core/mmap.h" +"kernel/core/pmm.h" +"kernel/core/vmm.h" static atomic_bool _ready = false; diff --git a/src/kernel/x86_64/smp.h b/src/kernel/arch/x86_64/smp.h similarity index 100% rename from src/kernel/x86_64/smp.h rename to src/kernel/arch/x86_64/smp.h diff --git a/src/kernel/x86_64/smp.s b/src/kernel/arch/x86_64/smp.s similarity index 100% rename from src/kernel/x86_64/smp.s rename to src/kernel/arch/x86_64/smp.s diff --git a/src/kernel/x86_64/syscall.c b/src/kernel/arch/x86_64/syscall.c similarity index 80% rename from src/kernel/x86_64/syscall.c rename to src/kernel/arch/x86_64/syscall.c index 1d6535de0..7d07fbedd 100644 --- a/src/kernel/x86_64/syscall.c +++ b/src/kernel/arch/x86_64/syscall.c @@ -1,12 +1,12 @@ -#include "kernel/x86_64/syscall.h" +#include "kernel/arch/x86_64/syscall.h" #include -#include "kernel/heap.h" -#include "kernel/kernel.h" -#include "kernel/syscalls.h" -#include "kernel/x86_64/asm.h" -#include "kernel/x86_64/cpu.h" -#include "kernel/x86_64/gdt.h" -#include "kernel/x86_64/interrupts.h" +"kernel/core/heap.h" +"kernel/core/kernel.h" +"kernel/core/syscalls.h" +#include "kernel/arch/x86_64/asm.h" +#include "kernel/arch/x86_64/cpu.h" +#include "kernel/arch/x86_64/gdt.h" +#include "kernel/arch/x86_64/interrupts.h" extern void __syscall(void); diff --git a/src/kernel/x86_64/syscall.h b/src/kernel/arch/x86_64/syscall.h similarity index 100% rename from src/kernel/x86_64/syscall.h rename to src/kernel/arch/x86_64/syscall.h diff --git a/src/kernel/x86_64/syscall.s b/src/kernel/arch/x86_64/syscall.s similarity index 100% rename from src/kernel/x86_64/syscall.s rename to src/kernel/arch/x86_64/syscall.s diff --git a/src/kernel/x86_64/vmm.c b/src/kernel/arch/x86_64/vmm.c similarity index 98% rename from src/kernel/x86_64/vmm.c rename to src/kernel/arch/x86_64/vmm.c index ebd2c9acd..d3e9dd309 100644 --- a/src/kernel/x86_64/vmm.c +++ b/src/kernel/arch/x86_64/vmm.c @@ -1,15 +1,15 @@ -#include "kernel/vmm.h" +"kernel/core/vmm.h" #include #include #include #include #include -#include "kernel/x86_64/asm.h" -#include "kernel/x86_64/paging.h" +#include "kernel/arch/x86_64/asm.h" +#include "kernel/arch/x86_64/paging.h" -#include "kernel/heap.h" -#include "kernel/mmap.h" +"kernel/core/heap.h" +"kernel/core/mmap.h" static Lock _lock; static Pml *_kpml; diff --git a/src/kernel/arch.h b/src/kernel/core/arch.h similarity index 93% rename from src/kernel/arch.h rename to src/kernel/core/arch.h index f3a22f54e..2b1fcd280 100644 --- a/src/kernel/arch.h +++ b/src/kernel/core/arch.h @@ -4,7 +4,7 @@ #include #include -#include "kernel/tasking.h" +"kernel/core/tasking.h" IoWriter arch_debug(void); diff --git a/src/kernel/channel.c b/src/kernel/core/channel.c similarity index 97% rename from src/kernel/channel.c rename to src/kernel/core/channel.c index 81512e20c..c85de6899 100644 --- a/src/kernel/channel.c +++ b/src/kernel/core/channel.c @@ -1,9 +1,9 @@ -#include "kernel/channel.h" +"kernel/core/core/channel.h" #include #include #include -#include "kernel/kernel.h" -#include "kernel/sched.h" +"kernel/core/kernel.h" +"kernel/core/sched.h" Channel *channel_create(void) { diff --git a/src/kernel/channel.h b/src/kernel/core/channel.h similarity index 93% rename from src/kernel/channel.h rename to src/kernel/core/channel.h index 11e8cb806..d59dcf673 100644 --- a/src/kernel/channel.h +++ b/src/kernel/core/channel.h @@ -1,7 +1,7 @@ #pragma once #include -#include "kernel/parcel.h" +"kernel/core/parcel.h" typedef struct { diff --git a/src/kernel/context.h b/src/kernel/core/context.h similarity index 79% rename from src/kernel/context.h rename to src/kernel/core/context.h index 49d16f70b..b57c1734c 100644 --- a/src/kernel/context.h +++ b/src/kernel/core/context.h @@ -3,9 +3,9 @@ #include #if defined(__x86_64__) -# include "kernel/x86_64/context.h" +# include "kernel/arch/x86_64/context.h" #elif defined(__riscv) -# include "kernel/riscv64/context.h" +# include "kernel/arch/riscv64/context.h" #else # error "Unsupported architecture" #endif diff --git a/src/kernel/cpu.c b/src/kernel/core/cpu.c similarity index 97% rename from src/kernel/cpu.c rename to src/kernel/core/cpu.c index e53a0a691..e7fdcbb07 100644 --- a/src/kernel/cpu.c +++ b/src/kernel/core/cpu.c @@ -1,4 +1,4 @@ -#include "kernel/cpu.h" +"kernel/core/cpu.h" #include void cpu_begin_interrupt(void) diff --git a/src/kernel/cpu.h b/src/kernel/core/cpu.h similarity index 95% rename from src/kernel/cpu.h rename to src/kernel/core/cpu.h index 7f14d4e98..1b2440535 100644 --- a/src/kernel/cpu.h +++ b/src/kernel/core/cpu.h @@ -1,6 +1,6 @@ #pragma once -#include "kernel/task.h" +"kernel/core/task.h" typedef struct { diff --git a/src/kernel/domain.c b/src/kernel/core/domain.c similarity index 98% rename from src/kernel/domain.c rename to src/kernel/core/domain.c index d17fd1a5b..5dda687e9 100644 --- a/src/kernel/domain.c +++ b/src/kernel/core/domain.c @@ -1,4 +1,4 @@ -#include "kernel/domain.h" +"kernel/core/domain.h" #include void domain_destroy(Domain *self) diff --git a/src/kernel/domain.h b/src/kernel/core/domain.h similarity index 93% rename from src/kernel/domain.h rename to src/kernel/core/domain.h index c67c34b8b..0b377c8dd 100644 --- a/src/kernel/domain.h +++ b/src/kernel/core/domain.h @@ -1,6 +1,6 @@ #pragma once -#include "kernel/object.h" +"kernel/core/object.h" #include typedef struct diff --git a/src/kernel/event.c b/src/kernel/core/event.c similarity index 99% rename from src/kernel/event.c rename to src/kernel/core/event.c index ff37c333f..4bd2e1bf8 100644 --- a/src/kernel/event.c +++ b/src/kernel/core/event.c @@ -1,4 +1,4 @@ -#include "kernel/event.h" +"kernel/core/event.h" #include #include diff --git a/src/kernel/event.h b/src/kernel/core/event.h similarity index 88% rename from src/kernel/event.h rename to src/kernel/core/event.h index 2ef1fd4d4..f3def0b87 100644 --- a/src/kernel/event.h +++ b/src/kernel/core/event.h @@ -1,8 +1,8 @@ #pragma once #include -#include "kernel/domain.h" -#include "kernel/task.h" +"kernel/core/domain.h" +"kernel/core/task.h" typedef struct { diff --git a/src/kernel/heap.h b/src/kernel/core/heap.h similarity index 92% rename from src/kernel/heap.h rename to src/kernel/core/heap.h index 90dea3cb1..011e85d1e 100644 --- a/src/kernel/heap.h +++ b/src/kernel/core/heap.h @@ -2,7 +2,7 @@ #include -#include "kernel/pmm.h" +"kernel/core/pmm.h" typedef USizeRange HeapRange; diff --git a/src/kernel/init.c b/src/kernel/core/init.c similarity index 96% rename from src/kernel/init.c rename to src/kernel/core/init.c index 23e12661b..32aab31cb 100644 --- a/src/kernel/init.c +++ b/src/kernel/core/init.c @@ -3,11 +3,11 @@ #include #include -#include "kernel/heap.h" -#include "kernel/init.h" -#include "kernel/kernel.h" -#include "kernel/mmap.h" -#include "kernel/sched.h" +"kernel/core/heap.h" +"kernel/core/init.h" +"kernel/core/kernel.h" +"kernel/core/mmap.h" +"kernel/core/sched.h" static bool elf_supported(Elf64Header const *header, size_t data_size) { diff --git a/src/kernel/init.h b/src/kernel/core/init.h similarity index 75% rename from src/kernel/init.h rename to src/kernel/core/init.h index 6bacc2d6a..42c454287 100644 --- a/src/kernel/init.h +++ b/src/kernel/core/init.h @@ -1,6 +1,6 @@ #pragma once #include -#include "kernel/task.h" +"kernel/core/task.h" void init_start(Handover const *handover); diff --git a/src/kernel/kernel.c b/src/kernel/core/kernel.c similarity index 100% rename from src/kernel/kernel.c rename to src/kernel/core/kernel.c diff --git a/src/kernel/kernel.h b/src/kernel/core/kernel.h similarity index 100% rename from src/kernel/kernel.h rename to src/kernel/core/kernel.h diff --git a/src/kernel/memory.c b/src/kernel/core/memory.c similarity index 98% rename from src/kernel/memory.c rename to src/kernel/core/memory.c index 70acabce8..b6ffedfe4 100644 --- a/src/kernel/memory.c +++ b/src/kernel/core/memory.c @@ -1,4 +1,4 @@ -#include "kernel/memory.h" +"kernel/core/memory.h" #include #include diff --git a/src/kernel/memory.h b/src/kernel/core/memory.h similarity index 87% rename from src/kernel/memory.h rename to src/kernel/core/memory.h index 52eecaae3..78c7dd2e1 100644 --- a/src/kernel/memory.h +++ b/src/kernel/core/memory.h @@ -1,8 +1,8 @@ #pragma once -#include "kernel/domain.h" -#include "kernel/heap.h" -#include "kernel/pmm.h" +"kernel/core/domain.h" +"kernel/core/heap.h" +"kernel/core/pmm.h" typedef enum { diff --git a/src/kernel/mmap.h b/src/kernel/core/mmap.h similarity index 100% rename from src/kernel/mmap.h rename to src/kernel/core/mmap.h diff --git a/src/kernel/object.c b/src/kernel/core/object.c similarity index 98% rename from src/kernel/object.c rename to src/kernel/core/object.c index c8cfeb62a..28ab65ec2 100644 --- a/src/kernel/object.c +++ b/src/kernel/core/object.c @@ -1,4 +1,4 @@ -#include "kernel/object.h" +"kernel/core/object.h" #include #include diff --git a/src/kernel/object.h b/src/kernel/core/object.h similarity index 100% rename from src/kernel/object.h rename to src/kernel/core/object.h diff --git a/src/kernel/parcel.c b/src/kernel/core/parcel.c similarity index 97% rename from src/kernel/parcel.c rename to src/kernel/core/parcel.c index 70f92ef18..ce6de4d68 100644 --- a/src/kernel/parcel.c +++ b/src/kernel/core/parcel.c @@ -1,4 +1,4 @@ -#include "kernel/parcel.h" +"kernel/core/parcel.h" BrResult parcel_pack(Parcel *self, BrMsg const *msg, Domain *domain) { diff --git a/src/kernel/parcel.h b/src/kernel/core/parcel.h similarity index 91% rename from src/kernel/parcel.h rename to src/kernel/core/parcel.h index 72a77e020..417927f1f 100644 --- a/src/kernel/parcel.h +++ b/src/kernel/core/parcel.h @@ -1,7 +1,7 @@ #pragma once #include -#include "kernel/domain.h" +"kernel/core/domain.h" typedef struct { diff --git a/src/kernel/pmm.c b/src/kernel/core/pmm.c similarity index 99% rename from src/kernel/pmm.c rename to src/kernel/core/pmm.c index 29b1af069..70f914d0c 100644 --- a/src/kernel/pmm.c +++ b/src/kernel/core/pmm.c @@ -1,4 +1,4 @@ -#include "kernel/pmm.h" +"kernel/core/pmm.h" #include #include #include @@ -8,7 +8,7 @@ #include #include #include "kernel/arch.h" -#include "kernel/mmap.h" +"kernel/core/mmap.h" // #define TRACE_PMM diff --git a/src/kernel/pmm.h b/src/kernel/core/pmm.h similarity index 100% rename from src/kernel/pmm.h rename to src/kernel/core/pmm.h diff --git a/src/kernel/sched.c b/src/kernel/core/sched.c similarity index 99% rename from src/kernel/sched.c rename to src/kernel/core/sched.c index 87e32d43a..223eddb0c 100644 --- a/src/kernel/sched.c +++ b/src/kernel/core/sched.c @@ -1,8 +1,8 @@ -#include "kernel/sched.h" +"kernel/core/sched.h" #include #include #include "kernel/arch.h" -#include "kernel/cpu.h" +"kernel/core/cpu.h" static Lock _lock = {}; static Vec(Task *) _tasks = {}; diff --git a/src/kernel/sched.h b/src/kernel/core/sched.h similarity index 90% rename from src/kernel/sched.h rename to src/kernel/core/sched.h index 880be9b25..ebc5fb673 100644 --- a/src/kernel/sched.h +++ b/src/kernel/core/sched.h @@ -1,7 +1,7 @@ #pragma once -#include "kernel/cpu.h" -#include "kernel/task.h" +"kernel/core/cpu.h" +"kernel/core/task.h" void sched_initialize(void); diff --git a/src/kernel/space.c b/src/kernel/core/space.c similarity index 99% rename from src/kernel/space.c rename to src/kernel/core/space.c index 93c3ac0e3..f13459522 100644 --- a/src/kernel/space.c +++ b/src/kernel/core/space.c @@ -1,4 +1,4 @@ -#include "kernel/space.h" +"kernel/core/space.h" #include #include diff --git a/src/kernel/space.h b/src/kernel/core/space.h similarity index 92% rename from src/kernel/space.h rename to src/kernel/core/space.h index 200a072d3..53fa36c02 100644 --- a/src/kernel/space.h +++ b/src/kernel/core/space.h @@ -1,7 +1,7 @@ #pragma once -#include "kernel/memory.h" -#include "kernel/vmm.h" +"kernel/core/memory.h" +"kernel/core/vmm.h" #include typedef struct diff --git a/src/kernel/syscalls.c b/src/kernel/core/syscalls.c similarity index 98% rename from src/kernel/syscalls.c rename to src/kernel/core/syscalls.c index 29414aca2..effc2749e 100644 --- a/src/kernel/syscalls.c +++ b/src/kernel/core/syscalls.c @@ -4,13 +4,13 @@ #include #include "kernel/arch.h" -#include "kernel/domain.h" -#include "kernel/event.h" -#include "kernel/init.h" -#include "kernel/memory.h" -#include "kernel/sched.h" -#include "kernel/syscalls.h" -#include "kernel/task.h" +"kernel/core/domain.h" +"kernel/core/event.h" +"kernel/core/init.h" +"kernel/core/memory.h" +"kernel/core/sched.h" +"kernel/core/syscalls.h" +"kernel/core/task.h" BrResult sys_log(BrLogArgs *args) { diff --git a/src/kernel/syscalls.h b/src/kernel/core/syscalls.h similarity index 100% rename from src/kernel/syscalls.h rename to src/kernel/core/syscalls.h diff --git a/src/kernel/task.c b/src/kernel/core/task.c similarity index 91% rename from src/kernel/task.c rename to src/kernel/core/task.c index 2562e2092..083dc3817 100644 --- a/src/kernel/task.c +++ b/src/kernel/core/task.c @@ -1,10 +1,10 @@ -#include "kernel/task.h" +"kernel/core/task.h" #include #include -#include "kernel/cpu.h" -#include "kernel/event.h" -#include "kernel/kernel.h" -#include "kernel/sched.h" +"kernel/core/cpu.h" +"kernel/core/event.h" +"kernel/core/kernel.h" +"kernel/core/sched.h" Task *task_self(void) { diff --git a/src/kernel/task.h b/src/kernel/core/task.h similarity index 93% rename from src/kernel/task.h rename to src/kernel/core/task.h index b8aeff92d..84374a30b 100644 --- a/src/kernel/task.h +++ b/src/kernel/core/task.h @@ -4,9 +4,9 @@ #include #include -#include "kernel/channel.h" -#include "kernel/context.h" -#include "kernel/space.h" +"kernel/core/channel.h" +"kernel/core/context.h" +"kernel/core/space.h" typedef bool BlockerFn(void *context); diff --git a/src/kernel/tasking.c b/src/kernel/core/tasking.c similarity index 92% rename from src/kernel/tasking.c rename to src/kernel/core/tasking.c index c313b12a4..074eeac6e 100644 --- a/src/kernel/tasking.c +++ b/src/kernel/core/tasking.c @@ -1,8 +1,8 @@ -#include "kernel/tasking.h" -#include +"kernel/core/tasking.h" +#include #include "kernel/arch.h" -#include "kernel/sched.h" -#include "kernel/task.h" +"kernel/core/sched.h" +"kernel/core/task.h" static void idle(void) { diff --git a/src/kernel/tasking.h b/src/kernel/core/tasking.h similarity index 100% rename from src/kernel/tasking.h rename to src/kernel/core/tasking.h diff --git a/src/kernel/vmm.h b/src/kernel/core/vmm.h similarity index 96% rename from src/kernel/vmm.h rename to src/kernel/core/vmm.h index 3fa1e6142..3d6560a8b 100644 --- a/src/kernel/vmm.h +++ b/src/kernel/core/vmm.h @@ -1,7 +1,7 @@ #pragma once #include -#include "kernel/pmm.h" +"kernel/core/pmm.h" typedef void *VmmSpace; diff --git a/src/libs/embed/kernel/debug.c b/src/libs/embed/kernel/debug.c index dbf729dd9..000f7c85c 100644 --- a/src/libs/embed/kernel/debug.c +++ b/src/libs/embed/kernel/debug.c @@ -1,7 +1,7 @@ #include #include -#include "kernel/cpu.h" +"kernel/core/cpu.h" void embed_log_prefix(IoWriter writer) { diff --git a/src/libs/embed/kernel/mem.c b/src/libs/embed/kernel/mem.c index 05cfa37ce..741d8561e 100644 --- a/src/libs/embed/kernel/mem.c +++ b/src/libs/embed/kernel/mem.c @@ -2,7 +2,7 @@ #include #include -#include "kernel/heap.h" +"kernel/core/heap.h" static Lock _lock; diff --git a/src/libs/embed/kernel/sync.c b/src/libs/embed/kernel/sync.c index bf1a7336d..de201fa7f 100644 --- a/src/libs/embed/kernel/sync.c +++ b/src/libs/embed/kernel/sync.c @@ -1,4 +1,4 @@ -#include "kernel/cpu.h" +"kernel/core/cpu.h" void embed_sync_enter(void) { cpu_retain_interrupts(); } From 23e97214b0d5bb4649d3c6e45f085602ea2d0d97 Mon Sep 17 00:00:00 2001 From: Supercip971 Date: Sun, 19 Feb 2023 16:33:02 -0400 Subject: [PATCH 09/13] osdk-trans: more wip --- meta/targets/brutal-x86_64.json | 11 ++++--- meta/targets/kernel-x86_64.json | 32 ++++++++++++------- src/kernel/arch/riscv64/boot.c | 4 +-- src/kernel/arch/riscv64/cpu.c | 4 +-- src/kernel/arch/riscv64/cpu.h | 2 +- src/kernel/arch/riscv64/heap.c | 4 +-- src/kernel/arch/riscv64/vmm.c | 4 +-- src/kernel/arch/x86_64/apic.c | 2 +- src/kernel/arch/x86_64/apic.h | 2 +- src/kernel/arch/x86_64/arch.c | 4 +-- src/kernel/arch/x86_64/boot.c | 18 +++++------ src/kernel/arch/x86_64/context.c | 2 +- src/kernel/arch/x86_64/cpu.c | 6 ++-- src/kernel/arch/x86_64/cpu.h | 2 +- src/kernel/arch/x86_64/heap.c | 6 ++-- src/kernel/arch/x86_64/hpet.c | 2 +- src/kernel/arch/x86_64/idt.c | 2 +- src/kernel/arch/x86_64/interrupts.c | 8 ++--- src/kernel/arch/x86_64/manifest.json | 22 +++++++++++++ src/kernel/arch/x86_64/smp.c | 12 +++---- src/kernel/arch/x86_64/syscall.c | 6 ++-- src/kernel/arch/x86_64/vmm.c | 6 ++-- src/kernel/core/arch.h | 2 +- src/kernel/core/channel.c | 6 ++-- src/kernel/core/channel.h | 2 +- src/kernel/core/cpu.c | 2 +- src/kernel/core/cpu.h | 2 +- src/kernel/core/domain.c | 2 +- src/kernel/core/domain.h | 2 +- src/kernel/core/event.c | 2 +- src/kernel/core/event.h | 4 +-- src/kernel/core/heap.h | 2 +- src/kernel/core/init.c | 10 +++--- src/kernel/core/init.h | 2 +- src/kernel/core/manifest.json | 20 ++++++++++++ src/kernel/core/memory.c | 2 +- src/kernel/core/memory.h | 6 ++-- src/kernel/core/object.c | 2 +- src/kernel/core/parcel.c | 2 +- src/kernel/core/parcel.h | 2 +- src/kernel/core/pmm.c | 6 ++-- src/kernel/core/sched.c | 6 ++-- src/kernel/core/sched.h | 4 +-- src/kernel/core/space.c | 2 +- src/kernel/core/space.h | 4 +-- src/kernel/core/syscalls.c | 16 +++++----- src/kernel/core/task.c | 14 ++++---- src/kernel/core/task.h | 7 ++-- src/kernel/core/tasking.c | 8 ++--- src/kernel/core/vmm.h | 2 +- src/libs/bal/manifest.json | 1 - src/libs/brutal-base/manifest.json | 4 +-- src/libs/brutal-debug/manifest.json | 4 ++- src/libs/brutal-hash/adler32.c | 5 +-- src/libs/brutal-hash/manifest.json | 3 +- src/libs/brutal-io/emit.c | 4 +-- src/libs/brutal-io/emit.h | 1 + src/libs/brutal-io/file.h | 2 -- src/libs/brutal-io/funcs.c | 5 +-- src/libs/brutal-io/manifest.json | 1 - src/libs/brutal-io/mem.c | 3 +- src/libs/brutal-io/mem.h | 1 - src/libs/brutal-io/path.h | 2 +- src/libs/brutal-io/window.c | 5 +-- src/libs/brutal-math/easing.c | 2 +- src/libs/brutal-math/gravity.h | 1 + src/libs/brutal-math/manifest.json | 2 -- src/libs/brutal-math/rect.h | 1 + src/libs/brutal-parse/lex.c | 2 +- src/libs/brutal-parse/lex.h | 4 ++- src/libs/brutal-parse/lexeme.h | 2 +- src/libs/brutal-parse/manifest.json | 6 ++-- src/libs/brutal-parse/scan.c | 10 +++--- src/libs/brutal-sync/manifest.json | 10 ++++++ src/libs/brutal-text/manifest.json | 9 ++++++ src/libs/brutal-text/str.c | 2 +- src/libs/brutal-text/utf16.c | 4 +-- src/libs/brutal-text/utf16.h | 1 - src/libs/brutal-text/utf8.c | 1 + src/libs/brutal-time/manifest.json | 8 +++++ src/libs/elf/manifest.json | 7 ++++ src/libs/embed/brutal/log.c | 2 +- src/libs/embed/file-decl.h | 4 +-- src/libs/embed/kernel/debug.c | 4 +-- src/libs/embed/kernel/log.c | 4 +-- src/libs/embed/{ => kernel}/manifest.json | 5 ++- src/libs/embed/kernel/mem.c | 7 ++-- src/libs/embed/kernel/sync.c | 2 +- src/libs/handover/builder.c | 3 +- src/libs/handover/builder.h | 4 +-- src/libs/handover/handover.c | 4 +-- src/libs/handover/manifest.json | 11 +++++++ src/libs/hw/acpi/base.c | 2 +- src/libs/hw/acpi/manifest.json | 8 +++++ src/libs/hw/acpi/rsdt.c | 2 +- src/libs/hw/efi/lib.c | 6 ++-- src/libs/hw/efi/manifest.json | 9 ++++++ src/libs/hw/efi/protos/stop.h | 3 ++ src/libs/hw/efi/types.h | 5 ++- src/libs/ipc/component.c | 2 +- src/libs/ipc/component.h | 4 +-- src/libs/ipc/hooks.c | 4 +-- src/libs/ipc/interface.h | 1 - src/libs/ipc/manifest.json | 12 +++++++ src/libs/ipc/pack.c | 7 ++-- src/libs/ipc/unpack.c | 3 +- src/libs/json/emit.c | 2 +- src/libs/json/emit.h | 2 +- src/libs/json/manifest.json | 11 +++++++ src/libs/json/objects.c | 2 +- src/libs/json/objects.h | 4 ++- src/libs/json/parser.c | 6 ++-- src/libs/json/parser.h | 2 +- src/libs/{stdc-math => libc-math}/__cos.c | 0 src/libs/{stdc-math => libc-math}/__cosdf.c | 0 src/libs/{stdc-math => libc-math}/__cosl.c | 0 src/libs/{stdc-math => libc-math}/__expo2.c | 0 src/libs/{stdc-math => libc-math}/__expo2f.c | 0 .../{stdc-math => libc-math}/__fpclassify.c | 0 .../{stdc-math => libc-math}/__fpclassifyf.c | 0 .../{stdc-math => libc-math}/__fpclassifyl.c | 0 .../{stdc-math => libc-math}/__invtrigl.c | 0 .../{stdc-math => libc-math}/__invtrigl.h | 0 src/libs/{stdc-math => libc-math}/__polevll.c | 0 .../{stdc-math => libc-math}/__rem_pio2.c | 0 .../__rem_pio2_large.c | 0 .../{stdc-math => libc-math}/__rem_pio2f.c | 0 .../{stdc-math => libc-math}/__rem_pio2l.c | 0 src/libs/{stdc-math => libc-math}/__signbit.c | 0 .../{stdc-math => libc-math}/__signbitf.c | 0 .../{stdc-math => libc-math}/__signbitl.c | 0 src/libs/{stdc-math => libc-math}/__sin.c | 0 src/libs/{stdc-math => libc-math}/__sindf.c | 0 src/libs/{stdc-math => libc-math}/__sinl.c | 0 src/libs/{stdc-math => libc-math}/__tan.c | 0 src/libs/{stdc-math => libc-math}/__tandf.c | 0 src/libs/{stdc-math => libc-math}/__tanl.c | 0 src/libs/{stdc-math => libc-math}/acos.c | 0 src/libs/{stdc-math => libc-math}/acosf.c | 0 src/libs/{stdc-math => libc-math}/acosh.c | 0 src/libs/{stdc-math => libc-math}/acoshf.c | 0 src/libs/{stdc-math => libc-math}/acoshl.c | 0 src/libs/{stdc-math => libc-math}/acosl.c | 0 src/libs/{stdc-math => libc-math}/asin.c | 0 src/libs/{stdc-math => libc-math}/asinf.c | 0 src/libs/{stdc-math => libc-math}/asinh.c | 0 src/libs/{stdc-math => libc-math}/asinhf.c | 0 src/libs/{stdc-math => libc-math}/asinhl.c | 0 src/libs/{stdc-math => libc-math}/asinl.c | 0 src/libs/{stdc-math => libc-math}/atan.c | 0 src/libs/{stdc-math => libc-math}/atan2.c | 0 src/libs/{stdc-math => libc-math}/atan2f.c | 0 src/libs/{stdc-math => libc-math}/atan2l.c | 0 src/libs/{stdc-math => libc-math}/atanf.c | 0 src/libs/{stdc-math => libc-math}/atanh.c | 0 src/libs/{stdc-math => libc-math}/atanhf.c | 0 src/libs/{stdc-math => libc-math}/atanhl.c | 0 src/libs/{stdc-math => libc-math}/atanl.c | 0 src/libs/{stdc-math => libc-math}/cbrt.c | 0 src/libs/{stdc-math => libc-math}/cbrtf.c | 0 src/libs/{stdc-math => libc-math}/cbrtl.c | 0 src/libs/{stdc-math => libc-math}/ceil.c | 0 src/libs/{stdc-math => libc-math}/ceilf.c | 0 src/libs/{stdc-math => libc-math}/ceill.c | 0 src/libs/{stdc-math => libc-math}/copysign.c | 0 src/libs/{stdc-math => libc-math}/copysignf.c | 0 src/libs/{stdc-math => libc-math}/copysignl.c | 0 src/libs/{stdc-math => libc-math}/cos.c | 0 src/libs/{stdc-math => libc-math}/cosf.c | 0 src/libs/{stdc-math => libc-math}/cosh.c | 0 src/libs/{stdc-math => libc-math}/coshf.c | 0 src/libs/{stdc-math => libc-math}/coshl.c | 0 src/libs/{stdc-math => libc-math}/cosl.c | 0 src/libs/{stdc-math => libc-math}/erf.c | 0 src/libs/{stdc-math => libc-math}/erff.c | 0 src/libs/{stdc-math => libc-math}/erfl.c | 0 src/libs/{stdc-math => libc-math}/exp.c | 0 src/libs/{stdc-math => libc-math}/exp10.c | 0 src/libs/{stdc-math => libc-math}/exp10f.c | 0 src/libs/{stdc-math => libc-math}/exp10l.c | 0 src/libs/{stdc-math => libc-math}/exp2.c | 0 src/libs/{stdc-math => libc-math}/exp2f.c | 0 src/libs/{stdc-math => libc-math}/exp2l.c | 0 src/libs/{stdc-math => libc-math}/expf.c | 0 src/libs/{stdc-math => libc-math}/expl.c | 0 src/libs/{stdc-math => libc-math}/expm1.c | 0 src/libs/{stdc-math => libc-math}/expm1f.c | 0 src/libs/{stdc-math => libc-math}/expm1l.c | 0 src/libs/{stdc-math => libc-math}/fabs.c | 0 src/libs/{stdc-math => libc-math}/fabsf.c | 0 src/libs/{stdc-math => libc-math}/fabsl.c | 0 src/libs/{stdc-math => libc-math}/fdim.c | 0 src/libs/{stdc-math => libc-math}/fdimf.c | 0 src/libs/{stdc-math => libc-math}/fdiml.c | 0 src/libs/{stdc-math => libc-math}/finite.c | 0 src/libs/{stdc-math => libc-math}/finitef.c | 0 src/libs/{stdc-math => libc-math}/floor.c | 0 src/libs/{stdc-math => libc-math}/floorf.c | 0 src/libs/{stdc-math => libc-math}/floorl.c | 0 src/libs/{stdc-math => libc-math}/fma.c | 0 src/libs/{stdc-math => libc-math}/fmaf.c | 0 src/libs/{stdc-math => libc-math}/fmal.c | 0 src/libs/{stdc-math => libc-math}/fmax.c | 0 src/libs/{stdc-math => libc-math}/fmaxf.c | 0 src/libs/{stdc-math => libc-math}/fmaxl.c | 0 src/libs/{stdc-math => libc-math}/fmin.c | 0 src/libs/{stdc-math => libc-math}/fminf.c | 0 src/libs/{stdc-math => libc-math}/fminl.c | 0 src/libs/{stdc-math => libc-math}/fmod.c | 0 src/libs/{stdc-math => libc-math}/fmodf.c | 0 src/libs/{stdc-math => libc-math}/fmodl.c | 0 src/libs/{stdc-math => libc-math}/frexp.c | 0 src/libs/{stdc-math => libc-math}/frexpf.c | 0 src/libs/{stdc-math => libc-math}/frexpl.c | 0 src/libs/{stdc-math => libc-math}/hypot.c | 0 src/libs/{stdc-math => libc-math}/hypotf.c | 0 src/libs/{stdc-math => libc-math}/hypotl.c | 0 src/libs/{stdc-math => libc-math}/ilogb.c | 0 src/libs/{stdc-math => libc-math}/ilogbf.c | 0 src/libs/{stdc-math => libc-math}/ilogbl.c | 0 src/libs/{stdc-math => libc-math}/j0.c | 0 src/libs/{stdc-math => libc-math}/j0f.c | 0 src/libs/{stdc-math => libc-math}/j1.c | 0 src/libs/{stdc-math => libc-math}/j1f.c | 0 src/libs/{stdc-math => libc-math}/jn.c | 0 src/libs/{stdc-math => libc-math}/jnf.c | 0 src/libs/{stdc-math => libc-math}/ldexp.c | 0 src/libs/{stdc-math => libc-math}/ldexpf.c | 0 src/libs/{stdc-math => libc-math}/ldexpl.c | 0 src/libs/{stdc-math => libc-math}/lgamma.c | 0 src/libs/{stdc-math => libc-math}/lgamma_r.c | 0 src/libs/{stdc-math => libc-math}/lgammaf.c | 0 src/libs/{stdc-math => libc-math}/lgammaf_r.c | 0 src/libs/{stdc-math => libc-math}/lgammal.c | 0 src/libs/{stdc-math => libc-math}/libm.h | 0 src/libs/{stdc-math => libc-math}/llrint.c | 0 src/libs/{stdc-math => libc-math}/llrintf.c | 0 src/libs/{stdc-math => libc-math}/llrintl.c | 0 src/libs/{stdc-math => libc-math}/llround.c | 0 src/libs/{stdc-math => libc-math}/llroundf.c | 0 src/libs/{stdc-math => libc-math}/llroundl.c | 0 src/libs/{stdc-math => libc-math}/log.c | 0 src/libs/{stdc-math => libc-math}/log10.c | 0 src/libs/{stdc-math => libc-math}/log10f.c | 0 src/libs/{stdc-math => libc-math}/log10l.c | 0 src/libs/{stdc-math => libc-math}/log1p.c | 0 src/libs/{stdc-math => libc-math}/log1pf.c | 0 src/libs/{stdc-math => libc-math}/log1pl.c | 0 src/libs/{stdc-math => libc-math}/log2.c | 0 src/libs/{stdc-math => libc-math}/log2f.c | 0 src/libs/{stdc-math => libc-math}/log2l.c | 0 src/libs/{stdc-math => libc-math}/logb.c | 0 src/libs/{stdc-math => libc-math}/logbf.c | 0 src/libs/{stdc-math => libc-math}/logbl.c | 0 src/libs/{stdc-math => libc-math}/logf.c | 0 src/libs/{stdc-math => libc-math}/logl.c | 0 src/libs/{stdc-math => libc-math}/lrint.c | 0 src/libs/{stdc-math => libc-math}/lrintf.c | 0 src/libs/{stdc-math => libc-math}/lrintl.c | 0 src/libs/{stdc-math => libc-math}/lround.c | 0 src/libs/{stdc-math => libc-math}/lroundf.c | 0 src/libs/{stdc-math => libc-math}/lroundl.c | 0 src/libs/{stdc-math => libc-math}/math.h | 0 src/libs/{stdc-math => libc-math}/modf.c | 0 src/libs/{stdc-math => libc-math}/modff.c | 0 src/libs/{stdc-math => libc-math}/modfl.c | 0 src/libs/{stdc-math => libc-math}/nan.c | 0 src/libs/{stdc-math => libc-math}/nanf.c | 0 src/libs/{stdc-math => libc-math}/nanl.c | 0 src/libs/{stdc-math => libc-math}/nearbyint.c | 0 .../{stdc-math => libc-math}/nearbyintf.c | 0 .../{stdc-math => libc-math}/nearbyintl.c | 0 src/libs/{stdc-math => libc-math}/nextafter.c | 0 .../{stdc-math => libc-math}/nextafterf.c | 0 .../{stdc-math => libc-math}/nextafterl.c | 0 .../{stdc-math => libc-math}/nexttoward.c | 0 .../{stdc-math => libc-math}/nexttowardf.c | 0 .../{stdc-math => libc-math}/nexttowardl.c | 0 src/libs/{stdc-math => libc-math}/pow.c | 0 src/libs/{stdc-math => libc-math}/powf.c | 0 src/libs/{stdc-math => libc-math}/powl.c | 0 src/libs/{stdc-math => libc-math}/remainder.c | 0 .../{stdc-math => libc-math}/remainderf.c | 0 .../{stdc-math => libc-math}/remainderl.c | 0 src/libs/{stdc-math => libc-math}/remquo.c | 0 src/libs/{stdc-math => libc-math}/remquof.c | 0 src/libs/{stdc-math => libc-math}/remquol.c | 0 src/libs/{stdc-math => libc-math}/rint.c | 0 src/libs/{stdc-math => libc-math}/rintf.c | 0 src/libs/{stdc-math => libc-math}/rintl.c | 0 src/libs/{stdc-math => libc-math}/round.c | 0 src/libs/{stdc-math => libc-math}/roundf.c | 0 src/libs/{stdc-math => libc-math}/roundl.c | 0 src/libs/{stdc-math => libc-math}/scalb.c | 0 src/libs/{stdc-math => libc-math}/scalbf.c | 0 src/libs/{stdc-math => libc-math}/scalbln.c | 0 src/libs/{stdc-math => libc-math}/scalblnf.c | 0 src/libs/{stdc-math => libc-math}/scalblnl.c | 0 src/libs/{stdc-math => libc-math}/scalbn.c | 0 src/libs/{stdc-math => libc-math}/scalbnf.c | 0 src/libs/{stdc-math => libc-math}/scalbnl.c | 0 src/libs/{stdc-math => libc-math}/signgam.c | 0 .../{stdc-math => libc-math}/significand.c | 0 .../{stdc-math => libc-math}/significandf.c | 0 src/libs/{stdc-math => libc-math}/sin.c | 0 src/libs/{stdc-math => libc-math}/sincos.c | 0 src/libs/{stdc-math => libc-math}/sincosf.c | 0 src/libs/{stdc-math => libc-math}/sincosl.c | 0 src/libs/{stdc-math => libc-math}/sinf.c | 0 src/libs/{stdc-math => libc-math}/sinh.c | 0 src/libs/{stdc-math => libc-math}/sinhf.c | 0 src/libs/{stdc-math => libc-math}/sinhl.c | 0 src/libs/{stdc-math => libc-math}/sinl.c | 0 src/libs/{stdc-math => libc-math}/sqrt.c | 0 src/libs/{stdc-math => libc-math}/sqrtf.c | 0 src/libs/{stdc-math => libc-math}/sqrtl.c | 0 src/libs/{stdc-math => libc-math}/tan.c | 0 src/libs/{stdc-math => libc-math}/tanf.c | 0 src/libs/{stdc-math => libc-math}/tanh.c | 0 src/libs/{stdc-math => libc-math}/tanhf.c | 0 src/libs/{stdc-math => libc-math}/tanhl.c | 0 src/libs/{stdc-math => libc-math}/tanl.c | 0 src/libs/{stdc-math => libc-math}/tgamma.c | 0 src/libs/{stdc-math => libc-math}/tgammaf.c | 0 src/libs/{stdc-math => libc-math}/tgammal.c | 0 src/libs/{stdc-math => libc-math}/trunc.c | 0 src/libs/{stdc-math => libc-math}/truncf.c | 0 src/libs/{stdc-math => libc-math}/truncl.c | 0 src/libs/{stdc-ansi => libc}/assert.h | 0 src/libs/{stdc-ansi => libc}/ctype.c | 1 - src/libs/{stdc-ansi => libc}/ctype.h | 0 src/libs/{stdc-ansi => libc}/endian.h | 0 src/libs/{stdc-ansi => libc}/errno.c | 0 src/libs/{stdc-ansi => libc}/errno.h | 0 src/libs/{stdc-ansi => libc}/fenv.h | 0 src/libs/{stdc-ansi => libc}/locale.h | 0 src/libs/libc/manifest.json | 13 ++++++++ src/libs/{stdc-ansi => libc}/qsort.c | 11 +++++++ src/libs/{stdc-ansi => libc}/stdio.h | 0 src/libs/{stdc-ansi => libc}/stdlib.c | 18 ++++++++--- src/libs/{stdc-ansi => libc}/stdlib.h | 0 src/libs/{stdc-ansi => libc}/string.c | 5 +-- src/libs/{stdc-ansi => libc}/string.h | 0 src/libs/stdc-posix/string.h | 5 +++ src/loader/config.c | 4 +-- src/loader/config.h | 4 +-- src/loader/main.c | 7 ++-- src/loader/manifest.json | 23 +++++++++++++ src/loader/memory.h | 3 +- src/loader/protocol.c | 10 ++++-- .../acpi/{manifest.json => bmanifest.json} | 0 .../ahci/{manifest.json => bmanifest.json} | 0 .../device/{manifest.json => bmanifest.json} | 0 .../pci/{manifest.json => bmanifest.json} | 0 .../ps2/{manifest.json => bmanifest.json} | 0 .../storage/{manifest.json => bmanifest.json} | 0 .../system/{manifest.json => bmanifest.json} | 0 src/utils/bvm/manifest.json | 0 src/utils/cc/manifest.json | 0 src/utils/fstools/manifest.json | 0 src/utils/gunzip/manifest.json | 1 - src/utils/gzip/manifest.json | 1 - src/utils/idl/manifest.json | 0 src/utils/test/manifest.json | 0 364 files changed, 442 insertions(+), 226 deletions(-) create mode 100644 src/kernel/arch/x86_64/manifest.json create mode 100644 src/kernel/core/manifest.json create mode 100644 src/libs/brutal-sync/manifest.json create mode 100644 src/libs/brutal-text/manifest.json create mode 100644 src/libs/brutal-time/manifest.json create mode 100644 src/libs/elf/manifest.json rename src/libs/embed/{ => kernel}/manifest.json (57%) create mode 100644 src/libs/handover/manifest.json create mode 100644 src/libs/hw/acpi/manifest.json create mode 100644 src/libs/hw/efi/manifest.json create mode 100644 src/libs/ipc/manifest.json create mode 100644 src/libs/json/manifest.json rename src/libs/{stdc-math => libc-math}/__cos.c (100%) rename src/libs/{stdc-math => libc-math}/__cosdf.c (100%) rename src/libs/{stdc-math => libc-math}/__cosl.c (100%) rename src/libs/{stdc-math => libc-math}/__expo2.c (100%) rename src/libs/{stdc-math => libc-math}/__expo2f.c (100%) rename src/libs/{stdc-math => libc-math}/__fpclassify.c (100%) rename src/libs/{stdc-math => libc-math}/__fpclassifyf.c (100%) rename src/libs/{stdc-math => libc-math}/__fpclassifyl.c (100%) rename src/libs/{stdc-math => libc-math}/__invtrigl.c (100%) rename src/libs/{stdc-math => libc-math}/__invtrigl.h (100%) rename src/libs/{stdc-math => libc-math}/__polevll.c (100%) rename src/libs/{stdc-math => libc-math}/__rem_pio2.c (100%) rename src/libs/{stdc-math => libc-math}/__rem_pio2_large.c (100%) rename src/libs/{stdc-math => libc-math}/__rem_pio2f.c (100%) rename src/libs/{stdc-math => libc-math}/__rem_pio2l.c (100%) rename src/libs/{stdc-math => libc-math}/__signbit.c (100%) rename src/libs/{stdc-math => libc-math}/__signbitf.c (100%) rename src/libs/{stdc-math => libc-math}/__signbitl.c (100%) rename src/libs/{stdc-math => libc-math}/__sin.c (100%) rename src/libs/{stdc-math => libc-math}/__sindf.c (100%) rename src/libs/{stdc-math => libc-math}/__sinl.c (100%) rename src/libs/{stdc-math => libc-math}/__tan.c (100%) rename src/libs/{stdc-math => libc-math}/__tandf.c (100%) rename src/libs/{stdc-math => libc-math}/__tanl.c (100%) rename src/libs/{stdc-math => libc-math}/acos.c (100%) rename src/libs/{stdc-math => libc-math}/acosf.c (100%) rename src/libs/{stdc-math => libc-math}/acosh.c (100%) rename src/libs/{stdc-math => libc-math}/acoshf.c (100%) rename src/libs/{stdc-math => libc-math}/acoshl.c (100%) rename src/libs/{stdc-math => libc-math}/acosl.c (100%) rename src/libs/{stdc-math => libc-math}/asin.c (100%) rename src/libs/{stdc-math => libc-math}/asinf.c (100%) rename src/libs/{stdc-math => libc-math}/asinh.c (100%) rename src/libs/{stdc-math => libc-math}/asinhf.c (100%) rename src/libs/{stdc-math => libc-math}/asinhl.c (100%) rename src/libs/{stdc-math => libc-math}/asinl.c (100%) rename src/libs/{stdc-math => libc-math}/atan.c (100%) rename src/libs/{stdc-math => libc-math}/atan2.c (100%) rename src/libs/{stdc-math => libc-math}/atan2f.c (100%) rename src/libs/{stdc-math => libc-math}/atan2l.c (100%) rename src/libs/{stdc-math => libc-math}/atanf.c (100%) rename src/libs/{stdc-math => libc-math}/atanh.c (100%) rename src/libs/{stdc-math => libc-math}/atanhf.c (100%) rename src/libs/{stdc-math => libc-math}/atanhl.c (100%) rename src/libs/{stdc-math => libc-math}/atanl.c (100%) rename src/libs/{stdc-math => libc-math}/cbrt.c (100%) rename src/libs/{stdc-math => libc-math}/cbrtf.c (100%) rename src/libs/{stdc-math => libc-math}/cbrtl.c (100%) rename src/libs/{stdc-math => libc-math}/ceil.c (100%) rename src/libs/{stdc-math => libc-math}/ceilf.c (100%) rename src/libs/{stdc-math => libc-math}/ceill.c (100%) rename src/libs/{stdc-math => libc-math}/copysign.c (100%) rename src/libs/{stdc-math => libc-math}/copysignf.c (100%) rename src/libs/{stdc-math => libc-math}/copysignl.c (100%) rename src/libs/{stdc-math => libc-math}/cos.c (100%) rename src/libs/{stdc-math => libc-math}/cosf.c (100%) rename src/libs/{stdc-math => libc-math}/cosh.c (100%) rename src/libs/{stdc-math => libc-math}/coshf.c (100%) rename src/libs/{stdc-math => libc-math}/coshl.c (100%) rename src/libs/{stdc-math => libc-math}/cosl.c (100%) rename src/libs/{stdc-math => libc-math}/erf.c (100%) rename src/libs/{stdc-math => libc-math}/erff.c (100%) rename src/libs/{stdc-math => libc-math}/erfl.c (100%) rename src/libs/{stdc-math => libc-math}/exp.c (100%) rename src/libs/{stdc-math => libc-math}/exp10.c (100%) rename src/libs/{stdc-math => libc-math}/exp10f.c (100%) rename src/libs/{stdc-math => libc-math}/exp10l.c (100%) rename src/libs/{stdc-math => libc-math}/exp2.c (100%) rename src/libs/{stdc-math => libc-math}/exp2f.c (100%) rename src/libs/{stdc-math => libc-math}/exp2l.c (100%) rename src/libs/{stdc-math => libc-math}/expf.c (100%) rename src/libs/{stdc-math => libc-math}/expl.c (100%) rename src/libs/{stdc-math => libc-math}/expm1.c (100%) rename src/libs/{stdc-math => libc-math}/expm1f.c (100%) rename src/libs/{stdc-math => libc-math}/expm1l.c (100%) rename src/libs/{stdc-math => libc-math}/fabs.c (100%) rename src/libs/{stdc-math => libc-math}/fabsf.c (100%) rename src/libs/{stdc-math => libc-math}/fabsl.c (100%) rename src/libs/{stdc-math => libc-math}/fdim.c (100%) rename src/libs/{stdc-math => libc-math}/fdimf.c (100%) rename src/libs/{stdc-math => libc-math}/fdiml.c (100%) rename src/libs/{stdc-math => libc-math}/finite.c (100%) rename src/libs/{stdc-math => libc-math}/finitef.c (100%) rename src/libs/{stdc-math => libc-math}/floor.c (100%) rename src/libs/{stdc-math => libc-math}/floorf.c (100%) rename src/libs/{stdc-math => libc-math}/floorl.c (100%) rename src/libs/{stdc-math => libc-math}/fma.c (100%) rename src/libs/{stdc-math => libc-math}/fmaf.c (100%) rename src/libs/{stdc-math => libc-math}/fmal.c (100%) rename src/libs/{stdc-math => libc-math}/fmax.c (100%) rename src/libs/{stdc-math => libc-math}/fmaxf.c (100%) rename src/libs/{stdc-math => libc-math}/fmaxl.c (100%) rename src/libs/{stdc-math => libc-math}/fmin.c (100%) rename src/libs/{stdc-math => libc-math}/fminf.c (100%) rename src/libs/{stdc-math => libc-math}/fminl.c (100%) rename src/libs/{stdc-math => libc-math}/fmod.c (100%) rename src/libs/{stdc-math => libc-math}/fmodf.c (100%) rename src/libs/{stdc-math => libc-math}/fmodl.c (100%) rename src/libs/{stdc-math => libc-math}/frexp.c (100%) rename src/libs/{stdc-math => libc-math}/frexpf.c (100%) rename src/libs/{stdc-math => libc-math}/frexpl.c (100%) rename src/libs/{stdc-math => libc-math}/hypot.c (100%) rename src/libs/{stdc-math => libc-math}/hypotf.c (100%) rename src/libs/{stdc-math => libc-math}/hypotl.c (100%) rename src/libs/{stdc-math => libc-math}/ilogb.c (100%) rename src/libs/{stdc-math => libc-math}/ilogbf.c (100%) rename src/libs/{stdc-math => libc-math}/ilogbl.c (100%) rename src/libs/{stdc-math => libc-math}/j0.c (100%) rename src/libs/{stdc-math => libc-math}/j0f.c (100%) rename src/libs/{stdc-math => libc-math}/j1.c (100%) rename src/libs/{stdc-math => libc-math}/j1f.c (100%) rename src/libs/{stdc-math => libc-math}/jn.c (100%) rename src/libs/{stdc-math => libc-math}/jnf.c (100%) rename src/libs/{stdc-math => libc-math}/ldexp.c (100%) rename src/libs/{stdc-math => libc-math}/ldexpf.c (100%) rename src/libs/{stdc-math => libc-math}/ldexpl.c (100%) rename src/libs/{stdc-math => libc-math}/lgamma.c (100%) rename src/libs/{stdc-math => libc-math}/lgamma_r.c (100%) rename src/libs/{stdc-math => libc-math}/lgammaf.c (100%) rename src/libs/{stdc-math => libc-math}/lgammaf_r.c (100%) rename src/libs/{stdc-math => libc-math}/lgammal.c (100%) rename src/libs/{stdc-math => libc-math}/libm.h (100%) rename src/libs/{stdc-math => libc-math}/llrint.c (100%) rename src/libs/{stdc-math => libc-math}/llrintf.c (100%) rename src/libs/{stdc-math => libc-math}/llrintl.c (100%) rename src/libs/{stdc-math => libc-math}/llround.c (100%) rename src/libs/{stdc-math => libc-math}/llroundf.c (100%) rename src/libs/{stdc-math => libc-math}/llroundl.c (100%) rename src/libs/{stdc-math => libc-math}/log.c (100%) rename src/libs/{stdc-math => libc-math}/log10.c (100%) rename src/libs/{stdc-math => libc-math}/log10f.c (100%) rename src/libs/{stdc-math => libc-math}/log10l.c (100%) rename src/libs/{stdc-math => libc-math}/log1p.c (100%) rename src/libs/{stdc-math => libc-math}/log1pf.c (100%) rename src/libs/{stdc-math => libc-math}/log1pl.c (100%) rename src/libs/{stdc-math => libc-math}/log2.c (100%) rename src/libs/{stdc-math => libc-math}/log2f.c (100%) rename src/libs/{stdc-math => libc-math}/log2l.c (100%) rename src/libs/{stdc-math => libc-math}/logb.c (100%) rename src/libs/{stdc-math => libc-math}/logbf.c (100%) rename src/libs/{stdc-math => libc-math}/logbl.c (100%) rename src/libs/{stdc-math => libc-math}/logf.c (100%) rename src/libs/{stdc-math => libc-math}/logl.c (100%) rename src/libs/{stdc-math => libc-math}/lrint.c (100%) rename src/libs/{stdc-math => libc-math}/lrintf.c (100%) rename src/libs/{stdc-math => libc-math}/lrintl.c (100%) rename src/libs/{stdc-math => libc-math}/lround.c (100%) rename src/libs/{stdc-math => libc-math}/lroundf.c (100%) rename src/libs/{stdc-math => libc-math}/lroundl.c (100%) rename src/libs/{stdc-math => libc-math}/math.h (100%) rename src/libs/{stdc-math => libc-math}/modf.c (100%) rename src/libs/{stdc-math => libc-math}/modff.c (100%) rename src/libs/{stdc-math => libc-math}/modfl.c (100%) rename src/libs/{stdc-math => libc-math}/nan.c (100%) rename src/libs/{stdc-math => libc-math}/nanf.c (100%) rename src/libs/{stdc-math => libc-math}/nanl.c (100%) rename src/libs/{stdc-math => libc-math}/nearbyint.c (100%) rename src/libs/{stdc-math => libc-math}/nearbyintf.c (100%) rename src/libs/{stdc-math => libc-math}/nearbyintl.c (100%) rename src/libs/{stdc-math => libc-math}/nextafter.c (100%) rename src/libs/{stdc-math => libc-math}/nextafterf.c (100%) rename src/libs/{stdc-math => libc-math}/nextafterl.c (100%) rename src/libs/{stdc-math => libc-math}/nexttoward.c (100%) rename src/libs/{stdc-math => libc-math}/nexttowardf.c (100%) rename src/libs/{stdc-math => libc-math}/nexttowardl.c (100%) rename src/libs/{stdc-math => libc-math}/pow.c (100%) rename src/libs/{stdc-math => libc-math}/powf.c (100%) rename src/libs/{stdc-math => libc-math}/powl.c (100%) rename src/libs/{stdc-math => libc-math}/remainder.c (100%) rename src/libs/{stdc-math => libc-math}/remainderf.c (100%) rename src/libs/{stdc-math => libc-math}/remainderl.c (100%) rename src/libs/{stdc-math => libc-math}/remquo.c (100%) rename src/libs/{stdc-math => libc-math}/remquof.c (100%) rename src/libs/{stdc-math => libc-math}/remquol.c (100%) rename src/libs/{stdc-math => libc-math}/rint.c (100%) rename src/libs/{stdc-math => libc-math}/rintf.c (100%) rename src/libs/{stdc-math => libc-math}/rintl.c (100%) rename src/libs/{stdc-math => libc-math}/round.c (100%) rename src/libs/{stdc-math => libc-math}/roundf.c (100%) rename src/libs/{stdc-math => libc-math}/roundl.c (100%) rename src/libs/{stdc-math => libc-math}/scalb.c (100%) rename src/libs/{stdc-math => libc-math}/scalbf.c (100%) rename src/libs/{stdc-math => libc-math}/scalbln.c (100%) rename src/libs/{stdc-math => libc-math}/scalblnf.c (100%) rename src/libs/{stdc-math => libc-math}/scalblnl.c (100%) rename src/libs/{stdc-math => libc-math}/scalbn.c (100%) rename src/libs/{stdc-math => libc-math}/scalbnf.c (100%) rename src/libs/{stdc-math => libc-math}/scalbnl.c (100%) rename src/libs/{stdc-math => libc-math}/signgam.c (100%) rename src/libs/{stdc-math => libc-math}/significand.c (100%) rename src/libs/{stdc-math => libc-math}/significandf.c (100%) rename src/libs/{stdc-math => libc-math}/sin.c (100%) rename src/libs/{stdc-math => libc-math}/sincos.c (100%) rename src/libs/{stdc-math => libc-math}/sincosf.c (100%) rename src/libs/{stdc-math => libc-math}/sincosl.c (100%) rename src/libs/{stdc-math => libc-math}/sinf.c (100%) rename src/libs/{stdc-math => libc-math}/sinh.c (100%) rename src/libs/{stdc-math => libc-math}/sinhf.c (100%) rename src/libs/{stdc-math => libc-math}/sinhl.c (100%) rename src/libs/{stdc-math => libc-math}/sinl.c (100%) rename src/libs/{stdc-math => libc-math}/sqrt.c (100%) rename src/libs/{stdc-math => libc-math}/sqrtf.c (100%) rename src/libs/{stdc-math => libc-math}/sqrtl.c (100%) rename src/libs/{stdc-math => libc-math}/tan.c (100%) rename src/libs/{stdc-math => libc-math}/tanf.c (100%) rename src/libs/{stdc-math => libc-math}/tanh.c (100%) rename src/libs/{stdc-math => libc-math}/tanhf.c (100%) rename src/libs/{stdc-math => libc-math}/tanhl.c (100%) rename src/libs/{stdc-math => libc-math}/tanl.c (100%) rename src/libs/{stdc-math => libc-math}/tgamma.c (100%) rename src/libs/{stdc-math => libc-math}/tgammaf.c (100%) rename src/libs/{stdc-math => libc-math}/tgammal.c (100%) rename src/libs/{stdc-math => libc-math}/trunc.c (100%) rename src/libs/{stdc-math => libc-math}/truncf.c (100%) rename src/libs/{stdc-math => libc-math}/truncl.c (100%) rename src/libs/{stdc-ansi => libc}/assert.h (100%) rename src/libs/{stdc-ansi => libc}/ctype.c (99%) rename src/libs/{stdc-ansi => libc}/ctype.h (100%) rename src/libs/{stdc-ansi => libc}/endian.h (100%) rename src/libs/{stdc-ansi => libc}/errno.c (100%) rename src/libs/{stdc-ansi => libc}/errno.h (100%) rename src/libs/{stdc-ansi => libc}/fenv.h (100%) rename src/libs/{stdc-ansi => libc}/locale.h (100%) create mode 100644 src/libs/libc/manifest.json rename src/libs/{stdc-ansi => libc}/qsort.c (72%) rename src/libs/{stdc-ansi => libc}/stdio.h (100%) rename src/libs/{stdc-ansi => libc}/stdlib.c (95%) rename src/libs/{stdc-ansi => libc}/stdlib.h (100%) rename src/libs/{stdc-ansi => libc}/string.c (97%) rename src/libs/{stdc-ansi => libc}/string.h (100%) create mode 100644 src/loader/manifest.json rename src/srvs/acpi/{manifest.json => bmanifest.json} (100%) rename src/srvs/ahci/{manifest.json => bmanifest.json} (100%) rename src/srvs/device/{manifest.json => bmanifest.json} (100%) rename src/srvs/pci/{manifest.json => bmanifest.json} (100%) rename src/srvs/ps2/{manifest.json => bmanifest.json} (100%) rename src/srvs/storage/{manifest.json => bmanifest.json} (100%) rename src/srvs/system/{manifest.json => bmanifest.json} (100%) delete mode 100644 src/utils/bvm/manifest.json delete mode 100644 src/utils/cc/manifest.json delete mode 100644 src/utils/fstools/manifest.json delete mode 100644 src/utils/gunzip/manifest.json delete mode 100644 src/utils/gzip/manifest.json delete mode 100644 src/utils/idl/manifest.json delete mode 100644 src/utils/test/manifest.json diff --git a/meta/targets/brutal-x86_64.json b/meta/targets/brutal-x86_64.json index 7b0f7d6ed..519188b82 100644 --- a/meta/targets/brutal-x86_64.json +++ b/meta/targets/brutal-x86_64.json @@ -5,8 +5,9 @@ "toolchain": "clang", "arch": "x86_64", "bits": "64", - "sys": "munix", + "sys": "brutal", "abi": "sysv", + "loader": "brutal-loader", "encoding": "utf8", "freestanding": false, "host": false @@ -20,6 +21,7 @@ "args": [ "-target", "x86_64-none-elf", + "-D__brutal__", "-ffreestanding", "-mno-80387", "-mno-mmx", @@ -36,6 +38,7 @@ "args": [ "-target", "x86_64-none-elf", + "-D__brutal__", "-ffreestanding", "-mno-80387", "-mno-mmx", @@ -70,11 +73,9 @@ ] }, "as": { - "cmd": "clang", + "cmd": "nasm", "args": [ - "-target", - "x86_64-none-elf", - "-c" + "-f elf64" ] } } diff --git a/meta/targets/kernel-x86_64.json b/meta/targets/kernel-x86_64.json index 64877644e..d47f9b4b2 100644 --- a/meta/targets/kernel-x86_64.json +++ b/meta/targets/kernel-x86_64.json @@ -5,8 +5,9 @@ "toolchain": "clang", "arch": "x86_64", "bits": "64", - "sys": "munix", + "sys": "brutal", "abi": "sysv", + "loader": "brutal-loader", "encoding": "utf8", "freestanding": true, "host": false @@ -19,16 +20,20 @@ ], "args": [ "-target", - "x86_64-none-elf", + "x86_64-elf","-nostdlibinc", "-Isrc/libs/libc", "-Isrc/libs/libc-math", "-ffreestanding", "-fno-stack-protector", "-mno-80387", "-mno-mmx", - "-mno-3dnow", + "-mno-3dnow", "-D__brutal__", "-D__kernel__", "-mno-sse", "-mno-sse2", "-mno-red-zone", - "-mcmodel=kernel" + "-mcmodel=kernel", + "-fbuiltin", + "-nostdlib", + "-nostdlib++", + "-D__freestanding__" ] }, "cxx": { @@ -38,16 +43,20 @@ ], "args": [ "-target", - "x86_64-none-elf", + "x86_64-elf","-nostdlibinc", "-Isrc/libs/libc", "-Isrc/libs/libc-math", "-ffreestanding", "-fno-stack-protector", "-mno-80387", - "-mno-mmx", + "-mno-mmx", "-D__brutal__", "-D__kernel__", "-mno-3dnow", "-mno-sse", "-mno-sse2", "-mno-red-zone", - "-mcmodel=kernel" + "-mcmodel=kernel", + "-fbuiltin", + "-nostdlib", + "-nostdlib++", + "-D__freestanding__" ] }, "ld": { @@ -60,7 +69,8 @@ "elf_x86_64", "-Tmeta/targets/kernel-x86_64.ld", "-z", - "max-page-size=0x1000" + "max-page-size=0x1000", + "-nostdlib" ], "files": [ "meta/targets/kernel-x86_64.ld" @@ -76,11 +86,9 @@ ] }, "as": { - "cmd": "clang", + "cmd": "nasm", "args": [ - "-target", - "x86_64-none-elf", - "-c" + "-f elf64" ] } } diff --git a/src/kernel/arch/riscv64/boot.c b/src/kernel/arch/riscv64/boot.c index 6e8c5dfda..a708afc02 100644 --- a/src/kernel/arch/riscv64/boot.c +++ b/src/kernel/arch/riscv64/boot.c @@ -5,11 +5,11 @@ #include #include #include "kernel/arch.h" -"kernel/core/pmm.h" +#include "kernel/core/pmm.h" #include "kernel/arch/riscv64/arch.h" #include "kernel/arch/riscv64/interrupts.h" #include "kernel/arch/riscv64/uart8250.h" -"kernel/core/vmm.h" +#include "kernel/core/vmm.h" static Uart *_uart = NULL; static Handover _handover = {}; diff --git a/src/kernel/arch/riscv64/cpu.c b/src/kernel/arch/riscv64/cpu.c index a4cfb8c29..4fda48d56 100644 --- a/src/kernel/arch/riscv64/cpu.c +++ b/src/kernel/arch/riscv64/cpu.c @@ -1,7 +1,7 @@ "kernel/core/cpu.h" #include -"kernel/core/heap.h" -"kernel/core/kernel.h" +#include "kernel/core/heap.h" +#include "kernel/core/kernel.h" #include "kernel/arch/riscv64/cpu.h" static CpuImpl _cpus[MAX_CPU_COUNT] = {}; diff --git a/src/kernel/arch/riscv64/cpu.h b/src/kernel/arch/riscv64/cpu.h index 86fb57b2c..19769bd12 100644 --- a/src/kernel/arch/riscv64/cpu.h +++ b/src/kernel/arch/riscv64/cpu.h @@ -1,6 +1,6 @@ #pragma once -"kernel/core/cpu.h" +#include "kernel/core/cpu.h" #define MAX_CPU_COUNT 255 diff --git a/src/kernel/arch/riscv64/heap.c b/src/kernel/arch/riscv64/heap.c index b7e58d939..4788e560f 100644 --- a/src/kernel/arch/riscv64/heap.c +++ b/src/kernel/arch/riscv64/heap.c @@ -1,7 +1,7 @@ "kernel/core/heap.h" #include -"kernel/core/mmap.h" -"kernel/core/pmm.h" +#include "kernel/core/mmap.h" +#include "kernel/core/pmm.h" static Lock _lock; diff --git a/src/kernel/arch/riscv64/vmm.c b/src/kernel/arch/riscv64/vmm.c index 4dde81ef2..7c455e780 100644 --- a/src/kernel/arch/riscv64/vmm.c +++ b/src/kernel/arch/riscv64/vmm.c @@ -1,8 +1,8 @@ "kernel/core/vmm.h" #include #include -"kernel/core/heap.h" -"kernel/core/mmap.h" +#include "kernel/core/heap.h" +#include "kernel/core/mmap.h" #include "kernel/arch/riscv64/asm.h" #include "kernel/arch/riscv64/paging.h" diff --git a/src/kernel/arch/x86_64/apic.c b/src/kernel/arch/x86_64/apic.c index be610f6fb..1c66dc016 100644 --- a/src/kernel/arch/x86_64/apic.c +++ b/src/kernel/arch/x86_64/apic.c @@ -2,7 +2,7 @@ #include #include #include -"kernel/core/mmap.h" +#include "kernel/core/mmap.h" #include "kernel/arch/x86_64/apic.h" #include "kernel/arch/x86_64/asm.h" #include "kernel/arch/x86_64/cpu.h" diff --git a/src/kernel/arch/x86_64/apic.h b/src/kernel/arch/x86_64/apic.h index e76e0cf29..e745a6da4 100644 --- a/src/kernel/arch/x86_64/apic.h +++ b/src/kernel/arch/x86_64/apic.h @@ -1,7 +1,7 @@ #pragma once #include -"kernel/core/cpu.h" +#include "kernel/core/cpu.h" /* --- LApic ---------------------------------------------------------------- */ diff --git a/src/kernel/arch/x86_64/arch.c b/src/kernel/arch/x86_64/arch.c index 2fbabb156..3bedfe208 100644 --- a/src/kernel/arch/x86_64/arch.c +++ b/src/kernel/arch/x86_64/arch.c @@ -1,5 +1,5 @@ -#include "kernel/arch.h" -"kernel/core/cpu.h" +#include "kernel/core/arch.h" +#include "kernel/core/cpu.h" #include "kernel/arch/x86_64/apic.h" #include "kernel/arch/x86_64/asm.h" #include diff --git a/src/kernel/arch/x86_64/boot.c b/src/kernel/arch/x86_64/boot.c index fbc8d70ba..b6022ca1f 100644 --- a/src/kernel/arch/x86_64/boot.c +++ b/src/kernel/arch/x86_64/boot.c @@ -1,13 +1,13 @@ #include -#include "kernel/arch.h" -"kernel/core/event.h" -"kernel/core/init.h" -"kernel/core/kernel.h" -"kernel/core/mmap.h" -"kernel/core/pmm.h" -"kernel/core/sched.h" -"kernel/core/tasking.h" -"kernel/core/vmm.h" +#include "kernel/core/arch.h" +#include "kernel/core/event.h" +#include "kernel/core/init.h" +#include "kernel/core/kernel.h" +#include "kernel/core/mmap.h" +#include "kernel/core/pmm.h" +#include "kernel/core/sched.h" +#include "kernel/core/tasking.h" +#include "kernel/core/vmm.h" #include "kernel/arch/x86_64/apic.h" #include "kernel/arch/x86_64/asm.h" #include "kernel/arch/x86_64/com.h" diff --git a/src/kernel/arch/x86_64/context.c b/src/kernel/arch/x86_64/context.c index e7cba4443..ff2ad3dbe 100644 --- a/src/kernel/arch/x86_64/context.c +++ b/src/kernel/arch/x86_64/context.c @@ -1,4 +1,4 @@ -"kernel/core/context.h" +#include "kernel/core/context.h" #include #include #include "kernel/arch/x86_64/asm.h" diff --git a/src/kernel/arch/x86_64/cpu.c b/src/kernel/arch/x86_64/cpu.c index 707f772dd..ee1df39b7 100644 --- a/src/kernel/arch/x86_64/cpu.c +++ b/src/kernel/arch/x86_64/cpu.c @@ -1,7 +1,7 @@ -"kernel/core/cpu.h" +#include "kernel/core/cpu.h" #include -"kernel/core/heap.h" -"kernel/core/kernel.h" +#include "kernel/core/heap.h" +#include "kernel/core/kernel.h" #include "kernel/arch/x86_64/apic.h" #include "kernel/arch/x86_64/asm.h" #include "kernel/arch/x86_64/cpu.h" diff --git a/src/kernel/arch/x86_64/cpu.h b/src/kernel/arch/x86_64/cpu.h index 421af64d9..fea31995e 100644 --- a/src/kernel/arch/x86_64/cpu.h +++ b/src/kernel/arch/x86_64/cpu.h @@ -1,6 +1,6 @@ #pragma once -"kernel/core/cpu.h" +#include "kernel/core/cpu.h" #include "kernel/arch/x86_64/gdt.h" #define MAX_CPU_COUNT 255 diff --git a/src/kernel/arch/x86_64/heap.c b/src/kernel/arch/x86_64/heap.c index faf99aa6a..e7a10ae8e 100644 --- a/src/kernel/arch/x86_64/heap.c +++ b/src/kernel/arch/x86_64/heap.c @@ -1,10 +1,10 @@ -"kernel/core/heap.h" +#include "kernel/core/heap.h" #include #include #include -"kernel/core/mmap.h" -"kernel/core/pmm.h" +#include "kernel/core/mmap.h" +#include "kernel/core/pmm.h" static Lock _lock; diff --git a/src/kernel/arch/x86_64/hpet.c b/src/kernel/arch/x86_64/hpet.c index 88bd06312..b253fa14e 100644 --- a/src/kernel/arch/x86_64/hpet.c +++ b/src/kernel/arch/x86_64/hpet.c @@ -5,7 +5,7 @@ #include "kernel/arch/x86_64/hpet.h" -"kernel/core/mmap.h" +#include "kernel/core/mmap.h" static uintptr_t _base = 0; static uint64_t _clock = 0; diff --git a/src/kernel/arch/x86_64/idt.c b/src/kernel/arch/x86_64/idt.c index 8ac800bb5..31880f2be 100644 --- a/src/kernel/arch/x86_64/idt.c +++ b/src/kernel/arch/x86_64/idt.c @@ -1,5 +1,5 @@ #include "kernel/arch/x86_64/idt.h" -#include "kernel/arch.h" +#include "kernel/core/arch.h" #include "kernel/arch/x86_64/apic.h" #include "kernel/arch/x86_64/gdt.h" diff --git a/src/kernel/arch/x86_64/interrupts.c b/src/kernel/arch/x86_64/interrupts.c index 55b7df264..15d1ffbee 100644 --- a/src/kernel/arch/x86_64/interrupts.c +++ b/src/kernel/arch/x86_64/interrupts.c @@ -11,10 +11,10 @@ #include "kernel/arch/x86_64/smp.h" #include "kernel/arch/x86_64/syscall.h" -"kernel/core/context.h" -"kernel/core/cpu.h" -"kernel/core/event.h" -"kernel/core/sched.h" +#include "kernel/core/context.h" +#include "kernel/core/cpu.h" +#include "kernel/core/event.h" +#include "kernel/core/sched.h" static char *_exception_messages[32] = { "DivisionByZero", diff --git a/src/kernel/arch/x86_64/manifest.json b/src/kernel/arch/x86_64/manifest.json new file mode 100644 index 000000000..3c9dc1b4c --- /dev/null +++ b/src/kernel/arch/x86_64/manifest.json @@ -0,0 +1,22 @@ +{ + "id": "arch-x86_64", + "description": "The Brutal Microkernel x86-64 architecture support", + "type": "lib", + "requires": [ + "embed", + "brutal-mem", + "brutal-debug", + "brutal-sync", + "brutal-base", + "bal", + "brutal-time", + "acpi", + "brutal-alloc" + ], + "provides": [ + "kernel-arch" + ], + "enableIf": { + "arch": ["x86_64"] + } +} \ No newline at end of file diff --git a/src/kernel/arch/x86_64/smp.c b/src/kernel/arch/x86_64/smp.c index ec2010c13..d2a881385 100644 --- a/src/kernel/arch/x86_64/smp.c +++ b/src/kernel/arch/x86_64/smp.c @@ -10,12 +10,12 @@ #include "kernel/arch/x86_64/hpet.h" #include "kernel/arch/x86_64/smp.h" -#include "kernel/arch.h" -"kernel/core/heap.h" -"kernel/core/kernel.h" -"kernel/core/mmap.h" -"kernel/core/pmm.h" -"kernel/core/vmm.h" +#include "kernel/core/arch.h" +#include "kernel/core/heap.h" +#include "kernel/core/kernel.h" +#include "kernel/core/mmap.h" +#include "kernel/core/pmm.h" +#include "kernel/core/vmm.h" static atomic_bool _ready = false; diff --git a/src/kernel/arch/x86_64/syscall.c b/src/kernel/arch/x86_64/syscall.c index 7d07fbedd..8525b4b0d 100644 --- a/src/kernel/arch/x86_64/syscall.c +++ b/src/kernel/arch/x86_64/syscall.c @@ -1,8 +1,8 @@ #include "kernel/arch/x86_64/syscall.h" #include -"kernel/core/heap.h" -"kernel/core/kernel.h" -"kernel/core/syscalls.h" +#include "kernel/core/heap.h" +#include "kernel/core/kernel.h" +#include "kernel/core/syscalls.h" #include "kernel/arch/x86_64/asm.h" #include "kernel/arch/x86_64/cpu.h" #include "kernel/arch/x86_64/gdt.h" diff --git a/src/kernel/arch/x86_64/vmm.c b/src/kernel/arch/x86_64/vmm.c index d3e9dd309..12b5da2b4 100644 --- a/src/kernel/arch/x86_64/vmm.c +++ b/src/kernel/arch/x86_64/vmm.c @@ -1,4 +1,4 @@ -"kernel/core/vmm.h" +#include "kernel/core/vmm.h" #include #include #include @@ -8,8 +8,8 @@ #include "kernel/arch/x86_64/asm.h" #include "kernel/arch/x86_64/paging.h" -"kernel/core/heap.h" -"kernel/core/mmap.h" +#include "kernel/core/heap.h" +#include "kernel/core/mmap.h" static Lock _lock; static Pml *_kpml; diff --git a/src/kernel/core/arch.h b/src/kernel/core/arch.h index 2b1fcd280..6389a45bf 100644 --- a/src/kernel/core/arch.h +++ b/src/kernel/core/arch.h @@ -4,7 +4,7 @@ #include #include -"kernel/core/tasking.h" +#include "kernel/core/tasking.h" IoWriter arch_debug(void); diff --git a/src/kernel/core/channel.c b/src/kernel/core/channel.c index c85de6899..f4ef48edd 100644 --- a/src/kernel/core/channel.c +++ b/src/kernel/core/channel.c @@ -1,9 +1,9 @@ -"kernel/core/core/channel.h" +#include "kernel/core/channel.h" #include #include #include -"kernel/core/kernel.h" -"kernel/core/sched.h" +#include "kernel/core/kernel.h" +#include "kernel/core/sched.h" Channel *channel_create(void) { diff --git a/src/kernel/core/channel.h b/src/kernel/core/channel.h index d59dcf673..cf272950c 100644 --- a/src/kernel/core/channel.h +++ b/src/kernel/core/channel.h @@ -1,7 +1,7 @@ #pragma once #include -"kernel/core/parcel.h" +#include "kernel/core/parcel.h" typedef struct { diff --git a/src/kernel/core/cpu.c b/src/kernel/core/cpu.c index e7fdcbb07..ee32b54bc 100644 --- a/src/kernel/core/cpu.c +++ b/src/kernel/core/cpu.c @@ -1,4 +1,4 @@ -"kernel/core/cpu.h" +#include "kernel/core/cpu.h" #include void cpu_begin_interrupt(void) diff --git a/src/kernel/core/cpu.h b/src/kernel/core/cpu.h index 1b2440535..79e24e3ba 100644 --- a/src/kernel/core/cpu.h +++ b/src/kernel/core/cpu.h @@ -1,6 +1,6 @@ #pragma once -"kernel/core/task.h" +#include "kernel/core/task.h" typedef struct { diff --git a/src/kernel/core/domain.c b/src/kernel/core/domain.c index 5dda687e9..81939452f 100644 --- a/src/kernel/core/domain.c +++ b/src/kernel/core/domain.c @@ -1,4 +1,4 @@ -"kernel/core/domain.h" +#include "kernel/core/domain.h" #include void domain_destroy(Domain *self) diff --git a/src/kernel/core/domain.h b/src/kernel/core/domain.h index 0b377c8dd..c7a6570be 100644 --- a/src/kernel/core/domain.h +++ b/src/kernel/core/domain.h @@ -1,6 +1,6 @@ #pragma once -"kernel/core/object.h" +#include "kernel/core/object.h" #include typedef struct diff --git a/src/kernel/core/event.c b/src/kernel/core/event.c index 4bd2e1bf8..d9dd6268f 100644 --- a/src/kernel/core/event.c +++ b/src/kernel/core/event.c @@ -1,4 +1,4 @@ -"kernel/core/event.h" +#include "kernel/core/event.h" #include #include diff --git a/src/kernel/core/event.h b/src/kernel/core/event.h index f3def0b87..6e73e7803 100644 --- a/src/kernel/core/event.h +++ b/src/kernel/core/event.h @@ -1,8 +1,8 @@ #pragma once #include -"kernel/core/domain.h" -"kernel/core/task.h" +#include "kernel/core/domain.h" +#include "kernel/core/task.h" typedef struct { diff --git a/src/kernel/core/heap.h b/src/kernel/core/heap.h index 011e85d1e..8a598ad8e 100644 --- a/src/kernel/core/heap.h +++ b/src/kernel/core/heap.h @@ -2,7 +2,7 @@ #include -"kernel/core/pmm.h" +#include "kernel/core/pmm.h" typedef USizeRange HeapRange; diff --git a/src/kernel/core/init.c b/src/kernel/core/init.c index 32aab31cb..4f732af80 100644 --- a/src/kernel/core/init.c +++ b/src/kernel/core/init.c @@ -3,11 +3,11 @@ #include #include -"kernel/core/heap.h" -"kernel/core/init.h" -"kernel/core/kernel.h" -"kernel/core/mmap.h" -"kernel/core/sched.h" +#include "kernel/core/heap.h" +#include "kernel/core/init.h" +#include "kernel/core/kernel.h" +#include "kernel/core/mmap.h" +#include "kernel/core/sched.h" static bool elf_supported(Elf64Header const *header, size_t data_size) { diff --git a/src/kernel/core/init.h b/src/kernel/core/init.h index 42c454287..41cd6a049 100644 --- a/src/kernel/core/init.h +++ b/src/kernel/core/init.h @@ -1,6 +1,6 @@ #pragma once #include -"kernel/core/task.h" +#include "kernel/core/task.h" void init_start(Handover const *handover); diff --git a/src/kernel/core/manifest.json b/src/kernel/core/manifest.json new file mode 100644 index 000000000..8679cbab8 --- /dev/null +++ b/src/kernel/core/manifest.json @@ -0,0 +1,20 @@ +{ + "id": "core", + "description": "The Brutal Microkernel core", + "type": "exe", + "requires": [ + "kernel-arch", + "bal", + "brutal-base", + "brutal-alloc", + "brutal-debug", + "brutal-sync", + "brutal-mem", + "elf", + "embed", + "brutal-ds", + "brutal-io", + "handover", + "libc" + ] +} \ No newline at end of file diff --git a/src/kernel/core/memory.c b/src/kernel/core/memory.c index b6ffedfe4..f42bc74b4 100644 --- a/src/kernel/core/memory.c +++ b/src/kernel/core/memory.c @@ -1,4 +1,4 @@ -"kernel/core/memory.h" +#include "kernel/core/memory.h" #include #include diff --git a/src/kernel/core/memory.h b/src/kernel/core/memory.h index 78c7dd2e1..1642c7b72 100644 --- a/src/kernel/core/memory.h +++ b/src/kernel/core/memory.h @@ -1,8 +1,8 @@ #pragma once -"kernel/core/domain.h" -"kernel/core/heap.h" -"kernel/core/pmm.h" +#include "kernel/core/domain.h" +#include "kernel/core/heap.h" +#include "kernel/core/pmm.h" typedef enum { diff --git a/src/kernel/core/object.c b/src/kernel/core/object.c index 28ab65ec2..e812a18c6 100644 --- a/src/kernel/core/object.c +++ b/src/kernel/core/object.c @@ -1,4 +1,4 @@ -"kernel/core/object.h" +#include "kernel/core/object.h" #include #include diff --git a/src/kernel/core/parcel.c b/src/kernel/core/parcel.c index ce6de4d68..7f5108989 100644 --- a/src/kernel/core/parcel.c +++ b/src/kernel/core/parcel.c @@ -1,4 +1,4 @@ -"kernel/core/parcel.h" +#include "kernel/core/parcel.h" BrResult parcel_pack(Parcel *self, BrMsg const *msg, Domain *domain) { diff --git a/src/kernel/core/parcel.h b/src/kernel/core/parcel.h index 417927f1f..35f5bcd52 100644 --- a/src/kernel/core/parcel.h +++ b/src/kernel/core/parcel.h @@ -1,7 +1,7 @@ #pragma once #include -"kernel/core/domain.h" +#include "kernel/core/domain.h" typedef struct { diff --git a/src/kernel/core/pmm.c b/src/kernel/core/pmm.c index 70f914d0c..a0356e035 100644 --- a/src/kernel/core/pmm.c +++ b/src/kernel/core/pmm.c @@ -1,4 +1,4 @@ -"kernel/core/pmm.h" +#include "kernel/core/pmm.h" #include #include #include @@ -7,8 +7,8 @@ #include #include -#include "kernel/arch.h" -"kernel/core/mmap.h" +#include "kernel/core/arch.h" +#include "kernel/core/mmap.h" // #define TRACE_PMM diff --git a/src/kernel/core/sched.c b/src/kernel/core/sched.c index 223eddb0c..8123f7085 100644 --- a/src/kernel/core/sched.c +++ b/src/kernel/core/sched.c @@ -1,8 +1,8 @@ -"kernel/core/sched.h" +#include "kernel/core/sched.h" #include #include -#include "kernel/arch.h" -"kernel/core/cpu.h" +#include "kernel/core/arch.h" +#include "kernel/core/cpu.h" static Lock _lock = {}; static Vec(Task *) _tasks = {}; diff --git a/src/kernel/core/sched.h b/src/kernel/core/sched.h index ebc5fb673..613741e91 100644 --- a/src/kernel/core/sched.h +++ b/src/kernel/core/sched.h @@ -1,7 +1,7 @@ #pragma once -"kernel/core/cpu.h" -"kernel/core/task.h" +#include "kernel/core/cpu.h" +#include "kernel/core/task.h" void sched_initialize(void); diff --git a/src/kernel/core/space.c b/src/kernel/core/space.c index f13459522..6c51a9ae5 100644 --- a/src/kernel/core/space.c +++ b/src/kernel/core/space.c @@ -1,4 +1,4 @@ -"kernel/core/space.h" +#include "kernel/core/space.h" #include #include diff --git a/src/kernel/core/space.h b/src/kernel/core/space.h index 53fa36c02..a3091f8e6 100644 --- a/src/kernel/core/space.h +++ b/src/kernel/core/space.h @@ -1,7 +1,7 @@ #pragma once -"kernel/core/memory.h" -"kernel/core/vmm.h" +#include "kernel/core/memory.h" +#include "kernel/core/vmm.h" #include typedef struct diff --git a/src/kernel/core/syscalls.c b/src/kernel/core/syscalls.c index effc2749e..8d38a4e25 100644 --- a/src/kernel/core/syscalls.c +++ b/src/kernel/core/syscalls.c @@ -3,14 +3,14 @@ #include #include -#include "kernel/arch.h" -"kernel/core/domain.h" -"kernel/core/event.h" -"kernel/core/init.h" -"kernel/core/memory.h" -"kernel/core/sched.h" -"kernel/core/syscalls.h" -"kernel/core/task.h" +#include "kernel/core/arch.h" +#include "kernel/core/domain.h" +#include "kernel/core/event.h" +#include "kernel/core/init.h" +#include "kernel/core/memory.h" +#include "kernel/core/sched.h" +#include "kernel/core/syscalls.h" +#include "kernel/core/task.h" BrResult sys_log(BrLogArgs *args) { diff --git a/src/kernel/core/task.c b/src/kernel/core/task.c index 083dc3817..35234f802 100644 --- a/src/kernel/core/task.c +++ b/src/kernel/core/task.c @@ -1,10 +1,10 @@ -"kernel/core/task.h" -#include -#include -"kernel/core/cpu.h" -"kernel/core/event.h" -"kernel/core/kernel.h" -"kernel/core/sched.h" +#include "kernel/core/task.h" +#include +#include +#include "kernel/core/cpu.h" +#include "kernel/core/event.h" +#include "kernel/core/kernel.h" +#include "kernel/core/sched.h" Task *task_self(void) { diff --git a/src/kernel/core/task.h b/src/kernel/core/task.h index 84374a30b..5c23416ff 100644 --- a/src/kernel/core/task.h +++ b/src/kernel/core/task.h @@ -1,12 +1,11 @@ #pragma once #include -#include #include -"kernel/core/channel.h" -"kernel/core/context.h" -"kernel/core/space.h" +#include "kernel/core/channel.h" +#include "kernel/core/context.h" +#include "kernel/core/space.h" typedef bool BlockerFn(void *context); diff --git a/src/kernel/core/tasking.c b/src/kernel/core/tasking.c index 074eeac6e..bd2e1dbf7 100644 --- a/src/kernel/core/tasking.c +++ b/src/kernel/core/tasking.c @@ -1,8 +1,8 @@ -"kernel/core/tasking.h" +#include "kernel/core/tasking.h" #include -#include "kernel/arch.h" -"kernel/core/sched.h" -"kernel/core/task.h" +#include "kernel/core/arch.h" +#include "kernel/core/sched.h" +#include "kernel/core/task.h" static void idle(void) { diff --git a/src/kernel/core/vmm.h b/src/kernel/core/vmm.h index 3d6560a8b..57023c282 100644 --- a/src/kernel/core/vmm.h +++ b/src/kernel/core/vmm.h @@ -1,7 +1,7 @@ #pragma once #include -"kernel/core/pmm.h" +#include "kernel/core/pmm.h" typedef void *VmmSpace; diff --git a/src/libs/bal/manifest.json b/src/libs/bal/manifest.json index 2df829208..9e697ac95 100644 --- a/src/libs/bal/manifest.json +++ b/src/libs/bal/manifest.json @@ -3,7 +3,6 @@ "type": "lib", "description": "Brutal kernel abstraction layer", "requires": [ - "ipc", "brutal-debug", "brutal-mem", "elf" diff --git a/src/libs/brutal-base/manifest.json b/src/libs/brutal-base/manifest.json index a61d5fb1c..fa4332fd9 100644 --- a/src/libs/brutal-base/manifest.json +++ b/src/libs/brutal-base/manifest.json @@ -1,7 +1,5 @@ { "id": "brutal-base", "type": "lib", - "description": "Brutal base and utility library", - "requires": [ - ] + "description": "Brutal base and utility library" } \ No newline at end of file diff --git a/src/libs/brutal-debug/manifest.json b/src/libs/brutal-debug/manifest.json index ef6ccafe6..d12a09415 100644 --- a/src/libs/brutal-debug/manifest.json +++ b/src/libs/brutal-debug/manifest.json @@ -3,6 +3,8 @@ "type": "lib", "description": "Brutal debugging utility library", "requires": [ - "brutal-base" + "brutal-base", + "brutal-fmt", + "embed" ] } \ No newline at end of file diff --git a/src/libs/brutal-hash/adler32.c b/src/libs/brutal-hash/adler32.c index ac2e9752a..835ff3e3f 100644 --- a/src/libs/brutal-hash/adler32.c +++ b/src/libs/brutal-hash/adler32.c @@ -1,5 +1,5 @@ #include "adler32.h" -#include +#include #define A32_BASE 65521 @@ -17,7 +17,8 @@ static IoResult adler32_write_impl(Adler32 *self, uint8_t const *data, size_t si self->s1 = (self->s1 + data[n]) % A32_BASE; self->s2 = (self->s2 + self->s1) % A32_BASE; } - return io_write(self->underlying, data, size); + + return self->underlying.write(self->underlying.context, data, size); } IoWriter adler32_writer(Adler32 *self) diff --git a/src/libs/brutal-hash/manifest.json b/src/libs/brutal-hash/manifest.json index e2f45b3cb..ddc3a0e27 100644 --- a/src/libs/brutal-hash/manifest.json +++ b/src/libs/brutal-hash/manifest.json @@ -3,7 +3,6 @@ "type": "lib", "description": "Brutal hashing utility library", "requires": [ - "brutal-base", - "brutal-io" + "brutal-base" ] } \ No newline at end of file diff --git a/src/libs/brutal-io/emit.c b/src/libs/brutal-io/emit.c index 8921f7cb0..5e7cd6b3f 100644 --- a/src/libs/brutal-io/emit.c +++ b/src/libs/brutal-io/emit.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include "emit.h" #include "funcs.h" diff --git a/src/libs/brutal-io/emit.h b/src/libs/brutal-io/emit.h index 94cac1d90..95e76a5f5 100644 --- a/src/libs/brutal-io/emit.h +++ b/src/libs/brutal-io/emit.h @@ -1,6 +1,7 @@ #pragma once #include "buf.h" +#include typedef struct { diff --git a/src/libs/brutal-io/file.h b/src/libs/brutal-io/file.h index ff7581900..82fc3a1db 100644 --- a/src/libs/brutal-io/file.h +++ b/src/libs/brutal-io/file.h @@ -1,6 +1,5 @@ #pragma once -#ifndef __kernel__ # include @@ -70,4 +69,3 @@ IoWSeek io_file_wseek(IoFile *self); MaybeError io_file_close(IoFile *self); -#endif diff --git a/src/libs/brutal-io/funcs.c b/src/libs/brutal-io/funcs.c index 7e053e0d1..f99e06a11 100644 --- a/src/libs/brutal-io/funcs.c +++ b/src/libs/brutal-io/funcs.c @@ -1,5 +1,6 @@ -#include - +#include +#include +#include #include "funcs.h" /* --- Read Functions ------------------------------------------------------- */ diff --git a/src/libs/brutal-io/manifest.json b/src/libs/brutal-io/manifest.json index 39b53b75b..e0e636977 100644 --- a/src/libs/brutal-io/manifest.json +++ b/src/libs/brutal-io/manifest.json @@ -8,7 +8,6 @@ "brutal-math", "brutal-alloc", "embed", - "brutal-fmt", "brutal-text" ] } \ No newline at end of file diff --git a/src/libs/brutal-io/mem.c b/src/libs/brutal-io/mem.c index 3235e2253..db9bb67a0 100644 --- a/src/libs/brutal-io/mem.c +++ b/src/libs/brutal-io/mem.c @@ -1,4 +1,5 @@ -#include +#include +#include #include "mem.h" diff --git a/src/libs/brutal-io/mem.h b/src/libs/brutal-io/mem.h index 1569df96f..334e3ff9e 100644 --- a/src/libs/brutal-io/mem.h +++ b/src/libs/brutal-io/mem.h @@ -1,6 +1,5 @@ #pragma once -#include #include "traits.h" diff --git a/src/libs/brutal-io/path.h b/src/libs/brutal-io/path.h index 66a9f5507..e10c294d0 100644 --- a/src/libs/brutal-io/path.h +++ b/src/libs/brutal-io/path.h @@ -1,6 +1,6 @@ #pragma once -#include +#include Str io_dirname(Str path); diff --git a/src/libs/brutal-io/window.c b/src/libs/brutal-io/window.c index 59dbc2b03..2d6d5d2d4 100644 --- a/src/libs/brutal-io/window.c +++ b/src/libs/brutal-io/window.c @@ -1,5 +1,6 @@ -#include -#include +#include +#include +#include #include "funcs.h" #include "window.h" diff --git a/src/libs/brutal-math/easing.c b/src/libs/brutal-math/easing.c index 2b3bb43a9..cc81c25ed 100644 --- a/src/libs/brutal-math/easing.c +++ b/src/libs/brutal-math/easing.c @@ -1,5 +1,5 @@ -#include +#include #include "easing.h" double m_easing_linear(double p) diff --git a/src/libs/brutal-math/gravity.h b/src/libs/brutal-math/gravity.h index a86da6d89..82344cc64 100644 --- a/src/libs/brutal-math/gravity.h +++ b/src/libs/brutal-math/gravity.h @@ -2,6 +2,7 @@ #include "flow.h" #include "rect.h" +#include #define M_GRAVITY_NONE (0) diff --git a/src/libs/brutal-math/manifest.json b/src/libs/brutal-math/manifest.json index 18aea53fa..40abe82bd 100644 --- a/src/libs/brutal-math/manifest.json +++ b/src/libs/brutal-math/manifest.json @@ -3,8 +3,6 @@ "type": "lib", "description": "Brutal math utility library", "requires": [ - "libc", - "brutal-ds", "embed" ] } \ No newline at end of file diff --git a/src/libs/brutal-math/rect.h b/src/libs/brutal-math/rect.h index 9daafee45..addc63ffa 100644 --- a/src/libs/brutal-math/rect.h +++ b/src/libs/brutal-math/rect.h @@ -1,4 +1,5 @@ #pragma once +#include #include diff --git a/src/libs/brutal-parse/lex.c b/src/libs/brutal-parse/lex.c index 317953dbe..a4f6d9e6b 100644 --- a/src/libs/brutal-parse/lex.c +++ b/src/libs/brutal-parse/lex.c @@ -1,4 +1,4 @@ -#include +#include #include "lex.h" diff --git a/src/libs/brutal-parse/lex.h b/src/libs/brutal-parse/lex.h index a6cc13c4a..bb6a22e07 100644 --- a/src/libs/brutal-parse/lex.h +++ b/src/libs/brutal-parse/lex.h @@ -1,6 +1,8 @@ #pragma once -#include +#include + +#include #include "lexeme.h" #include "scan.h" diff --git a/src/libs/brutal-parse/lexeme.h b/src/libs/brutal-parse/lexeme.h index fa027381c..0a5b3aa4e 100644 --- a/src/libs/brutal-parse/lexeme.h +++ b/src/libs/brutal-parse/lexeme.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #define LEXEME_EOF (-1) #define LEXEME_INVALID (-2) diff --git a/src/libs/brutal-parse/manifest.json b/src/libs/brutal-parse/manifest.json index 48b4b767e..ec2c034bb 100644 --- a/src/libs/brutal-parse/manifest.json +++ b/src/libs/brutal-parse/manifest.json @@ -6,9 +6,7 @@ "brutal-ds", "brutal-text", "brutal-debug", - "libc", - "brutal-fmt", - "brutal-io", - "brutal-alloc" + "brutal-alloc", + "brutal-mem" ] } \ No newline at end of file diff --git a/src/libs/brutal-parse/scan.c b/src/libs/brutal-parse/scan.c index 5add8b84f..ac1e1e3c2 100644 --- a/src/libs/brutal-parse/scan.c +++ b/src/libs/brutal-parse/scan.c @@ -1,7 +1,9 @@ -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "scan.h" diff --git a/src/libs/brutal-sync/manifest.json b/src/libs/brutal-sync/manifest.json new file mode 100644 index 000000000..03a95588e --- /dev/null +++ b/src/libs/brutal-sync/manifest.json @@ -0,0 +1,10 @@ +{ + "id": "brutal-sync", + "type": "lib", + "description": "Brutal locking utility library", + "requires": [ + "embed", + "brutal-debug" + + ] +} \ No newline at end of file diff --git a/src/libs/brutal-text/manifest.json b/src/libs/brutal-text/manifest.json new file mode 100644 index 000000000..1684d5006 --- /dev/null +++ b/src/libs/brutal-text/manifest.json @@ -0,0 +1,9 @@ +{ + "id": "brutal-text", + "type": "lib", + "description": "Brutal text interaction utility library", + "requires": [ + "brutal-alloc", + "brutal-mem" + ] +} \ No newline at end of file diff --git a/src/libs/brutal-text/str.c b/src/libs/brutal-text/str.c index 30c0a3b9d..fac9ef3ee 100644 --- a/src/libs/brutal-text/str.c +++ b/src/libs/brutal-text/str.c @@ -1,5 +1,5 @@ #include - +#include #include "str.h" Str str_concat(Str const lhs, Str const rhs, Alloc *alloc) diff --git a/src/libs/brutal-text/utf16.c b/src/libs/brutal-text/utf16.c index 585222720..80acfbf3d 100644 --- a/src/libs/brutal-text/utf16.c +++ b/src/libs/brutal-text/utf16.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include uint16_t *utf16_str_to_cstr(Str str, Alloc *alloc) { diff --git a/src/libs/brutal-text/utf16.h b/src/libs/brutal-text/utf16.h index 2102feb56..373b95192 100644 --- a/src/libs/brutal-text/utf16.h +++ b/src/libs/brutal-text/utf16.h @@ -1,6 +1,5 @@ #pragma once -#include #include "str.h" diff --git a/src/libs/brutal-text/utf8.c b/src/libs/brutal-text/utf8.c index 30ac241ea..d1d69466d 100644 --- a/src/libs/brutal-text/utf8.c +++ b/src/libs/brutal-text/utf8.c @@ -1,4 +1,5 @@ #include "utf8.h" +#include StrFix8 utf8_from_rune(Rune rune) { diff --git a/src/libs/brutal-time/manifest.json b/src/libs/brutal-time/manifest.json new file mode 100644 index 000000000..843cde625 --- /dev/null +++ b/src/libs/brutal-time/manifest.json @@ -0,0 +1,8 @@ +{ + "id": "brutal-time", + "type": "lib", + "description": "Brutal time utility library", + "requires": [ + "embed" + ] +} \ No newline at end of file diff --git a/src/libs/elf/manifest.json b/src/libs/elf/manifest.json new file mode 100644 index 000000000..18c8fac3f --- /dev/null +++ b/src/libs/elf/manifest.json @@ -0,0 +1,7 @@ +{ + "id": "elf", + "type": "lib", + "description": "Brutal elf utility library", + "requires": [ + ] +} \ No newline at end of file diff --git a/src/libs/embed/brutal/log.c b/src/libs/embed/brutal/log.c index d5a304039..f7c58588e 100644 --- a/src/libs/embed/brutal/log.c +++ b/src/libs/embed/brutal/log.c @@ -2,7 +2,7 @@ #include #include #include -#include +#include static bool _initialized = false; static Lock _lock; diff --git a/src/libs/embed/file-decl.h b/src/libs/embed/file-decl.h index 3af5b4950..fe0c60359 100644 --- a/src/libs/embed/file-decl.h +++ b/src/libs/embed/file-decl.h @@ -1,6 +1,6 @@ #pragma once - +#include #if defined(SYSTEM_EFI) # include #elif defined(SYSTEM_POSIX) @@ -8,7 +8,7 @@ #elif defined(SYSTEM_BRUTAL) # include #elif defined(SYSTEM_KERNEL) -# include +# include #else # error "Unsupported embedder!" #endif diff --git a/src/libs/embed/kernel/debug.c b/src/libs/embed/kernel/debug.c index 000f7c85c..711a991ea 100644 --- a/src/libs/embed/kernel/debug.c +++ b/src/libs/embed/kernel/debug.c @@ -1,7 +1,7 @@ -#include +#include #include -"kernel/core/cpu.h" +#include "kernel/core/cpu.h" void embed_log_prefix(IoWriter writer) { diff --git a/src/libs/embed/kernel/log.c b/src/libs/embed/kernel/log.c index 0bde445bb..9328d75be 100644 --- a/src/libs/embed/kernel/log.c +++ b/src/libs/embed/kernel/log.c @@ -1,6 +1,6 @@ #include -#include -#include "kernel/arch.h" +#include +#include "kernel/core/arch.h" static Lock _lock; diff --git a/src/libs/embed/manifest.json b/src/libs/embed/kernel/manifest.json similarity index 57% rename from src/libs/embed/manifest.json rename to src/libs/embed/kernel/manifest.json index bb537e54c..91e0dac57 100644 --- a/src/libs/embed/manifest.json +++ b/src/libs/embed/kernel/manifest.json @@ -1,7 +1,10 @@ { - "id": "embed", + "id": "embed-kernel", "type": "lib", "description": "Embed utility library", "requires": [ + ], + "provides": [ + "embed" ] } \ No newline at end of file diff --git a/src/libs/embed/kernel/mem.c b/src/libs/embed/kernel/mem.c index 741d8561e..4c605854b 100644 --- a/src/libs/embed/kernel/mem.c +++ b/src/libs/embed/kernel/mem.c @@ -1,8 +1,9 @@ -#include -#include +#include +#include #include +#include -"kernel/core/heap.h" +#include "kernel/core/heap.h" static Lock _lock; diff --git a/src/libs/embed/kernel/sync.c b/src/libs/embed/kernel/sync.c index de201fa7f..c1ffd94bb 100644 --- a/src/libs/embed/kernel/sync.c +++ b/src/libs/embed/kernel/sync.c @@ -1,4 +1,4 @@ -"kernel/core/cpu.h" +#include "kernel/core/cpu.h" void embed_sync_enter(void) { cpu_retain_interrupts(); } diff --git a/src/libs/handover/builder.c b/src/libs/handover/builder.c index b3583a9b4..8fb588b25 100644 --- a/src/libs/handover/builder.c +++ b/src/libs/handover/builder.c @@ -1,5 +1,6 @@ #include -#include +#include +#include void handover_builder_init(Ho2Builder *self, Alloc *alloc) { diff --git a/src/libs/handover/builder.h b/src/libs/handover/builder.h index 5ecdbfa3f..57db6daf3 100644 --- a/src/libs/handover/builder.h +++ b/src/libs/handover/builder.h @@ -1,8 +1,8 @@ #pragma once #include -#include -#include +#include +#include typedef struct { diff --git a/src/libs/handover/handover.c b/src/libs/handover/handover.c index 80a306f03..e438655c3 100644 --- a/src/libs/handover/handover.c +++ b/src/libs/handover/handover.c @@ -1,6 +1,6 @@ #include -#include -#include +#include +#include void handover_mmap_append(HandoverMmap *self, HandoverMmapEntry entry) { diff --git a/src/libs/handover/manifest.json b/src/libs/handover/manifest.json new file mode 100644 index 000000000..20cb107aa --- /dev/null +++ b/src/libs/handover/manifest.json @@ -0,0 +1,11 @@ +{ + "id": "handover", + "type": "lib", + "requires" : [ + "brutal-debug", + "brutal-mem", + "brutal-ds", + "brutal-io" + + ] +} \ No newline at end of file diff --git a/src/libs/hw/acpi/base.c b/src/libs/hw/acpi/base.c index 159d4f42e..148e297a7 100644 --- a/src/libs/hw/acpi/base.c +++ b/src/libs/hw/acpi/base.c @@ -1,6 +1,6 @@ #include #include -#include +#include #ifdef __kernel__ diff --git a/src/libs/hw/acpi/manifest.json b/src/libs/hw/acpi/manifest.json new file mode 100644 index 000000000..5c86ea397 --- /dev/null +++ b/src/libs/hw/acpi/manifest.json @@ -0,0 +1,8 @@ +{ + "id": "acpi", + "type": "lib", + "description": "Hardware ACPI utility library", + "requires": [ + "brutal-debug" + ] +} \ No newline at end of file diff --git a/src/libs/hw/acpi/rsdt.c b/src/libs/hw/acpi/rsdt.c index 0d929245f..d4827c842 100644 --- a/src/libs/hw/acpi/rsdt.c +++ b/src/libs/hw/acpi/rsdt.c @@ -1,5 +1,5 @@ #include -#include +#include Iter acpi_rsdt_iterate( Acpi *acpi, diff --git a/src/libs/hw/efi/lib.c b/src/libs/hw/efi/lib.c index ab233317d..722a81995 100644 --- a/src/libs/hw/efi/lib.c +++ b/src/libs/hw/efi/lib.c @@ -1,7 +1,7 @@ #include -#include -#include -#include +#include +#include +#include static bool _init = false; static EFIHandle _handle; diff --git a/src/libs/hw/efi/manifest.json b/src/libs/hw/efi/manifest.json new file mode 100644 index 000000000..e235dc7d7 --- /dev/null +++ b/src/libs/hw/efi/manifest.json @@ -0,0 +1,9 @@ +{ + "id": "efi", + "description": "UEFI interaction library", + "type": "lib", + "requires": [ + "brutal-debug", + "brutal-alloc" + ] +} \ No newline at end of file diff --git a/src/libs/hw/efi/protos/stop.h b/src/libs/hw/efi/protos/stop.h index 90a4412bd..746354f8d 100644 --- a/src/libs/hw/efi/protos/stop.h +++ b/src/libs/hw/efi/protos/stop.h @@ -1,6 +1,9 @@ #pragma once #include +#include +#include + #define EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_GUID \ { \ diff --git a/src/libs/hw/efi/types.h b/src/libs/hw/efi/types.h index 9ecd38d0a..ee74bb631 100644 --- a/src/libs/hw/efi/types.h +++ b/src/libs/hw/efi/types.h @@ -1,7 +1,10 @@ #pragma once #include -#include +#include +#include +#include + typedef struct { diff --git a/src/libs/ipc/component.c b/src/libs/ipc/component.c index 5063a9350..b724811fa 100644 --- a/src/libs/ipc/component.c +++ b/src/libs/ipc/component.c @@ -1,6 +1,6 @@ #include #include -#include +#include typedef struct { diff --git a/src/libs/ipc/component.h b/src/libs/ipc/component.h index e165098ed..658bb56d3 100644 --- a/src/libs/ipc/component.h +++ b/src/libs/ipc/component.h @@ -4,8 +4,8 @@ #include #include #include -#include -#include +#include +#include typedef struct _IpcPending IpcPending; typedef struct _IpcComponent IpcComponent; diff --git a/src/libs/ipc/hooks.c b/src/libs/ipc/hooks.c index 2e87a49dc..50d5c186a 100644 --- a/src/libs/ipc/hooks.c +++ b/src/libs/ipc/hooks.c @@ -1,8 +1,8 @@ #include #include #include -#include -#include +#include +#include int ipc_hook_call( IpcComponent *component, diff --git a/src/libs/ipc/interface.h b/src/libs/ipc/interface.h index 9d80bf153..1286137e0 100644 --- a/src/libs/ipc/interface.h +++ b/src/libs/ipc/interface.h @@ -1,7 +1,6 @@ #pragma once #include -#include Str ipc_interface_str(IpcProto proto); diff --git a/src/libs/ipc/manifest.json b/src/libs/ipc/manifest.json new file mode 100644 index 000000000..47d4a8539 --- /dev/null +++ b/src/libs/ipc/manifest.json @@ -0,0 +1,12 @@ +{ + "id": "ipc", + "type": "lib", + "description": "Brutal inter-process-communication library", + "requires": [ + "brutal-ds", + "brutal-fibers", + "brutal-debug", + "brutal-alloc", + "brutal-mem" + ] +} \ No newline at end of file diff --git a/src/libs/ipc/pack.c b/src/libs/ipc/pack.c index 0d89d401b..8e655008a 100644 --- a/src/libs/ipc/pack.c +++ b/src/libs/ipc/pack.c @@ -1,6 +1,8 @@ #include -#include -#include +#include +#include +#include +#include void ipc_pack_init(IpcPack *self) { @@ -36,7 +38,6 @@ void ipc_pack_ensure(IpcPack *self, size_t cap) }; assert_br_success(br_create(&memory)); - BrMapArgs memmap = { .space = BR_HANDLE_SELF, .memory = memory.handle, diff --git a/src/libs/ipc/unpack.c b/src/libs/ipc/unpack.c index d314f7be5..273c78599 100644 --- a/src/libs/ipc/unpack.c +++ b/src/libs/ipc/unpack.c @@ -1,5 +1,6 @@ #include -#include +#include +#include void ipc_unpack_init(IpcUnpack *self, void *buf, size_t len, Alloc *alloc) { diff --git a/src/libs/json/emit.c b/src/libs/json/emit.c index bce54933a..b5295b4b9 100644 --- a/src/libs/json/emit.c +++ b/src/libs/json/emit.c @@ -1,4 +1,4 @@ -#include +#include #include void json_emit_string(Str str, Emit *emit) diff --git a/src/libs/json/emit.h b/src/libs/json/emit.h index 2fc86ed3b..84392b6b9 100644 --- a/src/libs/json/emit.h +++ b/src/libs/json/emit.h @@ -1,6 +1,6 @@ #pragma once #include -#include +#include void json_emit(Json const json, Emit *emit); diff --git a/src/libs/json/manifest.json b/src/libs/json/manifest.json new file mode 100644 index 000000000..bcbc73bb1 --- /dev/null +++ b/src/libs/json/manifest.json @@ -0,0 +1,11 @@ +{ + "id": "json", + "type": "lib", + "description": "JSON writing and reading utility library", + "requires": [ + "brutal-ds", + "brutal-debug", + "brutal-parse", + "brutal-io" + ] +} \ No newline at end of file diff --git a/src/libs/json/objects.c b/src/libs/json/objects.c index 16b45005d..570f174a5 100644 --- a/src/libs/json/objects.c +++ b/src/libs/json/objects.c @@ -1,5 +1,5 @@ #include -#include +#include bool json_is(Json const json, JsonType type) { diff --git a/src/libs/json/objects.h b/src/libs/json/objects.h index 5b4cc2111..8029b5287 100644 --- a/src/libs/json/objects.h +++ b/src/libs/json/objects.h @@ -1,6 +1,8 @@ #pragma once -#include +#include +#include + typedef enum { diff --git a/src/libs/json/parser.c b/src/libs/json/parser.c index 9a242bdd7..474a2fbf6 100644 --- a/src/libs/json/parser.c +++ b/src/libs/json/parser.c @@ -1,6 +1,8 @@ #include -#include -#include +#include +#include +#include +#include static bool json_skip_comment(Scan *scan) { diff --git a/src/libs/json/parser.h b/src/libs/json/parser.h index 25ad167df..7c85ba5e2 100644 --- a/src/libs/json/parser.h +++ b/src/libs/json/parser.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include Json json_parse_array(Scan *scan, Alloc *alloc); diff --git a/src/libs/stdc-math/__cos.c b/src/libs/libc-math/__cos.c similarity index 100% rename from src/libs/stdc-math/__cos.c rename to src/libs/libc-math/__cos.c diff --git a/src/libs/stdc-math/__cosdf.c b/src/libs/libc-math/__cosdf.c similarity index 100% rename from src/libs/stdc-math/__cosdf.c rename to src/libs/libc-math/__cosdf.c diff --git a/src/libs/stdc-math/__cosl.c b/src/libs/libc-math/__cosl.c similarity index 100% rename from src/libs/stdc-math/__cosl.c rename to src/libs/libc-math/__cosl.c diff --git a/src/libs/stdc-math/__expo2.c b/src/libs/libc-math/__expo2.c similarity index 100% rename from src/libs/stdc-math/__expo2.c rename to src/libs/libc-math/__expo2.c diff --git a/src/libs/stdc-math/__expo2f.c b/src/libs/libc-math/__expo2f.c similarity index 100% rename from src/libs/stdc-math/__expo2f.c rename to src/libs/libc-math/__expo2f.c diff --git a/src/libs/stdc-math/__fpclassify.c b/src/libs/libc-math/__fpclassify.c similarity index 100% rename from src/libs/stdc-math/__fpclassify.c rename to src/libs/libc-math/__fpclassify.c diff --git a/src/libs/stdc-math/__fpclassifyf.c b/src/libs/libc-math/__fpclassifyf.c similarity index 100% rename from src/libs/stdc-math/__fpclassifyf.c rename to src/libs/libc-math/__fpclassifyf.c diff --git a/src/libs/stdc-math/__fpclassifyl.c b/src/libs/libc-math/__fpclassifyl.c similarity index 100% rename from src/libs/stdc-math/__fpclassifyl.c rename to src/libs/libc-math/__fpclassifyl.c diff --git a/src/libs/stdc-math/__invtrigl.c b/src/libs/libc-math/__invtrigl.c similarity index 100% rename from src/libs/stdc-math/__invtrigl.c rename to src/libs/libc-math/__invtrigl.c diff --git a/src/libs/stdc-math/__invtrigl.h b/src/libs/libc-math/__invtrigl.h similarity index 100% rename from src/libs/stdc-math/__invtrigl.h rename to src/libs/libc-math/__invtrigl.h diff --git a/src/libs/stdc-math/__polevll.c b/src/libs/libc-math/__polevll.c similarity index 100% rename from src/libs/stdc-math/__polevll.c rename to src/libs/libc-math/__polevll.c diff --git a/src/libs/stdc-math/__rem_pio2.c b/src/libs/libc-math/__rem_pio2.c similarity index 100% rename from src/libs/stdc-math/__rem_pio2.c rename to src/libs/libc-math/__rem_pio2.c diff --git a/src/libs/stdc-math/__rem_pio2_large.c b/src/libs/libc-math/__rem_pio2_large.c similarity index 100% rename from src/libs/stdc-math/__rem_pio2_large.c rename to src/libs/libc-math/__rem_pio2_large.c diff --git a/src/libs/stdc-math/__rem_pio2f.c b/src/libs/libc-math/__rem_pio2f.c similarity index 100% rename from src/libs/stdc-math/__rem_pio2f.c rename to src/libs/libc-math/__rem_pio2f.c diff --git a/src/libs/stdc-math/__rem_pio2l.c b/src/libs/libc-math/__rem_pio2l.c similarity index 100% rename from src/libs/stdc-math/__rem_pio2l.c rename to src/libs/libc-math/__rem_pio2l.c diff --git a/src/libs/stdc-math/__signbit.c b/src/libs/libc-math/__signbit.c similarity index 100% rename from src/libs/stdc-math/__signbit.c rename to src/libs/libc-math/__signbit.c diff --git a/src/libs/stdc-math/__signbitf.c b/src/libs/libc-math/__signbitf.c similarity index 100% rename from src/libs/stdc-math/__signbitf.c rename to src/libs/libc-math/__signbitf.c diff --git a/src/libs/stdc-math/__signbitl.c b/src/libs/libc-math/__signbitl.c similarity index 100% rename from src/libs/stdc-math/__signbitl.c rename to src/libs/libc-math/__signbitl.c diff --git a/src/libs/stdc-math/__sin.c b/src/libs/libc-math/__sin.c similarity index 100% rename from src/libs/stdc-math/__sin.c rename to src/libs/libc-math/__sin.c diff --git a/src/libs/stdc-math/__sindf.c b/src/libs/libc-math/__sindf.c similarity index 100% rename from src/libs/stdc-math/__sindf.c rename to src/libs/libc-math/__sindf.c diff --git a/src/libs/stdc-math/__sinl.c b/src/libs/libc-math/__sinl.c similarity index 100% rename from src/libs/stdc-math/__sinl.c rename to src/libs/libc-math/__sinl.c diff --git a/src/libs/stdc-math/__tan.c b/src/libs/libc-math/__tan.c similarity index 100% rename from src/libs/stdc-math/__tan.c rename to src/libs/libc-math/__tan.c diff --git a/src/libs/stdc-math/__tandf.c b/src/libs/libc-math/__tandf.c similarity index 100% rename from src/libs/stdc-math/__tandf.c rename to src/libs/libc-math/__tandf.c diff --git a/src/libs/stdc-math/__tanl.c b/src/libs/libc-math/__tanl.c similarity index 100% rename from src/libs/stdc-math/__tanl.c rename to src/libs/libc-math/__tanl.c diff --git a/src/libs/stdc-math/acos.c b/src/libs/libc-math/acos.c similarity index 100% rename from src/libs/stdc-math/acos.c rename to src/libs/libc-math/acos.c diff --git a/src/libs/stdc-math/acosf.c b/src/libs/libc-math/acosf.c similarity index 100% rename from src/libs/stdc-math/acosf.c rename to src/libs/libc-math/acosf.c diff --git a/src/libs/stdc-math/acosh.c b/src/libs/libc-math/acosh.c similarity index 100% rename from src/libs/stdc-math/acosh.c rename to src/libs/libc-math/acosh.c diff --git a/src/libs/stdc-math/acoshf.c b/src/libs/libc-math/acoshf.c similarity index 100% rename from src/libs/stdc-math/acoshf.c rename to src/libs/libc-math/acoshf.c diff --git a/src/libs/stdc-math/acoshl.c b/src/libs/libc-math/acoshl.c similarity index 100% rename from src/libs/stdc-math/acoshl.c rename to src/libs/libc-math/acoshl.c diff --git a/src/libs/stdc-math/acosl.c b/src/libs/libc-math/acosl.c similarity index 100% rename from src/libs/stdc-math/acosl.c rename to src/libs/libc-math/acosl.c diff --git a/src/libs/stdc-math/asin.c b/src/libs/libc-math/asin.c similarity index 100% rename from src/libs/stdc-math/asin.c rename to src/libs/libc-math/asin.c diff --git a/src/libs/stdc-math/asinf.c b/src/libs/libc-math/asinf.c similarity index 100% rename from src/libs/stdc-math/asinf.c rename to src/libs/libc-math/asinf.c diff --git a/src/libs/stdc-math/asinh.c b/src/libs/libc-math/asinh.c similarity index 100% rename from src/libs/stdc-math/asinh.c rename to src/libs/libc-math/asinh.c diff --git a/src/libs/stdc-math/asinhf.c b/src/libs/libc-math/asinhf.c similarity index 100% rename from src/libs/stdc-math/asinhf.c rename to src/libs/libc-math/asinhf.c diff --git a/src/libs/stdc-math/asinhl.c b/src/libs/libc-math/asinhl.c similarity index 100% rename from src/libs/stdc-math/asinhl.c rename to src/libs/libc-math/asinhl.c diff --git a/src/libs/stdc-math/asinl.c b/src/libs/libc-math/asinl.c similarity index 100% rename from src/libs/stdc-math/asinl.c rename to src/libs/libc-math/asinl.c diff --git a/src/libs/stdc-math/atan.c b/src/libs/libc-math/atan.c similarity index 100% rename from src/libs/stdc-math/atan.c rename to src/libs/libc-math/atan.c diff --git a/src/libs/stdc-math/atan2.c b/src/libs/libc-math/atan2.c similarity index 100% rename from src/libs/stdc-math/atan2.c rename to src/libs/libc-math/atan2.c diff --git a/src/libs/stdc-math/atan2f.c b/src/libs/libc-math/atan2f.c similarity index 100% rename from src/libs/stdc-math/atan2f.c rename to src/libs/libc-math/atan2f.c diff --git a/src/libs/stdc-math/atan2l.c b/src/libs/libc-math/atan2l.c similarity index 100% rename from src/libs/stdc-math/atan2l.c rename to src/libs/libc-math/atan2l.c diff --git a/src/libs/stdc-math/atanf.c b/src/libs/libc-math/atanf.c similarity index 100% rename from src/libs/stdc-math/atanf.c rename to src/libs/libc-math/atanf.c diff --git a/src/libs/stdc-math/atanh.c b/src/libs/libc-math/atanh.c similarity index 100% rename from src/libs/stdc-math/atanh.c rename to src/libs/libc-math/atanh.c diff --git a/src/libs/stdc-math/atanhf.c b/src/libs/libc-math/atanhf.c similarity index 100% rename from src/libs/stdc-math/atanhf.c rename to src/libs/libc-math/atanhf.c diff --git a/src/libs/stdc-math/atanhl.c b/src/libs/libc-math/atanhl.c similarity index 100% rename from src/libs/stdc-math/atanhl.c rename to src/libs/libc-math/atanhl.c diff --git a/src/libs/stdc-math/atanl.c b/src/libs/libc-math/atanl.c similarity index 100% rename from src/libs/stdc-math/atanl.c rename to src/libs/libc-math/atanl.c diff --git a/src/libs/stdc-math/cbrt.c b/src/libs/libc-math/cbrt.c similarity index 100% rename from src/libs/stdc-math/cbrt.c rename to src/libs/libc-math/cbrt.c diff --git a/src/libs/stdc-math/cbrtf.c b/src/libs/libc-math/cbrtf.c similarity index 100% rename from src/libs/stdc-math/cbrtf.c rename to src/libs/libc-math/cbrtf.c diff --git a/src/libs/stdc-math/cbrtl.c b/src/libs/libc-math/cbrtl.c similarity index 100% rename from src/libs/stdc-math/cbrtl.c rename to src/libs/libc-math/cbrtl.c diff --git a/src/libs/stdc-math/ceil.c b/src/libs/libc-math/ceil.c similarity index 100% rename from src/libs/stdc-math/ceil.c rename to src/libs/libc-math/ceil.c diff --git a/src/libs/stdc-math/ceilf.c b/src/libs/libc-math/ceilf.c similarity index 100% rename from src/libs/stdc-math/ceilf.c rename to src/libs/libc-math/ceilf.c diff --git a/src/libs/stdc-math/ceill.c b/src/libs/libc-math/ceill.c similarity index 100% rename from src/libs/stdc-math/ceill.c rename to src/libs/libc-math/ceill.c diff --git a/src/libs/stdc-math/copysign.c b/src/libs/libc-math/copysign.c similarity index 100% rename from src/libs/stdc-math/copysign.c rename to src/libs/libc-math/copysign.c diff --git a/src/libs/stdc-math/copysignf.c b/src/libs/libc-math/copysignf.c similarity index 100% rename from src/libs/stdc-math/copysignf.c rename to src/libs/libc-math/copysignf.c diff --git a/src/libs/stdc-math/copysignl.c b/src/libs/libc-math/copysignl.c similarity index 100% rename from src/libs/stdc-math/copysignl.c rename to src/libs/libc-math/copysignl.c diff --git a/src/libs/stdc-math/cos.c b/src/libs/libc-math/cos.c similarity index 100% rename from src/libs/stdc-math/cos.c rename to src/libs/libc-math/cos.c diff --git a/src/libs/stdc-math/cosf.c b/src/libs/libc-math/cosf.c similarity index 100% rename from src/libs/stdc-math/cosf.c rename to src/libs/libc-math/cosf.c diff --git a/src/libs/stdc-math/cosh.c b/src/libs/libc-math/cosh.c similarity index 100% rename from src/libs/stdc-math/cosh.c rename to src/libs/libc-math/cosh.c diff --git a/src/libs/stdc-math/coshf.c b/src/libs/libc-math/coshf.c similarity index 100% rename from src/libs/stdc-math/coshf.c rename to src/libs/libc-math/coshf.c diff --git a/src/libs/stdc-math/coshl.c b/src/libs/libc-math/coshl.c similarity index 100% rename from src/libs/stdc-math/coshl.c rename to src/libs/libc-math/coshl.c diff --git a/src/libs/stdc-math/cosl.c b/src/libs/libc-math/cosl.c similarity index 100% rename from src/libs/stdc-math/cosl.c rename to src/libs/libc-math/cosl.c diff --git a/src/libs/stdc-math/erf.c b/src/libs/libc-math/erf.c similarity index 100% rename from src/libs/stdc-math/erf.c rename to src/libs/libc-math/erf.c diff --git a/src/libs/stdc-math/erff.c b/src/libs/libc-math/erff.c similarity index 100% rename from src/libs/stdc-math/erff.c rename to src/libs/libc-math/erff.c diff --git a/src/libs/stdc-math/erfl.c b/src/libs/libc-math/erfl.c similarity index 100% rename from src/libs/stdc-math/erfl.c rename to src/libs/libc-math/erfl.c diff --git a/src/libs/stdc-math/exp.c b/src/libs/libc-math/exp.c similarity index 100% rename from src/libs/stdc-math/exp.c rename to src/libs/libc-math/exp.c diff --git a/src/libs/stdc-math/exp10.c b/src/libs/libc-math/exp10.c similarity index 100% rename from src/libs/stdc-math/exp10.c rename to src/libs/libc-math/exp10.c diff --git a/src/libs/stdc-math/exp10f.c b/src/libs/libc-math/exp10f.c similarity index 100% rename from src/libs/stdc-math/exp10f.c rename to src/libs/libc-math/exp10f.c diff --git a/src/libs/stdc-math/exp10l.c b/src/libs/libc-math/exp10l.c similarity index 100% rename from src/libs/stdc-math/exp10l.c rename to src/libs/libc-math/exp10l.c diff --git a/src/libs/stdc-math/exp2.c b/src/libs/libc-math/exp2.c similarity index 100% rename from src/libs/stdc-math/exp2.c rename to src/libs/libc-math/exp2.c diff --git a/src/libs/stdc-math/exp2f.c b/src/libs/libc-math/exp2f.c similarity index 100% rename from src/libs/stdc-math/exp2f.c rename to src/libs/libc-math/exp2f.c diff --git a/src/libs/stdc-math/exp2l.c b/src/libs/libc-math/exp2l.c similarity index 100% rename from src/libs/stdc-math/exp2l.c rename to src/libs/libc-math/exp2l.c diff --git a/src/libs/stdc-math/expf.c b/src/libs/libc-math/expf.c similarity index 100% rename from src/libs/stdc-math/expf.c rename to src/libs/libc-math/expf.c diff --git a/src/libs/stdc-math/expl.c b/src/libs/libc-math/expl.c similarity index 100% rename from src/libs/stdc-math/expl.c rename to src/libs/libc-math/expl.c diff --git a/src/libs/stdc-math/expm1.c b/src/libs/libc-math/expm1.c similarity index 100% rename from src/libs/stdc-math/expm1.c rename to src/libs/libc-math/expm1.c diff --git a/src/libs/stdc-math/expm1f.c b/src/libs/libc-math/expm1f.c similarity index 100% rename from src/libs/stdc-math/expm1f.c rename to src/libs/libc-math/expm1f.c diff --git a/src/libs/stdc-math/expm1l.c b/src/libs/libc-math/expm1l.c similarity index 100% rename from src/libs/stdc-math/expm1l.c rename to src/libs/libc-math/expm1l.c diff --git a/src/libs/stdc-math/fabs.c b/src/libs/libc-math/fabs.c similarity index 100% rename from src/libs/stdc-math/fabs.c rename to src/libs/libc-math/fabs.c diff --git a/src/libs/stdc-math/fabsf.c b/src/libs/libc-math/fabsf.c similarity index 100% rename from src/libs/stdc-math/fabsf.c rename to src/libs/libc-math/fabsf.c diff --git a/src/libs/stdc-math/fabsl.c b/src/libs/libc-math/fabsl.c similarity index 100% rename from src/libs/stdc-math/fabsl.c rename to src/libs/libc-math/fabsl.c diff --git a/src/libs/stdc-math/fdim.c b/src/libs/libc-math/fdim.c similarity index 100% rename from src/libs/stdc-math/fdim.c rename to src/libs/libc-math/fdim.c diff --git a/src/libs/stdc-math/fdimf.c b/src/libs/libc-math/fdimf.c similarity index 100% rename from src/libs/stdc-math/fdimf.c rename to src/libs/libc-math/fdimf.c diff --git a/src/libs/stdc-math/fdiml.c b/src/libs/libc-math/fdiml.c similarity index 100% rename from src/libs/stdc-math/fdiml.c rename to src/libs/libc-math/fdiml.c diff --git a/src/libs/stdc-math/finite.c b/src/libs/libc-math/finite.c similarity index 100% rename from src/libs/stdc-math/finite.c rename to src/libs/libc-math/finite.c diff --git a/src/libs/stdc-math/finitef.c b/src/libs/libc-math/finitef.c similarity index 100% rename from src/libs/stdc-math/finitef.c rename to src/libs/libc-math/finitef.c diff --git a/src/libs/stdc-math/floor.c b/src/libs/libc-math/floor.c similarity index 100% rename from src/libs/stdc-math/floor.c rename to src/libs/libc-math/floor.c diff --git a/src/libs/stdc-math/floorf.c b/src/libs/libc-math/floorf.c similarity index 100% rename from src/libs/stdc-math/floorf.c rename to src/libs/libc-math/floorf.c diff --git a/src/libs/stdc-math/floorl.c b/src/libs/libc-math/floorl.c similarity index 100% rename from src/libs/stdc-math/floorl.c rename to src/libs/libc-math/floorl.c diff --git a/src/libs/stdc-math/fma.c b/src/libs/libc-math/fma.c similarity index 100% rename from src/libs/stdc-math/fma.c rename to src/libs/libc-math/fma.c diff --git a/src/libs/stdc-math/fmaf.c b/src/libs/libc-math/fmaf.c similarity index 100% rename from src/libs/stdc-math/fmaf.c rename to src/libs/libc-math/fmaf.c diff --git a/src/libs/stdc-math/fmal.c b/src/libs/libc-math/fmal.c similarity index 100% rename from src/libs/stdc-math/fmal.c rename to src/libs/libc-math/fmal.c diff --git a/src/libs/stdc-math/fmax.c b/src/libs/libc-math/fmax.c similarity index 100% rename from src/libs/stdc-math/fmax.c rename to src/libs/libc-math/fmax.c diff --git a/src/libs/stdc-math/fmaxf.c b/src/libs/libc-math/fmaxf.c similarity index 100% rename from src/libs/stdc-math/fmaxf.c rename to src/libs/libc-math/fmaxf.c diff --git a/src/libs/stdc-math/fmaxl.c b/src/libs/libc-math/fmaxl.c similarity index 100% rename from src/libs/stdc-math/fmaxl.c rename to src/libs/libc-math/fmaxl.c diff --git a/src/libs/stdc-math/fmin.c b/src/libs/libc-math/fmin.c similarity index 100% rename from src/libs/stdc-math/fmin.c rename to src/libs/libc-math/fmin.c diff --git a/src/libs/stdc-math/fminf.c b/src/libs/libc-math/fminf.c similarity index 100% rename from src/libs/stdc-math/fminf.c rename to src/libs/libc-math/fminf.c diff --git a/src/libs/stdc-math/fminl.c b/src/libs/libc-math/fminl.c similarity index 100% rename from src/libs/stdc-math/fminl.c rename to src/libs/libc-math/fminl.c diff --git a/src/libs/stdc-math/fmod.c b/src/libs/libc-math/fmod.c similarity index 100% rename from src/libs/stdc-math/fmod.c rename to src/libs/libc-math/fmod.c diff --git a/src/libs/stdc-math/fmodf.c b/src/libs/libc-math/fmodf.c similarity index 100% rename from src/libs/stdc-math/fmodf.c rename to src/libs/libc-math/fmodf.c diff --git a/src/libs/stdc-math/fmodl.c b/src/libs/libc-math/fmodl.c similarity index 100% rename from src/libs/stdc-math/fmodl.c rename to src/libs/libc-math/fmodl.c diff --git a/src/libs/stdc-math/frexp.c b/src/libs/libc-math/frexp.c similarity index 100% rename from src/libs/stdc-math/frexp.c rename to src/libs/libc-math/frexp.c diff --git a/src/libs/stdc-math/frexpf.c b/src/libs/libc-math/frexpf.c similarity index 100% rename from src/libs/stdc-math/frexpf.c rename to src/libs/libc-math/frexpf.c diff --git a/src/libs/stdc-math/frexpl.c b/src/libs/libc-math/frexpl.c similarity index 100% rename from src/libs/stdc-math/frexpl.c rename to src/libs/libc-math/frexpl.c diff --git a/src/libs/stdc-math/hypot.c b/src/libs/libc-math/hypot.c similarity index 100% rename from src/libs/stdc-math/hypot.c rename to src/libs/libc-math/hypot.c diff --git a/src/libs/stdc-math/hypotf.c b/src/libs/libc-math/hypotf.c similarity index 100% rename from src/libs/stdc-math/hypotf.c rename to src/libs/libc-math/hypotf.c diff --git a/src/libs/stdc-math/hypotl.c b/src/libs/libc-math/hypotl.c similarity index 100% rename from src/libs/stdc-math/hypotl.c rename to src/libs/libc-math/hypotl.c diff --git a/src/libs/stdc-math/ilogb.c b/src/libs/libc-math/ilogb.c similarity index 100% rename from src/libs/stdc-math/ilogb.c rename to src/libs/libc-math/ilogb.c diff --git a/src/libs/stdc-math/ilogbf.c b/src/libs/libc-math/ilogbf.c similarity index 100% rename from src/libs/stdc-math/ilogbf.c rename to src/libs/libc-math/ilogbf.c diff --git a/src/libs/stdc-math/ilogbl.c b/src/libs/libc-math/ilogbl.c similarity index 100% rename from src/libs/stdc-math/ilogbl.c rename to src/libs/libc-math/ilogbl.c diff --git a/src/libs/stdc-math/j0.c b/src/libs/libc-math/j0.c similarity index 100% rename from src/libs/stdc-math/j0.c rename to src/libs/libc-math/j0.c diff --git a/src/libs/stdc-math/j0f.c b/src/libs/libc-math/j0f.c similarity index 100% rename from src/libs/stdc-math/j0f.c rename to src/libs/libc-math/j0f.c diff --git a/src/libs/stdc-math/j1.c b/src/libs/libc-math/j1.c similarity index 100% rename from src/libs/stdc-math/j1.c rename to src/libs/libc-math/j1.c diff --git a/src/libs/stdc-math/j1f.c b/src/libs/libc-math/j1f.c similarity index 100% rename from src/libs/stdc-math/j1f.c rename to src/libs/libc-math/j1f.c diff --git a/src/libs/stdc-math/jn.c b/src/libs/libc-math/jn.c similarity index 100% rename from src/libs/stdc-math/jn.c rename to src/libs/libc-math/jn.c diff --git a/src/libs/stdc-math/jnf.c b/src/libs/libc-math/jnf.c similarity index 100% rename from src/libs/stdc-math/jnf.c rename to src/libs/libc-math/jnf.c diff --git a/src/libs/stdc-math/ldexp.c b/src/libs/libc-math/ldexp.c similarity index 100% rename from src/libs/stdc-math/ldexp.c rename to src/libs/libc-math/ldexp.c diff --git a/src/libs/stdc-math/ldexpf.c b/src/libs/libc-math/ldexpf.c similarity index 100% rename from src/libs/stdc-math/ldexpf.c rename to src/libs/libc-math/ldexpf.c diff --git a/src/libs/stdc-math/ldexpl.c b/src/libs/libc-math/ldexpl.c similarity index 100% rename from src/libs/stdc-math/ldexpl.c rename to src/libs/libc-math/ldexpl.c diff --git a/src/libs/stdc-math/lgamma.c b/src/libs/libc-math/lgamma.c similarity index 100% rename from src/libs/stdc-math/lgamma.c rename to src/libs/libc-math/lgamma.c diff --git a/src/libs/stdc-math/lgamma_r.c b/src/libs/libc-math/lgamma_r.c similarity index 100% rename from src/libs/stdc-math/lgamma_r.c rename to src/libs/libc-math/lgamma_r.c diff --git a/src/libs/stdc-math/lgammaf.c b/src/libs/libc-math/lgammaf.c similarity index 100% rename from src/libs/stdc-math/lgammaf.c rename to src/libs/libc-math/lgammaf.c diff --git a/src/libs/stdc-math/lgammaf_r.c b/src/libs/libc-math/lgammaf_r.c similarity index 100% rename from src/libs/stdc-math/lgammaf_r.c rename to src/libs/libc-math/lgammaf_r.c diff --git a/src/libs/stdc-math/lgammal.c b/src/libs/libc-math/lgammal.c similarity index 100% rename from src/libs/stdc-math/lgammal.c rename to src/libs/libc-math/lgammal.c diff --git a/src/libs/stdc-math/libm.h b/src/libs/libc-math/libm.h similarity index 100% rename from src/libs/stdc-math/libm.h rename to src/libs/libc-math/libm.h diff --git a/src/libs/stdc-math/llrint.c b/src/libs/libc-math/llrint.c similarity index 100% rename from src/libs/stdc-math/llrint.c rename to src/libs/libc-math/llrint.c diff --git a/src/libs/stdc-math/llrintf.c b/src/libs/libc-math/llrintf.c similarity index 100% rename from src/libs/stdc-math/llrintf.c rename to src/libs/libc-math/llrintf.c diff --git a/src/libs/stdc-math/llrintl.c b/src/libs/libc-math/llrintl.c similarity index 100% rename from src/libs/stdc-math/llrintl.c rename to src/libs/libc-math/llrintl.c diff --git a/src/libs/stdc-math/llround.c b/src/libs/libc-math/llround.c similarity index 100% rename from src/libs/stdc-math/llround.c rename to src/libs/libc-math/llround.c diff --git a/src/libs/stdc-math/llroundf.c b/src/libs/libc-math/llroundf.c similarity index 100% rename from src/libs/stdc-math/llroundf.c rename to src/libs/libc-math/llroundf.c diff --git a/src/libs/stdc-math/llroundl.c b/src/libs/libc-math/llroundl.c similarity index 100% rename from src/libs/stdc-math/llroundl.c rename to src/libs/libc-math/llroundl.c diff --git a/src/libs/stdc-math/log.c b/src/libs/libc-math/log.c similarity index 100% rename from src/libs/stdc-math/log.c rename to src/libs/libc-math/log.c diff --git a/src/libs/stdc-math/log10.c b/src/libs/libc-math/log10.c similarity index 100% rename from src/libs/stdc-math/log10.c rename to src/libs/libc-math/log10.c diff --git a/src/libs/stdc-math/log10f.c b/src/libs/libc-math/log10f.c similarity index 100% rename from src/libs/stdc-math/log10f.c rename to src/libs/libc-math/log10f.c diff --git a/src/libs/stdc-math/log10l.c b/src/libs/libc-math/log10l.c similarity index 100% rename from src/libs/stdc-math/log10l.c rename to src/libs/libc-math/log10l.c diff --git a/src/libs/stdc-math/log1p.c b/src/libs/libc-math/log1p.c similarity index 100% rename from src/libs/stdc-math/log1p.c rename to src/libs/libc-math/log1p.c diff --git a/src/libs/stdc-math/log1pf.c b/src/libs/libc-math/log1pf.c similarity index 100% rename from src/libs/stdc-math/log1pf.c rename to src/libs/libc-math/log1pf.c diff --git a/src/libs/stdc-math/log1pl.c b/src/libs/libc-math/log1pl.c similarity index 100% rename from src/libs/stdc-math/log1pl.c rename to src/libs/libc-math/log1pl.c diff --git a/src/libs/stdc-math/log2.c b/src/libs/libc-math/log2.c similarity index 100% rename from src/libs/stdc-math/log2.c rename to src/libs/libc-math/log2.c diff --git a/src/libs/stdc-math/log2f.c b/src/libs/libc-math/log2f.c similarity index 100% rename from src/libs/stdc-math/log2f.c rename to src/libs/libc-math/log2f.c diff --git a/src/libs/stdc-math/log2l.c b/src/libs/libc-math/log2l.c similarity index 100% rename from src/libs/stdc-math/log2l.c rename to src/libs/libc-math/log2l.c diff --git a/src/libs/stdc-math/logb.c b/src/libs/libc-math/logb.c similarity index 100% rename from src/libs/stdc-math/logb.c rename to src/libs/libc-math/logb.c diff --git a/src/libs/stdc-math/logbf.c b/src/libs/libc-math/logbf.c similarity index 100% rename from src/libs/stdc-math/logbf.c rename to src/libs/libc-math/logbf.c diff --git a/src/libs/stdc-math/logbl.c b/src/libs/libc-math/logbl.c similarity index 100% rename from src/libs/stdc-math/logbl.c rename to src/libs/libc-math/logbl.c diff --git a/src/libs/stdc-math/logf.c b/src/libs/libc-math/logf.c similarity index 100% rename from src/libs/stdc-math/logf.c rename to src/libs/libc-math/logf.c diff --git a/src/libs/stdc-math/logl.c b/src/libs/libc-math/logl.c similarity index 100% rename from src/libs/stdc-math/logl.c rename to src/libs/libc-math/logl.c diff --git a/src/libs/stdc-math/lrint.c b/src/libs/libc-math/lrint.c similarity index 100% rename from src/libs/stdc-math/lrint.c rename to src/libs/libc-math/lrint.c diff --git a/src/libs/stdc-math/lrintf.c b/src/libs/libc-math/lrintf.c similarity index 100% rename from src/libs/stdc-math/lrintf.c rename to src/libs/libc-math/lrintf.c diff --git a/src/libs/stdc-math/lrintl.c b/src/libs/libc-math/lrintl.c similarity index 100% rename from src/libs/stdc-math/lrintl.c rename to src/libs/libc-math/lrintl.c diff --git a/src/libs/stdc-math/lround.c b/src/libs/libc-math/lround.c similarity index 100% rename from src/libs/stdc-math/lround.c rename to src/libs/libc-math/lround.c diff --git a/src/libs/stdc-math/lroundf.c b/src/libs/libc-math/lroundf.c similarity index 100% rename from src/libs/stdc-math/lroundf.c rename to src/libs/libc-math/lroundf.c diff --git a/src/libs/stdc-math/lroundl.c b/src/libs/libc-math/lroundl.c similarity index 100% rename from src/libs/stdc-math/lroundl.c rename to src/libs/libc-math/lroundl.c diff --git a/src/libs/stdc-math/math.h b/src/libs/libc-math/math.h similarity index 100% rename from src/libs/stdc-math/math.h rename to src/libs/libc-math/math.h diff --git a/src/libs/stdc-math/modf.c b/src/libs/libc-math/modf.c similarity index 100% rename from src/libs/stdc-math/modf.c rename to src/libs/libc-math/modf.c diff --git a/src/libs/stdc-math/modff.c b/src/libs/libc-math/modff.c similarity index 100% rename from src/libs/stdc-math/modff.c rename to src/libs/libc-math/modff.c diff --git a/src/libs/stdc-math/modfl.c b/src/libs/libc-math/modfl.c similarity index 100% rename from src/libs/stdc-math/modfl.c rename to src/libs/libc-math/modfl.c diff --git a/src/libs/stdc-math/nan.c b/src/libs/libc-math/nan.c similarity index 100% rename from src/libs/stdc-math/nan.c rename to src/libs/libc-math/nan.c diff --git a/src/libs/stdc-math/nanf.c b/src/libs/libc-math/nanf.c similarity index 100% rename from src/libs/stdc-math/nanf.c rename to src/libs/libc-math/nanf.c diff --git a/src/libs/stdc-math/nanl.c b/src/libs/libc-math/nanl.c similarity index 100% rename from src/libs/stdc-math/nanl.c rename to src/libs/libc-math/nanl.c diff --git a/src/libs/stdc-math/nearbyint.c b/src/libs/libc-math/nearbyint.c similarity index 100% rename from src/libs/stdc-math/nearbyint.c rename to src/libs/libc-math/nearbyint.c diff --git a/src/libs/stdc-math/nearbyintf.c b/src/libs/libc-math/nearbyintf.c similarity index 100% rename from src/libs/stdc-math/nearbyintf.c rename to src/libs/libc-math/nearbyintf.c diff --git a/src/libs/stdc-math/nearbyintl.c b/src/libs/libc-math/nearbyintl.c similarity index 100% rename from src/libs/stdc-math/nearbyintl.c rename to src/libs/libc-math/nearbyintl.c diff --git a/src/libs/stdc-math/nextafter.c b/src/libs/libc-math/nextafter.c similarity index 100% rename from src/libs/stdc-math/nextafter.c rename to src/libs/libc-math/nextafter.c diff --git a/src/libs/stdc-math/nextafterf.c b/src/libs/libc-math/nextafterf.c similarity index 100% rename from src/libs/stdc-math/nextafterf.c rename to src/libs/libc-math/nextafterf.c diff --git a/src/libs/stdc-math/nextafterl.c b/src/libs/libc-math/nextafterl.c similarity index 100% rename from src/libs/stdc-math/nextafterl.c rename to src/libs/libc-math/nextafterl.c diff --git a/src/libs/stdc-math/nexttoward.c b/src/libs/libc-math/nexttoward.c similarity index 100% rename from src/libs/stdc-math/nexttoward.c rename to src/libs/libc-math/nexttoward.c diff --git a/src/libs/stdc-math/nexttowardf.c b/src/libs/libc-math/nexttowardf.c similarity index 100% rename from src/libs/stdc-math/nexttowardf.c rename to src/libs/libc-math/nexttowardf.c diff --git a/src/libs/stdc-math/nexttowardl.c b/src/libs/libc-math/nexttowardl.c similarity index 100% rename from src/libs/stdc-math/nexttowardl.c rename to src/libs/libc-math/nexttowardl.c diff --git a/src/libs/stdc-math/pow.c b/src/libs/libc-math/pow.c similarity index 100% rename from src/libs/stdc-math/pow.c rename to src/libs/libc-math/pow.c diff --git a/src/libs/stdc-math/powf.c b/src/libs/libc-math/powf.c similarity index 100% rename from src/libs/stdc-math/powf.c rename to src/libs/libc-math/powf.c diff --git a/src/libs/stdc-math/powl.c b/src/libs/libc-math/powl.c similarity index 100% rename from src/libs/stdc-math/powl.c rename to src/libs/libc-math/powl.c diff --git a/src/libs/stdc-math/remainder.c b/src/libs/libc-math/remainder.c similarity index 100% rename from src/libs/stdc-math/remainder.c rename to src/libs/libc-math/remainder.c diff --git a/src/libs/stdc-math/remainderf.c b/src/libs/libc-math/remainderf.c similarity index 100% rename from src/libs/stdc-math/remainderf.c rename to src/libs/libc-math/remainderf.c diff --git a/src/libs/stdc-math/remainderl.c b/src/libs/libc-math/remainderl.c similarity index 100% rename from src/libs/stdc-math/remainderl.c rename to src/libs/libc-math/remainderl.c diff --git a/src/libs/stdc-math/remquo.c b/src/libs/libc-math/remquo.c similarity index 100% rename from src/libs/stdc-math/remquo.c rename to src/libs/libc-math/remquo.c diff --git a/src/libs/stdc-math/remquof.c b/src/libs/libc-math/remquof.c similarity index 100% rename from src/libs/stdc-math/remquof.c rename to src/libs/libc-math/remquof.c diff --git a/src/libs/stdc-math/remquol.c b/src/libs/libc-math/remquol.c similarity index 100% rename from src/libs/stdc-math/remquol.c rename to src/libs/libc-math/remquol.c diff --git a/src/libs/stdc-math/rint.c b/src/libs/libc-math/rint.c similarity index 100% rename from src/libs/stdc-math/rint.c rename to src/libs/libc-math/rint.c diff --git a/src/libs/stdc-math/rintf.c b/src/libs/libc-math/rintf.c similarity index 100% rename from src/libs/stdc-math/rintf.c rename to src/libs/libc-math/rintf.c diff --git a/src/libs/stdc-math/rintl.c b/src/libs/libc-math/rintl.c similarity index 100% rename from src/libs/stdc-math/rintl.c rename to src/libs/libc-math/rintl.c diff --git a/src/libs/stdc-math/round.c b/src/libs/libc-math/round.c similarity index 100% rename from src/libs/stdc-math/round.c rename to src/libs/libc-math/round.c diff --git a/src/libs/stdc-math/roundf.c b/src/libs/libc-math/roundf.c similarity index 100% rename from src/libs/stdc-math/roundf.c rename to src/libs/libc-math/roundf.c diff --git a/src/libs/stdc-math/roundl.c b/src/libs/libc-math/roundl.c similarity index 100% rename from src/libs/stdc-math/roundl.c rename to src/libs/libc-math/roundl.c diff --git a/src/libs/stdc-math/scalb.c b/src/libs/libc-math/scalb.c similarity index 100% rename from src/libs/stdc-math/scalb.c rename to src/libs/libc-math/scalb.c diff --git a/src/libs/stdc-math/scalbf.c b/src/libs/libc-math/scalbf.c similarity index 100% rename from src/libs/stdc-math/scalbf.c rename to src/libs/libc-math/scalbf.c diff --git a/src/libs/stdc-math/scalbln.c b/src/libs/libc-math/scalbln.c similarity index 100% rename from src/libs/stdc-math/scalbln.c rename to src/libs/libc-math/scalbln.c diff --git a/src/libs/stdc-math/scalblnf.c b/src/libs/libc-math/scalblnf.c similarity index 100% rename from src/libs/stdc-math/scalblnf.c rename to src/libs/libc-math/scalblnf.c diff --git a/src/libs/stdc-math/scalblnl.c b/src/libs/libc-math/scalblnl.c similarity index 100% rename from src/libs/stdc-math/scalblnl.c rename to src/libs/libc-math/scalblnl.c diff --git a/src/libs/stdc-math/scalbn.c b/src/libs/libc-math/scalbn.c similarity index 100% rename from src/libs/stdc-math/scalbn.c rename to src/libs/libc-math/scalbn.c diff --git a/src/libs/stdc-math/scalbnf.c b/src/libs/libc-math/scalbnf.c similarity index 100% rename from src/libs/stdc-math/scalbnf.c rename to src/libs/libc-math/scalbnf.c diff --git a/src/libs/stdc-math/scalbnl.c b/src/libs/libc-math/scalbnl.c similarity index 100% rename from src/libs/stdc-math/scalbnl.c rename to src/libs/libc-math/scalbnl.c diff --git a/src/libs/stdc-math/signgam.c b/src/libs/libc-math/signgam.c similarity index 100% rename from src/libs/stdc-math/signgam.c rename to src/libs/libc-math/signgam.c diff --git a/src/libs/stdc-math/significand.c b/src/libs/libc-math/significand.c similarity index 100% rename from src/libs/stdc-math/significand.c rename to src/libs/libc-math/significand.c diff --git a/src/libs/stdc-math/significandf.c b/src/libs/libc-math/significandf.c similarity index 100% rename from src/libs/stdc-math/significandf.c rename to src/libs/libc-math/significandf.c diff --git a/src/libs/stdc-math/sin.c b/src/libs/libc-math/sin.c similarity index 100% rename from src/libs/stdc-math/sin.c rename to src/libs/libc-math/sin.c diff --git a/src/libs/stdc-math/sincos.c b/src/libs/libc-math/sincos.c similarity index 100% rename from src/libs/stdc-math/sincos.c rename to src/libs/libc-math/sincos.c diff --git a/src/libs/stdc-math/sincosf.c b/src/libs/libc-math/sincosf.c similarity index 100% rename from src/libs/stdc-math/sincosf.c rename to src/libs/libc-math/sincosf.c diff --git a/src/libs/stdc-math/sincosl.c b/src/libs/libc-math/sincosl.c similarity index 100% rename from src/libs/stdc-math/sincosl.c rename to src/libs/libc-math/sincosl.c diff --git a/src/libs/stdc-math/sinf.c b/src/libs/libc-math/sinf.c similarity index 100% rename from src/libs/stdc-math/sinf.c rename to src/libs/libc-math/sinf.c diff --git a/src/libs/stdc-math/sinh.c b/src/libs/libc-math/sinh.c similarity index 100% rename from src/libs/stdc-math/sinh.c rename to src/libs/libc-math/sinh.c diff --git a/src/libs/stdc-math/sinhf.c b/src/libs/libc-math/sinhf.c similarity index 100% rename from src/libs/stdc-math/sinhf.c rename to src/libs/libc-math/sinhf.c diff --git a/src/libs/stdc-math/sinhl.c b/src/libs/libc-math/sinhl.c similarity index 100% rename from src/libs/stdc-math/sinhl.c rename to src/libs/libc-math/sinhl.c diff --git a/src/libs/stdc-math/sinl.c b/src/libs/libc-math/sinl.c similarity index 100% rename from src/libs/stdc-math/sinl.c rename to src/libs/libc-math/sinl.c diff --git a/src/libs/stdc-math/sqrt.c b/src/libs/libc-math/sqrt.c similarity index 100% rename from src/libs/stdc-math/sqrt.c rename to src/libs/libc-math/sqrt.c diff --git a/src/libs/stdc-math/sqrtf.c b/src/libs/libc-math/sqrtf.c similarity index 100% rename from src/libs/stdc-math/sqrtf.c rename to src/libs/libc-math/sqrtf.c diff --git a/src/libs/stdc-math/sqrtl.c b/src/libs/libc-math/sqrtl.c similarity index 100% rename from src/libs/stdc-math/sqrtl.c rename to src/libs/libc-math/sqrtl.c diff --git a/src/libs/stdc-math/tan.c b/src/libs/libc-math/tan.c similarity index 100% rename from src/libs/stdc-math/tan.c rename to src/libs/libc-math/tan.c diff --git a/src/libs/stdc-math/tanf.c b/src/libs/libc-math/tanf.c similarity index 100% rename from src/libs/stdc-math/tanf.c rename to src/libs/libc-math/tanf.c diff --git a/src/libs/stdc-math/tanh.c b/src/libs/libc-math/tanh.c similarity index 100% rename from src/libs/stdc-math/tanh.c rename to src/libs/libc-math/tanh.c diff --git a/src/libs/stdc-math/tanhf.c b/src/libs/libc-math/tanhf.c similarity index 100% rename from src/libs/stdc-math/tanhf.c rename to src/libs/libc-math/tanhf.c diff --git a/src/libs/stdc-math/tanhl.c b/src/libs/libc-math/tanhl.c similarity index 100% rename from src/libs/stdc-math/tanhl.c rename to src/libs/libc-math/tanhl.c diff --git a/src/libs/stdc-math/tanl.c b/src/libs/libc-math/tanl.c similarity index 100% rename from src/libs/stdc-math/tanl.c rename to src/libs/libc-math/tanl.c diff --git a/src/libs/stdc-math/tgamma.c b/src/libs/libc-math/tgamma.c similarity index 100% rename from src/libs/stdc-math/tgamma.c rename to src/libs/libc-math/tgamma.c diff --git a/src/libs/stdc-math/tgammaf.c b/src/libs/libc-math/tgammaf.c similarity index 100% rename from src/libs/stdc-math/tgammaf.c rename to src/libs/libc-math/tgammaf.c diff --git a/src/libs/stdc-math/tgammal.c b/src/libs/libc-math/tgammal.c similarity index 100% rename from src/libs/stdc-math/tgammal.c rename to src/libs/libc-math/tgammal.c diff --git a/src/libs/stdc-math/trunc.c b/src/libs/libc-math/trunc.c similarity index 100% rename from src/libs/stdc-math/trunc.c rename to src/libs/libc-math/trunc.c diff --git a/src/libs/stdc-math/truncf.c b/src/libs/libc-math/truncf.c similarity index 100% rename from src/libs/stdc-math/truncf.c rename to src/libs/libc-math/truncf.c diff --git a/src/libs/stdc-math/truncl.c b/src/libs/libc-math/truncl.c similarity index 100% rename from src/libs/stdc-math/truncl.c rename to src/libs/libc-math/truncl.c diff --git a/src/libs/stdc-ansi/assert.h b/src/libs/libc/assert.h similarity index 100% rename from src/libs/stdc-ansi/assert.h rename to src/libs/libc/assert.h diff --git a/src/libs/stdc-ansi/ctype.c b/src/libs/libc/ctype.c similarity index 99% rename from src/libs/stdc-ansi/ctype.c rename to src/libs/libc/ctype.c index 986697b3e..3e6df18f1 100644 --- a/src/libs/stdc-ansi/ctype.c +++ b/src/libs/libc/ctype.c @@ -1,4 +1,3 @@ -#include #include // using https://koor.fr/C/cctype/Index.wp for ascii code diff --git a/src/libs/stdc-ansi/ctype.h b/src/libs/libc/ctype.h similarity index 100% rename from src/libs/stdc-ansi/ctype.h rename to src/libs/libc/ctype.h diff --git a/src/libs/stdc-ansi/endian.h b/src/libs/libc/endian.h similarity index 100% rename from src/libs/stdc-ansi/endian.h rename to src/libs/libc/endian.h diff --git a/src/libs/stdc-ansi/errno.c b/src/libs/libc/errno.c similarity index 100% rename from src/libs/stdc-ansi/errno.c rename to src/libs/libc/errno.c diff --git a/src/libs/stdc-ansi/errno.h b/src/libs/libc/errno.h similarity index 100% rename from src/libs/stdc-ansi/errno.h rename to src/libs/libc/errno.h diff --git a/src/libs/stdc-ansi/fenv.h b/src/libs/libc/fenv.h similarity index 100% rename from src/libs/stdc-ansi/fenv.h rename to src/libs/libc/fenv.h diff --git a/src/libs/stdc-ansi/locale.h b/src/libs/libc/locale.h similarity index 100% rename from src/libs/stdc-ansi/locale.h rename to src/libs/libc/locale.h diff --git a/src/libs/libc/manifest.json b/src/libs/libc/manifest.json new file mode 100644 index 000000000..8113dffa3 --- /dev/null +++ b/src/libs/libc/manifest.json @@ -0,0 +1,13 @@ +{ + "id": "libc", + "type": "lib", + "description": "C standard library implementation", + "requires": [ + "brutal-alloc", + "brutal-debug", + "brutal-math", + "brutal-mem", + "brutal-parse", + "embed" + ] +} \ No newline at end of file diff --git a/src/libs/stdc-ansi/qsort.c b/src/libs/libc/qsort.c similarity index 72% rename from src/libs/stdc-ansi/qsort.c rename to src/libs/libc/qsort.c index 84fe0e13c..82dfda186 100644 --- a/src/libs/stdc-ansi/qsort.c +++ b/src/libs/libc/qsort.c @@ -2,6 +2,17 @@ #include #include +void memswap(void *block1, void *block2, size_t n) +{ + char *p1 = block1; + char *p2 = block2; + while (n--) + { + char c = *p1; + *p1++ = *p2; + *p2++ = c; + } +} void qsort(void *base, size_t nmemb, size_t size, int (*compar)(void const *, void const *)) { diff --git a/src/libs/stdc-ansi/stdio.h b/src/libs/libc/stdio.h similarity index 100% rename from src/libs/stdc-ansi/stdio.h rename to src/libs/libc/stdio.h diff --git a/src/libs/stdc-ansi/stdlib.c b/src/libs/libc/stdlib.c similarity index 95% rename from src/libs/stdc-ansi/stdlib.c rename to src/libs/libc/stdlib.c index f420fc2b6..49cbfbb7c 100644 --- a/src/libs/stdc-ansi/stdlib.c +++ b/src/libs/libc/stdlib.c @@ -1,8 +1,11 @@ -#include -#include -#include -#include -#include +#include +#include +#include +#include + + +#include +#include #include #include #include @@ -12,12 +15,17 @@ /* --- 7.22.1 - Numeric conversion functions -------------------------------- */ +#ifndef __freestanding__ + + + double atof(char const *nptr) { double res = 0; str_to_float(str$(nptr), &res); return res; } +#endif int atoi(char const *nptr) { diff --git a/src/libs/stdc-ansi/stdlib.h b/src/libs/libc/stdlib.h similarity index 100% rename from src/libs/stdc-ansi/stdlib.h rename to src/libs/libc/stdlib.h diff --git a/src/libs/stdc-ansi/string.c b/src/libs/libc/string.c similarity index 97% rename from src/libs/stdc-ansi/string.c rename to src/libs/libc/string.c index 5bf0b70a2..ec1fd0585 100644 --- a/src/libs/stdc-ansi/string.c +++ b/src/libs/libc/string.c @@ -2,8 +2,9 @@ /* --- 7.24 - String handling ----------------------------------------------- */ -#include -#include +#include +#include +#include #include /* --- 7.24.2 - Copying functions ------------------------------------------- */ diff --git a/src/libs/stdc-ansi/string.h b/src/libs/libc/string.h similarity index 100% rename from src/libs/stdc-ansi/string.h rename to src/libs/libc/string.h diff --git a/src/libs/stdc-posix/string.h b/src/libs/stdc-posix/string.h index 0700de250..318c51b44 100644 --- a/src/libs/stdc-posix/string.h +++ b/src/libs/stdc-posix/string.h @@ -1,6 +1,11 @@ #pragma once +#include #include +#include +#include + + void *memccpy(void *STDC_RESTRICT s1, void const *STDC_RESTRICT s2, int c, size_t n); diff --git a/src/loader/config.c b/src/loader/config.c index be65d4268..cf127faa7 100644 --- a/src/loader/config.c +++ b/src/loader/config.c @@ -1,6 +1,6 @@ #include -#include -#include +#include +#include #include "loader/config.h" LoaderEntry config_entry_parse(Json json) diff --git a/src/loader/config.h b/src/loader/config.h index 66db19004..594e62d9a 100644 --- a/src/loader/config.h +++ b/src/loader/config.h @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include +#include typedef struct { diff --git a/src/loader/main.c b/src/loader/main.c index b3d8c44a9..798c63d98 100644 --- a/src/loader/main.c +++ b/src/loader/main.c @@ -1,6 +1,7 @@ -#include -#include -#include +#include +#include +#include + #include #include #include diff --git a/src/loader/manifest.json b/src/loader/manifest.json new file mode 100644 index 000000000..74cbe8e6e --- /dev/null +++ b/src/loader/manifest.json @@ -0,0 +1,23 @@ +{ + "id": "loader-brutal", + "description": "brutal bootloader", + "type": "exe", + "requires": [ + "json", + "brutal-parse", + "brutal-ds", + "brutal-alloc", + "brutal-io", + "brutal-alloc", + "brutal-mem" + + ], + "enableif": { + "loader": [ + "brutal-loader" + ] + }, + "provides": [ + "loader" + ] +} \ No newline at end of file diff --git a/src/loader/memory.h b/src/loader/memory.h index 3849664dd..408567723 100644 --- a/src/loader/memory.h +++ b/src/loader/memory.h @@ -1,6 +1,7 @@ #pragma once -#include +#include +#include typedef uintptr_t Pages; typedef Pages *VmmSpace; diff --git a/src/loader/protocol.c b/src/loader/protocol.c index cbe00df86..2958bb069 100644 --- a/src/loader/protocol.c +++ b/src/loader/protocol.c @@ -1,7 +1,11 @@ #include -#include -#include -#include +#include +#include +#include +#include +#include + + #include #include #include diff --git a/src/srvs/acpi/manifest.json b/src/srvs/acpi/bmanifest.json similarity index 100% rename from src/srvs/acpi/manifest.json rename to src/srvs/acpi/bmanifest.json diff --git a/src/srvs/ahci/manifest.json b/src/srvs/ahci/bmanifest.json similarity index 100% rename from src/srvs/ahci/manifest.json rename to src/srvs/ahci/bmanifest.json diff --git a/src/srvs/device/manifest.json b/src/srvs/device/bmanifest.json similarity index 100% rename from src/srvs/device/manifest.json rename to src/srvs/device/bmanifest.json diff --git a/src/srvs/pci/manifest.json b/src/srvs/pci/bmanifest.json similarity index 100% rename from src/srvs/pci/manifest.json rename to src/srvs/pci/bmanifest.json diff --git a/src/srvs/ps2/manifest.json b/src/srvs/ps2/bmanifest.json similarity index 100% rename from src/srvs/ps2/manifest.json rename to src/srvs/ps2/bmanifest.json diff --git a/src/srvs/storage/manifest.json b/src/srvs/storage/bmanifest.json similarity index 100% rename from src/srvs/storage/manifest.json rename to src/srvs/storage/bmanifest.json diff --git a/src/srvs/system/manifest.json b/src/srvs/system/bmanifest.json similarity index 100% rename from src/srvs/system/manifest.json rename to src/srvs/system/bmanifest.json diff --git a/src/utils/bvm/manifest.json b/src/utils/bvm/manifest.json deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/utils/cc/manifest.json b/src/utils/cc/manifest.json deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/utils/fstools/manifest.json b/src/utils/fstools/manifest.json deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/utils/gunzip/manifest.json b/src/utils/gunzip/manifest.json deleted file mode 100644 index 0967ef424..000000000 --- a/src/utils/gunzip/manifest.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/src/utils/gzip/manifest.json b/src/utils/gzip/manifest.json deleted file mode 100644 index 0967ef424..000000000 --- a/src/utils/gzip/manifest.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/src/utils/idl/manifest.json b/src/utils/idl/manifest.json deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/utils/test/manifest.json b/src/utils/test/manifest.json deleted file mode 100644 index e69de29bb..000000000 From ae6c1b8333c23cbbaa4ce280d8e7377456a779e3 Mon Sep 17 00:00:00 2001 From: Supercip971 Date: Mon, 20 Feb 2023 15:28:56 -0400 Subject: [PATCH 10/13] osdk-trans: splitted embed in embed-system and embed-arch --- meta/targets/kernel-x86_64.json | 4 ++-- src/kernel/arch/x86_64/manifest.json | 2 +- src/kernel/core/manifest.json | 5 +++-- src/libs/brutal-alloc/manifest.json | 2 +- src/libs/brutal-debug/manifest.json | 3 +-- src/libs/brutal-io/manifest.json | 2 +- src/libs/brutal-math/manifest.json | 2 +- src/libs/brutal-mem/manifest.json | 2 +- src/libs/brutal-sync/manifest.json | 3 +-- src/libs/brutal-time/manifest.json | 2 +- src/libs/embed/kernel/manifest.json | 2 +- src/libs/embed/x86_64/manifest.json | 10 ++++++++++ src/libs/libc/manifest.json | 2 +- 13 files changed, 25 insertions(+), 16 deletions(-) create mode 100644 src/libs/embed/x86_64/manifest.json diff --git a/meta/targets/kernel-x86_64.json b/meta/targets/kernel-x86_64.json index d47f9b4b2..91968928d 100644 --- a/meta/targets/kernel-x86_64.json +++ b/meta/targets/kernel-x86_64.json @@ -25,7 +25,7 @@ "-fno-stack-protector", "-mno-80387", "-mno-mmx", - "-mno-3dnow", "-D__brutal__", "-D__kernel__", + "-mno-3dnow", "-D__brutal__", "-D__kernel__", "-D__x86_64__", "-mno-sse", "-mno-sse2", "-mno-red-zone", @@ -47,7 +47,7 @@ "-ffreestanding", "-fno-stack-protector", "-mno-80387", - "-mno-mmx", "-D__brutal__", "-D__kernel__", + "-mno-mmx", "-D__brutal__", "-D__kernel__", "-D__x86_64__", "-mno-3dnow", "-mno-sse", "-mno-sse2", diff --git a/src/kernel/arch/x86_64/manifest.json b/src/kernel/arch/x86_64/manifest.json index 3c9dc1b4c..898b64126 100644 --- a/src/kernel/arch/x86_64/manifest.json +++ b/src/kernel/arch/x86_64/manifest.json @@ -3,7 +3,7 @@ "description": "The Brutal Microkernel x86-64 architecture support", "type": "lib", "requires": [ - "embed", + "embed-system", "brutal-mem", "brutal-debug", "brutal-sync", diff --git a/src/kernel/core/manifest.json b/src/kernel/core/manifest.json index 8679cbab8..4b4fe06b1 100644 --- a/src/kernel/core/manifest.json +++ b/src/kernel/core/manifest.json @@ -3,15 +3,16 @@ "description": "The Brutal Microkernel core", "type": "exe", "requires": [ + + "brutal-debug", "kernel-arch", "bal", "brutal-base", "brutal-alloc", - "brutal-debug", "brutal-sync", "brutal-mem", "elf", - "embed", + "embed-system", "brutal-ds", "brutal-io", "handover", diff --git a/src/libs/brutal-alloc/manifest.json b/src/libs/brutal-alloc/manifest.json index ba6d950d9..ac4f8b39f 100644 --- a/src/libs/brutal-alloc/manifest.json +++ b/src/libs/brutal-alloc/manifest.json @@ -3,7 +3,7 @@ "type": "lib", "description": "Brutal memory allocation", "requires": [ - "embed", + "embed-system", "brutal-debug", "brutal-base", "brutal-mem" diff --git a/src/libs/brutal-debug/manifest.json b/src/libs/brutal-debug/manifest.json index d12a09415..bda0610ba 100644 --- a/src/libs/brutal-debug/manifest.json +++ b/src/libs/brutal-debug/manifest.json @@ -5,6 +5,5 @@ "requires": [ "brutal-base", "brutal-fmt", - "embed" - ] + "embed-system" } \ No newline at end of file diff --git a/src/libs/brutal-io/manifest.json b/src/libs/brutal-io/manifest.json index e0e636977..1e4b3e758 100644 --- a/src/libs/brutal-io/manifest.json +++ b/src/libs/brutal-io/manifest.json @@ -7,7 +7,7 @@ "brutal-base", "brutal-math", "brutal-alloc", - "embed", + "embed-system", "brutal-text" ] } \ No newline at end of file diff --git a/src/libs/brutal-math/manifest.json b/src/libs/brutal-math/manifest.json index 40abe82bd..ac140d85c 100644 --- a/src/libs/brutal-math/manifest.json +++ b/src/libs/brutal-math/manifest.json @@ -3,6 +3,6 @@ "type": "lib", "description": "Brutal math utility library", "requires": [ - "embed" + "embed-system" ] } \ No newline at end of file diff --git a/src/libs/brutal-mem/manifest.json b/src/libs/brutal-mem/manifest.json index ac8513ed2..b8540bd25 100644 --- a/src/libs/brutal-mem/manifest.json +++ b/src/libs/brutal-mem/manifest.json @@ -3,6 +3,6 @@ "type": "lib", "description": "Brutal memory utility library", "requires": [ - "embed" + "embed-arch" ] } \ No newline at end of file diff --git a/src/libs/brutal-sync/manifest.json b/src/libs/brutal-sync/manifest.json index 03a95588e..4536c2ef5 100644 --- a/src/libs/brutal-sync/manifest.json +++ b/src/libs/brutal-sync/manifest.json @@ -3,8 +3,7 @@ "type": "lib", "description": "Brutal locking utility library", "requires": [ - "embed", + "embed-system", "brutal-debug" - ] } \ No newline at end of file diff --git a/src/libs/brutal-time/manifest.json b/src/libs/brutal-time/manifest.json index 843cde625..3b2794132 100644 --- a/src/libs/brutal-time/manifest.json +++ b/src/libs/brutal-time/manifest.json @@ -3,6 +3,6 @@ "type": "lib", "description": "Brutal time utility library", "requires": [ - "embed" + "embed-system" ] } \ No newline at end of file diff --git a/src/libs/embed/kernel/manifest.json b/src/libs/embed/kernel/manifest.json index 91e0dac57..3fb502fb2 100644 --- a/src/libs/embed/kernel/manifest.json +++ b/src/libs/embed/kernel/manifest.json @@ -5,6 +5,6 @@ "requires": [ ], "provides": [ - "embed" + "embed-system" ] } \ No newline at end of file diff --git a/src/libs/embed/x86_64/manifest.json b/src/libs/embed/x86_64/manifest.json new file mode 100644 index 000000000..68148958e --- /dev/null +++ b/src/libs/embed/x86_64/manifest.json @@ -0,0 +1,10 @@ +{ + "id": "embed-x86-64", + "type": "lib", + "description": "Embed utility library", + "requires": [ + ], + "provides": [ + "embed-arch" + ] +} \ No newline at end of file diff --git a/src/libs/libc/manifest.json b/src/libs/libc/manifest.json index 8113dffa3..d7f246a01 100644 --- a/src/libs/libc/manifest.json +++ b/src/libs/libc/manifest.json @@ -8,6 +8,6 @@ "brutal-math", "brutal-mem", "brutal-parse", - "embed" + "embed-system" ] } \ No newline at end of file From 90520d97aa4e534bcbb18b23b2c8ffebf3b9d467 Mon Sep 17 00:00:00 2001 From: Supercip971 Date: Mon, 20 Feb 2023 16:40:16 -0400 Subject: [PATCH 11/13] osdk-trans: more tyding up + splitted bal --- meta/targets/kernel-x86_64.json | 4 +- package.json | 0 src/kernel/arch/x86_64/manifest.json | 2 +- src/kernel/core/manifest.json | 3 +- src/libs/bal/abi/helpers.c | 92 --------------------------- src/libs/bal/abi/helpers.h | 94 ++++++++++++++++++++++++++-- src/libs/bal/abi/manifest.json | 8 +++ src/libs/bal/boot/manifest.json | 7 +++ src/libs/bal/manifest.json | 10 --- src/libs/bal/task/manifest.json | 8 +++ src/libs/brutal-debug/manifest.json | 1 + src/libs/libc/manifest.json | 3 + src/loader/manifest.json | 5 -- 13 files changed, 120 insertions(+), 117 deletions(-) create mode 100644 package.json create mode 100644 src/libs/bal/abi/manifest.json create mode 100644 src/libs/bal/boot/manifest.json delete mode 100644 src/libs/bal/manifest.json create mode 100644 src/libs/bal/task/manifest.json diff --git a/meta/targets/kernel-x86_64.json b/meta/targets/kernel-x86_64.json index 91968928d..faf984edb 100644 --- a/meta/targets/kernel-x86_64.json +++ b/meta/targets/kernel-x86_64.json @@ -30,7 +30,7 @@ "-mno-sse2", "-mno-red-zone", "-mcmodel=kernel", - "-fbuiltin", + "-fbuiltin", "-nostdlib", "-nostdlib++", "-D__freestanding__" @@ -53,7 +53,7 @@ "-mno-sse2", "-mno-red-zone", "-mcmodel=kernel", - "-fbuiltin", + "-fbuiltin", "-nostdlib", "-nostdlib++", "-D__freestanding__" diff --git a/package.json b/package.json new file mode 100644 index 000000000..e69de29bb diff --git a/src/kernel/arch/x86_64/manifest.json b/src/kernel/arch/x86_64/manifest.json index 898b64126..2a8e66270 100644 --- a/src/kernel/arch/x86_64/manifest.json +++ b/src/kernel/arch/x86_64/manifest.json @@ -8,7 +8,7 @@ "brutal-debug", "brutal-sync", "brutal-base", - "bal", + "bal-handover", "brutal-time", "acpi", "brutal-alloc" diff --git a/src/kernel/core/manifest.json b/src/kernel/core/manifest.json index 4b4fe06b1..73e868cae 100644 --- a/src/kernel/core/manifest.json +++ b/src/kernel/core/manifest.json @@ -3,10 +3,9 @@ "description": "The Brutal Microkernel core", "type": "exe", "requires": [ - "brutal-debug", "kernel-arch", - "bal", + "bal-handover", "brutal-base", "brutal-alloc", "brutal-sync", diff --git a/src/libs/bal/abi/helpers.c b/src/libs/bal/abi/helpers.c index dc51529ca..9eaf5ca77 100644 --- a/src/libs/bal/abi/helpers.c +++ b/src/libs/bal/abi/helpers.c @@ -1,95 +1,3 @@ #include #include -char const *br_syscall_to_string(BrSyscall syscall) -{ - static char const *SYSCALL_NAMES[] = { -#define ITER(SYSCALL) #SYSCALL, - FOREACH_SYSCALLS(ITER) -#undef ITER - }; - - if (syscall >= BR_SYSCALL_COUNT) - { - return "INVALID"; - } - - return SYSCALL_NAMES[syscall]; -} - -char const *br_result_to_string(BrResult result) -{ - static char const *RESULT_NAMES[] = { -#define ITER(RESULT) #RESULT, - FOREACH_RESULTS(ITER) -#undef ITER - }; - - if (result >= BR_RESULT_COUNT) - { - return "INVALID"; - } - - return RESULT_NAMES[result]; -} - -Error br_result_to_error(BrResult result) -{ - switch (result) - { - case BR_SUCCESS: - return ERR_SUCCESS; - - case BR_BAD_ADDRESS: - return ERR_BAD_ADDRESS; - - case BR_OUT_OF_MEMORY: - return ERR_OUT_OF_MEMORY; - - case BR_BAD_ARGUMENTS: - return ERR_BAD_ARGUMENTS; - - case BR_NOT_PERMITTED: - return ERR_DENIED; - - case BR_BAD_HANDLE: - return ERR_BAD_HANDLE; - - case BR_NOT_IMPLEMENTED: - return ERR_NOT_IMPLEMENTED; - - case BR_BAD_SYSCALL: - return ERR_BAD_SYSCALL; - - case BR_TIMEOUT: - return ERR_TIMEOUT; - - case BR_WOULD_BLOCK: - return ERR_WOULD_BLOCK; - - default: - return ERR_UNDEFINED; - } -} - -bool br_event_eq(BrEvent a, BrEvent b) -{ - if (a.type != b.type) - { - return false; - } - - switch (a.type) - { - case BR_EVENT_IRQ: - return a.irq == b.irq; - - default: - panic$("Unhandled event type: {}", a.type); - } -} - -bool br_addr_eq(BrAddr a, BrAddr b) -{ - return a.id == b.id && (a.port == b.port || a.port == BR_PORT_ANY || b.port == BR_PORT_ANY); -} diff --git a/src/libs/bal/abi/helpers.h b/src/libs/bal/abi/helpers.h index 8f39e4231..dd8c546ac 100644 --- a/src/libs/bal/abi/helpers.h +++ b/src/libs/bal/abi/helpers.h @@ -2,13 +2,97 @@ #include #include +#include -char const *br_syscall_to_string(BrSyscall syscall); +static inline char const *br_syscall_to_string(BrSyscall syscall) +{ + static char const *SYSCALL_NAMES[] = { +#define ITER(SYSCALL) #SYSCALL, + FOREACH_SYSCALLS(ITER) +#undef ITER + }; -char const *br_result_to_string(BrResult result); + if (syscall >= BR_SYSCALL_COUNT) + { + return "INVALID"; + } -Error br_result_to_error(BrResult result); + return SYSCALL_NAMES[syscall]; +} -bool br_event_eq(BrEvent a, BrEvent b); +static inline char const *br_result_to_string(BrResult result) +{ + static char const *RESULT_NAMES[] = { +#define ITER(RESULT) #RESULT, + FOREACH_RESULTS(ITER) +#undef ITER + }; -bool br_addr_eq(BrAddr a, BrAddr b); + if (result >= BR_RESULT_COUNT) + { + return "INVALID"; + } + + return RESULT_NAMES[result]; +} + +static inline Error br_result_to_error(BrResult result) +{ + switch (result) + { + case BR_SUCCESS: + return ERR_SUCCESS; + + case BR_BAD_ADDRESS: + return ERR_BAD_ADDRESS; + + case BR_OUT_OF_MEMORY: + return ERR_OUT_OF_MEMORY; + + case BR_BAD_ARGUMENTS: + return ERR_BAD_ARGUMENTS; + + case BR_NOT_PERMITTED: + return ERR_DENIED; + + case BR_BAD_HANDLE: + return ERR_BAD_HANDLE; + + case BR_NOT_IMPLEMENTED: + return ERR_NOT_IMPLEMENTED; + + case BR_BAD_SYSCALL: + return ERR_BAD_SYSCALL; + + case BR_TIMEOUT: + return ERR_TIMEOUT; + + case BR_WOULD_BLOCK: + return ERR_WOULD_BLOCK; + + default: + return ERR_UNDEFINED; + } +} + +static inline bool br_event_eq(BrEvent a, BrEvent b) +{ + if (a.type != b.type) + { + return false; + } + + switch (a.type) + { + case BR_EVENT_IRQ: + return a.irq == b.irq; + + default: + panic$("Unhandled event type: {}", a.type); + } +} + +static inline bool br_addr_eq(BrAddr a, BrAddr b) +{ + return a.id == b.id && (a.port == b.port || a.port == BR_PORT_ANY || b.port == BR_PORT_ANY); +} diff --git a/src/libs/bal/abi/manifest.json b/src/libs/bal/abi/manifest.json new file mode 100644 index 000000000..96299be29 --- /dev/null +++ b/src/libs/bal/abi/manifest.json @@ -0,0 +1,8 @@ +{ + "id": "bal-abi", + "type": "lib", + "description": "Brutal kernel abstraction layer ABI", + "requires": [ + "brutal-debug" + ] +} \ No newline at end of file diff --git a/src/libs/bal/boot/manifest.json b/src/libs/bal/boot/manifest.json new file mode 100644 index 000000000..f6e557a91 --- /dev/null +++ b/src/libs/bal/boot/manifest.json @@ -0,0 +1,7 @@ +{ + "id": "bal-handover", + "type": "lib", + "description": "Brutal kernel abstraction layer handover", + "requires": [ + ] +} \ No newline at end of file diff --git a/src/libs/bal/manifest.json b/src/libs/bal/manifest.json deleted file mode 100644 index 9e697ac95..000000000 --- a/src/libs/bal/manifest.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "id": "bal", - "type": "lib", - "description": "Brutal kernel abstraction layer", - "requires": [ - "brutal-debug", - "brutal-mem", - "elf" - ] -} \ No newline at end of file diff --git a/src/libs/bal/task/manifest.json b/src/libs/bal/task/manifest.json new file mode 100644 index 000000000..1f59e63c8 --- /dev/null +++ b/src/libs/bal/task/manifest.json @@ -0,0 +1,8 @@ +{ + "id": "bal-task", + "type": "lib", + "description": "Brutal kernel abstraction layer task", + "requires": [ + "ipc" + ] +} \ No newline at end of file diff --git a/src/libs/brutal-debug/manifest.json b/src/libs/brutal-debug/manifest.json index bda0610ba..b09d009fe 100644 --- a/src/libs/brutal-debug/manifest.json +++ b/src/libs/brutal-debug/manifest.json @@ -6,4 +6,5 @@ "brutal-base", "brutal-fmt", "embed-system" + ] } \ No newline at end of file diff --git a/src/libs/libc/manifest.json b/src/libs/libc/manifest.json index d7f246a01..71e95edc4 100644 --- a/src/libs/libc/manifest.json +++ b/src/libs/libc/manifest.json @@ -2,6 +2,9 @@ "id": "libc", "type": "lib", "description": "C standard library implementation", + "props": { + "cpp-root-include": true + }, "requires": [ "brutal-alloc", "brutal-debug", diff --git a/src/loader/manifest.json b/src/loader/manifest.json index 74cbe8e6e..095d43591 100644 --- a/src/loader/manifest.json +++ b/src/loader/manifest.json @@ -12,11 +12,6 @@ "brutal-mem" ], - "enableif": { - "loader": [ - "brutal-loader" - ] - }, "provides": [ "loader" ] From 9cd0efe341adb16909fef2feab0237d90a20d96f Mon Sep 17 00:00:00 2001 From: Supercip971 Date: Mon, 20 Feb 2023 17:21:38 -0400 Subject: [PATCH 12/13] osdk-trans: merged all brutal-* libraries --- src/kernel/arch/riscv64/asm.h | 2 +- src/kernel/arch/riscv64/boot.c | 6 +++--- src/kernel/arch/riscv64/context.c | 4 ++-- src/kernel/arch/riscv64/context.h | 2 +- src/kernel/arch/riscv64/cpu.c | 2 +- src/kernel/arch/riscv64/heap.c | 2 +- src/kernel/arch/riscv64/interrupts.c | 4 ++-- src/kernel/arch/riscv64/interrupts.h | 2 +- src/kernel/arch/riscv64/sifive_uart.c | 2 +- src/kernel/arch/riscv64/uart8250.c | 4 ++-- src/kernel/arch/riscv64/vmm.c | 4 ++-- src/kernel/arch/x86_64/apic.c | 4 ++-- src/kernel/arch/x86_64/arch.c | 2 +- src/kernel/arch/x86_64/asm.h | 2 +- src/kernel/arch/x86_64/boot.c | 2 +- src/kernel/arch/x86_64/cmos.c | 4 ++-- src/kernel/arch/x86_64/cmos.h | 2 +- src/kernel/arch/x86_64/com.c | 2 +- src/kernel/arch/x86_64/com.h | 2 +- src/kernel/arch/x86_64/context.c | 4 ++-- src/kernel/arch/x86_64/context.h | 2 +- src/kernel/arch/x86_64/cpu.c | 2 +- src/kernel/arch/x86_64/cpuid.c | 2 +- src/kernel/arch/x86_64/cpuid.h | 2 +- src/kernel/arch/x86_64/gdt.c | 2 +- src/kernel/arch/x86_64/gdt.h | 4 ++-- src/kernel/arch/x86_64/heap.c | 6 +++--- src/kernel/arch/x86_64/hpet.c | 4 ++-- src/kernel/arch/x86_64/idt.h | 4 ++-- src/kernel/arch/x86_64/interrupts.c | 6 +++--- src/kernel/arch/x86_64/interrupts.h | 2 +- src/kernel/arch/x86_64/manifest.json | 9 ++------- src/kernel/arch/x86_64/paging.h | 4 ++-- src/kernel/arch/x86_64/simd.c | 6 +++--- src/kernel/arch/x86_64/simd.h | 2 +- src/kernel/arch/x86_64/smp.c | 8 ++++---- src/kernel/arch/x86_64/syscall.c | 2 +- src/kernel/arch/x86_64/syscall.h | 2 +- src/kernel/arch/x86_64/vmm.c | 10 +++++----- src/kernel/core/arch.h | 2 +- src/kernel/core/channel.c | 6 +++--- src/kernel/core/channel.h | 2 +- src/kernel/core/cpu.c | 2 +- src/kernel/core/domain.c | 2 +- src/kernel/core/domain.h | 2 +- src/kernel/core/event.c | 4 ++-- src/kernel/core/init.c | 8 ++++---- src/kernel/core/kernel.c | 2 +- src/kernel/core/manifest.json | 8 +------- src/kernel/core/memory.c | 4 ++-- src/kernel/core/mmap.h | 2 +- src/kernel/core/object.c | 4 ++-- src/kernel/core/object.h | 6 +++--- src/kernel/core/pmm.c | 16 ++++++++-------- src/kernel/core/sched.c | 4 ++-- src/kernel/core/space.c | 4 ++-- src/kernel/core/space.h | 2 +- src/kernel/core/syscalls.c | 4 ++-- src/kernel/core/task.c | 4 ++-- src/kernel/core/task.h | 2 +- src/kernel/core/tasking.c | 2 +- src/libs/bal/abi/helpers.c | 2 +- src/libs/bal/abi/helpers.h | 4 ++-- src/libs/bal/abi/manifest.json | 2 +- src/libs/bal/abi/types.h | 4 ++-- src/libs/bal/boot/handover.c | 6 +++--- src/libs/bal/boot/handover.h | 4 ++-- src/libs/bal/hw/io.c | 4 ++-- src/libs/bal/hw/io.h | 2 +- src/libs/bal/hw/mem.c | 4 ++-- src/libs/bal/hw/mem.h | 2 +- src/libs/bal/task/exec.c | 8 ++++---- src/libs/brutal-alloc/manifest.json | 11 ----------- src/libs/brutal-base/manifest.json | 5 ----- src/libs/brutal-cli/manifest.json | 12 ------------ src/libs/brutal-debug/manifest.json | 10 ---------- src/libs/brutal-ds/manifest.json | 12 ------------ src/libs/brutal-fibers/manifest.json | 10 ---------- src/libs/brutal-fmt/manifest.json | 13 ------------- src/libs/brutal-glob/manifest.json | 8 -------- src/libs/brutal-hash/manifest.json | 8 -------- src/libs/brutal-input/manifest.json | 10 ---------- src/libs/brutal-io/manifest.json | 13 ------------- src/libs/brutal-math/manifest.json | 8 -------- src/libs/brutal-mem/manifest.json | 8 -------- src/libs/brutal-parse/manifest.json | 12 ------------ src/libs/brutal-sync/manifest.json | 9 --------- src/libs/brutal-text/manifest.json | 9 --------- src/libs/brutal-time/manifest.json | 8 -------- src/libs/{brutal-alloc => brutal/alloc}/base.c | 2 +- src/libs/{brutal-alloc => brutal/alloc}/base.h | 6 +++--- src/libs/{brutal-alloc => brutal/alloc}/global.c | 2 +- src/libs/{brutal-alloc => brutal/alloc}/global.h | 0 src/libs/{brutal-alloc => brutal/alloc}/heap.c | 8 ++++---- src/libs/{brutal-alloc => brutal/alloc}/heap.h | 0 src/libs/{brutal-alloc => brutal/alloc}/pool.c | 0 src/libs/{brutal-alloc => brutal/alloc}/pool.h | 0 src/libs/{brutal-base => brutal/base}/any.h | 0 .../{brutal-base => brutal/base}/attributes.h | 0 src/libs/{brutal-base => brutal/base}/banned.h | 0 src/libs/{brutal-base => brutal/base}/cast.h | 0 src/libs/{brutal-base => brutal/base}/clamp.h | 0 src/libs/{brutal-base => brutal/base}/count.h | 0 src/libs/{brutal-base => brutal/base}/defs.h | 0 src/libs/{brutal-base => brutal/base}/endian.h | 0 src/libs/{brutal-base => brutal/base}/error.h | 0 src/libs/{brutal-base => brutal/base}/iter.h | 0 src/libs/{brutal-base => brutal/base}/keywords.h | 0 src/libs/{brutal-base => brutal/base}/loc.h | 0 src/libs/{brutal-base => brutal/base}/macros.h | 0 src/libs/{brutal-base => brutal/base}/map.h | 0 src/libs/{brutal-base => brutal/base}/range.h | 0 src/libs/{brutal-base => brutal/base}/result.h | 0 src/libs/{brutal-base => brutal/base}/slice.h | 0 src/libs/{brutal-base => brutal/base}/std.h | 0 src/libs/{brutal-base => brutal/base}/str.h | 0 src/libs/{brutal-base => brutal/base}/types.h | 0 src/libs/{brutal-base => brutal/base}/vaopt.h | 0 src/libs/{brutal-cli => brutal/cli}/clear.c | 2 +- src/libs/{brutal-cli => brutal/cli}/clear.h | 2 +- src/libs/{brutal-cli => brutal/cli}/cursor.c | 2 +- src/libs/{brutal-cli => brutal/cli}/cursor.h | 2 +- src/libs/{brutal-cli => brutal/cli}/fmt.c | 6 +++--- src/libs/{brutal-cli => brutal/cli}/fmt.h | 4 ++-- src/libs/{brutal-cli => brutal/cli}/spinners.c | 2 +- src/libs/{brutal-cli => brutal/cli}/spinners.h | 2 +- src/libs/{brutal-cli => brutal/cli}/style.c | 4 ++-- src/libs/{brutal-cli => brutal/cli}/style.h | 4 ++-- src/libs/{brutal-debug => brutal/debug}/assert.h | 2 +- src/libs/{brutal-debug => brutal/debug}/log.c | 2 +- src/libs/{brutal-debug => brutal/debug}/log.h | 4 ++-- src/libs/{brutal-ds => brutal/ds}/bits.c | 4 ++-- src/libs/{brutal-ds => brutal/ds}/bits.h | 2 +- src/libs/{brutal-ds => brutal/ds}/map.c | 6 +++--- src/libs/{brutal-ds => brutal/ds}/map.h | 2 +- src/libs/{brutal-ds => brutal/ds}/range.c | 2 +- src/libs/{brutal-ds => brutal/ds}/range.h | 3 +-- src/libs/{brutal-ds => brutal/ds}/ring.c | 2 +- src/libs/{brutal-ds => brutal/ds}/ring.h | 2 +- src/libs/{brutal-ds => brutal/ds}/slot.c | 4 ++-- src/libs/{brutal-ds => brutal/ds}/slot.h | 2 +- src/libs/{brutal-ds => brutal/ds}/vec.c | 4 ++-- src/libs/{brutal-ds => brutal/ds}/vec.h | 6 +++--- .../{brutal-fibers => brutal/fibers}/fibers.c | 8 ++++---- .../{brutal-fibers => brutal/fibers}/fibers.h | 2 +- src/libs/{brutal-fmt => brutal/fmt}/case.c | 2 +- src/libs/{brutal-fmt => brutal/fmt}/case.h | 6 +++--- src/libs/{brutal-fmt => brutal/fmt}/fmt.c | 10 +++++----- src/libs/{brutal-fmt => brutal/fmt}/fmt.h | 6 +++--- src/libs/{brutal-fmt => brutal/fmt}/funcs.c | 2 +- src/libs/{brutal-fmt => brutal/fmt}/funcs.h | 0 src/libs/{brutal-glob => brutal/glob}/glob.c | 0 src/libs/{brutal-glob => brutal/glob}/glob.h | 2 +- src/libs/{brutal-hash => brutal/hash}/adler32.c | 2 +- src/libs/{brutal-hash => brutal/hash}/adler32.h | 2 +- src/libs/{brutal-hash => brutal/hash}/crc32.c | 2 +- src/libs/{brutal-hash => brutal/hash}/crc32.h | 2 +- src/libs/{brutal-hash => brutal/hash}/fnv.c | 0 src/libs/{brutal-hash => brutal/hash}/fnv.h | 2 +- src/libs/{brutal-input => brutal/input}/event.h | 4 ++-- .../{brutal-input => brutal/input}/keyboard.h | 4 ++-- src/libs/{brutal-input => brutal/input}/mouse.h | 2 +- src/libs/{brutal-io => brutal/io}/base.c | 2 +- src/libs/{brutal-io => brutal/io}/base.h | 6 +++--- src/libs/{brutal-io => brutal/io}/bitbuf.h | 2 +- src/libs/{brutal-io => brutal/io}/buf.c | 4 ++-- src/libs/{brutal-io => brutal/io}/buf.h | 2 +- src/libs/{brutal-io => brutal/io}/chan.c | 0 src/libs/{brutal-io => brutal/io}/chan.h | 0 src/libs/{brutal-io => brutal/io}/emit.c | 4 ++-- src/libs/{brutal-io => brutal/io}/emit.h | 2 +- src/libs/{brutal-io => brutal/io}/file.c | 0 src/libs/{brutal-io => brutal/io}/file.h | 0 src/libs/{brutal-io => brutal/io}/funcs.c | 6 +++--- src/libs/{brutal-io => brutal/io}/funcs.h | 0 src/libs/{brutal-io => brutal/io}/mem.c | 4 ++-- src/libs/{brutal-io => brutal/io}/mem.h | 0 src/libs/{brutal-io => brutal/io}/path.c | 0 src/libs/{brutal-io => brutal/io}/path.h | 2 +- src/libs/{brutal-io => brutal/io}/rbits.h | 2 +- src/libs/{brutal-io => brutal/io}/traits.h | 0 src/libs/{brutal-io => brutal/io}/wbits.h | 0 src/libs/{brutal-io => brutal/io}/window.c | 6 +++--- src/libs/{brutal-io => brutal/io}/window.h | 2 +- src/libs/brutal/manifest.json | 8 ++++++++ src/libs/{brutal-math => brutal/math}/angle.h | 0 src/libs/{brutal-math => brutal/math}/clamp.h | 0 src/libs/{brutal-math => brutal/math}/dock.c | 0 src/libs/{brutal-math => brutal/math}/dock.h | 0 src/libs/{brutal-math => brutal/math}/easing.c | 0 src/libs/{brutal-math => brutal/math}/easing.h | 0 src/libs/{brutal-math => brutal/math}/edge.h | 0 src/libs/{brutal-math => brutal/math}/flow.c | 0 src/libs/{brutal-math => brutal/math}/flow.h | 0 src/libs/{brutal-math => brutal/math}/funcs.h | 0 src/libs/{brutal-math => brutal/math}/gravity.c | 0 src/libs/{brutal-math => brutal/math}/gravity.h | 2 +- .../{brutal-math => brutal/math}/orientation.h | 0 src/libs/{brutal-math => brutal/math}/rand.c | 0 src/libs/{brutal-math => brutal/math}/rand.h | 0 src/libs/{brutal-math => brutal/math}/rect.h | 2 +- src/libs/{brutal-math => brutal/math}/spacing.c | 0 src/libs/{brutal-math => brutal/math}/spacing.h | 0 src/libs/{brutal-math => brutal/math}/trans2.h | 0 src/libs/{brutal-math => brutal/math}/vec2.h | 0 src/libs/{brutal-mem => brutal/mem}/const.h | 0 src/libs/{brutal-mem => brutal/mem}/copy.c | 0 src/libs/{brutal-mem => brutal/mem}/funcs.h | 0 src/libs/{brutal-mem => brutal/mem}/move.c | 0 src/libs/{brutal-mem => brutal/mem}/pages.h | 0 src/libs/{brutal-mem => brutal/mem}/set.c | 0 src/libs/{brutal-mem => brutal/mem}/units.h | 0 src/libs/{brutal-mem => brutal/mem}/volatile.h | 0 src/libs/{brutal-parse => brutal/parse}/lex.c | 2 +- src/libs/{brutal-parse => brutal/parse}/lex.h | 4 ++-- src/libs/{brutal-parse => brutal/parse}/lexeme.h | 2 +- src/libs/{brutal-parse => brutal/parse}/nums.c | 0 src/libs/{brutal-parse => brutal/parse}/nums.h | 0 src/libs/{brutal-parse => brutal/parse}/scan.c | 12 ++++++------ src/libs/{brutal-parse => brutal/parse}/scan.h | 2 +- src/libs/{brutal-sync => brutal/sync}/lock.c | 0 src/libs/{brutal-sync => brutal/sync}/lock.h | 10 +++++----- src/libs/{brutal-sync => brutal/sync}/ref.h | 2 +- src/libs/{brutal-sync => brutal/sync}/rwlock.c | 6 +++--- src/libs/{brutal-sync => brutal/sync}/rwlock.h | 0 src/libs/{brutal-task => brutal/task}/task.c | 0 src/libs/{brutal-task => brutal/task}/task.h | 2 +- src/libs/{brutal-test => brutal/test}/expect.h | 0 .../{brutal-test => brutal/test}/hook-alloc.h | 4 ++-- src/libs/{brutal-test => brutal/test}/runner.c | 12 ++++++------ src/libs/{brutal-test => brutal/test}/runner.h | 2 +- src/libs/{brutal-text => brutal/text}/cp437.c | 0 src/libs/{brutal-text => brutal/text}/cp437.h | 0 src/libs/{brutal-text => brutal/text}/rune.h | 2 +- src/libs/{brutal-text => brutal/text}/str.c | 2 +- src/libs/{brutal-text => brutal/text}/str.h | 4 ++-- src/libs/{brutal-text => brutal/text}/utf16.c | 4 ++-- src/libs/{brutal-text => brutal/text}/utf16.h | 0 src/libs/{brutal-text => brutal/text}/utf8.c | 2 +- src/libs/{brutal-text => brutal/text}/utf8.h | 4 ++-- src/libs/{brutal-text => brutal/text}/vals.h | 0 src/libs/{brutal-text => brutal/text}/witty.c | 0 src/libs/{brutal-text => brutal/text}/witty.h | 0 .../{brutal-time => brutal/time}/constants.h | 0 src/libs/{brutal-time => brutal/time}/convert.c | 0 src/libs/{brutal-time => brutal/time}/convert.h | 0 src/libs/{brutal-time => brutal/time}/query.c | 0 src/libs/{brutal-time => brutal/time}/query.h | 0 src/libs/{brutal-time => brutal/time}/types.h | 4 ++-- src/libs/bvm/ctx/global.h | 2 +- src/libs/bvm/ctx/local.c | 2 +- src/libs/bvm/eval/eval.c | 2 +- src/libs/bvm/eval/instr.h | 2 +- src/libs/bvm/obj/func.h | 2 +- src/libs/bvm/obj/obj.h | 2 +- src/libs/bvm/obj/val.c | 2 +- src/libs/bvm/obj/val.h | 2 +- src/libs/cc/ast/decl.h | 2 +- src/libs/cc/ast/expr.h | 2 +- src/libs/cc/ast/stmt.h | 4 ++-- src/libs/cc/ast/type.h | 2 +- src/libs/cc/ast/val.h | 2 +- src/libs/cc/builder/expr.c | 2 +- src/libs/cc/builder/stmt.c | 2 +- src/libs/cc/builder/type.c | 2 +- src/libs/cc/dump.h | 2 +- src/libs/cc/dump/dump.c | 2 +- src/libs/cc/lex/lexer.c | 2 +- src/libs/cc/lex/lexer.h | 2 +- src/libs/cc/lex/pproc.c | 2 +- src/libs/cc/lex/pproc.h | 2 +- src/libs/cc/parse/decl.c | 2 +- src/libs/cc/parse/expr.c | 4 ++-- src/libs/cc/parse/stmt.c | 2 +- src/libs/cc/sema/visit.c | 2 +- src/libs/cc/trans.h | 2 +- src/libs/cc/trans/expr.c | 2 +- src/libs/cc/trans/val.c | 2 +- src/libs/codec-deflate/deflate.c | 2 +- src/libs/codec-deflate/deflate.h | 2 +- src/libs/codec-deflate/huff.h | 2 +- src/libs/codec-deflate/inflate.c | 2 +- src/libs/codec-deflate/inflate.h | 2 +- src/libs/codec-gzip/gzip.c | 6 +++--- src/libs/codec-gzip/gzip.h | 2 +- src/libs/codec-zlib/zlib.c | 2 +- src/libs/codec-zlib/zlib.h | 2 +- src/libs/elf/elf.h | 6 +++--- src/libs/embed/arm64/backtrace.c | 2 +- src/libs/embed/brutal/chan.c | 6 +++--- src/libs/embed/brutal/debug.c | 2 +- src/libs/embed/brutal/entry.c | 6 +++--- src/libs/embed/brutal/file.c | 2 +- src/libs/embed/brutal/log.c | 6 +++--- src/libs/embed/brutal/mem.c | 4 ++-- src/libs/embed/brutal/task.c | 2 +- src/libs/embed/chan.h | 2 +- src/libs/embed/crypto.h | 2 +- src/libs/embed/debug.h | 4 ++-- src/libs/embed/efi/chan.c | 6 +++--- src/libs/embed/efi/debug.c | 2 +- src/libs/embed/efi/file.c | 6 +++--- src/libs/embed/efi/log.c | 4 ++-- src/libs/embed/efi/mem.c | 6 +++--- src/libs/embed/file-decl.h | 2 +- src/libs/embed/file.h | 2 +- src/libs/embed/kernel/debug.c | 2 +- src/libs/embed/kernel/log.c | 2 +- src/libs/embed/kernel/mem.c | 6 +++--- src/libs/embed/log.h | 2 +- src/libs/embed/mem.h | 2 +- src/libs/embed/posix/chan.c | 2 +- src/libs/embed/posix/err.c | 2 +- src/libs/embed/posix/err.h | 2 +- src/libs/embed/posix/file.c | 6 +++--- src/libs/embed/posix/log.c | 2 +- src/libs/embed/posix/mem.c | 2 +- src/libs/embed/posix/time.c | 2 +- src/libs/embed/time.h | 2 +- src/libs/embed/x86_64/backtrace.c | 2 +- src/libs/fs/block.c | 2 +- src/libs/fs/block.h | 6 +++--- src/libs/fs/ext2/block.c | 2 +- src/libs/fs/ext2/ext2.c | 4 ++-- src/libs/fs/ext2/structure.c | 2 +- src/libs/fs/ext2/structure.h | 2 +- src/libs/handover/builder.c | 4 ++-- src/libs/handover/builder.h | 4 ++-- src/libs/handover/handover.c | 4 ++-- src/libs/handover/manifest.json | 6 +----- src/libs/hw/acpi/base.c | 2 +- src/libs/hw/acpi/base.h | 2 +- src/libs/hw/acpi/madt.h | 2 +- src/libs/hw/acpi/manifest.json | 2 +- src/libs/hw/acpi/rsdt.c | 2 +- src/libs/hw/acpi/rsdt.h | 2 +- src/libs/hw/acpi/stdh.h | 6 +++--- src/libs/hw/ahci/ahci.c | 2 +- src/libs/hw/ahci/ahci.h | 2 +- src/libs/hw/ahci/device.c | 2 +- src/libs/hw/ahci/fis.h | 2 +- src/libs/hw/ahci/hba.h | 2 +- src/libs/hw/efi/lib.c | 6 +++--- src/libs/hw/efi/manifest.json | 3 +-- src/libs/hw/efi/protos/stop.h | 4 ++-- src/libs/hw/efi/types.h | 6 +++--- src/libs/hw/fdt/fdt.c | 4 ++-- src/libs/hw/fdt/fdt.h | 2 +- src/libs/hw/pci/addr.h | 2 +- src/libs/hw/pci/capabilities.h | 2 +- src/libs/hw/pci/config.h | 2 +- src/libs/hw/pci/pci.c | 2 +- src/libs/hw/pci/pci.h | 2 +- src/libs/hw/ps2/controller.c | 2 +- src/libs/hw/ps2/keyboard.c | 2 +- src/libs/hw/ps2/keyboard.h | 2 +- src/libs/hw/ps2/mouse.h | 4 ++-- src/libs/hw/uart/uart.c | 2 +- src/libs/hw/uart/uart.h | 2 +- src/libs/hw/virtio/device.c | 2 +- src/libs/hw/virtio/device.h | 2 +- src/libs/hw/virtio/device/block.h | 2 +- src/libs/hw/virtio/device/entropy.h | 2 +- src/libs/hw/virtio/virtqueue.h | 2 +- src/libs/idl/ast/builder.c | 2 +- src/libs/idl/ast/iface.h | 2 +- src/libs/idl/ast/types.h | 2 +- src/libs/idl/cgen/binding.c | 2 +- src/libs/idl/cgen/dispatch.c | 2 +- src/libs/idl/cgen/handler.c | 2 +- src/libs/idl/cgen/header.c | 2 +- src/libs/idl/cgen/includes.c | 2 +- src/libs/idl/cgen/method.c | 2 +- src/libs/idl/cgen/pack.c | 4 ++-- src/libs/idl/cgen/provider.c | 2 +- src/libs/idl/cgen/source.c | 2 +- src/libs/idl/cgen/types.c | 2 +- src/libs/idl/cgen/unpack.c | 2 +- src/libs/idl/json.c | 2 +- src/libs/idl/parse.c | 4 ++-- src/libs/idl/parse.h | 2 +- src/libs/idl/sema.c | 6 +++--- src/libs/ipc/component.c | 2 +- src/libs/ipc/component.h | 4 ++-- src/libs/ipc/hooks.c | 4 ++-- src/libs/ipc/manifest.json | 6 +----- src/libs/ipc/pack.c | 8 ++++---- src/libs/ipc/pack.h | 2 +- src/libs/ipc/unpack.c | 4 ++-- src/libs/ipc/unpack.h | 4 ++-- src/libs/json/emit.c | 2 +- src/libs/json/emit.h | 2 +- src/libs/json/manifest.json | 5 +---- src/libs/json/objects.c | 2 +- src/libs/json/objects.h | 4 ++-- src/libs/json/parser.c | 8 ++++---- src/libs/json/parser.h | 2 +- src/libs/libc/manifest.json | 6 +----- src/libs/libc/stdlib.c | 12 ++++++------ src/libs/libc/string.c | 6 +++--- src/libs/stdc-posix/string.h | 4 ++-- src/libs/ubsan/ubsan.c | 4 ++-- src/loader/config.c | 4 ++-- src/loader/config.h | 4 ++-- src/loader/main.c | 6 +++--- src/loader/manifest.json | 8 +------- src/loader/memory.c | 4 ++-- src/loader/memory.h | 4 ++-- src/loader/protocol.c | 10 +++++----- src/srvs/acpi/main.c | 4 ++-- src/srvs/ahci/main.c | 4 ++-- src/srvs/device/device.h | 2 +- src/srvs/pci/main.c | 4 ++-- src/srvs/ps2/main.c | 6 +++--- src/srvs/system/bus.c | 2 +- src/srvs/system/main.c | 2 +- src/srvs/system/unit.c | 2 +- src/srvs/system/unit.h | 2 +- src/utils/bvm/main.c | 4 ++-- src/utils/cc/main.c | 4 ++-- src/utils/fstools/main.c | 6 +++--- src/utils/gunzip/main.c | 2 +- src/utils/gzip/main.c | 2 +- src/utils/hello/main.c | 2 +- src/utils/idgen/main.c | 4 ++-- src/utils/idl/main.c | 6 +++--- src/utils/test/brutal/alloc/heap.c | 2 +- src/utils/test/brutal/base/endian.c | 2 +- src/utils/test/brutal/codec/deflate.c | 2 +- src/utils/test/brutal/codec/gzip.c | 2 +- src/utils/test/brutal/codec/inflate.c | 2 +- src/utils/test/brutal/codec/zlib.c | 2 +- src/utils/test/brutal/ds/map.c | 4 ++-- src/utils/test/brutal/ds/range.c | 4 ++-- src/utils/test/brutal/ds/slot.c | 4 ++-- src/utils/test/brutal/ds/vec.c | 4 ++-- src/utils/test/brutal/fmt/case.c | 4 ++-- src/utils/test/brutal/fmt/format.c | 4 ++-- src/utils/test/brutal/fmt/printf.c | 4 ++-- src/utils/test/brutal/glob/glob.c | 4 ++-- src/utils/test/brutal/io/bit_write.c | 4 ++-- src/utils/test/brutal/tests/expect.c | 2 +- src/utils/test/brutal/tests/test.c | 2 +- src/utils/test/cc/cc.h | 2 +- src/utils/test/cc/pproc.c | 4 ++-- src/utils/test/json/json.c | 2 +- src/utils/test/main.c | 2 +- 447 files changed, 573 insertions(+), 765 deletions(-) delete mode 100644 src/libs/brutal-alloc/manifest.json delete mode 100644 src/libs/brutal-base/manifest.json delete mode 100644 src/libs/brutal-cli/manifest.json delete mode 100644 src/libs/brutal-debug/manifest.json delete mode 100644 src/libs/brutal-ds/manifest.json delete mode 100644 src/libs/brutal-fibers/manifest.json delete mode 100644 src/libs/brutal-fmt/manifest.json delete mode 100644 src/libs/brutal-glob/manifest.json delete mode 100644 src/libs/brutal-hash/manifest.json delete mode 100644 src/libs/brutal-input/manifest.json delete mode 100644 src/libs/brutal-io/manifest.json delete mode 100644 src/libs/brutal-math/manifest.json delete mode 100644 src/libs/brutal-mem/manifest.json delete mode 100644 src/libs/brutal-parse/manifest.json delete mode 100644 src/libs/brutal-sync/manifest.json delete mode 100644 src/libs/brutal-text/manifest.json delete mode 100644 src/libs/brutal-time/manifest.json rename src/libs/{brutal-alloc => brutal/alloc}/base.c (92%) rename src/libs/{brutal-alloc => brutal/alloc}/base.h (95%) rename src/libs/{brutal-alloc => brutal/alloc}/global.c (95%) rename src/libs/{brutal-alloc => brutal/alloc}/global.h (100%) rename src/libs/{brutal-alloc => brutal/alloc}/heap.c (98%) rename src/libs/{brutal-alloc => brutal/alloc}/heap.h (100%) rename src/libs/{brutal-alloc => brutal/alloc}/pool.c (100%) rename src/libs/{brutal-alloc => brutal/alloc}/pool.h (100%) rename src/libs/{brutal-base => brutal/base}/any.h (100%) rename src/libs/{brutal-base => brutal/base}/attributes.h (100%) rename src/libs/{brutal-base => brutal/base}/banned.h (100%) rename src/libs/{brutal-base => brutal/base}/cast.h (100%) rename src/libs/{brutal-base => brutal/base}/clamp.h (100%) rename src/libs/{brutal-base => brutal/base}/count.h (100%) rename src/libs/{brutal-base => brutal/base}/defs.h (100%) rename src/libs/{brutal-base => brutal/base}/endian.h (100%) rename src/libs/{brutal-base => brutal/base}/error.h (100%) rename src/libs/{brutal-base => brutal/base}/iter.h (100%) rename src/libs/{brutal-base => brutal/base}/keywords.h (100%) rename src/libs/{brutal-base => brutal/base}/loc.h (100%) rename src/libs/{brutal-base => brutal/base}/macros.h (100%) rename src/libs/{brutal-base => brutal/base}/map.h (100%) rename src/libs/{brutal-base => brutal/base}/range.h (100%) rename src/libs/{brutal-base => brutal/base}/result.h (100%) rename src/libs/{brutal-base => brutal/base}/slice.h (100%) rename src/libs/{brutal-base => brutal/base}/std.h (100%) rename src/libs/{brutal-base => brutal/base}/str.h (100%) rename src/libs/{brutal-base => brutal/base}/types.h (100%) rename src/libs/{brutal-base => brutal/base}/vaopt.h (100%) rename src/libs/{brutal-cli => brutal/cli}/clear.c (94%) rename src/libs/{brutal-cli => brutal/cli}/clear.h (91%) rename src/libs/{brutal-cli => brutal/cli}/cursor.c (97%) rename src/libs/{brutal-cli => brutal/cli}/cursor.h (94%) rename src/libs/{brutal-cli => brutal/cli}/fmt.c (96%) rename src/libs/{brutal-cli => brutal/cli}/fmt.h (75%) rename src/libs/{brutal-cli => brutal/cli}/spinners.c (95%) rename src/libs/{brutal-cli => brutal/cli}/spinners.h (84%) rename src/libs/{brutal-cli => brutal/cli}/style.c (98%) rename src/libs/{brutal-cli => brutal/cli}/style.h (93%) rename src/libs/{brutal-debug => brutal/debug}/assert.h (99%) rename src/libs/{brutal-debug => brutal/debug}/log.c (96%) rename src/libs/{brutal-debug => brutal/debug}/log.h (92%) rename src/libs/{brutal-ds => brutal/ds}/bits.c (96%) rename src/libs/{brutal-ds => brutal/ds}/bits.h (97%) rename src/libs/{brutal-ds => brutal/ds}/map.c (96%) rename src/libs/{brutal-ds => brutal/ds}/map.h (98%) rename src/libs/{brutal-ds => brutal/ds}/range.c (98%) rename src/libs/{brutal-ds => brutal/ds}/range.h (83%) rename src/libs/{brutal-ds => brutal/ds}/ring.c (97%) rename src/libs/{brutal-ds => brutal/ds}/ring.h (97%) rename src/libs/{brutal-ds => brutal/ds}/slot.c (96%) rename src/libs/{brutal-ds => brutal/ds}/slot.h (98%) rename src/libs/{brutal-ds => brutal/ds}/vec.c (98%) rename src/libs/{brutal-ds => brutal/ds}/vec.h (98%) rename src/libs/{brutal-fibers => brutal/fibers}/fibers.c (97%) rename src/libs/{brutal-fibers => brutal/fibers}/fibers.h (97%) rename src/libs/{brutal-fmt => brutal/fmt}/case.c (99%) rename src/libs/{brutal-fmt => brutal/fmt}/case.h (93%) rename src/libs/{brutal-fmt => brutal/fmt}/fmt.c (98%) rename src/libs/{brutal-fmt => brutal/fmt}/fmt.h (92%) rename src/libs/{brutal-fmt => brutal/fmt}/funcs.c (99%) rename src/libs/{brutal-fmt => brutal/fmt}/funcs.h (100%) rename src/libs/{brutal-glob => brutal/glob}/glob.c (100%) rename src/libs/{brutal-glob => brutal/glob}/glob.h (96%) rename src/libs/{brutal-hash => brutal/hash}/adler32.c (97%) rename src/libs/{brutal-hash => brutal/hash}/adler32.h (90%) rename src/libs/{brutal-hash => brutal/hash}/crc32.c (98%) rename src/libs/{brutal-hash => brutal/hash}/crc32.h (93%) rename src/libs/{brutal-hash => brutal/hash}/fnv.c (100%) rename src/libs/{brutal-hash => brutal/hash}/fnv.h (96%) rename src/libs/{brutal-input => brutal/input}/event.h (94%) rename src/libs/{brutal-input => brutal/input}/keyboard.h (98%) rename src/libs/{brutal-input => brutal/input}/mouse.h (81%) rename src/libs/{brutal-io => brutal/io}/base.c (95%) rename src/libs/{brutal-io => brutal/io}/base.h (84%) rename src/libs/{brutal-io => brutal/io}/bitbuf.h (88%) rename src/libs/{brutal-io => brutal/io}/buf.c (97%) rename src/libs/{brutal-io => brutal/io}/buf.h (97%) rename src/libs/{brutal-io => brutal/io}/chan.c (100%) rename src/libs/{brutal-io => brutal/io}/chan.h (100%) rename src/libs/{brutal-io => brutal/io}/emit.c (95%) rename src/libs/{brutal-io => brutal/io}/emit.h (94%) rename src/libs/{brutal-io => brutal/io}/file.c (100%) rename src/libs/{brutal-io => brutal/io}/file.h (100%) rename src/libs/{brutal-io => brutal/io}/funcs.c (97%) rename src/libs/{brutal-io => brutal/io}/funcs.h (100%) rename src/libs/{brutal-io => brutal/io}/mem.c (94%) rename src/libs/{brutal-io => brutal/io}/mem.h (100%) rename src/libs/{brutal-io => brutal/io}/path.c (100%) rename src/libs/{brutal-io => brutal/io}/path.h (76%) rename src/libs/{brutal-io => brutal/io}/rbits.h (99%) rename src/libs/{brutal-io => brutal/io}/traits.h (100%) rename src/libs/{brutal-io => brutal/io}/wbits.h (100%) rename src/libs/{brutal-io => brutal/io}/window.c (94%) rename src/libs/{brutal-io => brutal/io}/window.h (95%) create mode 100644 src/libs/brutal/manifest.json rename src/libs/{brutal-math => brutal/math}/angle.h (100%) rename src/libs/{brutal-math => brutal/math}/clamp.h (100%) rename src/libs/{brutal-math => brutal/math}/dock.c (100%) rename src/libs/{brutal-math => brutal/math}/dock.h (100%) rename src/libs/{brutal-math => brutal/math}/easing.c (100%) rename src/libs/{brutal-math => brutal/math}/easing.h (100%) rename src/libs/{brutal-math => brutal/math}/edge.h (100%) rename src/libs/{brutal-math => brutal/math}/flow.c (100%) rename src/libs/{brutal-math => brutal/math}/flow.h (100%) rename src/libs/{brutal-math => brutal/math}/funcs.h (100%) rename src/libs/{brutal-math => brutal/math}/gravity.c (100%) rename src/libs/{brutal-math => brutal/math}/gravity.h (96%) rename src/libs/{brutal-math => brutal/math}/orientation.h (100%) rename src/libs/{brutal-math => brutal/math}/rand.c (100%) rename src/libs/{brutal-math => brutal/math}/rand.h (100%) rename src/libs/{brutal-math => brutal/math}/rect.h (99%) rename src/libs/{brutal-math => brutal/math}/spacing.c (100%) rename src/libs/{brutal-math => brutal/math}/spacing.h (100%) rename src/libs/{brutal-math => brutal/math}/trans2.h (100%) rename src/libs/{brutal-math => brutal/math}/vec2.h (100%) rename src/libs/{brutal-mem => brutal/mem}/const.h (100%) rename src/libs/{brutal-mem => brutal/mem}/copy.c (100%) rename src/libs/{brutal-mem => brutal/mem}/funcs.h (100%) rename src/libs/{brutal-mem => brutal/mem}/move.c (100%) rename src/libs/{brutal-mem => brutal/mem}/pages.h (100%) rename src/libs/{brutal-mem => brutal/mem}/set.c (100%) rename src/libs/{brutal-mem => brutal/mem}/units.h (100%) rename src/libs/{brutal-mem => brutal/mem}/volatile.h (100%) rename src/libs/{brutal-parse => brutal/parse}/lex.c (98%) rename src/libs/{brutal-parse => brutal/parse}/lex.h (96%) rename src/libs/{brutal-parse => brutal/parse}/lexeme.h (93%) rename src/libs/{brutal-parse => brutal/parse}/nums.c (100%) rename src/libs/{brutal-parse => brutal/parse}/nums.h (100%) rename src/libs/{brutal-parse => brutal/parse}/scan.c (96%) rename src/libs/{brutal-parse => brutal/parse}/scan.h (98%) rename src/libs/{brutal-sync => brutal/sync}/lock.c (100%) rename src/libs/{brutal-sync => brutal/sync}/lock.h (84%) rename src/libs/{brutal-sync => brutal/sync}/ref.h (95%) rename src/libs/{brutal-sync => brutal/sync}/rwlock.c (93%) rename src/libs/{brutal-sync => brutal/sync}/rwlock.h (100%) rename src/libs/{brutal-task => brutal/task}/task.c (100%) rename src/libs/{brutal-task => brutal/task}/task.h (97%) rename src/libs/{brutal-test => brutal/test}/expect.h (100%) rename src/libs/{brutal-test => brutal/test}/hook-alloc.h (93%) rename src/libs/{brutal-test => brutal/test}/runner.c (97%) rename src/libs/{brutal-test => brutal/test}/runner.h (99%) rename src/libs/{brutal-text => brutal/text}/cp437.c (100%) rename src/libs/{brutal-text => brutal/text}/cp437.h (100%) rename src/libs/{brutal-text => brutal/text}/rune.h (56%) rename src/libs/{brutal-text => brutal/text}/str.c (98%) rename src/libs/{brutal-text => brutal/text}/str.h (88%) rename src/libs/{brutal-text => brutal/text}/utf16.c (93%) rename src/libs/{brutal-text => brutal/text}/utf16.h (100%) rename src/libs/{brutal-text => brutal/text}/utf8.c (99%) rename src/libs/{brutal-text => brutal/text}/utf8.h (91%) rename src/libs/{brutal-text => brutal/text}/vals.h (100%) rename src/libs/{brutal-text => brutal/text}/witty.c (100%) rename src/libs/{brutal-text => brutal/text}/witty.h (100%) rename src/libs/{brutal-time => brutal/time}/constants.h (100%) rename src/libs/{brutal-time => brutal/time}/convert.c (100%) rename src/libs/{brutal-time => brutal/time}/convert.h (100%) rename src/libs/{brutal-time => brutal/time}/query.c (100%) rename src/libs/{brutal-time => brutal/time}/query.h (100%) rename src/libs/{brutal-time => brutal/time}/types.h (92%) diff --git a/src/kernel/arch/riscv64/asm.h b/src/kernel/arch/riscv64/asm.h index a1845b8f6..cc96d6c6c 100644 --- a/src/kernel/arch/riscv64/asm.h +++ b/src/kernel/arch/riscv64/asm.h @@ -1,6 +1,6 @@ #pragma once -#include +#include enum csr_regs { diff --git a/src/kernel/arch/riscv64/boot.c b/src/kernel/arch/riscv64/boot.c index a708afc02..36c68d64d 100644 --- a/src/kernel/arch/riscv64/boot.c +++ b/src/kernel/arch/riscv64/boot.c @@ -1,9 +1,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include "kernel/arch.h" #include "kernel/core/pmm.h" #include "kernel/arch/riscv64/arch.h" diff --git a/src/kernel/arch/riscv64/context.c b/src/kernel/arch/riscv64/context.c index c3a89c472..98793b960 100644 --- a/src/kernel/arch/riscv64/context.c +++ b/src/kernel/arch/riscv64/context.c @@ -1,6 +1,6 @@ "kernel/core/context.h" -#include -#include +#include +#include Context *context_create(void) { diff --git a/src/kernel/arch/riscv64/context.h b/src/kernel/arch/riscv64/context.h index a93ee2e7d..bd758108d 100644 --- a/src/kernel/arch/riscv64/context.h +++ b/src/kernel/arch/riscv64/context.h @@ -1,6 +1,6 @@ #pragma once -#include +#include struct _Context { uintptr_t syscall_kernel_stack; diff --git a/src/kernel/arch/riscv64/cpu.c b/src/kernel/arch/riscv64/cpu.c index 4fda48d56..6a785267f 100644 --- a/src/kernel/arch/riscv64/cpu.c +++ b/src/kernel/arch/riscv64/cpu.c @@ -1,5 +1,5 @@ "kernel/core/cpu.h" -#include +#include #include "kernel/core/heap.h" #include "kernel/core/kernel.h" #include "kernel/arch/riscv64/cpu.h" diff --git a/src/kernel/arch/riscv64/heap.c b/src/kernel/arch/riscv64/heap.c index 4788e560f..78d59cf13 100644 --- a/src/kernel/arch/riscv64/heap.c +++ b/src/kernel/arch/riscv64/heap.c @@ -1,5 +1,5 @@ "kernel/core/heap.h" -#include +#include #include "kernel/core/mmap.h" #include "kernel/core/pmm.h" diff --git a/src/kernel/arch/riscv64/interrupts.c b/src/kernel/arch/riscv64/interrupts.c index bb3c15dff..dc40f2e05 100644 --- a/src/kernel/arch/riscv64/interrupts.c +++ b/src/kernel/arch/riscv64/interrupts.c @@ -1,6 +1,6 @@ #include "kernel/arch/riscv64/interrupts.h" -#include -#include +#include +#include #include "kernel/arch/riscv64/asm.h" extern void interrupt_common(void); diff --git a/src/kernel/arch/riscv64/interrupts.h b/src/kernel/arch/riscv64/interrupts.h index ae2ff8b82..07eb3e04a 100644 --- a/src/kernel/arch/riscv64/interrupts.h +++ b/src/kernel/arch/riscv64/interrupts.h @@ -1,6 +1,6 @@ #pragma once -#include +#include typedef struct { diff --git a/src/kernel/arch/riscv64/sifive_uart.c b/src/kernel/arch/riscv64/sifive_uart.c index 28ef9f4ee..7da198430 100644 --- a/src/kernel/arch/riscv64/sifive_uart.c +++ b/src/kernel/arch/riscv64/sifive_uart.c @@ -1,5 +1,5 @@ #include "kernel/arch/riscv64/sifive_uart.h" -#include +#include static Uart _self; diff --git a/src/kernel/arch/riscv64/uart8250.c b/src/kernel/arch/riscv64/uart8250.c index 9a2447a22..ed9717ea9 100644 --- a/src/kernel/arch/riscv64/uart8250.c +++ b/src/kernel/arch/riscv64/uart8250.c @@ -1,6 +1,6 @@ #include "kernel/arch/riscv64/uart8250.h" -#include -#include +#include +#include static Uart _self; diff --git a/src/kernel/arch/riscv64/vmm.c b/src/kernel/arch/riscv64/vmm.c index 7c455e780..415cea882 100644 --- a/src/kernel/arch/riscv64/vmm.c +++ b/src/kernel/arch/riscv64/vmm.c @@ -1,6 +1,6 @@ "kernel/core/vmm.h" -#include -#include +#include +#include #include "kernel/core/heap.h" #include "kernel/core/mmap.h" #include "kernel/arch/riscv64/asm.h" diff --git a/src/kernel/arch/x86_64/apic.c b/src/kernel/arch/x86_64/apic.c index 1c66dc016..966ce2c40 100644 --- a/src/kernel/arch/x86_64/apic.c +++ b/src/kernel/arch/x86_64/apic.c @@ -1,7 +1,7 @@ #include -#include +#include #include -#include +#include #include "kernel/core/mmap.h" #include "kernel/arch/x86_64/apic.h" #include "kernel/arch/x86_64/asm.h" diff --git a/src/kernel/arch/x86_64/arch.c b/src/kernel/arch/x86_64/arch.c index 3bedfe208..d5527025a 100644 --- a/src/kernel/arch/x86_64/arch.c +++ b/src/kernel/arch/x86_64/arch.c @@ -2,7 +2,7 @@ #include "kernel/core/cpu.h" #include "kernel/arch/x86_64/apic.h" #include "kernel/arch/x86_64/asm.h" -#include +#include #include "kernel/arch/x86_64/cmos.h" #include "kernel/arch/x86_64/com.h" #include "kernel/arch/x86_64/smp.h" diff --git a/src/kernel/arch/x86_64/asm.h b/src/kernel/arch/x86_64/asm.h index a0e57a428..65b14e06b 100644 --- a/src/kernel/arch/x86_64/asm.h +++ b/src/kernel/arch/x86_64/asm.h @@ -1,6 +1,6 @@ #pragma once -#include +#include static inline void asm_cli(void) { asm volatile("cli"); } diff --git a/src/kernel/arch/x86_64/boot.c b/src/kernel/arch/x86_64/boot.c index b6022ca1f..80cd1ea25 100644 --- a/src/kernel/arch/x86_64/boot.c +++ b/src/kernel/arch/x86_64/boot.c @@ -1,4 +1,4 @@ -#include +#include #include "kernel/core/arch.h" #include "kernel/core/event.h" #include "kernel/core/init.h" diff --git a/src/kernel/arch/x86_64/cmos.c b/src/kernel/arch/x86_64/cmos.c index a74e02a19..e282e57ce 100644 --- a/src/kernel/arch/x86_64/cmos.c +++ b/src/kernel/arch/x86_64/cmos.c @@ -1,6 +1,6 @@ #include "kernel/arch/x86_64/cmos.h" -#include -#include +#include +#include #include "kernel/arch/x86_64/asm.h" static Lock _lock; diff --git a/src/kernel/arch/x86_64/cmos.h b/src/kernel/arch/x86_64/cmos.h index 53822c10d..bf3dffae7 100644 --- a/src/kernel/arch/x86_64/cmos.h +++ b/src/kernel/arch/x86_64/cmos.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #define CMOS_ADDRESS 0x70 #define CMOS_DATA 0x71 diff --git a/src/kernel/arch/x86_64/com.c b/src/kernel/arch/x86_64/com.c index 852c2f398..5283d109e 100644 --- a/src/kernel/arch/x86_64/com.c +++ b/src/kernel/arch/x86_64/com.c @@ -1,4 +1,4 @@ -#include +#include #include "kernel/arch/x86_64/com.h" #include "kernel/arch/x86_64/asm.h" diff --git a/src/kernel/arch/x86_64/com.h b/src/kernel/arch/x86_64/com.h index 133fd4ab0..457ce0320 100644 --- a/src/kernel/arch/x86_64/com.h +++ b/src/kernel/arch/x86_64/com.h @@ -1,6 +1,6 @@ #pragma once -#include +#include enum com_port { diff --git a/src/kernel/arch/x86_64/context.c b/src/kernel/arch/x86_64/context.c index ff2ad3dbe..f9e1f5270 100644 --- a/src/kernel/arch/x86_64/context.c +++ b/src/kernel/arch/x86_64/context.c @@ -1,6 +1,6 @@ #include "kernel/core/context.h" -#include -#include +#include +#include #include "kernel/arch/x86_64/asm.h" #include "kernel/arch/x86_64/gdt.h" #include "kernel/arch/x86_64/simd.h" diff --git a/src/kernel/arch/x86_64/context.h b/src/kernel/arch/x86_64/context.h index 7bcdd775a..d5db9db6d 100644 --- a/src/kernel/arch/x86_64/context.h +++ b/src/kernel/arch/x86_64/context.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include "kernel/arch/x86_64/interrupts.h" struct _Context diff --git a/src/kernel/arch/x86_64/cpu.c b/src/kernel/arch/x86_64/cpu.c index ee1df39b7..975318f99 100644 --- a/src/kernel/arch/x86_64/cpu.c +++ b/src/kernel/arch/x86_64/cpu.c @@ -1,5 +1,5 @@ #include "kernel/core/cpu.h" -#include +#include #include "kernel/core/heap.h" #include "kernel/core/kernel.h" #include "kernel/arch/x86_64/apic.h" diff --git a/src/kernel/arch/x86_64/cpuid.c b/src/kernel/arch/x86_64/cpuid.c index 06920e936..2e79ce466 100644 --- a/src/kernel/arch/x86_64/cpuid.c +++ b/src/kernel/arch/x86_64/cpuid.c @@ -1,5 +1,5 @@ #include "kernel/arch/x86_64/cpuid.h" -#include +#include CpuidResult cpuid(uint32_t leaf, uint32_t subleaf) { diff --git a/src/kernel/arch/x86_64/cpuid.h b/src/kernel/arch/x86_64/cpuid.h index 855bda473..343b1d55c 100644 --- a/src/kernel/arch/x86_64/cpuid.h +++ b/src/kernel/arch/x86_64/cpuid.h @@ -1,6 +1,6 @@ #pragma once -#include +#include // doc: https://www.amd.com/system/files/TechDocs/25481.pdf diff --git a/src/kernel/arch/x86_64/gdt.c b/src/kernel/arch/x86_64/gdt.c index 5f4975b1a..74cc1b6d0 100644 --- a/src/kernel/arch/x86_64/gdt.c +++ b/src/kernel/arch/x86_64/gdt.c @@ -1,5 +1,5 @@ #include "kernel/arch/x86_64/gdt.h" -#include +#include static Tss _tss = { .reserved = 0, diff --git a/src/kernel/arch/x86_64/gdt.h b/src/kernel/arch/x86_64/gdt.h index 5eeeb3f4e..add1e965f 100644 --- a/src/kernel/arch/x86_64/gdt.h +++ b/src/kernel/arch/x86_64/gdt.h @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include +#include #define GDT_ENTRY_COUNT 5 #define GDT_SEGMENT (0b00010000) diff --git a/src/kernel/arch/x86_64/heap.c b/src/kernel/arch/x86_64/heap.c index e7a10ae8e..81e20f32c 100644 --- a/src/kernel/arch/x86_64/heap.c +++ b/src/kernel/arch/x86_64/heap.c @@ -1,7 +1,7 @@ #include "kernel/core/heap.h" -#include -#include -#include +#include +#include +#include #include "kernel/core/mmap.h" #include "kernel/core/pmm.h" diff --git a/src/kernel/arch/x86_64/hpet.c b/src/kernel/arch/x86_64/hpet.c index b253fa14e..e7bc44a1e 100644 --- a/src/kernel/arch/x86_64/hpet.c +++ b/src/kernel/arch/x86_64/hpet.c @@ -1,7 +1,7 @@ #include #include -#include -#include +#include +#include #include "kernel/arch/x86_64/hpet.h" diff --git a/src/kernel/arch/x86_64/idt.h b/src/kernel/arch/x86_64/idt.h index 3c06ca93f..2ffc2c253 100644 --- a/src/kernel/arch/x86_64/idt.h +++ b/src/kernel/arch/x86_64/idt.h @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include +#include diff --git a/src/kernel/arch/x86_64/interrupts.c b/src/kernel/arch/x86_64/interrupts.c index 15d1ffbee..d6804cb40 100644 --- a/src/kernel/arch/x86_64/interrupts.c +++ b/src/kernel/arch/x86_64/interrupts.c @@ -1,6 +1,6 @@ -#include -#include -#include +#include +#include +#include #include "kernel/arch/x86_64/apic.h" #include "kernel/arch/x86_64/asm.h" diff --git a/src/kernel/arch/x86_64/interrupts.h b/src/kernel/arch/x86_64/interrupts.h index b3dc94ef2..b07718267 100644 --- a/src/kernel/arch/x86_64/interrupts.h +++ b/src/kernel/arch/x86_64/interrupts.h @@ -1,6 +1,6 @@ #pragma once -#include +#include typedef struct PACKED { diff --git a/src/kernel/arch/x86_64/manifest.json b/src/kernel/arch/x86_64/manifest.json index 2a8e66270..233a02ee4 100644 --- a/src/kernel/arch/x86_64/manifest.json +++ b/src/kernel/arch/x86_64/manifest.json @@ -4,14 +4,9 @@ "type": "lib", "requires": [ "embed-system", - "brutal-mem", - "brutal-debug", - "brutal-sync", - "brutal-base", + "brutal", "bal-handover", - "brutal-time", - "acpi", - "brutal-alloc" + "acpi" ], "provides": [ "kernel-arch" diff --git a/src/kernel/arch/x86_64/paging.h b/src/kernel/arch/x86_64/paging.h index 86da7e169..6a0684840 100644 --- a/src/kernel/arch/x86_64/paging.h +++ b/src/kernel/arch/x86_64/paging.h @@ -1,8 +1,8 @@ #pragma once #include -#include -#include +#include +#include typedef union PACKED { diff --git a/src/kernel/arch/x86_64/simd.c b/src/kernel/arch/x86_64/simd.c index becdc0383..33a633002 100644 --- a/src/kernel/arch/x86_64/simd.c +++ b/src/kernel/arch/x86_64/simd.c @@ -1,6 +1,6 @@ -#include -#include -#include +#include +#include +#include #include "kernel/arch/x86_64/asm.h" #include "kernel/arch/x86_64/cpuid.h" diff --git a/src/kernel/arch/x86_64/simd.h b/src/kernel/arch/x86_64/simd.h index 2757caeca..e8b060af8 100644 --- a/src/kernel/arch/x86_64/simd.h +++ b/src/kernel/arch/x86_64/simd.h @@ -1,6 +1,6 @@ #pragma once -#include +#include void simd_initialize(void); diff --git a/src/kernel/arch/x86_64/smp.c b/src/kernel/arch/x86_64/smp.c index d2a881385..35377731c 100644 --- a/src/kernel/arch/x86_64/smp.c +++ b/src/kernel/arch/x86_64/smp.c @@ -1,7 +1,7 @@ -#include -#include -#include -#include +#include +#include +#include +#include #include #include "kernel/arch/x86_64/apic.h" diff --git a/src/kernel/arch/x86_64/syscall.c b/src/kernel/arch/x86_64/syscall.c index 8525b4b0d..d72bc10a1 100644 --- a/src/kernel/arch/x86_64/syscall.c +++ b/src/kernel/arch/x86_64/syscall.c @@ -1,5 +1,5 @@ #include "kernel/arch/x86_64/syscall.h" -#include +#include #include "kernel/core/heap.h" #include "kernel/core/kernel.h" #include "kernel/core/syscalls.h" diff --git a/src/kernel/arch/x86_64/syscall.h b/src/kernel/arch/x86_64/syscall.h index 4d32b7185..fe43e98ef 100644 --- a/src/kernel/arch/x86_64/syscall.h +++ b/src/kernel/arch/x86_64/syscall.h @@ -1,6 +1,6 @@ #pragma once -#include +#include void syscall_initialize(void); diff --git a/src/kernel/arch/x86_64/vmm.c b/src/kernel/arch/x86_64/vmm.c index 12b5da2b4..31f3cc211 100644 --- a/src/kernel/arch/x86_64/vmm.c +++ b/src/kernel/arch/x86_64/vmm.c @@ -1,9 +1,9 @@ #include "kernel/core/vmm.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "kernel/arch/x86_64/asm.h" #include "kernel/arch/x86_64/paging.h" diff --git a/src/kernel/core/arch.h b/src/kernel/core/arch.h index 6389a45bf..3671fadef 100644 --- a/src/kernel/core/arch.h +++ b/src/kernel/core/arch.h @@ -2,7 +2,7 @@ #include #include -#include +#include #include "kernel/core/tasking.h" diff --git a/src/kernel/core/channel.c b/src/kernel/core/channel.c index f4ef48edd..aedf28873 100644 --- a/src/kernel/core/channel.c +++ b/src/kernel/core/channel.c @@ -1,7 +1,7 @@ #include "kernel/core/channel.h" -#include -#include -#include +#include +#include +#include #include "kernel/core/kernel.h" #include "kernel/core/sched.h" diff --git a/src/kernel/core/channel.h b/src/kernel/core/channel.h index cf272950c..8e2b2a049 100644 --- a/src/kernel/core/channel.h +++ b/src/kernel/core/channel.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include "kernel/core/parcel.h" typedef struct diff --git a/src/kernel/core/cpu.c b/src/kernel/core/cpu.c index ee32b54bc..a8b75cd5f 100644 --- a/src/kernel/core/cpu.c +++ b/src/kernel/core/cpu.c @@ -1,5 +1,5 @@ #include "kernel/core/cpu.h" -#include +#include void cpu_begin_interrupt(void) { diff --git a/src/kernel/core/domain.c b/src/kernel/core/domain.c index 81939452f..d3465a1b4 100644 --- a/src/kernel/core/domain.c +++ b/src/kernel/core/domain.c @@ -1,5 +1,5 @@ #include "kernel/core/domain.h" -#include +#include void domain_destroy(Domain *self) { diff --git a/src/kernel/core/domain.h b/src/kernel/core/domain.h index c7a6570be..cf2cafc9c 100644 --- a/src/kernel/core/domain.h +++ b/src/kernel/core/domain.h @@ -1,7 +1,7 @@ #pragma once #include "kernel/core/object.h" -#include +#include typedef struct { diff --git a/src/kernel/core/event.c b/src/kernel/core/event.c index d9dd6268f..772a24274 100644 --- a/src/kernel/core/event.c +++ b/src/kernel/core/event.c @@ -1,6 +1,6 @@ #include "kernel/core/event.h" -#include -#include +#include +#include static RwLock _lock = {}; static Vec(EventBinding) _bindings = {}; diff --git a/src/kernel/core/init.c b/src/kernel/core/init.c index 4f732af80..d3f4f3c0c 100644 --- a/src/kernel/core/init.c +++ b/src/kernel/core/init.c @@ -1,7 +1,7 @@ -#include -#include -#include -#include +#include +#include +#include +#include #include "kernel/core/heap.h" #include "kernel/core/init.h" diff --git a/src/kernel/core/kernel.c b/src/kernel/core/kernel.c index 923834921..0986b033e 100644 --- a/src/kernel/core/kernel.c +++ b/src/kernel/core/kernel.c @@ -1,4 +1,4 @@ -#include +#include void kernel_splash(void) { diff --git a/src/kernel/core/manifest.json b/src/kernel/core/manifest.json index 73e868cae..92bc772cd 100644 --- a/src/kernel/core/manifest.json +++ b/src/kernel/core/manifest.json @@ -3,17 +3,11 @@ "description": "The Brutal Microkernel core", "type": "exe", "requires": [ - "brutal-debug", + "brutal", "kernel-arch", "bal-handover", - "brutal-base", - "brutal-alloc", - "brutal-sync", - "brutal-mem", "elf", "embed-system", - "brutal-ds", - "brutal-io", "handover", "libc" ] diff --git a/src/kernel/core/memory.c b/src/kernel/core/memory.c index f42bc74b4..411e8c83d 100644 --- a/src/kernel/core/memory.c +++ b/src/kernel/core/memory.c @@ -1,6 +1,6 @@ #include "kernel/core/memory.h" -#include -#include +#include +#include void memory_destroy(Memory *self) { diff --git a/src/kernel/core/mmap.h b/src/kernel/core/mmap.h index 752df23bc..da8ad5f4b 100644 --- a/src/kernel/core/mmap.h +++ b/src/kernel/core/mmap.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #if defined(__x86_64) # define MMAP_IO_BASE (0xffff800000000000) diff --git a/src/kernel/core/object.c b/src/kernel/core/object.c index e812a18c6..2bef19658 100644 --- a/src/kernel/core/object.c +++ b/src/kernel/core/object.c @@ -1,6 +1,6 @@ #include "kernel/core/object.h" -#include -#include +#include +#include static _Atomic BrHandle _id = 1; static _Atomic bool _init = false; diff --git a/src/kernel/core/object.h b/src/kernel/core/object.h index 0e8e2a8cd..94dc5004e 100644 --- a/src/kernel/core/object.h +++ b/src/kernel/core/object.h @@ -1,9 +1,9 @@ #pragma once #include -#include -#include -#include +#include +#include +#include typedef void ObjectDtor(void *object); diff --git a/src/kernel/core/pmm.c b/src/kernel/core/pmm.c index a0356e035..988c75885 100644 --- a/src/kernel/core/pmm.c +++ b/src/kernel/core/pmm.c @@ -1,12 +1,12 @@ #include "kernel/core/pmm.h" -#include -#include -#include -#include -#include - -#include -#include +#include +#include +#include +#include +#include + +#include +#include #include "kernel/core/arch.h" #include "kernel/core/mmap.h" diff --git a/src/kernel/core/sched.c b/src/kernel/core/sched.c index 8123f7085..9f10f4381 100644 --- a/src/kernel/core/sched.c +++ b/src/kernel/core/sched.c @@ -1,6 +1,6 @@ #include "kernel/core/sched.h" -#include -#include +#include +#include #include "kernel/core/arch.h" #include "kernel/core/cpu.h" diff --git a/src/kernel/core/space.c b/src/kernel/core/space.c index 6c51a9ae5..df5b8874b 100644 --- a/src/kernel/core/space.c +++ b/src/kernel/core/space.c @@ -1,6 +1,6 @@ #include "kernel/core/space.h" -#include -#include +#include +#include /* --- Memory Mappings ------------------------------------------------------ */ diff --git a/src/kernel/core/space.h b/src/kernel/core/space.h index a3091f8e6..321aee6c1 100644 --- a/src/kernel/core/space.h +++ b/src/kernel/core/space.h @@ -2,7 +2,7 @@ #include "kernel/core/memory.h" #include "kernel/core/vmm.h" -#include +#include typedef struct { diff --git a/src/kernel/core/syscalls.c b/src/kernel/core/syscalls.c index 8d38a4e25..a3f24a6c0 100644 --- a/src/kernel/core/syscalls.c +++ b/src/kernel/core/syscalls.c @@ -1,6 +1,6 @@ #include -#include -#include +#include +#include #include #include "kernel/core/arch.h" diff --git a/src/kernel/core/task.c b/src/kernel/core/task.c index 35234f802..97b0929ca 100644 --- a/src/kernel/core/task.c +++ b/src/kernel/core/task.c @@ -1,6 +1,6 @@ #include "kernel/core/task.h" -#include -#include +#include +#include #include "kernel/core/cpu.h" #include "kernel/core/event.h" #include "kernel/core/kernel.h" diff --git a/src/kernel/core/task.h b/src/kernel/core/task.h index 5c23416ff..b20ceaabc 100644 --- a/src/kernel/core/task.h +++ b/src/kernel/core/task.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include #include "kernel/core/channel.h" #include "kernel/core/context.h" diff --git a/src/kernel/core/tasking.c b/src/kernel/core/tasking.c index bd2e1dbf7..641ddc963 100644 --- a/src/kernel/core/tasking.c +++ b/src/kernel/core/tasking.c @@ -1,5 +1,5 @@ #include "kernel/core/tasking.h" -#include +#include #include "kernel/core/arch.h" #include "kernel/core/sched.h" #include "kernel/core/task.h" diff --git a/src/libs/bal/abi/helpers.c b/src/libs/bal/abi/helpers.c index 9eaf5ca77..9d118fd4a 100644 --- a/src/libs/bal/abi/helpers.c +++ b/src/libs/bal/abi/helpers.c @@ -1,3 +1,3 @@ #include -#include +#include diff --git a/src/libs/bal/abi/helpers.h b/src/libs/bal/abi/helpers.h index dd8c546ac..95d0d185e 100644 --- a/src/libs/bal/abi/helpers.h +++ b/src/libs/bal/abi/helpers.h @@ -1,8 +1,8 @@ #pragma once #include -#include -#include +#include +#include static inline char const *br_syscall_to_string(BrSyscall syscall) { diff --git a/src/libs/bal/abi/manifest.json b/src/libs/bal/abi/manifest.json index 96299be29..620c95018 100644 --- a/src/libs/bal/abi/manifest.json +++ b/src/libs/bal/abi/manifest.json @@ -3,6 +3,6 @@ "type": "lib", "description": "Brutal kernel abstraction layer ABI", "requires": [ - "brutal-debug" + "brutal" ] } \ No newline at end of file diff --git a/src/libs/bal/abi/types.h b/src/libs/bal/abi/types.h index c646791f4..69672751f 100644 --- a/src/libs/bal/abi/types.h +++ b/src/libs/bal/abi/types.h @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include +#include /* --- Syscalls IDs --------------------------------------------------------- */ diff --git a/src/libs/bal/boot/handover.c b/src/libs/bal/boot/handover.c index f362cae82..5113faa92 100644 --- a/src/libs/bal/boot/handover.c +++ b/src/libs/bal/boot/handover.c @@ -1,6 +1,6 @@ -#include -#include -#include +#include +#include +#include #include diff --git a/src/libs/bal/boot/handover.h b/src/libs/bal/boot/handover.h index 18c5ef886..930763a04 100644 --- a/src/libs/bal/boot/handover.h +++ b/src/libs/bal/boot/handover.h @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include +#include // "handover" in ascii #define HANDOVER_TAG 0x68616e646f766572 diff --git a/src/libs/bal/hw/io.c b/src/libs/bal/hw/io.c index ccb09d74f..e73a7af07 100644 --- a/src/libs/bal/hw/io.c +++ b/src/libs/bal/hw/io.c @@ -1,7 +1,7 @@ #include #include -#include -#include +#include +#include BalIo bal_io_mem(BalMem *mem) { diff --git a/src/libs/bal/hw/io.h b/src/libs/bal/hw/io.h index 65eb64af1..a52450402 100644 --- a/src/libs/bal/hw/io.h +++ b/src/libs/bal/hw/io.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include typedef enum { diff --git a/src/libs/bal/hw/mem.c b/src/libs/bal/hw/mem.c index 04afbce1b..9fcb01e0c 100644 --- a/src/libs/bal/hw/mem.c +++ b/src/libs/bal/hw/mem.c @@ -1,6 +1,6 @@ #include -#include -#include +#include +#include MaybeError bal_mem_init_mobj(BalMem *self, BrHandle handle) { diff --git a/src/libs/bal/hw/mem.h b/src/libs/bal/hw/mem.h index f801d01ec..6862fd51f 100644 --- a/src/libs/bal/hw/mem.h +++ b/src/libs/bal/hw/mem.h @@ -3,7 +3,7 @@ #include #include #include -#include +#include typedef struct diff --git a/src/libs/bal/task/exec.c b/src/libs/bal/task/exec.c index 66ba88c2e..8c27dce8b 100644 --- a/src/libs/bal/task/exec.c +++ b/src/libs/bal/task/exec.c @@ -1,11 +1,11 @@ #include #include -#include -#include +#include +#include -#include -#include +#include +#include #include diff --git a/src/libs/brutal-alloc/manifest.json b/src/libs/brutal-alloc/manifest.json deleted file mode 100644 index ac4f8b39f..000000000 --- a/src/libs/brutal-alloc/manifest.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "id": "brutal-alloc", - "type": "lib", - "description": "Brutal memory allocation", - "requires": [ - "embed-system", - "brutal-debug", - "brutal-base", - "brutal-mem" - ] -} \ No newline at end of file diff --git a/src/libs/brutal-base/manifest.json b/src/libs/brutal-base/manifest.json deleted file mode 100644 index fa4332fd9..000000000 --- a/src/libs/brutal-base/manifest.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "id": "brutal-base", - "type": "lib", - "description": "Brutal base and utility library" -} \ No newline at end of file diff --git a/src/libs/brutal-cli/manifest.json b/src/libs/brutal-cli/manifest.json deleted file mode 100644 index 2bf9f6d13..000000000 --- a/src/libs/brutal-cli/manifest.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "id": "brutal-cli", - "type": "lib", - "description": "Brutal command line interface utility library", - "requires": [ - "brutal-fmt", - "brutal-io", - "brutal-time", - "brutal-base", - "brutal-parse" - ] -} \ No newline at end of file diff --git a/src/libs/brutal-debug/manifest.json b/src/libs/brutal-debug/manifest.json deleted file mode 100644 index b09d009fe..000000000 --- a/src/libs/brutal-debug/manifest.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "id": "brutal-debug", - "type": "lib", - "description": "Brutal debugging utility library", - "requires": [ - "brutal-base", - "brutal-fmt", - "embed-system" - ] -} \ No newline at end of file diff --git a/src/libs/brutal-ds/manifest.json b/src/libs/brutal-ds/manifest.json deleted file mode 100644 index 525555846..000000000 --- a/src/libs/brutal-ds/manifest.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "id": "brutal-ds", - "type": "lib", - "description": "Brutal data structures utility library", - "requires": [ - "brutal-mem", - "brutal-debug", - "brutal-base", - "brutal-hash", - "brutal-alloc" - ] -} \ No newline at end of file diff --git a/src/libs/brutal-fibers/manifest.json b/src/libs/brutal-fibers/manifest.json deleted file mode 100644 index 6a1128a10..000000000 --- a/src/libs/brutal-fibers/manifest.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "id": "brutal-fibers", - "type": "lib", - "description": "Brutal fibers/coroutines utility library", - "requires": [ - "brutal-alloc", - "brutal-time", - "brutal-base" - ] -} \ No newline at end of file diff --git a/src/libs/brutal-fmt/manifest.json b/src/libs/brutal-fmt/manifest.json deleted file mode 100644 index 0120298c7..000000000 --- a/src/libs/brutal-fmt/manifest.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "id": "brutal-fmt", - "type": "lib", - "description": "Brutal text format utility library", - "requires": [ - "brutal-parse", - "brutal-text", - "brutal-debug", - "brutal-io", - "libc", - "brutal-alloc" - ] -} \ No newline at end of file diff --git a/src/libs/brutal-glob/manifest.json b/src/libs/brutal-glob/manifest.json deleted file mode 100644 index d86d617cc..000000000 --- a/src/libs/brutal-glob/manifest.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "brutal-glob", - "type": "lib", - "description": "Brutal text 'regex' utility library", - "requires": [ - "brutal-parse" - ] -} \ No newline at end of file diff --git a/src/libs/brutal-hash/manifest.json b/src/libs/brutal-hash/manifest.json deleted file mode 100644 index ddc3a0e27..000000000 --- a/src/libs/brutal-hash/manifest.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "brutal-hash", - "type": "lib", - "description": "Brutal hashing utility library", - "requires": [ - "brutal-base" - ] -} \ No newline at end of file diff --git a/src/libs/brutal-input/manifest.json b/src/libs/brutal-input/manifest.json deleted file mode 100644 index 235f75af8..000000000 --- a/src/libs/brutal-input/manifest.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "id": "brutal-input", - "type": "lib", - "description": "Brutal user input utility library", - "requires": [ - "brutal-math", - "brutal-base", - "brutal-text" - ] -} \ No newline at end of file diff --git a/src/libs/brutal-io/manifest.json b/src/libs/brutal-io/manifest.json deleted file mode 100644 index 1e4b3e758..000000000 --- a/src/libs/brutal-io/manifest.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "id": "brutal-io", - "type": "lib", - "description": "Brutal input/output utility library", - "requires": [ - "brutal-debug", - "brutal-base", - "brutal-math", - "brutal-alloc", - "embed-system", - "brutal-text" - ] -} \ No newline at end of file diff --git a/src/libs/brutal-math/manifest.json b/src/libs/brutal-math/manifest.json deleted file mode 100644 index ac140d85c..000000000 --- a/src/libs/brutal-math/manifest.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "brutal-math", - "type": "lib", - "description": "Brutal math utility library", - "requires": [ - "embed-system" - ] -} \ No newline at end of file diff --git a/src/libs/brutal-mem/manifest.json b/src/libs/brutal-mem/manifest.json deleted file mode 100644 index b8540bd25..000000000 --- a/src/libs/brutal-mem/manifest.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "brutal-mem", - "type": "lib", - "description": "Brutal memory utility library", - "requires": [ - "embed-arch" - ] -} \ No newline at end of file diff --git a/src/libs/brutal-parse/manifest.json b/src/libs/brutal-parse/manifest.json deleted file mode 100644 index ec2c034bb..000000000 --- a/src/libs/brutal-parse/manifest.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "id": "brutal-parse", - "type": "lib", - "description": "Brutal parsing utility library", - "requires": [ - "brutal-ds", - "brutal-text", - "brutal-debug", - "brutal-alloc", - "brutal-mem" - ] -} \ No newline at end of file diff --git a/src/libs/brutal-sync/manifest.json b/src/libs/brutal-sync/manifest.json deleted file mode 100644 index 4536c2ef5..000000000 --- a/src/libs/brutal-sync/manifest.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "id": "brutal-sync", - "type": "lib", - "description": "Brutal locking utility library", - "requires": [ - "embed-system", - "brutal-debug" - ] -} \ No newline at end of file diff --git a/src/libs/brutal-text/manifest.json b/src/libs/brutal-text/manifest.json deleted file mode 100644 index 1684d5006..000000000 --- a/src/libs/brutal-text/manifest.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "id": "brutal-text", - "type": "lib", - "description": "Brutal text interaction utility library", - "requires": [ - "brutal-alloc", - "brutal-mem" - ] -} \ No newline at end of file diff --git a/src/libs/brutal-time/manifest.json b/src/libs/brutal-time/manifest.json deleted file mode 100644 index 3b2794132..000000000 --- a/src/libs/brutal-time/manifest.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "brutal-time", - "type": "lib", - "description": "Brutal time utility library", - "requires": [ - "embed-system" - ] -} \ No newline at end of file diff --git a/src/libs/brutal-alloc/base.c b/src/libs/brutal/alloc/base.c similarity index 92% rename from src/libs/brutal-alloc/base.c rename to src/libs/brutal/alloc/base.c index 8f448a337..944b3471d 100644 --- a/src/libs/brutal-alloc/base.c +++ b/src/libs/brutal/alloc/base.c @@ -1,6 +1,6 @@ #include "base.h" -#include +#include void *alloc_malloc(Alloc *self, size_t size) { diff --git a/src/libs/brutal-alloc/base.h b/src/libs/brutal/alloc/base.h similarity index 95% rename from src/libs/brutal-alloc/base.h rename to src/libs/brutal/alloc/base.h index 01ba13448..cac7877bb 100644 --- a/src/libs/brutal-alloc/base.h +++ b/src/libs/brutal/alloc/base.h @@ -1,8 +1,8 @@ #pragma once -#include -#include -#include +#include +#include +#include typedef struct _Alloc Alloc; diff --git a/src/libs/brutal-alloc/global.c b/src/libs/brutal/alloc/global.c similarity index 95% rename from src/libs/brutal-alloc/global.c rename to src/libs/brutal/alloc/global.c index f8b7f31fb..4b6df9f99 100644 --- a/src/libs/brutal-alloc/global.c +++ b/src/libs/brutal/alloc/global.c @@ -1,5 +1,5 @@ #include -#include +#include #include "global.h" #include "heap.h" diff --git a/src/libs/brutal-alloc/global.h b/src/libs/brutal/alloc/global.h similarity index 100% rename from src/libs/brutal-alloc/global.h rename to src/libs/brutal/alloc/global.h diff --git a/src/libs/brutal-alloc/heap.c b/src/libs/brutal/alloc/heap.c similarity index 98% rename from src/libs/brutal-alloc/heap.c rename to src/libs/brutal/alloc/heap.c index 000870820..121dc403f 100644 --- a/src/libs/brutal-alloc/heap.c +++ b/src/libs/brutal/alloc/heap.c @@ -1,7 +1,7 @@ -#include -#include -#include -#include +#include +#include +#include +#include #include #include "heap.h" diff --git a/src/libs/brutal-alloc/heap.h b/src/libs/brutal/alloc/heap.h similarity index 100% rename from src/libs/brutal-alloc/heap.h rename to src/libs/brutal/alloc/heap.h diff --git a/src/libs/brutal-alloc/pool.c b/src/libs/brutal/alloc/pool.c similarity index 100% rename from src/libs/brutal-alloc/pool.c rename to src/libs/brutal/alloc/pool.c diff --git a/src/libs/brutal-alloc/pool.h b/src/libs/brutal/alloc/pool.h similarity index 100% rename from src/libs/brutal-alloc/pool.h rename to src/libs/brutal/alloc/pool.h diff --git a/src/libs/brutal-base/any.h b/src/libs/brutal/base/any.h similarity index 100% rename from src/libs/brutal-base/any.h rename to src/libs/brutal/base/any.h diff --git a/src/libs/brutal-base/attributes.h b/src/libs/brutal/base/attributes.h similarity index 100% rename from src/libs/brutal-base/attributes.h rename to src/libs/brutal/base/attributes.h diff --git a/src/libs/brutal-base/banned.h b/src/libs/brutal/base/banned.h similarity index 100% rename from src/libs/brutal-base/banned.h rename to src/libs/brutal/base/banned.h diff --git a/src/libs/brutal-base/cast.h b/src/libs/brutal/base/cast.h similarity index 100% rename from src/libs/brutal-base/cast.h rename to src/libs/brutal/base/cast.h diff --git a/src/libs/brutal-base/clamp.h b/src/libs/brutal/base/clamp.h similarity index 100% rename from src/libs/brutal-base/clamp.h rename to src/libs/brutal/base/clamp.h diff --git a/src/libs/brutal-base/count.h b/src/libs/brutal/base/count.h similarity index 100% rename from src/libs/brutal-base/count.h rename to src/libs/brutal/base/count.h diff --git a/src/libs/brutal-base/defs.h b/src/libs/brutal/base/defs.h similarity index 100% rename from src/libs/brutal-base/defs.h rename to src/libs/brutal/base/defs.h diff --git a/src/libs/brutal-base/endian.h b/src/libs/brutal/base/endian.h similarity index 100% rename from src/libs/brutal-base/endian.h rename to src/libs/brutal/base/endian.h diff --git a/src/libs/brutal-base/error.h b/src/libs/brutal/base/error.h similarity index 100% rename from src/libs/brutal-base/error.h rename to src/libs/brutal/base/error.h diff --git a/src/libs/brutal-base/iter.h b/src/libs/brutal/base/iter.h similarity index 100% rename from src/libs/brutal-base/iter.h rename to src/libs/brutal/base/iter.h diff --git a/src/libs/brutal-base/keywords.h b/src/libs/brutal/base/keywords.h similarity index 100% rename from src/libs/brutal-base/keywords.h rename to src/libs/brutal/base/keywords.h diff --git a/src/libs/brutal-base/loc.h b/src/libs/brutal/base/loc.h similarity index 100% rename from src/libs/brutal-base/loc.h rename to src/libs/brutal/base/loc.h diff --git a/src/libs/brutal-base/macros.h b/src/libs/brutal/base/macros.h similarity index 100% rename from src/libs/brutal-base/macros.h rename to src/libs/brutal/base/macros.h diff --git a/src/libs/brutal-base/map.h b/src/libs/brutal/base/map.h similarity index 100% rename from src/libs/brutal-base/map.h rename to src/libs/brutal/base/map.h diff --git a/src/libs/brutal-base/range.h b/src/libs/brutal/base/range.h similarity index 100% rename from src/libs/brutal-base/range.h rename to src/libs/brutal/base/range.h diff --git a/src/libs/brutal-base/result.h b/src/libs/brutal/base/result.h similarity index 100% rename from src/libs/brutal-base/result.h rename to src/libs/brutal/base/result.h diff --git a/src/libs/brutal-base/slice.h b/src/libs/brutal/base/slice.h similarity index 100% rename from src/libs/brutal-base/slice.h rename to src/libs/brutal/base/slice.h diff --git a/src/libs/brutal-base/std.h b/src/libs/brutal/base/std.h similarity index 100% rename from src/libs/brutal-base/std.h rename to src/libs/brutal/base/std.h diff --git a/src/libs/brutal-base/str.h b/src/libs/brutal/base/str.h similarity index 100% rename from src/libs/brutal-base/str.h rename to src/libs/brutal/base/str.h diff --git a/src/libs/brutal-base/types.h b/src/libs/brutal/base/types.h similarity index 100% rename from src/libs/brutal-base/types.h rename to src/libs/brutal/base/types.h diff --git a/src/libs/brutal-base/vaopt.h b/src/libs/brutal/base/vaopt.h similarity index 100% rename from src/libs/brutal-base/vaopt.h rename to src/libs/brutal/base/vaopt.h diff --git a/src/libs/brutal-cli/clear.c b/src/libs/brutal/cli/clear.c similarity index 94% rename from src/libs/brutal-cli/clear.c rename to src/libs/brutal/cli/clear.c index adc78c736..dbd1285f1 100644 --- a/src/libs/brutal-cli/clear.c +++ b/src/libs/brutal/cli/clear.c @@ -1,4 +1,4 @@ -#include +#include #include "clear.h" diff --git a/src/libs/brutal-cli/clear.h b/src/libs/brutal/cli/clear.h similarity index 91% rename from src/libs/brutal-cli/clear.h rename to src/libs/brutal/cli/clear.h index 5a35436e5..0c83576c9 100644 --- a/src/libs/brutal-cli/clear.h +++ b/src/libs/brutal/cli/clear.h @@ -1,6 +1,6 @@ #pragma once -#include +#include void cli_clear_display(IoWriter writer); diff --git a/src/libs/brutal-cli/cursor.c b/src/libs/brutal/cli/cursor.c similarity index 97% rename from src/libs/brutal-cli/cursor.c rename to src/libs/brutal/cli/cursor.c index bb370282e..3efb3a171 100644 --- a/src/libs/brutal-cli/cursor.c +++ b/src/libs/brutal/cli/cursor.c @@ -1,4 +1,4 @@ -#include +#include #include "cursor.h" diff --git a/src/libs/brutal-cli/cursor.h b/src/libs/brutal/cli/cursor.h similarity index 94% rename from src/libs/brutal-cli/cursor.h rename to src/libs/brutal/cli/cursor.h index 548ad870a..cb7531c5d 100644 --- a/src/libs/brutal-cli/cursor.h +++ b/src/libs/brutal/cli/cursor.h @@ -1,6 +1,6 @@ #pragma once -#include +#include void cli_cursor_up(IoWriter writer, int count); diff --git a/src/libs/brutal-cli/fmt.c b/src/libs/brutal/cli/fmt.c similarity index 96% rename from src/libs/brutal-cli/fmt.c rename to src/libs/brutal/cli/fmt.c index 013af490d..b2cc9e823 100644 --- a/src/libs/brutal-cli/fmt.c +++ b/src/libs/brutal/cli/fmt.c @@ -1,6 +1,6 @@ -#include -#include -#include +#include +#include +#include #include "fmt.h" #include "style.h" diff --git a/src/libs/brutal-cli/fmt.h b/src/libs/brutal/cli/fmt.h similarity index 75% rename from src/libs/brutal-cli/fmt.h rename to src/libs/brutal/cli/fmt.h index cfc00dbd0..f0476c372 100644 --- a/src/libs/brutal-cli/fmt.h +++ b/src/libs/brutal/cli/fmt.h @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include +#include IoResult cli_fmt(IoWriter writer, Str format, AnyVa args); diff --git a/src/libs/brutal-cli/spinners.c b/src/libs/brutal/cli/spinners.c similarity index 95% rename from src/libs/brutal-cli/spinners.c rename to src/libs/brutal/cli/spinners.c index 664b4fe67..4c125c11f 100644 --- a/src/libs/brutal-cli/spinners.c +++ b/src/libs/brutal/cli/spinners.c @@ -1,4 +1,4 @@ -#include +#include #include "spinners.h" diff --git a/src/libs/brutal-cli/spinners.h b/src/libs/brutal/cli/spinners.h similarity index 84% rename from src/libs/brutal-cli/spinners.h rename to src/libs/brutal/cli/spinners.h index dd30516fc..a3ee42eb1 100644 --- a/src/libs/brutal-cli/spinners.h +++ b/src/libs/brutal/cli/spinners.h @@ -1,6 +1,6 @@ #pragma once -#include +#include typedef struct { diff --git a/src/libs/brutal-cli/style.c b/src/libs/brutal/cli/style.c similarity index 98% rename from src/libs/brutal-cli/style.c rename to src/libs/brutal/cli/style.c index 04a47be78..181f67ed6 100644 --- a/src/libs/brutal-cli/style.c +++ b/src/libs/brutal/cli/style.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include "style.h" diff --git a/src/libs/brutal-cli/style.h b/src/libs/brutal/cli/style.h similarity index 93% rename from src/libs/brutal-cli/style.h rename to src/libs/brutal/cli/style.h index 3d8c4321a..22525caca 100644 --- a/src/libs/brutal-cli/style.h +++ b/src/libs/brutal/cli/style.h @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include +#include typedef enum { diff --git a/src/libs/brutal-debug/assert.h b/src/libs/brutal/debug/assert.h similarity index 99% rename from src/libs/brutal-debug/assert.h rename to src/libs/brutal/debug/assert.h index 5ed342a95..5028a8573 100644 --- a/src/libs/brutal-debug/assert.h +++ b/src/libs/brutal/debug/assert.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include "log.h" #define assert_not_null(EXPR) ( \ diff --git a/src/libs/brutal-debug/log.c b/src/libs/brutal/debug/log.c similarity index 96% rename from src/libs/brutal-debug/log.c rename to src/libs/brutal/debug/log.c index f2b94565b..29e292182 100644 --- a/src/libs/brutal-debug/log.c +++ b/src/libs/brutal/debug/log.c @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/libs/brutal-debug/log.h b/src/libs/brutal/debug/log.h similarity index 92% rename from src/libs/brutal-debug/log.h rename to src/libs/brutal/debug/log.h index ad7d9af0f..ba2a28927 100644 --- a/src/libs/brutal-debug/log.h +++ b/src/libs/brutal/debug/log.h @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include +#include typedef enum { diff --git a/src/libs/brutal-ds/bits.c b/src/libs/brutal/ds/bits.c similarity index 96% rename from src/libs/brutal-ds/bits.c rename to src/libs/brutal/ds/bits.c index c86a5f6fd..5cb399920 100644 --- a/src/libs/brutal-ds/bits.c +++ b/src/libs/brutal/ds/bits.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include "bits.h" diff --git a/src/libs/brutal-ds/bits.h b/src/libs/brutal/ds/bits.h similarity index 97% rename from src/libs/brutal-ds/bits.h rename to src/libs/brutal/ds/bits.h index 8cae8cca1..01490d76b 100644 --- a/src/libs/brutal-ds/bits.h +++ b/src/libs/brutal/ds/bits.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #define BITS_BYTE_INDEX(index) ((index) / 8) #define BITS_BIT_INDEX(index) ((index) % 8) diff --git a/src/libs/brutal-ds/map.c b/src/libs/brutal/ds/map.c similarity index 96% rename from src/libs/brutal-ds/map.c rename to src/libs/brutal/ds/map.c index 465a18775..53c606a20 100644 --- a/src/libs/brutal-ds/map.c +++ b/src/libs/brutal/ds/map.c @@ -1,6 +1,6 @@ -#include -#include -#include +#include +#include +#include #include "map.h" diff --git a/src/libs/brutal-ds/map.h b/src/libs/brutal/ds/map.h similarity index 98% rename from src/libs/brutal-ds/map.h rename to src/libs/brutal/ds/map.h index ca75a5da0..bc275238d 100644 --- a/src/libs/brutal-ds/map.h +++ b/src/libs/brutal/ds/map.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include "vec.h" diff --git a/src/libs/brutal-ds/range.c b/src/libs/brutal/ds/range.c similarity index 98% rename from src/libs/brutal-ds/range.c rename to src/libs/brutal/ds/range.c index 6ce381b9d..4335d55f2 100644 --- a/src/libs/brutal-ds/range.c +++ b/src/libs/brutal/ds/range.c @@ -1,6 +1,6 @@ #include "range.h" -#include +#include void range_alloc_init(RangeAlloc *self, Alloc *alloc) { diff --git a/src/libs/brutal-ds/range.h b/src/libs/brutal/ds/range.h similarity index 83% rename from src/libs/brutal-ds/range.h rename to src/libs/brutal/ds/range.h index f64575daa..4fed021f8 100644 --- a/src/libs/brutal-ds/range.h +++ b/src/libs/brutal/ds/range.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include "vec.h" typedef Vec(USizeRange) RangeAlloc; @@ -15,4 +15,3 @@ USizeRange range_alloc_alloc(RangeAlloc *self, size_t size); void range_alloc_unused(RangeAlloc *self, USizeRange range); -void range_alloc_dump(RangeAlloc *self); diff --git a/src/libs/brutal-ds/ring.c b/src/libs/brutal/ds/ring.c similarity index 97% rename from src/libs/brutal-ds/ring.c rename to src/libs/brutal/ds/ring.c index 61b5ae030..4ad9eba20 100644 --- a/src/libs/brutal-ds/ring.c +++ b/src/libs/brutal/ds/ring.c @@ -1,5 +1,5 @@ #include "ring.h" -#include +#include void ring_init_impl(RingImpl *impl, int capacity, int data_size, Alloc *alloc) { diff --git a/src/libs/brutal-ds/ring.h b/src/libs/brutal/ds/ring.h similarity index 97% rename from src/libs/brutal-ds/ring.h rename to src/libs/brutal/ds/ring.h index 9f0a7ce78..e15804d33 100644 --- a/src/libs/brutal-ds/ring.h +++ b/src/libs/brutal/ds/ring.h @@ -1,6 +1,6 @@ #pragma once -#include +#include typedef struct { diff --git a/src/libs/brutal-ds/slot.c b/src/libs/brutal/ds/slot.c similarity index 96% rename from src/libs/brutal-ds/slot.c rename to src/libs/brutal/ds/slot.c index 022bd4ca8..c600c3af3 100644 --- a/src/libs/brutal-ds/slot.c +++ b/src/libs/brutal/ds/slot.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include "slot.h" diff --git a/src/libs/brutal-ds/slot.h b/src/libs/brutal/ds/slot.h similarity index 98% rename from src/libs/brutal-ds/slot.h rename to src/libs/brutal/ds/slot.h index 20d56651c..9e2797e36 100644 --- a/src/libs/brutal-ds/slot.h +++ b/src/libs/brutal/ds/slot.h @@ -1,6 +1,6 @@ #pragma once -#include +#include typedef int SlotIndex; diff --git a/src/libs/brutal-ds/vec.c b/src/libs/brutal/ds/vec.c similarity index 98% rename from src/libs/brutal-ds/vec.c rename to src/libs/brutal/ds/vec.c index ab75fc430..8a7348150 100644 --- a/src/libs/brutal-ds/vec.c +++ b/src/libs/brutal/ds/vec.c @@ -5,8 +5,8 @@ * under the terms of the MIT license. See LICENSE for details. */ -#include -#include +#include +#include #include "vec.h" diff --git a/src/libs/brutal-ds/vec.h b/src/libs/brutal/ds/vec.h similarity index 98% rename from src/libs/brutal-ds/vec.h rename to src/libs/brutal/ds/vec.h index 59041d0db..db21239df 100644 --- a/src/libs/brutal-ds/vec.h +++ b/src/libs/brutal/ds/vec.h @@ -1,8 +1,8 @@ #pragma once -#include -#include -#include +#include +#include +#include typedef struct { diff --git a/src/libs/brutal-fibers/fibers.c b/src/libs/brutal/fibers/fibers.c similarity index 97% rename from src/libs/brutal-fibers/fibers.c rename to src/libs/brutal/fibers/fibers.c index b0a1bb17d..1451ab488 100644 --- a/src/libs/brutal-fibers/fibers.c +++ b/src/libs/brutal/fibers/fibers.c @@ -1,8 +1,8 @@ -#include +#include -#include -#include -#include +#include +#include +#include #include "fibers.h" static Fiber *_current = nullptr; diff --git a/src/libs/brutal-fibers/fibers.h b/src/libs/brutal/fibers/fibers.h similarity index 97% rename from src/libs/brutal-fibers/fibers.h rename to src/libs/brutal/fibers/fibers.h index 20017b580..5606d88f3 100644 --- a/src/libs/brutal-fibers/fibers.h +++ b/src/libs/brutal/fibers/fibers.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #define FIBER_STACK_SIZE KiB(16) diff --git a/src/libs/brutal-fmt/case.c b/src/libs/brutal/fmt/case.c similarity index 99% rename from src/libs/brutal-fmt/case.c rename to src/libs/brutal/fmt/case.c index d69655a07..badaafe10 100644 --- a/src/libs/brutal-fmt/case.c +++ b/src/libs/brutal/fmt/case.c @@ -1,5 +1,5 @@ #include -#include +#include #include "case.h" Buf case_to_default(Str str, Alloc *alloc) diff --git a/src/libs/brutal-fmt/case.h b/src/libs/brutal/fmt/case.h similarity index 93% rename from src/libs/brutal-fmt/case.h rename to src/libs/brutal/fmt/case.h index 9d91fef87..5d7ab8e05 100644 --- a/src/libs/brutal-fmt/case.h +++ b/src/libs/brutal/fmt/case.h @@ -1,9 +1,9 @@ #pragma once -#include -#include -#include +#include +#include +#include typedef enum diff --git a/src/libs/brutal-fmt/fmt.c b/src/libs/brutal/fmt/fmt.c similarity index 98% rename from src/libs/brutal-fmt/fmt.c rename to src/libs/brutal/fmt/fmt.c index c662af65c..aee4f36eb 100644 --- a/src/libs/brutal-fmt/fmt.c +++ b/src/libs/brutal/fmt/fmt.c @@ -1,11 +1,11 @@ #define _BRUTAL_SOURCE #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "fmt.h" #include "funcs.h" diff --git a/src/libs/brutal-fmt/fmt.h b/src/libs/brutal/fmt/fmt.h similarity index 92% rename from src/libs/brutal-fmt/fmt.h rename to src/libs/brutal/fmt/fmt.h index 6b27e4875..762d8dc42 100644 --- a/src/libs/brutal-fmt/fmt.h +++ b/src/libs/brutal/fmt/fmt.h @@ -1,8 +1,8 @@ #pragma once -#include -#include -#include +#include +#include +#include #include "case.h" typedef enum diff --git a/src/libs/brutal-fmt/funcs.c b/src/libs/brutal/fmt/funcs.c similarity index 99% rename from src/libs/brutal-fmt/funcs.c rename to src/libs/brutal/fmt/funcs.c index a55b64ca1..2b8cbbda3 100644 --- a/src/libs/brutal-fmt/funcs.c +++ b/src/libs/brutal/fmt/funcs.c @@ -1,5 +1,5 @@ #include "funcs.h" -#include +#include IoResult fmt_format(IoWriter writer, Str format, AnyVa args) { size_t current = 0; diff --git a/src/libs/brutal-fmt/funcs.h b/src/libs/brutal/fmt/funcs.h similarity index 100% rename from src/libs/brutal-fmt/funcs.h rename to src/libs/brutal/fmt/funcs.h diff --git a/src/libs/brutal-glob/glob.c b/src/libs/brutal/glob/glob.c similarity index 100% rename from src/libs/brutal-glob/glob.c rename to src/libs/brutal/glob/glob.c diff --git a/src/libs/brutal-glob/glob.h b/src/libs/brutal/glob/glob.h similarity index 96% rename from src/libs/brutal-glob/glob.h rename to src/libs/brutal/glob/glob.h index 6750f09de..0836a9fba 100644 --- a/src/libs/brutal-glob/glob.h +++ b/src/libs/brutal/glob/glob.h @@ -1,6 +1,6 @@ #pragma once -#include +#include /** @brief Match a stream of charaters using glob patterns diff --git a/src/libs/brutal-hash/adler32.c b/src/libs/brutal/hash/adler32.c similarity index 97% rename from src/libs/brutal-hash/adler32.c rename to src/libs/brutal/hash/adler32.c index 835ff3e3f..3cbf598fd 100644 --- a/src/libs/brutal-hash/adler32.c +++ b/src/libs/brutal/hash/adler32.c @@ -1,5 +1,5 @@ #include "adler32.h" -#include +#include #define A32_BASE 65521 diff --git a/src/libs/brutal-hash/adler32.h b/src/libs/brutal/hash/adler32.h similarity index 90% rename from src/libs/brutal-hash/adler32.h rename to src/libs/brutal/hash/adler32.h index 9dbbbbd3d..a08a99cbc 100644 --- a/src/libs/brutal-hash/adler32.h +++ b/src/libs/brutal/hash/adler32.h @@ -1,6 +1,6 @@ #pragma once -#include +#include typedef struct { diff --git a/src/libs/brutal-hash/crc32.c b/src/libs/brutal/hash/crc32.c similarity index 98% rename from src/libs/brutal-hash/crc32.c rename to src/libs/brutal/hash/crc32.c index 82fa201a3..669e31fa3 100644 --- a/src/libs/brutal-hash/crc32.c +++ b/src/libs/brutal/hash/crc32.c @@ -1,5 +1,5 @@ #include "crc32.h" -#include +#include static uint32_t const crc32tab[16] = { 0x00000000, 0x1DB71064, 0x3B6E20C8, 0x26D930AC, 0x76DC4190, 0x6B6B51F4, 0x4DB26158, 0x5005713C, 0xEDB88320, 0xF00F9344, diff --git a/src/libs/brutal-hash/crc32.h b/src/libs/brutal/hash/crc32.h similarity index 93% rename from src/libs/brutal-hash/crc32.h rename to src/libs/brutal/hash/crc32.h index b721b0313..4cb99ead2 100644 --- a/src/libs/brutal-hash/crc32.h +++ b/src/libs/brutal/hash/crc32.h @@ -1,6 +1,6 @@ #pragma once -#include +#include typedef struct { diff --git a/src/libs/brutal-hash/fnv.c b/src/libs/brutal/hash/fnv.c similarity index 100% rename from src/libs/brutal-hash/fnv.c rename to src/libs/brutal/hash/fnv.c diff --git a/src/libs/brutal-hash/fnv.h b/src/libs/brutal/hash/fnv.h similarity index 96% rename from src/libs/brutal-hash/fnv.h rename to src/libs/brutal/hash/fnv.h index a1f3305e5..8ee32f988 100644 --- a/src/libs/brutal-hash/fnv.h +++ b/src/libs/brutal/hash/fnv.h @@ -1,6 +1,6 @@ #pragma once -#include +#include /* Based on https://github.com/haipome/fnv */ diff --git a/src/libs/brutal-input/event.h b/src/libs/brutal/input/event.h similarity index 94% rename from src/libs/brutal-input/event.h rename to src/libs/brutal/input/event.h index d2ab31cb7..e703f6b89 100644 --- a/src/libs/brutal-input/event.h +++ b/src/libs/brutal/input/event.h @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include +#include #include "keyboard.h" #include "mouse.h" diff --git a/src/libs/brutal-input/keyboard.h b/src/libs/brutal/input/keyboard.h similarity index 98% rename from src/libs/brutal-input/keyboard.h rename to src/libs/brutal/input/keyboard.h index 133b7135d..984f78e2d 100644 --- a/src/libs/brutal-input/keyboard.h +++ b/src/libs/brutal/input/keyboard.h @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include +#include #define FOREACH_KB_KEY(KEY) \ KEY(KBKEY_INVALID, 0x0) \ diff --git a/src/libs/brutal-input/mouse.h b/src/libs/brutal/input/mouse.h similarity index 81% rename from src/libs/brutal-input/mouse.h rename to src/libs/brutal/input/mouse.h index 838475373..8f97f85a4 100644 --- a/src/libs/brutal-input/mouse.h +++ b/src/libs/brutal/input/mouse.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #define MSBTN_LEFT (1 << 0) #define MSBTN_MIDDLE (1 << 1) diff --git a/src/libs/brutal-io/base.c b/src/libs/brutal/io/base.c similarity index 95% rename from src/libs/brutal-io/base.c rename to src/libs/brutal/io/base.c index 5759261e2..9ecf7157c 100644 --- a/src/libs/brutal-io/base.c +++ b/src/libs/brutal/io/base.c @@ -1,4 +1,4 @@ -#include +#include #include "base.h" diff --git a/src/libs/brutal-io/base.h b/src/libs/brutal/io/base.h similarity index 84% rename from src/libs/brutal-io/base.h rename to src/libs/brutal/io/base.h index 730f82390..86937ae3e 100644 --- a/src/libs/brutal-io/base.h +++ b/src/libs/brutal/io/base.h @@ -1,8 +1,8 @@ #pragma once -#include -#include -#include +#include +#include +#include #define IO_MAP_READ (1 << 0) #define IO_MAP_WRITE (1 << 1) diff --git a/src/libs/brutal-io/bitbuf.h b/src/libs/brutal/io/bitbuf.h similarity index 88% rename from src/libs/brutal-io/bitbuf.h rename to src/libs/brutal/io/bitbuf.h index 16db72ad1..aa107f590 100644 --- a/src/libs/brutal-io/bitbuf.h +++ b/src/libs/brutal/io/bitbuf.h @@ -1,6 +1,6 @@ #pragma once -#include +#include typedef uint_fast64_t BitBuf; diff --git a/src/libs/brutal-io/buf.c b/src/libs/brutal/io/buf.c similarity index 97% rename from src/libs/brutal-io/buf.c rename to src/libs/brutal/io/buf.c index 2aa1a4749..eaff0903d 100644 --- a/src/libs/brutal-io/buf.c +++ b/src/libs/brutal/io/buf.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include "buf.h" void buf_init(Buf *self, size_t capacity, Alloc *alloc) diff --git a/src/libs/brutal-io/buf.h b/src/libs/brutal/io/buf.h similarity index 97% rename from src/libs/brutal-io/buf.h rename to src/libs/brutal/io/buf.h index 55beede0d..b95c99af0 100644 --- a/src/libs/brutal-io/buf.h +++ b/src/libs/brutal/io/buf.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include "traits.h" diff --git a/src/libs/brutal-io/chan.c b/src/libs/brutal/io/chan.c similarity index 100% rename from src/libs/brutal-io/chan.c rename to src/libs/brutal/io/chan.c diff --git a/src/libs/brutal-io/chan.h b/src/libs/brutal/io/chan.h similarity index 100% rename from src/libs/brutal-io/chan.h rename to src/libs/brutal/io/chan.h diff --git a/src/libs/brutal-io/emit.c b/src/libs/brutal/io/emit.c similarity index 95% rename from src/libs/brutal-io/emit.c rename to src/libs/brutal/io/emit.c index 5e7cd6b3f..3b02b7131 100644 --- a/src/libs/brutal-io/emit.c +++ b/src/libs/brutal/io/emit.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include "emit.h" #include "funcs.h" diff --git a/src/libs/brutal-io/emit.h b/src/libs/brutal/io/emit.h similarity index 94% rename from src/libs/brutal-io/emit.h rename to src/libs/brutal/io/emit.h index 95e76a5f5..07bc11ad1 100644 --- a/src/libs/brutal-io/emit.h +++ b/src/libs/brutal/io/emit.h @@ -1,7 +1,7 @@ #pragma once #include "buf.h" -#include +#include typedef struct { diff --git a/src/libs/brutal-io/file.c b/src/libs/brutal/io/file.c similarity index 100% rename from src/libs/brutal-io/file.c rename to src/libs/brutal/io/file.c diff --git a/src/libs/brutal-io/file.h b/src/libs/brutal/io/file.h similarity index 100% rename from src/libs/brutal-io/file.h rename to src/libs/brutal/io/file.h diff --git a/src/libs/brutal-io/funcs.c b/src/libs/brutal/io/funcs.c similarity index 97% rename from src/libs/brutal-io/funcs.c rename to src/libs/brutal/io/funcs.c index f99e06a11..b06ecb150 100644 --- a/src/libs/brutal-io/funcs.c +++ b/src/libs/brutal/io/funcs.c @@ -1,6 +1,6 @@ -#include -#include -#include +#include +#include +#include #include "funcs.h" /* --- Read Functions ------------------------------------------------------- */ diff --git a/src/libs/brutal-io/funcs.h b/src/libs/brutal/io/funcs.h similarity index 100% rename from src/libs/brutal-io/funcs.h rename to src/libs/brutal/io/funcs.h diff --git a/src/libs/brutal-io/mem.c b/src/libs/brutal/io/mem.c similarity index 94% rename from src/libs/brutal-io/mem.c rename to src/libs/brutal/io/mem.c index db9bb67a0..f510d1df9 100644 --- a/src/libs/brutal-io/mem.c +++ b/src/libs/brutal/io/mem.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include "mem.h" diff --git a/src/libs/brutal-io/mem.h b/src/libs/brutal/io/mem.h similarity index 100% rename from src/libs/brutal-io/mem.h rename to src/libs/brutal/io/mem.h diff --git a/src/libs/brutal-io/path.c b/src/libs/brutal/io/path.c similarity index 100% rename from src/libs/brutal-io/path.c rename to src/libs/brutal/io/path.c diff --git a/src/libs/brutal-io/path.h b/src/libs/brutal/io/path.h similarity index 76% rename from src/libs/brutal-io/path.h rename to src/libs/brutal/io/path.h index e10c294d0..2bd88a261 100644 --- a/src/libs/brutal-io/path.h +++ b/src/libs/brutal/io/path.h @@ -1,6 +1,6 @@ #pragma once -#include +#include Str io_dirname(Str path); diff --git a/src/libs/brutal-io/rbits.h b/src/libs/brutal/io/rbits.h similarity index 99% rename from src/libs/brutal-io/rbits.h rename to src/libs/brutal/io/rbits.h index a7a06c8a1..3062c0b30 100644 --- a/src/libs/brutal-io/rbits.h +++ b/src/libs/brutal/io/rbits.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include "bitbuf.h" #include "funcs.h" diff --git a/src/libs/brutal-io/traits.h b/src/libs/brutal/io/traits.h similarity index 100% rename from src/libs/brutal-io/traits.h rename to src/libs/brutal/io/traits.h diff --git a/src/libs/brutal-io/wbits.h b/src/libs/brutal/io/wbits.h similarity index 100% rename from src/libs/brutal-io/wbits.h rename to src/libs/brutal/io/wbits.h diff --git a/src/libs/brutal-io/window.c b/src/libs/brutal/io/window.c similarity index 94% rename from src/libs/brutal-io/window.c rename to src/libs/brutal/io/window.c index 2d6d5d2d4..41176eb57 100644 --- a/src/libs/brutal-io/window.c +++ b/src/libs/brutal/io/window.c @@ -1,6 +1,6 @@ -#include -#include -#include +#include +#include +#include #include "funcs.h" #include "window.h" diff --git a/src/libs/brutal-io/window.h b/src/libs/brutal/io/window.h similarity index 95% rename from src/libs/brutal-io/window.h rename to src/libs/brutal/io/window.h index 6f439f3a7..b6b3aa204 100644 --- a/src/libs/brutal-io/window.h +++ b/src/libs/brutal/io/window.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include "traits.h" diff --git a/src/libs/brutal/manifest.json b/src/libs/brutal/manifest.json new file mode 100644 index 000000000..615cd444f --- /dev/null +++ b/src/libs/brutal/manifest.json @@ -0,0 +1,8 @@ +{ + "id": "brutal", + "type": "lib", + "description": "Brutal utility library", + "requires": [ + "embed-system" + ] +} \ No newline at end of file diff --git a/src/libs/brutal-math/angle.h b/src/libs/brutal/math/angle.h similarity index 100% rename from src/libs/brutal-math/angle.h rename to src/libs/brutal/math/angle.h diff --git a/src/libs/brutal-math/clamp.h b/src/libs/brutal/math/clamp.h similarity index 100% rename from src/libs/brutal-math/clamp.h rename to src/libs/brutal/math/clamp.h diff --git a/src/libs/brutal-math/dock.c b/src/libs/brutal/math/dock.c similarity index 100% rename from src/libs/brutal-math/dock.c rename to src/libs/brutal/math/dock.c diff --git a/src/libs/brutal-math/dock.h b/src/libs/brutal/math/dock.h similarity index 100% rename from src/libs/brutal-math/dock.h rename to src/libs/brutal/math/dock.h diff --git a/src/libs/brutal-math/easing.c b/src/libs/brutal/math/easing.c similarity index 100% rename from src/libs/brutal-math/easing.c rename to src/libs/brutal/math/easing.c diff --git a/src/libs/brutal-math/easing.h b/src/libs/brutal/math/easing.h similarity index 100% rename from src/libs/brutal-math/easing.h rename to src/libs/brutal/math/easing.h diff --git a/src/libs/brutal-math/edge.h b/src/libs/brutal/math/edge.h similarity index 100% rename from src/libs/brutal-math/edge.h rename to src/libs/brutal/math/edge.h diff --git a/src/libs/brutal-math/flow.c b/src/libs/brutal/math/flow.c similarity index 100% rename from src/libs/brutal-math/flow.c rename to src/libs/brutal/math/flow.c diff --git a/src/libs/brutal-math/flow.h b/src/libs/brutal/math/flow.h similarity index 100% rename from src/libs/brutal-math/flow.h rename to src/libs/brutal/math/flow.h diff --git a/src/libs/brutal-math/funcs.h b/src/libs/brutal/math/funcs.h similarity index 100% rename from src/libs/brutal-math/funcs.h rename to src/libs/brutal/math/funcs.h diff --git a/src/libs/brutal-math/gravity.c b/src/libs/brutal/math/gravity.c similarity index 100% rename from src/libs/brutal-math/gravity.c rename to src/libs/brutal/math/gravity.c diff --git a/src/libs/brutal-math/gravity.h b/src/libs/brutal/math/gravity.h similarity index 96% rename from src/libs/brutal-math/gravity.h rename to src/libs/brutal/math/gravity.h index 82344cc64..977733aa1 100644 --- a/src/libs/brutal-math/gravity.h +++ b/src/libs/brutal/math/gravity.h @@ -2,7 +2,7 @@ #include "flow.h" #include "rect.h" -#include +#include #define M_GRAVITY_NONE (0) diff --git a/src/libs/brutal-math/orientation.h b/src/libs/brutal/math/orientation.h similarity index 100% rename from src/libs/brutal-math/orientation.h rename to src/libs/brutal/math/orientation.h diff --git a/src/libs/brutal-math/rand.c b/src/libs/brutal/math/rand.c similarity index 100% rename from src/libs/brutal-math/rand.c rename to src/libs/brutal/math/rand.c diff --git a/src/libs/brutal-math/rand.h b/src/libs/brutal/math/rand.h similarity index 100% rename from src/libs/brutal-math/rand.h rename to src/libs/brutal/math/rand.h diff --git a/src/libs/brutal-math/rect.h b/src/libs/brutal/math/rect.h similarity index 99% rename from src/libs/brutal-math/rect.h rename to src/libs/brutal/math/rect.h index addc63ffa..5572f7b27 100644 --- a/src/libs/brutal-math/rect.h +++ b/src/libs/brutal/math/rect.h @@ -1,5 +1,5 @@ #pragma once -#include +#include #include diff --git a/src/libs/brutal-math/spacing.c b/src/libs/brutal/math/spacing.c similarity index 100% rename from src/libs/brutal-math/spacing.c rename to src/libs/brutal/math/spacing.c diff --git a/src/libs/brutal-math/spacing.h b/src/libs/brutal/math/spacing.h similarity index 100% rename from src/libs/brutal-math/spacing.h rename to src/libs/brutal/math/spacing.h diff --git a/src/libs/brutal-math/trans2.h b/src/libs/brutal/math/trans2.h similarity index 100% rename from src/libs/brutal-math/trans2.h rename to src/libs/brutal/math/trans2.h diff --git a/src/libs/brutal-math/vec2.h b/src/libs/brutal/math/vec2.h similarity index 100% rename from src/libs/brutal-math/vec2.h rename to src/libs/brutal/math/vec2.h diff --git a/src/libs/brutal-mem/const.h b/src/libs/brutal/mem/const.h similarity index 100% rename from src/libs/brutal-mem/const.h rename to src/libs/brutal/mem/const.h diff --git a/src/libs/brutal-mem/copy.c b/src/libs/brutal/mem/copy.c similarity index 100% rename from src/libs/brutal-mem/copy.c rename to src/libs/brutal/mem/copy.c diff --git a/src/libs/brutal-mem/funcs.h b/src/libs/brutal/mem/funcs.h similarity index 100% rename from src/libs/brutal-mem/funcs.h rename to src/libs/brutal/mem/funcs.h diff --git a/src/libs/brutal-mem/move.c b/src/libs/brutal/mem/move.c similarity index 100% rename from src/libs/brutal-mem/move.c rename to src/libs/brutal/mem/move.c diff --git a/src/libs/brutal-mem/pages.h b/src/libs/brutal/mem/pages.h similarity index 100% rename from src/libs/brutal-mem/pages.h rename to src/libs/brutal/mem/pages.h diff --git a/src/libs/brutal-mem/set.c b/src/libs/brutal/mem/set.c similarity index 100% rename from src/libs/brutal-mem/set.c rename to src/libs/brutal/mem/set.c diff --git a/src/libs/brutal-mem/units.h b/src/libs/brutal/mem/units.h similarity index 100% rename from src/libs/brutal-mem/units.h rename to src/libs/brutal/mem/units.h diff --git a/src/libs/brutal-mem/volatile.h b/src/libs/brutal/mem/volatile.h similarity index 100% rename from src/libs/brutal-mem/volatile.h rename to src/libs/brutal/mem/volatile.h diff --git a/src/libs/brutal-parse/lex.c b/src/libs/brutal/parse/lex.c similarity index 98% rename from src/libs/brutal-parse/lex.c rename to src/libs/brutal/parse/lex.c index a4f6d9e6b..aa6ff1717 100644 --- a/src/libs/brutal-parse/lex.c +++ b/src/libs/brutal/parse/lex.c @@ -1,4 +1,4 @@ -#include +#include #include "lex.h" diff --git a/src/libs/brutal-parse/lex.h b/src/libs/brutal/parse/lex.h similarity index 96% rename from src/libs/brutal-parse/lex.h rename to src/libs/brutal/parse/lex.h index bb6a22e07..9de8fa2d6 100644 --- a/src/libs/brutal-parse/lex.h +++ b/src/libs/brutal/parse/lex.h @@ -1,8 +1,8 @@ #pragma once -#include +#include -#include +#include #include "lexeme.h" #include "scan.h" diff --git a/src/libs/brutal-parse/lexeme.h b/src/libs/brutal/parse/lexeme.h similarity index 93% rename from src/libs/brutal-parse/lexeme.h rename to src/libs/brutal/parse/lexeme.h index 0a5b3aa4e..f359d693f 100644 --- a/src/libs/brutal-parse/lexeme.h +++ b/src/libs/brutal/parse/lexeme.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #define LEXEME_EOF (-1) #define LEXEME_INVALID (-2) diff --git a/src/libs/brutal-parse/nums.c b/src/libs/brutal/parse/nums.c similarity index 100% rename from src/libs/brutal-parse/nums.c rename to src/libs/brutal/parse/nums.c diff --git a/src/libs/brutal-parse/nums.h b/src/libs/brutal/parse/nums.h similarity index 100% rename from src/libs/brutal-parse/nums.h rename to src/libs/brutal/parse/nums.h diff --git a/src/libs/brutal-parse/scan.c b/src/libs/brutal/parse/scan.c similarity index 96% rename from src/libs/brutal-parse/scan.c rename to src/libs/brutal/parse/scan.c index ac1e1e3c2..b217d507b 100644 --- a/src/libs/brutal-parse/scan.c +++ b/src/libs/brutal/parse/scan.c @@ -1,9 +1,9 @@ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "scan.h" diff --git a/src/libs/brutal-parse/scan.h b/src/libs/brutal/parse/scan.h similarity index 98% rename from src/libs/brutal-parse/scan.h rename to src/libs/brutal/parse/scan.h index fd62503f3..4f00bdce3 100644 --- a/src/libs/brutal-parse/scan.h +++ b/src/libs/brutal/parse/scan.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include typedef int(ScanMatch)(int); diff --git a/src/libs/brutal-sync/lock.c b/src/libs/brutal/sync/lock.c similarity index 100% rename from src/libs/brutal-sync/lock.c rename to src/libs/brutal/sync/lock.c diff --git a/src/libs/brutal-sync/lock.h b/src/libs/brutal/sync/lock.h similarity index 84% rename from src/libs/brutal-sync/lock.h rename to src/libs/brutal/sync/lock.h index 59496e836..ad781706d 100644 --- a/src/libs/brutal-sync/lock.h +++ b/src/libs/brutal/sync/lock.h @@ -1,10 +1,10 @@ #pragma once -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include typedef struct diff --git a/src/libs/brutal-sync/ref.h b/src/libs/brutal/sync/ref.h similarity index 95% rename from src/libs/brutal-sync/ref.h rename to src/libs/brutal/sync/ref.h index b90e12f76..bac36870c 100644 --- a/src/libs/brutal-sync/ref.h +++ b/src/libs/brutal/sync/ref.h @@ -1,6 +1,6 @@ #pragma once -#include +#include typedef enum { diff --git a/src/libs/brutal-sync/rwlock.c b/src/libs/brutal/sync/rwlock.c similarity index 93% rename from src/libs/brutal-sync/rwlock.c rename to src/libs/brutal/sync/rwlock.c index f6f32d1a3..b071629ba 100644 --- a/src/libs/brutal-sync/rwlock.c +++ b/src/libs/brutal/sync/rwlock.c @@ -1,8 +1,8 @@ #include -#include -#include +#include +#include #include "rwlock.h" -#include +#include void rwlock_acquire_read(RwLock *self) { diff --git a/src/libs/brutal-sync/rwlock.h b/src/libs/brutal/sync/rwlock.h similarity index 100% rename from src/libs/brutal-sync/rwlock.h rename to src/libs/brutal/sync/rwlock.h diff --git a/src/libs/brutal-task/task.c b/src/libs/brutal/task/task.c similarity index 100% rename from src/libs/brutal-task/task.c rename to src/libs/brutal/task/task.c diff --git a/src/libs/brutal-task/task.h b/src/libs/brutal/task/task.h similarity index 97% rename from src/libs/brutal-task/task.h rename to src/libs/brutal/task/task.h index b3639c80e..bac29b9dc 100644 --- a/src/libs/brutal-task/task.h +++ b/src/libs/brutal/task/task.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #define TASK_THIS (0) diff --git a/src/libs/brutal-test/expect.h b/src/libs/brutal/test/expect.h similarity index 100% rename from src/libs/brutal-test/expect.h rename to src/libs/brutal/test/expect.h diff --git a/src/libs/brutal-test/hook-alloc.h b/src/libs/brutal/test/hook-alloc.h similarity index 93% rename from src/libs/brutal-test/hook-alloc.h rename to src/libs/brutal/test/hook-alloc.h index 5316c01e1..6f6d6cf2b 100644 --- a/src/libs/brutal-test/hook-alloc.h +++ b/src/libs/brutal/test/hook-alloc.h @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include +#include #include "runner.h" diff --git a/src/libs/brutal-test/runner.c b/src/libs/brutal/test/runner.c similarity index 97% rename from src/libs/brutal-test/runner.c rename to src/libs/brutal/test/runner.c index 8007bc775..1093a84e8 100644 --- a/src/libs/brutal-test/runner.c +++ b/src/libs/brutal/test/runner.c @@ -1,9 +1,9 @@ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "runner.h" diff --git a/src/libs/brutal-test/runner.h b/src/libs/brutal/test/runner.h similarity index 99% rename from src/libs/brutal-test/runner.h rename to src/libs/brutal/test/runner.h index ef52d6246..6a6465868 100644 --- a/src/libs/brutal-test/runner.h +++ b/src/libs/brutal/test/runner.h @@ -1,6 +1,6 @@ #pragma once -#include +#include /* --- Tests ---------------------------------------------------------------- */ diff --git a/src/libs/brutal-text/cp437.c b/src/libs/brutal/text/cp437.c similarity index 100% rename from src/libs/brutal-text/cp437.c rename to src/libs/brutal/text/cp437.c diff --git a/src/libs/brutal-text/cp437.h b/src/libs/brutal/text/cp437.h similarity index 100% rename from src/libs/brutal-text/cp437.h rename to src/libs/brutal/text/cp437.h diff --git a/src/libs/brutal-text/rune.h b/src/libs/brutal/text/rune.h similarity index 56% rename from src/libs/brutal-text/rune.h rename to src/libs/brutal/text/rune.h index 00f3806ca..58470e121 100644 --- a/src/libs/brutal-text/rune.h +++ b/src/libs/brutal/text/rune.h @@ -1,5 +1,5 @@ #pragma once -#include +#include typedef uint32_t Rune; diff --git a/src/libs/brutal-text/str.c b/src/libs/brutal/text/str.c similarity index 98% rename from src/libs/brutal-text/str.c rename to src/libs/brutal/text/str.c index fac9ef3ee..85575396c 100644 --- a/src/libs/brutal-text/str.c +++ b/src/libs/brutal/text/str.c @@ -1,5 +1,5 @@ #include -#include +#include #include "str.h" Str str_concat(Str const lhs, Str const rhs, Alloc *alloc) diff --git a/src/libs/brutal-text/str.h b/src/libs/brutal/text/str.h similarity index 88% rename from src/libs/brutal-text/str.h rename to src/libs/brutal/text/str.h index 94cf0a09d..b12c4d598 100644 --- a/src/libs/brutal-text/str.h +++ b/src/libs/brutal/text/str.h @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include +#include Str str_dup(Str const str, Alloc *alloc); diff --git a/src/libs/brutal-text/utf16.c b/src/libs/brutal/text/utf16.c similarity index 93% rename from src/libs/brutal-text/utf16.c rename to src/libs/brutal/text/utf16.c index 80acfbf3d..c6fb817bf 100644 --- a/src/libs/brutal-text/utf16.c +++ b/src/libs/brutal/text/utf16.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include uint16_t *utf16_str_to_cstr(Str str, Alloc *alloc) { diff --git a/src/libs/brutal-text/utf16.h b/src/libs/brutal/text/utf16.h similarity index 100% rename from src/libs/brutal-text/utf16.h rename to src/libs/brutal/text/utf16.h diff --git a/src/libs/brutal-text/utf8.c b/src/libs/brutal/text/utf8.c similarity index 99% rename from src/libs/brutal-text/utf8.c rename to src/libs/brutal/text/utf8.c index d1d69466d..4d21029b6 100644 --- a/src/libs/brutal-text/utf8.c +++ b/src/libs/brutal/text/utf8.c @@ -1,5 +1,5 @@ #include "utf8.h" -#include +#include StrFix8 utf8_from_rune(Rune rune) { diff --git a/src/libs/brutal-text/utf8.h b/src/libs/brutal/text/utf8.h similarity index 91% rename from src/libs/brutal-text/utf8.h rename to src/libs/brutal/text/utf8.h index 7938898bd..077fa24c0 100644 --- a/src/libs/brutal-text/utf8.h +++ b/src/libs/brutal/text/utf8.h @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include +#include #include "rune.h" #include "str.h" diff --git a/src/libs/brutal-text/vals.h b/src/libs/brutal/text/vals.h similarity index 100% rename from src/libs/brutal-text/vals.h rename to src/libs/brutal/text/vals.h diff --git a/src/libs/brutal-text/witty.c b/src/libs/brutal/text/witty.c similarity index 100% rename from src/libs/brutal-text/witty.c rename to src/libs/brutal/text/witty.c diff --git a/src/libs/brutal-text/witty.h b/src/libs/brutal/text/witty.h similarity index 100% rename from src/libs/brutal-text/witty.h rename to src/libs/brutal/text/witty.h diff --git a/src/libs/brutal-time/constants.h b/src/libs/brutal/time/constants.h similarity index 100% rename from src/libs/brutal-time/constants.h rename to src/libs/brutal/time/constants.h diff --git a/src/libs/brutal-time/convert.c b/src/libs/brutal/time/convert.c similarity index 100% rename from src/libs/brutal-time/convert.c rename to src/libs/brutal/time/convert.c diff --git a/src/libs/brutal-time/convert.h b/src/libs/brutal/time/convert.h similarity index 100% rename from src/libs/brutal-time/convert.h rename to src/libs/brutal/time/convert.h diff --git a/src/libs/brutal-time/query.c b/src/libs/brutal/time/query.c similarity index 100% rename from src/libs/brutal-time/query.c rename to src/libs/brutal/time/query.c diff --git a/src/libs/brutal-time/query.h b/src/libs/brutal/time/query.h similarity index 100% rename from src/libs/brutal-time/query.h rename to src/libs/brutal/time/query.h diff --git a/src/libs/brutal-time/types.h b/src/libs/brutal/time/types.h similarity index 92% rename from src/libs/brutal-time/types.h rename to src/libs/brutal/time/types.h index 49613ffa3..6f0df0a31 100644 --- a/src/libs/brutal-time/types.h +++ b/src/libs/brutal/time/types.h @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include +#include typedef uint64_t Tick; typedef uint64_t TimeStamp; diff --git a/src/libs/bvm/ctx/global.h b/src/libs/bvm/ctx/global.h index c6d0c57ad..9f79d43aa 100644 --- a/src/libs/bvm/ctx/global.h +++ b/src/libs/bvm/ctx/global.h @@ -2,7 +2,7 @@ #include #include -#include +#include typedef struct { diff --git a/src/libs/bvm/ctx/local.c b/src/libs/bvm/ctx/local.c index 3418210ae..1ccc60591 100644 --- a/src/libs/bvm/ctx/local.c +++ b/src/libs/bvm/ctx/local.c @@ -1,6 +1,6 @@ #include #include -#include +#include void bvm_local_init(BvmLocal *self, Alloc *alloc) { diff --git a/src/libs/bvm/eval/eval.c b/src/libs/bvm/eval/eval.c index 9c274c2ca..da2cd3b55 100644 --- a/src/libs/bvm/eval/eval.c +++ b/src/libs/bvm/eval/eval.c @@ -3,7 +3,7 @@ #include #include #include -#include +#include BvmVal bvm_call(BvmLocal *local, BvmGlobal *global, BvmFunc *func, int argc, Alloc *alloc) { diff --git a/src/libs/bvm/eval/instr.h b/src/libs/bvm/eval/instr.h index 50ea314b2..3729589d7 100644 --- a/src/libs/bvm/eval/instr.h +++ b/src/libs/bvm/eval/instr.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #define BVM_FOREACH_OP \ ITER(NOP) \ diff --git a/src/libs/bvm/obj/func.h b/src/libs/bvm/obj/func.h index d652f4e2e..244bcc01f 100644 --- a/src/libs/bvm/obj/func.h +++ b/src/libs/bvm/obj/func.h @@ -2,7 +2,7 @@ #include #include -#include +#include struct _BvmLocal; struct _BvmFrame; diff --git a/src/libs/bvm/obj/obj.h b/src/libs/bvm/obj/obj.h index 837c3b9fa..4b558c413 100644 --- a/src/libs/bvm/obj/obj.h +++ b/src/libs/bvm/obj/obj.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include struct _BvmObj diff --git a/src/libs/bvm/obj/val.c b/src/libs/bvm/obj/val.c index abf903afa..a8642717f 100644 --- a/src/libs/bvm/obj/val.c +++ b/src/libs/bvm/obj/val.c @@ -1,5 +1,5 @@ #include -#include +#include BvmVal bvm_val_nil(void) { diff --git a/src/libs/bvm/obj/val.h b/src/libs/bvm/obj/val.h index 064efc312..6283665ac 100644 --- a/src/libs/bvm/obj/val.h +++ b/src/libs/bvm/obj/val.h @@ -1,6 +1,6 @@ #pragma once -#include +#include typedef struct _BvmObj BvmObj; typedef struct _BvmFunc BvmFunc; diff --git a/src/libs/cc/ast/decl.h b/src/libs/cc/ast/decl.h index aa0dcb229..a0704e890 100644 --- a/src/libs/cc/ast/decl.h +++ b/src/libs/cc/ast/decl.h @@ -3,7 +3,7 @@ #include #include #include -#include +#include typedef enum { diff --git a/src/libs/cc/ast/expr.h b/src/libs/cc/ast/expr.h index ce720b003..c8323deb1 100644 --- a/src/libs/cc/ast/expr.h +++ b/src/libs/cc/ast/expr.h @@ -2,7 +2,7 @@ #include #include -#include +#include #define CEXPR_MAX_PRECEDENCE (16) diff --git a/src/libs/cc/ast/stmt.h b/src/libs/cc/ast/stmt.h index 6e14ff2f5..02d675bde 100644 --- a/src/libs/cc/ast/stmt.h +++ b/src/libs/cc/ast/stmt.h @@ -1,8 +1,8 @@ #pragma once #include -#include -#include +#include +#include typedef enum { CSTMT_INVALID, diff --git a/src/libs/cc/ast/type.h b/src/libs/cc/ast/type.h index 7078ac4fa..3023a2951 100644 --- a/src/libs/cc/ast/type.h +++ b/src/libs/cc/ast/type.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include typedef enum { diff --git a/src/libs/cc/ast/val.h b/src/libs/cc/ast/val.h index 96bbb5ad2..670bce584 100644 --- a/src/libs/cc/ast/val.h +++ b/src/libs/cc/ast/val.h @@ -1,6 +1,6 @@ #pragma once -#include +#include typedef int CSigned; typedef unsigned int CUnsigned; diff --git a/src/libs/cc/builder/expr.c b/src/libs/cc/builder/expr.c index bc2c422a7..45bb2036c 100644 --- a/src/libs/cc/builder/expr.c +++ b/src/libs/cc/builder/expr.c @@ -1,5 +1,5 @@ #include -#include +#include CExpr cexpr_empty(void) { diff --git a/src/libs/cc/builder/stmt.c b/src/libs/cc/builder/stmt.c index c3f32271d..dde67bba5 100644 --- a/src/libs/cc/builder/stmt.c +++ b/src/libs/cc/builder/stmt.c @@ -1,5 +1,5 @@ #include -#include +#include CStmt cstmt_empty(void) { diff --git a/src/libs/cc/builder/type.c b/src/libs/cc/builder/type.c index f4bfca29c..9a63fa89c 100644 --- a/src/libs/cc/builder/type.c +++ b/src/libs/cc/builder/type.c @@ -1,5 +1,5 @@ #include -#include +#include CType ctype_error(void) { diff --git a/src/libs/cc/dump.h b/src/libs/cc/dump.h index a30131cf8..d5a0af7bc 100644 --- a/src/libs/cc/dump.h +++ b/src/libs/cc/dump.h @@ -2,7 +2,7 @@ #include #include -#include +#include Json cdump_value(CVal value, Alloc *alloc); diff --git a/src/libs/cc/dump/dump.c b/src/libs/cc/dump/dump.c index 10cec95e2..385708e63 100644 --- a/src/libs/cc/dump/dump.c +++ b/src/libs/cc/dump/dump.c @@ -1,6 +1,6 @@ #include #include -#include +#include Json cdump_value(CVal value, Alloc *alloc) { diff --git a/src/libs/cc/lex/lexer.c b/src/libs/cc/lex/lexer.c index dc406abfb..4328b4d4b 100644 --- a/src/libs/cc/lex/lexer.c +++ b/src/libs/cc/lex/lexer.c @@ -1,5 +1,5 @@ #include -#include +#include struct { diff --git a/src/libs/cc/lex/lexer.h b/src/libs/cc/lex/lexer.h index 1b073688e..b3e37a523 100644 --- a/src/libs/cc/lex/lexer.h +++ b/src/libs/cc/lex/lexer.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include // clang-format off diff --git a/src/libs/cc/lex/pproc.c b/src/libs/cc/lex/pproc.c index 4a9553076..808496f08 100644 --- a/src/libs/cc/lex/pproc.c +++ b/src/libs/cc/lex/pproc.c @@ -1,6 +1,6 @@ #include #include -#include +#include CProcMacro cproc_macro_init(CProc *ctx, Str name) { diff --git a/src/libs/cc/lex/pproc.h b/src/libs/cc/lex/pproc.h index a50024d3a..9af3e0e97 100644 --- a/src/libs/cc/lex/pproc.h +++ b/src/libs/cc/lex/pproc.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include typedef Vec(Lexemes) MacroArgsCodes; diff --git a/src/libs/cc/parse/decl.c b/src/libs/cc/parse/decl.c index a5c20b038..9993fecce 100644 --- a/src/libs/cc/parse/decl.c +++ b/src/libs/cc/parse/decl.c @@ -1,5 +1,5 @@ #include -#include +#include void cparse_func_params(Lex *lex, CType *type, Alloc *alloc) { diff --git a/src/libs/cc/parse/expr.c b/src/libs/cc/parse/expr.c index 166f4707a..636ddb2de 100644 --- a/src/libs/cc/parse/expr.c +++ b/src/libs/cc/parse/expr.c @@ -1,7 +1,7 @@ #include #include -#include -#include +#include +#include static COp lexeme_to_cop[CLEX_COUNT] = { [CLEX_PLUSPLUS] = COP_INC, diff --git a/src/libs/cc/parse/stmt.c b/src/libs/cc/parse/stmt.c index 646e52dba..04b0181da 100644 --- a/src/libs/cc/parse/stmt.c +++ b/src/libs/cc/parse/stmt.c @@ -1,5 +1,5 @@ #include -#include +#include CStmt cparse_stmt(Lex *lex, CUnit *context, Alloc *alloc) { diff --git a/src/libs/cc/sema/visit.c b/src/libs/cc/sema/visit.c index 5e01bd709..5c2baf3ec 100644 --- a/src/libs/cc/sema/visit.c +++ b/src/libs/cc/sema/visit.c @@ -1,6 +1,6 @@ #include #include -#include +#include CType csema_value_type(MAYBE_UNUSED CSema *sema, CVal value, Alloc *alloc) { diff --git a/src/libs/cc/trans.h b/src/libs/cc/trans.h index a9b38f6c1..9154aff03 100644 --- a/src/libs/cc/trans.h +++ b/src/libs/cc/trans.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include void cc_trans_decl(Emit *emit, CDecl decl); diff --git a/src/libs/cc/trans/expr.c b/src/libs/cc/trans/expr.c index 4755d4706..ea5a6ee8e 100644 --- a/src/libs/cc/trans/expr.c +++ b/src/libs/cc/trans/expr.c @@ -1,4 +1,4 @@ -#include +#include #include static void cc_trans_op_fix(Emit *emit, COp op) diff --git a/src/libs/cc/trans/val.c b/src/libs/cc/trans/val.c index ab69c9ce4..578461c98 100644 --- a/src/libs/cc/trans/val.c +++ b/src/libs/cc/trans/val.c @@ -1,4 +1,4 @@ -#include +#include #include void cc_trans_value(Emit *emit, CVal value) diff --git a/src/libs/codec-deflate/deflate.c b/src/libs/codec-deflate/deflate.c index 9d2ca3f9f..40be015c3 100644 --- a/src/libs/codec-deflate/deflate.c +++ b/src/libs/codec-deflate/deflate.c @@ -1,4 +1,4 @@ -#include +#include #include "constants.h" #include "deflate.h" diff --git a/src/libs/codec-deflate/deflate.h b/src/libs/codec-deflate/deflate.h index 4f19d565a..a741342ae 100644 --- a/src/libs/codec-deflate/deflate.h +++ b/src/libs/codec-deflate/deflate.h @@ -1,6 +1,6 @@ #pragma once -#include +#include typedef struct _DeflateCompressor { diff --git a/src/libs/codec-deflate/huff.h b/src/libs/codec-deflate/huff.h index 7264ea204..f10a79c77 100644 --- a/src/libs/codec-deflate/huff.h +++ b/src/libs/codec-deflate/huff.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include "errors.h" diff --git a/src/libs/codec-deflate/inflate.c b/src/libs/codec-deflate/inflate.c index 4ddaffc7c..9410af42b 100644 --- a/src/libs/codec-deflate/inflate.c +++ b/src/libs/codec-deflate/inflate.c @@ -1,4 +1,4 @@ -#include +#include #include "constants.h" #include "errors.h" diff --git a/src/libs/codec-deflate/inflate.h b/src/libs/codec-deflate/inflate.h index 0e684f06a..b32df5f60 100644 --- a/src/libs/codec-deflate/inflate.h +++ b/src/libs/codec-deflate/inflate.h @@ -1,6 +1,6 @@ #pragma once -#include +#include /** @brief Decompress a raw deflate stream diff --git a/src/libs/codec-gzip/gzip.c b/src/libs/codec-gzip/gzip.c index 731279e88..d2b88cacc 100644 --- a/src/libs/codec-gzip/gzip.c +++ b/src/libs/codec-gzip/gzip.c @@ -1,6 +1,6 @@ -#include -#include -#include +#include +#include +#include #include #include "gzip.h" diff --git a/src/libs/codec-gzip/gzip.h b/src/libs/codec-gzip/gzip.h index 78a5814de..c15fa6cb8 100644 --- a/src/libs/codec-gzip/gzip.h +++ b/src/libs/codec-gzip/gzip.h @@ -1,6 +1,6 @@ #pragma once -#include +#include /** @brief Decompress a gzip deflate stream diff --git a/src/libs/codec-zlib/zlib.c b/src/libs/codec-zlib/zlib.c index f4ab203f0..067896fa1 100644 --- a/src/libs/codec-zlib/zlib.c +++ b/src/libs/codec-zlib/zlib.c @@ -1,4 +1,4 @@ -#include +#include #include #include "zlib.h" diff --git a/src/libs/codec-zlib/zlib.h b/src/libs/codec-zlib/zlib.h index 3aea5e2d8..a52b8d98d 100644 --- a/src/libs/codec-zlib/zlib.h +++ b/src/libs/codec-zlib/zlib.h @@ -1,6 +1,6 @@ #pragma once -#include +#include /** @brief Decompress a zlib deflate stream diff --git a/src/libs/elf/elf.h b/src/libs/elf/elf.h index ee1e38426..79dffeff8 100644 --- a/src/libs/elf/elf.h +++ b/src/libs/elf/elf.h @@ -1,8 +1,8 @@ #pragma once -#include -#include -#include +#include +#include +#include #define ELF_HEADER_MAGIC "\177ELF" diff --git a/src/libs/embed/arm64/backtrace.c b/src/libs/embed/arm64/backtrace.c index 3839537d8..f317cdf3a 100644 --- a/src/libs/embed/arm64/backtrace.c +++ b/src/libs/embed/arm64/backtrace.c @@ -1,5 +1,5 @@ #include -#include +#include struct _StackFrame { diff --git a/src/libs/embed/brutal/chan.c b/src/libs/embed/brutal/chan.c index f350d5447..57a9fcc91 100644 --- a/src/libs/embed/brutal/chan.c +++ b/src/libs/embed/brutal/chan.c @@ -1,8 +1,8 @@ #include #include -#include -#include -#include +#include +#include +#include IoResult embed_chan_read(IoChan channel, uint8_t *data, size_t size) { diff --git a/src/libs/embed/brutal/debug.c b/src/libs/embed/brutal/debug.c index de572650f..88bf78ca7 100644 --- a/src/libs/embed/brutal/debug.c +++ b/src/libs/embed/brutal/debug.c @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/libs/embed/brutal/entry.c b/src/libs/embed/brutal/entry.c index f84391087..c31cb9311 100644 --- a/src/libs/embed/brutal/entry.c +++ b/src/libs/embed/brutal/entry.c @@ -1,9 +1,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include WEAK int main(int, char **) { diff --git a/src/libs/embed/brutal/file.c b/src/libs/embed/brutal/file.c index 4bff97d22..9b439cd25 100644 --- a/src/libs/embed/brutal/file.c +++ b/src/libs/embed/brutal/file.c @@ -1,5 +1,5 @@ #include -#include +#include MaybeError embed_file_open(IoFile *, Str, FileInitFlags) { diff --git a/src/libs/embed/brutal/log.c b/src/libs/embed/brutal/log.c index f7c58588e..a8bcbc36a 100644 --- a/src/libs/embed/brutal/log.c +++ b/src/libs/embed/brutal/log.c @@ -1,8 +1,8 @@ #include #include -#include -#include -#include +#include +#include +#include static bool _initialized = false; static Lock _lock; diff --git a/src/libs/embed/brutal/mem.c b/src/libs/embed/brutal/mem.c index a8f0d1357..af3eee09e 100644 --- a/src/libs/embed/brutal/mem.c +++ b/src/libs/embed/brutal/mem.c @@ -1,6 +1,6 @@ #include -#include -#include +#include +#include #include Error embed_mem_acquire(size_t size, void **out_result, MAYBE_UNUSED enum embed_mem_flag flags) diff --git a/src/libs/embed/brutal/task.c b/src/libs/embed/brutal/task.c index c6d4cde6b..4ec2e4d5f 100644 --- a/src/libs/embed/brutal/task.c +++ b/src/libs/embed/brutal/task.c @@ -1,6 +1,6 @@ #include #include -#include +#include int embed_task_self(void) { diff --git a/src/libs/embed/chan.h b/src/libs/embed/chan.h index e913326ef..1f8ec855e 100644 --- a/src/libs/embed/chan.h +++ b/src/libs/embed/chan.h @@ -1,6 +1,6 @@ #pragma once -#include +#include IoResult embed_chan_read(IoChan channel, uint8_t *data, size_t size); diff --git a/src/libs/embed/crypto.h b/src/libs/embed/crypto.h index 55aae616f..953b4ce67 100644 --- a/src/libs/embed/crypto.h +++ b/src/libs/embed/crypto.h @@ -1,5 +1,5 @@ #pragma once -#include +#include size_t embed_crypto_entropy(void *buf, size_t len); diff --git a/src/libs/embed/debug.h b/src/libs/embed/debug.h index 87ddd3f3b..37fdda380 100644 --- a/src/libs/embed/debug.h +++ b/src/libs/embed/debug.h @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include +#include void embed_log_prefix(IoWriter writer); size_t embed_debug_backtrace(uintptr_t *buf, size_t cap); diff --git a/src/libs/embed/efi/chan.c b/src/libs/embed/efi/chan.c index f0f20459f..0ceac7066 100644 --- a/src/libs/embed/efi/chan.c +++ b/src/libs/embed/efi/chan.c @@ -1,9 +1,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include IoResult embed_chan_read(IoChan channel, uint8_t *data, size_t size) { diff --git a/src/libs/embed/efi/debug.c b/src/libs/embed/efi/debug.c index 3c6fab60a..955ecf875 100644 --- a/src/libs/embed/efi/debug.c +++ b/src/libs/embed/efi/debug.c @@ -1,4 +1,4 @@ -#include +#include #include void embed_log_prefix(IoWriter writer) diff --git a/src/libs/embed/efi/file.c b/src/libs/embed/efi/file.c index 05f471b18..90644986f 100644 --- a/src/libs/embed/efi/file.c +++ b/src/libs/embed/efi/file.c @@ -1,9 +1,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include static EFILoadedImage *_image_loader = nullptr; static EFISimpleFileSystemProtocol *_rootfs = nullptr; diff --git a/src/libs/embed/efi/log.c b/src/libs/embed/efi/log.c index 548481ffa..900dc97cc 100644 --- a/src/libs/embed/efi/log.c +++ b/src/libs/embed/efi/log.c @@ -1,7 +1,7 @@ #include #include -#include -#include +#include +#include static IoResult embed_log_write(MAYBE_UNUSED void *context, uint8_t const *data, size_t size) { diff --git a/src/libs/embed/efi/mem.c b/src/libs/embed/efi/mem.c index 3d4e05154..a34268056 100644 --- a/src/libs/embed/efi/mem.c +++ b/src/libs/embed/efi/mem.c @@ -1,6 +1,6 @@ -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/src/libs/embed/file-decl.h b/src/libs/embed/file-decl.h index fe0c60359..bb2b7a3c9 100644 --- a/src/libs/embed/file-decl.h +++ b/src/libs/embed/file-decl.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #if defined(SYSTEM_EFI) # include #elif defined(SYSTEM_POSIX) diff --git a/src/libs/embed/file.h b/src/libs/embed/file.h index db15d4e4a..036cf8ca7 100644 --- a/src/libs/embed/file.h +++ b/src/libs/embed/file.h @@ -1,6 +1,6 @@ #pragma once -#include +#include MaybeError embed_file_create(IoFile *self, Str path); diff --git a/src/libs/embed/kernel/debug.c b/src/libs/embed/kernel/debug.c index 711a991ea..00f6058c6 100644 --- a/src/libs/embed/kernel/debug.c +++ b/src/libs/embed/kernel/debug.c @@ -1,4 +1,4 @@ -#include +#include #include #include "kernel/core/cpu.h" diff --git a/src/libs/embed/kernel/log.c b/src/libs/embed/kernel/log.c index 9328d75be..7f075ab46 100644 --- a/src/libs/embed/kernel/log.c +++ b/src/libs/embed/kernel/log.c @@ -1,5 +1,5 @@ #include -#include +#include #include "kernel/core/arch.h" static Lock _lock; diff --git a/src/libs/embed/kernel/mem.c b/src/libs/embed/kernel/mem.c index 4c605854b..a2ebf4dbb 100644 --- a/src/libs/embed/kernel/mem.c +++ b/src/libs/embed/kernel/mem.c @@ -1,7 +1,7 @@ -#include -#include +#include +#include #include -#include +#include #include "kernel/core/heap.h" diff --git a/src/libs/embed/log.h b/src/libs/embed/log.h index 7c025965e..474f2b07a 100644 --- a/src/libs/embed/log.h +++ b/src/libs/embed/log.h @@ -1,6 +1,6 @@ #pragma once -#include +#include void embed_log_lock(void); diff --git a/src/libs/embed/mem.h b/src/libs/embed/mem.h index b8a2c5fc9..441d1952c 100644 --- a/src/libs/embed/mem.h +++ b/src/libs/embed/mem.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #if defined(__x86_64__) # define EMBED_HAS_MEMSET 1 diff --git a/src/libs/embed/posix/chan.c b/src/libs/embed/posix/chan.c index 13ed7207a..797ca58f1 100644 --- a/src/libs/embed/posix/chan.c +++ b/src/libs/embed/posix/chan.c @@ -1,7 +1,7 @@ #include #include #include -#include +#include IoResult embed_chan_read(IoChan channel, uint8_t *data, size_t size) { diff --git a/src/libs/embed/posix/err.c b/src/libs/embed/posix/err.c index 05d672727..20bfe92a2 100644 --- a/src/libs/embed/posix/err.c +++ b/src/libs/embed/posix/err.c @@ -1,7 +1,7 @@ #include #include #include -#include +#include Error error_from_errno(void) { diff --git a/src/libs/embed/posix/err.h b/src/libs/embed/posix/err.h index 773ebd519..c2a1ffd3c 100644 --- a/src/libs/embed/posix/err.h +++ b/src/libs/embed/posix/err.h @@ -1,5 +1,5 @@ #pragma once -#include +#include Error error_from_errno(void); diff --git a/src/libs/embed/posix/file.c b/src/libs/embed/posix/file.c index 79f0fc79a..5549c6f4b 100644 --- a/src/libs/embed/posix/file.c +++ b/src/libs/embed/posix/file.c @@ -5,9 +5,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include int embed_flags2posix_flags(FileInitFlags flags) { diff --git a/src/libs/embed/posix/log.c b/src/libs/embed/posix/log.c index 214a03777..8589e6052 100644 --- a/src/libs/embed/posix/log.c +++ b/src/libs/embed/posix/log.c @@ -4,7 +4,7 @@ #include #include #include -#include +#include void embed_log_lock(void) { diff --git a/src/libs/embed/posix/mem.c b/src/libs/embed/posix/mem.c index 5d4bf74f8..00d8a6ad3 100644 --- a/src/libs/embed/posix/mem.c +++ b/src/libs/embed/posix/mem.c @@ -1,4 +1,4 @@ -#include +#include #include #include #include diff --git a/src/libs/embed/posix/time.c b/src/libs/embed/posix/time.c index 1c1d38dc0..a4a3aacb8 100644 --- a/src/libs/embed/posix/time.c +++ b/src/libs/embed/posix/time.c @@ -1,6 +1,6 @@ #include #include -#include +#include Tick embed_time_current_tick(void) { diff --git a/src/libs/embed/time.h b/src/libs/embed/time.h index dca07a438..683b1e77a 100644 --- a/src/libs/embed/time.h +++ b/src/libs/embed/time.h @@ -1,6 +1,6 @@ #pragma once -#include +#include Tick embed_time_current_tick(void); diff --git a/src/libs/embed/x86_64/backtrace.c b/src/libs/embed/x86_64/backtrace.c index 204b69eb1..31570774e 100644 --- a/src/libs/embed/x86_64/backtrace.c +++ b/src/libs/embed/x86_64/backtrace.c @@ -1,5 +1,5 @@ -#include +#include struct _StackFrame { struct _StackFrame *rbp; diff --git a/src/libs/fs/block.c b/src/libs/fs/block.c index e665ebe24..9eeb2efb3 100644 --- a/src/libs/fs/block.c +++ b/src/libs/fs/block.c @@ -1,5 +1,5 @@ #include -#include +#include FsBlockResult fs_block_acquire(FsBlockImpl *self, void **buf, size_t count, size_t lba, FsBlockFlags flags) { diff --git a/src/libs/fs/block.h b/src/libs/fs/block.h index 8845c00a1..ac74531f8 100644 --- a/src/libs/fs/block.h +++ b/src/libs/fs/block.h @@ -1,8 +1,8 @@ #pragma once -#include -#include -#include +#include +#include +#include typedef enum { diff --git a/src/libs/fs/ext2/block.c b/src/libs/fs/ext2/block.c index a009585b0..49047536f 100644 --- a/src/libs/fs/ext2/block.c +++ b/src/libs/fs/ext2/block.c @@ -1,6 +1,6 @@ #include #include -#include +#include Ext2FsBlockResult ext2_acquire_blocks(Ext2Fs *self, size_t off, size_t count, FsBlockFlags flags) { diff --git a/src/libs/fs/ext2/ext2.c b/src/libs/fs/ext2/ext2.c index d553be358..6bb3c66c6 100644 --- a/src/libs/fs/ext2/ext2.c +++ b/src/libs/fs/ext2/ext2.c @@ -1,8 +1,8 @@ #include #include #include -#include -#include +#include +#include static FsResult ext2_group(Ext2Fs *self, Ext2GroupBlockDescTable *group, uint64_t group_id, bool write) { diff --git a/src/libs/fs/ext2/structure.c b/src/libs/fs/ext2/structure.c index 933681942..53c0a51f1 100644 --- a/src/libs/fs/ext2/structure.c +++ b/src/libs/fs/ext2/structure.c @@ -1,5 +1,5 @@ #include -#include +#include static void ext2_dump_ro_features(Ext2SuperBlock *superblock) { diff --git a/src/libs/fs/ext2/structure.h b/src/libs/fs/ext2/structure.h index c2bfd48dc..6f9d5dd74 100644 --- a/src/libs/fs/ext2/structure.h +++ b/src/libs/fs/ext2/structure.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #define EXT2_SIGNATURE 0xef53 diff --git a/src/libs/handover/builder.c b/src/libs/handover/builder.c index 8fb588b25..c7334402d 100644 --- a/src/libs/handover/builder.c +++ b/src/libs/handover/builder.c @@ -1,6 +1,6 @@ #include -#include -#include +#include +#include void handover_builder_init(Ho2Builder *self, Alloc *alloc) { diff --git a/src/libs/handover/builder.h b/src/libs/handover/builder.h index 57db6daf3..24c51360a 100644 --- a/src/libs/handover/builder.h +++ b/src/libs/handover/builder.h @@ -1,8 +1,8 @@ #pragma once #include -#include -#include +#include +#include typedef struct { diff --git a/src/libs/handover/handover.c b/src/libs/handover/handover.c index e438655c3..d896472e2 100644 --- a/src/libs/handover/handover.c +++ b/src/libs/handover/handover.c @@ -1,6 +1,6 @@ #include -#include -#include +#include +#include void handover_mmap_append(HandoverMmap *self, HandoverMmapEntry entry) { diff --git a/src/libs/handover/manifest.json b/src/libs/handover/manifest.json index 20cb107aa..19f9917d9 100644 --- a/src/libs/handover/manifest.json +++ b/src/libs/handover/manifest.json @@ -2,10 +2,6 @@ "id": "handover", "type": "lib", "requires" : [ - "brutal-debug", - "brutal-mem", - "brutal-ds", - "brutal-io" - + "brutal" ] } \ No newline at end of file diff --git a/src/libs/hw/acpi/base.c b/src/libs/hw/acpi/base.c index 148e297a7..f2d2fa20c 100644 --- a/src/libs/hw/acpi/base.c +++ b/src/libs/hw/acpi/base.c @@ -1,6 +1,6 @@ #include #include -#include +#include #ifdef __kernel__ diff --git a/src/libs/hw/acpi/base.h b/src/libs/hw/acpi/base.h index 1d6c5adc1..65b173390 100644 --- a/src/libs/hw/acpi/base.h +++ b/src/libs/hw/acpi/base.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #ifndef __kernel__ # include #endif diff --git a/src/libs/hw/acpi/madt.h b/src/libs/hw/acpi/madt.h index eecf73008..6c170b766 100644 --- a/src/libs/hw/acpi/madt.h +++ b/src/libs/hw/acpi/madt.h @@ -2,7 +2,7 @@ #include #include -#include +#include typedef enum { diff --git a/src/libs/hw/acpi/manifest.json b/src/libs/hw/acpi/manifest.json index 5c86ea397..e38169328 100644 --- a/src/libs/hw/acpi/manifest.json +++ b/src/libs/hw/acpi/manifest.json @@ -3,6 +3,6 @@ "type": "lib", "description": "Hardware ACPI utility library", "requires": [ - "brutal-debug" + "brutal" ] } \ No newline at end of file diff --git a/src/libs/hw/acpi/rsdt.c b/src/libs/hw/acpi/rsdt.c index d4827c842..5af044631 100644 --- a/src/libs/hw/acpi/rsdt.c +++ b/src/libs/hw/acpi/rsdt.c @@ -1,5 +1,5 @@ #include -#include +#include Iter acpi_rsdt_iterate( Acpi *acpi, diff --git a/src/libs/hw/acpi/rsdt.h b/src/libs/hw/acpi/rsdt.h index 91cdb7278..c17813033 100644 --- a/src/libs/hw/acpi/rsdt.h +++ b/src/libs/hw/acpi/rsdt.h @@ -2,7 +2,7 @@ #include #include -#include +#include typedef struct PACKED _AcpiRsdt { diff --git a/src/libs/hw/acpi/stdh.h b/src/libs/hw/acpi/stdh.h index cc5d45d99..52ddb226c 100644 --- a/src/libs/hw/acpi/stdh.h +++ b/src/libs/hw/acpi/stdh.h @@ -1,8 +1,8 @@ #pragma once -#include -#include -#include +#include +#include +#include typedef struct PACKED diff --git a/src/libs/hw/ahci/ahci.c b/src/libs/hw/ahci/ahci.c index 32a3f0a8a..f0918bb84 100644 --- a/src/libs/hw/ahci/ahci.c +++ b/src/libs/hw/ahci/ahci.c @@ -1,6 +1,6 @@ #include #include -#include +#include static HbaPortSig ahci_device_type(HbaPort *port) { diff --git a/src/libs/hw/ahci/ahci.h b/src/libs/hw/ahci/ahci.h index 94fe24d9d..99ccee520 100644 --- a/src/libs/hw/ahci/ahci.h +++ b/src/libs/hw/ahci/ahci.h @@ -3,7 +3,7 @@ #include #include #include -#include +#include typedef struct { diff --git a/src/libs/hw/ahci/device.c b/src/libs/hw/ahci/device.c index 2ccec929a..be6322ed2 100644 --- a/src/libs/hw/ahci/device.c +++ b/src/libs/hw/ahci/device.c @@ -1,6 +1,6 @@ #include #include -#include +#include static void init_hba_command_header(HbaCommand *command, bool write, uint32_t fis_len) { diff --git a/src/libs/hw/ahci/fis.h b/src/libs/hw/ahci/fis.h index 8da40e2a3..ef3ff5c95 100644 --- a/src/libs/hw/ahci/fis.h +++ b/src/libs/hw/ahci/fis.h @@ -1,6 +1,6 @@ #pragma once -#include +#include typedef enum { diff --git a/src/libs/hw/ahci/hba.h b/src/libs/hw/ahci/hba.h index 4765e2c68..3ae791637 100644 --- a/src/libs/hw/ahci/hba.h +++ b/src/libs/hw/ahci/hba.h @@ -1,6 +1,6 @@ #pragma once -#include +#include typedef enum { diff --git a/src/libs/hw/efi/lib.c b/src/libs/hw/efi/lib.c index 722a81995..0f4596528 100644 --- a/src/libs/hw/efi/lib.c +++ b/src/libs/hw/efi/lib.c @@ -1,7 +1,7 @@ #include -#include -#include -#include +#include +#include +#include static bool _init = false; static EFIHandle _handle; diff --git a/src/libs/hw/efi/manifest.json b/src/libs/hw/efi/manifest.json index e235dc7d7..29c8c6082 100644 --- a/src/libs/hw/efi/manifest.json +++ b/src/libs/hw/efi/manifest.json @@ -3,7 +3,6 @@ "description": "UEFI interaction library", "type": "lib", "requires": [ - "brutal-debug", - "brutal-alloc" + "brutal" ] } \ No newline at end of file diff --git a/src/libs/hw/efi/protos/stop.h b/src/libs/hw/efi/protos/stop.h index 746354f8d..e7cf018ba 100644 --- a/src/libs/hw/efi/protos/stop.h +++ b/src/libs/hw/efi/protos/stop.h @@ -1,8 +1,8 @@ #pragma once #include -#include -#include +#include +#include #define EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_GUID \ diff --git a/src/libs/hw/efi/types.h b/src/libs/hw/efi/types.h index ee74bb631..c9289ee63 100644 --- a/src/libs/hw/efi/types.h +++ b/src/libs/hw/efi/types.h @@ -1,9 +1,9 @@ #pragma once #include -#include -#include -#include +#include +#include +#include typedef struct diff --git a/src/libs/hw/fdt/fdt.c b/src/libs/hw/fdt/fdt.c index b98e4ad14..fb50300e5 100644 --- a/src/libs/hw/fdt/fdt.c +++ b/src/libs/hw/fdt/fdt.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include static FdtTok *fdt_node_begin(FdtTokBegin *fdt) diff --git a/src/libs/hw/fdt/fdt.h b/src/libs/hw/fdt/fdt.h index c77451bd8..691457d76 100644 --- a/src/libs/hw/fdt/fdt.h +++ b/src/libs/hw/fdt/fdt.h @@ -1,6 +1,6 @@ #pragma once -#include +#include typedef struct PACKED { diff --git a/src/libs/hw/pci/addr.h b/src/libs/hw/pci/addr.h index 17c135329..f13170deb 100644 --- a/src/libs/hw/pci/addr.h +++ b/src/libs/hw/pci/addr.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include #define PCI_BUS_SHIFT (20) #define PCI_SLOT_SHIFT (15) diff --git a/src/libs/hw/pci/capabilities.h b/src/libs/hw/pci/capabilities.h index e1b6c6af4..4fc3a720b 100644 --- a/src/libs/hw/pci/capabilities.h +++ b/src/libs/hw/pci/capabilities.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #define MSI_CTRL_ENABLE (1 << 0) #define MSI_CTRL_64_BIT (1 << 7) diff --git a/src/libs/hw/pci/config.h b/src/libs/hw/pci/config.h index 5116866e6..8141569cc 100644 --- a/src/libs/hw/pci/config.h +++ b/src/libs/hw/pci/config.h @@ -1,6 +1,6 @@ #pragma once -#include +#include typedef struct PACKED { diff --git a/src/libs/hw/pci/pci.c b/src/libs/hw/pci/pci.c index f2f6dd44d..bcebc46d9 100644 --- a/src/libs/hw/pci/pci.c +++ b/src/libs/hw/pci/pci.c @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include "config.h" #include "pci.h" diff --git a/src/libs/hw/pci/pci.h b/src/libs/hw/pci/pci.h index 9f104e8c6..b505d7266 100644 --- a/src/libs/hw/pci/pci.h +++ b/src/libs/hw/pci/pci.h @@ -6,7 +6,7 @@ #include #include #include -#include +#include typedef struct { diff --git a/src/libs/hw/ps2/controller.c b/src/libs/hw/ps2/controller.c index 5f4390208..d0f44f487 100644 --- a/src/libs/hw/ps2/controller.c +++ b/src/libs/hw/ps2/controller.c @@ -1,5 +1,5 @@ #include -#include +#include uint8_t ps2_controller_status(Ps2Controller *self) { diff --git a/src/libs/hw/ps2/keyboard.c b/src/libs/hw/ps2/keyboard.c index e01a984b4..8fed6e5c1 100644 --- a/src/libs/hw/ps2/keyboard.c +++ b/src/libs/hw/ps2/keyboard.c @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/libs/hw/ps2/keyboard.h b/src/libs/hw/ps2/keyboard.h index e5590f600..12268ae71 100644 --- a/src/libs/hw/ps2/keyboard.h +++ b/src/libs/hw/ps2/keyboard.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include typedef void (*Ps2KeyboardCallback)(InputEvent ev, void *context); diff --git a/src/libs/hw/ps2/mouse.h b/src/libs/hw/ps2/mouse.h index 399ca0873..36f881320 100644 --- a/src/libs/hw/ps2/mouse.h +++ b/src/libs/hw/ps2/mouse.h @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include +#include #include typedef void (*Ps2MouseCallback)(InputEvent ev, void *ctx); diff --git a/src/libs/hw/uart/uart.c b/src/libs/hw/uart/uart.c index e4f8853d4..48ca46a33 100644 --- a/src/libs/hw/uart/uart.c +++ b/src/libs/hw/uart/uart.c @@ -1,5 +1,5 @@ #include -#include +#include void uart_putc(Uart *dev, uint8_t data) { diff --git a/src/libs/hw/uart/uart.h b/src/libs/hw/uart/uart.h index aeae193a4..c1beae434 100644 --- a/src/libs/hw/uart/uart.h +++ b/src/libs/hw/uart/uart.h @@ -1,6 +1,6 @@ #pragma once -#include +#include typedef struct { diff --git a/src/libs/hw/virtio/device.c b/src/libs/hw/virtio/device.c index 827242c0e..b1d262c4d 100644 --- a/src/libs/hw/virtio/device.c +++ b/src/libs/hw/virtio/device.c @@ -1,5 +1,5 @@ #include -#include +#include void virtio_device_set_if_acknowledged(VirtioDevice *device, uint8_t status) { diff --git a/src/libs/hw/virtio/device.h b/src/libs/hw/virtio/device.h index 50ff38e3e..ca14f151e 100644 --- a/src/libs/hw/virtio/device.h +++ b/src/libs/hw/virtio/device.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #define VIRTIO_STATUS_ACKNOWLEDGE (1 << 0) // Indicates that the guest OS has found the device and recognized it as a valid virtio device. #define VIRTIO_STATUS_DRIVER_AVAILABLE (1 << 1) // Indicates that the guest OS knows how to drive the device. diff --git a/src/libs/hw/virtio/device/block.h b/src/libs/hw/virtio/device/block.h index c58061d21..877ae1dcf 100644 --- a/src/libs/hw/virtio/device/block.h +++ b/src/libs/hw/virtio/device/block.h @@ -2,7 +2,7 @@ #include #include -#include +#include // All the features of a Virtio Block Device typedef enum diff --git a/src/libs/hw/virtio/device/entropy.h b/src/libs/hw/virtio/device/entropy.h index eed952869..fd1f460ff 100644 --- a/src/libs/hw/virtio/device/entropy.h +++ b/src/libs/hw/virtio/device/entropy.h @@ -2,7 +2,7 @@ #include #include -#include +#include typedef struct { diff --git a/src/libs/hw/virtio/virtqueue.h b/src/libs/hw/virtio/virtqueue.h index 2a963f5de..74a155ac9 100644 --- a/src/libs/hw/virtio/virtqueue.h +++ b/src/libs/hw/virtio/virtqueue.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include // The descriptor of one buffer inside the queue. typedef struct PACKED diff --git a/src/libs/idl/ast/builder.c b/src/libs/idl/ast/builder.c index 0b21455f8..77bd4f953 100644 --- a/src/libs/idl/ast/builder.c +++ b/src/libs/idl/ast/builder.c @@ -1,6 +1,6 @@ #include #include -#include +#include /* --- Types ---------------------------------------------------------------- */ diff --git a/src/libs/idl/ast/iface.h b/src/libs/idl/ast/iface.h index 4a73b503e..950b00200 100644 --- a/src/libs/idl/ast/iface.h +++ b/src/libs/idl/ast/iface.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include typedef struct { diff --git a/src/libs/idl/ast/types.h b/src/libs/idl/ast/types.h index 9403ff606..e9767e97e 100644 --- a/src/libs/idl/ast/types.h +++ b/src/libs/idl/ast/types.h @@ -1,6 +1,6 @@ #pragma once -#include +#include typedef struct _IdlType IdlType; diff --git a/src/libs/idl/cgen/binding.c b/src/libs/idl/cgen/binding.c index 1b5d9dbf5..a1081daa1 100644 --- a/src/libs/idl/cgen/binding.c +++ b/src/libs/idl/cgen/binding.c @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/libs/idl/cgen/dispatch.c b/src/libs/idl/cgen/dispatch.c index 967e4b221..1e7cdfd4e 100644 --- a/src/libs/idl/cgen/dispatch.c +++ b/src/libs/idl/cgen/dispatch.c @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/libs/idl/cgen/handler.c b/src/libs/idl/cgen/handler.c index 5eebaa367..4ae83432b 100644 --- a/src/libs/idl/cgen/handler.c +++ b/src/libs/idl/cgen/handler.c @@ -1,6 +1,6 @@ #include #include -#include +#include CType idl_cgen_handler_type(IdlMethod method, IdlModule const module, Alloc *alloc) { diff --git a/src/libs/idl/cgen/header.c b/src/libs/idl/cgen/header.c index 2cddb4a5c..a402b9bd3 100644 --- a/src/libs/idl/cgen/header.c +++ b/src/libs/idl/cgen/header.c @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/libs/idl/cgen/includes.c b/src/libs/idl/cgen/includes.c index 293723403..677c714ca 100644 --- a/src/libs/idl/cgen/includes.c +++ b/src/libs/idl/cgen/includes.c @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/libs/idl/cgen/method.c b/src/libs/idl/cgen/method.c index 9c0a97543..50eb6634d 100644 --- a/src/libs/idl/cgen/method.c +++ b/src/libs/idl/cgen/method.c @@ -1,6 +1,6 @@ #include #include -#include +#include CType idl_cgen_method_type(IdlMethod method, IdlModule const module, Alloc *alloc) { diff --git a/src/libs/idl/cgen/pack.c b/src/libs/idl/cgen/pack.c index 6530829ba..65d2a6652 100644 --- a/src/libs/idl/cgen/pack.c +++ b/src/libs/idl/cgen/pack.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include #include diff --git a/src/libs/idl/cgen/provider.c b/src/libs/idl/cgen/provider.c index 04bb28966..9b7d649ba 100644 --- a/src/libs/idl/cgen/provider.c +++ b/src/libs/idl/cgen/provider.c @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/libs/idl/cgen/source.c b/src/libs/idl/cgen/source.c index ce17b43e1..d4a9596c3 100644 --- a/src/libs/idl/cgen/source.c +++ b/src/libs/idl/cgen/source.c @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/libs/idl/cgen/types.c b/src/libs/idl/cgen/types.c index f651cfaf2..c3b1fe242 100644 --- a/src/libs/idl/cgen/types.c +++ b/src/libs/idl/cgen/types.c @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/libs/idl/cgen/unpack.c b/src/libs/idl/cgen/unpack.c index 3acf9099c..6399d2f9e 100644 --- a/src/libs/idl/cgen/unpack.c +++ b/src/libs/idl/cgen/unpack.c @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/libs/idl/json.c b/src/libs/idl/json.c index 4cfe8bbc6..2df8815cf 100644 --- a/src/libs/idl/json.c +++ b/src/libs/idl/json.c @@ -1,5 +1,5 @@ #include -#include +#include Json idl_jgen_ctype(IdlCtype ctype_, Alloc *alloc) { diff --git a/src/libs/idl/parse.c b/src/libs/idl/parse.c index d261865f1..02be67cde 100644 --- a/src/libs/idl/parse.c +++ b/src/libs/idl/parse.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include #include diff --git a/src/libs/idl/parse.h b/src/libs/idl/parse.h index 91be79ec6..15560442d 100644 --- a/src/libs/idl/parse.h +++ b/src/libs/idl/parse.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include IdlModule idl_parse_module(Scan *scan, Alloc *alloc); diff --git a/src/libs/idl/sema.c b/src/libs/idl/sema.c index ca5554cb5..1257f6396 100644 --- a/src/libs/idl/sema.c +++ b/src/libs/idl/sema.c @@ -1,6 +1,6 @@ -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/src/libs/ipc/component.c b/src/libs/ipc/component.c index b724811fa..7c2cb6a5f 100644 --- a/src/libs/ipc/component.c +++ b/src/libs/ipc/component.c @@ -1,6 +1,6 @@ #include #include -#include +#include typedef struct { diff --git a/src/libs/ipc/component.h b/src/libs/ipc/component.h index 658bb56d3..6af30efe9 100644 --- a/src/libs/ipc/component.h +++ b/src/libs/ipc/component.h @@ -4,8 +4,8 @@ #include #include #include -#include -#include +#include +#include typedef struct _IpcPending IpcPending; typedef struct _IpcComponent IpcComponent; diff --git a/src/libs/ipc/hooks.c b/src/libs/ipc/hooks.c index 50d5c186a..52a1b768d 100644 --- a/src/libs/ipc/hooks.c +++ b/src/libs/ipc/hooks.c @@ -1,8 +1,8 @@ #include #include #include -#include -#include +#include +#include int ipc_hook_call( IpcComponent *component, diff --git a/src/libs/ipc/manifest.json b/src/libs/ipc/manifest.json index 47d4a8539..0f1b1f322 100644 --- a/src/libs/ipc/manifest.json +++ b/src/libs/ipc/manifest.json @@ -3,10 +3,6 @@ "type": "lib", "description": "Brutal inter-process-communication library", "requires": [ - "brutal-ds", - "brutal-fibers", - "brutal-debug", - "brutal-alloc", - "brutal-mem" + "brutal" ] } \ No newline at end of file diff --git a/src/libs/ipc/pack.c b/src/libs/ipc/pack.c index 8e655008a..04fd8f6ca 100644 --- a/src/libs/ipc/pack.c +++ b/src/libs/ipc/pack.c @@ -1,8 +1,8 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include void ipc_pack_init(IpcPack *self) { diff --git a/src/libs/ipc/pack.h b/src/libs/ipc/pack.h index db101f35c..752b5f48f 100644 --- a/src/libs/ipc/pack.h +++ b/src/libs/ipc/pack.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include typedef struct { diff --git a/src/libs/ipc/unpack.c b/src/libs/ipc/unpack.c index 273c78599..6492c7459 100644 --- a/src/libs/ipc/unpack.c +++ b/src/libs/ipc/unpack.c @@ -1,6 +1,6 @@ #include -#include -#include +#include +#include void ipc_unpack_init(IpcUnpack *self, void *buf, size_t len, Alloc *alloc) { diff --git a/src/libs/ipc/unpack.h b/src/libs/ipc/unpack.h index 9066af81c..a7cacb389 100644 --- a/src/libs/ipc/unpack.h +++ b/src/libs/ipc/unpack.h @@ -1,8 +1,8 @@ #pragma once #include -#include -#include +#include +#include typedef struct { diff --git a/src/libs/json/emit.c b/src/libs/json/emit.c index b5295b4b9..17e9ccba3 100644 --- a/src/libs/json/emit.c +++ b/src/libs/json/emit.c @@ -1,4 +1,4 @@ -#include +#include #include void json_emit_string(Str str, Emit *emit) diff --git a/src/libs/json/emit.h b/src/libs/json/emit.h index 84392b6b9..aff51372e 100644 --- a/src/libs/json/emit.h +++ b/src/libs/json/emit.h @@ -1,6 +1,6 @@ #pragma once #include -#include +#include void json_emit(Json const json, Emit *emit); diff --git a/src/libs/json/manifest.json b/src/libs/json/manifest.json index bcbc73bb1..7e739e15f 100644 --- a/src/libs/json/manifest.json +++ b/src/libs/json/manifest.json @@ -3,9 +3,6 @@ "type": "lib", "description": "JSON writing and reading utility library", "requires": [ - "brutal-ds", - "brutal-debug", - "brutal-parse", - "brutal-io" + "brutal" ] } \ No newline at end of file diff --git a/src/libs/json/objects.c b/src/libs/json/objects.c index 570f174a5..fd268ba77 100644 --- a/src/libs/json/objects.c +++ b/src/libs/json/objects.c @@ -1,5 +1,5 @@ #include -#include +#include bool json_is(Json const json, JsonType type) { diff --git a/src/libs/json/objects.h b/src/libs/json/objects.h index 8029b5287..ba310cb73 100644 --- a/src/libs/json/objects.h +++ b/src/libs/json/objects.h @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include +#include typedef enum diff --git a/src/libs/json/parser.c b/src/libs/json/parser.c index 474a2fbf6..22c888f2c 100644 --- a/src/libs/json/parser.c +++ b/src/libs/json/parser.c @@ -1,8 +1,8 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include static bool json_skip_comment(Scan *scan) { diff --git a/src/libs/json/parser.h b/src/libs/json/parser.h index 7c85ba5e2..b88537fd4 100644 --- a/src/libs/json/parser.h +++ b/src/libs/json/parser.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include Json json_parse_array(Scan *scan, Alloc *alloc); diff --git a/src/libs/libc/manifest.json b/src/libs/libc/manifest.json index 71e95edc4..95efa5072 100644 --- a/src/libs/libc/manifest.json +++ b/src/libs/libc/manifest.json @@ -6,11 +6,7 @@ "cpp-root-include": true }, "requires": [ - "brutal-alloc", - "brutal-debug", - "brutal-math", - "brutal-mem", - "brutal-parse", + "brutal", "embed-system" ] } \ No newline at end of file diff --git a/src/libs/libc/stdlib.c b/src/libs/libc/stdlib.c index 49cbfbb7c..4f411b024 100644 --- a/src/libs/libc/stdlib.c +++ b/src/libs/libc/stdlib.c @@ -1,11 +1,11 @@ -#include -#include -#include -#include +#include +#include +#include +#include -#include -#include +#include +#include #include #include #include diff --git a/src/libs/libc/string.c b/src/libs/libc/string.c index ec1fd0585..17bc0fc50 100644 --- a/src/libs/libc/string.c +++ b/src/libs/libc/string.c @@ -2,9 +2,9 @@ /* --- 7.24 - String handling ----------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include /* --- 7.24.2 - Copying functions ------------------------------------------- */ diff --git a/src/libs/stdc-posix/string.h b/src/libs/stdc-posix/string.h index 318c51b44..e17b6e41f 100644 --- a/src/libs/stdc-posix/string.h +++ b/src/libs/stdc-posix/string.h @@ -2,8 +2,8 @@ #include #include -#include -#include +#include +#include diff --git a/src/libs/ubsan/ubsan.c b/src/libs/ubsan/ubsan.c index 18cf79276..7548c4ce4 100644 --- a/src/libs/ubsan/ubsan.c +++ b/src/libs/ubsan/ubsan.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include struct _UbsanSrc { diff --git a/src/loader/config.c b/src/loader/config.c index cf127faa7..eb710b117 100644 --- a/src/loader/config.c +++ b/src/loader/config.c @@ -1,6 +1,6 @@ #include -#include -#include +#include +#include #include "loader/config.h" LoaderEntry config_entry_parse(Json json) diff --git a/src/loader/config.h b/src/loader/config.h index 594e62d9a..66afba800 100644 --- a/src/loader/config.h +++ b/src/loader/config.h @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include +#include typedef struct { diff --git a/src/loader/main.c b/src/loader/main.c index 798c63d98..69aacdf7e 100644 --- a/src/loader/main.c +++ b/src/loader/main.c @@ -1,6 +1,6 @@ -#include -#include -#include +#include +#include +#include #include #include diff --git a/src/loader/manifest.json b/src/loader/manifest.json index 095d43591..40ccdb652 100644 --- a/src/loader/manifest.json +++ b/src/loader/manifest.json @@ -4,13 +4,7 @@ "type": "exe", "requires": [ "json", - "brutal-parse", - "brutal-ds", - "brutal-alloc", - "brutal-io", - "brutal-alloc", - "brutal-mem" - + "brutal" ], "provides": [ "loader" diff --git a/src/loader/memory.c b/src/loader/memory.c index 0e1316999..ca943a98e 100644 --- a/src/loader/memory.c +++ b/src/loader/memory.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include #include #include diff --git a/src/loader/memory.h b/src/loader/memory.h index 408567723..a51fb685b 100644 --- a/src/loader/memory.h +++ b/src/loader/memory.h @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include +#include typedef uintptr_t Pages; typedef Pages *VmmSpace; diff --git a/src/loader/protocol.c b/src/loader/protocol.c index 2958bb069..ef52cfc4f 100644 --- a/src/loader/protocol.c +++ b/src/loader/protocol.c @@ -1,9 +1,9 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include diff --git a/src/srvs/acpi/main.c b/src/srvs/acpi/main.c index bf29af91f..41a41332f 100644 --- a/src/srvs/acpi/main.c +++ b/src/srvs/acpi/main.c @@ -1,7 +1,7 @@ #include #include -#include -#include +#include +#include Iter dump_sdth(AcpiSdth *sdth, void *) { diff --git a/src/srvs/ahci/main.c b/src/srvs/ahci/main.c index d8b73f109..2840055a6 100644 --- a/src/srvs/ahci/main.c +++ b/src/srvs/ahci/main.c @@ -1,8 +1,8 @@ #include #include #include -#include -#include +#include +#include int ipc_component_main(IpcComponent *self) { diff --git a/src/srvs/device/device.h b/src/srvs/device/device.h index 4fd018d91..305cdf09d 100644 --- a/src/srvs/device/device.h +++ b/src/srvs/device/device.h @@ -1,6 +1,6 @@ #pragma once -#include +#include typedef struct _Device Device; diff --git a/src/srvs/pci/main.c b/src/srvs/pci/main.c index cf667122a..831361980 100644 --- a/src/srvs/pci/main.c +++ b/src/srvs/pci/main.c @@ -5,8 +5,8 @@ #include #include #include -#include -#include +#include +#include typedef struct { diff --git a/src/srvs/ps2/main.c b/src/srvs/ps2/main.c index 9a91142ae..ea5deca84 100644 --- a/src/srvs/ps2/main.c +++ b/src/srvs/ps2/main.c @@ -1,8 +1,8 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/src/srvs/system/bus.c b/src/srvs/system/bus.c index 617d36380..fbd40af5d 100644 --- a/src/srvs/system/bus.c +++ b/src/srvs/system/bus.c @@ -1,5 +1,5 @@ #include -#include +#include #include "system/bus.h" void bus_init(Bus *bus, Alloc *alloc) diff --git a/src/srvs/system/main.c b/src/srvs/system/main.c index 4c5a9877d..47598b557 100644 --- a/src/srvs/system/main.c +++ b/src/srvs/system/main.c @@ -1,4 +1,4 @@ -#include +#include #include #include #include diff --git a/src/srvs/system/unit.c b/src/srvs/system/unit.c index 2d6ad0178..6ca1bb4b3 100644 --- a/src/srvs/system/unit.c +++ b/src/srvs/system/unit.c @@ -1,5 +1,5 @@ #include -#include +#include #include #include diff --git a/src/srvs/system/unit.h b/src/srvs/system/unit.h index 029b0c4aa..13b02104f 100644 --- a/src/srvs/system/unit.h +++ b/src/srvs/system/unit.h @@ -3,7 +3,7 @@ #include #include #include -#include +#include typedef enum { diff --git a/src/utils/bvm/main.c b/src/utils/bvm/main.c index 65f77d7a7..3a796c13f 100644 --- a/src/utils/bvm/main.c +++ b/src/utils/bvm/main.c @@ -1,7 +1,7 @@ #include #include -#include -#include +#include +#include int main(int argc, char const *argv[]) { diff --git a/src/utils/cc/main.c b/src/utils/cc/main.c index e75e3dcce..b7d517d5d 100644 --- a/src/utils/cc/main.c +++ b/src/utils/cc/main.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include #include #include diff --git a/src/utils/fstools/main.c b/src/utils/fstools/main.c index 0b2c55bd9..539971cbc 100644 --- a/src/utils/fstools/main.c +++ b/src/utils/fstools/main.c @@ -1,6 +1,6 @@ -#include -#include -#include +#include +#include +#include #include #include /* diff --git a/src/utils/gunzip/main.c b/src/utils/gunzip/main.c index 826dcc681..5ae6d5cb9 100644 --- a/src/utils/gunzip/main.c +++ b/src/utils/gunzip/main.c @@ -1,4 +1,4 @@ -#include +#include #include int main(int argc, char const *argv[]) diff --git a/src/utils/gzip/main.c b/src/utils/gzip/main.c index 632c74766..57fc95bd1 100644 --- a/src/utils/gzip/main.c +++ b/src/utils/gzip/main.c @@ -1,4 +1,4 @@ -#include +#include #include int main(int argc, char const *argv[]) diff --git a/src/utils/hello/main.c b/src/utils/hello/main.c index 6ecb31d2d..da50219f3 100644 --- a/src/utils/hello/main.c +++ b/src/utils/hello/main.c @@ -1,4 +1,4 @@ -#include +#include int main(int argc, char const *argv[]) { diff --git a/src/utils/idgen/main.c b/src/utils/idgen/main.c index bfd868076..76c8246aa 100644 --- a/src/utils/idgen/main.c +++ b/src/utils/idgen/main.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include int main(int, char const *[]) { diff --git a/src/utils/idl/main.c b/src/utils/idl/main.c index 5ebcdb2ae..ceb39f6c3 100644 --- a/src/utils/idl/main.c +++ b/src/utils/idl/main.c @@ -4,9 +4,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include int main(int argc, char const *argv[]) { diff --git a/src/utils/test/brutal/alloc/heap.c b/src/utils/test/brutal/alloc/heap.c index c334037af..08efe3487 100644 --- a/src/utils/test/brutal/alloc/heap.c +++ b/src/utils/test/brutal/alloc/heap.c @@ -1,4 +1,4 @@ -#include +#include test$(heap_traits) { diff --git a/src/utils/test/brutal/base/endian.c b/src/utils/test/brutal/base/endian.c index 856faf8e7..238d9748a 100644 --- a/src/utils/test/brutal/base/endian.c +++ b/src/utils/test/brutal/base/endian.c @@ -1,4 +1,4 @@ -#include +#include test$(endian_be_load$_store$16) { diff --git a/src/utils/test/brutal/codec/deflate.c b/src/utils/test/brutal/codec/deflate.c index 33623ffe0..aa9c4e44e 100644 --- a/src/utils/test/brutal/codec/deflate.c +++ b/src/utils/test/brutal/codec/deflate.c @@ -1,4 +1,4 @@ -#include +#include #include test$(deflate_uncompressed) diff --git a/src/utils/test/brutal/codec/gzip.c b/src/utils/test/brutal/codec/gzip.c index 50efeb299..da71f7dd1 100644 --- a/src/utils/test/brutal/codec/gzip.c +++ b/src/utils/test/brutal/codec/gzip.c @@ -1,4 +1,4 @@ -#include +#include #include test$(gzip_empty_raw) diff --git a/src/utils/test/brutal/codec/inflate.c b/src/utils/test/brutal/codec/inflate.c index 949e56b03..49e9d6e00 100644 --- a/src/utils/test/brutal/codec/inflate.c +++ b/src/utils/test/brutal/codec/inflate.c @@ -1,4 +1,4 @@ -#include +#include #include test$(inflate_uncompressed) diff --git a/src/utils/test/brutal/codec/zlib.c b/src/utils/test/brutal/codec/zlib.c index 71df1708a..eadcab697 100644 --- a/src/utils/test/brutal/codec/zlib.c +++ b/src/utils/test/brutal/codec/zlib.c @@ -1,4 +1,4 @@ -#include +#include #include test$(zlib_empty_raw) diff --git a/src/utils/test/brutal/ds/map.c b/src/utils/test/brutal/ds/map.c index cc0f0805b..04623e57c 100644 --- a/src/utils/test/brutal/ds/map.c +++ b/src/utils/test/brutal/ds/map.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include test$(map_put_get) { diff --git a/src/utils/test/brutal/ds/range.c b/src/utils/test/brutal/ds/range.c index 37f40417c..ec8e0ae84 100644 --- a/src/utils/test/brutal/ds/range.c +++ b/src/utils/test/brutal/ds/range.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include test$(ds_range_alloc_used_start) { diff --git a/src/utils/test/brutal/ds/slot.c b/src/utils/test/brutal/ds/slot.c index 006b3fe8b..021de14e9 100644 --- a/src/utils/test/brutal/ds/slot.c +++ b/src/utils/test/brutal/ds/slot.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include test$(slot_acquire_release) { diff --git a/src/utils/test/brutal/ds/vec.c b/src/utils/test/brutal/ds/vec.c index ce83b6147..e0d051b11 100644 --- a/src/utils/test/brutal/ds/vec.c +++ b/src/utils/test/brutal/ds/vec.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include test$(vec_init_deinit) { diff --git a/src/utils/test/brutal/fmt/case.c b/src/utils/test/brutal/fmt/case.c index 44570f250..47a70e70d 100644 --- a/src/utils/test/brutal/fmt/case.c +++ b/src/utils/test/brutal/fmt/case.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include static void TEST_CASE(Case c, char const *input, char const *expected) { diff --git a/src/utils/test/brutal/fmt/format.c b/src/utils/test/brutal/fmt/format.c index e305fdf46..7bdde81b5 100644 --- a/src/utils/test/brutal/fmt/format.c +++ b/src/utils/test/brutal/fmt/format.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include #define TEST_CASE(EXPECTED, FORMAT, ...) \ test_case$(EXPECTED) \ diff --git a/src/utils/test/brutal/fmt/printf.c b/src/utils/test/brutal/fmt/printf.c index e5c013ddb..9bbfcb8e9 100644 --- a/src/utils/test/brutal/fmt/printf.c +++ b/src/utils/test/brutal/fmt/printf.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include #define TEST_CASE(EXPECTED, FORMAT, ...) \ test_case$(EXPECTED) \ diff --git a/src/utils/test/brutal/glob/glob.c b/src/utils/test/brutal/glob/glob.c index 98b7c2814..64dccda20 100644 --- a/src/utils/test/brutal/glob/glob.c +++ b/src/utils/test/brutal/glob/glob.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include static void expect_match(char const *pattern, char const *input) { diff --git a/src/utils/test/brutal/io/bit_write.c b/src/utils/test/brutal/io/bit_write.c index 52198dc1b..bde319cf2 100644 --- a/src/utils/test/brutal/io/bit_write.c +++ b/src/utils/test/brutal/io/bit_write.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include test$(bitwriter_write_aligned) { diff --git a/src/utils/test/brutal/tests/expect.c b/src/utils/test/brutal/tests/expect.c index e0b6365e9..b823ae990 100644 --- a/src/utils/test/brutal/tests/expect.c +++ b/src/utils/test/brutal/tests/expect.c @@ -1,4 +1,4 @@ -#include +#include test$(expect_not_null_pass) { diff --git a/src/utils/test/brutal/tests/test.c b/src/utils/test/brutal/tests/test.c index 4ab4cae0f..19823dd21 100644 --- a/src/utils/test/brutal/tests/test.c +++ b/src/utils/test/brutal/tests/test.c @@ -1,4 +1,4 @@ -#include +#include test$(should_run) { diff --git a/src/utils/test/cc/cc.h b/src/utils/test/cc/cc.h index d2cfab5bd..2ea8eab54 100644 --- a/src/utils/test/cc/cc.h +++ b/src/utils/test/cc/cc.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include // FIXME: get ride of those ugly macros. diff --git a/src/utils/test/cc/pproc.c b/src/utils/test/cc/pproc.c index e2b134ede..07baba10b 100644 --- a/src/utils/test/cc/pproc.c +++ b/src/utils/test/cc/pproc.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include #include diff --git a/src/utils/test/json/json.c b/src/utils/test/json/json.c index a701539d4..ba59c1c56 100644 --- a/src/utils/test/json/json.c +++ b/src/utils/test/json/json.c @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/utils/test/main.c b/src/utils/test/main.c index f9dfcf904..fdbbc4a0a 100644 --- a/src/utils/test/main.c +++ b/src/utils/test/main.c @@ -1,4 +1,4 @@ -#include +#include int main(int argc, char const *argv[]) { From 175c3dc34100a92b8df71f69a9cd665c5dd960d5 Mon Sep 17 00:00:00 2001 From: Supercip971 Date: Tue, 21 Feb 2023 11:38:45 -0400 Subject: [PATCH 13/13] osdk-trans: now build the kernel + loader and added the ability to boot the system --- meta/plugins/boot.py | 105 +++++++++++++++++++++++++++ meta/targets/host-x86_64.json | 64 +++++++++++++++++ meta/targets/host-x86_64.ld | 27 +++++++ meta/targets/kernel-x86_64.json | 2 +- meta/targets/loader-x86_64.json | 107 ++++++++++++++++++++++++++++ meta/targets/loader-x86_64.ld | 67 +++++++++++++++++ src/libs/brutal/alloc/base.h | 2 + src/libs/brutal/cli/fmt.h | 3 +- src/libs/brutal/manifest.json | 25 ++++++- src/libs/brutal/task/task.h | 6 +- src/libs/brutal/test/runner.c | 25 +++++-- src/libs/brutal/test/runner.h | 3 +- src/libs/cc/ast/decl.h | 2 +- src/libs/cc/ast/expr.h | 2 +- src/libs/cc/ast/stmt.h | 3 +- src/libs/cc/ast/type.h | 4 +- src/libs/cc/ast/val.h | 2 +- src/libs/cc/builder/expr.c | 2 +- src/libs/cc/builder/stmt.c | 2 +- src/libs/cc/builder/type.c | 3 +- src/libs/cc/dump.h | 1 - src/libs/cc/dump/dump.c | 2 +- src/libs/cc/lex/lexer.c | 2 +- src/libs/cc/lex/lexer.h | 2 +- src/libs/cc/lex/pproc.c | 3 +- src/libs/cc/lex/pproc.h | 2 +- src/libs/cc/manifest.json | 18 +++++ src/libs/cc/parse/cval.c | 2 + src/libs/cc/parse/decl.c | 3 +- src/libs/cc/parse/expr.c | 3 +- src/libs/cc/parse/stmt.c | 1 - src/libs/cc/sema/sema.c | 1 + src/libs/cc/sema/visit.c | 3 +- src/libs/cc/trans.h | 2 +- src/libs/cc/trans/expr.c | 2 +- src/libs/cc/trans/val.c | 2 +- src/libs/embed/efi/chan.c | 7 +- src/libs/embed/efi/debug.c | 2 +- src/libs/embed/efi/file.c | 2 +- src/libs/embed/efi/log.c | 1 + src/libs/embed/efi/manifest.json | 13 ++++ src/libs/embed/efi/mem.c | 6 +- src/libs/embed/kernel/manifest.json | 5 +- src/libs/embed/posix/chan.c | 2 +- src/libs/embed/posix/err.c | 2 +- src/libs/embed/posix/file.c | 5 +- src/libs/embed/posix/log.c | 4 +- src/libs/embed/posix/manifest.json | 13 ++++ src/libs/embed/posix/mem.c | 2 +- src/libs/embed/posix/task.c | 1 + src/libs/embed/posix/time.c | 15 ++-- src/libs/idl/ast/builder.c | 4 +- src/libs/idl/ast/iface.h | 2 +- src/libs/idl/ast/types.h | 3 +- src/libs/idl/cgen.h | 1 + src/libs/idl/cgen/binding.c | 2 +- src/libs/idl/cgen/dispatch.c | 2 +- src/libs/idl/cgen/handler.c | 2 +- src/libs/idl/cgen/header.c | 2 +- src/libs/idl/cgen/includes.c | 2 +- src/libs/idl/cgen/method.c | 1 - src/libs/idl/cgen/pack.c | 4 +- src/libs/idl/cgen/provider.c | 2 +- src/libs/idl/cgen/source.c | 2 +- src/libs/idl/cgen/types.c | 3 +- src/libs/idl/cgen/unpack.c | 3 +- src/libs/idl/json.c | 2 +- src/libs/idl/manifest.json | 14 ++++ src/libs/idl/parse.c | 6 +- src/libs/idl/parse.h | 2 +- src/libs/idl/sema.c | 6 +- src/libs/libc-math/manifest.json | 9 +++ src/libs/libc/manifest.json | 1 + src/loader/manifest.json | 8 ++- src/loader/memory.c | 4 +- src/protos/manifest.json | 5 ++ src/srvs/system/main.c | 2 +- src/srvs/system/manifest.json | 10 +++ src/srvs/system/unit.c | 2 +- src/srvs/system/unit.h | 2 +- src/utils/idl/main.c | 12 +++- src/utils/idl/manifest.json | 9 +++ 82 files changed, 627 insertions(+), 87 deletions(-) create mode 100644 meta/plugins/boot.py create mode 100644 meta/targets/host-x86_64.json create mode 100644 meta/targets/host-x86_64.ld create mode 100644 meta/targets/loader-x86_64.json create mode 100644 meta/targets/loader-x86_64.ld create mode 100644 src/libs/cc/manifest.json create mode 100644 src/libs/embed/efi/manifest.json create mode 100644 src/libs/embed/posix/manifest.json create mode 100644 src/libs/idl/manifest.json create mode 100644 src/libs/libc-math/manifest.json create mode 100644 src/protos/manifest.json create mode 100644 src/srvs/system/manifest.json create mode 100644 src/utils/idl/manifest.json diff --git a/meta/plugins/boot.py b/meta/plugins/boot.py new file mode 100644 index 000000000..ceeb0bb89 --- /dev/null +++ b/meta/plugins/boot.py @@ -0,0 +1,105 @@ +import os + + + +from osdk.context import loadAllComponents +from osdk import utils, shell, builder +from osdk.cmds import Cmd, append +from osdk.args import Args + + +def kvmAvailable() -> bool: + if os.path.exists("/dev/kvm") and os.access("/dev/kvm", os.R_OK): + return True + return False + + + +def buildPkgs(binDir: str, debug: bool) -> list[str]: + pkgs = [p.id for p in loadAllComponents() if "src/srvs" in p.dirname()] + + for pkg in pkgs: + elf = builder.build(pkg, "brutal-x86_64:debug") + shell.cp(elf, f"{binDir}/{os.path.basename(elf)[:-4]}") + + + + return pkgs + + +def limineGenConfig(bootDir: str, pkgs: list[str]) -> None: + with open(f"{bootDir}/limine.cfg", "w") as cfg: + cfg.write( + "TIMEOUT=0\n:Munix\nPROTOCOL=limine\nKERNEL_PATH=boot:///boot/kernel.elf\n" + ) + + for pkg in pkgs: + cfg.write(f"MODULE_PATH=boot:///bin/{pkg}") + + +def copySysroot(sysrootDir: str, imageDir: str) -> None: + for root, _, files in os.walk(sysrootDir): + for f in files: + shell.mkdir(f"{imageDir}/{os.path.relpath(root, sysrootDir)}") + shell.cp(os.path.join(root, f), f"{imageDir}/{os.path.relpath(root, sysrootDir)}/{f}") + +def bootCmd(args: Args) -> None: + debug = "debug" in args.opts + imageDir = shell.mkdir(".osdk/images/efi-x86_64") + efiBootDir = shell.mkdir(f"{imageDir}/EFI/BOOT") + binDir = shell.mkdir(f"{imageDir}/bin") + bootDir = shell.mkdir(f"{imageDir}/boot") + + ovmf = shell.wget("https://retrage.github.io/edk2-nightly/bin/RELEASEX64_OVMF.fd") + + brutal = builder.build("core", "kernel-x86_64:debug") + loader = builder.build("loader-brutal", "loader-x86_64:debug") + + + shell.cp(brutal, f"{bootDir}/kernel.elf") + shell.cp(loader, f"{efiBootDir}/BOOTX64.EFI") + + + copySysroot("./sysroot", f"{imageDir}") + buildPkgs(f"{imageDir}/pkgs", debug) + + + + + qemuCmd: list[str] = [ + "qemu-system-x86_64", + "-machine", + "q35", + "-no-reboot", + "-no-shutdown", + # "-d", "guest_errors,cpu_reset,int", + # "-S", "-s", + "-serial", + "mon:stdio", + "-bios", + ovmf, + "-m", + "4G", + "-smp", + "4", + "-drive", + f"file=fat:rw:{imageDir},media=disk,format=raw", + ] + + if kvmAvailable(): + qemuCmd += ["-enable-kvm"] + else: + print("KVM not available, using QEMU-TCG") + + shell.exec(*qemuCmd) + +def protocolBuild(args: Args) -> None: + elf = builder.build("idgen", "host-x86_64:debug") + + pkgs = loadAllComponents() + for pkg in pkgs: + if "" in pkg.dirname(): + shell.exec(elf, pkg.id, f"{pkg.dirname()}/protocol.h") + +append(Cmd("p", "protocols", "Build protocols headers", buildPkgs)) +append(Cmd("s", "start", "Boot the system", bootCmd)) \ No newline at end of file diff --git a/meta/targets/host-x86_64.json b/meta/targets/host-x86_64.json new file mode 100644 index 000000000..ca33f14a1 --- /dev/null +++ b/meta/targets/host-x86_64.json @@ -0,0 +1,64 @@ +{ + "id": "host-x86_64", + "type": "target", + "props": { + "toolchain": "clang", + "arch": "x86_64", + "bits": "64", + "sys": [ + "@uname", + "sysname" + ], + "abi": "sysv", + "encoding": "utf8", + "freestanding": false, + "host": true + }, + "tools": { + "cc": { + "cmd": [ + "@latest", + "clang" + ], + "args": [ + "-std=gnu2x", + "-D__linux__" + ] + }, + "cxx": { + "cmd": [ + "@latest", + "clang++" + ], + "args": [ + "-std=gnu2x", + "-D__linux__" + ] + }, + "ld": { + "cmd": [ + "@latest", + "clang" + ], + "args": [ + ], + "files": [ + ] + }, + "ar": { + "cmd": [ + "@latest", + "llvm-ar" + ], + "args": [ + "rcs" + ] + }, + "as": { + "cmd": "nasm", + "args": [ + "-f elf64" + ] + } + } +} \ No newline at end of file diff --git a/meta/targets/host-x86_64.ld b/meta/targets/host-x86_64.ld new file mode 100644 index 000000000..b2d06b328 --- /dev/null +++ b/meta/targets/host-x86_64.ld @@ -0,0 +1,27 @@ +ENTRY(_start) + +SECTIONS +{ + . = 4M; + + .text : ALIGN(4K) + { + *(.text) + } + + .rodata : ALIGN(4K) + { + *(.rodata) + } + + .data : ALIGN(4K) + { + *(.data) + } + + .bss : ALIGN(4K) + { + *(COMMON) + *(.bss) + } +} \ No newline at end of file diff --git a/meta/targets/kernel-x86_64.json b/meta/targets/kernel-x86_64.json index faf984edb..f2aa77e9e 100644 --- a/meta/targets/kernel-x86_64.json +++ b/meta/targets/kernel-x86_64.json @@ -5,7 +5,7 @@ "toolchain": "clang", "arch": "x86_64", "bits": "64", - "sys": "brutal", + "sys": "kernel", "abi": "sysv", "loader": "brutal-loader", "encoding": "utf8", diff --git a/meta/targets/loader-x86_64.json b/meta/targets/loader-x86_64.json new file mode 100644 index 000000000..c6056c2cb --- /dev/null +++ b/meta/targets/loader-x86_64.json @@ -0,0 +1,107 @@ +{ + "id": "loader-x86_64", + "type": "target", + "props": { + "toolchain": "clang", + "arch": "x86_64", + "bits": "64", + "sys": "uefi", + "abi": "microsoft", + "loader": "brutal-loader", + "encoding": "utf8", + "freestanding": true, + "host": false + }, + "tools": { + "cc": { + "cmd": [ + "@latest", + "clang" + ], + "args": [ + "-target", + "x86_64-unknown-windows", + "-nostdlibinc", + "-Isrc/libs/libc", + "-Isrc/libs/libc-math", + "-ffreestanding", + "-fno-stack-protector", + "-mno-80387", + "-mno-mmx", + "-mno-3dnow", + "-D__freestanding__", + "-D__efi__", + "-D__loader__", + "-D__x86_64__", + "-mno-sse", + "-mno-sse2", + "-fshort-wchar", + "-mno-red-zone", + "-mcmodel=kernel", + "-fbuiltin", + "-nostdlib", + "-nostdlib++", + "-D__freestanding__" + ] + }, + "cxx": { + "cmd": [ + "@latest", + "clang++" + ], + "args": [ + "-target", + "x86_64-unknown-windows", + "-nostdlibinc", + "-Isrc/libs/libc", + "-Isrc/libs/libc-math", + "-ffreestanding", + "-fno-stack-protector", + "-mno-80387", + "-mno-mmx", + "-mno-3dnow", + "-D__freestanding__", + "-D__efi__", + "-D__loader__", + "-D__x86_64__", + "-mno-sse", + "-mno-sse2", + "-fshort-wchar", + "-mno-red-zone", + "-mcmodel=kernel", + "-fbuiltin", + "-nostdlib", + "-nostdlib++", + "-D__freestanding__" + ] + }, + "ld": { + "cmd": [ + "@latest", + "clang" + ], + "args": [ + "-target x86_64-unknown-windows ", + "-nostdlib ", + "-Wl,-entry:efi_main ", + "-Wl,-subsystem:efi_application ", + "-fuse-ld=lld-link" + ] + }, + "ar": { + "cmd": [ + "@latest", + "llvm-ar" + ], + "args": [ + "rcs" + ] + }, + "as": { + "cmd": "nasm", + "args": [ + "-f elf64" + ] + } + } +} \ No newline at end of file diff --git a/meta/targets/loader-x86_64.ld b/meta/targets/loader-x86_64.ld new file mode 100644 index 000000000..d5d4d55e3 --- /dev/null +++ b/meta/targets/loader-x86_64.ld @@ -0,0 +1,67 @@ +/* Tell the linker that we want an x86_64 ELF64 output file */ +OUTPUT_FORMAT(efi-app-x86_64) +OUTPUT_ARCH(i386:x86-64) + +/* We want the symbol _start to be our entry point */ +ENTRY(_start) + +/* Define the program headers we want so the bootloader gives us the right */ +/* MMU permissions */ +PHDRS +{ + text PT_LOAD FLAGS((1 << 0) | (1 << 2)) ; /* Execute + Read */ + rodata PT_LOAD FLAGS((1 << 2)) ; /* Read only */ + data PT_LOAD FLAGS((1 << 1) | (1 << 2)) ; /* Write + Read */ +} + +SECTIONS +{ + /* We wanna be placed in the topmost 2GiB of the address space, for optimisations */ + /* and because that is what the Limine spec mandates. */ + /* Any address in this region will do, but often 0xffffffff80000000 is chosen as */ + /* that is the beginning of the region. */ + . = 0x; + + text_start_addr = .; + + .text : { + *(.text .text.*) + } :text + + text_end_addr = .; + + /* Move to the next memory page for .rodata */ + . += CONSTANT(MAXPAGESIZE); + + rodata_start_addr = .; + + PROVIDE(symbol_table = 1); + + .rodata : { + *(.rodata .rodata.*) + } :rodata + + rodata_end_addr = .; + + /* Move to the next memory page for .data */ + . += CONSTANT(MAXPAGESIZE); + + data_start_addr = .; + + .data : { + *(.data .data.*) + } :data + + .bss : { + *(COMMON) + *(.bss .bss.*) + } :data + + data_end_addr = .; + + /* Discard .note.* and .eh_frame since they may cause issues on some hosts. */ + /DISCARD/ : { + *(.eh_frame) + *(.note .note.*) + } +} \ No newline at end of file diff --git a/src/libs/brutal/alloc/base.h b/src/libs/brutal/alloc/base.h index cac7877bb..eb9a05306 100644 --- a/src/libs/brutal/alloc/base.h +++ b/src/libs/brutal/alloc/base.h @@ -3,6 +3,8 @@ #include #include #include +#include + typedef struct _Alloc Alloc; diff --git a/src/libs/brutal/cli/fmt.h b/src/libs/brutal/cli/fmt.h index f0476c372..e9799cbe0 100644 --- a/src/libs/brutal/cli/fmt.h +++ b/src/libs/brutal/cli/fmt.h @@ -1,7 +1,8 @@ #pragma once -#include +#include #include +#include IoResult cli_fmt(IoWriter writer, Str format, AnyVa args); diff --git a/src/libs/brutal/manifest.json b/src/libs/brutal/manifest.json index 615cd444f..3474625f2 100644 --- a/src/libs/brutal/manifest.json +++ b/src/libs/brutal/manifest.json @@ -3,6 +3,29 @@ "type": "lib", "description": "Brutal utility library", "requires": [ - "embed-system" + "embed-system", + "embed-arch", + "libc-math" + ], + "subdirs": [ + "time", + "text", + "test", + "task", + "sync", + "parse", + "mem", + "math", + "io", + "input", + "hash", + "glob", + "fmt", + "fibers", + "ds", + "debug", + "cli", + "base", + "alloc" ] } \ No newline at end of file diff --git a/src/libs/brutal/task/task.h b/src/libs/brutal/task/task.h index bac29b9dc..608b292ac 100644 --- a/src/libs/brutal/task/task.h +++ b/src/libs/brutal/task/task.h @@ -1,6 +1,10 @@ #pragma once -#include +#include +#include +#include + + #define TASK_THIS (0) diff --git a/src/libs/brutal/test/runner.c b/src/libs/brutal/test/runner.c index 1093a84e8..4d3cf76f3 100644 --- a/src/libs/brutal/test/runner.c +++ b/src/libs/brutal/test/runner.c @@ -1,9 +1,22 @@ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + + +#include + + +#include #include "runner.h" diff --git a/src/libs/brutal/test/runner.h b/src/libs/brutal/test/runner.h index 6a6465868..4e3161db2 100644 --- a/src/libs/brutal/test/runner.h +++ b/src/libs/brutal/test/runner.h @@ -1,6 +1,7 @@ #pragma once -#include +#include +#include /* --- Tests ---------------------------------------------------------------- */ diff --git a/src/libs/cc/ast/decl.h b/src/libs/cc/ast/decl.h index a0704e890..116862945 100644 --- a/src/libs/cc/ast/decl.h +++ b/src/libs/cc/ast/decl.h @@ -3,7 +3,7 @@ #include #include #include -#include +#include typedef enum { diff --git a/src/libs/cc/ast/expr.h b/src/libs/cc/ast/expr.h index c8323deb1..51c18b3f5 100644 --- a/src/libs/cc/ast/expr.h +++ b/src/libs/cc/ast/expr.h @@ -2,7 +2,7 @@ #include #include -#include +#include #define CEXPR_MAX_PRECEDENCE (16) diff --git a/src/libs/cc/ast/stmt.h b/src/libs/cc/ast/stmt.h index 02d675bde..abe2776fd 100644 --- a/src/libs/cc/ast/stmt.h +++ b/src/libs/cc/ast/stmt.h @@ -1,8 +1,7 @@ #pragma once #include -#include -#include +#include typedef enum { CSTMT_INVALID, diff --git a/src/libs/cc/ast/type.h b/src/libs/cc/ast/type.h index 3023a2951..7f4a8fdba 100644 --- a/src/libs/cc/ast/type.h +++ b/src/libs/cc/ast/type.h @@ -1,7 +1,9 @@ #pragma once #include -#include +#include +#include + typedef enum { diff --git a/src/libs/cc/ast/val.h b/src/libs/cc/ast/val.h index 670bce584..a02fe6301 100644 --- a/src/libs/cc/ast/val.h +++ b/src/libs/cc/ast/val.h @@ -1,6 +1,6 @@ #pragma once -#include +#include typedef int CSigned; typedef unsigned int CUnsigned; diff --git a/src/libs/cc/builder/expr.c b/src/libs/cc/builder/expr.c index 45bb2036c..19317079b 100644 --- a/src/libs/cc/builder/expr.c +++ b/src/libs/cc/builder/expr.c @@ -1,5 +1,5 @@ #include -#include +#include CExpr cexpr_empty(void) { diff --git a/src/libs/cc/builder/stmt.c b/src/libs/cc/builder/stmt.c index dde67bba5..2ad9794a0 100644 --- a/src/libs/cc/builder/stmt.c +++ b/src/libs/cc/builder/stmt.c @@ -1,5 +1,5 @@ #include -#include +#include CStmt cstmt_empty(void) { diff --git a/src/libs/cc/builder/type.c b/src/libs/cc/builder/type.c index 9a63fa89c..8f9050008 100644 --- a/src/libs/cc/builder/type.c +++ b/src/libs/cc/builder/type.c @@ -1,5 +1,6 @@ #include -#include +#include +#include CType ctype_error(void) { diff --git a/src/libs/cc/dump.h b/src/libs/cc/dump.h index d5a0af7bc..2a1682aa0 100644 --- a/src/libs/cc/dump.h +++ b/src/libs/cc/dump.h @@ -2,7 +2,6 @@ #include #include -#include Json cdump_value(CVal value, Alloc *alloc); diff --git a/src/libs/cc/dump/dump.c b/src/libs/cc/dump/dump.c index 385708e63..7d00c3ad5 100644 --- a/src/libs/cc/dump/dump.c +++ b/src/libs/cc/dump/dump.c @@ -1,6 +1,6 @@ #include #include -#include +#include Json cdump_value(CVal value, Alloc *alloc) { diff --git a/src/libs/cc/lex/lexer.c b/src/libs/cc/lex/lexer.c index 4328b4d4b..5ceff21ab 100644 --- a/src/libs/cc/lex/lexer.c +++ b/src/libs/cc/lex/lexer.c @@ -1,5 +1,5 @@ #include -#include +#include struct { diff --git a/src/libs/cc/lex/lexer.h b/src/libs/cc/lex/lexer.h index b3e37a523..6376e310d 100644 --- a/src/libs/cc/lex/lexer.h +++ b/src/libs/cc/lex/lexer.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include // clang-format off diff --git a/src/libs/cc/lex/pproc.c b/src/libs/cc/lex/pproc.c index 808496f08..58fc32a5d 100644 --- a/src/libs/cc/lex/pproc.c +++ b/src/libs/cc/lex/pproc.c @@ -1,6 +1,7 @@ #include #include -#include +#include +#include CProcMacro cproc_macro_init(CProc *ctx, Str name) { diff --git a/src/libs/cc/lex/pproc.h b/src/libs/cc/lex/pproc.h index 9af3e0e97..2fb9b1a73 100644 --- a/src/libs/cc/lex/pproc.h +++ b/src/libs/cc/lex/pproc.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include typedef Vec(Lexemes) MacroArgsCodes; diff --git a/src/libs/cc/manifest.json b/src/libs/cc/manifest.json new file mode 100644 index 000000000..bc7877699 --- /dev/null +++ b/src/libs/cc/manifest.json @@ -0,0 +1,18 @@ +{ + "id": "cc-lib", + "description": "Brutal C language library", + "type": "lib", + "requires": [ + "brutal", + "json" + ], + "subdirs": [ + "ast", + "builder", + "dump", + "lex", + "parse", + "sema", + "trans" + ] +} \ No newline at end of file diff --git a/src/libs/cc/parse/cval.c b/src/libs/cc/parse/cval.c index 1c4ac1982..f4cc40382 100644 --- a/src/libs/cc/parse/cval.c +++ b/src/libs/cc/parse/cval.c @@ -1,4 +1,6 @@ #include +#include + static CVal cparse_cval_char(Lex *lex) { diff --git a/src/libs/cc/parse/decl.c b/src/libs/cc/parse/decl.c index 9993fecce..ca196f7bd 100644 --- a/src/libs/cc/parse/decl.c +++ b/src/libs/cc/parse/decl.c @@ -1,5 +1,6 @@ #include -#include +#include +#include void cparse_func_params(Lex *lex, CType *type, Alloc *alloc) { diff --git a/src/libs/cc/parse/expr.c b/src/libs/cc/parse/expr.c index 636ddb2de..3afbbdc4a 100644 --- a/src/libs/cc/parse/expr.c +++ b/src/libs/cc/parse/expr.c @@ -1,7 +1,6 @@ #include #include -#include -#include +#include static COp lexeme_to_cop[CLEX_COUNT] = { [CLEX_PLUSPLUS] = COP_INC, diff --git a/src/libs/cc/parse/stmt.c b/src/libs/cc/parse/stmt.c index 04b0181da..559998aa4 100644 --- a/src/libs/cc/parse/stmt.c +++ b/src/libs/cc/parse/stmt.c @@ -1,5 +1,4 @@ #include -#include CStmt cparse_stmt(Lex *lex, CUnit *context, Alloc *alloc) { diff --git a/src/libs/cc/sema/sema.c b/src/libs/cc/sema/sema.c index e189b00ab..b07e05f42 100644 --- a/src/libs/cc/sema/sema.c +++ b/src/libs/cc/sema/sema.c @@ -1,5 +1,6 @@ #include #include +#include void csema_init(CSema *self, Alloc *alloc) { *self = (CSema){}; diff --git a/src/libs/cc/sema/visit.c b/src/libs/cc/sema/visit.c index 5c2baf3ec..5620a1cd0 100644 --- a/src/libs/cc/sema/visit.c +++ b/src/libs/cc/sema/visit.c @@ -1,6 +1,7 @@ #include #include -#include +#include + CType csema_value_type(MAYBE_UNUSED CSema *sema, CVal value, Alloc *alloc) { diff --git a/src/libs/cc/trans.h b/src/libs/cc/trans.h index 9154aff03..aa58892ac 100644 --- a/src/libs/cc/trans.h +++ b/src/libs/cc/trans.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include void cc_trans_decl(Emit *emit, CDecl decl); diff --git a/src/libs/cc/trans/expr.c b/src/libs/cc/trans/expr.c index ea5a6ee8e..092149c8c 100644 --- a/src/libs/cc/trans/expr.c +++ b/src/libs/cc/trans/expr.c @@ -1,4 +1,4 @@ -#include +#include #include static void cc_trans_op_fix(Emit *emit, COp op) diff --git a/src/libs/cc/trans/val.c b/src/libs/cc/trans/val.c index 578461c98..95d22ae72 100644 --- a/src/libs/cc/trans/val.c +++ b/src/libs/cc/trans/val.c @@ -1,4 +1,4 @@ -#include +#include #include void cc_trans_value(Emit *emit, CVal value) diff --git a/src/libs/embed/efi/chan.c b/src/libs/embed/efi/chan.c index 0ceac7066..89f48a12b 100644 --- a/src/libs/embed/efi/chan.c +++ b/src/libs/embed/efi/chan.c @@ -1,9 +1,10 @@ #include #include #include -#include -#include -#include +#include +#include +#include + IoResult embed_chan_read(IoChan channel, uint8_t *data, size_t size) { diff --git a/src/libs/embed/efi/debug.c b/src/libs/embed/efi/debug.c index 955ecf875..58eabc333 100644 --- a/src/libs/embed/efi/debug.c +++ b/src/libs/embed/efi/debug.c @@ -1,4 +1,4 @@ -#include +#include #include void embed_log_prefix(IoWriter writer) diff --git a/src/libs/embed/efi/file.c b/src/libs/embed/efi/file.c index 90644986f..8ea2b7157 100644 --- a/src/libs/embed/efi/file.c +++ b/src/libs/embed/efi/file.c @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/libs/embed/efi/log.c b/src/libs/embed/efi/log.c index 900dc97cc..f7e53e0de 100644 --- a/src/libs/embed/efi/log.c +++ b/src/libs/embed/efi/log.c @@ -3,6 +3,7 @@ #include #include +#include static IoResult embed_log_write(MAYBE_UNUSED void *context, uint8_t const *data, size_t size) { uint16_t *cstr = utf16_str_to_cstr_dos(str_n$(size, (char *)data), alloc_global()); diff --git a/src/libs/embed/efi/manifest.json b/src/libs/embed/efi/manifest.json new file mode 100644 index 000000000..219442ef8 --- /dev/null +++ b/src/libs/embed/efi/manifest.json @@ -0,0 +1,13 @@ +{ + "id": "embed-uefi", + "type": "lib", + "description": "Embed utility library", + + "provides": [ + "embed-system", + "brutal" + ], + "enableIf": { + "sys": ["uefi"] + } +} \ No newline at end of file diff --git a/src/libs/embed/efi/mem.c b/src/libs/embed/efi/mem.c index a34268056..66850922a 100644 --- a/src/libs/embed/efi/mem.c +++ b/src/libs/embed/efi/mem.c @@ -1,6 +1,6 @@ -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/src/libs/embed/kernel/manifest.json b/src/libs/embed/kernel/manifest.json index 3fb502fb2..17468ddcd 100644 --- a/src/libs/embed/kernel/manifest.json +++ b/src/libs/embed/kernel/manifest.json @@ -6,5 +6,8 @@ ], "provides": [ "embed-system" - ] + ], + "enableIf": { + "sys": ["kernel"] + } } \ No newline at end of file diff --git a/src/libs/embed/posix/chan.c b/src/libs/embed/posix/chan.c index 797ca58f1..b7559853a 100644 --- a/src/libs/embed/posix/chan.c +++ b/src/libs/embed/posix/chan.c @@ -1,7 +1,7 @@ #include #include #include -#include +#include IoResult embed_chan_read(IoChan channel, uint8_t *data, size_t size) { diff --git a/src/libs/embed/posix/err.c b/src/libs/embed/posix/err.c index 20bfe92a2..a2907b073 100644 --- a/src/libs/embed/posix/err.c +++ b/src/libs/embed/posix/err.c @@ -1,7 +1,7 @@ #include #include #include -#include +#include Error error_from_errno(void) { diff --git a/src/libs/embed/posix/file.c b/src/libs/embed/posix/file.c index 5549c6f4b..54bf62612 100644 --- a/src/libs/embed/posix/file.c +++ b/src/libs/embed/posix/file.c @@ -1,12 +1,11 @@ #include #include #include -#include #include #include #include -#include -#include +#include +#include #include int embed_flags2posix_flags(FileInitFlags flags) diff --git a/src/libs/embed/posix/log.c b/src/libs/embed/posix/log.c index 8589e6052..ea285b35d 100644 --- a/src/libs/embed/posix/log.c +++ b/src/libs/embed/posix/log.c @@ -4,7 +4,9 @@ #include #include #include -#include +#include +#include + void embed_log_lock(void) { diff --git a/src/libs/embed/posix/manifest.json b/src/libs/embed/posix/manifest.json new file mode 100644 index 000000000..fc152156c --- /dev/null +++ b/src/libs/embed/posix/manifest.json @@ -0,0 +1,13 @@ +{ + "id": "embed-posix", + "type": "lib", + "description": "Embed utility library", + "requires": [ + ], + "provides": [ + "embed-system" + ], + "enableIf": { + "sys": ["linux", "darwin"] + } +} \ No newline at end of file diff --git a/src/libs/embed/posix/mem.c b/src/libs/embed/posix/mem.c index 00d8a6ad3..7ea4f8829 100644 --- a/src/libs/embed/posix/mem.c +++ b/src/libs/embed/posix/mem.c @@ -1,4 +1,4 @@ -#include +#include #include #include #include diff --git a/src/libs/embed/posix/task.c b/src/libs/embed/posix/task.c index a2a5710b0..dc976904c 100644 --- a/src/libs/embed/posix/task.c +++ b/src/libs/embed/posix/task.c @@ -1,4 +1,5 @@ #include +#include #include #include #include diff --git a/src/libs/embed/posix/time.c b/src/libs/embed/posix/time.c index a4a3aacb8..eba50702f 100644 --- a/src/libs/embed/posix/time.c +++ b/src/libs/embed/posix/time.c @@ -1,22 +1,25 @@ #include +#include #include -#include +#include +#include "brutal/time/types.h" Tick embed_time_current_tick(void) { - struct timespec ts; - clock_gettime(CLOCK_MONOTONIC, &ts); + struct timespec ts={}; + //clock_gettime(CLOCK_MONOTONIC, &ts); return (uint64_t)(ts.tv_nsec / 1000000) + ((uint64_t)ts.tv_sec * 1000ull); } unsigned long embed_time_current_nsec(void) { - struct timespec ts; - clock_gettime(CLOCK_MONOTONIC, &ts); + struct timespec ts={}; + //clock_gettime(CLOCK_MONOTONIC, &ts); return (ts.tv_nsec) + ((uint64_t)ts.tv_sec * 1000000000ull); } TimeStamp embed_time_current_timestamp(void) { - return (TimeStamp)time(nullptr); + // return (TimeStamp)time(nullptr); + return (TimeStamp){0}; } diff --git a/src/libs/idl/ast/builder.c b/src/libs/idl/ast/builder.c index 77bd4f953..af7068c5d 100644 --- a/src/libs/idl/ast/builder.c +++ b/src/libs/idl/ast/builder.c @@ -1,6 +1,8 @@ #include #include -#include +#include +#include +#include /* --- Types ---------------------------------------------------------------- */ diff --git a/src/libs/idl/ast/iface.h b/src/libs/idl/ast/iface.h index 950b00200..3ab3ab481 100644 --- a/src/libs/idl/ast/iface.h +++ b/src/libs/idl/ast/iface.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include typedef struct { diff --git a/src/libs/idl/ast/types.h b/src/libs/idl/ast/types.h index e9767e97e..ca531f016 100644 --- a/src/libs/idl/ast/types.h +++ b/src/libs/idl/ast/types.h @@ -1,6 +1,7 @@ #pragma once -#include +#include +#include typedef struct _IdlType IdlType; diff --git a/src/libs/idl/cgen.h b/src/libs/idl/cgen.h index d85483a67..2fe202b7c 100644 --- a/src/libs/idl/cgen.h +++ b/src/libs/idl/cgen.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include diff --git a/src/libs/idl/cgen/binding.c b/src/libs/idl/cgen/binding.c index a1081daa1..d3e1897aa 100644 --- a/src/libs/idl/cgen/binding.c +++ b/src/libs/idl/cgen/binding.c @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/libs/idl/cgen/dispatch.c b/src/libs/idl/cgen/dispatch.c index 1e7cdfd4e..19de906aa 100644 --- a/src/libs/idl/cgen/dispatch.c +++ b/src/libs/idl/cgen/dispatch.c @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/libs/idl/cgen/handler.c b/src/libs/idl/cgen/handler.c index 4ae83432b..49e9782ea 100644 --- a/src/libs/idl/cgen/handler.c +++ b/src/libs/idl/cgen/handler.c @@ -1,6 +1,6 @@ #include #include -#include +#include CType idl_cgen_handler_type(IdlMethod method, IdlModule const module, Alloc *alloc) { diff --git a/src/libs/idl/cgen/header.c b/src/libs/idl/cgen/header.c index a402b9bd3..17f94a997 100644 --- a/src/libs/idl/cgen/header.c +++ b/src/libs/idl/cgen/header.c @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/libs/idl/cgen/includes.c b/src/libs/idl/cgen/includes.c index 677c714ca..8b4610667 100644 --- a/src/libs/idl/cgen/includes.c +++ b/src/libs/idl/cgen/includes.c @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/libs/idl/cgen/method.c b/src/libs/idl/cgen/method.c index 50eb6634d..d9c74e32d 100644 --- a/src/libs/idl/cgen/method.c +++ b/src/libs/idl/cgen/method.c @@ -1,6 +1,5 @@ #include #include -#include CType idl_cgen_method_type(IdlMethod method, IdlModule const module, Alloc *alloc) { diff --git a/src/libs/idl/cgen/pack.c b/src/libs/idl/cgen/pack.c index 65d2a6652..bd99052f3 100644 --- a/src/libs/idl/cgen/pack.c +++ b/src/libs/idl/cgen/pack.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include #include diff --git a/src/libs/idl/cgen/provider.c b/src/libs/idl/cgen/provider.c index 9b7d649ba..c42ae6b34 100644 --- a/src/libs/idl/cgen/provider.c +++ b/src/libs/idl/cgen/provider.c @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/libs/idl/cgen/source.c b/src/libs/idl/cgen/source.c index d4a9596c3..80ccbe3f7 100644 --- a/src/libs/idl/cgen/source.c +++ b/src/libs/idl/cgen/source.c @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/libs/idl/cgen/types.c b/src/libs/idl/cgen/types.c index c3b1fe242..e3ed136e4 100644 --- a/src/libs/idl/cgen/types.c +++ b/src/libs/idl/cgen/types.c @@ -1,4 +1,5 @@ -#include +#include +#include #include #include diff --git a/src/libs/idl/cgen/unpack.c b/src/libs/idl/cgen/unpack.c index 6399d2f9e..f94d6231d 100644 --- a/src/libs/idl/cgen/unpack.c +++ b/src/libs/idl/cgen/unpack.c @@ -1,4 +1,5 @@ -#include +#include +#include #include #include diff --git a/src/libs/idl/json.c b/src/libs/idl/json.c index 2df8815cf..72bf0fc92 100644 --- a/src/libs/idl/json.c +++ b/src/libs/idl/json.c @@ -1,5 +1,5 @@ #include -#include +#include Json idl_jgen_ctype(IdlCtype ctype_, Alloc *alloc) { diff --git a/src/libs/idl/manifest.json b/src/libs/idl/manifest.json new file mode 100644 index 000000000..f05a78424 --- /dev/null +++ b/src/libs/idl/manifest.json @@ -0,0 +1,14 @@ +{ + "id": "bid", + "description": "Brutal IDL library", + "type": "lib", + "requires": [ + "brutal", + "cc-lib", + "libc" + ], + "subdirs": [ + "ast", + "cgen" + ] +} \ No newline at end of file diff --git a/src/libs/idl/parse.c b/src/libs/idl/parse.c index 02be67cde..1e8a834a8 100644 --- a/src/libs/idl/parse.c +++ b/src/libs/idl/parse.c @@ -1,5 +1,7 @@ -#include -#include +#include +#include +#include +#include #include #include diff --git a/src/libs/idl/parse.h b/src/libs/idl/parse.h index 15560442d..c0f6d6afb 100644 --- a/src/libs/idl/parse.h +++ b/src/libs/idl/parse.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include IdlModule idl_parse_module(Scan *scan, Alloc *alloc); diff --git a/src/libs/idl/sema.c b/src/libs/idl/sema.c index 1257f6396..7ed235798 100644 --- a/src/libs/idl/sema.c +++ b/src/libs/idl/sema.c @@ -1,6 +1,6 @@ -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/src/libs/libc-math/manifest.json b/src/libs/libc-math/manifest.json new file mode 100644 index 000000000..a48641d91 --- /dev/null +++ b/src/libs/libc-math/manifest.json @@ -0,0 +1,9 @@ +{ + "id": "libc-math", + "type": "lib", + "description": "C standard library math part implementation", + "props": { + "cpp-root-include": "true" + } + +} \ No newline at end of file diff --git a/src/libs/libc/manifest.json b/src/libs/libc/manifest.json index 95efa5072..1bcb41648 100644 --- a/src/libs/libc/manifest.json +++ b/src/libs/libc/manifest.json @@ -6,6 +6,7 @@ "cpp-root-include": true }, "requires": [ + "libc-math", "brutal", "embed-system" ] diff --git a/src/loader/manifest.json b/src/loader/manifest.json index 40ccdb652..486c89471 100644 --- a/src/loader/manifest.json +++ b/src/loader/manifest.json @@ -4,7 +4,13 @@ "type": "exe", "requires": [ "json", - "brutal" + "brutal", + "embed-system", + "embed-arch", + "elf", + "efi", + "libc", + "handover" ], "provides": [ "loader" diff --git a/src/loader/memory.c b/src/loader/memory.c index ca943a98e..01a19d53a 100644 --- a/src/loader/memory.c +++ b/src/loader/memory.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include #include #include diff --git a/src/protos/manifest.json b/src/protos/manifest.json new file mode 100644 index 000000000..d1a5e4f54 --- /dev/null +++ b/src/protos/manifest.json @@ -0,0 +1,5 @@ +{ + "id": "protos", + "desc": "brutal protocol description library", + "type": "lib" +} \ No newline at end of file diff --git a/src/srvs/system/main.c b/src/srvs/system/main.c index 47598b557..a85323461 100644 --- a/src/srvs/system/main.c +++ b/src/srvs/system/main.c @@ -1,4 +1,4 @@ -#include +#include #include #include #include diff --git a/src/srvs/system/manifest.json b/src/srvs/system/manifest.json new file mode 100644 index 000000000..e056c3e8c --- /dev/null +++ b/src/srvs/system/manifest.json @@ -0,0 +1,10 @@ +{ + "id": "system", + "description": "base brutal system server", + "requires": [ + "bal", + "brutal", + "protos" + ], + "type": "exe" +} \ No newline at end of file diff --git a/src/srvs/system/unit.c b/src/srvs/system/unit.c index 6ca1bb4b3..98d17be93 100644 --- a/src/srvs/system/unit.c +++ b/src/srvs/system/unit.c @@ -1,5 +1,5 @@ #include -#include +#include #include #include diff --git a/src/srvs/system/unit.h b/src/srvs/system/unit.h index 13b02104f..abe9f3e8f 100644 --- a/src/srvs/system/unit.h +++ b/src/srvs/system/unit.h @@ -3,7 +3,7 @@ #include #include #include -#include +#include typedef enum { diff --git a/src/utils/idl/main.c b/src/utils/idl/main.c index ceb39f6c3..7c733a079 100644 --- a/src/utils/idl/main.c +++ b/src/utils/idl/main.c @@ -3,10 +3,16 @@ #include #include #include +#include #include -#include -#include -#include +#include +#include + + +#include +#include +#include + int main(int argc, char const *argv[]) { diff --git a/src/utils/idl/manifest.json b/src/utils/idl/manifest.json new file mode 100644 index 000000000..57ef77190 --- /dev/null +++ b/src/utils/idl/manifest.json @@ -0,0 +1,9 @@ +{ + + "id": "idl", + "description": "brutal IDL tool", + "type": "exe", + "requires": [ + "bid" + ] +} \ No newline at end of file