Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 6409 → Rev 6410

/programs/develop/ktcc/trunk/libc/build.bat
6,10 → 6,10
rem #### CONFIG SECTION ####
set LIBNAME=libck.a
set INCLUDE=include
set CC=
set CC=kos32-tcc
set CFLAGS=-c -nostdinc -DGNUC -I"%cd%\%INCLUDE%"
set AR=
set ASM=
set AR=kos32-ar
set ASM=fasm
set dirs=stdio memory kolibrisys string stdlib
rem #### END OF CONFIG SECTION ####
 
/programs/develop/ktcc/trunk/libc/string/memmove.asm
6,7 → 6,7
public memcpy
public memmove
 
proc memcpy stdcall, to:dword,from:dword,count:dword
proc memcpy c, to:dword,from:dword,count:dword
 
mov ecx,[count]
test ecx,ecx
20,7 → 20,7
ret
endp
 
proc memmove stdcall, to:dword,from:dword,count:dword
proc memmove c, to:dword,from:dword,count:dword
 
mov ecx,[count]
test ecx,ecx
/programs/develop/ktcc/trunk/libc/string/strcat.c
2,7 → 2,7
{
char* res;
res=strDest;
while (*strDest++) ;
while (*strDest) strDest++;
while (*strDest++ = *strSource++) ;
return res;
}
/programs/develop/ktcc/trunk/libc/string/strcpy.c
2,6 → 2,6
{
char* res;
res=strDest;
while(*strDest++ == strSource++) ;
while(*strDest++ = *strSource++) ;
return res;
}
/programs/develop/ktcc/trunk/source/Makefile
1,4 → 1,4
OUTFILE = ktcc.kex
OBJS = tcc.o console.o
OBJS = tcc.o console.o getcwd.o
CGLAGS =-O2 -g -Wall -mpreferred-stack-boundary=2 -march=i386 -falign-functions=0 -fno-strict-aliasing
include $(MENUETDEV)/makefiles/Makefile_for_program
include Makefile_for_program
/programs/develop/ktcc/trunk/source/config.h
5,3 → 5,7
#define TCC_VERSION "0.9.23"
//#define TCC_TARGET_PE
#define TCC_TARGET_MEOS
 
/* enable bound checking code */
//#define CONFIG_TCC_BCHECK 1
 
/programs/develop/ktcc/trunk/source/libtcc1.c
399,7 → 399,7
if (vv.s.high < 0)
vv.ll = __negdi2 (vv.ll);
__udivmoddi4 (uu.ll, vv.ll, &w);
__udivmoddi4 (uu.ll, vv.ll, (UDWtype *) &w);
if (c)
w = __negdi2 (w);
return w;
466,7 → 466,7
u.s.high = (unsigned)u.s.low << (b - 32);
u.s.low = 0;
} else if (b != 0) {
u.s.high = ((unsigned)u.s.high << b) | (u.s.low >> (32 - b));
u.s.high = ((unsigned)u.s.high << b) | ((unsigned)u.s.low >> (32 - b));
u.s.low = (unsigned)u.s.low << b;
}
return u.ll;
/programs/develop/ktcc/trunk/source/tcc.c
1034,7 → 1034,8
#ifdef MEM_DEBUG
mem_cur_size -= malloc_usable_size(ptr);
#endif
free(ptr);
//2016-04-27 siemargl commented to fix crash temporally. Need to fix
// free(ptr);
}
 
static void *tcc_malloc(unsigned long size)
10591,7 → 10592,7
return optind;
}
 
int app_main(int argc, char **argv)
int main(int argc, char **argv)
{
int i;
TCCState *s;