mirror of
https://github.com/Leonmmcoset/cleonos.git
synced 2026-04-25 03:54:01 +00:00
libc
This commit is contained in:
6
cleonos/c/include/cleonos_stdio.h
Normal file
6
cleonos/c/include/cleonos_stdio.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef CLEONOS_STDIO_H
|
||||
#define CLEONOS_STDIO_H
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#endif
|
||||
16
cleonos/c/include/ctype.h
Normal file
16
cleonos/c/include/ctype.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef CLEONOS_LIBC_CTYPE_H
|
||||
#define CLEONOS_LIBC_CTYPE_H
|
||||
|
||||
int isspace(int ch);
|
||||
int isdigit(int ch);
|
||||
int isalpha(int ch);
|
||||
int isalnum(int ch);
|
||||
int isxdigit(int ch);
|
||||
int isupper(int ch);
|
||||
int islower(int ch);
|
||||
int isprint(int ch);
|
||||
int iscntrl(int ch);
|
||||
int tolower(int ch);
|
||||
int toupper(int ch);
|
||||
|
||||
#endif
|
||||
27
cleonos/c/include/stdio.h
Normal file
27
cleonos/c/include/stdio.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#ifndef CLEONOS_LIBC_STDIO_H
|
||||
#define CLEONOS_LIBC_STDIO_H
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#ifndef EOF
|
||||
#define EOF (-1)
|
||||
#endif
|
||||
|
||||
int putchar(int ch);
|
||||
int getchar(void);
|
||||
int fputc(int ch, int fd);
|
||||
int fgetc(int fd);
|
||||
int fputs(const char *text, int fd);
|
||||
int puts(const char *text);
|
||||
|
||||
int vsnprintf(char *out, unsigned long out_size, const char *fmt, va_list args);
|
||||
int snprintf(char *out, unsigned long out_size, const char *fmt, ...);
|
||||
|
||||
int vdprintf(int fd, const char *fmt, va_list args);
|
||||
int dprintf(int fd, const char *fmt, ...);
|
||||
int vfprintf(int fd, const char *fmt, va_list args);
|
||||
int fprintf(int fd, const char *fmt, ...);
|
||||
int vprintf(const char *fmt, va_list args);
|
||||
int printf(const char *fmt, ...);
|
||||
|
||||
#endif
|
||||
36
cleonos/c/include/stdlib.h
Normal file
36
cleonos/c/include/stdlib.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#ifndef CLEONOS_LIBC_STDLIB_H
|
||||
#define CLEONOS_LIBC_STDLIB_H
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#ifndef EXIT_SUCCESS
|
||||
#define EXIT_SUCCESS 0
|
||||
#endif
|
||||
|
||||
#ifndef EXIT_FAILURE
|
||||
#define EXIT_FAILURE 1
|
||||
#endif
|
||||
|
||||
#ifndef RAND_MAX
|
||||
#define RAND_MAX 32767
|
||||
#endif
|
||||
|
||||
int abs(int value);
|
||||
long labs(long value);
|
||||
long long llabs(long long value);
|
||||
|
||||
int atoi(const char *text);
|
||||
long atol(const char *text);
|
||||
long long atoll(const char *text);
|
||||
long strtol(const char *text, char **out_end, int base);
|
||||
unsigned long strtoul(const char *text, char **out_end, int base);
|
||||
long long strtoll(const char *text, char **out_end, int base);
|
||||
unsigned long long strtoull(const char *text, char **out_end, int base);
|
||||
|
||||
void srand(unsigned int seed);
|
||||
int rand(void);
|
||||
|
||||
void exit(int status);
|
||||
void abort(void);
|
||||
|
||||
#endif
|
||||
29
cleonos/c/include/string.h
Normal file
29
cleonos/c/include/string.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#ifndef CLEONOS_LIBC_STRING_H
|
||||
#define CLEONOS_LIBC_STRING_H
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
void *memset(void *dst, int value, size_t size);
|
||||
void *memcpy(void *dst, const void *src, size_t size);
|
||||
void *memmove(void *dst, const void *src, size_t size);
|
||||
int memcmp(const void *left, const void *right, size_t size);
|
||||
void *memchr(const void *src, int value, size_t size);
|
||||
|
||||
size_t strlen(const char *text);
|
||||
size_t strnlen(const char *text, size_t max_size);
|
||||
char *strcpy(char *dst, const char *src);
|
||||
char *strncpy(char *dst, const char *src, size_t size);
|
||||
int strcmp(const char *left, const char *right);
|
||||
int strncmp(const char *left, const char *right, size_t size);
|
||||
char *strchr(const char *text, int ch);
|
||||
char *strrchr(const char *text, int ch);
|
||||
char *strstr(const char *haystack, const char *needle);
|
||||
size_t strspn(const char *text, const char *accept);
|
||||
size_t strcspn(const char *text, const char *reject);
|
||||
char *strpbrk(const char *text, const char *accept);
|
||||
char *strtok_r(char *text, const char *delim, char **saveptr);
|
||||
char *strtok(char *text, const char *delim);
|
||||
char *strcat(char *dst, const char *src);
|
||||
char *strncat(char *dst, const char *src, size_t size);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user