1
0
Fork 0
mirror of https://github.com/tailix/libkernaux.git synced 2025-09-04 22:48:08 -04:00

Main: include/kernaux/libc.h: Has been split into separate headers

This commit is contained in:
Alex Kotov 2022-06-07 08:35:14 +03:00
parent b1cc8f386c
commit 040197dacb
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
25 changed files with 108 additions and 150 deletions

6
libc/Makefile.am Normal file
View file

@ -0,0 +1,6 @@
if WITH_LIBC
nobase_include_HEADERS = \
ctype.h \
stdlib.h \
string.h
endif

15
libc/ctype.h Normal file
View file

@ -0,0 +1,15 @@
#ifndef _CTYPE_H
#define _CTYPE_H 1
#ifdef __cplusplus
extern "C" {
#endif
int isdigit(int c);
int isspace(int c);
#ifdef __cplusplus
}
#endif
#endif

14
libc/stdlib.h Normal file
View file

@ -0,0 +1,14 @@
#ifndef _STDLIB_H
#define _STDLIB_H 1
#ifdef __cplusplus
extern "C" {
#endif
int atoi(const char *str);
#ifdef __cplusplus
}
#endif
#endif

25
libc/string.h Normal file
View file

@ -0,0 +1,25 @@
#ifndef _STRING_H
#define _STRING_H 1
#ifdef __cplusplus
extern "C" {
#endif
#include <stddef.h>
void *memcpy(void *dest, const void *src, size_t n);
void *memmove(void *dest, const void *src, size_t n);
void *memset(void *s, int c, size_t n);
int strcmp(const char *s1, const char *s2);
char *strcpy(char *dest, const char *src);
size_t strlen(const char *s);
int strncmp(const char *s1, const char *s2, size_t n);
char *strncpy(char *dest, const char *src, size_t n);
size_t strnlen(const char *s, size_t maxlen);
char *strstr(const char *haystack, const char *needle);
#ifdef __cplusplus
}
#endif
#endif