diff options
Diffstat (limited to 'libraries/euler/include')
-rw-r--r-- | libraries/euler/include/cassert | 13 | ||||
-rw-r--r-- | libraries/euler/include/cctype | 7 | ||||
l--------- | libraries/euler/include/cstddef | 1 | ||||
l--------- | libraries/euler/include/cstdint | 1 | ||||
-rw-r--r-- | libraries/euler/include/cstdio | 19 | ||||
-rw-r--r-- | libraries/euler/include/cstring | 14 | ||||
-rw-r--r-- | libraries/euler/include/euler/syscall.hpp | 51 |
7 files changed, 0 insertions, 106 deletions
diff --git a/libraries/euler/include/cassert b/libraries/euler/include/cassert deleted file mode 100644 index bc716a0..0000000 --- a/libraries/euler/include/cassert +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -namespace euler { - [[noreturn]] void assert_failed( - const char *file, const char *function, int line, const char *condition); -} - -#ifdef NDEBUG -#define assert(condition) ((void)0) -#else -#define assert(condition) ((condition) ? ((void)0) : \ - euler::assert_failed(__FILE__, __func__, __LINE__, #condition)) -#endif diff --git a/libraries/euler/include/cctype b/libraries/euler/include/cctype deleted file mode 100644 index 087b191..0000000 --- a/libraries/euler/include/cctype +++ /dev/null @@ -1,7 +0,0 @@ -#pragma once - -namespace std { - - int isspace(int ch); - -} diff --git a/libraries/euler/include/cstddef b/libraries/euler/include/cstddef deleted file mode 120000 index 9eac9b6..0000000 --- a/libraries/euler/include/cstddef +++ /dev/null @@ -1 +0,0 @@ -../../../mintsuki-freestanding-headers/stddef.h
\ No newline at end of file diff --git a/libraries/euler/include/cstdint b/libraries/euler/include/cstdint deleted file mode 120000 index b087235..0000000 --- a/libraries/euler/include/cstdint +++ /dev/null @@ -1 +0,0 @@ -../../../mintsuki-freestanding-headers/stdint.h
\ No newline at end of file diff --git a/libraries/euler/include/cstdio b/libraries/euler/include/cstdio deleted file mode 100644 index 3bb293b..0000000 --- a/libraries/euler/include/cstdio +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once - -#define EOF (-1) - -namespace euler { - struct file_t; -} - -namespace std { - - typedef euler::file_t FILE; - - FILE *fopen(const char *path, const char *mode); - int fclose(FILE *file); - - int fgetc(FILE *from); - int ungetc(int ch, FILE *from); - -} diff --git a/libraries/euler/include/cstring b/libraries/euler/include/cstring deleted file mode 100644 index 65d00dc..0000000 --- a/libraries/euler/include/cstring +++ /dev/null @@ -1,14 +0,0 @@ -#pragma once - -#include <cstddef> - -namespace std { - - static inline size_t strlen(const char *str) { - size_t i = 0; - while (str[i]) - ++i; - return i; - } - -} diff --git a/libraries/euler/include/euler/syscall.hpp b/libraries/euler/include/euler/syscall.hpp deleted file mode 100644 index 2dc88b8..0000000 --- a/libraries/euler/include/euler/syscall.hpp +++ /dev/null @@ -1,51 +0,0 @@ -#pragma once - -#include <cstdint> - -namespace euler::syscall { - - typedef uint32_t encoded_color; - typedef int32_t exit_code; - typedef uint64_t file_handle; - typedef uint32_t key_packet; - - enum [[nodiscard]] file_result : uint64_t { - success, - bad_file_handle, - device_error, - file_system_corrupt, - out_of_bounds, - does_not_exist, - directory - }; - -} - -extern "C" { - - euler::syscall::encoded_color _syscall_encode_color( - uint8_t red, uint8_t green, uint8_t blue); - - void _syscall_get_framebuffer( - euler::syscall::encoded_color *&ptr_out, uint32_t &width_out, - uint32_t &height_out, uint32_t &pitch_out); - - euler::syscall::file_result _syscall_open_file( - const char *path, uint64_t path_length, euler::syscall::file_handle &out); - - euler::syscall::file_result _syscall_get_file_length( - euler::syscall::file_handle file, uint64_t &out); - - euler::syscall::file_result _syscall_read_from_file( - euler::syscall::file_handle file, - uint64_t start_offset, uint64_t length, void *into); - - [[noreturn]] void _syscall_end_this_process(euler::syscall::exit_code code); - - [[nodiscard]] void *_syscall_get_new_pages(uint64_t count); - - void _syscall_close_file(euler::syscall::file_handle file); - - euler::syscall::key_packet _syscall_read_key_packet(); - -} |