diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 3541982b20..a9e96e7bcd 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,31 @@ +2001-11-05 03:59 UTC+0100 Viktor Szakats + + * utils/hbtest/hbtest.prg + + Enhanced the display of errors, now the correct and incorrect + results are below each other, so it's much easier to spot the + difference. + + * source/common/hbver.c + * "Mingw32" -> "MinGW" name of the compiler changed. + + * source/rtl/filesys.c + * 0L -> 0, where the former was superfluous. + + * include/hbsetup.h + ! Fixed WIN32 platform detection under Cygwin 1.3.3 + + * config/w32/mingw32.cf + ! Added winspool lib... + + * makefile.bc + - Removed -M switch from hbmake. Please use set CFLAGS= to add + optional switches. + + * source/rtl/gtwin/gtwin.c + * source/vm/arrays.c + * source/vm/pvalue.c + * Minor changes in formatting. + 2001-11-04 18:34 UTC+0100 Viktor Szakats * source/compiler/cmdcheck.c diff --git a/harbour/config/w32/mingw32.cf b/harbour/config/w32/mingw32.cf index 7a20c3d067..8d223288e2 100644 --- a/harbour/config/w32/mingw32.cf +++ b/harbour/config/w32/mingw32.cf @@ -34,7 +34,7 @@ LINKLIBS += $(foreach lib, $(CONTRIBS), -l$(lib)) LINKLIBS += $(foreach lib, $(LIBS), -l$(lib)) # This library is needed for CharToOemBuff() and OemToCharBuff() support. -LINKLIBS += -luser32 +LINKLIBS += -luser32 -lwinspool # If LIBS specifies the rdd library, add all DB drivers. ifeq ($(findstring rdd,$(LIBS)),rdd) diff --git a/harbour/include/hbsetup.h b/harbour/include/hbsetup.h index 1496b3f306..d7818fe6a9 100644 --- a/harbour/include/hbsetup.h +++ b/harbour/include/hbsetup.h @@ -293,7 +293,7 @@ #endif #ifndef HB_OS_WIN_32 - #if defined(WINNT) || defined(_Windows) || defined(__NT__) || defined(_WIN32) || defined(_WINDOWS_) || defined(__WINDOWS_386__) || defined(__WIN32__) + #if defined(WINNT) || defined(_Windows) || defined(__NT__) || defined(_WIN32) || defined(_WINDOWS_) || defined(__WINDOWS_386__) || defined(__WIN32__) || defined(__CYGWIN__) #define HB_OS_WIN_32 #endif #endif diff --git a/harbour/makefile.bc b/harbour/makefile.bc index 4203c743bb..3eb6cc2fd7 100644 --- a/harbour/makefile.bc +++ b/harbour/makefile.bc @@ -79,7 +79,7 @@ ARFLAGS = /P32 !endif !if !$d(BCC_NOOPTIM) -CFLAGS = -O2 $(CFLAGS) + CFLAGS = -O2 $(CFLAGS) !endif # @@ -2581,7 +2581,7 @@ $(OBJ_DIR)\pdfhbdoc.obj : $(HBPDF_DIR)\pdfhbdoc.c $(HBMAKE_EXE) : $(HBMAKE_EXE_OBJS) $(ECHO) $(CFLAGS) > make.tmp - $(ECHO) -M -e$(HBMAKE_EXE) >> make.tmp + $(ECHO) -e$(HBMAKE_EXE) >> make.tmp $(ECHO) $(OBJ_DIR)\hbmake.obj >> make.tmp $(ECHO) $(OBJ_DIR)\hbmutils.obj >> make.tmp $(ECHO) $(OBJ_DIR)\radios.obj >> make.tmp diff --git a/harbour/source/common/hbver.c b/harbour/source/common/hbver.c index 71630045c2..4ec9a44ff6 100644 --- a/harbour/source/common/hbver.c +++ b/harbour/source/common/hbver.c @@ -366,7 +366,7 @@ char * hb_verCompiler( void ) #elif defined(__CYGWIN__) pszName = "Cygnus Cygwin GNU C"; #elif defined(__MINGW32__) - pszName = "Cygnus Mingw32 GNU C"; + pszName = "Cygnus MinGW GNU C"; #elif defined(__RSX32__) pszName = "EMX/RSXNT/DOS GNU C"; #elif defined(__RSXNT__) diff --git a/harbour/source/rtl/filesys.c b/harbour/source/rtl/filesys.c index 6cc283d476..92975f7f49 100644 --- a/harbour/source/rtl/filesys.c +++ b/harbour/source/rtl/filesys.c @@ -719,7 +719,7 @@ ULONG hb_fsReadLarge( FHANDLE hFileHandle, BYTE * pBuff, ULONG ulCount ) else { uiToRead = ( USHORT ) ulLeftToRead; - ulLeftToRead = 0L; + ulLeftToRead = 0; } uiRead = read( hFileHandle, pPtr, uiToRead ); /* -1 on bad hFileHandle @@ -786,7 +786,7 @@ ULONG hb_fsWriteLarge( FHANDLE hFileHandle, BYTE * pBuff, ULONG ulCount ) else { uiToWrite = ( USHORT ) ulLeftToWrite; - ulLeftToWrite = 0L; + ulLeftToWrite = 0; } uiWritten = write( hFileHandle, pPtr, uiToWrite ); /* -1 on bad hFileHandle diff --git a/harbour/source/rtl/gtwin/gtwin.c b/harbour/source/rtl/gtwin/gtwin.c index 1a8e9f8df3..0e9a40dc86 100644 --- a/harbour/source/rtl/gtwin/gtwin.c +++ b/harbour/source/rtl/gtwin/gtwin.c @@ -1,7 +1,7 @@ /* * $Id$ */ -/* #define HB_DEBUG_KEYBOARD */ + /* * Harbour Project source code: * Video subsystem for Win32 compilers @@ -73,6 +73,8 @@ /* NOTE: User programs should never call this layer directly! */ +/* #define HB_DEBUG_KEYBOARD */ + #include #include #include diff --git a/harbour/source/vm/arrays.c b/harbour/source/vm/arrays.c index 9381e5dc45..7acf291ee1 100644 --- a/harbour/source/vm/arrays.c +++ b/harbour/source/vm/arrays.c @@ -639,7 +639,7 @@ BOOL hb_arrayRelease( PHB_ITEM pArray ) hb_xfree( pBaseArray->pItems ); } - hb_gcFree( (void *)pBaseArray ); + hb_gcFree( ( void * ) pBaseArray ); pArray->type = HB_IT_NIL; pArray->item.asArray.value = NULL; diff --git a/harbour/source/vm/pvalue.c b/harbour/source/vm/pvalue.c index 5e955e4464..f015abb126 100644 --- a/harbour/source/vm/pvalue.c +++ b/harbour/source/vm/pvalue.c @@ -59,8 +59,8 @@ HB_FUNC( HB_PVALUE ) USHORT uiParam = hb_parni( 1 ); PHB_ITEM *pBase = hb_stack.pItems + ( hb_stackBaseItem() )->item.asSymbol.stackbase; /* Skip function + self */ - if( uiParam && uiParam <= (*pBase)->item.asSymbol.paramcnt ) /* Valid number */ - hb_itemReturn( *(pBase + 1 + uiParam) ); + if( uiParam && uiParam <= ( *pBase )->item.asSymbol.paramcnt ) /* Valid number */ + hb_itemReturn( *( pBase + 1 + uiParam ) ); else hb_ret(); /* return NIL */ } diff --git a/harbour/utils/hbtest/hbtest.prg b/harbour/utils/hbtest/hbtest.prg index bb765065f7..9ee991cf69 100644 --- a/harbour/utils/hbtest/hbtest.prg +++ b/harbour/utils/hbtest/hbtest.prg @@ -368,13 +368,27 @@ FUNCTION TEST_CALL( cBlock, bBlock, xResultExpected ) IF s_lShowAll .OR. lFailed .OR. lSkipped .OR. lPPError - FWrite( s_nFhnd, PadR( iif( lFailed, "!", iif( lSkipped, "S", " " ) ), TEST_RESULT_COL1_WIDTH ) + " " +; - PadR( Str( s_nCount, 4 ) + " " + ProcName( 1 ) + "(" + LTrim( Str( ProcLine( 1 ), 5 ) ) + ")", TEST_RESULT_COL2_WIDTH ) + " " +; - PadR( cBlock, TEST_RESULT_COL3_WIDTH ) + " -> " +; - PadR( XToStr( xResult ), TEST_RESULT_COL4_WIDTH ) + " | " +; - PadR( XToStr( xResultExpected ), TEST_RESULT_COL5_WIDTH ) +; - HB_OSNewLine() ) + IF lFailed + FWrite( s_nFhnd, PadR( iif( lFailed, "!", iif( lSkipped, "S", " " ) ), TEST_RESULT_COL1_WIDTH ) + " " +; + PadR( Str( s_nCount, 4 ) + " " + ProcName( 1 ) + "(" + LTrim( Str( ProcLine( 1 ), 5 ) ) + ")", TEST_RESULT_COL2_WIDTH ) + " " +; + PadR( cBlock, TEST_RESULT_COL3_WIDTH ) +; + HB_OSNewLine() +; + Space( 5 ) + " Result: " + XToStr( xResult ) +; + HB_OSNewLine() +; + Space( 5 ) + "Expected: " + XToStr( xResultExpected ) +; + HB_OSNewLine() ) + + ELSE + + FWrite( s_nFhnd, PadR( iif( lFailed, "!", iif( lSkipped, "S", " " ) ), TEST_RESULT_COL1_WIDTH ) + " " +; + PadR( Str( s_nCount, 4 ) + " " + ProcName( 1 ) + "(" + LTrim( Str( ProcLine( 1 ), 5 ) ) + ")", TEST_RESULT_COL2_WIDTH ) + " " +; + PadR( cBlock, TEST_RESULT_COL3_WIDTH ) + " -> " +; + PadR( XToStr( xResult ), TEST_RESULT_COL4_WIDTH ) + " | " +; + PadR( XToStr( xResultExpected ), TEST_RESULT_COL5_WIDTH ) +; + HB_OSNewLine() ) + + ENDIF ENDIF IF lFailed