diff --git a/data/Tupfile.lua b/data/Tupfile.lua index 2cacde2e8f..5c6034be5c 100644 --- a/data/Tupfile.lua +++ b/data/Tupfile.lua @@ -183,6 +183,9 @@ extra_files = { {"kolibrios/develop/oberon07/samples/", PROGS .. "/develop/oberon07/samples/*"}, {"kolibrios/develop/tcc/", PROGS .. "/develop/ktcc/trunk/*"}, -- {"kolibrios/develop/tcc/", PROGS .. "/develop/ktcc/trunk/bin/tcc"}, + {"kolibrios/develop/tcc/kx/doc/", PROGS .. "/develop/ktcc/trunk/kx/doc/*"}, + {"kolibrios/develop/tcc/kx/lib/", PROGS .. "/develop/ktcc/trunk/kx/lib/*"}, + {"kolibrios/develop/tcc/kx/src/tests", PROGS .. "/develop/ktcc/trunk/kx/src/tests/*"}, {"kolibrios/develop/tcc/lib/", PROGS .. "/develop/ktcc/trunk/bin/lib/*"}, {"kolibrios/develop/tcc/include/", PROGS .. "/develop/ktcc/trunk/libc.obj/include/*"}, {"kolibrios/develop/tcc/include/clayer/", PROGS .. "/develop/ktcc/trunk/libc.obj/include/clayer/*"}, diff --git a/programs/develop/ktcc/trunk/kx/bin/lib/http.def b/programs/develop/ktcc/trunk/kx/bin/lib/http.def deleted file mode 100644 index cdb14b8f1e..0000000000 --- a/programs/develop/ktcc/trunk/kx/bin/lib/http.def +++ /dev/null @@ -1,9 +0,0 @@ -LIBRARY http.obj - -EXPORTS prefix -http_get -http_head -http_post -http_receive -http_send -http_free diff --git a/programs/develop/ktcc/trunk/kx/bin/lib/img.def b/programs/develop/ktcc/trunk/kx/bin/lib/img.def deleted file mode 100644 index 857a64cd0f..0000000000 --- a/programs/develop/ktcc/trunk/kx/bin/lib/img.def +++ /dev/null @@ -1,20 +0,0 @@ -LIBRARY libimg.obj - -EXPORTS -img_blend -img_convert -img_count -img_create -img_decode -img_destroy -img_destroy_layer -img_draw -img_encode -img_flip -img_flip_layer -img_resize_data -img_rotate -img_rotate_layer -img_scale -img_to_rgb -img_to_rgb2 \ No newline at end of file diff --git a/programs/develop/ktcc/trunk/kx/bin/lib/libc.def b/programs/develop/ktcc/trunk/kx/bin/lib/libc.def deleted file mode 100644 index c36e2999fd..0000000000 --- a/programs/develop/ktcc/trunk/kx/bin/lib/libc.def +++ /dev/null @@ -1,177 +0,0 @@ -LIBRARY libc.obj - -EXPORTS -;____STDIO______ -clearerr -debug_printf -fclose -feof -ferror -fflush -fgetc -fgetpos -fgets -fopen -fprintf -fputc -fputs -fread -freopen -fscanf -fseek -fsetpos -ftell -fwrite -getchar -gets -perror -printf -puts -remove -rename -rewind -scanf -setbuf -setvbuf -snprintf -sprintf -sscanf -tmpfile -tmpnam -vfscanf -vprintf -vfscanf -vsprintf -vsnprintf -vsscanf -ungetc -;____STDLIB____ -abs -atoi -atol -atoll -atof -calloc -exit -free -itoa -labs -llabs -malloc -realloc -strtol -srand -rand -qsort -strtod -__assert_fail -;____STRING____ -;memcpy -memchr -memcmp -!memmove -!memset -strncat -strchr -strcat -strcmp -strcoll -strcpy -strcspn -strdup -strerror -strlen -strncat -strncmp -strncpy -strrchr -strrev -strspn -strstr -strtok -strxfrm -_errno -;____SYS____ -closedir -opendir -readdir -rewinddir -seekdir -telldir -getcwd -mkdir -rmdir -setcwd -getcwd -;____SOCKET____ -socket -close -bind -listen -connect -accept -send -recv -setsockopt -socketpair -;____UNISTD____ -;____MATH____ -acosh -asinh -atanh -acosh -frexp -hypot -ldexp -sinh -tanh -acos -asin -atan -atan2 -ceil -cos -exp -fabs -floor -fmod -log -modf -modfl -pow -pow2 -pow10 -;____LONGJMP____ -longjmp -setjmp -;____CTYPE____ -__is -tolower -toupper -;___CONIO___ -con_set_title -con_init -con_init_opt -con_write_asciiz -con_write_string -con_printf -con_exit -con_get_flags -con_set_flags -con_kbhit -con_getch -con_getch2 -con_gets -con_gets2 -con_get_font_height -con_get_cursor_height -con_set_cursor_height -con_cls -con_get_cursor_pos -con_set_cursor_pos -;____TIME____ -mktime -time -localtime -asctime -difftime diff --git a/programs/develop/ktcc/trunk/source/libtcc.c b/programs/develop/ktcc/trunk/source/libtcc.c index 6577cf2e41..a3310d2397 100644 --- a/programs/develop/ktcc/trunk/source/libtcc.c +++ b/programs/develop/ktcc/trunk/source/libtcc.c @@ -113,7 +113,7 @@ static void tcc_set_lib_path_w32(TCCState *s) { char path[1024], *p; GetModuleFileNameA(tcc_module, path, sizeof path); -#ifdef TCC_TARGET_KX +#ifdef TCC_TARGET_KX kx_fix_root_directory(path, sizeof path); normalize_slashes(strlwr(path)); #else @@ -155,13 +155,13 @@ BOOL WINAPI DllMain (HINSTANCE hDll, DWORD dwReason, LPVOID lpReserved) #if defined TCC_TARGET_MEOS /* on Kolibri host, we suppose the lib and includes are at the location of 'tcc' /lib, /include */ static void tcc_set_lib_path_kos(TCCState *s) -{ +{ char** argv0 = (char**)0x20; // path in kolibri header - char path[1024], *p; + char path[1024], *p; strncpy(path, *argv0, sizeof path); -#ifdef TCC_TARGET_KX +#ifdef TCC_TARGET_KX kx_fix_root_directory(path, sizeof path); -#else +#else p = tcc_basename(path); if (p > path) p--; *p = 0; @@ -174,7 +174,7 @@ static void tcc_set_lib_path_linux(TCCState *s) { char buff[4096+1]; readlink("/proc/self/exe", buff, 4096); -#ifdef TCC_TARGET_KX +#ifdef TCC_TARGET_KX kx_fix_root_directory(buff, sizeof buff); const char *path = buff; #else diff --git a/programs/develop/ktcc/trunk/source/tcckx.c b/programs/develop/ktcc/trunk/source/tcckx.c index 86bb813973..556a896169 100644 --- a/programs/develop/ktcc/trunk/source/tcckx.c +++ b/programs/develop/ktcc/trunk/source/tcckx.c @@ -168,8 +168,8 @@ typedef struct { imp_sect->data = tcc_mallocz(4096); // FIXME!!! I increased it to 4Kb, but steel need dynamicaly size imp_sect->data_size = 0; //imp_sect->sh_addr = me->header.image_size;// +1; - - long imp_data = (long)imp_sect->data; //FIXED changed to long for gcc compatible + + long imp_data = (long)imp_sect->data; //FIXED changed to long for gcc compatible // Strings i = 0; @@ -203,7 +203,7 @@ typedef struct { memcpy((void*)imp_data, &lib, sizeof(LibraryEntry)); if (nlib > 1) { - int prev_sum = 0; + int prev_sum = 0; int prev = 0; i = 1; do { @@ -232,7 +232,7 @@ typedef struct { i = 0; do { char* len_data = len_arr[i].data; - long* sym_data = sym_arr[i].data; + long* sym_data = sym_arr[i].data; name_len = *len_data++; // Skip library name