From c5ebb23061a9496a56b32d789e0e2dc3b2e9fe72 Mon Sep 17 00:00:00 2001 From: turbocat Date: Thu, 21 Apr 2022 20:50:12 +0000 Subject: [PATCH] ktcc: removed old files git-svn-id: svn://kolibrios.org@9777 a494cfbc-eb01-0410-851d-a64ba20cac60 --- .../develop/ktcc/trunk/_howto_debug_tcc.txt | 27 -- .../develop/ktcc/trunk/libctest/build.bat | 68 ---- programs/develop/ktcc/trunk/libctest/float2.c | 42 --- programs/develop/ktcc/trunk/libctest/fscanf.c | 125 ------ .../develop/ktcc/trunk/libctest/memmove.c | 186 --------- .../develop/ktcc/trunk/libctest/myfile.txt | 5 - .../develop/ktcc/trunk/libctest/nulprintf.c | 20 - .../develop/ktcc/trunk/libctest/print.inc | 28 -- programs/develop/ktcc/trunk/libctest/qsort.c | 173 --------- programs/develop/ktcc/trunk/libctest/rand.inc | 167 -------- .../develop/ktcc/trunk/libctest/readme.txt | 34 -- .../develop/ktcc/trunk/libctest/snprintf.c | 188 --------- programs/develop/ktcc/trunk/libctest/sscanf.c | 89 ----- programs/develop/ktcc/trunk/libctest/string.c | 147 -------- .../ktcc/trunk/libctest/string_memcpy.c | 56 --- .../ktcc/trunk/libctest/string_memset.c | 71 ---- .../ktcc/trunk/libctest/string_strchr.c | 60 --- .../ktcc/trunk/libctest/string_strcspn.c | 36 -- .../ktcc/trunk/libctest/string_strstr.c | 57 --- programs/develop/ktcc/trunk/libctest/strtod.c | 77 ---- .../develop/ktcc/trunk/libctest/strtod_long.c | 21 -- .../ktcc/trunk/libctest/strtod_simple.c | 34 -- programs/develop/ktcc/trunk/libctest/strtof.c | 44 --- programs/develop/ktcc/trunk/libctest/strtol.c | 80 ---- .../develop/ktcc/trunk/libctest/strtold.c | 96 ----- programs/develop/ktcc/trunk/libctest/test.h | 37 -- programs/develop/ktcc/trunk/libctest/tgmath.c | 41 -- programs/develop/ktcc/trunk/libctest/time.c | 110 ------ .../develop/ktcc/trunk/libctest/traceadr.c | 19 - .../develop/ktcc/trunk/libctest/tstring.c | 357 ------------------ programs/develop/ktcc/trunk/libctest/udiv.c | 170 --------- programs/develop/ktcc/trunk/libctest/ungetc.c | 114 ------ .../develop/ktcc/trunk/libctest/ungetc2.c | 39 -- .../develop/ktcc/trunk/libctest/wtalloc.c | 131 ------- programs/develop/ktcc/trunk/readme.txt | 125 ------ programs/develop/ktcc/trunk/samples/Makefile | 28 -- programs/develop/ktcc/trunk/samples/asm_ex.c | 68 ---- .../develop/ktcc/trunk/samples/build_all.sh | 23 -- .../ktcc/trunk/samples/clayer/boxlib.c | 110 ------ .../ktcc/trunk/samples/clayer/dialog.c | 32 -- .../ktcc/trunk/samples/clayer/libimg.c | 97 ----- .../ktcc/trunk/samples/clayer/logo.png | Bin 52385 -> 0 bytes .../ktcc/trunk/samples/clayer/msgbox.c | 8 - .../ktcc/trunk/samples/clayer/rasterworks.c | 55 --- .../develop/ktcc/trunk/samples/consoleio.c | 23 -- .../develop/ktcc/trunk/samples/dir_example.c | 41 -- programs/develop/ktcc/trunk/samples/dynamic.c | 26 -- programs/develop/ktcc/trunk/samples/files.c | 43 --- .../develop/ktcc/trunk/samples/getopt_ex.c | 38 -- .../develop/ktcc/trunk/samples/graphics.c | 53 --- .../develop/ktcc/trunk/samples/load_coff.c | 21 -- .../ktcc/trunk/samples/net/http_tcp_demo.c | 64 ---- .../develop/ktcc/trunk/samples/net/nslookup.c | 29 -- .../ktcc/trunk/samples/net/tcpsrv_demo.c | 38 -- .../develop/ktcc/trunk/samples/tinygl/fps.c | 33 -- .../develop/ktcc/trunk/samples/tinygl/gears.c | 313 --------------- .../develop/ktcc/trunk/samples/winbasics.c | 148 -------- programs/develop/ktcc/trunk/tcc.conf | 6 - 58 files changed, 4371 deletions(-) delete mode 100644 programs/develop/ktcc/trunk/_howto_debug_tcc.txt delete mode 100644 programs/develop/ktcc/trunk/libctest/build.bat delete mode 100644 programs/develop/ktcc/trunk/libctest/float2.c delete mode 100644 programs/develop/ktcc/trunk/libctest/fscanf.c delete mode 100644 programs/develop/ktcc/trunk/libctest/memmove.c delete mode 100644 programs/develop/ktcc/trunk/libctest/myfile.txt delete mode 100644 programs/develop/ktcc/trunk/libctest/nulprintf.c delete mode 100644 programs/develop/ktcc/trunk/libctest/print.inc delete mode 100644 programs/develop/ktcc/trunk/libctest/qsort.c delete mode 100644 programs/develop/ktcc/trunk/libctest/rand.inc delete mode 100644 programs/develop/ktcc/trunk/libctest/readme.txt delete mode 100644 programs/develop/ktcc/trunk/libctest/snprintf.c delete mode 100644 programs/develop/ktcc/trunk/libctest/sscanf.c delete mode 100644 programs/develop/ktcc/trunk/libctest/string.c delete mode 100644 programs/develop/ktcc/trunk/libctest/string_memcpy.c delete mode 100644 programs/develop/ktcc/trunk/libctest/string_memset.c delete mode 100644 programs/develop/ktcc/trunk/libctest/string_strchr.c delete mode 100644 programs/develop/ktcc/trunk/libctest/string_strcspn.c delete mode 100644 programs/develop/ktcc/trunk/libctest/string_strstr.c delete mode 100644 programs/develop/ktcc/trunk/libctest/strtod.c delete mode 100644 programs/develop/ktcc/trunk/libctest/strtod_long.c delete mode 100644 programs/develop/ktcc/trunk/libctest/strtod_simple.c delete mode 100644 programs/develop/ktcc/trunk/libctest/strtof.c delete mode 100644 programs/develop/ktcc/trunk/libctest/strtol.c delete mode 100644 programs/develop/ktcc/trunk/libctest/strtold.c delete mode 100644 programs/develop/ktcc/trunk/libctest/test.h delete mode 100644 programs/develop/ktcc/trunk/libctest/tgmath.c delete mode 100644 programs/develop/ktcc/trunk/libctest/time.c delete mode 100644 programs/develop/ktcc/trunk/libctest/traceadr.c delete mode 100644 programs/develop/ktcc/trunk/libctest/tstring.c delete mode 100644 programs/develop/ktcc/trunk/libctest/udiv.c delete mode 100644 programs/develop/ktcc/trunk/libctest/ungetc.c delete mode 100644 programs/develop/ktcc/trunk/libctest/ungetc2.c delete mode 100644 programs/develop/ktcc/trunk/libctest/wtalloc.c delete mode 100644 programs/develop/ktcc/trunk/readme.txt delete mode 100755 programs/develop/ktcc/trunk/samples/Makefile delete mode 100644 programs/develop/ktcc/trunk/samples/asm_ex.c delete mode 100644 programs/develop/ktcc/trunk/samples/build_all.sh delete mode 100644 programs/develop/ktcc/trunk/samples/clayer/boxlib.c delete mode 100644 programs/develop/ktcc/trunk/samples/clayer/dialog.c delete mode 100755 programs/develop/ktcc/trunk/samples/clayer/libimg.c delete mode 100644 programs/develop/ktcc/trunk/samples/clayer/logo.png delete mode 100644 programs/develop/ktcc/trunk/samples/clayer/msgbox.c delete mode 100644 programs/develop/ktcc/trunk/samples/clayer/rasterworks.c delete mode 100644 programs/develop/ktcc/trunk/samples/consoleio.c delete mode 100644 programs/develop/ktcc/trunk/samples/dir_example.c delete mode 100644 programs/develop/ktcc/trunk/samples/dynamic.c delete mode 100644 programs/develop/ktcc/trunk/samples/files.c delete mode 100644 programs/develop/ktcc/trunk/samples/getopt_ex.c delete mode 100644 programs/develop/ktcc/trunk/samples/graphics.c delete mode 100644 programs/develop/ktcc/trunk/samples/load_coff.c delete mode 100644 programs/develop/ktcc/trunk/samples/net/http_tcp_demo.c delete mode 100644 programs/develop/ktcc/trunk/samples/net/nslookup.c delete mode 100644 programs/develop/ktcc/trunk/samples/net/tcpsrv_demo.c delete mode 100644 programs/develop/ktcc/trunk/samples/tinygl/fps.c delete mode 100644 programs/develop/ktcc/trunk/samples/tinygl/gears.c delete mode 100644 programs/develop/ktcc/trunk/samples/winbasics.c delete mode 100644 programs/develop/ktcc/trunk/tcc.conf diff --git a/programs/develop/ktcc/trunk/_howto_debug_tcc.txt b/programs/develop/ktcc/trunk/_howto_debug_tcc.txt deleted file mode 100644 index 5ebccbd036..0000000000 --- a/programs/develop/ktcc/trunk/_howto_debug_tcc.txt +++ /dev/null @@ -1,27 +0,0 @@ -1. create asm listing: -compile .o only, then use objdump -kos32-tcc.exe -c -g clipview.c -o clipviewtcc.o -kos32-objdump -d -M intel -S -l clipviewtcc.o > clipviewtcc.asm - -2. see offset in resulting kolibri executable compared to listing (i have 0xD0) - -3. in kolibri debugger mtdbg set breakpoint to funtion address ->bp 140 -where 0x140 is 0x70 in assemly + offset 0xD0 - - -Warning !!Error. sometimes tcc dont warn about unsuccesful linking -(not found function body code). Hopefully, i fix this. - -Usually, at runtime you have crash with "Illegal cpu instruction" -In assembler code this is easy to recognize as -myaddr:E8 FC FF FF FF call myaddr+1 - -4.how to see defines -kos32-tcc.exe -E -dD null - -5.if you use GNU LD as a linker, add option -Map=hellocpp.map to ld. -Mtdbg can use resulting .map file - -6.now you can use -g option to generate .dbg file. This enables -source code level debugging with Mtdbg diff --git a/programs/develop/ktcc/trunk/libctest/build.bat b/programs/develop/ktcc/trunk/libctest/build.bat deleted file mode 100644 index db078a7773..0000000000 --- a/programs/develop/ktcc/trunk/libctest/build.bat +++ /dev/null @@ -1,68 +0,0 @@ -@echo off -echo #################################################### -echo # test libc builder # -echo # usage: build [clean] # -echo #################################################### -rem #### CONFIG SECTION #### -set LIBNAME=libck.a -set INCLUDE=include -set CC=D:\VSProjects\msys-kos32-4.8.2\ktcc\trunk\libc\kos32-tcc.exe -set CFLAGS=-I"%cd%\%INCLUDE%" -Wall -set AR=kos32-ar -set ASM=fasm -set dirs=. -rem #### END OF CONFIG SECTION #### - -set objs= -set target=%1 -if not "%1"=="clean" set target=all - -set INCLUDE="%cd%" -call :Target_%target% - -if ERRORLEVEL 0 goto Exit_OK - -echo Probably at runing has been created error -echo For help send a report... -pause -goto :eof - -:Compile_C - %CC% %CFLAGS% %1 -o "%~dpn1.kex" -lck - if not %errorlevel%==0 goto Error_Failed - set objs=%objs% "%~dpn1.o" -goto :eof - -:Compile_Asm - %ASM% %1 "%~dpn1.o" - if not %errorlevel%==0 goto Error_Failed - set objs=%objs% "%~dpn1.o" -goto :eof - -:Target_clean - echo cleaning ... - for %%a in (%dirs%) do del /Q "%%a\*.o" - for %%a in (%dirs%) do del /Q "%%a\*.kex" -goto :Exit_OK - -:Target_all - echo building all ... - for %%a in (%dirs%) do ( - for %%f in ("%%a\*.asm") do call :Compile_Asm "%%f" - for %%f in ("%%a\*.c") do call :Compile_C "%%f" - ) -:: %AR% -ru %LIBNAME% %objs% -:: if not %errorlevel%==0 goto Error_Failed -goto Exit_OK - -:Error_Failed -echo error: execution failed -pause -exit 1 - -:Exit_OK -echo #################################################### -echo # All operations has been done... # -echo #################################################### -pause -exit 0 \ No newline at end of file diff --git a/programs/develop/ktcc/trunk/libctest/float2.c b/programs/develop/ktcc/trunk/libctest/float2.c deleted file mode 100644 index 11e42ab0f7..0000000000 --- a/programs/develop/ktcc/trunk/libctest/float2.c +++ /dev/null @@ -1,42 +0,0 @@ -#include -#include - -main() -{ - int i; - for (i = 0; i < 10; i++) - { - printf("------------------------------------------------------\n"); - printf ( "remainder of 5.3 / 2 is %f\n", remainder (5.3,2) ); - printf ( "remainder of 18.5 / 4.2 is %f\n", remainder (18.5,4.2) ); -//remainder of 5.3 / 2 is -0.700000 -//remainder of 18.5 / 4.2 is 1.700000 - - printf ( "fmod of 5.3 / 2 is %f\n", fmod (5.3,2) ); - printf ( "fmod of 18.5 / 4.2 is %f\n", fmod (18.5,4.2) ); -// fmod of 5.3 / 2 is 1.300000 -// fmod of 18.5 / 4.2 is 1.700000 - - double param, fractpart, intpart, result; - int n; - - param = 3.14159265; - fractpart = modf (param , &intpart); - printf ("%f = %f + %f \n", param, intpart, fractpart); -//3.141593 = 3.000000 + 0.141593 - - param = 0.95; - n = 4; - result = ldexp (param , n); - printf ("%f * 2^%d = %f\n", param, n, result); -//0.950000 * 2^4 = 15.200000 - - param = 8.0; - result = frexp (param , &n); - printf ("%f = %f * 2^%d\n", param, result, n); -//8.000000 = 0.500000 * 2^4 - param = 50; - result = frexp (param , &n); - printf ("%f = %f * 2^%d\n", param, result, n); - } -} \ No newline at end of file diff --git a/programs/develop/ktcc/trunk/libctest/fscanf.c b/programs/develop/ktcc/trunk/libctest/fscanf.c deleted file mode 100644 index 4646a481a6..0000000000 --- a/programs/develop/ktcc/trunk/libctest/fscanf.c +++ /dev/null @@ -1,125 +0,0 @@ -#include -#include -#include "test.h" - -#define TEST(r, f, x, m) ( \ - errno=0, ((r) = (f)) == (x) || \ - (t_error("%s failed (" m ")\n", #f, r, x, strerror(errno)), 0) ) - -#define TEST_S(s, x, m) ( \ - !strcmp((s),(x)) || \ - (t_error("[%s] != [%s] (%s)\n", s, x, m), 0) ) - -static FILE *writetemp(const char *data) -{ - FILE *f = fopen("_tmpfile.tmp", "w+"); - if (!f) return 0; - if (!fwrite(data, strlen(data), 1, f)) { - fclose(f); - return 0; - } - rewind(f); - return f; -} - -int main(void) -{ - int i, x, y; - double u; - char a[100], b[100]; - FILE *f; - - - TEST(i, !!(f=writetemp("hello, world")), 1, "failed to make temp file"); - if (f) { - TEST(i, fscanf(f, "%s %[own]", a, b), 2, "got %d fields, expected %d"); - TEST_S(a, "hello,", "wrong result for %s"); - TEST_S(b, "wo", "wrong result for %[own]"); - TEST(i, fgetc(f), 'r', "'%c' != '%c') (%s)"); - fclose(f); - } - - TEST(i, !!(f=writetemp("ld 0x12 0x34")), 1, "failed to make temp file"); - if (f) { - TEST(i, fscanf(f, "ld %5i%2i", &x, &y), 1, "got %d fields, expected %d"); - TEST(i, x, 0x12, "%d != %d"); - TEST(i, fgetc(f), '3', "'%c' != '%c'"); - fclose(f); - } - - TEST(i, !!(f=writetemp(" 42")), 1, "failed to make temp file"); - if (f) { - x=y=-1; - TEST(i, fscanf(f, " %n%*d%n", &x, &y), 0, "%d != %d"); - TEST(i, x, 6, "%d != %d"); - TEST(i, y, 8, "%d != %d"); - TEST(i, ftell(f), 8, "%d != %d"); - TEST(i, !!feof(f), 1, "%d != %d"); - fclose(f); - } - - TEST(i, !!(f=writetemp("[abc123]....x")), 1, "failed to make temp file"); - if (f) { - x=y=-1; - TEST(i, fscanf(f, "%10[^]]%n%10[].]%n", a, &x, b, &y), 2, "%d != %d"); - TEST_S(a, "[abc123", "wrong result for %[^]]"); - TEST_S(b, "]....", "wrong result for %[].]"); - TEST(i, x, 7, "%d != %d"); - TEST(i, y, 12, "%d != %d"); - TEST(i, ftell(f), 12, "%d != %d"); - TEST(i, feof(f), 0, "%d != %d"); - TEST(i, fgetc(f), 'x', "%d != %d"); - fclose(f); - } - - TEST(i, !!(f=writetemp("0x1.0p12")), 1, "failed to make temp file"); - if (f) { - x=y=-1; - u=-1; - TEST(i, fscanf(f, "%lf%n %d", &u, &x, &y), 1, "%d != %d"); - TEST(u, u, 0.0, "%g != %g"); - TEST(i, x, 1, "%d != %d"); - TEST(i, y, -1, "%d != %d"); - TEST(i, ftell(f), 1, "%d != %d"); - TEST(i, feof(f), 0, "%d != %d"); - TEST(i, fgetc(f), 'x', "%d != %d"); - rewind(f); - TEST(i, fgetc(f), '0', "%d != %d"); - TEST(i, fgetc(f), 'x', "%d != %d"); - TEST(i, fscanf(f, "%lf%n%c %d", &u, &x, a, &y), 3, "%d != %d"); - TEST(u, u, 1.0, "%g != %g"); - TEST(i, x, 3, "%d != %d"); - TEST(i, a[0], 'p', "%d != %d"); - TEST(i, y, 12, "%d != %d"); - TEST(i, ftell(f), 8, "%d != %d"); - TEST(i, !!feof(f), 1, "%d != %d"); - fclose(f); - } - - TEST(i, !!(f=writetemp("1.0 012")), 1, "failed to make temp file"); - if (f) { - x=y=-1; - u=-1; - TEST(i, fscanf(f, "%lf%n %i", &u, &x, &y), 2, "%d != %d"); - TEST(u, u, 1.0, "%g != %g"); - TEST(i, x, 3, "%d != %d"); - TEST(i, y, 10, "%d != %d"); - TEST(i, ftell(f), 13, "%d != %d"); - TEST(i, !!feof(f), 1, "%d != %d"); - fclose(f); - } - - TEST(i, !!(f=writetemp("0xx")), 1, "failed to make temp file"); - if (f) { - x=y=-1; - TEST(i, fscanf(f, "%x%n", &x, &y), 0, "%d != %d"); - TEST(i, x, -1, "%d != %d"); - TEST(i, y, -1, "%d != %d"); - TEST(i, ftell(f), 2, "%d != %d"); - TEST(i, feof(f), 0, "%d != %d"); - fclose(f); - } - - printf("%s finished\n", __FILE__); - return t_status; -} diff --git a/programs/develop/ktcc/trunk/libctest/memmove.c b/programs/develop/ktcc/trunk/libctest/memmove.c deleted file mode 100644 index 789332d395..0000000000 --- a/programs/develop/ktcc/trunk/libctest/memmove.c +++ /dev/null @@ -1,186 +0,0 @@ -/* A minor test-program for memmove. - Copyright (C) 2005 Axis Communications. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 2. Neither the name of Axis Communications nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY AXIS COMMUNICATIONS AND ITS CONTRIBUTORS - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL AXIS - COMMUNICATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. */ - -/* Test moves of 0..MAX bytes; overlapping-src-higher, - overlapping-src-lower and non-overlapping. The overlap varies with - 1..N where N is the size moved. This means an order of MAX**2 - iterations. The size of an octet may seem appropriate for MAX and - makes an upper limit for simple testing. For the CRIS simulator, - making this 256 added 90s to the test-run (2GHz P4) while 64 (4s) was - enough to spot the bugs that had crept in, hence the number chosen. */ -#define MAX 64 - -#include -#include -#include - -#define TOO_MANY_ERRORS 11 -int errors = 0; - -#define DEBUGP \ - if (errors == TOO_MANY_ERRORS) \ - printf ("Further errors omitted\n"); \ - else if (errors < TOO_MANY_ERRORS) \ - printf - -/* A safe target-independent memmove. */ - -void -mymemmove (unsigned char *dest, unsigned char *src, size_t n) -{ - size_t i; - - if ((src <= dest && src + n <= dest) - || src >= dest) - while (n-- > 0) - *dest++ = *src++; - else - { - dest += n; - src += n; - while (n-- > 0) - *--dest = *--src; - } -} - -/* It's either the noinline attribute or forcing the test framework to - pass -fno-builtin-memmove. */ -void -xmemmove (unsigned char *dest, unsigned char *src, size_t n) - __attribute__ ((__noinline__)); - -void -xmemmove (unsigned char *dest, unsigned char *src, size_t n) -{ - void *retp; - retp = memmove (dest, src, n); - - if (retp != dest) - { - errors++; - DEBUGP ("memmove of n bytes returned %p instead of dest=%p\n", - retp, dest); - } -} - - -/* Fill the array with something we can associate with a position, but - not exactly the same as the position index. */ - -void -fill (unsigned char dest[MAX*3]) -{ - size_t i; - for (i = 0; i < MAX*3; i++) - dest[i] = (10 + i) % MAX; -} - -int -main (void) -{ - size_t i; - int errors = 0; - - /* Leave some room before and after the area tested, so we can detect - overwrites of up to N bytes, N being the amount tested. If you - want to test using valgrind, make these malloced instead. */ - unsigned char from_test[MAX*3]; - unsigned char to_test[MAX*3]; - unsigned char from_known[MAX*3]; - unsigned char to_known[MAX*3]; - - /* Non-overlap. */ - for (i = 0; i < MAX; i++) - { - /* Do the memmove first before setting the known array, so we know - it didn't change any of the known array. */ - fill (from_test); - fill (to_test); - xmemmove (to_test + MAX, 1 + from_test + MAX, i); - - fill (from_known); - fill (to_known); - mymemmove (to_known + MAX, 1 + from_known + MAX, i); - - if (memcmp (to_known, to_test, sizeof (to_known)) != 0) - { - errors++; - DEBUGP ("memmove failed non-overlap test for %d bytes\n", i); - } - } - - /* Overlap-from-before. */ - for (i = 0; i < MAX; i++) - { - size_t j; - for (j = 0; j < i; j++) - { - fill (to_test); - xmemmove (to_test + MAX * 2 - i, to_test + MAX * 2 - i - j, i); - - fill (to_known); - mymemmove (to_known + MAX * 2 - i, to_known + MAX * 2 - i - j, i); - - if (memcmp (to_known, to_test, sizeof (to_known)) != 0) - { - errors++; - DEBUGP ("memmove failed for %d bytes," - " with src %d bytes before dest\n", - i, j); - } - } - } - - /* Overlap-from-after. */ - for (i = 0; i < MAX; i++) - { - size_t j; - for (j = 0; j < i; j++) - { - fill (to_test); - xmemmove (to_test + MAX, to_test + MAX + j, i); - - fill (to_known); - mymemmove (to_known + MAX, to_known + MAX + j, i); - - if (memcmp (to_known, to_test, sizeof (to_known)) != 0) - { - errors++; - DEBUGP ("memmove failed when moving %d bytes," - " with src %d bytes after dest\n", - i, j); - } - } - } - -printf("%s finished\n", __FILE__); - - if (errors != 0) - abort (); - exit (0); -} \ No newline at end of file diff --git a/programs/develop/ktcc/trunk/libctest/myfile.txt b/programs/develop/ktcc/trunk/libctest/myfile.txt deleted file mode 100644 index 980fb7b2a5..0000000000 --- a/programs/develop/ktcc/trunk/libctest/myfile.txt +++ /dev/null @@ -1,5 +0,0 @@ -#test line 1; --test line 2; -@test line 3; -#testline4. -# \ No newline at end of file diff --git a/programs/develop/ktcc/trunk/libctest/nulprintf.c b/programs/develop/ktcc/trunk/libctest/nulprintf.c deleted file mode 100644 index d2ba76e507..0000000000 --- a/programs/develop/ktcc/trunk/libctest/nulprintf.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2014 by ARM Ltd. All rights reserved. - * - * Permission to use, copy, modify, and distribute this software - * is freely granted, provided that this notice is preserved. - */ - -#include -#include - -const char m[8] = {'M','M','M','M','M','M','M','M'}; - -int main() -{ - printf ("%.*s\n", 8, m); // must print MMMMMMMM - -printf("%s finished\n", __FILE__); - - exit (0); -} \ No newline at end of file diff --git a/programs/develop/ktcc/trunk/libctest/print.inc b/programs/develop/ktcc/trunk/libctest/print.inc deleted file mode 100644 index f07a6ed1ff..0000000000 --- a/programs/develop/ktcc/trunk/libctest/print.inc +++ /dev/null @@ -1,28 +0,0 @@ -#include -#include -//#include -//#include "test.h" - -volatile int t_status = 0; - -int t_printf(const char *s, ...) -{ - va_list ap; - char buf[512]; - int n; - - t_status = 1; - va_start(ap, s); - n = vsnprintf(buf, sizeof buf, s, ap); - va_end(ap); - if (n < 0) - n = 0; - else if (n >= sizeof buf) { - n = sizeof buf; - buf[n - 1] = '0'; - buf[n - 2] = '.'; - buf[n - 3] = '.'; - buf[n - 4] = '.'; - } - return printf("%s\n", buf); -} diff --git a/programs/develop/ktcc/trunk/libctest/qsort.c b/programs/develop/ktcc/trunk/libctest/qsort.c deleted file mode 100644 index c150c36a9a..0000000000 --- a/programs/develop/ktcc/trunk/libctest/qsort.c +++ /dev/null @@ -1,173 +0,0 @@ -//#include -#include -#include -#include -#include "test.h" - -static int scmp(const void *a, const void *b) -{ - return strcmp(*(char **)a, *(char **)b); -} - -static int icmp(const void *a, const void *b) -{ - return *(int*)a - *(int*)b; -} - -static int ccmp(const void *a, const void *b) -{ - return *(char*)a - *(char*)b; -} - -static int cmp64(const void *a, const void *b) -{ - const uint64_t *ua = a, *ub = b; - return *ua < *ub ? -1 : *ua != *ub; -} - -/* 26 items -- even */ -static const char *s[] = { - "Bob", "Alice", "John", "Ceres", - "Helga", "Drepper", "Emeralda", "Zoran", - "Momo", "Frank", "Pema", "Xavier", - "Yeva", "Gedun", "Irina", "Nono", - "Wiener", "Vincent", "Tsering", "Karnica", - "Lulu", "Quincy", "Osama", "Riley", - "Ursula", "Sam" -}; -static const char *s_sorted[] = { - "Alice", "Bob", "Ceres", "Drepper", - "Emeralda", "Frank", "Gedun", "Helga", - "Irina", "John", "Karnica", "Lulu", - "Momo", "Nono", "Osama", "Pema", - "Quincy", "Riley", "Sam", "Tsering", - "Ursula", "Vincent", "Wiener", "Xavier", - "Yeva", "Zoran" -}; - -/* 23 items -- odd, prime */ -static int n[] = { - 879045, 394, 99405644, 33434, 232323, 4334, 5454, - 343, 45545, 454, 324, 22, 34344, 233, 45345, 343, - 848405, 3434, 3434344, 3535, 93994, 2230404, 4334 -}; -static int n_sorted[] = { - 22, 233, 324, 343, 343, 394, 454, 3434, - 3535, 4334, 4334, 5454, 33434, 34344, 45345, 45545, - 93994, 232323, 848405, 879045, 2230404, 3434344, 99405644 -}; - -static void str_test(const char **a, const char **a_sorted, int len) -{ - int i; - qsort(a, len, sizeof *a, scmp); - for (i=0; i - -// TODO: use large period prng -static uint64_t seed = -1; -static uint32_t rand32(void) -{ - seed = 6364136223846793005ULL*seed + 1; - return seed >> 32; -} -static uint64_t rand64(void) -{ - uint64_t u = rand32(); - return u<<32 | rand32(); -} -static double frand() -{ - return rand64() * 0x1p-64; -} -static float frandf() -{ - return rand32() * 0x1p-32f; -} -static long double frandl() -{ - return rand64() * 0x1p-64L -#if LDBL_MANT_DIG > 64 -+ rand64() * 0x1p-128L -#endif -; -} - -void t_randseed(uint64_t s) -{ - seed = s; -} - -/* uniform random in [0,n), n > 0 must hold */ -uint64_t t_randn(uint64_t n) -{ - uint64_t r, m; - - /* m is the largest multiple of n */ - m = -1; - m -= m%n; - while ((r = rand64()) >= m); - return r%n; -} - -/* uniform on [a,b], a <= b must hold */ -uint64_t t_randint(uint64_t a, uint64_t b) -{ - uint64_t n = b - a + 1; - if (n) - return a + t_randn(n); - return rand64(); -} - -/* shuffle the elements of p and q until the elements in p are well shuffled */ -static void shuffle2(uint64_t *p, uint64_t *q, size_t np, size_t nq) -{ - size_t r; - uint64_t t; - - while (np) { - r = t_randn(nq+np--); - t = p[np]; - if (r < nq) { - p[np] = q[r]; - q[r] = t; - } else { - p[np] = p[r-nq]; - p[r-nq] = t; - } - } -} - -/* shuffle the elements of p */ -void t_shuffle(uint64_t *p, size_t n) -{ - shuffle2(p,0,n,0); -} - -void t_randrange(uint64_t *p, size_t n) -{ - size_t i; - for (i = 0; i < n; i++) - p[i] = i; - t_shuffle(p, n); -} - -/* hash table insert, 0 means empty, v > 0 must hold, len is power-of-2 */ -static int insert(uint64_t *tab, size_t len, uint64_t v) -{ - size_t i = v & (len-1); - size_t j = 1; - - while (tab[i]) { - if (tab[i] == v) - return -1; - i += j++; - i &= len-1; - } - tab[i] = v; - return 0; -} - -/* choose k unique numbers from [0,n), k <= n */ -int t_choose(uint64_t n, size_t k, uint64_t *p) -{ - uint64_t *tab; - size_t i, j, len; - - if (n < k) - return -1; - - if (n < 16) { - /* no alloc */ - while (k) - if (t_randn(n--) < k) - p[--k] = n; - return 0; - } - - if (k < 8) { - /* no alloc, n > 15 > 2*k */ - for (i = 0; i < k;) { - p[i] = t_randn(n); - for (j = 0; p[j] != p[i]; j++); - if (j == i) - i++; - } - return 0; - } - - // TODO: if k < n/k use k*log(k) solution without alloc - - if (n < 5*k && (n-k)*sizeof *tab < (size_t)-1) { - /* allocation is n-k < 4*k */ - tab = malloc((n-k) * sizeof *tab); - if (!tab) - return -1; - for (i = 0; i < k; i++) - p[i] = i; - for (; i < n; i++) - tab[i-k] = i; - if (k < n-k) - shuffle2(p, tab, k, n-k); - else - shuffle2(tab, p, n-k, k); - free(tab); - return 0; - } - - /* allocation is 2*k <= len < 4*k */ - for (len = 16; len < 2*k; len *= 2); - tab = calloc(len, sizeof *tab); - if (!tab) - return -1; - for (i = 0; i < k; i++) - while (insert(tab, len, t_randn(n)+1)); - for (i = 0; i < len; i++) - if (tab[i]) - *p++ = tab[i]-1; - free(tab); - return 0; -} - diff --git a/programs/develop/ktcc/trunk/libctest/readme.txt b/programs/develop/ktcc/trunk/libctest/readme.txt deleted file mode 100644 index f2591ad630..0000000000 --- a/programs/develop/ktcc/trunk/libctest/readme.txt +++ /dev/null @@ -1,34 +0,0 @@ -most test adapted from "musl-libctest-master" project -some taken from newlib - -Status or libc tests - ----NOT TESTED--- -no library fns realized -qsort -strtol -time - ----HANG--- -sscanf ->TEST_F(0x1234p56) - - ----STACK IS SMALL--- -strtod_long -tstring - - ---other-- -fscanf --?scanf ignores width specs, '*' and [chars], cant read %a float --%n counts as parameter - -snprintf --some format misturbances - -ungetc --ungetc fails if filepos == 0 - no tricks - -all file ops limited to 2Gb - diff --git a/programs/develop/ktcc/trunk/libctest/snprintf.c b/programs/develop/ktcc/trunk/libctest/snprintf.c deleted file mode 100644 index 49ec73d38f..0000000000 --- a/programs/develop/ktcc/trunk/libctest/snprintf.c +++ /dev/null @@ -1,188 +0,0 @@ -#ifndef _XOPEN_SOURCE -#define _XOPEN_SOURCE 700 -#endif -#include -#include -//#include -//#include -#include -#include "test.h" - -#define DISABLE_SLOW_TESTS - -#define TEST(r, f, x, m) ( \ - ((r) = (f)) == (x) || \ - (t_error("%s failed (" m ")\n", #f, r, x), 0) ) - -#define TEST_S(s, x, m) ( \ - !strcmp((s),(x)) || \ - (t_error("[%s] != [%s] (%s)\n", s, x, m), 0) ) - -static const struct { - const char *fmt; - int i; - const char *expect; -} int_tests[] = { - /* width, precision, alignment */ - { "%04d", 12, "0012" }, - { "%.3d", 12, "012" }, - { "%3d", 12, " 12" }, - { "%-3d", 12, "12 " }, - { "%+3d", 12, "+12" }, - { "%+-5d", 12, "+12 " }, - { "%+- 5d", 12, "+12 " }, - { "%- 5d", 12, " 12 " }, - { "% d", 12, " 12" }, - { "%0-5d", 12, "12 " }, - { "%-05d", 12, "12 " }, - - /* ...explicit precision of 0 shall be no characters. */ - { "%.0d", 0, "" }, - { "%.0o", 0, "" }, - { "%#.0d", 0, "" }, - { "%#.0o", 0, "" }, - { "%#.0x", 0, "" }, - - /* ...but it still has to honor width and flags. */ - { "%2.0u", 0, " " }, - { "%02.0u", 0, " " }, - { "%2.0d", 0, " " }, - { "%02.0d", 0, " " }, - { "% .0d", 0, " " }, - { "%+.0d", 0, "+" }, - - /* hex: test alt form and case */ - { "%x", 63, "3f" }, - { "%#x", 63, "0x3f" }, - { "%X", 63, "3F" }, - - /* octal: test alt form */ - { "%o", 15, "17" }, - { "%#o", 15, "017" }, - - { NULL, 0.0, NULL } -}; - -static const struct { - const char *fmt; - double f; - const char *expect; -} fp_tests[] = { - /* basic form, handling of exponent/precision for 0 */ - { "%a", 0.0, "0x0p+0" }, - { "%e", 0.0, "0.000000e+00" }, - { "%f", 0.0, "0.000000" }, - { "%g", 0.0, "0" }, - { "%#g", 0.0, "0.00000" }, - { "%la", 0.0, "0x0p+0" }, - { "%le", 0.0, "0.000000e+00" }, - { "%lf", 0.0, "0.000000" }, - { "%lg", 0.0, "0" }, - { "%#lg", 0.0, "0.00000" }, - - /* rounding */ - { "%f", 1.1, "1.100000" }, - { "%f", 1.2, "1.200000" }, - { "%f", 1.3, "1.300000" }, - { "%f", 1.4, "1.400000" }, - { "%f", 1.5, "1.500000" }, - { "%.4f", 1.06125, "1.0613" }, /* input is not representible exactly as double */ - { "%.4f", 1.03125, "1.0312" }, /* 0x1.08p0 */ - { "%.2f", 1.375, "1.38" }, - { "%.1f", 1.375, "1.4" }, - { "%.1lf", 1.375, "1.4" }, - { "%.15f", 1.1, "1.100000000000000" }, - { "%.16f", 1.1, "1.1000000000000001" }, - { "%.17f", 1.1, "1.10000000000000009" }, - { "%.2e", 1500001.0, "1.50e+06" }, - { "%.2e", 1505000.0, "1.50e+06" }, - { "%.2e", 1505000.00000095367431640625, "1.51e+06" }, - { "%.2e", 1505001.0, "1.51e+06" }, - { "%.2e", 1506000.0, "1.51e+06" }, - - /* correctness in DBL_DIG places */ - { "%.15g", 1.23456789012345, "1.23456789012345" }, - - /* correct choice of notation for %g */ - { "%g", 0.0001, "0.0001" }, - { "%g", 0.00001, "1e-05" }, - { "%g", 123456, "123456" }, - { "%g", 1234567, "1.23457e+06" }, - { "%.7g", 1234567, "1234567" }, - { "%.7g", 12345678, "1.234568e+07" }, - { "%.8g", 0.1, "0.1" }, - { "%.9g", 0.1, "0.1" }, - { "%.10g", 0.1, "0.1" }, - { "%.11g", 0.1, "0.1" }, - - /* pi in double precision, printed to a few extra places */ - { "%.15f", M_PI, "3.141592653589793" }, - { "%.18f", M_PI, "3.141592653589793116" }, - - /* exact conversion of large integers */ - { "%.0f", 340282366920938463463374607431768211456.0, - "340282366920938463463374607431768211456" }, - - { NULL, 0.0, NULL } -}; - -int main(void) -{ - int i, j, k; - char b[2000]; - - TEST(i, snprintf(0, 0, "%d", 123456), 6, "length returned %d != %d"); - TEST(i, snprintf(0, 0, "%.4s", "hello"), 4, "length returned %d != %d"); - TEST(i, snprintf(b, 0, "%.0s", "goodbye"), 0, "length returned %d != %d"); - - strcpy(b, "xxxxxxxx"); - TEST(i, snprintf(b, 4, "%d", 123456), 6, "length returned %d != %d"); - TEST_S(b, "123", "incorrect output"); - TEST(i, b[5], 'x', "buffer overrun"); - - /* Perform ascii arithmetic to test printing tiny doubles */ - TEST(i, snprintf(b, sizeof b, "%.1022f", 0x1p-1021), 1024, "%d != %d"); - b[1] = '0'; - for (i=0; i<1021; i++) { - for (k=0, j=1023; j>0; j--) { - if (b[j]<'5') b[j]+=b[j]-'0'+k, k=0; - else b[j]+=b[j]-'0'-10+k, k=1; - } - } - TEST(i, b[1], '1', "'%c' != '%c'"); - for (j=2; b[j]=='0'; j++); - TEST(i, j, 1024, "%d != %d"); - - -#ifndef DISABLE_SLOW_TESTS - errno = 0; - TEST(i, snprintf(NULL, 0, "%.*u", 2147483647, 0), 2147483647, "cannot print max length %d"); - TEST(i, snprintf(NULL, 0, "%.*u ", 2147483647, 0), -1, "integer overflow %d"); - TEST(i, errno, EOVERFLOW, "after overflow: %d != %d"); -#endif - for (j=0; int_tests[j].fmt; j++) { - i = snprintf(b, sizeof b, int_tests[j].fmt, int_tests[j].i); - if (i != strlen(int_tests[j].expect)) { - t_error("snprintf(b, sizeof b, \"%s\", %d) returned %d wanted %d\n", - int_tests[j].fmt, int_tests[j].i, i, strlen(int_tests[j].expect)); - } - if (strcmp(b, int_tests[j].expect) != 0) - t_error("bad integer conversion fmt[%s]: got \"%s\", want \"%s\"\n", int_tests[j].fmt, b, int_tests[j].expect); - } - - for (j=0; fp_tests[j].fmt; j++) { - i = snprintf(b, sizeof b, fp_tests[j].fmt, fp_tests[j].f); - if (i != strlen(fp_tests[j].expect)) { - t_error("snprintf(b, sizeof b, \"%s\", %f) returned %d wanted %d\n", - fp_tests[j].fmt, fp_tests[j].f, i, strlen(fp_tests[j].expect)); - } - if (strcmp(b, fp_tests[j].expect) != 0) - t_error("bad floating-point conversion: got \"%s\", want \"%s\"\n", b, fp_tests[j].expect); - } - - TEST(i, snprintf(0, 0, "%.4a", 1.0), 11, "%d != %d"); - - printf("%s finished\n", __FILE__); - - return t_status; -} diff --git a/programs/develop/ktcc/trunk/libctest/sscanf.c b/programs/develop/ktcc/trunk/libctest/sscanf.c deleted file mode 100644 index c748bd753e..0000000000 --- a/programs/develop/ktcc/trunk/libctest/sscanf.c +++ /dev/null @@ -1,89 +0,0 @@ -#include -#include -#include -//#include -#include "test.h" - -#define TEST(r, f, x, m) ( \ - ((r) = (f)) == (x) || \ - (t_error("%s failed (" m ")\n", #f, r, x), 0) ) - -#define TEST_S(s, x, m) ( \ - !strcmp((s),(x)) || \ - (t_error("[%s] != [%s] (%s)\n", s, x, m), 0) ) - -#define TEST_F(x) ( \ - TEST(i, sscanf(# x, "%lf", &d), 1, "got %d fields, expected %d"), \ - TEST(t, d, (double)x, "%g != %g") ) - -int main(void) -{ - int i; - char a[100], b[100]; - int x, y, z, u, v; - double d, t; -/* - TEST(i, sscanf("hello, world\n", "%s %s", a, b), 2, "only %d fields, expected %d"); - TEST_S(a, "hello,", ""); - TEST_S(b, "world", ""); - - TEST(i, sscanf("hello, world\n", "%[hel]%s", a, b), 2, "only %d fields, expected %d"); - TEST_S(a, "hell", ""); - TEST_S(b, "o,", ""); - - TEST(i, sscanf("hello, world\n", "%[hel] %s", a, b), 2, "only %d fields, expected %d"); - TEST_S(a, "hell", ""); - TEST_S(b, "o,", ""); - - a[8] = 'X'; - a[9] = 0; - TEST(i, sscanf("hello, world\n", "%8c%8c", a, b), 1, "%d fields, expected %d"); - TEST_S(a, "hello, wX", ""); -*/ - TEST(i, sscanf("56789 0123 56a72", "%2d%d%*d %[0123456789]\n", &x, &y, a), 3, "only %d fields, expected %d"); - TEST(i, x, 56, "%d != %d"); - TEST(i, y, 789, "%d != %d"); - TEST_S(a, "56", ""); - - TEST(i, sscanf("011 0x100 11 0x100 100", "%i %i %o %x %x\n", &x, &y, &z, &u, &v), 5, "only %d fields, expected %d"); - TEST(i, x, 9, "%d != %d"); - TEST(i, y, 256, "%d != %d"); - TEST(i, z, 9, "%d != %d"); - TEST(i, u, 256, "%d != %d"); - TEST(i, v, 256, "%d != %d"); - - TEST(i, sscanf("20 xyz", "%d %d\n", &x, &y), 1, "only %d fields, expected %d"); - TEST(i, x, 20, "%d != %d"); - - TEST(i, sscanf("xyz", "%d %d\n", &x, &y), 0, "got %d fields, expected no match (%d)"); - - TEST(i, sscanf("", "%d %d\n", &x, &y), -1, "got %d fields, expected input failure (%d)"); - - TEST(i, sscanf(" 12345 6", "%2d%d%d", &x, &y, &z), 3, "only %d fields, expected %d"); - TEST(i, x, 12, "%d != %d"); - TEST(i, y, 345, "%d != %d"); - TEST(i, z, 6, "%d != %d"); - - TEST(i, sscanf(" 0x12 0x34", "%5i%2i", &x, &y), 1, "got %d fields, expected %d"); - TEST(i, x, 0x12, "%d != %d"); - - TEST_F(123); - TEST_F(123.0); - TEST_F(123.0e+0); - TEST_F(123.0e+4); - TEST_F(1.234e1234); - TEST_F(1.234e-1234); - TEST_F(1.234e56789); - TEST_F(1.234e-56789); - TEST_F(-0.5); - TEST_F(0.1); - TEST_F(0.2); - TEST_F(0.1e-10); -// TEST_F(0x1234p56); hangs on - - TEST(i, sscanf("10e", "%lf", &d), 0, "got %d fields, expected no match (%d)"); - TEST(i, sscanf("", "%lf\n", &d), -1, "got %d fields, expected input failure (%d)"); - - printf("%s finished\n", __FILE__); - return t_status; -} diff --git a/programs/develop/ktcc/trunk/libctest/string.c b/programs/develop/ktcc/trunk/libctest/string.c deleted file mode 100644 index 22b469a7a2..0000000000 --- a/programs/develop/ktcc/trunk/libctest/string.c +++ /dev/null @@ -1,147 +0,0 @@ -#define _BSD_SOURCE -#include -#include -#include -#include "test.h" - -#ifndef min -#define min(a,b) ((a 0 && nsrc >= size) - dst[size - 1] = '\0'; - - return nsrc; -} - -size_t strlcat(char *dst, const char *src, size_t size) -{ - int ndest = strlen(dst); - int nsrc = strlen(src); - if (size > ndest + 1) - { - strncat(dst, src, size - ndest - 1); - if (size > 0 && nsrc + ndest >= size) - dst[size - 1] = '\0'; - } - - return nsrc + ndest; -} - - - -/* r = place to store result - * f = function call to test (or any expression) - * x = expected result - * m = message to print on failure (with formats for r & x) -**/ - -#define TEST(r, f, x, m) ( \ - ((r) = (f)) == (x) || \ - (t_error("%s failed (" m ")\n", #f, r, x), 0) ) - -#define TEST_S(s, x, m) ( \ - !strcmp((s),(x)) || \ - (t_error("[%s] != [%s] (%s)\n", s, x, m), 0) ) - -int main(void) -{ - char b[32]; - char *s; - int i; - - b[16]='a'; b[17]='b'; b[18]='c'; b[19]=0; - TEST(s, strcpy(b, b+16), b, "wrong return %p != %p"); - TEST_S(s, "abc", "strcpy gave incorrect string"); - TEST(s, strcpy(b+1, b+16), b+1, "wrong return %p != %p"); - TEST_S(s, "abc", "strcpy gave incorrect string"); - TEST(s, strcpy(b+2, b+16), b+2, "wrong return %p != %p"); - TEST_S(s, "abc", "strcpy gave incorrect string"); - TEST(s, strcpy(b+3, b+16), b+3, "wrong return %p != %p"); - TEST_S(s, "abc", "strcpy gave incorrect string"); - - TEST(s, strcpy(b+1, b+17), b+1, "wrong return %p != %p"); - TEST_S(s, "bc", "strcpy gave incorrect string"); - TEST(s, strcpy(b+2, b+18), b+2, "wrong return %p != %p"); - TEST_S(s, "c", "strcpy gave incorrect string"); - TEST(s, strcpy(b+3, b+19), b+3, "wrong return %p != %p"); - TEST_S(s, "", "strcpy gave incorrect string"); - - TEST(s, memset(b, 'x', sizeof b), b, "wrong return %p != %p"); - TEST(s, strncpy(b, "abc", sizeof b - 1), b, "wrong return %p != %p"); - TEST(i, memcmp(b, "abc\0\0\0\0", 8), 0, "strncpy fails to zero-pad dest"); - TEST(i, b[sizeof b - 1], 'x', "strncpy overruns buffer when n > strlen(src)"); - - b[3] = 'x'; b[4] = 0; - strncpy(b, "abc", 3); - TEST(i, b[2], 'c', "strncpy fails to copy last byte: %hhu != %hhu"); - TEST(i, b[3], 'x', "strncpy overruns buffer to null-terminate: %hhu != %hhu"); - - TEST(i, !strncmp("abcd", "abce", 3), 1, "strncmp compares past n"); - TEST(i, !!strncmp("abc", "abd", 3), 1, "strncmp fails to compare n-1st byte"); - - strcpy(b, "abc"); - TEST(s, strncat(b, "123456", 3), b, "%p != %p"); - TEST(i, b[6], 0, "strncat failed to null-terminate (%d)"); - TEST_S(s, "abc123", "strncat gave incorrect string"); - - strcpy(b, "aaababccdd0001122223"); - TEST(s, strchr(b, 'b'), b+3, "%p != %p"); - TEST(s, strrchr(b, 'b'), b+5, "%p != %p"); - TEST(i, strspn(b, "abcd"), 10, "%d != %d"); - TEST(i, strcspn(b, "0123"), 10, "%d != %d"); - TEST(s, strpbrk(b, "0123"), b+10, "%d != %d"); - - strcpy(b, "abc 123; xyz; foo"); - TEST(s, strtok(b, " "), b, "%p != %p"); - TEST_S(s, "abc", "strtok result"); - - TEST(s, strtok(NULL, ";"), b+4, "%p != %p"); - TEST_S(s, " 123", "strtok result"); - - TEST(s, strtok(NULL, " ;"), b+11, "%p != %p"); - TEST_S(s, "xyz", "strtok result"); - - TEST(s, strtok(NULL, " ;"), b+16, "%p != %p"); - TEST_S(s, "foo", "strtok result"); - - memset(b, 'x', sizeof b); - TEST(i, strlcpy(b, "abc", sizeof b - 1), 3, "length %d != %d"); - TEST(i, b[3], 0, "strlcpy did not null-terminate short string (%d)"); - TEST(i, b[4], 'x', "strlcpy wrote extra bytes (%d)"); - - memset(b, 'x', sizeof b); - TEST(i, strlcpy(b, "abc", 2), 3, "length %d != %d"); - TEST(i, b[0], 'a', "strlcpy did not copy character %d"); - TEST(i, b[1], 0, "strlcpy did not null-terminate long string (%d)"); - - memset(b, 'x', sizeof b); - TEST(i, strlcpy(b, "abc", 3), 3, "length %d != %d"); - TEST(i, b[2], 0, "strlcpy did not null-terminate l-length string (%d)"); - - TEST(i, strlcpy(NULL, "abc", 0), 3, "length %d != %d"); - - memcpy(b, "abc\0\0\0x\0", 8); - TEST(i, strlcat(b, "123", sizeof b), 6, "length %d != %d"); - TEST_S(b, "abc123", "strlcat result"); - - memcpy(b, "abc\0\0\0x\0", 8); - TEST(i, strlcat(b, "123", 6), 6, "length %d != %d"); - TEST_S(b, "abc12", "strlcat result"); - TEST(i, b[6], 'x', "strlcat wrote past string %d != %d"); - - memcpy(b, "abc\0\0\0x\0", 8); - TEST(i, strlcat(b, "123", 4), 6, "length %d != %d"); - TEST_S(b, "abc", "strlcat result"); - - memcpy(b, "abc\0\0\0x\0", 8); - TEST(i, strlcat(b, "123", 3), 6, "length %d != %d"); - TEST_S(b, "abc", "strlcat result"); - - printf("%s finished\n", __FILE__); - return t_status; -} diff --git a/programs/develop/ktcc/trunk/libctest/string_memcpy.c b/programs/develop/ktcc/trunk/libctest/string_memcpy.c deleted file mode 100644 index 6500f7a1a7..0000000000 --- a/programs/develop/ktcc/trunk/libctest/string_memcpy.c +++ /dev/null @@ -1,56 +0,0 @@ -#include -#include -//#include -#include "test.h" - -static char buf[512]; - -static void *(*volatile pmemcpy)(void *restrict, const void *restrict2, size_t); - -static void *aligned(void *p) { - return (void*)(((uintptr_t)p + 63) & -64U); -} - -#define N 80 -static void test_align(int dalign, int salign, int len) -{ - char *src = aligned(buf); - char *dst = aligned(buf + 128); - char *want = aligned(buf + 256); - char *p; - int i; - - if (salign + len > N || dalign + len > N) - abort(); - for (i = 0; i < N; i++) { - src[i] = '#'; - dst[i] = want[i] = ' '; - } - for (i = 0; i < len; i++) - src[salign+i] = want[dalign+i] = '0'+i; - p = pmemcpy(dst+dalign, src+salign, len); - if (p != dst+dalign) - t_error("memcpy(%p,...) returned %p\n", dst+dalign, p); - for (i = 0; i < N; i++) - if (dst[i] != want[i]) { - t_error("memcpy(align %d, align %d, %d) failed\n", dalign, salign, len); - t_printf("got : %.*s\n", dalign+len+1, dst); - t_printf("want: %.*s\n", dalign+len+1, want); - break; - } -} - -int main(void) -{ - int i,j,k; - - pmemcpy = memcpy; - - for (i = 0; i < 16; i++) - for (j = 0; j < 16; j++) - for (k = 0; k < 64; k++) - test_align(i,j,k); - - printf("%s finished\n", __FILE__); - return t_status; -} diff --git a/programs/develop/ktcc/trunk/libctest/string_memset.c b/programs/develop/ktcc/trunk/libctest/string_memset.c deleted file mode 100644 index e2c93f1399..0000000000 --- a/programs/develop/ktcc/trunk/libctest/string_memset.c +++ /dev/null @@ -1,71 +0,0 @@ -#include -#include -//#include -#include "test.h" - -static char buf[512]; - -static void *(*volatile pmemset)(void *, int, size_t); - -static void *aligned(void *p) -{ - return (void*)(((uintptr_t)p + 63) & -64U); -} - -#define N 80 -static void test_align(int align, int len) -{ - char *s = aligned(buf); - char *want = aligned(buf + 256); - char *p; - int i; - - if (align + len > N) - abort(); - for (i = 0; i < N; i++) - s[i] = want[i] = ' '; - for (i = 0; i < len; i++) - want[align+i] = '#'; - p = pmemset(s+align, '#', len); - if (p != s+align) - t_error("memset(%p,...) returned %p\n", s+align, p); - for (i = 0; i < N; i++) - if (s[i] != want[i]) { - t_error("memset(align %d, '#', %d) failed\n", align, len); - t_printf("got : %.*s\n", align+len+1, s); - t_printf("want: %.*s\n", align+len+1, want); - break; - } -} - -static void test_value(int c) -{ - int i; - - pmemset(buf, c, 10); - for (i = 0; i < 10; i++) - if ((unsigned char)buf[i] != (unsigned char)c) { - t_error("memset(%d) failed: got %d\n", c, buf[i]); - break; - } -} - -int main(void) -{ - int i,j,k; - - pmemset = memset; - - for (i = 0; i < 16; i++) - for (j = 0; j < 64; j++) - test_align(i,j); - - test_value('c'); - test_value(0); - test_value(-1); - test_value(-5); - test_value(0xab); - - printf("%s finished\n", __FILE__); - return t_status; -} diff --git a/programs/develop/ktcc/trunk/libctest/string_strchr.c b/programs/develop/ktcc/trunk/libctest/string_strchr.c deleted file mode 100644 index b687a162fe..0000000000 --- a/programs/develop/ktcc/trunk/libctest/string_strchr.c +++ /dev/null @@ -1,60 +0,0 @@ -#include -#include -#include "test.h" - -#define N(s, c) { \ - char *p = s; \ - char *q = strchr(p, c); \ - if (q) \ - t_error("strchr(%s,%s) returned str+%d, wanted 0\n", #s, #c, q-p); \ -} - -#define T(s, c, n) { \ - char *p = s; \ - char *q = strchr(p, c); \ - if (q == 0) \ - t_error("strchr(%s,%s) returned 0, wanted str+%d\n", #s, #c, n); \ - else if (q - p != n) \ - t_error("strchr(%s,%s) returned str+%d, wanted str+%d\n", #s, #c, q-p, n); \ -} - -int main(void) -{ - int i; - char a[128]; - char s[256]; - - for (i = 0; i < 128; i++) - a[i] = (i+1) & 127; - for (i = 0; i < 256; i++) - *((unsigned char*)s+i) = i+1; - - N("", 'a') - N("a", 'b') - N("abc abc", 'x') - N(a, 128) - N(a, 255) - - T("", 0, 0) - T("a", 'a', 0) - T("a", 'a'+256, 0) - T("a", 0, 1) - T("ab", 'b', 1) - T("aab", 'b', 2) - T("aaab", 'b', 3) - T("aaaab", 'b', 4) - T("aaaaab", 'b', 5) - T("aaaaaab", 'b', 6) - T("abc abc", 'c', 2) - T(s, 1, 0) - T(s, 2, 1) - T(s, 10, 9) - T(s, 11, 10) - T(s, 127, 126) - T(s, 128, 127) - T(s, 255, 254) - T(s, 0, 255) - - printf("%s finished\n", __FILE__); - return t_status; -} diff --git a/programs/develop/ktcc/trunk/libctest/string_strcspn.c b/programs/develop/ktcc/trunk/libctest/string_strcspn.c deleted file mode 100644 index ea207a4962..0000000000 --- a/programs/develop/ktcc/trunk/libctest/string_strcspn.c +++ /dev/null @@ -1,36 +0,0 @@ -#include -#include -#include -#include "test.h" - -#define T(s, c, n) { \ - char *p = s; \ - char *q = c; \ - size_t r = strcspn(p, q); \ - if (r != n) \ - t_error("strcspn(%s,%s) returned %lu, wanted %lu\n", #s, #c, (unsigned long)r, (unsigned long)(n)); \ -} - -int main(void) -{ - int i; - char a[128]; - char s[256]; - - for (i = 0; i < 128; i++) - a[i] = (i+1) & 127; - for (i = 0; i < 256; i++) - *((unsigned char*)s+i) = i+1; - - T("", "", 0) - T("a", "", 1) - T("", "a", 0) - T("abc", "cde", 2) - T("abc", "ccc", 2) - T("abc", a, 0) - T("\xff\x80 abc", a, 2) - T(s, "\xff", 254) - - printf("%s finished\n", __FILE__); - return t_status; -} diff --git a/programs/develop/ktcc/trunk/libctest/string_strstr.c b/programs/develop/ktcc/trunk/libctest/string_strstr.c deleted file mode 100644 index a497f77871..0000000000 --- a/programs/develop/ktcc/trunk/libctest/string_strstr.c +++ /dev/null @@ -1,57 +0,0 @@ -#include -#include -#include "test.h" - -#define N(s, sub) { \ - char *p = s; \ - char *q = strstr(p, sub); \ - if (q) \ - t_error("strstr(%s,%s) returned str+%d, wanted 0\n", #s, #sub, q-p); \ -} - -#define T(s, sub, n) { \ - char *p = s; \ - char *q = strstr(p, sub); \ - if (q == 0) \ - t_error("strstr(%s,%s) returned 0, wanted str+%d\n", #s, #sub, n); \ - else if (q - p != n) \ - t_error("strstr(%s,%s) returned str+%d, wanted str+%d\n", #s, #sub, q-p, n); \ -} - -int main(void) -{ - N("", "a") - N("a", "aa") - N("a", "b") - N("aa", "ab") - N("aa", "aaa") - N("abba", "aba") - N("abc abc", "abcd") - N("0-1-2-3-4-5-6-7-8-9", "-3-4-56-7-8-") - N("0-1-2-3-4-5-6-7-8-9", "-3-4-5+6-7-8-") - N("_ _ _\xff_ _ _", "_\x7f_") - N("_ _ _\x7f_ _ _", "_\xff_") - - T("", "", 0) - T("abcd", "", 0) - T("abcd", "a", 0) - T("abcd", "b", 1) - T("abcd", "c", 2) - T("abcd", "d", 3) - T("abcd", "ab", 0) - T("abcd", "bc", 1) - T("abcd", "cd", 2) - T("ababa", "baba", 1) - T("ababab", "babab", 1) - T("abababa", "bababa", 1) - T("abababab", "bababab", 1) - T("ababababa", "babababa", 1) - T("nanabanabanana", "aba", 3) - T("nanabanabanana", "ban", 4) - T("nanabanabanana", "anab", 1) - T("nanabanabanana", "banana", 8) - T("_ _\xff_ _", "_\xff_", 2) - - printf("%s finished\n", __FILE__); - return t_status; -} diff --git a/programs/develop/ktcc/trunk/libctest/strtod.c b/programs/develop/ktcc/trunk/libctest/strtod.c deleted file mode 100644 index 43a30724ee..0000000000 --- a/programs/develop/ktcc/trunk/libctest/strtod.c +++ /dev/null @@ -1,77 +0,0 @@ -#include -#include -#include -#include "test.h" - -#define length(x) (sizeof(x) / sizeof *(x)) - -static struct { - char *s; - double f; -} t[] = { - {"0", 0.0}, - {"00.00", 0.0}, - {"-.00000", -0.0}, - {"1e+1000000", INFINITY}, - {"1e-1000000", 0}, - // 2^-1074 * 0.5 - eps - {".2470328229206232720882843964341106861825299013071623822127928412503377536351043e-323", 0}, - // 2^-1074 * 0.5 + eps - {".2470328229206232720882843964341106861825299013071623822127928412503377536351044e-323", 0x1p-1074}, - // 2^-1074 * 1.5 - eps - {".7410984687618698162648531893023320585475897039214871466383785237510132609053131e-323", 0x1p-1074}, - // 2^-1074 * 1.5 + eps - {".7410984687618698162648531893023320585475897039214871466383785237510132609053132e-323", 0x1p-1073}, - // 2^-1022 + 2^-1075 - eps - {".2225073858507201630123055637955676152503612414573018013083228724049586647606759e-307", 0x1p-1022}, - // 2^-1022 + 2^-1075 + eps - {".2225073858507201630123055637955676152503612414573018013083228724049586647606760e-307", 0x1.0000000000001p-1022}, - // 2^1024 - 2^970 - eps - {"17976931348623158079372897140530341507993413271003782693617377898044" - "49682927647509466490179775872070963302864166928879109465555478519404" - "02630657488671505820681908902000708383676273854845817711531764475730" - "27006985557136695962284291481986083493647529271907416844436551070434" - "2711559699508093042880177904174497791.999999999999999999999999999999", 0x1.fffffffffffffp1023}, - // 2^1024 - 2^970 - {"17976931348623158079372897140530341507993413271003782693617377898044" - "49682927647509466490179775872070963302864166928879109465555478519404" - "02630657488671505820681908902000708383676273854845817711531764475730" - "27006985557136695962284291481986083493647529271907416844436551070434" - "2711559699508093042880177904174497792", INFINITY}, - // some random numbers - {".5961860348131807091861002266453941950428e00", 0.59618603481318067}, // 0x1.313f4bc3b584cp-1 - {"1.815013169218038729887460898733526957442e-1", 0.18150131692180388}, // 0x1.73b6f662e1712p-3 - {"42.07082357534453600681618685682257590772e-2", 0.42070823575344535}, // 0x1.aece23c6e028dp-2 - {"665.4686306516261456328973225579833470816e-3", 0.66546863065162609}, // 0x1.54b84dea53453p-1 - {"6101.852922970868621786690495485449831753e-4", 0.61018529229708685}, // 0x1.386a34e5d516bp-1 - {"76966.95208236968077849464348875471158549e-5", 0.76966952082369677}, // 0x1.8a121f9954dfap-1 - {"250506.5322228682496132604807222923702304e-6", 0.25050653222286823}, // 0x1.0084c8cd538c2p-2 - {"2740037.230228005325852424697698331177377e-7", 0.27400372302280052}, // 0x1.18946e9575ef4p-2 - {"20723093.50049742645941529268715428324490e-8", 0.20723093500497428}, // 0x1.a868b14486e4dp-3 - {"0.7900280238081604956226011047460238748912e1", 7.9002802380816046}, // 0x1.f99e3100f2eaep+2 - {"0.9822860653737296848190558448760465863597e2", 98.228606537372968}, // 0x1.88ea17d506accp+6 - {"0.7468949723190370809405570560160405324869e3", 746.89497231903704}, // 0x1.75728e73f48b7p+9 - {"0.1630268320282728475980459844271031751665e4", 1630.2683202827284}, // 0x1.97912c28d5cbp+10 - {"0.4637168629719170695109918769645492022088e5", 46371.686297191707}, // 0x1.6a475f6258737p+15 - {"0.6537805944497711554209461686415872067523e6", 653780.59444977110}, // 0x1.3f3a9305bb86cp+19 - {"0.2346324356502437045212230713960457676531e6", 234632.43565024371}, // 0x1.ca4437c3631eap+17 - {"0.9709481716420048341897258980454298205278e8", 97094817.164200485}, // 0x1.7263284a8242cp+26 - {"0.4996908522051874110779982354932499499602e9", 499690852.20518744}, // 0x1.dc8ad6434872ap+28 -}; - -int main(void) -{ - int i; - double x; - char *p; - - for (i = 0; i < length(t); i++) { - x = strtod(t[i].s, &p); - if (x != t[i].f) - t_error("strtod(\"%s\") want %a got %a\n", t[i].s, t[i].f, x); - } - - printf("%s finished\n", __FILE__); - return t_status; -} - diff --git a/programs/develop/ktcc/trunk/libctest/strtod_long.c b/programs/develop/ktcc/trunk/libctest/strtod_long.c deleted file mode 100644 index c13abe6f2a..0000000000 --- a/programs/develop/ktcc/trunk/libctest/strtod_long.c +++ /dev/null @@ -1,21 +0,0 @@ -#include -#include -#include -#include "test.h" - -int main(void) -{ - double x, want = .1111111111111111111111; - char buf[40000]; - - memset(buf, '1', sizeof buf); - buf[0] = '.'; - buf[sizeof buf - 1] = 0; - - if ((x=strtod(buf, 0)) != want) - t_error("strtod(.11[...]1) got %.18f want %.18f\n", x, want); - - printf("%s finished\n", __FILE__); - return t_status; -} - diff --git a/programs/develop/ktcc/trunk/libctest/strtod_simple.c b/programs/develop/ktcc/trunk/libctest/strtod_simple.c deleted file mode 100644 index 851a5218bd..0000000000 --- a/programs/develop/ktcc/trunk/libctest/strtod_simple.c +++ /dev/null @@ -1,34 +0,0 @@ -#include -#include -#include -#include "test.h" - -/* r = place to store result - * f = function call to test (or any expression) - * x = expected result - * m = message to print on failure (with formats for r & x) - */ - -#define TEST(r, f, x, m) ( \ - ((r) = (f)) == (x) || \ - (t_error("%s failed (" m ")\n", #f, r, x, r-x), 0) ) - -int main(void) -{ - int i; - double d, d2; - char buf[1000]; - - for (i=0; i<100; i++) { - d = sin(i); - snprintf(buf, sizeof buf, "%.300f", d); - TEST(d2, strtod(buf, 0), d, "round trip fail %a != %a (%a)"); - } - - TEST(d, strtod("0x1p4", 0), 16.0, "hex float %a != %a"); - TEST(d, strtod("0x1.1p4", 0), 17.0, "hex float %a != %a"); - - printf("%s finished\n", __FILE__); - return t_status; -} - diff --git a/programs/develop/ktcc/trunk/libctest/strtof.c b/programs/develop/ktcc/trunk/libctest/strtof.c deleted file mode 100644 index 4b01477b85..0000000000 --- a/programs/develop/ktcc/trunk/libctest/strtof.c +++ /dev/null @@ -1,44 +0,0 @@ -#include -#include -#include -#include "test.h" - -#define length(x) (sizeof(x) / sizeof *(x)) - -static struct { - char *s; - float f; -} t[] = { - // 2^-149 * 0.5 - eps - {".7006492321624085354618647916449580656401309709382578858785341419448955413429303e-45", 0}, - // 2^-149 * 0.5 + eps - {".7006492321624085354618647916449580656401309709382578858785341419448955413429304e-45", 0x1p-149}, - // 2^-149 * 0.5 - eps - {".2101947696487225606385594374934874196920392912814773657635602425834686624028790e-44", 0x1p-149}, - // 2^-149 * 0.5 + eps - {".2101947696487225606385594374934874196920392912814773657635602425834686624028791e-44", 0x1p-148}, - // 2^-126 + 2^-150 - eps - {".1175494420887210724209590083408724842314472120785184615334540294131831453944281e-37", 0x1p-126}, - // 2^-126 + 2^-150 + eps - {".1175494420887210724209590083408724842314472120785184615334540294131831453944282e-37", 0x1.000002p-126}, - // 2^128 - 2^103 - eps - {"340282356779733661637539395458142568447.9999999999999999999", 0x1.fffffep127}, - // 2^128 - 2^103 - {"340282356779733661637539395458142568448", INFINITY}, -}; - -int main(void) -{ - int i; - float x; - char *p; - - for (i = 0; i < length(t); i++) { - x = strtof(t[i].s, &p); - if (x != t[i].f) - t_error("strtof(\"%s\") want %a got %a\n", t[i].s, t[i].f, x); - } - - printf("%s finished\n", __FILE__); - return t_status; -} diff --git a/programs/develop/ktcc/trunk/libctest/strtol.c b/programs/develop/ktcc/trunk/libctest/strtol.c deleted file mode 100644 index f4d8089863..0000000000 --- a/programs/develop/ktcc/trunk/libctest/strtol.c +++ /dev/null @@ -1,80 +0,0 @@ -#include -#include -#include -//#include -#include "test.h" - -/* r = place to store result - * f = function call to test (or any expression) - * x = expected result - * m = message to print on failure (with formats for r & x) -**/ - -#define TEST(r, f, x, m) ( \ - errno = 0, msg = #f, ((r) = (f)) == (x) || \ - (t_error("%s failed (" m ")\n", #f, r, x), 0) ) - -#define TEST2(r, f, x, m) ( \ - ((r) = (f)) == (x) || \ - (t_error("%s failed (" m ")\n", msg, r, x), 0) ) - -int main(void) -{ - int i; - long l; - unsigned long ul; - char *msg=""; - char *s, *c; - - TEST(l, atol("2147483647"), 2147483647L, "max 32bit signed %ld != %ld"); - TEST(l, strtol("2147483647", 0, 0), 2147483647L, "max 32bit signed %ld != %ld"); - TEST(ul, strtoul("4294967295", 0, 0), 4294967295UL, "max 32bit unsigned %lu != %lu"); - - if (sizeof(long) == 4) { - TEST(l, strtol(s="2147483648", &c, 0), 2147483647L, "uncaught overflow %ld != %ld"); - TEST2(i, c-s, 10, "wrong final position %d != %d"); - TEST2(i, errno, ERANGE, "missing errno %d != %d"); - TEST(l, strtol(s="-2147483649", &c, 0), -2147483647L-1, "uncaught overflow %ld != %ld"); - TEST2(i, c-s, 11, "wrong final position %d != %d"); - TEST2(i, errno, ERANGE, "missing errno %d != %d"); - TEST(ul, strtoul(s="4294967296", &c, 0), 4294967295UL, "uncaught overflow %lu != %lu"); - TEST2(i, c-s, 10, "wrong final position %d != %d"); - TEST2(i, errno, ERANGE, "missing errno %d != %d"); - TEST(ul, strtoul(s="-1", &c, 0), -1UL, "rejected negative %lu != %lu"); - TEST2(i, c-s, 2, "wrong final position %d != %d"); - TEST2(i, errno, 0, "spurious errno %d != %d"); - TEST(ul, strtoul(s="-2", &c, 0), -2UL, "rejected negative %lu != %lu"); - TEST2(i, c-s, 2, "wrong final position %d != %d"); - TEST2(i, errno, 0, "spurious errno %d != %d"); - TEST(ul, strtoul(s="-2147483648", &c, 0), -2147483648UL, "rejected negative %lu != %lu"); - TEST2(i, c-s, 11, "wrong final position %d != %d"); - TEST2(i, errno, 0, "spurious errno %d != %d"); - TEST(ul, strtoul(s="-2147483649", &c, 0), -2147483649UL, "rejected negative %lu != %lu"); - TEST2(i, c-s, 11, "wrong final position %d != %d"); - TEST2(i, errno, 0, "spurious errno %d != %d"); - } else { - TEST(i, 0, 1, "64bit tests not implemented"); - } - - TEST(l, strtol("z", 0, 36), 35, "%ld != %ld"); - TEST(l, strtol("00010010001101000101011001111000", 0, 2), 0x12345678, "%ld != %ld"); - TEST(l, strtol(s="0F5F", &c, 16), 0x0f5f, "%ld != %ld"); - - TEST(l, strtol(s="0xz", &c, 16), 0, "%ld != %ld"); - TEST2(i, c-s, 1, "wrong final position %ld != %ld"); - - TEST(l, strtol(s="0x1234", &c, 16), 0x1234, "%ld != %ld"); - TEST2(i, c-s, 6, "wrong final position %ld != %ld"); - - c = NULL; - TEST(l, strtol(s="123", &c, 37), 0, "%ld != %ld"); - TEST2(i, c-s, 0, "wrong final position %d != %d"); - TEST2(i, errno, EINVAL, "%d != %d"); - - TEST(l, strtol(s=" 15437", &c, 8), 015437, "%ld != %ld"); - TEST2(i, c-s, 7, "wrong final position %d != %d"); - - TEST(l, strtol(s=" 1", &c, 0), 1, "%ld != %ld"); - TEST2(i, c-s, 3, "wrong final position %d != %d"); - return t_status; -} diff --git a/programs/develop/ktcc/trunk/libctest/strtold.c b/programs/develop/ktcc/trunk/libctest/strtold.c deleted file mode 100644 index 7e50d5eae9..0000000000 --- a/programs/develop/ktcc/trunk/libctest/strtold.c +++ /dev/null @@ -1,96 +0,0 @@ -#include -#include -#include -#include -#include "test.h" - -#define length(x) (sizeof(x) / sizeof *(x)) - -static struct { - char *s; - long double f; -} t[] = { - {"0", 0.0}, - {"12.345", 12.345L}, - {"1.2345e1", 12.345L}, - {"1e+1000000", INFINITY}, - {"1e-1000000", 0}, -#if LDBL_MANT_DIG == 53 - // 2^-1074 * 0.5 - eps - {".2470328229206232720882843964341106861825299013071623822127928412503377536351043e-323", 0}, - // 2^-1074 * 0.5 + eps - {".2470328229206232720882843964341106861825299013071623822127928412503377536351044e-323", 0x1p-1074}, - // 2^-1074 * 1.5 - eps - {".7410984687618698162648531893023320585475897039214871466383785237510132609053131e-323", 0x1p-1074}, - // 2^-1074 * 1.5 + eps - {".7410984687618698162648531893023320585475897039214871466383785237510132609053132e-323", 0x1p-1073}, - // 2^-1022 + 2^-1075 - eps - {".2225073858507201630123055637955676152503612414573018013083228724049586647606759e-307", 0x1p-1022}, - // 2^-1022 + 2^-1075 + eps - {".2225073858507201630123055637955676152503612414573018013083228724049586647606760e-307", 0x1.0000000000001p-1022}, - // 2^1024 - 2^970 - eps - {"17976931348623158079372897140530341507993413271003782693617377898044" - "49682927647509466490179775872070963302864166928879109465555478519404" - "02630657488671505820681908902000708383676273854845817711531764475730" - "27006985557136695962284291481986083493647529271907416844436551070434" - "2711559699508093042880177904174497791.999999999999999999999999999999", 0x1.fffffffffffffp1023}, - // 2^1024 - 2^970 - {"17976931348623158079372897140530341507993413271003782693617377898044" - "49682927647509466490179775872070963302864166928879109465555478519404" - "02630657488671505820681908902000708383676273854845817711531764475730" - "27006985557136695962284291481986083493647529271907416844436551070434" - "2711559699508093042880177904174497792", INFINITY}, - // some random numbers - {".5961860348131807091861002266453941950428e00", 0.59618603481318067}, // 0x1.313f4bc3b584cp-1 - {"1.815013169218038729887460898733526957442e-1", 0.18150131692180388}, // 0x1.73b6f662e1712p-3 - {"42.07082357534453600681618685682257590772e-2", 0.42070823575344535}, // 0x1.aece23c6e028dp-2 - {"665.4686306516261456328973225579833470816e-3", 0.66546863065162609}, // 0x1.54b84dea53453p-1 - {"6101.852922970868621786690495485449831753e-4", 0.61018529229708685}, // 0x1.386a34e5d516bp-1 - {"76966.95208236968077849464348875471158549e-5", 0.76966952082369677}, // 0x1.8a121f9954dfap-1 - {"250506.5322228682496132604807222923702304e-6", 0.25050653222286823}, // 0x1.0084c8cd538c2p-2 - {"2740037.230228005325852424697698331177377e-7", 0.27400372302280052}, // 0x1.18946e9575ef4p-2 - {"20723093.50049742645941529268715428324490e-8", 0.20723093500497428}, // 0x1.a868b14486e4dp-3 - {"0.7900280238081604956226011047460238748912e1", 7.9002802380816046}, // 0x1.f99e3100f2eaep+2 - {"0.9822860653737296848190558448760465863597e2", 98.228606537372968}, // 0x1.88ea17d506accp+6 - {"0.7468949723190370809405570560160405324869e3", 746.89497231903704}, // 0x1.75728e73f48b7p+9 - {"0.1630268320282728475980459844271031751665e4", 1630.2683202827284}, // 0x1.97912c28d5cbp+10 - {"0.4637168629719170695109918769645492022088e5", 46371.686297191707}, // 0x1.6a475f6258737p+15 - {"0.6537805944497711554209461686415872067523e6", 653780.59444977110}, // 0x1.3f3a9305bb86cp+19 - {"0.2346324356502437045212230713960457676531e6", 234632.43565024371}, // 0x1.ca4437c3631eap+17 - {"0.9709481716420048341897258980454298205278e8", 97094817.164200485}, // 0x1.7263284a8242cp+26 - {"0.4996908522051874110779982354932499499602e9", 499690852.20518744}, // 0x1.dc8ad6434872ap+28 -#elif LDBL_MANT_DIG == 64 - // 2^-16445 * 0.5 - eps - {".1822599765941237301264202966809709908199525407846781671860490243514185844316698e-4950", 0}, - // 2^-16445 * 0.5 + eps - {".1822599765941237301264202966809709908199525407846781671860490243514185844316699e-4950", 0x1p-16445L}, - // 2^-16445 * 1.5 - eps - {".5467799297823711903792608900429129724598576223540345015581470730542557532950096e-4950", 0x1p-16445L}, - // 2^-16445 * 1.5 + eps - {".5467799297823711903792608900429129724598576223540345015581470730542557532950097e-4950", 0x1p-16444L}, - // 2^-16382 + 2^-16446 - eps - {".3362103143112093506444937793915876332724499641527442230928779770593420866576777e-4931", 0x1p-16382L}, - // 2^-16382 + 2^-16446 + eps - {".3362103143112093506444937793915876332724499641527442230928779770593420866576778e-4931", 0x1.0000000000000002p-16382L}, - // 2^16384 - 2^16319 - eps - {"118973149535723176505351158982948.86679662540046955672e4900", 0x1.fffffffffffffffep16383L}, - // 2^16384 - 2^16319 + eps - {"118973149535723176505351158982948.86679662540046955673e4900", INFINITY}, -#endif -}; - -int main(void) -{ - int i; - long double x; - char *p; - - for (i = 0; i < length(t); i++) { - x = strtold(t[i].s, &p); - if (x != t[i].f) - t_error("strtold(\"%s\") want %La got %La\n", t[i].s, t[i].f, x); - } - - printf("%s finished\n", __FILE__); - return t_status; -} diff --git a/programs/develop/ktcc/trunk/libctest/test.h b/programs/develop/ktcc/trunk/libctest/test.h deleted file mode 100644 index 0168fc262f..0000000000 --- a/programs/develop/ktcc/trunk/libctest/test.h +++ /dev/null @@ -1,37 +0,0 @@ -#include -#include -#ifdef __GNUC__ -#include -#include -#include -#include -#endif - - -/* TODO: not thread-safe nor fork-safe */ -extern volatile int t_status; - -#define T_LOC2(l) __FILE__ ":" #l -#define T_LOC1(l) T_LOC2(l) -#define t_error(...) t_printf(T_LOC1(__LINE__) ": " __VA_ARGS__) - -int t_printf(const char *s, ...); - -int t_vmfill(void **, size_t *, int); -int t_memfill(void); - -void t_fdfill(void); - -void t_randseed(uint64_t s); -uint64_t t_randn(uint64_t n); -uint64_t t_randint(uint64_t a, uint64_t b); -void t_shuffle(uint64_t *p, size_t n); -void t_randrange(uint64_t *p, size_t n); -int t_choose(uint64_t n, size_t k, uint64_t *p); - -char *t_pathrel(char *buf, size_t n, char *argv0, char *p); - -int t_setrlim(int r, long lim); - -#include "print.inc" -#include "rand.inc" diff --git a/programs/develop/ktcc/trunk/libctest/tgmath.c b/programs/develop/ktcc/trunk/libctest/tgmath.c deleted file mode 100644 index 09265be916..0000000000 --- a/programs/develop/ktcc/trunk/libctest/tgmath.c +++ /dev/null @@ -1,41 +0,0 @@ -//#include -#include -#include -#include "test.h" - -int main(void) -{ - long i; -/* - i = lrint(123456789.1f) & 0x7fffffff; - if (i != 123456792) - t_error("lrint(123456789.1f)&0x7fffffff want 123456792 got %ld\n", i); - i = lrint(123456789.1) & 0x7fffffff; - if (i != 123456789) - t_error("lrint(123456789.1)&0x7fffffff want 123456789 got %ld\n", i); -*/ - if (sqrt(2.0f) != 1.41421353816986083984375) - t_error("sqrt(2.0f) want 1.41421353816986083984375 got %f\n", sqrt(2.0f)); - if (sqrt(2.0) != 1.414213562373095145474621858738828450441360) - t_error("sqrt(2.0) want 1.414213562373095145474621858738828450441360 got %d\n", sqrt(2.0)); - if (sqrt(2) != 1.414213562373095145474621858738828450441360) - t_error("sqrt(2) want 0x1.6a09e667f3bcdp+0 got %a\n", sqrt(2.0)); - - if (sizeof pow(sqrt(8),0.5f) != sizeof(double)) - t_error("sizeof pow(sqrt(8),0.5f) want %d got %d\n", (int)sizeof(double), (int)sizeof pow(sqrt(8),0.5f)); - if (sizeof pow(2.0,0.5) != sizeof(double)) - t_error("sizeof pow(2.0,0.5) want %d got %d\n", (int)sizeof(double), (int)sizeof pow(2.0,0.5)); - if (sizeof pow(2.0f,0.5f) != sizeof(float)) - t_error("sizeof pow(2.0f,0.5f) want %d got %d\n", (int)sizeof(float), (int)sizeof pow(2.0f,0.5f)); -// if (sizeof pow(2.0,0.5+0*I) != sizeof(double complex)) -// t_error("sizeof pow(2.0,0.5+0*I) want %d got %d\n", (int)sizeof(double complex), (int)sizeof pow(2.0,0.5+0*I)); - - if (pow(2.0,0.5) != 1.414213562373095145474621858738828450441360) - t_error("pow(2.0,0.5) want 0x1.6a09e667f3bcdp+0 got %a\n", pow(2.0,0.5)); - if (pow(2,0.5) != 1.414213562373095145474621858738828450441360) - t_error("pow(2,0.5) want 0x1.6a09e667f3bcdp+0 got %a\n", pow(2,0.5)); - if (pow(2,0.5f) != 1.414213562373095145474621858738828450441360) - t_error("pow(2,0.5f) want 0x1.6a09e667f3bcdp+0 got %a\n", pow(2,0.5f)); - - return t_status; -} diff --git a/programs/develop/ktcc/trunk/libctest/time.c b/programs/develop/ktcc/trunk/libctest/time.c deleted file mode 100644 index 0b22dfc12c..0000000000 --- a/programs/develop/ktcc/trunk/libctest/time.c +++ /dev/null @@ -1,110 +0,0 @@ -#define _XOPEN_SOURCE 700 -#include -#include -#include -#include -#include -#include -#include "test.h" - -/* We use this instead of memcmp because some broken C libraries - * add additional nonstandard fields to struct tm... */ - -int tm_cmp(struct tm tm1, struct tm tm2) -{ - return tm1.tm_sec != tm2.tm_sec || - tm1.tm_min != tm2.tm_min || - tm1.tm_hour != tm2.tm_hour || - tm1.tm_mday != tm2.tm_mday || - tm1.tm_mon != tm2.tm_mon || - tm1.tm_year != tm2.tm_year || - tm1.tm_wday != tm2.tm_wday || - tm1.tm_yday != tm2.tm_yday || - tm1.tm_isdst!= tm2.tm_isdst; -} - -char *tm_str(struct tm tm) -{ - static int i; - static char b[4][64]; - i = (i+1)%4; - snprintf(b[i], sizeof b[i], - "s=%02d m=%02d h=%02d mday=%02d mon=%02d year=%04d wday=%d yday=%d isdst=%d", - tm.tm_sec, tm.tm_min, tm.tm_hour, - tm.tm_mday, tm.tm_mon, tm.tm_year, - tm.tm_wday, tm.tm_yday, tm.tm_isdst); - return b[i]; -} - -#define TM(ss,mm,hh,md,mo,yr,wd,yd,dst) (struct tm){ \ - .tm_sec = ss, .tm_min = mm, .tm_hour = hh, \ - .tm_mday = md, .tm_mon = mo, .tm_year = yr, \ - .tm_wday = wd, .tm_yday = yd, .tm_isdst = dst } - -#define TM_EPOCH TM(0,0,0,1,0,70,4,0,0) -#define TM_Y2038_1S TM(7,14,3,19,0,138,2,18,0) -#define TM_Y2038 TM(8,14,3,19,0,138,2,18,0) - -static void sec2tm(time_t t, char *m) -{ - struct tm *tm; - time_t r; - - errno = 0; - tm = gmtime(&t); - if (errno != 0) - t_error("%s: gmtime((time_t)%lld) should not set errno, got %s\n", - m, (long long)t, strerror(errno)); - errno = 0; - r = mktime(tm); - if (errno != 0) - t_error("%s: mktime(%s) should not set errno, got %s\n", - m, tm_str(*tm), strerror(errno)); - if (t != r) - t_error("%s: mktime(gmtime(%lld)) roundtrip failed: got %lld (gmtime is %s)\n", - m, (long long)t, (long long)r, tm_str(*tm)); -} - -static void tm2sec(struct tm *tm, int big, char *m) -{ - struct tm *r; - time_t t; - int overflow = big && (time_t)LLONG_MAX!=LLONG_MAX; - - errno = 0; - t = mktime(tm); - if (overflow && t != -1) - t_error("%s: mktime(%s) expected -1, got (time_t)%ld\n", - m, tm_str(*tm), (long)t); - if (overflow && errno != 10000) //EOVERFLOW - t_error("%s: mktime(%s) expected EOVERFLOW (%s), got (%s)\n", - m, tm_str(*tm), strerror(10000), strerror(errno)); - if (!overflow && t == -1) - t_error("%s: mktime(%s) expected success, got (time_t)-1\n", - m, tm_str(*tm)); - if (!overflow && errno) - t_error("%s: mktime(%s) expected no error, got (%s)\n", - m, tm_str(*tm), strerror(errno)); - r = gmtime(&t); - if (!overflow && tm_cmp(*r, *tm)) - t_error("%s: gmtime(mktime(%s)) roundtrip failed: got %s\n", - m, tm_str(*tm), tm_str(*r)); -} - -int main(void) -{ - time_t t; - - putenv("TZ=GMT"); - tzset(); - tm2sec(&TM_EPOCH, 0, "gmtime(0)"); - tm2sec(&TM_Y2038_1S, 0, "2038-1s"); - tm2sec(&TM_Y2038, 1, "2038"); - - sec2tm(0, "EPOCH"); - for (t = 1; t < 1000; t++) - sec2tm(t*100003, "EPOCH+eps"); - - /* FIXME: set a TZ var and check DST boundary conditions */ - return t_status; -} diff --git a/programs/develop/ktcc/trunk/libctest/traceadr.c b/programs/develop/ktcc/trunk/libctest/traceadr.c deleted file mode 100644 index 478973808e..0000000000 --- a/programs/develop/ktcc/trunk/libctest/traceadr.c +++ /dev/null @@ -1,19 +0,0 @@ -#include - -# define TRACE1(s, a) printf(s, a) - -void caller(void* ptr) -{ - - ptr = 0xaaaaaaaa; - TRACE1("caller is called from EIP@%x\n", *(int*)((char*)&ptr-4)-5); - -} - - -int main() -{ - - caller(0xffffffff); -} - diff --git a/programs/develop/ktcc/trunk/libctest/tstring.c b/programs/develop/ktcc/trunk/libctest/tstring.c deleted file mode 100644 index 0b0c1e04cd..0000000000 --- a/programs/develop/ktcc/trunk/libctest/tstring.c +++ /dev/null @@ -1,357 +0,0 @@ -/* - * Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved. - * - * Permission to use, copy, modify, and distribute this software - * is freely granted, provided that this notice is preserved. - */ - -#include -#include -#include - -#ifndef MAX_1 -#ifdef __SPU__ -#define MAX_1 11000 -#else -#define MAX_1 33000 -#endif -#endif - -#define MAX_2 (2 * MAX_1 + MAX_1 / 10) - -void eprintf (int line, char *result, char *expected, int size) -{ - if (size != 0) - printf ("Failure at line %d, result is <%.*s>, should be <%s> of size %d\n", - line, size, result, expected, size); - else - printf ("Failure at line %d, result is <%s>, should be <%s>\n", - line, result, expected); -} - -void mycopy (char *target, char *source, int size) -{ - int i; - - for (i = 0; i < size; ++i) - { - target[i] = source[i]; - } -} - -void myset (char *target, char ch, int size) -{ - int i; - - for (i = 0; i < size; ++i) - { - target[i] = ch; - } -} - -int main() -{ - char target[MAX_1] = "A"; - char first_char; - char second_char; - char array[] = "abcdefghijklmnopqrstuvwxz"; - char array2[] = "0123456789!@#$%^&*("; - char buffer2[MAX_1]; - char buffer3[MAX_1]; - char buffer4[MAX_1]; - char buffer5[MAX_2]; - char buffer6[MAX_2]; - char buffer7[MAX_2]; - char expected[MAX_1]; - char *tmp1, *tmp2, *tmp3, *tmp4, *tmp5, *tmp6, *tmp7; - int i, j, k, x, z, align_test_iterations; - - int test_failed = 0; - - tmp1 = target; - tmp2 = buffer2; - tmp3 = buffer3; - tmp4 = buffer4; - tmp5 = buffer5; - tmp6 = buffer6; - tmp7 = buffer7; - - tmp2[0] = 'Z'; - tmp2[1] = '\0'; - - if (memset (target, 'X', 0) != target || - memcpy (target, "Y", 0) != target || - memmove (target, "K", 0) != target || - strncpy (tmp2, "4", 0) != tmp2 || - strncat (tmp2, "123", 0) != tmp2 || - strcat (target, "") != target) - { - eprintf (__LINE__, target, "A", 0); - test_failed = 1; - } - - if (strcmp (target, "A") || strlen(target) != 1 || memchr (target, 'A', 0) != NULL - || memcmp (target, "J", 0) || strncmp (target, "A", 1) || strncmp (target, "J", 0) || - tmp2[0] != 'Z' || tmp2[1] != '\0') - { - eprintf (__LINE__, target, "A", 0); - test_failed = 1; - } - - tmp2[2] = 'A'; - if (strcpy (target, "") != target || - strncpy (tmp2, "", 4) != tmp2 || - strcat (target, "") != target) - { - eprintf (__LINE__, target, "", 0); - test_failed = 1; - } - - if (target[0] != '\0' || strncmp (target, "", 1) || - memcmp (tmp2, "\0\0\0\0", 4)) - { - eprintf (__LINE__, target, "", 0); - test_failed = 1; - } - - tmp2[2] = 'A'; - if (strncat (tmp2, "1", 3) != tmp2 || - memcmp (tmp2, "1\0A", 3)) - { - eprintf (__LINE__, tmp2, "1\0A", 3); - test_failed = 1; - } - - if (strcpy (tmp3, target) != tmp3 || - strcat (tmp3, "X") != tmp3 || - strncpy (tmp2, "X", 2) != tmp2 || - memset (target, tmp2[0], 1) != target) - { - eprintf (__LINE__, target, "X", 0); - test_failed = 1; - } - - if (strcmp (target, "X") || strlen (target) != 1 || - memchr (target, 'X', 2) != target || - strchr (target, 'X') != target || - memchr (target, 'Y', 2) != NULL || - strchr (target, 'Y') != NULL || - strcmp (tmp3, target) || - strncmp (tmp3, target, 2) || - memcmp (target, "K", 0) || - strncmp (target, tmp3, 3)) - { - eprintf (__LINE__, target, "X", 0); - test_failed = 1; - } - - if (strcpy (tmp3, "Y") != tmp3 || - strcat (tmp3, "Y") != tmp3 || - memset (target, 'Y', 2) != target) - { - eprintf (__LINE__, target, "Y", 0); - test_failed = 1; - } - - target[2] = '\0'; - if (memcmp (target, "YY", 2) || strcmp (target, "YY") || - strlen (target) != 2 || memchr (target, 'Y', 2) != target || - strcmp (tmp3, target) || - strncmp (target, tmp3, 3) || - strncmp (target, tmp3, 4) || - strncmp (target, tmp3, 2) || - strchr (target, 'Y') != target) - { - eprintf (__LINE__, target, "YY", 2); - test_failed = 1; - } - - strcpy (target, "WW"); - if (memcmp (target, "WW", 2) || strcmp (target, "WW") || - strlen (target) != 2 || memchr (target, 'W', 2) != target || - strchr (target, 'W') != target) - { - eprintf (__LINE__, target, "WW", 2); - test_failed = 1; - } - - if (strncpy (target, "XX", 16) != target || - memcmp (target, "XX\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 16)) - { - eprintf (__LINE__, target, "XX\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 16); - test_failed = 1; - } - - if (strcpy (tmp3, "ZZ") != tmp3 || - strcat (tmp3, "Z") != tmp3 || - memcpy (tmp4, "Z", 2) != tmp4 || - strcat (tmp4, "ZZ") != tmp4 || - memset (target, 'Z', 3) != target) - { - eprintf (__LINE__, target, "ZZZ", 3); - test_failed = 1; - } - - target[3] = '\0'; - tmp5[0] = '\0'; - strncat (tmp5, "123", 2); - if (memcmp (target, "ZZZ", 3) || strcmp (target, "ZZZ") || - strcmp (tmp3, target) || strcmp (tmp4, target) || - strncmp (target, "ZZZ", 4) || strncmp (target, "ZZY", 3) <= 0 || - strncmp ("ZZY", target, 4) >= 0 || - memcmp (tmp5, "12", 3) || - strlen (target) != 3) - { - eprintf (__LINE__, target, "ZZZ", 3); - test_failed = 1; - } - - target[2] = 'K'; - if (memcmp (target, "ZZZ", 2) || strcmp (target, "ZZZ") >= 0 || - memcmp (target, "ZZZ", 3) >= 0 || strlen (target) != 3 || - memchr (target, 'K', 3) != target + 2 || - strncmp (target, "ZZZ", 2) || strncmp (target, "ZZZ", 4) >= 0 || - strchr (target, 'K') != target + 2) - { - eprintf (__LINE__, target, "ZZK", 3); - test_failed = 1; - } - - strcpy (target, "AAA"); - if (memcmp (target, "AAA", 3) || strcmp (target, "AAA") || - strncmp (target, "AAA", 3) || - strlen (target) != 3) - { - eprintf (__LINE__, target, "AAA", 3); - test_failed = 1; - } - - j = 5; - while (j < MAX_1) - { - for (i = j-1; i <= j+1; ++i) - { - /* don't bother checking unaligned data in the larger - sizes since it will waste time without performing additional testing */ - if (i <= 16 * sizeof(long)) - { - align_test_iterations = 2*sizeof(long); - if (i <= 2 * sizeof(long) + 1) - z = 2; - else - z = 2 * sizeof(long); - } - else - { - align_test_iterations = 1; - } - - for (x = 0; x < align_test_iterations; ++x) - { - tmp1 = target + x; - tmp2 = buffer2 + x; - tmp3 = buffer3 + x; - tmp4 = buffer4 + x; - tmp5 = buffer5 + x; - tmp6 = buffer6 + x; - - first_char = array[i % (sizeof(array) - 1)]; - second_char = array2[i % (sizeof(array2) - 1)]; - memset (tmp1, first_char, i); - mycopy (tmp2, tmp1, i); - myset (tmp2 + z, second_char, i - z - 1); - if (memcpy (tmp1 + z, tmp2 + z, i - z - 1) != tmp1 + z) - { - printf ("error at line %d\n", __LINE__); - test_failed = 1; - } - - tmp1[i] = '\0'; - tmp2[i] = '\0'; - if (strcpy (expected, tmp2) != expected) - { - printf ("error at line %d\n", __LINE__); - test_failed = 1; - } - tmp2[i-z] = first_char + 1; - if (memmove (tmp2 + z + 1, tmp2 + z, i - z - 1) != tmp2 + z + 1 || - memset (tmp3, first_char, i) != tmp3) - { - printf ("error at line %d\n", __LINE__); - test_failed = 1; - } - - myset (tmp4, first_char, i); - tmp5[0] = '\0'; - if (strncpy (tmp5, tmp1, i+1) != tmp5 || - strcat (tmp5, tmp1) != tmp5) - { - printf ("error at line %d\n", __LINE__); - test_failed = 1; - } - mycopy (tmp6, tmp1, i); - mycopy (tmp6 + i, tmp1, i + 1); - - tmp7[2*i+z] = second_char; - strcpy (tmp7, tmp1); - - strchr (tmp1, second_char); - - if (memcmp (tmp1, expected, i) || strcmp (tmp1, expected) || - strncmp (tmp1, expected, i) || - strncmp (tmp1, expected, i+1) || - strcmp (tmp1, tmp2) >= 0 || memcmp (tmp1, tmp2, i) >= 0 || - strncmp (tmp1, tmp2, i+1) >= 0 || - strlen (tmp1) != i || memchr (tmp1, first_char, i) != tmp1 || - strchr (tmp1, first_char) != tmp1 || - memchr (tmp1, second_char, i) != tmp1 + z || - strchr (tmp1, second_char) != tmp1 + z || - strcmp (tmp5, tmp6) || - strncat (tmp7, tmp1, i+2) != tmp7 || - strcmp (tmp7, tmp6) || - tmp7[2*i+z] != second_char) - { - eprintf (__LINE__, tmp1, expected, 0); - printf ("x is %d\n",x); - printf ("i is %d\n", i); - printf ("tmp1 is <%p>\n", tmp1); - printf ("tmp5 is <%p> <%s>\n", tmp5, tmp5); - printf ("tmp6 is <%p> <%s>\n", tmp6, tmp6); - test_failed = 1; - } - - for (k = 1; k <= align_test_iterations && k <= i; ++k) - { - if (memcmp (tmp3, tmp4, i - k + 1) != 0 || - strncmp (tmp3, tmp4, i - k + 1) != 0) - { - printf ("Failure at line %d, comparing %.*s with %.*s\n", - __LINE__, i, tmp3, i, tmp4); - test_failed = 1; - } - tmp4[i-k] = first_char + 1; - if (memcmp (tmp3, tmp4, i) >= 0 || - strncmp (tmp3, tmp4, i) >= 0 || - memcmp (tmp4, tmp3, i) <= 0 || - strncmp (tmp4, tmp3, i) <= 0) - { - printf ("Failure at line %d, comparing %.*s with %.*s\n", - __LINE__, i, tmp3, i, tmp4); - test_failed = 1; - } - tmp4[i-k] = first_char; - } - } - } - j = ((2 * j) >> 2) << 2; - } - - printf("\n %s finished\n", __FILE__); - if (test_failed) - { - printf("\n %s FAILED\n", __FILE__); - abort(); - } - else - exit(0); -} \ No newline at end of file diff --git a/programs/develop/ktcc/trunk/libctest/udiv.c b/programs/develop/ktcc/trunk/libctest/udiv.c deleted file mode 100644 index 3522c6340f..0000000000 --- a/programs/develop/ktcc/trunk/libctest/udiv.c +++ /dev/null @@ -1,170 +0,0 @@ -#include "test.h" -//#include - -/* -static uint64_t randstate = 0x123456789abcdef0ull; -static uint64_t rnd(void) { - randstate = 6364136223846793005ull*randstate + 1; - return randstate; -} -void test_maketest() -{ - int i; - uint64_t x,y; - for (i = 0; i < 128; i++) { - x = rnd(); - y = rnd()>>(i/2); - if (!y) - continue; - printf("0x%llxull, 0x%llxull, 0x%llxull, 0x%llxull,\n", x, y, x/y, x%y); - } -} -*/ - -static struct { - uint64_t x, y, div, mod; -} t[] = { -0x8ddb1a43e77c4031ull, 0x5950e8c33d34979eull, 0x1ull, 0x348a3180aa47a893ull, -0x723f4114006c08c7ull, 0x817de530db2b43fcull, 0x0ull, 0x723f4114006c08c7ull, -0x47811fa5f00f74dull, 0x3d98e7d3fcd5d5c5ull, 0x0ull, 0x47811fa5f00f74dull, -0x51ffcc7cdc989d43ull, 0x36be8bd6746b70e4ull, 0x1ull, 0x1b4140a6682d2c5full, -0x57bf9128512fe829ull, 0x197b3858155d498dull, 0x3ull, 0xb4de82011180b82ull, -0x89fc1c5968fa817full, 0xdcea797734c7115ull, 0x9ull, 0xdb838065b4a87c2ull, -0x4ed5264cf7092ec5ull, 0xde40d1e15ef3e74ull, 0x5ull, 0x960e4b6895cf681ull, -0xffd86b253d97317bull, 0x13f9ff2d24b6d6f4ull, 0xcull, 0x1020750785051e0bull, -0x8771fa2da656a721ull, 0x9210fe654c59bfcull, 0xeull, 0x7a31b9503881f59ull, -0xb5961d12bcd3e937ull, 0xbdb5a33662f547aull, 0xfull, 0x3bbd40fc00df611ull, -0x93c79eecdac7ed3dull, 0x6f267c57ea2b7b5ull, 0x15ull, 0x1e51bb9776edb64ull, -0x6b93ffce49f1a4b3ull, 0x3583d1f9702ee03ull, 0x20ull, 0x8c5bdb6993e453ull, -0x138aefcc98ce5d19ull, 0x117002fa7600b11ull, 0x11ull, 0x103eca27b6da0f8ull, -0xb3da641cef491fefull, 0x357615f638334b8ull, 0x35ull, 0x2c33b5d551f35d7ull, -0x71c4b06e463912b5ull, 0x1c286ad9e8f5229ull, 0x40ull, 0x1230506a2648875ull, -0x97d4cf7df046d6ebull, 0x1e9412f5c77b2b8ull, 0x4full, 0xd9b1e06756b023ull, -0x1428f04bd490ea11ull, 0x9d97f29a897c93ull, 0x20ull, 0x75f1f8836157b1ull, -0x35256c76832705a7ull, 0xa962f1a447dcd7ull, 0x50ull, 0x3680f32cb20277ull, -0x2969e82bd9347f2dull, 0x723d68574d4156ull, 0x5cull, 0x5bd6ac79710445ull, -0x9061a12aae71a823ull, 0x4186d8a1a66175ull, 0x234ull, 0x48be68be2f25full, -0x695b8d33ef342e09ull, 0x3ed1fe1a998fe3ull, 0x1adull, 0x15a6615bde0ea2ull, -0x46b4dd1e06367a5full, 0xa04e70622e4e8ull, 0x70eull, 0x64750bc0b9dafull, -0xd68b05ba7eee12a5ull, 0x72ab3fb682444ull, 0x1defull, 0x3c437fc988329ull, -0x1e59cc2ac508f85bull, 0xeb15ae6d4d7f9ull, 0x210ull, 0xc00aeae0b86cbull, -0x296f8d2c76a0901ull, 0xf65628b31b01ull, 0x2b0ull, 0xf14566117651ull, -0x7036f5ad7cbc5e17ull, 0xa09d3bfcf72cfull, 0xb2dull, 0x72236db564ab4ull, -0x915d6883c575ad1dull, 0x3a38d68d3a38eull, 0x27f2ull, 0x241de6f7a6ee1ull, -0x845ba74f5adfa793ull, 0x2f6950e58d00bull, 0x2caaull, 0x249dc90239c45ull, -0xb910d16c54805af9ull, 0x1fc2ca5c99a7aull, 0x5d3aull, 0x1771487b50955ull, -0x27a2e280bcf990cfull, 0x389aa0c0b0cc0ull, 0xb34ull, 0x9d71d12eb9cfull, -0x1e032f04a5372e95ull, 0x63c2a1d58710ull, 0x4d04ull, 0x154ce4414255ull, -0x3a1a5659908495cbull, 0x279dcd85418aull, 0x17775ull, 0x132c6f9c7bb9ull, -0xd769a376e5e103f1ull, 0xadacb670e0c7ull, 0x13d85ull, 0x8ad256e5d18eull, -0x269f4f4baaaf287ull, 0x1aed2ad9daf0ull, 0x16f3ull, 0x426550f80b7ull, -0x6700daeeb87a770dull, 0xeca7ab1aa93ull, 0x6f6c5ull, 0x70d9466f1eeull, -0xd0201f3783c2a303ull, 0x3a0c01aa3e6aull, 0x395e1ull, 0x18b33b9015d9ull, -0xca3f2e00d291e3e9ull, 0xbe0e048cd94ull, 0x1106c2ull, 0x37f7fc0a1c1ull, -0xec4d240dc289633full, 0x4f8aadb7483ull, 0x2f8855ull, 0x46e0db91bc0ull, -0xd7967b29e2e36685ull, 0xe61d902db27ull, 0xefd69ull, 0x36811fff886ull, -0xe3ecd4374320af3bull, 0x4edd0edd0a0ull, 0x2e3defull, 0x4ad0da4c9dbull, -0x7a08fe1d98b4dae1ull, 0x6bced9c0c15ull, 0x121c89ull, 0x40c856617a4ull, -0x34435992a5c9c2f7ull, 0x4f4a94c109full, 0xa8bc9ull, 0x94c5d46120ull, -0x6fd0027468f1dcfdull, 0x597186b0153ull, 0x140060ull, 0x16f26555dddull, -0x4fe37c1db1619a73ull, 0x47a0c30bd15ull, 0x11d861ull, 0x5964fb3d7eull, -0x77aa77f86d07c8d9ull, 0x3a39cf03d65ull, 0x20e21cull, 0x37f7fede7cdull, -0xc072e76ad59cf1afull, 0x3a786701dull, 0x34a98c59ull, 0x22b6b1b9aull, -0xfb8e8f1f7781ba75ull, 0xe8ca427d3eull, 0x114a34dull, 0xa344eb94cfull, -0x160e34cf590444abull, 0xe2388f12feull, 0x18f574ull, 0xc303329393ull, -0x2509ddea3a648dd1ull, 0xec762d81bcull, 0x281955ull, 0xc0463d1e65ull, -0xc9ba10cd6eafcf67ull, 0x96a51d06f7ull, 0x156ce72ull, 0x133e2df369ull, -0x1dd4fe261b4adeedull, 0x2736e25406ull, 0xc2bfefull, 0x1354c1f353ull, -0x480258f92fc38de3ull, 0x2599b52bb0ull, 0x1ea450cull, 0x2879f11a3ull, -0x5a3257b1114109c9ull, 0x2978f9f1aaull, 0x22cc30aull, 0x1317311b25ull, -0xf4eeda8f34ab3c1full, 0x1aa70450d9ull, 0x9309d64ull, 0x1187b6925bull, -0x3c2c319ca8612a65ull, 0x73fc01eceull, 0x84d0088ull, 0x3165accf5ull, -0x4f6034e74a16561bull, 0x1f29d53707ull, 0x28c0daaull, 0xd88e07075ull, -0x206665a7072f1cc1ull, 0xda87e7ceaull, 0x25f48c1ull, 0xd3ddb2057ull, -0x100c559d7db417d7ull, 0xb907ebbc2ull, 0x1634188ull, 0xa2eae16c7ull, -0x64c5f83691b47cddull, 0x5aced6ebbull, 0x11c17fb7ull, 0x344109030ull, -0x32a812777eaf7d53ull, 0x1cb63fe4full, 0x1c3a9675ull, 0xb113f938ull, -0x67478d96865ca6b9ull, 0x142fa03aull, 0x51dcb463dull, 0x11359ce7ull, -0x71024e740deb428full, 0x142d3885ull, 0x599d9edd5ull, 0x13b1ae6ull, -0x52c78160b090b655ull, 0xd02101c6ull, 0x65d1b205ull, 0x1c0a0177ull, -0x16917d5f9fde38bull, 0xfb1566c7ull, 0x17029e0ull, 0x1bbe166bull, -0xa6ee688a0d1387b1ull, 0x22c4d384ull, 0x4cd19afcfull, 0x77143f5ull, -0x74babc1be2ed9c47ull, 0x22eda9a6ull, 0x3578b1967ull, 0x189b247dull, -0x7c5cbf2dfc1db6cdull, 0x5f09c060ull, 0x14efd44d4ull, 0x5210e74dull, -0x7c046071c1ac68c3ull, 0x3696c8e6ull, 0x24596d86bull, 0x26060a1ull, -0x84728ab55d399fa9ull, 0x267d7771ull, 0x370ea7405ull, 0x255d1674ull, -0x99f57100ef5404ffull, 0x10c0df86ull, 0x9308fef0dull, 0x9009131ull, -0x3f4c0514b0df5e45ull, 0xf2c3810ull, 0x42bf84d39ull, 0x3aa12b5ull, -0xd01edb572821ecfbull, 0x2a443aeull, 0x4ec8b88639ull, 0x111c73dull, -0xeecb08561bd0cea1ull, 0xbeca231ull, 0x140692508bull, 0x9b36e06ull, -0x8c856facc6335cb7ull, 0x398eab4ull, 0x271008c7a5ull, 0x922ab3ull, -0x23fb9839e8358cbdull, 0x24deb54ull, 0xf9d714151ull, 0xb9c329ull, -0x2005d5de30015033ull, 0x47c06dbull, 0x7240bccbaull, 0x104d115ull, -0x67d59c29e076f499ull, 0x179f009ull, 0x465554ac22ull, 0x10b0767ull, -0x32d2dd34369c836full, 0x13d3fbfull, 0x2902f2fb54ull, 0x7553c3ull, -0x3960c3c99fdc2235ull, 0x1b808baull, 0x21618743cdull, 0x11e7743ull, -0x343bad5adfa9726bull, 0xeef444ull, 0x37f58c51a6ull, 0x3d8a53ull, -0x7a4aadd7b4e5f191ull, 0x129c9ull, 0x6921bb5a2a53ull, 0x6b66ull, -0x9eb7dae5d71c5927ull, 0x31d7f5ull, 0x32f2ff2c6d5ull, 0x22c4eull, -0x1b285999316afeadull, 0x115477ull, 0x1912cf6611eull, 0x801bbull, -0x917aee3d84b533a3ull, 0x71d26full, 0x1473408589aull, 0x6e74ddull, -0x18e6a86b0473a589ull, 0x50a12ull, 0x4f0fabc67d4ull, 0x210a1ull, -0xf22c9887813bbddfull, 0x5b17aull, 0x2a897505c07bull, 0x1f841ull, -0xef7a551239d60225ull, 0x7fb5aull, 0x1e00b98e188bull, 0x41847ull, -0xffd2ad0e77b73dbull, 0x146f14ull, 0xc8500600a3ull, 0xba1full, -0x76743abdfb91f081ull, 0xd5888ull, 0x8e0303c479cull, 0x245a1ull, -0xc2eeb030bcff9197ull, 0x7a4e8ull, 0x198034e02c37ull, 0x343bfull, -0x63cc9c23f0ed0c9dull, 0x6c1e5ull, 0xec4d5841041ull, 0x38178ull, -0x7ad70f846e8f1313ull, 0x7fdf5ull, 0xf5ecec69bc9ull, 0x756b6ull, -0x60de3d71574eb279ull, 0x6ea3ull, 0xe02421997a61ull, 0x18b6ull, -0xd27054901c68b44full, 0x2dd0full, 0x497d639c8f46ull, 0xe135ull, -0xbcf297b8f0dbfe15ull, 0xcf17ull, 0xe992af0ca1abull, 0x32b8ull, -0x96c3ae70323ef14bull, 0xbbdcull, 0xcd7329b68d81ull, 0x1b6full, -0xdc1a13cfa4d3cb71ull, 0xdb16ull, 0x1012fe5ed296full, 0x46e7ull, -0xa1d40a2986f40607ull, 0x8067ull, 0x142a473fdb7beull, 0x1895ull, -0x227f92ef6daab68dull, 0x15ecull, 0x192dda5d5ed25ull, 0xf71ull, -0xc0a4a7810015ee83ull, 0x6064ull, 0x1ffa220762fc8ull, 0x4463ull, -0xd38b6eb9f0e71b69ull, 0x1909ull, 0x8732ce2cc77f4ull, 0xfd5ull, -0x2e588bdb751a66bfull, 0x229cull, 0x156d025c70d97ull, 0x10bbull, -0xd90f7e11dcbd1605ull, 0x760ull, 0x1d6e934381ba2eull, 0x2c5ull, -0x60ab67a4e5aeabbull, 0x1bf7ull, 0x374f26f3e3edull, 0x210ull, -0x224f627be76a8261ull, 0x4f4ull, 0x6ed4d3882b567ull, 0x35ull, -0x300d1ab91bd0b677ull, 0xe9cull, 0x34a002fb76e63ull, 0x823ull, -0x2a63d80e0c52fc7dull, 0x32ull, 0xd90970ebc4383full, 0x2full, -0xb0e94bbc1f90c5f3ull, 0x3b3ull, 0x2fd2ef70381c52ull, 0x29dull, -0x2b5dc22562dbe059ull, 0x30aull, 0xe45055015fff5ull, 0x1c7ull, -0x4a7fd1078807d52full, 0x18dull, 0x300a32f60677d4ull, 0x16bull, -0x41a01ee8ab0849f5ull, 0x13cull, 0x352a3971f57e9dull, 0x29ull, -0x95a7287ad5f6602bull, 0x1d0ull, 0x529130d1034a23ull, 0xbbull, -0x723bacc76bd51551ull, 0x16ull, 0x53142091089af83ull, 0xfull, -0x81c49febaa2ca2e7ull, 0xcdull, 0xa20d44956f5bf4ull, 0x83ull, -0x11593d6b3f54de6dull, 0x63ull, 0x2cdc6b1a7f9078ull, 0x5ull, -0x756c82d6f7069963ull, 0x5cull, 0x146bea3ba565525ull, 0x17ull, -0xda882ab2a88c0149ull, 0x1bull, 0x8180194d6d5c728ull, 0x11ull, -0xbb03671751a7ff9full, 0x20ull, 0x5d81b38ba8d3ffcull, 0x1full, -0x6884fa0a8f0c99e5ull, 0x12ull, 0x5ce7fab40d6088cull, 0xdull, -0x5052a2953c528441ull, 0x7ull, 0xb7984f0bf79809bull, 0x4ull, -0x58dd1583185ecb57ull, 0x9ull, 0x9dfad0e90ee1697ull, 0x8ull, -0xaa6870c376df5c5dull, 0x3ull, 0x38cd7aebd24a741full, 0x0ull, -0x4b21d01617167e39ull, 0x2ull, 0x2590e80b0b8b3f1cull, 0x1ull, -}; - -int main(void) -{ - uint64_t x, y, div, mod; - int i; - - for (i = 0; i < sizeof t/sizeof *t; i++) { - x = t[i].x; - y = t[i].y; - div = x / y; - mod = x % y; - if (div != t[i].div) - t_error("udiv %llu/%llu want %llu got %llu\n", x, y, t[i].div, div); - if (mod != t[i].mod) - t_error("umod %llu%%%llu want %llu got %llu\n", x, y, t[i].mod, mod); - } - - printf("%s finished\n", __FILE__); - return t_status; -} diff --git a/programs/develop/ktcc/trunk/libctest/ungetc.c b/programs/develop/ktcc/trunk/libctest/ungetc.c deleted file mode 100644 index d658c199c7..0000000000 --- a/programs/develop/ktcc/trunk/libctest/ungetc.c +++ /dev/null @@ -1,114 +0,0 @@ -#include -#include -#include -//#include -//#include -//#include -#include "test.h" - -#define TEST(r, f, x, m) ( \ - errno = 0, ((r) = (f)) == (x) || \ - (t_error("%s failed (" m ")\n", #f, r, x, strerror(errno)), 0) ) - -#define TEST_S(s, x, m) ( \ - !strcmp((s),(x)) || \ - (t_error("[%s] != [%s] (%s)\n", s, x, m), 0) ) - -#include -#include -#include -#include - -#define fgetc fgetc_dbg -#define ungetc ungetc_dbg - - -int fgetc_dbg(FILE* file) -{ - int c = 0, rc; - - rc = fread(&c, 1, 1, file); - - if (rc < 1) return EOF; - - return c; -} - -int ungetc_dbg(int c,FILE* file) -{ - dword res; - - if(!file) - { - errno = E_INVALIDPTR; - return EOF; - } - - if ((file->mode & 3!=FILE_OPEN_READ) && (file->mode & FILE_OPEN_PLUS==0)) - { - errno = E_ACCESS; - return EOF; - } - - if (file->filepos>file->filesize || file->filepos==0 || c == EOF || file->ungetc_buf != EOF) - { - errno = E_EOF; - return EOF; - } - - file->ungetc_buf = c; - file->filepos--; - - return c; -} - -void mark(int n) -{ - n++; -} - - -int main(void) -{ - int i; - char a[100]; - FILE *f; - - TEST(i, !(f = fopen("_tmpfile.tmp","w+")), 0, "failed to create temp file %d!=%d (%s)"); - - if (!f) return t_status; - - TEST(i, fprintf(f, "hello, world\n"), 13, "%d != %d (%m)"); - TEST(i, fseek(f, 0, SEEK_SET), 0, "%d != %d (%m)"); - - TEST(i, feof(f), 0, "%d != %d"); - TEST(i, fgetc(f), 'h', "'%c' != '%c'"); - TEST(i, ftell(f), 1, "%d != %d"); - TEST(i, ungetc('x', f), 'x', "%d != %d"); - TEST(i, ftell(f), 0, "%d != %d"); - TEST(i, fscanf(f, "%[h]", a), 0, "got %d fields, expected %d"); - TEST(i, ftell(f), 0, "%d != %d"); -mark(0x11); -printf("debug file ungetbuf=%d\n", f->ungetc_buf); - TEST(i, fgetc(f), 'x', "'%c' != '%c'"); - TEST(i, ftell(f), 1, "%d != %d"); - - TEST(i, fseek(f, 0, SEEK_SET), 0, "%d != %d"); - TEST(i, ungetc('x', f), 'x', "%d != %d"); -mark(0x22); - TEST(i, fread(a, 1, sizeof a, f), 14, "read %d, expected %d"); - a[14] = 0; - TEST_S(a, "xhello, world\n", "mismatch reading ungot character"); - - TEST(i, fseek(f, 0, SEEK_SET), 0, "%d != %d"); - TEST(i, fscanf(f, "%[x]", a), 0, "got %d fields, expected %d"); - TEST(i, ungetc('x', f), 'x', "unget failed after fscanf: %d != %d"); - TEST(i, fgetc(f), 'x', "'%c' != '%c'"); -mark(0x33); - TEST(i, ftell(f), 1, "%d != %d"); - TEST(i, fgetc(f), 'h', "'%c' != '%c'"); - - printf("%s finished\n", __FILE__); - fclose(f); - return t_status; -} diff --git a/programs/develop/ktcc/trunk/libctest/ungetc2.c b/programs/develop/ktcc/trunk/libctest/ungetc2.c deleted file mode 100644 index 8f4b44df81..0000000000 --- a/programs/develop/ktcc/trunk/libctest/ungetc2.c +++ /dev/null @@ -1,39 +0,0 @@ -/* ungetc example */ -#include - -void trace_file(FILE* f, char* cmt); - -int main () -{ - FILE * pFile; - int c; - char buffer [256]; - - pFile = fopen ("myfile.txt","rt"); - if (pFile==NULL) perror ("Error opening file"); - else while (!feof (pFile)) { - trace_file(pFile, "1"); - - c=getc (pFile); - - trace_file(pFile, "before ungetc"); - - if (c == EOF) break; - if (c == '#') ungetc ('@',pFile); - else ungetc (c,pFile); - - trace_file(pFile, "after"); - - if (fgets (buffer,255,pFile) != NULL) - puts (buffer); - else break; - } - return 0; -} - -void trace_file(FILE* f, char* cmt) -{ - printf("%s[%s]\n", cmt, f->buffer); - printf("mode=%0X, filesize=%d, filepos=%d\n", f->mode, f->filesize, f->filepos); - printf("ungetc=%d, buffer_start=%d, buffer_end=%d\n", f->ungetc_buf, f->buffer_start, f->buffer_end); -} \ No newline at end of file diff --git a/programs/develop/ktcc/trunk/libctest/wtalloc.c b/programs/develop/ktcc/trunk/libctest/wtalloc.c deleted file mode 100644 index 9f45e97de7..0000000000 --- a/programs/develop/ktcc/trunk/libctest/wtalloc.c +++ /dev/null @@ -1,131 +0,0 @@ -#include -#include -#include -#include - -// suballocator functions -extern void* wtmalloc(size_t size); -extern void wtfree(void *pointer); -extern void* wtrealloc(void* pointer, size_t size); -extern void* wtcalloc (size_t num, size_t size); -extern int wtmalloc_freelist_check(); -extern int wtmalloc_poiner_check(void *ptr); -extern void wtdump_alloc_stats(); - -#ifdef __GNUC__ -void* sysmalloc(size_t sz) -{ - return malloc(sz); -} -#endif - - - -#define NUMPTR 10000 - -char *pointers[NUMPTR]; -char values[NUMPTR]; -int sizes[NUMPTR]; - -int checkvalues() -{ - for (int i = 0; i < NUMPTR; i++) - { - if (!pointers[i]) continue; - assert(wtmalloc_poiner_check(pointers[i])); - - for (int j = 0; j < sizes[i]; j++) - assert(pointers[i][j] == values[i]); - } - return 1; -} - - -int main() -{ - char *ptr; - int i, sz; - - puts("Test started"); - - // test start settings - assert(wtmalloc_freelist_check()); - // test just single alloc/dealloc - ptr = wtmalloc(1000); - assert(wtmalloc_poiner_check(ptr)); - wtfree(ptr); - assert(wtmalloc_freelist_check()); - - puts("test allocation started"); - // test allocation - for (i = 0; i < NUMPTR; i++) - { - sz = rand() % 4200; - pointers[i] = wtmalloc(sz); - sizes[i] = sz; - values[i] = sz % 256; - memset(pointers[i], values[i], sz); - - assert(wtmalloc_freelist_check()); - } - assert(checkvalues()); - - puts("test random deallocation started"); - // random deallocation - for (i = 0; i < NUMPTR; i++) - { - sz = rand() % 2; - if (sz) - { - wtfree(pointers[i]); - pointers[i] = NULL; - } - } - assert(wtmalloc_freelist_check()); - assert(checkvalues()); - - puts("test allocation in free list gaps started"); - // test allocation in free list gaps - for (i = 0; i < NUMPTR; i++) - { - if (pointers[i]) continue; - - sz = rand() % 4200; - pointers[i] = wtmalloc(sz); - sizes[i] = sz; - values[i] = sz % 256; - memset(pointers[i], values[i], sz); - } - assert(wtmalloc_freelist_check()); - assert(checkvalues()); - - puts("test realloc started"); - // test realloc - for (i = 0; i < NUMPTR; i++) - { - sz = rand() % 4200; - pointers[i] = wtrealloc(pointers[i], sz); - - sizes[i] = sz; - memset(pointers[i], values[i], sz); - } - assert(wtmalloc_freelist_check()); - assert(checkvalues()); - - - puts("test full deallocation started"); - // full deallocation - for (i = 0; i < NUMPTR; i++) - { - wtfree(pointers[i]); - pointers[i] = NULL; - } - assert(wtmalloc_freelist_check()); - - wtdump_alloc_stats(); - - printf("\ntests all OK\n"); - - return 0; - -} diff --git a/programs/develop/ktcc/trunk/readme.txt b/programs/develop/ktcc/trunk/readme.txt deleted file mode 100644 index e19658e259..0000000000 --- a/programs/develop/ktcc/trunk/readme.txt +++ /dev/null @@ -1,125 +0,0 @@ -see -source/readme.* -source/changelog -source/tcc-doc.info or .texi - -building Kolibri version ->make -f Makefile.kos32 - -========= for compiler developers ========= -read .\source\readme_kos32.txt - ------- TODO ------- --more libc stardard functions. see report below --more Kolibly SysFn wrappers. see \libc\KOSfuncs_inc_status.txt --add stdin, stderr, stdout emulation íå õâàòàåò stdin, stdout - ìîæíî ñäåëàòü êàê stderr!, íî íàäî âîçèòüñÿ çàîäíî ñ ferror & feof --getchar, gets if returs errorcode (0, null) - you must exit program, because of closed console window --ïðè íîðìàëüíîì âûõîäå çàêðûâàòü êîíñîëü - - ------- errors ------ --åñëè ïðîåêò ìíîãîôàéëîâûé - .dbg ãåíåðèò äóáëèðóþùèåñÿ ìåòêè äàííûõ, òèïà L.78 ìîæåò óêàçûâàòü íà äðóãîé ñåãìåíò ( --.dbg sometimes generated improperly for source code labels - ------ fixed errors ------ --if static var sized more than 14096+ -> crash compiled .exe (kos) -(^ default stack size set at compile time tccmeos:177 is below 4k) -FIX - use -stack=1280000 option --con_set_title is NULL. fixed 180128 --not working: default search path are ./include ./lib from executable (under KOS need to use -Bpath_to_ktcc) ---start.o not found using -B (kos) - put near your.c file fixed 181027 - - - -========= libc =========== --no "finished" in title of console program after exit console - use con_exit() --used system memory allocator (4096 bytes minimum) - - -libc not complete. overall status: -no files: -limits.h -locale.h -setjmp.h -signal.h -wchar.h -wctype.h - - - -functions absent list: - -stdio.h: -remove -rename -tmpfile -tmpnam -freopen -setbuf -setvbuf - - -stdlib.h: -atexit -getenv -system -bsearch -qsort -mblen -mbtowc -wctomb -mbstowcs -wcstombs - -string.h: -strxfrm - -time.h: - needs include kos32sys1.h -asctime -ctime -gmtime -localtime - non standard -strftime - - - - - - - Status or libc tests - ----FAILED--- -strtoul incorrect work with big unsigned > MAX_LONG - - ----NOT TESTED--- -no library fns realized -qsort -time - ----HANG--- -sscanf ->TEST_F(0x1234p56) - no %a formats - - ----STACK IS SMALL--- -use new -stack=1280000 option to pass test -tstring -strtodlong - - ---other-- -fscanf --?scanf ignores width specs, '*' and [chars], cant read %a float --%n counts as parameter - -snprintf --some format misturbances --may incorrect prints unsigned > 2147483647L - -ungetc --ungetc fails if filepos == 0 - by design - -all file ops limited to 2Gb - - diff --git a/programs/develop/ktcc/trunk/samples/Makefile b/programs/develop/ktcc/trunk/samples/Makefile deleted file mode 100755 index a97b8c7443..0000000000 --- a/programs/develop/ktcc/trunk/samples/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -CC=../bin/kos32-tcc -CFLAGS= -I ../libc/include - -all: - $(CC) $(CFLAGS) asm_ex.c -lck -o asm_ex.kex - $(CC) $(CFLAGS) consoleio.c -lck -o consoleio.kex - $(CC) $(CFLAGS) files.c -lck -o files.kex - $(CC) $(CFLAGS) winbasics.c -lck -o winbasics.kex - $(CC) $(CFLAGS) dynamic.c -lck -lhttp -linputbox -o dynamic.kex - $(CC) $(CFLAGS) load_coff.c -o load_coff.kex -lck - $(CC) $(CFLAGS) graphics.c -lck -lgb -o graphics.kex - $(CC) $(CFLAGS) dir_example.c -lck -o dir_example.kex - $(CC) $(CFLAGS) getopt_ex.c -lck -o getopt_ex.kex - - $(CC) $(CFLAGS) clayer/msgbox.c -lck -lmsgbox -o clayer/msgbox.kex - $(CC) $(CFLAGS) clayer/rasterworks.c -lck -lrasterworks -o clayer/rasterworks.kex - $(CC) $(CFLAGS) clayer/boxlib.c -lck -lbox -o clayer/boxlib.kex - $(CC) $(CFLAGS) clayer/libimg.c -lck -limg -o clayer/libimg.kex - $(CC) $(CFLAGS) clayer/dialog.c -lck -ldialog -o clayer/dialog.kex - - $(CC) $(CFLAGS) net/tcpsrv_demo.c -lck -o net/tcpsrv_demo.kex - $(CC) $(CFLAGS) net/nslookup.c -lck -lnetwork -o net/nslookup.kex - $(CC) $(CFLAGS) net/http_tcp_demo.c -lck -lnetwork -o net/http_tcp_demo.kex - - $(CC) $(CFLAGS) tinygl/fps.c tinygl/gears.c -o tinygl/gears.kex -ltinygl -lck - -clean: - rm *.kex clayer/*.kex net/*.kex tinygl/*.kex diff --git a/programs/develop/ktcc/trunk/samples/asm_ex.c b/programs/develop/ktcc/trunk/samples/asm_ex.c deleted file mode 100644 index 2a0bc40313..0000000000 --- a/programs/develop/ktcc/trunk/samples/asm_ex.c +++ /dev/null @@ -1,68 +0,0 @@ -/* examples for interoperability with assembler - -1. Calling assembler code from .c : see in libc\math any .asm file -2. Using inline assembler: see \include\kos32sys1.h and libc\math\fmod.c -- https://gcc.gnu.org/onlinedocs/gcc-4.8.5/gcc/Extended-Asm.html -- not all constraints from gcc are supported, no "f" or "t" for example -- not supported clobberring st registers, must manual add "fstp %%st" at end or similar -- need full suffixes for opcodes, fstpl but not fstp - -3. Calling c functions from .asm: see \libc\start\start.asm:99 -Remember: -- small ints always passed as int32, floating point params as 64-bit -- returned structs passed on stack with additional hidden 1st param -- c functions can use EAX, ECX, EDX without warnings -- .c default is cdecl calling convention https://en.wikipedia.org/wiki/X86_calling_conventions -- dont use fastcall calling convention, tinycc realized it non-conformant way -- tinycc supports only ELF object files - -tcc can be used as a linker -*/ - - - - -#include -#include - - -main() -{ - int i; - for (i = 0; i < 20; i++) - { - printf("------------------------------------------------------\n"); - printf ( "remainder of 5.3 / 2 is %f\n", remainder (5.3,2) ); - printf ( "remainder of 18.5 / 4.2 is %f\n", remainder (18.5,4.2) ); -//remainder of 5.3 / 2 is -0.700000 -//remainder of 18.5 / 4.2 is 1.700000 - - printf ( "fmod of 5.3 / 2 is %f\n", fmod (5.3,2) ); - printf ( "fmod of 18.5 / 4.2 is %f\n", fmod (18.5,4.2) ); -// fmod of 5.3 / 2 is 1.300000 -// fmod of 18.5 / 4.2 is 1.700000 - - double param, fractpart, intpart, result; - int n; - - param = 3.14159265; - fractpart = modf (param , &intpart); - printf ("%f = %f + %f \n", param, intpart, fractpart); -//3.141593 = 3.000000 + 0.141593 - - param = 0.95; - n = 4; - result = ldexp (param , n); - printf ("%f * 2^%d = %f\n", param, n, result); -//0.950000 * 2^4 = 15.200000 - - param = 8.0; - result = frexp (param , &n); - printf ("%f = %f * 2^%d\n", param, result, n); -//8.000000 = 0.500000 * 2^4 - param = 50; - result = frexp (param , &n); - printf ("%f = %f * 2^%d\n", param, result, n); - - } -} \ No newline at end of file diff --git a/programs/develop/ktcc/trunk/samples/build_all.sh b/programs/develop/ktcc/trunk/samples/build_all.sh deleted file mode 100644 index baf5c3c644..0000000000 --- a/programs/develop/ktcc/trunk/samples/build_all.sh +++ /dev/null @@ -1,23 +0,0 @@ -#SHS -/sys/@notify 'Build in progress...\nYou will find binaries in /tmp0/1/tccbin' -I -mkdir /tmp0/1/tccbin -../tcc asm_ex.c -lck -o /tmp0/1/tccbin/asm_ex -../tcc consoleio.c -lck -o /tmp0/1/tccbin/consoleio -../tcc files.c -lck -o /tmp0/1/tccbin/files -../tcc winbasics.c -lck -o /tmp0/1/tccbin/winbasics -../tcc dynamic.c -lck -lhttp -linputbox -o /tmp0/1/tccbin/dynamic -../tcc load_coff.c -o /tmp0/1/tccbin/load_coff -lck -../tcc clayer/msgbox.c -lck -lmsgbox -o /tmp0/1/tccbin/msgbox -../tcc graphics.c -lck -lgb -o /tmp0/1/tccbin/graphics -../tcc clayer/rasterworks.c -lck -lrasterworks -o /tmp0/1/tccbin/rasterworks -../tcc clayer/boxlib.c -lck -lbox -o /tmp0/1/tccbin/boxlib_ex -../tcc clayer/libimg.c -lck -limg -o /tmp0/1/tccbin/libimg_ex -cp clayer/logo.png /tmp0/1/tccbin/logo.png -../tcc clayer/dialog.c -lck -ldialog -o /tmp0/1/tccbin/dialog_ex -../tcc dir_example.c -lck -o /tmp0/1/tccbin/dir_example -../tcc net/tcpsrv_demo.c -lck -o /tmp0/1/tccbin/tcpsrv_demo -../tcc net/nslookup.c -lck -lnetwork -o /tmp0/1/tccbin/nslookup -../tcc net/http_tcp_demo.c -lck -lnetwork -o /tmp0/1/tccbin/http_tcp_demo -../tcc getopt_ex.c -lck -o /tmp0/1/tccbin/getopt_ex -../tcc tinygl/fps.c tinygl/gears.c -o /tmp0/1/tccbin/gears -ltinygl -lck -exit diff --git a/programs/develop/ktcc/trunk/samples/clayer/boxlib.c b/programs/develop/ktcc/trunk/samples/clayer/boxlib.c deleted file mode 100644 index 39f01d023d..0000000000 --- a/programs/develop/ktcc/trunk/samples/clayer/boxlib.c +++ /dev/null @@ -1,110 +0,0 @@ -// BOXLIB EXAMPLE (scrollbar, progressbar, editbox and checkbox) -// Writed by maxcodehack and superturbocat2001 - -#include -#include -#include -#include -#include - -#define WIN_W 640 -#define WIN_H 563 - -#define ED_BUFF_LEN 50 -#define TEXT_SIZE 0x10000000 -#define SCROLL_BUTTON_SIZE 15 -#define SCROLL_MAX_LEN 215 -#define BLACK 0x000000 -#define WHITE 0xFFFFFF -#define BLUE 0x0000FF - -uint32_t wheels; -char* title = "Boxlib example"; -char ed_buff[ED_BUFF_LEN]; - - -scrollbar scroll = {15, WIN_W - 26, WIN_H - 29, 0, 0, 2, 215, SCROLL_BUTTON_SIZE, 0,0x707070,0xD2CED0,0x555555}; -progressbar pg = {0, 10, 10, 270, 35, 1, 0, 200, 0xB4B4B4, 0x2728FF, 0xA9A9A9}; -edit_box ed={WIN_W-140,10,60,0xFFFFFF,0x6a9480,0,0x6a9480, BLACK | TEXT_SIZE, ED_BUFF_LEN, ed_buff,NULL,ed_focus}; -check_box output_off={X_W(10, 15), Y_H(120,15), 10, WHITE, BLUE, BLACK | TEXT_SIZE, "Disable duplicate output",0}; - -void draw_window(){ - BeginDraw(); - DrawWindow(215,100,WIN_W,WIN_H,title, 0x858585, 0x34); - edit_box_draw(&ed); - check_box_draw2(&output_off); - if(!output_off.flags) - { - draw_text_sys(ed_buff, 10, 90, strlen(ed_buff), BLACK | TEXT_SIZE); - } - scrollbar_v_draw(&scroll); - progressbar_draw(&pg); - EndDraw(); -} - -//// EVENTMASK -#define EVM_REDRAW 1 -#define EVM_KEY 2 -#define EVM_BUTTON 4 -#define EVM_EXIT 8 -#define EVM_BACKGROUND 16 -#define EVM_MOUSE 32 -#define EVM_IPC 64 -#define EVM_STACK 128 -#define EVM_DEBUG 256 -#define EVM_STACK2 512 -#define EVM_MOUSE_FILTER 0x80000000 -#define EVM_CURSOR_FILTER 0x40000000 -//// EVENTMASK - - -int main() -{ - kolibri_boxlib_init(); - init_checkbox2(&output_off); - set_event_mask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE+EVM_MOUSE_FILTER); - while(1) - { - switch(GetOsEvent()) - { - case KOLIBRI_EVENT_BUTTON: - if (get_os_button() == 1) exit(0); - break; - - case KOLIBRI_EVENT_KEY: - edit_box_key(&ed, get_key().val); - draw_window(); - break; - - case KOLIBRI_EVENT_REDRAW: - draw_window(); - break; - case KOLIBRI_EVENT_MOUSE: - edit_box_mouse(&ed); - scrollbar_v_mouse(&scroll); - pg.value = scroll.position; - progressbar_draw(&pg); - check_box_mouse2(&output_off); - unsigned int scroll_strong = 10; - wheels = GetMouseWheels(); - if(wheels & 0xFFFF) - { - if((short)wheels > 0){ - scroll.position += scroll_strong; - if(scroll.position>scroll.max_area-scroll.cur_area) - { - scroll.position=scroll.max_area-scroll.cur_area; - } - } - else if((short)wheels < 0 && scroll.position > 0){ - scroll.position -= scroll_strong; - if((int)scroll.position<0){ - scroll.position=0; - } - } - scrollbar_v_draw(&scroll); - } - break; - } - } -} diff --git a/programs/develop/ktcc/trunk/samples/clayer/dialog.c b/programs/develop/ktcc/trunk/samples/clayer/dialog.c deleted file mode 100644 index 5ee125fecd..0000000000 --- a/programs/develop/ktcc/trunk/samples/clayer/dialog.c +++ /dev/null @@ -1,32 +0,0 @@ -#include -#include -#include - -int main() -{ - kolibri_dialog_init(); // dialog init - open_dialog *dlg_open = kolibri_new_open_dialog(OPEN, 10, 10, 420, 320); // create opendialog struct - OpenDialog_init(dlg_open); // Initializing an open dialog box. - OpenDialog_start(dlg_open); // Show open dialog box - - color_dialog *color_select = kolibri_new_color_dialog(SELECT, 10, 10,420,320); // create colordialog struct - ColorDialog_init(color_select); // Initializing an color dialog box. - ColorDialog_start(color_select); // Show color dialog - - if(dlg_open->status == SUCCESS){ - printf("File selected '%s'\n",dlg_open->openfile_path); - }else{ - puts("No file selected!"); - } - - if(color_select->status == SUCCESS){ - printf("Color selected: #%06X\n",color_select->color); - RGB color_rgb = (RGB)color_select->color; - printf("Red:%d Green:%d Blue:%d", color_rgb.red, color_rgb.green, color_rgb.blue); - }else{ - puts("No color selected!"); - } - - free(dlg_open); - free(color_select); -} diff --git a/programs/develop/ktcc/trunk/samples/clayer/libimg.c b/programs/develop/ktcc/trunk/samples/clayer/libimg.c deleted file mode 100755 index 299ed763be..0000000000 --- a/programs/develop/ktcc/trunk/samples/clayer/libimg.c +++ /dev/null @@ -1,97 +0,0 @@ -/* Written by turbocat2001 (Logaev Maxim) */ - -#include -#include -#include -#include -#include - -#define NEW_IMG_H 128 -#define NEW_IMG_W 128 - -#define IMG_H 256 -#define IMG_W 256 - -Image *image_blend; // Create image struct - -struct kolibri_system_colors sys_color_table; // Create system colors table - -char* load_img(char* fname, int32_t* read_sz){ // Image file upload function - FILE *f = fopen(fname, "rb"); - if (!f) { - printf("Can't open file: %s\n", fname); - exit(0); - } - if (fseek(f, 0, SEEK_END)) { - printf("Can't SEEK_END file: %s\n", fname); - exit(0); - } - int filesize = ftell(f); - rewind(f); - char* fdata = malloc(filesize); - if(!fdata) { - printf("No memory for file %s\n", fname); - exit(0); - } - *read_sz = fread(fdata, 1, filesize, f); - if (ferror(f)) { - printf("Error reading file %s\n", fname); - exit(0); - } - fclose(f); - return fdata; -} - -void DrawGUI(){ - BeginDraw(); - DrawWindow(10, 40, (IMG_W+NEW_IMG_W)+50, IMG_H+50, "Libimg", sys_color_table.work_area, 0x34); - img_draw(image_blend, 10, 10, IMG_W*2, IMG_H , 0, 0); // Draw blended image to window - EndDraw(); -} - -int main(){ - if (kolibri_libimg_init() == -1){ - printf("Error loading lib_img.obj\n"); - exit(0); - } - - get_system_colors(&sys_color_table); // Get system colors theme - set_event_mask(0xC0000027); - - uint32_t img_size; - void *file_data = load_img("logo.png", &img_size); // Get RAW data and size - - Image* image = img_decode(file_data, img_size, 0); // Decode RAW data to Image data - - if (image->Type != IMAGE_BPP32) { - image = img_convert(image, NULL, IMAGE_BPP32, 0, 0); // Convert image to format BPP32 - if (!image) { - printf("Сonvert error!: \n"); - exit(0); - } - } - - image_blend = img_create(IMG_W+NEW_IMG_W, IMG_H, IMAGE_BPP32); // Create an empty layer - img_fill_color(image_blend, IMG_W+NEW_IMG_W, IMG_H, sys_color_table.work_area); // Fill the layer with one color - img_blend(image_blend, image, 0, 0, 0, 0, IMG_W, IMG_H); // Blending images to display the alpha channel. - /* Reduce image size from 256x256 to 128x128 */ - image = img_scale(image, 0, 0, IMG_W, IMG_H, NULL, LIBIMG_SCALE_STRETCH , LIBIMG_INTER_BILINEAR, NEW_IMG_W, NEW_IMG_H); - img_blend(image_blend, image, 256, 0, 0, 0, NEW_IMG_W, NEW_IMG_H); - img_destroy(image); // Destroy image structure - free(file_data); // Free allocated file_data buffer - - /* Main event loop */ - while (1) { - switch(get_os_event()){ - case KOLIBRI_EVENT_REDRAW: - DrawGUI(); - break; - case KOLIBRI_EVENT_BUTTON: - if (get_os_button() == 1){ - return 0; - } - break; - } - } - exit(0); -} diff --git a/programs/develop/ktcc/trunk/samples/clayer/logo.png b/programs/develop/ktcc/trunk/samples/clayer/logo.png deleted file mode 100644 index 5a1285f74737fd9cc1417db4f6940eb5903fbb44..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 52385 zcma%CQIFnOGQ4mjwG}Xnh7*Gj2kAa?0|mlRju3`VFi!`7fq*f~ zQ&5=Udsb9*Kfg<;yf-AiuO-R!|o$i$-INJPT_ z&xIjF@QYaw&^^Cjr}q~|>4*&AwuyVU=yM=tlCQv9v53z7b@1{iN-y1{=V1fk@$H;W zlkjE94L$8<2^#rVuK*Ch>9(=pgnBjAt$0?`(kK{77)Tfi}u${OfK*Z5X*sL zDApeM0xRnPL-)rR+451;Ra;Juu#b~+K}7{OHXHW&olFke?jh>oM%_wvonOO=OdmEGH&dVMWp+$b2PIRGgi@`ha}XW7O06`|ILs*mi3{O-~u8 z9CXjW+wirKxvN{)d&A)KC-8E}9O`ovCNHlRwVwGkzlVGl3Al-sYwNTA#6+hW&q$MH z-m#@vVjiBmkG-u{F2}DjL|Ev87`agqL#EEp#Z*nVMRrkRB0FB98At~Hao*PjIRj24 z;sqf7-!D%l)1%t6am9F@NA;8IUzfL9zu&0i-|CDga_nKt%LW=qR7?tZKmP6Wt6%_a zP!Oy-?vo(ex##6`bu_kWwZcdt+@#j3=l#>76FmX;mbJerXbjg>LS=hOll2_dL9E_R zFN?xs?V!5!zFA?&WsP~_ALPMt-SY^=vGa>@lFxcFAhnFaQe#qnb*|OeoYmApV;U@= zf(d}(`#E@so7*5q>xA=(qxaCk0tWBL3JD&B@3U?K&z(WDshvI?c~U*fUr}OQI|q7~ z7857Cx!9kJVlomw6*g-5T*OYJ+BE^%o#7Ti`-oQeau-;2G} zdcU(;a(32=y&Nn^nP1-5%*G251`KXu$BawXvM1p9-ZLNPFn)^EUcUHLn6?8>ec!8N zQ!=kQtjK7_vi5yc}#v*?<^M%oJZ6#mFdVAj_6wdQ8d`pvHZfD=03EU287nq)kVK&!<4zGctwz z?s~cF5wPW;Fuavmcl*4!{pNf^g;4ecA{F?=#E@;euC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VZuB5Y;$3xWMxfe{oT!?^IXR&mSKL1?Hj#X>^dM1iIpAk%m*g%GO z-8y`3#fdHiX84N+44>9#F(yZRC6c3=0ysiqR6)k@xFTFtI$T~4G+pO}5CK3iZi~M* zP#&9BRMeBVyZiP6XmDQ5V|o4qK8ocnGb;%CG@okaa(S2*MOm@Oo*!`P3Kg23JE5p3 z%Ip!}HpmfQiR9=R04HA%6@E{CAZul21xmMo(KjgPssM<^1>qdLHc;MMW_Uv;rM-%x zyzk`uyB+Tw9^v^%9m%a+HD7Rm`!rX^rK^b|&Al0_3Qbc45kf#vFbHUz@L44lA;!hX zR^K)ZxBAKvUy0;M8-P1j%@>3Vp0k*xY9uu`P_e>G_*S<-i(es;ImN+-GQ-o(80%0J zrD25l_u+u~`|(0^!G$RHxvkFrL33_!!Ztr}KjmCu5QK7oa)#4OCUj{Ui7_F%4ruk2 ztGy(WkLJ`rI;&Q0Q;9;{Do{>9rYi)eae3DqGVMeiioP_9l>|OzGx!>yC7!)5Ff@f-?3`GShaE+<6PtehAaA6 zW8xZ>;C1F08Iy5F2*H~Dm9_%{=TXD9%41@H-=NC3qEypEAcIl>=wK1-hWOC%qWL%tf!5nDm*87Kcv zIG#U+;r{!>$;Sl%ivwvfoL02LKJM$q@O-}%zeMtJMgU_(17jHo9KrWjoLAwqxbqTH z{1VAAGyoq5N889qBoc{4B9TZW5{X12kw_#Gi9{liNF)-8L?V$$Boc{4a$NGip6Uwk TwByTD00000NkvXXu0mjfGWt2R diff --git a/programs/develop/ktcc/trunk/samples/clayer/msgbox.c b/programs/develop/ktcc/trunk/samples/clayer/msgbox.c deleted file mode 100644 index 7ccd9369eb..0000000000 --- a/programs/develop/ktcc/trunk/samples/clayer/msgbox.c +++ /dev/null @@ -1,8 +0,0 @@ -#include - -int main() -{ - msgbox *msg1 = NULL; - msg1 = kolibri_new_msgbox("Title", "Text in window", 0, "Ok"); - kolibri_start_msgbox(msg1, NULL); -} diff --git a/programs/develop/ktcc/trunk/samples/clayer/rasterworks.c b/programs/develop/ktcc/trunk/samples/clayer/rasterworks.c deleted file mode 100644 index 145cf47fcd..0000000000 --- a/programs/develop/ktcc/trunk/samples/clayer/rasterworks.c +++ /dev/null @@ -1,55 +0,0 @@ -#include -#include -#include -#include -#include - -// Sizes -int x_size = 768, y_size = 256; - -// Out example string -char* string = "Пример/Example"; - -int main() -{ - // Count length - int ln_str = countUTF8Z(string, -1); - - // Create image buffer - void *buffi = malloc(x_size * y_size * 3 * sizeof(char) + 8); - - // Set sizes - *((int*)buffi) = x_size; - *((int*)buffi+1) = y_size; - - // Fill color - memset((char*)buffi + 8, 0xFF, x_size * y_size * 3); - - // Draw text on buffer - drawText(buffi, 5, 0, string, ln_str, 0xFF000000, 0x30C18); - drawText(buffi, 5, 32, string, ln_str, 0xFF000000, 0x1030C18); - drawText(buffi, 5, 64, string, ln_str, 0xFF000000, 0x2030C18); - drawText(buffi, 5, 96, string, ln_str, 0xFF000000, 0x4030C18); - drawText(buffi, 5, 128, string, ln_str, 0xFF000000, 0x8030C18); - drawText(buffi, 5, 160, string, ln_str, 0xFF000000, 0x0F031428); - - while (1) - { - switch (get_os_event()) - { - case 1: - BeginDraw(); - DrawWindow(50, 50, 800, 300, "Rasterworks Example", 0x999999, 0x34); - DrawBitmap(buffi + 8, 10, 10, 768, 256); - EndDraw(); - break; - case 2: - get_key(); - break; - case 3: - if (get_os_button() == 1) exit(0); - break; - }; - } - return 0; -} diff --git a/programs/develop/ktcc/trunk/samples/consoleio.c b/programs/develop/ktcc/trunk/samples/consoleio.c deleted file mode 100644 index f2d72c9c80..0000000000 --- a/programs/develop/ktcc/trunk/samples/consoleio.c +++ /dev/null @@ -1,23 +0,0 @@ -// demonstration conio use, color text -// more info in conio.h - -#include - -int main() -{ - int i; - if (con_init_console_dll()) return 1; // init fail - -// con_write_asciiz("\033[0;31;42m test \n"); // red on green bk - - for(i = 30; i < 48; i++) - { - con_printf("\033[%dmColor 0x%02X: ", i, i); - con_write_asciiz("Text sample."); - - con_printf(" printf %s test %d\n", "small", i); - - } - - con_exit(0); -} \ No newline at end of file diff --git a/programs/develop/ktcc/trunk/samples/dir_example.c b/programs/develop/ktcc/trunk/samples/dir_example.c deleted file mode 100644 index 3a8260c45f..0000000000 --- a/programs/develop/ktcc/trunk/samples/dir_example.c +++ /dev/null @@ -1,41 +0,0 @@ -#include -#include -#include -#include - -int main() -{ - char *path=getcwd(NULL, PATH_MAX); - printf("Current directory: %s\n", path); - if(true==mkdir("test")){ - puts("Test folder created!"); - } - else{ - puts("Error creating folder!"); - } - short_file_info *info; - int num = lsdir(path, &info); - if(num==FS_ERROR) - { - puts("File system error."); - return -1; - } - printf("Objects in the folder: %d\n", num); - for(int j=0; j -#include -#include - -#define OK 200 - -int main() { - if (con_init_console_dll()) return 1; // init fail - con_write_asciiz("Wait, I'll ask you... when I'll done to fetch one site...\n"); - con_set_title("Dynamicaly linked app"); - - http_msg *h = http_get("http://kolibrios.org/en/", 0, HTTP_FLAG_BLOCK, ""); - http_long_receive(h); - - if (h->status == OK) { - con_write_string(h->content_ptr, h->content_length); - } else { - con_write_asciiz("Oops! Can't access to the page.\n"); - } - char buffer[256]; - InputBox(buffer, "Hay!", "How do you do?", "Hmm?", 0, 256, 0); - con_printf("Your answer is \"%s\"\n", buffer); - con_write_string("It's surprising, isn't it?", 26); - con_exit(0); - return 0; -} diff --git a/programs/develop/ktcc/trunk/samples/files.c b/programs/develop/ktcc/trunk/samples/files.c deleted file mode 100644 index f6c8f1033e..0000000000 --- a/programs/develop/ktcc/trunk/samples/files.c +++ /dev/null @@ -1,43 +0,0 @@ -#include -#include - -int main(int argc, char **argv) -{ - - int i; - char c; - FILE *f; - FILE *fin; - FILE *fout; - - //write to file - f=fopen("testfile.txt","w"); - - for(i=0;i<50;i++) - { - fputc('1',f); - } - fclose(f); - - //append to file - f=fopen("testfile.txt","a"); - - for(i=0;i<50;i++) - { - fputc('2',f); - } - fclose(f); - - //copy from testfile.txt to copyfile.txt - - fin=fopen("testfile.txt","r"); - fout=fopen("copyfile.txt","w"); - - while((c=fgetc(fin))!=EOF) - { - fputc(c,fout); - } - fclose(fin); - fclose(fout); - -} \ No newline at end of file diff --git a/programs/develop/ktcc/trunk/samples/getopt_ex.c b/programs/develop/ktcc/trunk/samples/getopt_ex.c deleted file mode 100644 index 98b9cc1db8..0000000000 --- a/programs/develop/ktcc/trunk/samples/getopt_ex.c +++ /dev/null @@ -1,38 +0,0 @@ -#include -#include -#include - -void main(int argc, char *argv[]) { - int c; - if(argc<2) - { - puts("Usage: getopt_ex [options]\n"); - puts("-a Show 'Option a'"); - puts("-B Show 'Option B'"); - puts("-n [num] Show 'num'"); - } - while ((c = getopt(argc, argv, "aBn:")) != EOF) { - switch (c) { - case 'a': - puts("Option 'a'"); - break; - - case 'B': - puts("Option 'B'"); - break; - - case 'n': - printf("Option n: value=%d\n", atoi(optarg)); - break; - - case '?': - printf("ERROR: illegal option %s\n", argv[optind-1]); - exit(0); - - default: - printf("WARNING: no handler for option %c\n", c); - exit(0); - } - } - exit(0); - } diff --git a/programs/develop/ktcc/trunk/samples/graphics.c b/programs/develop/ktcc/trunk/samples/graphics.c deleted file mode 100644 index 6e52d8600c..0000000000 --- a/programs/develop/ktcc/trunk/samples/graphics.c +++ /dev/null @@ -1,53 +0,0 @@ -#include -#include -#include -#include - -/// =========================================================== - -int main() -{ - GB_BMP b; - unsigned event; - - b.w = 300; - b.h = 200; - b.bmp = malloc (300*200*3); - - gb_bar (&b, 4, 8, 4, 12, 0xff0000); // red - gb_bar (&b, 10, 8, 4, 12, 0x00ff00); // green - gb_bar (&b, 16, 8, 4, 12, 0x0000ff); // blue - - gb_line(&b, 4, 30, 50, 30, 0xffffff); // white line - gb_line(&b, 55, 4, 120, 60, 0xf0f033); // another line - - gb_rect(&b, 65, 24, 100, 60, 0x2065ff); // rectangle - - gb_circle(&b, 55, 95, 40, 0x20ff20); // circle - - for (;;) - { - event = get_os_event(); - switch (event) - { - case 1: - begin_draw(); - sys_create_window(50, 50, 310, 230, "testlibgb" ,0x34f0f0f0, 0x14); - draw_bitmap(b.bmp, 5, 25, 300, 200); - end_draw(); - break; - case 2: - get_key(); - break; - - case 3: - if (1==get_os_button()) - { - exit(0); - } - break; - }; - } - exit(0); -} -/// =========================================================== diff --git a/programs/develop/ktcc/trunk/samples/load_coff.c b/programs/develop/ktcc/trunk/samples/load_coff.c deleted file mode 100644 index d4c73fbe3b..0000000000 --- a/programs/develop/ktcc/trunk/samples/load_coff.c +++ /dev/null @@ -1,21 +0,0 @@ -#include - -/*Using the "coff" library in ktcc using "inputbox.obj" as an example*/ - -unsigned (*InputBox)(void* Buffer, char* Caption, char* Prompt, char* Default, unsigned long Flags, unsigned long BufferSize, void* RedrawProc); - -void *InputBoxLib; - -void load_coff() -{ - InputBoxLib = dlopen("/sys/lib/inputbox.obj", RTLD_GLOBAL); - InputBox = dlsym(InputBoxLib,"InputBox"); -} - -int main() -{ - load_coff(); - char buffer[256]; - InputBox(buffer, "Hay!", "How do you do?", "Hmm?", 10, 256, 0); - dlclose(InputBoxLib); -} diff --git a/programs/develop/ktcc/trunk/samples/net/http_tcp_demo.c b/programs/develop/ktcc/trunk/samples/net/http_tcp_demo.c deleted file mode 100644 index b0924ef9c8..0000000000 --- a/programs/develop/ktcc/trunk/samples/net/http_tcp_demo.c +++ /dev/null @@ -1,64 +0,0 @@ -#include -#include -#include -#include -#include - -int main() { - con_init_console_dll(); - networklib_init(); - con_set_title("http request demo using raw sockets"); - - char *host = "kolibrios.org"; - int port = 80; - printf("Connecting to %s on port %d\n", host, port); - - struct addrinfo *addr_info; - char port_str[16]; sprintf(port_str, "%d", port); - struct addrinfo hints; - memset(&hints, 0, sizeof(hints)); - hints.ai_family = AF_UNSPEC; // IPv4 or IPv6 doesnt matter - hints.ai_socktype = SOCK_STREAM; // TCP stream sockets - if (getaddrinfo(host, port_str, 0, &addr_info) != 0) { - printf("Host %s not found!\n", host); - freeaddrinfo(addr_info); - exit(-1); - } - printf("IP address of %s is %s\n", host, inet_ntoa(addr_info->ai_addr->sin_addr)); - //printf("Host port = %d\n", addr_info->ai_addr->sin_port >> 8); - - char request[256]; - sprintf(request, "GET /en/ HTTP/1.1\r\nHost: %s\r\n\r\n", host); - printf("request = %s\n", request); - - int sock = socket(AF_INET4, SOCK_STREAM, IPPROTO_TCP); - - puts("Connecting...\n"); - if (connect(sock, addr_info->ai_addr, addr_info->ai_addrlen) != 0) { - printf("Connection failed, errno = %d\n", errno); - exit(errno); - } - puts("Connected successfully\n"); - - puts("Sending request...\n"); - if (send(sock, request, strlen(request), MSG_NOFLAG) == -1) { - printf("Sending failed, errno = %d\n", errno); - exit(errno); - } - puts("Request sended successfully, waiting for response...\n"); - - char buf[512 + 1]; - if (recv(sock, buf, 512, MSG_NOFLAG) == -1) { - printf("Receive failed, errno = %d\n", errno); - exit(errno); - } - - printf("Response = %s\n", buf); - - freeaddrinfo(addr_info); - - close(sock); - puts("\n goodbye)\n"); - con_exit(0); - return 0; -} diff --git a/programs/develop/ktcc/trunk/samples/net/nslookup.c b/programs/develop/ktcc/trunk/samples/net/nslookup.c deleted file mode 100644 index 010c2b9e6e..0000000000 --- a/programs/develop/ktcc/trunk/samples/net/nslookup.c +++ /dev/null @@ -1,29 +0,0 @@ -#include -#include -#include -#include - -struct addrinfo *res; -char host[256]; - -void main() -{ - con_init_console_dll(); - networklib_init(); - con_set_title("nslookup demo"); - printf("Host name to resolve: "); - con_gets(host, 256); - host[strlen(host)-1] = '\0'; - if(getaddrinfo(host ,0, 0, &res)!=0) - { - puts("Host not found!"); - freeaddrinfo(res); - con_exit(0); - } - else - { - printf("%s",inet_ntoa(res->ai_addr->sin_addr)); - freeaddrinfo(res); - con_exit(0); - } -} diff --git a/programs/develop/ktcc/trunk/samples/net/tcpsrv_demo.c b/programs/develop/ktcc/trunk/samples/net/tcpsrv_demo.c deleted file mode 100644 index 5e8b64cf01..0000000000 --- a/programs/develop/ktcc/trunk/samples/net/tcpsrv_demo.c +++ /dev/null @@ -1,38 +0,0 @@ -#include -#include -#include -#include - -const char msg1[]="Hello!"; -char msg2='\0'; - -int main() -{ - struct sockaddr addr={AF_INET4, PORT(23) , 0, 0}; - - int sk1=socket(AF_INET4, SOCK_STREAM, IPPROTO_TCP); - printf("Open socket: %d. Status: %s\n",sk1, strerror(errno)); - - bind(sk1, &addr,sizeof(addr)); - printf("Socket binding. Status: %s\n", strerror(errno)); - - listen(sk1, 1); - printf("Listening to a socket. Status: %s\n", strerror(errno)); - printf("You can connect to 'tcp server' via 'telnet' on localhost:23 !"); - - int sk2 = accept(sk1, &addr, sizeof(addr)); - printf("Accept done. Status: %s\n", strerror(errno)); - - send(sk2, msg1, strlen(msg1),MSG_NOFLAG); - printf("Send message: '%s'. Status: %s\n",msg1, strerror(errno)); - puts("Received data:"); - while(msg2!='!') - { - recv(sk2, &msg2, 1, MSG_NOFLAG); - printf("%c",msg2); - } - close(sk1); - close(sk2); - puts("\nGood bye!"); - exit(0); -} diff --git a/programs/develop/ktcc/trunk/samples/tinygl/fps.c b/programs/develop/ktcc/trunk/samples/tinygl/fps.c deleted file mode 100644 index dff4a9870c..0000000000 --- a/programs/develop/ktcc/trunk/samples/tinygl/fps.c +++ /dev/null @@ -1,33 +0,0 @@ -#include -int time1=0; -int time2=0; -int fps1=0; -int timerend=0; - -int Fps() -{ - int tr; - time1=get_tick_count(); - if (timerend==0) - { - time2=time1; - timerend=time1; - } - - tr = time1 - timerend; - - if ((time1 - time2) < 100) - { - fps1++; - } - else - { - draw_bar(330,8, 50,10,0xFFFFFF); - draw_number_sys(fps1,330,8,10,0x0); - fps1=0; - time2=time1; - } - timerend=time1; -return tr; -} - diff --git a/programs/develop/ktcc/trunk/samples/tinygl/gears.c b/programs/develop/ktcc/trunk/samples/tinygl/gears.c deleted file mode 100644 index bc82a2da81..0000000000 --- a/programs/develop/ktcc/trunk/samples/tinygl/gears.c +++ /dev/null @@ -1,313 +0,0 @@ -#include -#include -#include -#include -#include -#include - -int Fps(); - -struct { - int x,y; - int dx,dy; -} win; - -#define KEY_ESC 1 -#define KEY_F 33 - -char *title1 = "TinyGL in KolibriOS"; -char *title2 = "F full screen"; -char *title3 = "ESC - exit"; -char *fps = "FPS:"; - -unsigned char FullScreen = 0; -unsigned char skin = 3; - -struct process_table_entry *pri; -KOSGLContext cgl; - -static GLfloat view_rotx=20.0, view_roty=30.0, view_rotz=0.0; -static GLint gear1, gear2, gear3; -static GLfloat angle = 0.0; - -static GLuint limit; -static GLuint count = 1; - -/* - * Draw a gear wheel. You'll probably want to call this function when - * building a display list since we do a lot of trig here. - * - * Input: inner_radius - radius of hole at center - * outer_radius - radius at center of teeth - * width - width of gear - * teeth - number of teeth - * tooth_depth - depth of tooth - */ -static void gear( GLfloat inner_radius, GLfloat outer_radius, GLfloat width, - GLint teeth, GLfloat tooth_depth ) -{ - GLint i; - GLfloat r0, r1, r2; - GLfloat angle, da; - GLfloat u, v, len; - - r0 = inner_radius; - r1 = outer_radius - tooth_depth/2.0; - r2 = outer_radius + tooth_depth/2.0; - - da = 2.0*M_PI / teeth / 4.0; - - glShadeModel( GL_FLAT ); - - glNormal3f( 0.0, 0.0, 1.0 ); - - /* draw front face */ - glBegin( GL_QUAD_STRIP ); - for (i=0;i<=teeth;i++) { - angle = i * 2.0*M_PI / teeth; - glVertex3f( r0*cos(angle), r0*sin(angle), width*0.5 ); - glVertex3f( r1*cos(angle), r1*sin(angle), width*0.5 ); - glVertex3f( r0*cos(angle), r0*sin(angle), width*0.5 ); - glVertex3f( r1*cos(angle+3*da), r1*sin(angle+3*da), width*0.5 ); - } - glEnd(); - - /* draw front sides of teeth */ - glBegin( GL_QUADS ); - da = 2.0*M_PI / teeth / 4.0; - for (i=0;iwinx_size, pri->winy_size-20); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective(45.0, (GLfloat)pri->winx_size/pri->winy_size, 1.0, 60.0); - glTranslatef( 0.0, 0.0, 20.0 ); - glMatrixMode(GL_MODELVIEW); - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); -} - -void disabletgl() -{ - kosglDestroyContext(cgl); - free(pri); -} - -void Title() -{ - _ksys_write_text(300,8,0x0,fps,strlen(fps)); - _ksys_write_text(8,8,0x0,title1,strlen(title1)); - _ksys_write_text(180,8,0x0,title2,strlen(title2)); - _ksys_write_text(600,8,0x0,title3,strlen(title3)); -} - - -void draw_window() -{ - begin_draw(); - sys_create_window(win.x, win.y, win.dx, win.dy,"Gears", 0xFFFFFF, 0x34); - Title(); - end_draw(); -} - - -void main(void) -{ - pri=malloc(sizeof(struct process_table_entry)); - win.x = 100; - win.y = 100; - win.dx = 400; - win.dy = 400; - draw_window(); - _ksys_set_keyboard_mode(1); - cgl = kosglCreateContext( 0, 0); - kosglMakeCurrent( 0, 20, win.dx, win.dy-20, cgl); - init(); - reshape(); - do{ - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - glPushMatrix(); - glRotatef( view_rotx, 1.0, 0.0, 0.0 ); - glRotatef( view_roty, 0.0, 1.0, 0.0 ); - glRotatef( view_rotz, 0.0, 0.0, 1.0 ); - - glPushMatrix(); - glTranslatef( -2.0, -2.0, 0.0 ); - glRotatef( angle, 0.0, 0.0, 1.0 ); - glCallList(gear1); - glPopMatrix(); - - glPushMatrix(); - glTranslatef( 4.1, -2.0, 0.0 ); - glRotatef( -2.0*angle-9.0, 0.0, 0.0, 1.0 ); - glCallList(gear2); - glPopMatrix(); - - glPushMatrix(); - glTranslatef( -2.1, 4.2, 0.0 ); - glRotatef( -2.0*angle-25.0, 0.0, 0.0, 1.0 ); - glCallList(gear3); - glPopMatrix(); - glPopMatrix(); - kosglSwapBuffers(); - - angle += 0.01 + 0.3* Fps(); - switch(_ksys_check_for_event()){ - case KOLIBRI_EVENT_REDRAW: draw_window(); - reshape(); - break; - - case KOLIBRI_EVENT_KEY: - switch(get_key().ctrl_key){ - case KEY_F: - if(!FullScreen){ - skin=0; - int screen_size_x; - int screen_size_y; - _ksys_get_screen_size(&screen_size_x, &screen_size_y); - sys_change_window(0,0,screen_size_x,screen_size_y); - draw_window(); - reshape(); - FullScreen = 1; - } - else{ - skin=3; - draw_window(); - sys_change_window(win.x,win.y, win.dx, win.dy); - reshape(); - FullScreen = 0; - }; - break; - case KEY_ESC: disabletgl(); - return;} - break; - - case 3: disabletgl(); - return; - } - } while(1); -} diff --git a/programs/develop/ktcc/trunk/samples/winbasics.c b/programs/develop/ktcc/trunk/samples/winbasics.c deleted file mode 100644 index 636d6a7a58..0000000000 --- a/programs/develop/ktcc/trunk/samples/winbasics.c +++ /dev/null @@ -1,148 +0,0 @@ -/* - newlib-style window example -*/ -#include -#include -#include -#include -#include "kos32sys1.h" - -struct kolibri_system_colors sys_color_table; -void __attribute__ ((noinline)) debug_board_printf(const char *format,...); -void __attribute__ ((noinline)) debug_board_write_str(const char* str); - -char statusbar[255]; -char proc_info[1024]; -char text_line[255]; - -enum BUTTONS -{ - BTN_QUIT = 1, - BTN_POP = 10, - BTN_UNLOCK = 11 -}; - -#define FONT_W 8 -#define FONT_H 14 -#define LINES 10 - -void draw_window() -{ - int win_hight, win_width, i, pos_y = get_skin_height() + 36; // 60 == 24+36 - - // start redraw - begin_draw(); - // define&draw window - sys_create_window(10, 40, 600, 400, "My window", /*sys_color_table.work_area*/0xFFFFFF, 0x13); - - get_proc_info(proc_info); - win_width = *(int*)(proc_info + 0x3E); // client, 2A windows - win_hight = *(int*)(proc_info + 0x42); // client, 2E windows - - define_button((10 << 16) + 80, (30 << 16) + 20, BTN_POP, sys_color_table.work_button); - draw_text_sys("BUTTON1", 15, 34, 0, 0x90000000 | sys_color_table.work_button_text); //0x80000000 asciiz - - define_button((100 << 16) + 100, (30 << 16) + 20, BTN_UNLOCK, sys_color_table.work_button); - draw_text_sys("BUTTTON2", 110, 34, 0, 0x90000000 | sys_color_table.work_button_text); - - // display statusbar - draw_bar(6, win_hight - 17, win_width - 11, 12, 0x80000000 | sys_color_table.work_area); //0x80000000 gradient - draw_text_sys(statusbar, 10, win_hight - 15, 0, 0x80000000 | sys_color_table.work_text); - - // display strings - for (i = LINES; i > 0; i--) - { - tiny_snprintf (text_line, sizeof text_line, "Line[%d]<>", i); - - text_line[(win_width - 10 - 5) / FONT_W + 1] = '\0'; // clip text size, seems to big lines crashing OS, and form len by window size -// draw_number_sys(nbytes, 5, pos_y, 6, 0x10000000); 8x12 font - draw_text_sys(text_line, 5, pos_y, 0, 0x90000000 /*| sys_color_table.work_text*/); - pos_y += FONT_H; - - if(pos_y + 29 > win_hight) break; // 12 font + 12 statusbar + 5 border - } - - // end redraw - end_draw(); -} - -int main() -{ - int gui_event; - uint32_t pressed_button = 0, mouse_button; - pos_t mouse_pos; - strcpy(statusbar, "Program running...Double click on TEXT for details"); - - get_system_colors(&sys_color_table); - set_event_mask(0xC0000027); // mouse events only when focused window and mouse inside - - do /* Start of main activity loop */ - { -// gui_event = wait_for_event(10); // 100 = 1 sec, case you have background work - gui_event = get_os_event(); - switch(gui_event) - { - case KOLIBRI_EVENT_NONE: - // background work - break; - case KOLIBRI_EVENT_REDRAW: - draw_window(); - break; - case KOLIBRI_EVENT_KEY: - // scroll - break; - case KOLIBRI_EVENT_BUTTON: - pressed_button = get_os_button(); - switch (pressed_button) - { - case BTN_POP: - strcpy(statusbar, "POP pressed...."); - draw_window(); - break; - case BTN_UNLOCK: - strcpy(statusbar, "UNLOCK pressed...."); - draw_window(); - break; - case BTN_QUIT: - return 0; - break; - } - break; - case KOLIBRI_EVENT_MOUSE: - mouse_pos = get_mouse_pos(POS_WINDOW); // window relative - mouse_button = get_mouse_eventstate(); - debug_board_printf("mouse ev (%d,%d)%x\n", mouse_pos.x, mouse_pos.y, mouse_button); - if (mouse_button & (1<<24)) // double click - { - int n = (mouse_pos.y - 60) / FONT_H; - if (n < 0 || n >= LINES) break; - debug_board_printf("click on str(%d), clip slot(%d)\n", n, LINES - n - 1); - tiny_sprintf(statusbar, "click on str(%d), clip slot(%d)\n", n, LINES - n - 1); - draw_window(); - } - // ignore - break; - } - } while(1) ; /* End of main activity loop */ - - return 0; -} - - - -void __attribute__ ((noinline)) debug_board_write_str(const char* str){ - while(*str) - debug_board_write_byte(*str++); -} - -void __attribute__ ((noinline)) debug_board_printf(const char *format,...) -{ - va_list ap; - char log_board[300]; - - va_start (ap, format); - tiny_vsnprintf(log_board, sizeof log_board, format, ap); - va_end(ap); - debug_board_write_str(log_board); - -} diff --git a/programs/develop/ktcc/trunk/tcc.conf b/programs/develop/ktcc/trunk/tcc.conf deleted file mode 100644 index 114cca9930..0000000000 --- a/programs/develop/ktcc/trunk/tcc.conf +++ /dev/null @@ -1,6 +0,0 @@ -# This configuration file for TCC behaviour -# (actually was added for on/off KX extension) - -# Change %ktcc_root%\ to %ktcc_root%\kx -# Uncomment this to enable KX extension -#tcc_root kx \ No newline at end of file