feat: some extensions to kernel standard c library. Other minor
improvements and formats
This commit is contained in:
38
include/ctype.h
Normal file
38
include/ctype.h
Normal file
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// Created by rick on 25-03-21.
|
||||
//
|
||||
|
||||
#ifndef NEW_KERNEL_CTYPE_H
|
||||
#define NEW_KERNEL_CTYPE_H
|
||||
|
||||
inline int tolower(int c);
|
||||
|
||||
int toupper(int c);
|
||||
|
||||
int isalnum(int c);
|
||||
|
||||
int isalpha(int c);
|
||||
|
||||
int iscntrl(int c);
|
||||
|
||||
int isdigit(int c);
|
||||
|
||||
int isgraph(int c);
|
||||
|
||||
int islower(int c);
|
||||
|
||||
int isprint(int c);
|
||||
|
||||
int ispunct(int c);
|
||||
|
||||
int isspace(int c);
|
||||
|
||||
int isupper(int c);
|
||||
|
||||
int isxdigit(int c);
|
||||
|
||||
int isascii(int c);
|
||||
|
||||
int isblank(int c);
|
||||
|
||||
#endif //NEW_KERNEL_CTYPE_H
|
||||
@@ -38,6 +38,8 @@ void setbuf(FILE *, char *);
|
||||
|
||||
int vfprintf(FILE *, const char *, va_list);
|
||||
|
||||
int vprintf(const char* fmt, va_list args);
|
||||
|
||||
int printf(const char *fmt, ...);
|
||||
|
||||
int sprintf(char *target, const char *fmt, ...);
|
||||
|
||||
@@ -13,12 +13,20 @@ int memset(void *dst, int data, size_t amount);
|
||||
|
||||
int strcpy(char *dst, const char *src);
|
||||
|
||||
int strncpy(char *dst, const char *src, size_t n);
|
||||
|
||||
size_t strlen(const char *str);
|
||||
|
||||
const char *strchr(const char *s, char c);
|
||||
|
||||
int memcmp(const void *s1, const void *s2, size_t n);
|
||||
|
||||
int strcmp(const char *s1, const char *s2);
|
||||
|
||||
int strncmp(const char *s1, const char *s2, int n);
|
||||
|
||||
char *strcat(char *dest, const char *src);
|
||||
|
||||
char *strncat(char *dest, const char *src, size_t n);
|
||||
|
||||
#endif //NEW_KERNEL_STRING_H
|
||||
|
||||
Reference in New Issue
Block a user