32 lines
601 B
C
32 lines
601 B
C
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
#include <stddef.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
|
|
typedef uint8_t u8;
|
|
typedef uint16_t u16;
|
|
typedef uint32_t u32;
|
|
typedef uint64_t u64;
|
|
typedef int8_t s8;
|
|
typedef int16_t s16;
|
|
typedef int32_t s32;
|
|
typedef int64_t s64;
|
|
typedef s8 b8;
|
|
typedef s16 b16;
|
|
typedef s32 b32;
|
|
typedef float f32;
|
|
|
|
#define Create_String(s) ((String){.count=(sizeof(s)-1), .data=(s)})
|
|
|
|
typedef struct {
|
|
s32 count;
|
|
u8* data;
|
|
} String;
|
|
|
|
String create_string(char* data) {
|
|
s32 count = strlen(data);
|
|
String s = {count, data};
|
|
return s;
|
|
}
|