diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 6a5a8a946a..8182ec1ce2 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,23 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ * fixed <-x-> match marker +2006-02-09 12:52 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/bin/bld.cmd + + added -ldbffpt, -lhbsix, -lhsx libraries for GCC OS2 linking + + * harbour/config/os2/gcc.cf + * harbour/contrib/libct/files.c + + some cleanups for OS2 - please check me. + + * harbour/source/rtl/gtos2/gtos2.c + + implemented hb_gt_os2_GetScreenContents() - please check me + + * harbour/include/Makefile + + added missing hbfixdj.h + + * harbour/source/rtl/gtdos/gtdos.c + ! for screen synchronization after PostExt() + 2006-02-09 03:08 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/rtl/gtapi.c * minor modifications for GTs which may no flush data in PreExt() diff --git a/harbour/bin/bld.cmd b/harbour/bin/bld.cmd index 21e4cd6993..c04d9ff155 100644 --- a/harbour/bin/bld.cmd +++ b/harbour/bin/bld.cmd @@ -180,7 +180,7 @@ if "%HB_INC_INSTALL%" == "" set HB_INC_INSTALL=..\include\ if "%HB_GT_LIB%" == "" set _HB_GT_LIB=gtos2 - if "%HB_COMPILER%" == "gcc" gcc %1.c %CFLAGS% -I%HB_INC_INSTALL% -L%HB_LIB_INSTALL% -ldebug -lvm -lrtl -l%_HB_GT_LIB% -llang -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon + if "%HB_COMPILER%" == "gcc" gcc %1.c %CFLAGS% -I%HB_INC_INSTALL% -L%HB_LIB_INSTALL% -ldebug -lvm -lrtl -l%_HB_GT_LIB% -llang -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -ldbffpt -lhbsix -lhsx -lcommon -lrtl -lvm if "%HB_COMPILER%" == "icc" icc /Gs+ /W2 /Se /Sd+ /Ti+ /C- /Tp %CFLAGS% -I%HB_INC_INSTALL% %1.c %HB_LIB_INSTALL%\debug.lib %HB_LIB_INSTALL%\vm.lib %HB_LIB_INSTALL%\rtl.lib %HB_LIB_INSTALL%\%_HB_GT_LIB%.lib %HB_LIB_INSTALL%\lang.lib %HB_LIB_INSTALL%\rdd.lib %HB_LIB_INSTALL%\rtl.lib %HB_LIB_INSTALL%\vm.lib %HB_LIB_INSTALL%\macro.lib %HB_LIB_INSTALL%\pp.lib %HB_LIB_INSTALL%\dbfntx.lib %HB_LIB_INSTALL%\dbfcdx.lib %HB_LIB_INSTALL%\common.lib goto END diff --git a/harbour/config/os2/gcc.cf b/harbour/config/os2/gcc.cf index c8c6cc02b2..317322ff9a 100644 --- a/harbour/config/os2/gcc.cf +++ b/harbour/config/os2/gcc.cf @@ -12,11 +12,16 @@ LIB_EXT = .a CC = gcc CC_IN = -c CC_OUT = -o -CPPFLAGS = -I. -I$(HB_INC_COMPILE) +CPPFLAGS = -I. -I$(TOP)include -I$(HB_INC_COMPILE) +CFLAGS = -W -Wall -O2 -DHB_OS_OS2 -fsigned-char + +# 26/03/2004 - +# added -DTCPV40HDRS to compile with GCC 3.2.2 on OS/2 v4.0 with mixed 16/32 bit tcp/ip stack +# to be removed if compiled on a tcp/ip stack >= 4.1 (eComStation, for example) +CFLAGS += -DTCPV40HDRS + ifeq ($(HB_LEX),SIMPLEX) -CFLAGS = -Wall -O2 -DSIMPLEX -else -CFLAGS = -Wall -O2 +CFLAGS += -DSIMPLEX endif LD = gcc @@ -45,6 +50,8 @@ LINKLIBS += $(foreach lib, $(LIBS), -l$(lib)) ifeq ($(findstring rdd,$(LIBS)),rdd) LINKPATHS += $(foreach drv, $(HB_DB_DRIVERS), -L$(TOP)$(ROOT)source/rdd/$(drv)/$(HB_ARCH)) LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), -l$(drv)) +# add a last round of rtl/vm to solve positional interdependencies (at the moment hbrun requires this) +LINKLIBS += -lrtl -lvm endif # Add the specified GT driver library @@ -64,6 +71,7 @@ endif endif #LINKLIBS += -Wl,-) +# statical linking with GCC 3.2.2 libc as not require its presence on user system LDFLAGS += $(LINKPATHS) ifeq ($(C_MAIN),) diff --git a/harbour/contrib/libct/files.c b/harbour/contrib/libct/files.c index c499b8e36f..cb62103608 100644 --- a/harbour/contrib/libct/files.c +++ b/harbour/contrib/libct/files.c @@ -502,7 +502,7 @@ HB_FUNC(FILESIZE) hb_retnl(fsOldFiles.ff_fsize); } } -#elif defined(OS_UNIX_COMPATIBLE) +#elif defined(OS_UNIX_COMPATIBLE) || defined(HB_OS_OS2) { if (hb_pcount() >0) { const char *szFile=hb_parc(1); @@ -611,7 +611,7 @@ HB_FUNC(FILEDATE) else hb_retd( (long) (fsOldFiles.ff_fdate >> 9) +1980, (long) ((fsOldFiles.ff_fdate & ~0xFE00) >> 5), (long)fsOldFiles.ff_fdate & ~0xFFE0); } -#elif defined(OS_UNIX_COMPATIBLE) +#elif defined(OS_UNIX_COMPATIBLE) || defined(HB_OS_OS2) { if (hb_pcount() >0) { diff --git a/harbour/include/Makefile b/harbour/include/Makefile index b20423d985..e9ef06050b 100644 --- a/harbour/include/Makefile +++ b/harbour/include/Makefile @@ -23,6 +23,7 @@ C_HEADERS=\ hbdefs.h \ hberrors.h \ hbexprop.h \ + hbfixdj.h \ hbgtcore.h \ hbhash.h \ hbinit.h \ diff --git a/harbour/source/rtl/gtdos/gtdos.c b/harbour/source/rtl/gtdos/gtdos.c index 3089184151..facf182261 100644 --- a/harbour/source/rtl/gtdos/gtdos.c +++ b/harbour/source/rtl/gtdos/gtdos.c @@ -290,6 +290,7 @@ static void hb_gt_dos_GetScreenContents( void ) hb_gt_PutChar( iRow, iCol, bAttr, 0, s_charTransRev[ bChar ] ); } } + hb_gt_ExposeArea( 0, 0, s_iRows, s_iCols ); } static void hb_gt_dos_GetCursorPosition( int * piRow, int * piCol ) diff --git a/harbour/source/rtl/gtos2/gtos2.c b/harbour/source/rtl/gtos2/gtos2.c index 3a65280cdf..4ac5d9f872 100644 --- a/harbour/source/rtl/gtos2/gtos2.c +++ b/harbour/source/rtl/gtos2/gtos2.c @@ -467,8 +467,21 @@ static void hb_gt_os2_SetCursorStyle( int iStyle ) static void hb_gt_os2_GetScreenContents( void ) { - /* TODO: implement it if necessary */ - ; + BYTE Cell[2]; + int iRow, iCol; + USHORT usSize; + + HB_TRACE(HB_TR_DEBUG, ("hb_gt_os2_GetScreenContents()")`); + + for( iRow = 0; iRow < s_vi.row; ++iRow ) + { + for( iCol = 0; iCol < s_vi.col; ++iCol ) + { + VioReadCellStr( ( PBYTE ) Cell, &usSize, iRow, iCol, 0 ); + hb_gt_PutChar( iRow, iCol, Cell[ 1 ], 0, Cell[ 0 ] ); + } + } + hb_gt_ExposeArea( 0, 0, s_vi.row, s_vi.col ); } static void hb_gt_os2_Init( FHANDLE hFilenoStdin, FHANDLE hFilenoStdout, FHANDLE hFilenoStderr )