klibc: add some helper

This commit is contained in:
Mathieu Maret 2018-11-22 17:41:18 +01:00
parent 432d8801e1
commit 0e6a80f6e5

View File

@ -1,6 +1,14 @@
#pragma once
#include "stdarg.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) <= '~'))
void *memcpy(void *dest, const void *src, size_t n);
void *memset(void *s, int c, size_t n);
char *itoa(int value, char *str, int base);