summaryrefslogtreecommitdiffhomepage
path: root/src/internal/ntux_nolibc_impl.h
blob: eac26314eb96419fbb8145687a58f44560312ef7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef NTUX_NOLIBC_IMPL_H
#define NTUX_NOLIBC_IMPL_H

#define isatty   ntux_isatty

#define sprintf  ntux_sprintf
#define snprintf ntux_snprintf

#define memcpy   ntux_memcpy
#define memset   ntux_memset

#define strcpy   ntux_strcpy
#define strlen   ntux_strlen
#define strcmp   ntux_strcmp
#define strncmp  ntux_strncmp
#define strchr   ntux_strchr
#define strrchr  ntux_strrchr

#define calloc	 ntux_calloc
#define free	 ntux_free

int	ntux_isatty(int fildes);

int	ntux_sprintf(char * str, const char * fmt, ...);
int	ntux_snprintf(char * str, size_t n, const char * fmt, ...);

void *  ntux_memcpy(void * dst, const void * src, size_t n);
void *	memset(void * ch, int c, size_t n);

char *	ntux_strcpy(char * dst, const char * src);
size_t	ntux_strlen(const char * ch);
int	ntux_strcmp(const char * a, const char * b);
int	ntux_strncmp(const char * a, const char * b, size_t n);
char *	ntux_strchr(const char * ch, int c);
char *	ntux_strrchr(const char * ch, int c);

void *	ntux_calloc(size_t n, size_t size);
void	ntux_free(void *);

#endif