mirror of
https://github.com/UzixLS/KernelEx.git
synced 2025-07-18 23:11:19 +03:00
import KernelEx-4.5-RC1
This commit is contained in:
138
kexcrt/ctypes.c
138
kexcrt/ctypes.c
@ -2,7 +2,7 @@
|
||||
* ctypes.c
|
||||
*
|
||||
* This is the array that defines <ctype.h> classes.
|
||||
* This assumes ISO 8859-1.
|
||||
* This assumes ASCII.
|
||||
*/
|
||||
|
||||
#include "ctypes.h"
|
||||
@ -145,140 +145,4 @@ const unsigned char __ctypes[257] = {
|
||||
__ctype_print | __ctype_punct, /* punctuation */
|
||||
__ctype_print | __ctype_punct, /* punctuation */
|
||||
__ctype_cntrl, /* control character */
|
||||
|
||||
__ctype_cntrl, /* control character */
|
||||
__ctype_cntrl, /* control character */
|
||||
__ctype_cntrl, /* control character */
|
||||
__ctype_cntrl, /* control character */
|
||||
__ctype_cntrl, /* control character */
|
||||
__ctype_cntrl, /* control character */
|
||||
__ctype_cntrl, /* control character */
|
||||
__ctype_cntrl, /* control character */
|
||||
__ctype_cntrl, /* control character */
|
||||
__ctype_cntrl, /* control character */
|
||||
__ctype_cntrl, /* control character */
|
||||
__ctype_cntrl, /* control character */
|
||||
__ctype_cntrl, /* control character */
|
||||
__ctype_cntrl, /* control character */
|
||||
__ctype_cntrl, /* control character */
|
||||
__ctype_cntrl, /* control character */
|
||||
|
||||
__ctype_cntrl, /* control character */
|
||||
__ctype_cntrl, /* control character */
|
||||
__ctype_cntrl, /* control character */
|
||||
__ctype_cntrl, /* control character */
|
||||
__ctype_cntrl, /* control character */
|
||||
__ctype_cntrl, /* control character */
|
||||
__ctype_cntrl, /* control character */
|
||||
__ctype_cntrl, /* control character */
|
||||
__ctype_cntrl, /* control character */
|
||||
__ctype_cntrl, /* control character */
|
||||
__ctype_cntrl, /* control character */
|
||||
__ctype_cntrl, /* control character */
|
||||
__ctype_cntrl, /* control character */
|
||||
__ctype_cntrl, /* control character */
|
||||
__ctype_cntrl, /* control character */
|
||||
__ctype_cntrl, /* control character */
|
||||
|
||||
__ctype_print | __ctype_space, /* NBSP */
|
||||
__ctype_print | __ctype_punct, /* punctuation */
|
||||
__ctype_print | __ctype_punct, /* punctuation */
|
||||
__ctype_print | __ctype_punct, /* punctuation */
|
||||
__ctype_print | __ctype_punct, /* punctuation */
|
||||
__ctype_print | __ctype_punct, /* punctuation */
|
||||
__ctype_print | __ctype_punct, /* punctuation */
|
||||
__ctype_print | __ctype_punct, /* punctuation */
|
||||
__ctype_print | __ctype_punct, /* punctuation */
|
||||
__ctype_print | __ctype_punct, /* punctuation */
|
||||
__ctype_print | __ctype_punct, /* punctuation */
|
||||
__ctype_print | __ctype_punct, /* punctuation */
|
||||
__ctype_print | __ctype_punct, /* punctuation */
|
||||
__ctype_print | __ctype_punct, /* punctuation */
|
||||
__ctype_print | __ctype_punct, /* punctuation */
|
||||
__ctype_print | __ctype_punct, /* punctuation */
|
||||
|
||||
__ctype_print | __ctype_punct, /* punctuation */
|
||||
__ctype_print | __ctype_punct, /* punctuation */
|
||||
__ctype_print | __ctype_punct, /* punctuation */
|
||||
__ctype_print | __ctype_punct, /* punctuation */
|
||||
__ctype_print | __ctype_punct, /* punctuation */
|
||||
__ctype_print | __ctype_punct, /* punctuation */
|
||||
__ctype_print | __ctype_punct, /* punctuation */
|
||||
__ctype_print | __ctype_punct, /* punctuation */
|
||||
__ctype_print | __ctype_punct, /* punctuation */
|
||||
__ctype_print | __ctype_punct, /* punctuation */
|
||||
__ctype_print | __ctype_punct, /* punctuation */
|
||||
__ctype_print | __ctype_punct, /* punctuation */
|
||||
__ctype_print | __ctype_punct, /* punctuation */
|
||||
__ctype_print | __ctype_punct, /* punctuation */
|
||||
__ctype_print | __ctype_punct, /* punctuation */
|
||||
__ctype_print | __ctype_punct, /* punctuation */
|
||||
|
||||
__ctype_print | __ctype_upper, /* upper accented */
|
||||
__ctype_print | __ctype_upper, /* upper accented */
|
||||
__ctype_print | __ctype_upper, /* upper accented */
|
||||
__ctype_print | __ctype_upper, /* upper accented */
|
||||
__ctype_print | __ctype_upper, /* upper accented */
|
||||
__ctype_print | __ctype_upper, /* upper accented */
|
||||
__ctype_print | __ctype_upper, /* upper accented */
|
||||
__ctype_print | __ctype_upper, /* upper accented */
|
||||
__ctype_print | __ctype_upper, /* upper accented */
|
||||
__ctype_print | __ctype_upper, /* upper accented */
|
||||
__ctype_print | __ctype_upper, /* upper accented */
|
||||
__ctype_print | __ctype_upper, /* upper accented */
|
||||
__ctype_print | __ctype_upper, /* upper accented */
|
||||
__ctype_print | __ctype_upper, /* upper accented */
|
||||
__ctype_print | __ctype_upper, /* upper accented */
|
||||
__ctype_print | __ctype_upper, /* upper accented */
|
||||
|
||||
__ctype_print | __ctype_upper, /* upper accented */
|
||||
__ctype_print | __ctype_upper, /* upper accented */
|
||||
__ctype_print | __ctype_upper, /* upper accented */
|
||||
__ctype_print | __ctype_upper, /* upper accented */
|
||||
__ctype_print | __ctype_upper, /* upper accented */
|
||||
__ctype_print | __ctype_upper, /* upper accented */
|
||||
__ctype_print | __ctype_upper, /* upper accented */
|
||||
__ctype_print | __ctype_punct, /* punctuation */
|
||||
__ctype_print | __ctype_upper, /* upper accented */
|
||||
__ctype_print | __ctype_upper, /* upper accented */
|
||||
__ctype_print | __ctype_upper, /* upper accented */
|
||||
__ctype_print | __ctype_upper, /* upper accented */
|
||||
__ctype_print | __ctype_upper, /* upper accented */
|
||||
__ctype_print | __ctype_upper, /* upper accented */
|
||||
__ctype_print | __ctype_upper, /* upper accented */
|
||||
__ctype_print | __ctype_lower, /* lower accented */
|
||||
|
||||
__ctype_print | __ctype_lower, /* lower accented */
|
||||
__ctype_print | __ctype_lower, /* lower accented */
|
||||
__ctype_print | __ctype_lower, /* lower accented */
|
||||
__ctype_print | __ctype_lower, /* lower accented */
|
||||
__ctype_print | __ctype_lower, /* lower accented */
|
||||
__ctype_print | __ctype_lower, /* lower accented */
|
||||
__ctype_print | __ctype_lower, /* lower accented */
|
||||
__ctype_print | __ctype_lower, /* lower accented */
|
||||
__ctype_print | __ctype_lower, /* lower accented */
|
||||
__ctype_print | __ctype_lower, /* lower accented */
|
||||
__ctype_print | __ctype_lower, /* lower accented */
|
||||
__ctype_print | __ctype_lower, /* lower accented */
|
||||
__ctype_print | __ctype_lower, /* lower accented */
|
||||
__ctype_print | __ctype_lower, /* lower accented */
|
||||
__ctype_print | __ctype_lower, /* lower accented */
|
||||
__ctype_print | __ctype_lower, /* lower accented */
|
||||
|
||||
__ctype_print | __ctype_lower, /* lower accented */
|
||||
__ctype_print | __ctype_lower, /* lower accented */
|
||||
__ctype_print | __ctype_lower, /* lower accented */
|
||||
__ctype_print | __ctype_lower, /* lower accented */
|
||||
__ctype_print | __ctype_lower, /* lower accented */
|
||||
__ctype_print | __ctype_lower, /* lower accented */
|
||||
__ctype_print | __ctype_lower, /* lower accented */
|
||||
__ctype_print | __ctype_punct, /* punctuation */
|
||||
__ctype_print | __ctype_lower, /* lower accented */
|
||||
__ctype_print | __ctype_lower, /* lower accented */
|
||||
__ctype_print | __ctype_lower, /* lower accented */
|
||||
__ctype_print | __ctype_lower, /* lower accented */
|
||||
__ctype_print | __ctype_lower, /* lower accented */
|
||||
__ctype_print | __ctype_lower, /* lower accented */
|
||||
__ctype_print | __ctype_lower, /* lower accented */
|
||||
__ctype_print | __ctype_lower, /* lower accented */
|
||||
};
|
||||
|
@ -238,6 +238,10 @@ SOURCE=.\strcpy.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\strdup.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\strlen.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -1,4 +1,4 @@
|
||||
OBJ = abort.o assert.o atoi.o atol.o atoll.o ctypes.o memccpy.o memchr.o memcmp.o memcpy.o memmem.o memmove.o memory.o memory-cpp.o memrchr.o memset.o memswap.o printf.o snprintf.o sprintf.o sscanf.o strcat.o strchr.o strcmp.o strcmpi.o strcpy.o strlen.o strncat.o strncmp.o strncpy.o strnicmp.o strnlen.o strntoimax.o strntoumax.o strpbrk.o strrchr.o strsep.o strstr.o strtok.o strtok_r.o strtol.o strtoll.o strtoul.o strtoull.o strtoumax.o strupr.o strxspn.o vsnprintf.o vsprintf.o vsscanf.o _vsnprintf.o write.o exit.o \
|
||||
OBJ = abort.o assert.o atoi.o atol.o atoll.o ctypes.o memccpy.o memchr.o memcmp.o memcpy.o memmem.o memmove.o memory.o memory-cpp.o memrchr.o memset.o memswap.o printf.o snprintf.o sprintf.o sscanf.o strcat.o strchr.o strcmp.o strcmpi.o strcpy.o strdup.o strlen.o strncat.o strncmp.o strncpy.o strnicmp.o strnlen.o strntoimax.o strntoumax.o strpbrk.o strrchr.o strsep.o strstr.o strtok.o strtok_r.o strtol.o strtoll.o strtoul.o strtoull.o strtoumax.o strupr.o strxspn.o vsnprintf.o vsprintf.o vsscanf.o _vsnprintf.o write.o exit.o \
|
||||
ctype/isalnum.o ctype/isalpha.o ctype/isascii.o ctype/isblank.o ctype/iscntrl.o ctype/isdigit.o ctype/isgraph.o ctype/islower.o ctype/isprint.o ctype/ispunct.o ctype/isspace.o ctype/isupper.o ctype/isxdigit.o ctype/tolower.o ctype/toupper.o \
|
||||
gcc/init.o gcc/dllcrt0.o gcc/pseudo-reloc.o gcc/pseudo-reloc-list.o gcc/purecall.o
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
OBJ = abort.obj assert.obj atoi.obj atol.obj atoll.obj ctypes.obj memccpy.obj memchr.obj memcmp.obj memcpy.obj memmem.obj memmove.obj memory.obj memory-cpp.obj memrchr.obj memset.obj memswap.obj printf.obj snprintf.obj sprintf.obj sscanf.obj strcat.obj strchr.obj strcmp.obj strcmpi.obj strcpy.obj strlen.obj strncat.obj strncmp.obj strncpy.obj strnicmp.obj strnlen.obj strntoimax.obj strntoumax.obj strpbrk.obj strrchr.obj strsep.obj strstr.obj strtok.obj strtok_r.obj strtol.obj strtoll.obj strtoul.obj strtoull.obj strtoumax.obj strupr.obj strxspn.obj vsnprintf.obj vsprintf.obj vsscanf.obj _vsnprintf.obj write.obj exit.obj \
|
||||
OBJ = abort.obj assert.obj atoi.obj atol.obj atoll.obj ctypes.obj memccpy.obj memchr.obj memcmp.obj memcpy.obj memmem.obj memmove.obj memory.obj memory-cpp.obj memrchr.obj memset.obj memswap.obj printf.obj snprintf.obj sprintf.obj sscanf.obj strcat.obj strchr.obj strcmp.obj strcmpi.obj strcpy.obj strdup.obj strlen.obj strncat.obj strncmp.obj strncpy.obj strnicmp.obj strnlen.obj strntoimax.obj strntoumax.obj strpbrk.obj strrchr.obj strsep.obj strstr.obj strtok.obj strtok_r.obj strtol.obj strtoll.obj strtoul.obj strtoull.obj strtoumax.obj strupr.obj strxspn.obj vsnprintf.obj vsprintf.obj vsscanf.obj _vsnprintf.obj write.obj exit.obj \
|
||||
ctype/isalnum.obj ctype/isalpha.obj ctype/isascii.obj ctype/isblank.obj ctype/iscntrl.obj ctype/isdigit.obj ctype/isgraph.obj ctype/islower.obj ctype/isprint.obj ctype/ispunct.obj ctype/isspace.obj ctype/isupper.obj ctype/isxdigit.obj ctype/tolower.obj ctype/toupper.obj \
|
||||
msvc/init.obj msvc/dllcrt0.obj msvc/argcargv.obj msvc/concrt0.obj msvc/wincrt0.obj msvc/purecall.obj
|
||||
|
||||
|
16
kexcrt/strdup.c
Executable file
16
kexcrt/strdup.c
Executable file
@ -0,0 +1,16 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
char *strdup(const char *str)
|
||||
{
|
||||
char *newstr;
|
||||
|
||||
if (!str)
|
||||
return NULL;
|
||||
|
||||
newstr = (char *) malloc(strlen(str) + 1);
|
||||
if (newstr)
|
||||
strcpy(newstr, str);
|
||||
|
||||
return newstr;
|
||||
}
|
Reference in New Issue
Block a user