From 8b06380b17c8a3174d9c9da20fbe273fb5eec45a Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 27 May 2008 01:23:22 +0000 Subject: [PATCH] 2008-05-27 03:10 UTC+0100 Viktor Szakats (harbour.01 syenar hu) * bin/bld.bat + MSVC now sets the lib dir globally, so lib names don't need to contain the path anymore. * source/vm/fm.c * Minor cleanup. - contrib/hbgd/tests/bldtest.sh + contrib/hbgd/tests/bld.sh * Update, cleanup, SVN header. --- harbour/ChangeLog | 12 +++++++++ harbour/bin/bld.bat | 2 +- harbour/contrib/hbgd/tests/bld.sh | 25 +++++++++++++++++++ harbour/contrib/hbgd/tests/bldtest.sh | 22 ----------------- harbour/source/vm/fm.c | 35 ++++++++++++++------------- 5 files changed, 56 insertions(+), 40 deletions(-) create mode 100644 harbour/contrib/hbgd/tests/bld.sh delete mode 100644 harbour/contrib/hbgd/tests/bldtest.sh diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c272a026bf..63538c1af1 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,18 @@ 2008-12-31 13:59 UTC+0100 Foo Bar */ +2008-05-27 03:10 UTC+0100 Viktor Szakats (harbour.01 syenar hu) + * bin/bld.bat + + MSVC now sets the lib dir globally, so lib names don't + need to contain the path anymore. + + * source/vm/fm.c + * Minor cleanup. + + - contrib/hbgd/tests/bldtest.sh + + contrib/hbgd/tests/bld.sh + * Update, cleanup, SVN header. + 2008-05-27 03:08 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/rtl/tbrowse.prg ! fixed cursor positioning when it's moved faster then record diff --git a/harbour/bin/bld.bat b/harbour/bin/bld.bat index d126e3d950..936674f60f 100644 --- a/harbour/bin/bld.bat +++ b/harbour/bin/bld.bat @@ -215,7 +215,7 @@ if not "%HB_ARCHITECTURE%" == "w32" goto A_OS2 if "%HB_COMPILER%" == "mingw32" gcc %1.c -o%1.exe %CFLAGS% -mno-cygwin -I%HB_INC_INSTALL% %HB_INC_TEMP% -L%HB_LIB_INSTALL% -lhbcpage -lhbdebug -lhbvm -lhbrtl -l%_HB_GT_LIB% -lhblang -lhbrdd -lhbrtl -lhbvm -lhbmacro -lhbpp -lrddfpt -lrddntx -lrddcdx -lhbsix -lhbcommon -lhbpcre if "%HB_COMPILER%" == "rsxnt" gcc %1.c -Zwin32 %CFLAGS% -I%HB_INC_INSTALL% -L%HB_LIB_INSTALL% -lhbcpage -lhbdebug -lhbvm -lhbrtl -l%_HB_GT_LIB% -lhblang -lhbrdd -lhbrtl -lhbvm -lhbmacro -lhbpp -lrddfpt -lrddntx -lrddcdx -lhbsix -lhbcommon -lhbpcre - if "%HB_COMPILER%" == "msvc" cl -TP -W3 %CFLAGS% -I%HB_INC_INSTALL% %1.c /link /subsystem:CONSOLE %HB_USER_LIBS% %HB_LIB_INSTALL%\hbcpage.lib %HB_LIB_INSTALL%\hbdebug.lib %HB_LIB_INSTALL%\hbvm.lib %HB_LIB_INSTALL%\hbrtl.lib %HB_LIB_INSTALL%\%_HB_GT_LIB%.lib %HB_LIB_INSTALL%\hblang.lib %HB_LIB_INSTALL%\hbrdd.lib %HB_LIB_INSTALL%\hbmacro.lib %HB_LIB_INSTALL%\hbpp.lib %HB_LIB_INSTALL%\rddntx.lib %HB_LIB_INSTALL%\rddcdx.lib %HB_LIB_INSTALL%\rddfpt.lib %HB_LIB_INSTALL%\hbsix.lib %HB_LIB_INSTALL%\hbcommon.lib %HB_LIB_INSTALL%\hbpcre.lib user32.lib winspool.lib + if "%HB_COMPILER%" == "msvc" cl -TP -W3 %CFLAGS% -I%HB_INC_INSTALL% %1.c /link /subsystem:CONSOLE /LIBPATH:%HB_LIB_INSTALL% %HB_USER_LIBS% hbcpage.lib hbdebug.lib hbvm.lib hbrtl.lib %_HB_GT_LIB%.lib hblang.lib hbrdd.lib hbmacro.lib hbpp.lib rddntx.lib rddcdx.lib rddfpt.lib hbsix.lib hbcommon.lib hbpcre.lib user32.lib winspool.lib if "%HB_COMPILER%" == "msvc" echo Ignore LNK4033 warning :C_WATCOM diff --git a/harbour/contrib/hbgd/tests/bld.sh b/harbour/contrib/hbgd/tests/bld.sh new file mode 100644 index 0000000000..896f039b1f --- /dev/null +++ b/harbour/contrib/hbgd/tests/bld.sh @@ -0,0 +1,25 @@ +#!/bin/sh +# +# $Id$ +# + +INC_DIR="-I../../include:/usr/include" +MY_EXE=$1 +shift +MY_FILES="$*" +MY_LIBS="-L../../lib -lgdlib -L/usr/lib -lhbgd -lpng -lz -ljpeg -lfreetype -lm -lhbct" +MY_GTLIB="-gtstd" + +if [ -z ${MY_FILES} ]; then + MY_FILES=${MY_EXE}; +fi + +echo "Exe = ${MY_EXE}, Files = ${MY_FILES}" + +echo "hbcmp -n -w -es2 -go -I${INC_DIR} ${MY_FILES}" + hbcmp -n -w -es2 -go -I${INC_DIR} ${MY_FILES} + +echo "hblnk ${MY_GTLIB} *.o ${MY_LIBS} -o${MY_EXE}" + hblnk ${MY_GTLIB} *.o ${MY_LIBS} -o${MY_EXE} + +rm -f *.o diff --git a/harbour/contrib/hbgd/tests/bldtest.sh b/harbour/contrib/hbgd/tests/bldtest.sh deleted file mode 100644 index 8ca236a3b8..0000000000 --- a/harbour/contrib/hbgd/tests/bldtest.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -INC_DIR="-I../../include:/usr/include" -MY_EXE=$1 -shift -MY_FILES="$*" -MY_LIBS="-L../../lib -lgdlib -L/usr/lib -lgd -lpng -lz -ljpeg -lfreetype -lm -lct" -MY_GTLIB="-gtstd" - -if [ -z ${MY_FILES} ]; then - MY_FILES=${MY_EXE}; -fi - -echo "Exe = ${MY_EXE}, Files = ${MY_FILES}" - -echo "xhbcmp -n -w -es2 -go ${INC_DIR} ${MY_FILES}" -xhbcmp -n -w -es2 -go -I${INC_DIR} ${MY_FILES} - -echo "xhblnk ${MY_GTLIB} *.o ${MY_LIBS} -o${MY_EXE}" -xhblnk ${MY_GTLIB} *.o ${MY_LIBS} -o${MY_EXE} - -rm -f *.o diff --git a/harbour/source/vm/fm.c b/harbour/source/vm/fm.c index fe0272345d..95980108d2 100644 --- a/harbour/source/vm/fm.c +++ b/harbour/source/vm/fm.c @@ -580,10 +580,10 @@ HB_EXPORT void hb_xexit( void ) /* Deinitialize fixed memory subsystem */ PHB_MEMINFO pMemBlock; USHORT ui; char buffer[ 100 ]; - FILE *hLog = NULL; + FILE * hLog = NULL; if( s_lMemoryBlocks ) - hLog = hb_fopen( "fm.log", "a+" ); + hLog = hb_fopen( "hb_fm.log", "a+" ); hb_conOutErr( hb_conNewLine(), 0 ); hb_conOutErr( "----------------------------------------", 0 ); @@ -591,23 +591,23 @@ HB_EXPORT void hb_xexit( void ) /* Deinitialize fixed memory subsystem */ snprintf( buffer, sizeof( buffer ), "Total memory allocated: %li bytes (%li block(s))", s_lMemoryMaxConsumed, s_lMemoryMaxBlocks ); hb_conOutErr( buffer, 0 ); - if( hLog ) - { - char szTime[ 9 ]; - int iYear, iMonth, iDay; - - hb_dateToday( &iYear, &iMonth, &iDay ); - hb_dateTimeStr( szTime ); - - fprintf( hLog, "Memory Allocation Report : Application => %s\n", hb_cmdargARGV()[0] ); - fprintf( hLog, " Application terminated at : %04d.%02d.%02d %s\n", iYear, iMonth, iDay, szTime ); - fprintf( hLog, "%s\n", buffer ); - } - if( s_lMemoryBlocks ) { + if( hLog ) + { + char szTime[ 9 ]; + int iYear, iMonth, iDay; + + hb_dateToday( &iYear, &iMonth, &iDay ); + hb_dateTimeStr( szTime ); + + fprintf( hLog, "Memory Allocation Report - %s\n", hb_cmdargARGV()[0] ); + fprintf( hLog, "Terminated at: %04d.%02d.%02d %s\n", iYear, iMonth, iDay, szTime ); + fprintf( hLog, "%s\n", buffer ); + } + hb_conOutErr( hb_conNewLine(), 0 ); - snprintf( buffer, sizeof( buffer ), "WARNING! Memory allocated but not released: %li bytes (%li block(s))", s_lMemoryConsumed, s_lMemoryBlocks ); + snprintf( buffer, sizeof( buffer ), "Warning, memory allocated but not released: %li bytes (%li block(s))", s_lMemoryConsumed, s_lMemoryBlocks ); hb_conOutErr( buffer, 0 ); if( hLog ) @@ -626,12 +626,13 @@ HB_EXPORT void hb_xexit( void ) /* Deinitialize fixed memory subsystem */ if( hLog ) { fprintf( hLog, "Block %i %p (size %lu) %s(%i), \"%s\"\n", ui, - (char *) pMemBlock + HB_MEMINFO_SIZE, + ( char * ) pMemBlock + HB_MEMINFO_SIZE, pMemBlock->ulSize, pMemBlock->szProcName, pMemBlock->uiProcLine, hb_mem2str( membuffer, ( char * ) pMemBlock + HB_MEMINFO_SIZE, HB_MIN( pMemBlock->ulSize, HB_MAX_MEM2STR_BLOCK ) ) ); } } + if( hLog ) { fprintf( hLog, "------------------------------------------------------------------------\n");