Little-CRT/crt.h

78 lines
2.9 KiB
C

#include <windows.h>
int _init_args();
void _term_args();
void* xmalloc(size_t size);
void* xrealloc(void* ptr, size_t size);
void xfree(void* ptr);
void xsrand(unsigned int seed);
unsigned int xrand(void);
int xabs(int n);
void xmemcpy(void* dest, void* src, size_t n);
void* xmemset(void* blk, int c, size_t n);
int xmemcmp(const void* str1, const void* str2, size_t n);
void* xmemmove(void* dst, const void* src, size_t count);
size_t xstrlen(const char* str);
int xstrcmpi(const char* s1, const char* s2);
int xstricmp(const char* s1, const char* s2);
int xstrcmp(const char* s1, const char* s2);
int xstrncmp(const char* s1, const char* s2, size_t n);
int xstrnicmp(const char* s1, const char* s2, size_t n);
char* xstrcpy(char* dest, const char* src);
char* xstrdup(const char* src);
char* xstrncpy(char* dest, const char* src, size_t n);
const char* xstrchr(const char* str, int ch);
const char* xstrrchr(const char* str, int ch);
char* xstrcat(char* dst, const char* src);
int xstrncat_s(char * dest, size_t num, const char * source, size_t count);
char* xstrstr(char* str, const char* substr);
char* xstrtok(char* s, const char* delm);
size_t xwcslen(const wchar_t* str);
wchar_t* xwcscpy(wchar_t* dest, const wchar_t* src);
int xwcsicmp(const wchar_t* s1, const wchar_t* s2);
int xwcscmp(const wchar_t* s1, const wchar_t* s2);
int xwcsncmp(const wchar_t* s1, const wchar_t* s2, size_t n);
int xwcsnicmp(const wchar_t* s1, const wchar_t* s2, size_t n);
wchar_t* xwcsdup(const wchar_t* src);
wchar_t* xwcsncpy(wchar_t* dest, const wchar_t* src, size_t n);
const wchar_t* xwcschr(const wchar_t* str, wchar_t ch);
const wchar_t* xwcsrchr(const wchar_t* str, wchar_t ch);
wchar_t* xwcscat(wchar_t* dst, const wchar_t* src);
const wchar_t* xwcsstr(const wchar_t* str, const wchar_t* substr);
char* xstrupr(char* s);
wchar_t* xwcsupr(wchar_t* s);
char* xstrlwr(char* s);
wchar_t* xwcslwr(wchar_t* s);
int xtoupper(int c);
wint_t xtowupper(wint_t c);
int xtolower(int c);
wint_t xtowlower(wint_t c);
int xputs(const char* str);
int xprintf(const char* format, ...);
int xwprintf(const wchar_t* format, ...);
int xiswctype(wint_t c, wctype_t type);
int xisspace(int c);
int xiswspace(wint_t c);
int xisupper(int c);
int xiswupper(wint_t c);
int xisalpha(int c);
int xiswalpha(wint_t c);
int xisdigit(int c);
int xiswdigit(wint_t c);
int xisxdigit(int c);
int xiswxdigit(wint_t c);
int xisalnum(int c);
int xiswalnum(wint_t c);
int xisprint(int c);
int xiswprint(wint_t c);
long xatol(const char* str);
int xatoi(const char* str);
long xwtol(const wchar_t* str);
int xwtoi(const wchar_t* str);
int x_vscprintf(const char *format, va_list argptr);
int x_vsnprintf(char *buffer, size_t count, const char *format, va_list argptr);
int xsnprintf(char *s, size_t n, const char *format, ...);
int xvsprintf_s(char *buffer, size_t numberOfElements, const char *format, va_list argptr);
int xputenv(const char *str);
time_t xtime( time_t *destTime );