diff options
| author | Derek Hensley <hensley.derek58@gmail.com> | 2024-06-03 11:33:03 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-03 14:33:03 -0400 |
| commit | f26e77ba4088f20e72e13409f9ad535039abd291 (patch) | |
| tree | fa39e6c8bb57bfe5729854c8ea2bd3e25ea4155f /src/boot | |
| parent | 312b65d5e34878df4b70d8b9922e1082213b3662 (diff) | |
More General Cleanup (#1638)
* LINKER_FILES in makefile
* COLPOLY_GET_NORMAL
* math header
* libc
* M_PI for cosf and sinf files
* MAXFLOAT
* Revert "MAXFLOAT"
This reverts commit 96b75ffaa89b1a4ca1c08278b28bc3c70224701a.
* Remove SHT_MINV
* SHRT_MAX
* Add M_PI
* Angle macros
* f suffix
* Format
Diffstat (limited to 'src/boot')
| -rw-r--r-- | src/boot/O2/stackcheck.c | 4 | ||||
| -rw-r--r-- | src/boot/irqmgr.c | 2 | ||||
| -rw-r--r-- | src/boot/libc/memmove.c | 2 | ||||
| -rw-r--r-- | src/boot/libc/memset.c | 2 | ||||
| -rw-r--r-- | src/boot/libc/strcmp.c | 2 | ||||
| -rw-r--r-- | src/boot/libc/strcpy.c | 2 | ||||
| -rw-r--r-- | src/boot/libc64/__osMalloc.c | 6 | ||||
| -rw-r--r-- | src/boot/libc64/math64.c | 26 | ||||
| -rw-r--r-- | src/boot/libc64/sprintf.c | 2 | ||||
| -rw-r--r-- | src/boot/libm/fmodf.c | 2 | ||||
| -rw-r--r-- | src/boot/viconfig.c | 2 |
11 files changed, 26 insertions, 26 deletions
diff --git a/src/boot/O2/stackcheck.c b/src/boot/O2/stackcheck.c index edd1e3a30..d08dbfcb5 100644 --- a/src/boot/O2/stackcheck.c +++ b/src/boot/O2/stackcheck.c @@ -1,6 +1,6 @@ #include "stackcheck.h" -#include "libc/stdbool.h" -#include "libc/stdint.h" +#include "stdbool.h" +#include "stdint.h" StackEntry* sStackInfoListStart = NULL; StackEntry* sStackInfoListEnd = NULL; diff --git a/src/boot/irqmgr.c b/src/boot/irqmgr.c index a3daeff11..7311414a6 100644 --- a/src/boot/irqmgr.c +++ b/src/boot/irqmgr.c @@ -34,7 +34,7 @@ */ #include "irqmgr.h" -#include "libc/stdbool.h" +#include "stdbool.h" #include "macros.h" #include "scheduler.h" diff --git a/src/boot/libc/memmove.c b/src/boot/libc/memmove.c index 720de0fac..21c725645 100644 --- a/src/boot/libc/memmove.c +++ b/src/boot/libc/memmove.c @@ -1,4 +1,4 @@ -#include "libc/string.h" +#include "string.h" void* memmove(void* dst, const void* src, size_t size) { unsigned char* _dst = dst; diff --git a/src/boot/libc/memset.c b/src/boot/libc/memset.c index 7e0b1c0ed..ee8a1d17e 100644 --- a/src/boot/libc/memset.c +++ b/src/boot/libc/memset.c @@ -1,4 +1,4 @@ -#include "libc/string.h" +#include "string.h" void* memset(void* ptr, int val, size_t size) { unsigned char* dst = ptr; diff --git a/src/boot/libc/strcmp.c b/src/boot/libc/strcmp.c index d65e4411f..7df0ef5b2 100644 --- a/src/boot/libc/strcmp.c +++ b/src/boot/libc/strcmp.c @@ -1,4 +1,4 @@ -#include "libc/string.h" +#include "string.h" int strcmp(const char* str1, const char* str2) { unsigned char c1; diff --git a/src/boot/libc/strcpy.c b/src/boot/libc/strcpy.c index 8166a47e0..db961df98 100644 --- a/src/boot/libc/strcpy.c +++ b/src/boot/libc/strcpy.c @@ -1,4 +1,4 @@ -#include "libc/string.h" +#include "string.h" char* strcpy(char* dst, const char* src) { char* _dst = dst; diff --git a/src/boot/libc64/__osMalloc.c b/src/boot/libc64/__osMalloc.c index 554008997..3272603e1 100644 --- a/src/boot/libc64/__osMalloc.c +++ b/src/boot/libc64/__osMalloc.c @@ -1,9 +1,9 @@ #include "libc64/os_malloc.h" #include "alignment.h" -#include "libc/stdbool.h" -#include "libc/stdint.h" -#include "libc/string.h" +#include "stdbool.h" +#include "stdint.h" +#include "string.h" #include "macros.h" #define FILL_ALLOCBLOCK (1 << 0) diff --git a/src/boot/libc64/math64.c b/src/boot/libc64/math64.c index 48cc5e025..e15a741af 100644 --- a/src/boot/libc64/math64.c +++ b/src/boot/libc64/math64.c @@ -6,8 +6,8 @@ #include "libc64/math64.h" #include "libc64/fixed_point.h" -#include "libc/stdbool.h" -#include "libc/math.h" +#include "stdbool.h" +#include "math.h" s32 gUseAtanContFrac; @@ -91,14 +91,14 @@ f32 Math_FAtanTaylorF(f32 x) { return qNaN0x10000; } - if (t <= M_SQRT2 - 1.0f) { + if (t <= M_SQRT2f - 1.0f) { return Math_FAtanTaylorQF(x); } - if (t >= M_SQRT2 + 1.0f) { - q = M_PI / 2 - Math_FAtanTaylorQF(1.0f / t); + if (t >= M_SQRT2f + 1.0f) { + q = M_PIf / 2 - Math_FAtanTaylorQF(1.0f / t); } else { // in the interval (\sqrt{2} - 1, \sqrt{2} + 1) - q = M_PI / 4 - Math_FAtanTaylorQF((1.0f - t) / (1.0f + t)); + q = M_PIf / 4 - Math_FAtanTaylorQF((1.0f - t) / (1.0f + t)); } if (x > 0.0f) { @@ -145,9 +145,9 @@ f32 Math_FAtanContFracF(f32 x) { if (sector == 0) { return conv; } else if (sector > 0) { - return M_PI / 2 - conv; + return M_PIf / 2 - conv; } else { - return -M_PI / 2 - conv; + return -M_PIf / 2 - conv; } } @@ -171,18 +171,18 @@ f32 Math_FAtan2F(f32 y, f32 x) { if (y == 0.0f) { return 0.0f; } else if (y > 0.0f) { - return M_PI / 2; + return M_PIf / 2; } else if (y < 0.0f) { - return -M_PI / 2; + return -M_PIf / 2; } else { return qNaN0x10000; } } else if (x >= 0.0f) { return Math_FAtanF(y / x); } else if (y < 0.0f) { - return Math_FAtanF(y / x) - M_PI; + return Math_FAtanF(y / x) - M_PIf; } else { - return M_PI - Math_FAtanF(-(y / x)); + return M_PIf - Math_FAtanF(-(y / x)); } } @@ -191,5 +191,5 @@ f32 Math_FAsinF(f32 x) { } f32 Math_FAcosF(f32 x) { - return M_PI / 2 - Math_FAsinF(x); + return M_PIf / 2 - Math_FAsinF(x); } diff --git a/src/boot/libc64/sprintf.c b/src/boot/libc64/sprintf.c index 07bee8064..58f248414 100644 --- a/src/boot/libc64/sprintf.c +++ b/src/boot/libc64/sprintf.c @@ -1,6 +1,6 @@ #include "libc64/sprintf.h" -#include "libc/string.h" +#include "string.h" void* proutPrintf(void* dst, const char* fmt, size_t size) { return (void*)((uintptr_t)memcpy(dst, fmt, size) + size); diff --git a/src/boot/libm/fmodf.c b/src/boot/libm/fmodf.c index 0c2df736d..d91be7e40 100644 --- a/src/boot/libm/fmodf.c +++ b/src/boot/libm/fmodf.c @@ -1,4 +1,4 @@ -#include "libc/math.h" +#include "math.h" float fmodf(float dividend, float divisor) { int quotient; diff --git a/src/boot/viconfig.c b/src/boot/viconfig.c index cfbc04e86..3d504e0a5 100644 --- a/src/boot/viconfig.c +++ b/src/boot/viconfig.c @@ -1,6 +1,6 @@ #include "viconfig.h" -#include "libc/stdbool.h" +#include "stdbool.h" #include "idle.h" void ViConfig_UpdateVi(u32 black) { |
