2022-01-24 18:43:00 +01:00
|
|
|
#include <setjmp.h>
|
|
|
|
|
2021-04-27 18:33:31 +02:00
|
|
|
#include "ctype/is.c"
|
2022-04-15 11:00:55 +02:00
|
|
|
#include "ctype/tolower.c"
|
2021-05-23 17:28:07 +02:00
|
|
|
#include "ctype/toupper.c"
|
2021-04-27 18:33:31 +02:00
|
|
|
|
|
|
|
#include "sys/closedir.c"
|
2021-05-25 17:38:14 +02:00
|
|
|
#include "sys/dir.c"
|
2022-04-15 11:00:55 +02:00
|
|
|
#include "sys/opendir.c"
|
|
|
|
#include "sys/readdir.c"
|
|
|
|
#include "sys/rewinddir.c"
|
|
|
|
#include "sys/seekdir.c"
|
2021-06-09 05:17:46 +02:00
|
|
|
#include "sys/socket.c"
|
2022-04-15 11:00:55 +02:00
|
|
|
#include "sys/telldir.c"
|
2021-04-27 18:33:31 +02:00
|
|
|
|
|
|
|
#include "stdio/clearerr.c"
|
2022-04-15 11:00:55 +02:00
|
|
|
#include "stdio/conio.c"
|
|
|
|
#include "stdio/debug_printf.c"
|
|
|
|
#include "stdio/fclose.c"
|
|
|
|
#include "stdio/feof.c"
|
|
|
|
#include "stdio/ferror.c"
|
|
|
|
#include "stdio/fflush.c"
|
2021-04-27 18:33:31 +02:00
|
|
|
#include "stdio/fgetc.c"
|
2022-04-15 11:00:55 +02:00
|
|
|
#include "stdio/fgetpos.c"
|
|
|
|
#include "stdio/fgets.c"
|
2021-04-27 18:33:31 +02:00
|
|
|
#include "stdio/fopen.c"
|
|
|
|
#include "stdio/format_print.c"
|
2022-04-15 11:00:55 +02:00
|
|
|
#include "stdio/format_scan.c"
|
|
|
|
#include "stdio/fprintf.c"
|
|
|
|
#include "stdio/fputc.c"
|
|
|
|
#include "stdio/fputs.c"
|
2021-04-27 18:33:31 +02:00
|
|
|
#include "stdio/fread.c"
|
2022-04-15 11:00:55 +02:00
|
|
|
#include "stdio/freopen.c"
|
|
|
|
#include "stdio/fscanf.c"
|
2021-04-27 18:33:31 +02:00
|
|
|
#include "stdio/fseek.c"
|
2022-04-15 11:00:55 +02:00
|
|
|
#include "stdio/fsetpos.c"
|
|
|
|
#include "stdio/ftell.c"
|
|
|
|
#include "stdio/fwrite.c"
|
2021-04-27 18:33:31 +02:00
|
|
|
#include "stdio/getchar.c"
|
2022-04-15 11:00:55 +02:00
|
|
|
#include "stdio/gets.c"
|
|
|
|
#include "stdio/perror.c"
|
2021-04-27 18:33:31 +02:00
|
|
|
#include "stdio/printf.c"
|
|
|
|
#include "stdio/puts.c"
|
2022-04-15 11:00:55 +02:00
|
|
|
#include "stdio/remove.c"
|
|
|
|
#include "stdio/rename.c"
|
|
|
|
#include "stdio/rewind.c"
|
|
|
|
#include "stdio/scanf.c"
|
|
|
|
#include "stdio/setbuf.c"
|
|
|
|
#include "stdio/setvbuf.c"
|
|
|
|
#include "stdio/snprintf.c"
|
2021-04-27 18:33:31 +02:00
|
|
|
#include "stdio/sprintf.c"
|
2022-04-15 11:00:55 +02:00
|
|
|
#include "stdio/sscanf.c"
|
|
|
|
#include "stdio/tmpfile.c"
|
2021-04-27 18:33:31 +02:00
|
|
|
#include "stdio/tmpnam.c"
|
2021-05-23 17:28:07 +02:00
|
|
|
#include "stdio/ungetc.c"
|
2022-04-15 11:00:55 +02:00
|
|
|
#include "stdio/vfprintf.c"
|
|
|
|
#include "stdio/vprintf.c"
|
|
|
|
#include "stdio/vsnprintf.c"
|
2021-04-27 18:33:31 +02:00
|
|
|
|
|
|
|
#include "string/memccpy.c"
|
2022-04-15 11:00:55 +02:00
|
|
|
#include "string/memchr.c"
|
|
|
|
#include "string/memcmp.c"
|
|
|
|
#include "string/memcpy.c"
|
|
|
|
#include "string/strcat.c"
|
2021-04-27 18:33:31 +02:00
|
|
|
#include "string/strchr.c"
|
2022-04-15 11:00:55 +02:00
|
|
|
#include "string/strcmp.c"
|
2021-04-27 18:33:31 +02:00
|
|
|
#include "string/strcoll.c"
|
|
|
|
#include "string/strcpy.c"
|
2022-04-15 11:00:55 +02:00
|
|
|
#include "string/strcspn.c"
|
2021-04-27 18:33:31 +02:00
|
|
|
#include "string/strdup.c"
|
2022-04-15 11:00:55 +02:00
|
|
|
#include "string/strerror.c"
|
|
|
|
#include "string/strlen.c"
|
2021-04-27 18:33:31 +02:00
|
|
|
#include "string/strncat.c"
|
2022-04-15 11:00:55 +02:00
|
|
|
#include "string/strncmp.c"
|
|
|
|
#include "string/strncpy.c"
|
|
|
|
#include "string/strpbrk.c"
|
|
|
|
#include "string/strrchr.c"
|
|
|
|
#include "string/strrev.c"
|
|
|
|
#include "string/strspn.c"
|
|
|
|
#include "string/strstr.c"
|
2021-04-27 18:33:31 +02:00
|
|
|
#include "string/strtok.c"
|
2022-04-15 11:00:55 +02:00
|
|
|
#include "string/strxfrm.c"
|
2021-04-27 18:33:31 +02:00
|
|
|
|
|
|
|
#include "stdlib/abs.c"
|
2022-04-15 11:00:55 +02:00
|
|
|
#include "stdlib/assert.c"
|
|
|
|
#include "stdlib/atof.c"
|
|
|
|
#include "stdlib/atoi.c"
|
2021-04-27 18:33:31 +02:00
|
|
|
#include "stdlib/atol.c"
|
2022-04-15 11:00:55 +02:00
|
|
|
#include "stdlib/atoll.c"
|
|
|
|
#include "stdlib/calloc.c"
|
|
|
|
#include "stdlib/exit.c"
|
|
|
|
#include "stdlib/free.c"
|
2021-04-27 18:33:31 +02:00
|
|
|
#include "stdlib/itoa.c"
|
2022-04-15 11:00:55 +02:00
|
|
|
#include "stdlib/labs.c"
|
|
|
|
#include "stdlib/llabs.c"
|
|
|
|
#include "stdlib/malloc.c"
|
2021-07-06 20:18:46 +02:00
|
|
|
#include "stdlib/qsort.c"
|
2022-04-15 11:00:55 +02:00
|
|
|
#include "stdlib/rand.c"
|
|
|
|
#include "stdlib/realloc.c"
|
2021-11-01 15:46:28 +01:00
|
|
|
#include "stdlib/strtod.c"
|
2022-04-15 11:00:55 +02:00
|
|
|
#include "stdlib/strtol.c"
|
2021-04-27 18:33:31 +02:00
|
|
|
|
|
|
|
#include "math/acosh.c"
|
|
|
|
#include "math/asinh.c"
|
|
|
|
#include "math/atanh.c"
|
|
|
|
#include "math/cosh.c"
|
|
|
|
#include "math/frexp.c"
|
|
|
|
#include "math/hypot.c"
|
|
|
|
#include "math/ldexp.c"
|
|
|
|
#include "math/sinh.c"
|
|
|
|
#include "math/tanh.c"
|
|
|
|
|
2022-04-15 11:00:55 +02:00
|
|
|
#include "time/asctime.c"
|
2021-06-09 05:17:46 +02:00
|
|
|
#include "time/difftime.c"
|
|
|
|
#include "time/localtime.c"
|
|
|
|
#include "time/mktime.c"
|
|
|
|
#include "time/time.c"
|
|
|
|
|
2021-11-12 23:45:22 +01:00
|
|
|
#include "misc/basename.c"
|
|
|
|
#include "misc/dirname.c"
|
|
|
|
|
2021-04-27 18:33:31 +02:00
|
|
|
__asm__(
|
|
|
|
".include \"math/acos.s\"\n\t"
|
|
|
|
".include \"math/asin.s\"\n\t"
|
|
|
|
".include \"math/atan.s\"\n\t"
|
|
|
|
".include \"math/atan2.s\"\n\t"
|
|
|
|
".include \"math/ceil.s\"\n\t"
|
|
|
|
".include \"math/cos.s\"\n\t"
|
|
|
|
".include \"math/exp.s\"\n\t"
|
|
|
|
".include \"math/fabs.s\"\n\t"
|
|
|
|
".include \"math/floor.s\"\n\t"
|
|
|
|
".include \"math/fmod.s\"\n\t"
|
|
|
|
".include \"math/log.s\"\n\t"
|
2022-04-20 19:08:10 +02:00
|
|
|
".include \"math/log2.s\"\n\t"
|
|
|
|
".include \"math/log10.s\"\n\t"
|
2021-04-27 18:33:31 +02:00
|
|
|
".include \"math/modf.s\"\n\t"
|
|
|
|
".include \"math/modfl.s\"\n\t"
|
|
|
|
".include \"math/pow.s\"\n\t"
|
|
|
|
".include \"math/pow2.s\"\n\t"
|
2021-06-09 05:17:46 +02:00
|
|
|
".include \"math/pow10.s\"\n\t"
|
2022-04-20 19:08:10 +02:00
|
|
|
".include \"math/round.s\"\n\t"
|
2022-04-20 21:07:54 +02:00
|
|
|
".include \"math/sin.s\"\n\t");
|
2021-04-27 18:33:31 +02:00
|
|
|
|
|
|
|
__asm__(
|
2022-04-15 11:00:55 +02:00
|
|
|
".include \"string/memmove.s\"\n\t"
|
|
|
|
".include \"string/memset.s\"\n\t"
|
2021-04-27 18:33:31 +02:00
|
|
|
".include \"setjmp/longjmp.s\"\n\t"
|
2022-04-15 11:00:55 +02:00
|
|
|
".include \"setjmp/setjmp.s\"");
|
2021-04-27 18:33:31 +02:00
|
|
|
|
2022-01-24 18:43:00 +01:00
|
|
|
#include "libtcc1/libtcc1.c"
|
2021-04-27 18:33:31 +02:00
|
|
|
#include "stdlib/___chkstk_ms.c"
|
2022-01-24 18:43:00 +01:00
|
|
|
|
|
|
|
ksys_dll_t EXPORTS[] = {
|
2022-04-15 11:00:55 +02:00
|
|
|
{ "clearerr", &clearerr },
|
|
|
|
{ "debug_printf", &debug_printf },
|
|
|
|
{ "fclose", &fclose },
|
|
|
|
{ "feof", &feof },
|
|
|
|
{ "ferror", &ferror },
|
|
|
|
{ "fflush", &fflush },
|
|
|
|
{ "fgetc", &fgetc },
|
|
|
|
{ "fgetpos", &fgetpos },
|
|
|
|
{ "fgets", &fgets },
|
|
|
|
{ "fopen", &fopen },
|
|
|
|
{ "fprintf", &fprintf },
|
|
|
|
{ "fputc", &fputc },
|
|
|
|
{ "fputs", &fputs },
|
|
|
|
{ "fread", &fread },
|
|
|
|
{ "freopen", &freopen },
|
|
|
|
{ "fscanf", &fscanf },
|
|
|
|
{ "fseek", &fseek },
|
|
|
|
{ "fsetpos", &fsetpos },
|
|
|
|
{ "ftell", &ftell },
|
|
|
|
{ "fwrite", &fwrite },
|
|
|
|
{ "getchar", &getchar },
|
|
|
|
{ "gets", &gets },
|
|
|
|
{ "perror", &perror },
|
|
|
|
{ "printf", &printf },
|
|
|
|
{ "puts", &puts },
|
|
|
|
{ "remove", &remove },
|
|
|
|
{ "rename", &rename },
|
|
|
|
{ "rewind", &rewind },
|
|
|
|
{ "scanf", &scanf },
|
|
|
|
{ "setbuf", &setbuf },
|
|
|
|
{ "setvbuf", &setvbuf },
|
|
|
|
{ "snprintf", &snprintf },
|
|
|
|
{ "sprintf", &sprintf },
|
|
|
|
{ "sscanf", &sscanf },
|
|
|
|
{ "tmpfile", &tmpfile },
|
|
|
|
{ "tmpnam", &tmpnam },
|
|
|
|
{ "vfscanf", &vfscanf },
|
|
|
|
{ "vprintf", &vprintf },
|
|
|
|
{ "vfscanf", &vfscanf },
|
|
|
|
{ "vsprintf", &vsprintf },
|
|
|
|
{ "vsnprintf", &vsnprintf },
|
|
|
|
{ "vsscanf", &vsscanf },
|
|
|
|
{ "ungetc", &ungetc },
|
|
|
|
{ "abs", &abs },
|
|
|
|
{ "atoi", &atoi },
|
|
|
|
{ "atol", &atol },
|
|
|
|
{ "atoll", &atoll },
|
|
|
|
{ "atof", &atof },
|
|
|
|
{ "calloc", &calloc },
|
|
|
|
{ "exit", &exit },
|
|
|
|
{ "free", &free },
|
|
|
|
{ "itoa", &itoa },
|
|
|
|
{ "labs", &labs },
|
|
|
|
{ "llabs", &llabs },
|
|
|
|
{ "malloc", &malloc },
|
|
|
|
{ "realloc", &realloc },
|
|
|
|
{ "strtol", &strtol },
|
|
|
|
{ "srand", &srand },
|
|
|
|
{ "rand", &rand },
|
|
|
|
{ "qsort", &qsort },
|
|
|
|
{ "strtod", &strtod },
|
|
|
|
{ "__assert_fail", &__assert_fail },
|
|
|
|
{ "memchr", &memchr },
|
|
|
|
{ "memcmp", &memcmp },
|
|
|
|
{ "strncat", &strncat },
|
|
|
|
{ "strchr", &strchr },
|
|
|
|
{ "strcat", &strcat },
|
|
|
|
{ "strcmp", &strcmp },
|
|
|
|
{ "strcoll", &strcoll },
|
|
|
|
{ "strcpy", &strcpy },
|
|
|
|
{ "strcspn", &strcspn },
|
|
|
|
{ "strdup", &strdup },
|
|
|
|
{ "strerror", &strerror },
|
|
|
|
{ "strlen", &strlen },
|
|
|
|
{ "strncat", &strncat },
|
|
|
|
{ "strncmp", &strncmp },
|
|
|
|
{ "strncpy", &strncpy },
|
|
|
|
{ "strrchr", &strrchr },
|
|
|
|
{ "strrev", &strrev },
|
|
|
|
{ "strspn", &strspn },
|
|
|
|
{ "strstr", &strstr },
|
|
|
|
{ "strtok", &strtok },
|
|
|
|
{ "strxfrm", &strxfrm },
|
|
|
|
{ "__errno", &__errno },
|
|
|
|
{ "closedir", &closedir },
|
|
|
|
{ "opendir", &opendir },
|
|
|
|
{ "readdir", &readdir },
|
|
|
|
{ "rewinddir", &rewinddir },
|
|
|
|
{ "seekdir", &seekdir },
|
|
|
|
{ "telldir", &telldir },
|
|
|
|
{ "getcwd", &getcwd },
|
|
|
|
{ "mkdir", &mkdir },
|
|
|
|
{ "rmdir", &rmdir },
|
|
|
|
{ "setcwd", &setcwd },
|
|
|
|
{ "getcwd", &getcwd },
|
|
|
|
{ "socket", &socket },
|
|
|
|
{ "close", &close },
|
|
|
|
{ "bind", &bind },
|
|
|
|
{ "listen", &listen },
|
|
|
|
{ "connect", &connect },
|
|
|
|
{ "accept", &accept },
|
|
|
|
{ "send", &send },
|
|
|
|
{ "recv", &recv },
|
|
|
|
{ "setsockopt", &setsockopt },
|
|
|
|
{ "socketpair", &socketpair },
|
|
|
|
{ "acosh", &acosh },
|
|
|
|
{ "asinh", &asinh },
|
|
|
|
{ "atanh", &atanh },
|
|
|
|
{ "frexp", &frexp },
|
|
|
|
{ "hypot", &hypot },
|
|
|
|
{ "ldexp", &ldexp },
|
|
|
|
{ "cosh", &cosh },
|
|
|
|
{ "sinh", &sinh },
|
|
|
|
{ "tanh", &tanh },
|
|
|
|
{ "acos", &acos },
|
|
|
|
{ "asin", &asin },
|
|
|
|
{ "atan", &atan },
|
|
|
|
{ "atan2", &atan2 },
|
|
|
|
{ "ceil", &ceil },
|
|
|
|
{ "cos", &cos },
|
|
|
|
{ "sin", &sin },
|
|
|
|
{ "tan", &tan },
|
|
|
|
{ "sqrt", &sqrt },
|
|
|
|
{ "exp", &exp },
|
|
|
|
{ "fabs", &fabs },
|
|
|
|
{ "floor", &floor },
|
|
|
|
{ "fmod", &fmod },
|
|
|
|
{ "log", &log },
|
2022-04-20 19:08:10 +02:00
|
|
|
{ "log2", &log2 },
|
|
|
|
{ "log10", &log10 },
|
|
|
|
{ "round", &round },
|
2022-04-15 11:00:55 +02:00
|
|
|
{ "modf", &modf },
|
|
|
|
{ "modfl", &modfl },
|
|
|
|
{ "pow", &pow },
|
|
|
|
{ "pow2", &pow2 },
|
|
|
|
{ "pow10", &pow10 },
|
|
|
|
{ "longjmp", &longjmp },
|
|
|
|
{ "setjmp", &setjmp },
|
|
|
|
{ "__is", &__is },
|
|
|
|
{ "tolower", &tolower },
|
|
|
|
{ "toupper", &toupper },
|
|
|
|
{ "con_set_title", &con_set_title },
|
|
|
|
{ "con_init", &con_init },
|
|
|
|
{ "con_init_opt", &con_init_opt },
|
|
|
|
{ "con_write_asciiz", &con_write_asciiz },
|
|
|
|
{ "con_write_string", &con_write_string },
|
|
|
|
{ "con_printf", &con_printf },
|
|
|
|
{ "con_exit", &con_exit },
|
|
|
|
{ "con_get_flags", &con_get_flags },
|
|
|
|
{ "con_set_flags", &con_set_flags },
|
|
|
|
{ "con_kbhit", &con_kbhit },
|
|
|
|
{ "con_getch", &con_getch },
|
|
|
|
{ "con_getch2", &con_getch2 },
|
|
|
|
{ "con_gets", &con_gets },
|
|
|
|
{ "con_gets2", &con_gets2 },
|
|
|
|
{ "con_get_font_height", &con_get_font_height },
|
|
|
|
{ "con_get_cursor_height", &con_get_cursor_height },
|
|
|
|
{ "con_set_cursor_height", &con_set_cursor_height },
|
|
|
|
{ "con_cls", &con_cls },
|
|
|
|
{ "con_get_cursor_pos", &con_get_cursor_pos },
|
|
|
|
{ "con_set_cursor_pos", &con_set_cursor_pos },
|
|
|
|
{ "mktime", &mktime },
|
|
|
|
{ "time", &time },
|
|
|
|
{ "localtime", &localtime },
|
|
|
|
{ "asctime", &asctime },
|
|
|
|
{ "difftime", &difftime },
|
|
|
|
{ "basename", &basename },
|
|
|
|
{ "dirname", &dirname },
|
2022-01-24 18:43:00 +01:00
|
|
|
NULL,
|
|
|
|
};
|