1
0
ain48/include/common.h
2026-06-03 00:31:32 +02:00

50 lines
1.2 KiB
C

#ifndef __UCSD_COMMON_H__
#define __UCSD_COMMON_H__
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
// # NUMBER TYPES
typedef unsigned _BitInt(4) u4;
typedef uint8_t u8;
typedef unsigned _BitInt(12) u12;
typedef uint16_t u16;
typedef uint32_t u32;
typedef unsigned _BitInt(48) u48;
typedef uint64_t u64;
typedef unsigned __int128 u128;
typedef size_t usz;
typedef uintptr_t uptr;
typedef _BitInt(4) i4;
typedef int8_t i8;
typedef _BitInt(12) i12;
typedef int16_t i16;
typedef int32_t i32;
typedef _BitInt(48) i48;
typedef int64_t i64;
typedef __int128 i128;
typedef ssize_t isz;
typedef intptr_t iptr;
typedef float f32;
typedef double f64;
// # LOGGING FACILITES
[[gnu::format(printf, 1, 2)]] void log_debug(char const *format, ...);
[[gnu::format(printf, 1, 2)]] void log_info(char const *format, ...);
[[gnu::format(printf, 1, 2)]] void log_warn(char const *format, ...);
[[gnu::format(printf, 1, 2)]] void log_err(char const *format, ...);
[[gnu::format(printf, 1, 2)]] void log_err_errno(char const *format, ...);
void set_log_opts(FILE *f, bool colours);
extern int foo;
#endif // ndef __UCSD_COMMON_H__