XenevaOS
Loading...
Searching...
No Matches
clib.h
Go to the documentation of this file.
1
30#ifndef __CLIB_H__
31#define __CLIB_H__
32
33
34#include <stdint.h>
35
36#ifdef __cplusplus
37extern "C"
38{
39#endif
40
41#define STACKITEM int
42
43#define VA_SIZE(TYPE) \
44 ((sizeof(TYPE) + sizeof(STACKITEM) - 1) \
45 & ~(sizeof(STACKITEM) - 1))
46
47#define va_start(AP, LASTARG) \
48 (AP=((va_list)&(LASTARG) + VA_SIZE(LASTARG)))
49
50#define va_end(AP)
51
52#define va_arg(AP, TYPE) \
53 (AP += VA_SIZE(TYPE), *((TYPE *)(AP - VA_SIZE(TYPE))))
54
55#ifdef __cplusplus
56}
57#endif
58
59
60extern void memset(void* targ, uint8_t val, uint32_t len);
61extern void memcpy(void* targ, void* src, uint32_t len);
62extern wchar_t* wstrchr(wchar_t* s, int c);
63extern int wstrlen(wchar_t* s);
64extern uint32_t wstrsize(wchar_t* s);
65extern int to_upper(int c);
66extern int to_lower(int c);
67extern int is_digit(int c);
68extern char* sztoa(size_t value, char* str, int base);
69extern size_t strlen(const char* s);
70#endif
71
72
uint32_t wstrsize(wchar_t *s)
Definition clib.cpp:84
char * sztoa(size_t value, char *str, int base)
Definition clib.cpp:107
void memset(void *targ, uint8_t val, uint32_t len)
Definition clib.cpp:34
int to_lower(int c)
Definition clib.cpp:94
size_t strlen(const char *s)
Definition utclib.c:379
void memcpy(void *targ, void *src, uint32_t len)
Definition clib.cpp:58
wchar_t * wstrchr(wchar_t *s, int c)
Definition clib.cpp:66
int is_digit(int c)
Definition clib.cpp:100
int wstrlen(wchar_t *s)
Definition clib.cpp:77
int to_upper(int c)
Definition clib.cpp:88
unsigned int uint32_t
Definition acefiex.h:163
unsigned char uint8_t
Definition acefiex.h:161