diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/elf.h | 15 | ||||
| -rw-r--r-- | lib/elf64.c | 3 | ||||
| -rw-r--r-- | lib/kprintf.c | 2 | ||||
| -rw-r--r-- | lib/kstdio.h | 18 | ||||
| -rw-r--r-- | lib/sophialib.h | 14 | ||||
| -rw-r--r-- | lib/string.c | 2 |
6 files changed, 4 insertions, 50 deletions
diff --git a/lib/elf.h b/lib/elf.h deleted file mode 100644 index 05d25bc..0000000 --- a/lib/elf.h +++ /dev/null @@ -1,15 +0,0 @@ -#pragma once - -#include <elf/elf64.h> - -#include <stdbool.h> -#include <stddef.h> - -#ifdef __x86_64__ -# define elf_validate elf64_validate -# define elf_size elf64_size -#endif - -bool elf64_validate(Elf64_Ehdr *ehdr, unsigned type, unsigned machine); -size_t elf64_size(Elf64_Ehdr *ehdr, Elf64_Phdr *phdr); - diff --git a/lib/elf64.c b/lib/elf64.c index 2dee395..bae408a 100644 --- a/lib/elf64.c +++ b/lib/elf64.c @@ -1,4 +1,5 @@ -#include "elf.h" +#include <stdbool.h> +#include <lib/elf.h> bool elf64_validate(Elf64_Ehdr *ehdr, unsigned type, unsigned machine) { diff --git a/lib/kprintf.c b/lib/kprintf.c index 18ae42c..3d803f6 100644 --- a/lib/kprintf.c +++ b/lib/kprintf.c @@ -1,4 +1,4 @@ -#include <kstdio.h> +#include <lib/kstdio.h> #include <stddef.h> #include <stdint.h> #include <stdbool.h> diff --git a/lib/kstdio.h b/lib/kstdio.h deleted file mode 100644 index d3615f1..0000000 --- a/lib/kstdio.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once - -#include <sophialib.h> - -#include <stdarg.h> - -typedef struct FILE FILE; - -extern FILE *kstdout; -extern FILE *kstderr; - -extern int kfputc(int c, FILE *f); - -int kvfprintf(FILE *f, const char *restrict format, va_list arguments); -int kfprintf(FILE *f, const char *restrict format, ...); -int kvprintf(const char *restrict format, va_list arguments); -int kprintf(const char *restrict format, ...); - diff --git a/lib/sophialib.h b/lib/sophialib.h deleted file mode 100644 index c28e17c..0000000 --- a/lib/sophialib.h +++ /dev/null @@ -1,14 +0,0 @@ -#pragma once - -#include <stddef.h> - -void *memcpy(void *dest, const void *src, size_t size); -void *memmove(void *dest, const void *src, size_t size); -void *memset(void *dest, int val, size_t size); -int memcmp(const void *str1, const void *str2, size_t count); -size_t strlen(const char *s); -unsigned long long strtoull( - const char *restrict begin, - char **restrict end, - int base); - diff --git a/lib/string.c b/lib/string.c index 3d3f4a1..5d4efb7 100644 --- a/lib/string.c +++ b/lib/string.c @@ -1,4 +1,4 @@ -#include <sophialib.h> +#include <lib/kstring.h> size_t strlen(const char *s) { |
