Let's write a better C standard library

We'll assume x86_64 for now.
I'll start us off with something simple
/// located in clovertypes.h
#define based 1
#define cringe 0
typedef void u0;
typedef char sbyte;
typedef unsigned char ubyte;
typedef int i32;
typedef unsigned int u32;
typedef short i16;
typedef unsigned short u16;
typedef long long i64;
typedef unsigned long long u64;


feel free to suggest better names if you enjoy bikeshedding.
However, a more productive post would be finding something not finished by another user and extending it.
The functionality of the new std can be however you like.

Attached: The C Programming Language.jpg (345x282, 14.86K)

heres my contribution
void print_nigger(void) {
printf("nigger\n");
}

patch license: +NIGGER

>ubyte
Why not u8?

typedef void should be sneed

how about sneed for void*
u0 is an appeasement for Terry

oh yes one more simple thing
#define is ==
#define isnt !=
#define imply if

Afaik int can be 16 bit depending on machine so calling it i32 while being 16 is wrong.

#define implying(x) if(!x)

i need a string, op

give me strings

fantastic
we're assuming x86_64 platforms right now.
also, if we're going to be going down to the syscall level, we're assuming Linux since it's the easiest to implement against

/// in cloverstring.h
typedef struct _text text;


#include "clovertypes.h"
struct _text {
sbyte* letters;
u64 size;
};


here you go, strings are an opaque type "text" which you will operate on EXCLUSIVELY via functions. They will keep the null terminator internally because it's easier and because it makes talking to the OS simpler.

>ubyte
>sbyte
>not u8 and i8
???

you're right, the word 'byte' is bloat.

Byte doesnt have to be 8bit

At this point just grab Zig's standard library and export it to C.

You have stdint.h already you dummy

we aren't allowed to use std

Wait, has Casey moved on from almond milk to cocaine?
This is a genuine question and only real replies will be taken seriously. Thanks.

Attached: 1642601629933.png (483x470, 183.71K)

typedef char gchar;
typedef short gshort;
typedef long glong;
typedef int gint;
typedef gint gboolean;

typedef unsigned char guchar;
typedef unsigned short gushort;
typedef unsigned long gulong;
typedef unsigned int guint;

typedef float gfloat;
typedef double gdouble;


Done.

I prefer TByte and TShortInt so fuck you.

#define wediditreddit(x) ((u32)(x) == 0)
#define install_gentoo exit(1)