-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.h
32 lines (26 loc) · 885 Bytes
/
main.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <stdarg.h>
#ifndef _MAIN_H
#define _MAIN_H
#define null NULL
typedef enum{false, true} boolean;
typedef char *String;
typedef char int8_t;
typedef short int16_t;
typedef int int32_t;
typedef long long int64_t;
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
typedef unsigned long long uint64_t;
void print(const String format, ...) {va_list ap;char buf[4096];va_start(ap, format);vsprintf(buf, format, ap);va_end(ap);fprintf(stdout, "%s", buf);}
void println(const String format, ...) {va_list ap;char buf[4096];va_start(ap, format);vsprintf(buf, format, ap);va_end(ap);fprintf(stdout, "%s\n", buf);}
#pragma pack(push, 1)
typedef struct _System{
struct _OUT_{
void (*printf)(const String, ...);
void (*println)(const String, ...);
}out;
}Sys;
#pragma pack(pop)
Sys System = {print, println};
#endif