9 #define NULL ((void *)0) 10 #define isprint(c) (' '<=(c) && (c)<='~') 11 #define isspace(c) ((c) == ' ' || (c) == '\t' || (c) == '\n' || (c) == '\r') 12 #define isdigit(c) ('0' <= (c) && (c) <= '9') 13 #define islower(c) ('a' <= (c) && (c) <= 'z') 14 #define isupper(c) ('A' <= (c) && (c) <='Z') 15 #define isalpha(c) (islower(c) || isupper(c)) 16 #define isalnum(c) (isalpha(c) || isdigit(c)) 17 #define min(a,b) ((a) < (b)?(a):(b)) 28 #define htons(n) (((((uint16_t)(n) & 0xFF)) << 8) | (((uint16_t)(n) & 0xFF00) >> 8)) 29 #define ntohs(n) (((((uint16_t)(n) & 0xFF)) << 8) | (((uint16_t)(n) & 0xFF00) >> 8)) 31 #define htonl(n) (((((uint32_t)(n) & 0xFF)) << 24) | \ 32 ((((uint32_t)(n) & 0xFF00)) << 8) | \ 33 ((((uint32_t)(n) & 0xFF0000)) >> 8) | \ 34 ((((uint32_t)(n) & 0xFF000000)) >> 24)) 36 #define ntohl(n) (((((uint32_t)(n) & 0xFF)) << 24) | \ 37 ((((uint32_t)(n) & 0xFF00)) << 8) | \ 38 ((((uint32_t)(n) & 0xFF0000)) >> 8) | \ 39 ((((uint32_t)(n) & 0xFF000000)) >> 24)) 50 int8_t *strcpy(int8_t *dst,
const int8_t *src);
51 int8_t *strncpy(int8_t *s1, int8_t *s2, int32_t n);
52 int8_t *strcat(int8_t *dst,
const int8_t *src);
53 int8_t *strncat(int8_t *s1, int8_t *s2, int32_t n);
54 int32_t strcmp(
const int8_t *s1,
const int8_t *s2);
55 int32_t strncmp(int8_t *s1, int8_t *s2, int32_t n);
56 int8_t *strstr(
const int8_t *
string,
const int8_t *find);
57 int32_t strlen(
const int8_t *s);
58 int8_t *strchr(
const int8_t *s, int32_t c);
59 int8_t *strpbrk(int8_t *str, int8_t *
set);
60 int8_t *strsep(int8_t **pp, int8_t *delim);
61 int8_t *strtok(int8_t *s,
const int8_t *delim);
62 void *memcpy(
void *dst,
const void *src, uint32_t n);
63 void *memmove(
void *dst,
const void *src, uint32_t n);
64 int32_t memcmp(
const void *cs,
const void *ct, uint32_t n);
65 void *memset(
void *s, int32_t c, uint32_t n);
66 int32_t strtol(
const int8_t *s, int8_t **end, int32_t base);
67 int32_t atoi(
const int8_t *s);
68 float atof(
const int8_t *p);
69 int32_t ftoa(
float f, int8_t *outbuf, int32_t precision);
70 int8_t *itoa(int32_t i, int8_t *s, int32_t base);
71 int32_t puts(
const int8_t *str);
72 int8_t *gets(int8_t *s);
73 int32_t abs(int32_t n);
75 void srand(uint32_t seed);
76 int32_t hexdump(int8_t *buf, uint32_t size);
77 int32_t printf(
const int8_t *fmt, ...);
78 int32_t sprintf(int8_t *out,
const int8_t *fmt, ...);
79 void *malloc(
size_t size);
81 void *calloc(uint32_t qty, uint32_t type_size);
82 void *realloc(
void *ptr, uint32_t size);
91 #define SNG_FRACBITS 23 92 #define SNG_EXP_BIAS 127 93 #define SNG_EXP_INFNAN 255 95 #define SIGNBIT 0x80000000 96 #define HIDDEN (1 << 23) 97 #define SIGN(fp) ((fp) & SIGNBIT) 98 #define EXP(fp) (((fp) >> 23) & 0xFF) 99 #define MANT(fp) (((fp) & 0x7FFFFF) | HIDDEN) 100 #define PACK(s,e,m) ((s) | ((e) << 23) | (m)) 110 #define HIDDEND (1 << 20) 111 #define EXPD(fp) (((fp.l.upper) >> 20) & 0x7FF) 112 #define SIGND(fp) ((fp.l.upper) & SIGNBIT) 113 #define MANTD(fp) (((((fp.l.upper) & 0xFFFFF) | HIDDEND) << 10) | (fp.l.lower >> 22)) 114 #define HIDDEND_LL ((long long)1 << 52) 115 #define MANTD_LL(fp) ((fp.ll & (HIDDEND_LL-1)) | HIDDEND_LL) 116 #define PACKD_LL(s,e,m) (((long long)((s)+((e)<<20))<<32)|(m))
Definition: hf-printf.h:160