From 835a3728364097019b52cfd0bc560b56803a5cdc Mon Sep 17 00:00:00 2001 From: wullie Date: Fri, 27 Feb 2026 13:07:57 +0000 Subject: [PATCH] Upload files to "include" --- include/localheader.h | 26 ++++++++++++++++++++++++++ include/stdWullie.h | 43 ++++++++++++++++++++++++++++++++++--------- 2 files changed, 60 insertions(+), 9 deletions(-) diff --git a/include/localheader.h b/include/localheader.h index 619671b..55a4da8 100644 --- a/include/localheader.h +++ b/include/localheader.h @@ -5,9 +5,35 @@ #ifndef LOCALHEADER_H #define LOCALHEADER_H +// syscall macros +#ifdef __linux__ +#define SYS_read 0 +#define SYS_write 1 +#define SYS_open 2 +#define SYS_close 3 +#define SYS_sleep 35 +#define SYS_exit 60 +#define SYS_mkdir 83 + + +#elif __FreeBSD__ +#define SYS_read 3 +#define SYS_write 4 +#define SYS_open 5 +#define SYS_close 6 +#define SYS_sleep 244 +#define SYS_exit 1 +#define SYS_mkdir 136 +#endif + // local functions void exit(int code); +// time spec for sleep +typedef struct timespec { + long tv_sec; + long tv_nsec; +} timespec; // syscalls go here i dont want them exposed to the user long syscall1(long number, long arg1); diff --git a/include/stdWullie.h b/include/stdWullie.h index 5463ad3..9ee954a 100644 --- a/include/stdWullie.h +++ b/include/stdWullie.h @@ -27,21 +27,46 @@ #define BCYAN "\x1b[46m" #define BWHITE "\x1b[47m" -// SYS calls -#define SYS_read 0 -#define SYS_write 1 -#define SYS_open 2 -#define SYS_close 3 -#define SYS_exit 60 +// gay ass glibc shit why in the fuck does this exist like that +#undef NULL +#define NULL 0 + +#define bool _Bool +#define true 1 +#define false 0 -// funcs + +// text functions void ColorPrint(char *string, char *color); void BackgroundPrint(char *string, char *Bcolor); +void print(char *string); +// strlen implemenation +long unsigned lengthStr(char *string); +void upper(char string[]); +void lower(char string[]); + +// file handling long Wopen(const char *pathname, int flags, int mode); long closeFile(long fd); -// basic funcs -void print(char *string); +long reader(long fd, char *string); +long mkdir(const char *filePath, int mode); + +// memory +void Wmalloc(); + +// error handling +void safeError(char *error); +void riskyError(); + + + +// math +int intParser(char *rawInt); +float invSqrt(float x); + +// misc +void sleeper(long seconds); #endif