diff --git a/harbour/ChangeLog.txt b/harbour/ChangeLog.txt index 6b0153cb4b..a7ac28141e 100644 --- a/harbour/ChangeLog.txt +++ b/harbour/ChangeLog.txt @@ -10,6 +10,22 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2013-01-28 20:17 UTC+0100 Viktor Szakats (harbour syenar.net) + * contrib/hbhpdf/harupdf.ch + + sync instruction comment for developers + + * contrib/xhb/xhberr.prg + ! replaced very shoddy commented code dealing with memvars + with clean code (though using internal calls) + ! fixed screen dump for unicode/non-unicode + + * include/fileio.ch + * replaced C-specific code in a Harbour header with + non-future-proof but cross-compatible code. untested. + + * src/3rd/zlib/Makefile + ! potential but untested fix for msvcarm targets + 2013-01-28 17:53 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * harbour/src/vm/classes.c ! added missing HB_STACK_TLS_PRELOAD diff --git a/harbour/contrib/hbhpdf/harupdf.ch b/harbour/contrib/hbhpdf/harupdf.ch index 3bce982266..b577f42c3a 100644 --- a/harbour/contrib/hbhpdf/harupdf.ch +++ b/harbour/contrib/hbhpdf/harupdf.ch @@ -778,6 +778,10 @@ #define HPDF_PDFA_1B 1 /* Error code */ + +/* NOTE: After making any changes in the list below, + always update hb_HPDF_GetErrorString() accordingly. */ + #define HPDF_ARRAY_COUNT_ERR 0x1001 #define HPDF_ARRAY_ITEM_NOT_FOUND 0x1002 #define HPDF_ARRAY_ITEM_UNEXPECTED_TYPE 0x1003 diff --git a/harbour/contrib/xhb/xhberr.prg b/harbour/contrib/xhb/xhberr.prg index 01505dc3d0..5bfe47bdbf 100644 --- a/harbour/contrib/xhb/xhberr.prg +++ b/harbour/contrib/xhb/xhberr.prg @@ -289,9 +289,6 @@ STATIC FUNCTION LogError( oerr ) LOCAL cScreen LOCAL cLogFile := s_cErrorLog // error log file name LOCAL lAppendLog := s_lErrorLogAppend // .F. = create a new error log (default) .T. = append to a existing one. - LOCAL nStart := 1 - LOCAL nCellSize - LOCAL nRange LOCAL nCols LOCAL nRows @@ -299,7 +296,6 @@ STATIC FUNCTION LogError( oerr ) LOCAL nForLoop LOCAL cOutString - LOCAL cSubString LOCAL nHandle LOCAL nBytes @@ -545,19 +541,13 @@ STATIC FUNCTION LogError( oerr ) IF HB_ISSTRING( cScreen ) FWriteLine( nHandle, PadC( " Video Screen Dump ", nCols, "#" ) ) FWriteLine( nHandle, "" ) - // FWriteLine( nHandle, "" ) FWriteLine( nHandle, "+" + Replicate( "-", nCols + 1 ) + "+" ) - // FWriteLine( nHandle, "" ) - nCellSize := Len( SaveScreen( 0, 0, 0, 0 ) ) - nRange := ( nCols + 1 ) * nCellSize - FOR nCount := 1 TO nRows + 1 + FOR nCount := 0 TO nRows cOutString := "" - cSubString := SubStr( cScreen, nStart, nRange ) - FOR nForLoop := 1 TO nRange STEP nCellSize - cOutString += SubStr( cSubString, nForLoop, 1 ) + FOR nForLoop := 0 TO nCols + cOutString += __XSaveGetChar( cScreen, nCount * ( nCols + 1 ) + nForLoop ) NEXT FWriteLine( nHandle, "|" + cOutString + "|" ) - nStart += nRange NEXT FWriteLine( nHandle, "+" + Replicate( "-", nCols + 1 ) + "+" ) FWriteLine( nHandle, "" ) @@ -567,44 +557,21 @@ STATIC FUNCTION LogError( oerr ) ENDIF #if 0 + /* NOTE: Adapted from hb_mvSave() source in Harbour RTL. [vszakats] */ + LOCAL nScope, nCount, tmp, cName, xValue + FWriteLine( nHandle, PadC( " Available Memory Variables ", nCols, "+" ) ) FWriteLine( nHandle, "" ) - SAVE ALL Like * TO errormem - nMemHandle := FOpen( "errormem.mem", FO_READWRITE ) - nMemLength := FSeek( nMemHandle, 0, FS_END ) - FSeek( nMemHandle, 0 ) - nCount := 1 - WHILE FSeek( nMemHandle, 0, FS_RELATIVE ) + 1 < nMemLength - nMemWidth := Space( 18 ) - FRead( nMemHandle, @nMemWidth, 18 ) - cVarName := hb_BLeft( nMemWidth, hb_BAt( Chr( 0 ), nMemWidth ) - 1 ) - cVarType := hb_BSubStr( nMemWidth, 12, 1 ) - cVarRec := Bin2W( hb_BRight( nMemWidth, 2 ) ) - nMemCount := iif( cVarType $ hb_BChar( 195 ) + hb_BChar( 204 ), 14 + cVarRec, 22 ) - FSeek( nMemHandle, nMemCount, FS_RELATIVE ) - cTemp := hb_BLeft( cVarName + Space( 10 ), 10 ) - cTemp += " TYPE " + Type( cVarName ) - cTemp += " " + iif( Type( cVarName ) == "C", '"' + &cVarName + '"', strvalue( &cVarName ) ) - nBytes := 0 - SWITCH ValType( cVarName ) - CASE "C" - nBytes += ( nLenTemp := Len( &cVarName ) ) - EXIT - CASE "N" - nBytes += ( nLenTemp := 9 ) - EXIT - CASE "L" - nBytes += ( nLenTemp := 2 ) - EXIT - CASE "D" - nBytes += ( nLenTemp := 9 ) - EXIT - ENDSWITCH - FWrite( nFhandle, " " + Transform( nLenTemp, "999999" ) + "bytes -> " ) - FWriteLine( nHandle, " " + cTemp ) - ENDDO - FClose( nMemHandle ) - FErase( "errormem.mem" ) + + FOR EACH nScope IN { HB_MV_PUBLIC, HB_MV_PRIVATE } + nCount := __mvDbgInfo( nScope ) + FOR tmp := 1 TO nCount + xValue := __mvDbgInfo( nScope, tmp, @cName ) + IF ValType( xValue ) $ "CNDTL" + FWriteLine( nHandle, " " + cName + " TYPE " + ValType( xValue ) + " " + hb_CStr( xValue ) ) + ENDIF + NEXT + NEXT #endif IF lAppendLog .AND. nHandle2 != F_ERROR @@ -654,10 +621,7 @@ STATIC FUNCTION strvalue( c, l ) cr := DToC( c ) EXIT CASE "L" -#if 0 - cr := iif( l, iif( c, "On", "Off" ), iif( c, "True", "False" ) ) -#endif - cr := iif( l, iif( c, "On", "Off" ), iif( c, ".t.", ".f." ) ) + cr := iif( l, iif( c, "On", "Off" ), iif( c, ".T.", ".F." ) ) EXIT ENDSWITCH diff --git a/harbour/include/fileio.ch b/harbour/include/fileio.ch index a5b015ffd4..a3c303292f 100644 --- a/harbour/include/fileio.ch +++ b/harbour/include/fileio.ch @@ -64,8 +64,6 @@ /* File attributes flags */ #define HB_FA_ALL 0x00000000 -#define HB_FA_ANY ( HB_FA_READONLY | HB_FA_HIDDEN | HB_FA_SYSTEM | HB_FA_DIRECTORY | HB_FA_ARCHIVE ) - #define HB_FA_READONLY 0x00000001 /* R */ #define HB_FA_HIDDEN 0x00000002 /* H */ #define HB_FA_SYSTEM 0x00000004 /* S */ @@ -75,6 +73,8 @@ #define HB_FA_DEVICE 0x00000040 /* I | S_ISBLK() */ #define HB_FA_NORMAL 0x00000080 /* */ +#define HB_FA_ANY ( HB_FA_READONLY + HB_FA_HIDDEN + HB_FA_SYSTEM + HB_FA_DIRECTORY + HB_FA_ARCHIVE ) + #define HB_FA_TEMPORARY 0x00000100 /* T | S_ISFIFO()??? */ #define HB_FA_SPARSE 0x00000200 /* P | S_ISSOCK()??? */ #define HB_FA_REPARSE 0x00000400 /* L | S_ISLNK() */ diff --git a/harbour/src/3rd/zlib/Makefile b/harbour/src/3rd/zlib/Makefile index 69e37be63a..5c814a4af8 100644 --- a/harbour/src/3rd/zlib/Makefile +++ b/harbour/src/3rd/zlib/Makefile @@ -44,6 +44,7 @@ ifneq ($(HB_HAS_ZLIB_LOCAL),) endif ifeq ($(filter $(HB_PLATFORM),win wce),) HB_CFLAGS += -DHAVE_UNISTD_H + HB_CFLAGS += -D_WINCE else ifneq ($(filter $(HB_COMPILER),watcom),) HB_CFLAGS += -DHAVE_UNISTD_H