Initial commit

This commit is contained in:
2026-08-19 00:38:08 +01:00
commit ee00f3ee3d
21 changed files with 603 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
// this code is licenced under Wrathmark licence
// © 2026 wullie wulliestudio.com
// please see attached licence for full usage and rights
#ifndef LOCALHEADER_H
#define LOCALHEADER_H
// syscall macros, replaces the number based on system
#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
#define SYS_getTime 228
#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
#define SYS_getTime 232
#endif
// functions that SHOULD NOT be exposed to a dev using the library
void exit(int code);
long syscall1(long number, long args1);
long syscall2(long number, long args1, long args2);
long syscall3(long number, long args1, long args2, long args3);
long syscall4(long number, long args1, long args2, long args3, long args4);
#endif
+29
View File
@@ -0,0 +1,29 @@
// this code is licenced under Wrathmark licence
// © 2026 wullie wulliestudio.com
// please see attached licence for full usage and rights
#ifndef STDWULLIE_H
#define STDWULLIE_H
// import everything
//types
#include "stdWullie/definitions/int.h"
#include "stdWullie/definitions/typeNull.h"
#include "stdWullie/definitions/typeBool.h"
// namespaces
#include "stdWullie/namespaces/print.h"
#include "stdWullie/namespaces/convert.h"
// errors & exits
#include "stdWullie/exit.h"
// time
#include "stdWullie/time.h"
// string extras
#include "stdWullie/String/colours.h"
#endif
+33
View File
@@ -0,0 +1,33 @@
// this code is licenced under Wrathmark licence
// © 2026 wullie wulliestudio.com
// please see attached licence for full usage and rights
#ifndef STRCOLOUR_h
#define STRCOLOUR_h
// ANSI colours
// Normal value not white as normal could be something else on other systems
#define NORMAL "\x1b[m"
// foreground
#define BLACK "\x1b[30m"
#define RED "\x1b[31m"
#define GREEN "\x1b[32m"
#define YELLOW "\x1b[33m"
#define BLUE "\x1b[34m"
#define MAGENTA "\x1b[35m"
#define CYAN "\x1b[36m"
#define WHITE "\x1b[37m"
// background
#define BBLACK "\x1b[40m"
#define BRED "\x1b[41m"
#define BGREEN "\x1b[42m"
#define BYELLOW "\x1b[43m"
#define BBLUE "\x1b[44m"
#define BMAGENTA "\x1b[45m"
#define BCYAN "\x1b[46m"
#define BWHITE "\x1b[47m"
#endif
+55
View File
@@ -0,0 +1,55 @@
// this code is licenced under Wrathmark licence
// © 2026 wullie wulliestudio.com
// please see attached licence for full usage and rights
//defined like stdint to avoid confilict
#ifdef _WrathINT
#ifndef _STDINT_H
#define _STDINT_H 1
// create the types for signed ints using base structures
typedef signed char int8_t;
typedef signed short int int16_t;
typedef signed int int32_t;
typedef signed long long int int64_t;
// same as above but unsigned
typedef unsigned char uint8_t;
typedef unsigned short int uint16_t;
typedef unsigned int uint32_t;
typedef unsigned long long int uint64_t;
// misc int types
typedef unsigned long size_t;
// macros for long long, unsigned and unsigned long long
#define U unsigned
#define LL long long
#define ULL unsigned long long
// int max values
#define INT8_MAX ((int8_t)0x7F)
#define INT16_MAX ((int16_t)0x7FFF)
#define INT32_MAX ((int32_t)0xFFFFFFFF)
#define INT64_MAX ((int64_t)0xFFFFFFFFFFFFFFFFLL)
// max values for uint's
#define UINT8_MAX ((uint8_t)0xFF)
#define UINT16_MAX ((uint16_t)0xFFFF)
#define UINT32_MAX ((uint32_t)0xFFFFFFFFU)
#define UINT64_MAX ((uint64_t)0xFFFFFFFFFFFFFFFFULL)
// min values for uint
#define UINT8_MIN ((uint8_t)0)
#define UINT16_MIN ((uint16_t)0)
#define UINT32_MIN ((uint32_t)0)
#define UINT64_MIN ((uint64_t)0)
//min values for int
#define INT8_MIN ((int8_t)(-INT8_MAX - 1))
#define INT16_MIN ((int16_t)(-INT16_MAX - 1))
#define INT32_MIN ((int32_t)(-INT32_MAX - 1))
#define INT64_MIN ((int64_t)(-INT64_MAX - 1))
#endif
#endif
+14
View File
@@ -0,0 +1,14 @@
// this code is licenced under Wrathmark licence
// © 2026 wullie wulliestudio.com
// please see attached licence for full usage and rights
#ifndef TIMESPEC_H
#define TIMESPEC_H
// storage for seconds and nano seconds
typedef struct timespec{
long tv_sec;
long tv_nsec;
}timespec;
#endif
+13
View File
@@ -0,0 +1,13 @@
// this code is licenced under Wrathmark licence
// © 2026 wullie wulliestudio.com
// please see attached licence for full usage and rights
#ifndef TYPEBOOL_h
#define TYPEBOOL_h
// just 3 lines but its cleaner here
#define bool _Bool
#define false 0
#define true 1
#endif
+12
View File
@@ -0,0 +1,12 @@
// this code is licenced under Wrathmark licence
// © 2026 wullie wulliestudio.com
// please see attached licence for full usage and rights
#ifndef TYPENULL_h
#define TYPENULL_h
// 2 line of gay shit maybe more if i do pointers
#undef NULL
#define NULL 0
#endif
+11
View File
@@ -0,0 +1,11 @@
// this code is licenced under Wrathmark licence
// © 2026 wullie wulliestudio.com
// please see attached licence for full usage and rights
#ifndef ERROR_H
#define ERROR_H
void safeError(char *error);
void riskyError();
#endif
+22
View File
@@ -0,0 +1,22 @@
// this code is licenced under Wrathmark licence
// © 2026 wullie wulliestudio.com
// please see attached licence for full usage and rights
#ifndef TYPECONVERSION_H
#define TYPECONVERSION_H
typedef struct{
// string manipulation
void (*toUpper)(char string[]);
void (*toLower)(char string[]);
// the numbers mason, what do they mean
const char *(*ItoStr)(int number);
const char *(*FtoStr)(float number);
int (*toInt)(char *rawInt);
}ConversionNameSpace;
extern const ConversionNameSpace convert;
#endif
+17
View File
@@ -0,0 +1,17 @@
// this code is licenced under Wrathmark licence
// © 2026 wullie wulliestudio.com
// please see attached licence for full usage and rights
#ifndef PRINT_H
#define PRINT_H
typedef struct{
void (*text)(char *string);
void (*nl)(char *string);
void (*colour)(char *string, char *colour);
void (*background)(char *string, char *Bcolour);
}PrintNameSpace;
extern const PrintNameSpace print;
#endif
+15
View File
@@ -0,0 +1,15 @@
// this code is licenced under Wrathmark licence
// © 2026 wullie wulliestudio.com
// please see attached licence for full usage and rights
// deals with time shit like sleeping and getting the unix epoch
#ifndef TIME_H
#define TIME_H
#include "stdWullie/definitions/timespec.h"
void sleeper(long seconds);
int unixTime();
#endif