From 473dac80f2c287acef6e9259f171f0077984c641 Mon Sep 17 00:00:00 2001 From: Tyler McGurrin Date: Mon, 16 Dec 2024 05:49:31 -0500 Subject: [PATCH] forgort to add these lol --- src/bootloader/stage2/ctype.c | 14 ++++++++++++++ src/bootloader/stage2/ctype.h | 10 ++++++++++ 2 files changed, 24 insertions(+) create mode 100644 src/bootloader/stage2/ctype.c create mode 100644 src/bootloader/stage2/ctype.h diff --git a/src/bootloader/stage2/ctype.c b/src/bootloader/stage2/ctype.c new file mode 100644 index 0000000..df73df5 --- /dev/null +++ b/src/bootloader/stage2/ctype.c @@ -0,0 +1,14 @@ +/*----------------*\ +|Nanite OS | +|Copyright (C) 2024| +|Tyler McGurrin | +\*----------------*/ +#include "ctype.h" + +bool islower(char chr) { + return chr >= 'a' && chr <= 'z'; +} + +char toupper(char chr) { + return islower(chr) ? (chr - 'a' + 'A') : chr; +} diff --git a/src/bootloader/stage2/ctype.h b/src/bootloader/stage2/ctype.h new file mode 100644 index 0000000..608fb73 --- /dev/null +++ b/src/bootloader/stage2/ctype.h @@ -0,0 +1,10 @@ +/*----------------*\ +|Nanite OS | +|Copyright (C) 2024| +|Tyler McGurrin | +\*----------------*/ +#pragma once +#include "stdint.h" + +bool islower(char chr); +char toupper(char chr);