52 lines
1.9 KiB
C
52 lines
1.9 KiB
C
#pragma once
|
|
#include "assert.h"
|
|
#include "stdarg.h"
|
|
#include "minmax.h"
|
|
|
|
#define islower(c) (('a' <= (c)) && ((c) <= 'z'))
|
|
#define isupper(c) (('A' <= (c)) && ((c) <= 'Z'))
|
|
#define isdigit(c) (('0' <= (c)) && ((c) <= '9'))
|
|
#define isspace(c) \
|
|
(((c) == ' ') || ((c) == '\t') || ((c) == '\f') || ((c) == '\n') || ((c) == '\r') || \
|
|
((c) == '\v'))
|
|
#define isprint(c) ((' ' <= (c)) && ((c) <= '~'))
|
|
#define EOF (-1)
|
|
|
|
|
|
int memcmp(const void *s1, const void *s2, size_t n);
|
|
void *memcpy(void *dest, const void *src, size_t n);
|
|
void *memset(void *s, int c, size_t n);
|
|
char *itoa(long long int value, char *str, int base);
|
|
void reverse(char s[]);
|
|
int strlen(const char s[]);
|
|
unsigned int strnlen(const char *s, size_t count);
|
|
int strcmp(const char s1[], const char s2[]);
|
|
char *strzcpy(char *dst, const char *src, int len);
|
|
int puts(const char *str);
|
|
int putc(const int c);
|
|
int vsnprintf(char *str, size_t size, const char *format, va_list ap);
|
|
int vprintf(const char *format, va_list ap);
|
|
int printf(const char *format, ...);
|
|
|
|
// Could be used after malloc is available
|
|
int asprintf(char **strp, const char *fmt, ...);
|
|
int vasprintf(char **strp, const char *fmt, va_list ap);
|
|
|
|
int syscall5(int id, unsigned int arg1, unsigned int arg2, unsigned int arg3,
|
|
unsigned int arg4, unsigned int arg5);
|
|
int syscall4(int id, unsigned int arg1, unsigned int arg2, unsigned int arg3,
|
|
unsigned int arg4);
|
|
int syscall3(int id, unsigned int arg1, unsigned int arg2, unsigned int arg3);
|
|
int syscall2(int id, unsigned int arg1, unsigned int arg2);
|
|
int syscall1(int id, unsigned int arg1);
|
|
int syscall0(int id);
|
|
|
|
void _exit(int status);
|
|
void yolo();
|
|
int testSycall5(uint arg1, uint arg2, uint arg3, uint arg4, uint arg5);
|
|
char readc();
|
|
char getchar();
|
|
int readline(char *buf, int size);
|
|
void *brk(void *addr);
|
|
void *malloc(size_t size);
|