From cc9afdfe0471d4657090a6470ef8c0fd1dae4fbe Mon Sep 17 00:00:00 2001 From: wullie Date: Fri, 27 Mar 2026 01:05:11 +0000 Subject: [PATCH] Delete src/printing.c --- src/printing.c | 70 -------------------------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 src/printing.c diff --git a/src/printing.c b/src/printing.c deleted file mode 100644 index 14ef560..0000000 --- a/src/printing.c +++ /dev/null @@ -1,70 +0,0 @@ -// this code is licenced under Wrathmark licence -// © 2026 wullie wulliestudio.com -// please see attached licence for full usage and rights - -#include "stdWullie.h" -#include "localheader.h" - -// handles the length of a string for print -long unsigned lengthStr(char *string){ - char *cursor = string; - while(*cursor){ - cursor++; - } - long unsigned result = cursor - string; - return result; -} - -// its print what do you expect? for it to read? -void print(char *string){ - syscall3(SYS_write, 1, (long)string, lengthStr(string)); -} - -// it can do everythig print can but better -void ColorPrint(char *string, char *color){ - syscall3(SYS_write, 1, (long)color, lengthStr(color)); - syscall3(SYS_write, 1, (long)string, lengthStr(string)); - syscall3(SYS_write, 1, (long)NORMAL, sizeof(NORMAL)-1); -} - -// instead of changing the foreground it changes the background -void BackgroundPrint(char *string, char *Bcolor){ - syscall3(SYS_write, 1, (long)Bcolor, lengthStr(Bcolor)); - syscall3(SYS_write, 1, (long)string, lengthStr(string)); - syscall3(SYS_write, 1, (long)NORMAL, sizeof(NORMAL)-1); -} - -// converts a sting to uppercase -void upper(char string[]){ - int i = 0; - while(string[i] != '\0'){ - if(string[i] >= 'a' && string[i] <= 'z') { - string[i] = string[i] - 32; - } - i++; - } -} - -// does the same but to lower case instead -void lower(char string[]){ - int cursor = 0; - while(string[cursor] != '\0'){ - if(string[cursor] >= 'A' && string[cursor] <= 'Z'){ - string[cursor] = string[cursor] + 32; - } - cursor++; - } -} - -// converts an int to a char -//char str(int number){ -// char numbChar[]; -// int *cursor = number; - -// while(*cursor >=0 && *cursor <=9){ -// numbChar = *numbChar / 10 +(*cursor - 0); -// cursor++ -// } -// return numbChar; -//} -