2018-10-16 11:01:38 +02:00
|
|
|
#pragma once
|
|
|
|
|
2019-04-06 14:29:29 +02:00
|
|
|
#include <AK/Types.h>
|
2018-10-16 11:01:38 +02:00
|
|
|
|
2018-11-09 12:20:44 +01:00
|
|
|
extern "C" {
|
|
|
|
|
2019-02-22 10:23:06 +01:00
|
|
|
static_assert(sizeof(size_t) == 4);
|
|
|
|
|
|
|
|
void* memcpy(void*, const void*, size_t);
|
|
|
|
char* strcpy(char*, const char*);
|
2019-02-07 10:29:26 +01:00
|
|
|
char* strncpy(char*, const char*, size_t);
|
2018-10-17 10:55:43 +02:00
|
|
|
int strcmp(char const*, const char*);
|
2018-12-02 23:34:50 +01:00
|
|
|
size_t strlen(const char*);
|
2019-02-22 10:23:06 +01:00
|
|
|
void* memset(void*, int, size_t);
|
2019-05-28 11:53:16 +02:00
|
|
|
char* strdup(const char*);
|
2018-10-17 10:55:43 +02:00
|
|
|
int memcmp(const void*, const void*, size_t);
|
2018-10-31 22:43:49 +01:00
|
|
|
char* strrchr(const char* str, int ch);
|
2019-03-23 22:03:17 +01:00
|
|
|
void* memmove(void* dest, const void* src, size_t n);
|
2018-11-09 12:20:44 +01:00
|
|
|
|
2019-03-11 23:21:38 +01:00
|
|
|
inline word ntohs(word w) { return (w & 0xff) << 8 | ((w >> 8) & 0xff); }
|
|
|
|
inline word htons(word w) { return (w & 0xff) << 8 | ((w >> 8) & 0xff); }
|
2018-11-09 12:20:44 +01:00
|
|
|
}
|