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