diff options
Diffstat (limited to 'src/lib/inc')
-rw-r--r-- | src/lib/inc/arg.h | 11 | ||||
-rw-r--r-- | src/lib/inc/assert.h | 11 | ||||
-rw-r--r-- | src/lib/inc/conv.h | 15 | ||||
-rw-r--r-- | src/lib/inc/def.h | 28 | ||||
-rw-r--r-- | src/lib/inc/math.h | 10 | ||||
-rw-r--r-- | src/lib/inc/mem.h | 18 | ||||
-rw-r--r-- | src/lib/inc/print.h | 13 | ||||
-rw-r--r-- | src/lib/inc/str.h | 17 |
8 files changed, 0 insertions, 123 deletions
diff --git a/src/lib/inc/arg.h b/src/lib/inc/arg.h deleted file mode 100644 index 73e592d..0000000 --- a/src/lib/inc/arg.h +++ /dev/null @@ -1,11 +0,0 @@ -// MIT License, Copyright (c) 2020 Marvin Borner - -#ifndef ARG_H -#define ARG_H - -typedef __builtin_va_list va_list; -#define va_start __builtin_va_start -#define va_end __builtin_va_end -#define va_arg __builtin_va_arg - -#endif diff --git a/src/lib/inc/assert.h b/src/lib/inc/assert.h deleted file mode 100644 index 2cb095b..0000000 --- a/src/lib/inc/assert.h +++ /dev/null @@ -1,11 +0,0 @@ -// MIT License, Copyright (c) 2020 Marvin Borner - -#ifndef ASSERT_H -#define ASSERT_H - -#include <print.h> - -#define assert(exp) \ - (exp) ? 0 : printf("%s:%d: %s: Assertion '%s' failed\n", __FILE__, __LINE__, __func__, #exp) - -#endif diff --git a/src/lib/inc/conv.h b/src/lib/inc/conv.h deleted file mode 100644 index d878deb..0000000 --- a/src/lib/inc/conv.h +++ /dev/null @@ -1,15 +0,0 @@ -// MIT License, Copyright (c) 2020 Marvin Borner - -#ifndef CONV_H -#define CONV_H - -#include <def.h> - -int atoi(char *str); -char *htoa(u32 n); -int htoi(char *str); -char *itoa(int n); - -char *conv_base(int value, char *result, int base, int is_signed); - -#endif diff --git a/src/lib/inc/def.h b/src/lib/inc/def.h deleted file mode 100644 index 42939a0..0000000 --- a/src/lib/inc/def.h +++ /dev/null @@ -1,28 +0,0 @@ -// MIT License, Copyright (c) 2020 Marvin Borner - -#ifndef DEF_H -#define DEF_H - -/** - * Types - */ - -typedef signed char s8; -typedef unsigned char u8; - -typedef signed short s16; -typedef unsigned short u16; - -typedef signed long s32; -typedef unsigned long u32; - -typedef signed long long s64; -typedef unsigned long long u64; - -/** - * Macros - */ - -#define NULL ((void *)0) - -#endif diff --git a/src/lib/inc/math.h b/src/lib/inc/math.h deleted file mode 100644 index 268e3e7..0000000 --- a/src/lib/inc/math.h +++ /dev/null @@ -1,10 +0,0 @@ -// MIT License, Copyright (c) 2020 Marvin Borner - -#ifndef MATH_H -#define MATH_H - -#include <def.h> - -int pow(int base, int exp); - -#endif diff --git a/src/lib/inc/mem.h b/src/lib/inc/mem.h deleted file mode 100644 index 2aaf4d8..0000000 --- a/src/lib/inc/mem.h +++ /dev/null @@ -1,18 +0,0 @@ -// MIT License, Copyright (c) 2020 Marvin Borner - -#ifndef MEM_H -#define MEM_H - -#include <def.h> - -#define malloc(n) ((void *)((HEAP += n) - n)) // TODO: Implement real/better malloc/free -#define free(x) - -extern u32 HEAP; -extern u32 HEAP_START; - -void *memcpy(void *dst, const void *src, u32 n); -void *memset(void *dst, int c, u32 n); -int memcmp(const void *s1, const void *s2, u32 n); - -#endif diff --git a/src/lib/inc/print.h b/src/lib/inc/print.h deleted file mode 100644 index 1a2419b..0000000 --- a/src/lib/inc/print.h +++ /dev/null @@ -1,13 +0,0 @@ -// MIT License, Copyright (c) 2020 Marvin Borner -// I may (re)move this in the future // TODO - -#ifndef PRINT_H -#define PRINT_H - -#include <arg.h> - -int printf(const char *format, ...); -int vprintf(const char *format, va_list ap); -int vsprintf(char *str, const char *format, va_list ap); - -#endif diff --git a/src/lib/inc/str.h b/src/lib/inc/str.h deleted file mode 100644 index f4c63b1..0000000 --- a/src/lib/inc/str.h +++ /dev/null @@ -1,17 +0,0 @@ -// MIT License, Copyright (c) 2020 Marvin Borner - -#ifndef STRING_H -#define STRING_H - -#include <def.h> - -u32 strlen(const char *s); -char *strcpy(char *dst, const char *src); -char *strchr(const char *s, int c); -char *strcat(char *dst, const char *src); -int strcmp(const char *s1, const char *s2); -int strncmp(const char *s1, const char *s2, u32 n); -char *strinv(char *s); -char *strdup(const char *s); - -#endif |