Files

36 lines
972 B
C
Raw Permalink Normal View History

2018-09-06 22:49:00 -04:00
#pragma once
#include <common.h>
2018-09-06 22:49:00 -04:00
#define ALIGN(x, a) __ALIGN_MASK(x,(__typeof__(x))(a)-1)
#define __ALIGN_MASK(x, mask) (((x)+(mask))&~(mask))
void *memcpy(void *restrict destination, const void *restrict source, size_t num);
void *memmove(void *destination, const void *source, size_t num);
2018-09-06 22:49:00 -04:00
void *memset(void *ptr, int value, size_t num);
int memcmp(const void *s1, const void *s2, size_t n);
void *memchr(const void *src, int c, size_t n);
2018-09-23 03:11:42 -04:00
size_t strlen(const char *str);
size_t strnlen(const char *s, size_t n);
2018-09-23 03:11:42 -04:00
int strcmp(const char *str1, const char *str2);
int strncmp(const char *str1, const char *str2, size_t num);
char *strcpy(char *destination, const char *source);
char *strncpy(char *restrict s1, const char *restrict s2, size_t n);
char *strdup(const char *str);
char *strchr(const char *s, int c);
size_t strlcpy(char *d, const char *s, size_t n);
void path_append(char *dest, const char *path, const char *app, size_t len);