2012-11-06 05:54 UTC+0100 Viktor Szakats (harbour syenar.net)

* contrib/hbexpat/hbexpat.hbx
  * contrib/hbwin/hbwin.hbx
    ! minor corrections to casing

  * contrib/hbformat/hbfmtcls.prg
    ! fixed typo in a recent commit
    * minor code cleanup

  * contrib/hbformat/utils/hbformat.prg
    * use hb_ntos() to display number

  * contrib/hbformat/utils/hbformat.ini
    * commented all settings

  * contrib/hbexpat/tests/tohash.prg
  * contrib/hbexpat/unitable.prg
  * contrib/hbgs/tests/testgs.prg
  * contrib/hbmzip/mziperr.prg
  * contrib/hbmzip/tests/*.prg
  * contrib/hbwin/tests/*.prg
  * contrib/hbwin/*.prg
  * contrib/hbziparc/*.prg
  * contrib/hbziparc/ziparc.prg
    * reformatted using new .hbx files
This commit is contained in:
Viktor Szakats
2012-11-06 05:01:25 +00:00
parent 577fa7f1f7
commit 07a120cd35
35 changed files with 201 additions and 176 deletions

View File

@@ -16,6 +16,32 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-11-06 05:54 UTC+0100 Viktor Szakats (harbour syenar.net)
* contrib/hbexpat/hbexpat.hbx
* contrib/hbwin/hbwin.hbx
! minor corrections to casing
* contrib/hbformat/hbfmtcls.prg
! fixed typo in a recent commit
* minor code cleanup
* contrib/hbformat/utils/hbformat.prg
* use hb_ntos() to display number
* contrib/hbformat/utils/hbformat.ini
* commented all settings
* contrib/hbexpat/tests/tohash.prg
* contrib/hbexpat/unitable.prg
* contrib/hbgs/tests/testgs.prg
* contrib/hbmzip/mziperr.prg
* contrib/hbmzip/tests/*.prg
* contrib/hbwin/tests/*.prg
* contrib/hbwin/*.prg
* contrib/hbziparc/*.prg
* contrib/hbziparc/ziparc.prg
* reformatted using new .hbx files
2012-11-06 04:22 UTC+0100 Viktor Szakats (harbour syenar.net)
* contrib/hbcairo/hbcairo.hbx
* contrib/hbcups/hbcups.hbx

View File

@@ -26,7 +26,7 @@
#endif
DYNAMIC hb_XML_ExpatVersionInfo
DYNAMIC hb_XML_Get_Unicode_Table
DYNAMIC hb_XML_get_unicode_table
DYNAMIC XML_DefaultCurrent
DYNAMIC XML_ErrorString
DYNAMIC XML_ExpatVersion

View File

@@ -119,7 +119,7 @@ STATIC FUNCTION cb_unknownencoding( xEData, cEncoding, aMap )
HB_SYMBOL_UNUSED( xEData )
aMyMap := hb_xml_get_unicode_table( cEncoding )
aMyMap := hb_XML_get_unicode_table( cEncoding )
IF ! Empty( aMyMap )
ACopy( aMyMap, aMap )
RETURN HB_XML_STATUS_OK

View File

@@ -54,7 +54,7 @@
#define _UNI_NAME_NORM( s ) StrTran( StrTran( StrTran( s, "-" ), "." ), " " )
FUNCTION hb_xml_get_unicode_table( cCP )
FUNCTION hb_XML_get_unicode_table( cCP )
THREAD STATIC t_uni := NIL
@@ -70,7 +70,7 @@ FUNCTION hb_xml_get_unicode_table( cCP )
cCP := _UNI_NAME_NORM( cCP )
IF cCP $ t_uni
RETURN __hb_xml_cdpu16map( t_uni[ cCP ] )
RETURN __hb_XML_CdpU16Map( t_uni[ cCP ] )
ENDIF
RETURN NIL

View File

@@ -749,8 +749,9 @@ METHOD SetOption( cLine, i, aIni ) CLASS HBFORMATCODE
xRes := ""
ELSEIF IsDigit( cToken2 ) .OR. ( Left( cToken2, 1 ) == "-" .AND. IsDigit( LTrim( SubStr( cToken2, 2 ) ) ) )
xRes := Val( cToken2 )
ELSEIF IsAlpha( cToken2 )
IF ( cTemp := Upper( cToken2 ) ) == "ON" .OR. cTemp == "YES"
ELSE
cTemp := Upper( cToken2 )
IF cTemp == "ON" .OR. cTemp == "YES"
xRes := .T.
ELSEIF cTemp == "OFF" .OR. cTemp == "NO"
xRes := .F.
@@ -769,8 +770,6 @@ METHOD SetOption( cLine, i, aIni ) CLASS HBFORMATCODE
xRes := cToken2
ENDIF
ENDIF
ELSE
::nErr := 3
ENDIF
IF ::nErr == 0 .AND. !( ValType( xRes ) == Left( cToken1, 1 ) )
::nErr := 4
@@ -844,7 +843,7 @@ METHOD Array2Source( aSource ) CLASS HBFORMATCODE
METHOD File2Array( cFileName ) CLASS HBFORMATCODE
IF hb_FileExists( cFileName )
RETURN ::String2Array( MemoRead( cFileName ) )
RETURN ::Source2Array( MemoRead( cFileName ) )
ENDIF
RETURN NIL
@@ -871,7 +870,7 @@ METHOD Array2File( cFileName, aSource ) CLASS HBFORMATCODE
cFileName := cPath + Lower( iif( i == 0, cFileName, SubStr( cFileName, i + 1 ) ) )
ENDIF
RETURN hb_MemoWrit( cFileName, ::Array2String( aSource ) )
RETURN hb_MemoWrit( cFileName, ::Array2Source( aSource ) )
STATIC FUNCTION rf_AINS( arr, nItem, cItem )

View File

@@ -66,7 +66,7 @@
#nCaseDrt = 2
# Number of spaces after # in directives ( -1 - no change )
nSpaceDrt = 0
#nSpaceDrt = 0
# -1 - no change, 1 - insert empty line before a function ( procedure,class ) declaration, 2 - remove it
#nLineFnc = 1
@@ -93,4 +93,4 @@ nSpaceDrt = 0
#cExtBack = bak
# List of space separated .hbx files for specifying proper casing of function names
#cHBXList=
#cHBXList =

View File

@@ -81,7 +81,7 @@ PROCEDURE Main( ... )
oRef := hbFormatCode():New( aParams, hb_FNameMerge( hb_DirBase(), "hbformat.ini" ) )
IF oRef:nErr > 0
OutStd( "Initialization error", oRef:nErr, iif( oRef:nLineErr == 0, "in parameter", "on line " + hb_ntos( oRef:nLineErr ) ), ":", oRef:cLineErr, hb_eol() )
OutStd( "Initialization error", hb_ntos( oRef:nErr ), iif( oRef:nLineErr == 0, "in parameter", "on line " + hb_ntos( oRef:nLineErr ) ), ":", oRef:cLineErr, hb_eol() )
RETURN
ENDIF

View File

@@ -18,13 +18,13 @@ PROCEDURE Main()
LOCAL a, b, c, d
? HB_GSAPI_REVISION( @a, @b, @c, @d )
? hb_gsapi_revision( @a, @b, @c, @d )
? a
? b
? c
? d
? HB_GS( { "--version" } )
? hb_gs( { "--version" } )
RETURN

View File

@@ -52,7 +52,7 @@
#include "hbmzip.ch"
FUNCTION hb_ZipErrorStr( nStatus )
FUNCTION hb_zipErrorStr( nStatus )
DO CASE
CASE nStatus == ZIP_OK ; RETURN "ZIP_OK"
@@ -73,7 +73,7 @@ FUNCTION hb_ZipErrorStr( nStatus )
RETURN "ZIP_UNKNOWN: " + hb_ntos( nStatus )
FUNCTION hb_UnzipErrorStr( nStatus )
FUNCTION hb_unzipErrorStr( nStatus )
DO CASE
CASE nStatus == UNZ_OK ; RETURN "UNZ_OK"

View File

@@ -82,11 +82,11 @@ PROCEDURE Main( ... )
AEval( aWild, {| cPattern, nPos | aWild[ nPos ] := StrTran( cPattern, "\", "/" ) } )
hUnzip := HB_UNZIPOPEN( cFileName )
hUnzip := hb_unzipOpen( cFileName )
IF ! Empty( hUnzip )
? "Archive file:", cFileName
HB_UnzipGlobalInfo( hUnzip, @nSize, @cComment )
hb_unzipGlobalInfo( hUnzip, @nSize, @cComment )
? "Number of entires:", nSize
IF ! Empty( cComment )
? "global comment:", cComment
@@ -94,9 +94,9 @@ PROCEDURE Main( ... )
? ""
? "Filename Date Time Size Compressed Action"
? "---------------------------------------------------------------------------------"
nErr := HB_UNZIPFILEFIRST( hUnzip )
nErr := hb_unzipFileFirst( hUnzip )
DO WHILE nErr == 0
HB_UnzipFileInfo( hUnzip, @cFile, @dDate, @cTime, , , , @nSize, @nCompSize, @lCrypted, @cComment )
hb_unzipFileInfo( hUnzip, @cFile, @dDate, @cTime, , , , @nSize, @nCompSize, @lCrypted, @cComment )
? PadR( cFile + iif( lCrypted, "*", "" ), 30 ), DToC( dDate ), cTime, nSize, nCompSize
IF ! Empty( cComment )
? "comment:", cComment
@@ -104,14 +104,14 @@ PROCEDURE Main( ... )
IF AScan( aWild, {| cPattern | hb_WildMatch( cPattern, cFile, .T. ) } ) > 0
?? " Extracting"
HB_UnzipExtractCurrentFile( hUnzip, NIL, cPassword )
hb_unzipExtractCurrentFile( hUnzip, NIL, cPassword )
ELSE
?? " Skipping"
ENDIF
nErr := HB_UNZIPFILENEXT( hUnzip )
nErr := hb_unzipFileNext( hUnzip )
ENDDO
HB_UNZIPCLOSE( hUnzip )
hb_unzipClose( hUnzip )
ENDIF
RETURN

View File

@@ -88,7 +88,7 @@ PROCEDURE Main( ... )
ENDIF
NEXT
hZip := HB_ZIPOPEN( cZipName )
hZip := hb_zipOpen( cZipName )
IF ! Empty( hZip )
? "Archive file:", cZipName
FOR EACH cWild IN aWild
@@ -98,12 +98,12 @@ PROCEDURE Main( ... )
FOR EACH aFile IN aDir
IF ! cPath + aFile[ 1 ] == cZipName
? "Adding", cPath + aFile[ 1 ]
HB_ZipStoreFile( hZip, cPath + aFile[ 1 ], cPath + aFile[ 1 ], cPassword )
hb_zipStoreFile( hZip, cPath + aFile[ 1 ], cPath + aFile[ 1 ], cPassword )
ENDIF
NEXT
ENDIF
NEXT
HB_ZIPCLOSE( hZip, cComment )
hb_zipClose( hZip, cComment )
ENDIF
RETURN

View File

@@ -50,13 +50,13 @@
*
*/
FUNCTION WIN_AxGetControl( hWnd, bHandler, cID )
FUNCTION win_axGetControl( hWnd, bHandler, cID )
LOCAL oAx := WIN_OleAuto()
LOCAL oAx := win_oleAuto()
oAx:__hObj := __AxGetControl( hWnd )
oAx:__hObj := __axGetControl( hWnd )
IF bHandler != NIL
oAx:__hSink := __AxRegisterHandler( oAx:__hObj, bHandler, cID )
oAx:__hSink := __axRegisterHandler( oAx:__hObj, bHandler, cID )
ENDIF
RETURN oAx

View File

@@ -286,11 +286,11 @@ DYNAMIC win_ANSIToWide
DYNAMIC win_Arc
DYNAMIC win_axGetControl
DYNAMIC win_axInit
DYNAMIC win_BitmapDimensions
DYNAMIC win_BitmapIsSupported
DYNAMIC win_bitmapDimensions
DYNAMIC win_bitmapIsSupported
DYNAMIC win_BitmapsOK
DYNAMIC win_BitmapType
DYNAMIC win_Bmp
DYNAMIC win_bitmapType
DYNAMIC win_BMP
DYNAMIC win_com
DYNAMIC win_comClose
DYNAMIC win_comDebugDCB
@@ -370,39 +370,39 @@ DYNAMIC win_osNetVRedirOk
DYNAMIC win_osVersionInfo
DYNAMIC win_P2N
DYNAMIC win_PrintDlgDC
DYNAMIC win_PrinterExists
DYNAMIC win_PrinterGetDefault
DYNAMIC win_PrinterList
DYNAMIC win_PrinterPortToName
DYNAMIC win_PrinterSetDefault
DYNAMIC win_PrinterStatus
DYNAMIC win_printerExists
DYNAMIC win_printerGetDefault
DYNAMIC win_printerList
DYNAMIC win_printerPortToName
DYNAMIC win_printerSetDefault
DYNAMIC win_printerStatus
DYNAMIC win_PrintFileRaw
DYNAMIC win_Prn
DYNAMIC win_QPCounter2Sec
DYNAMIC win_Rectangle
DYNAMIC win_RegCloseKey
DYNAMIC win_RegCreateKeyEx
DYNAMIC win_RegDelete
DYNAMIC win_RegDeleteKey
DYNAMIC win_RegDeleteValue
DYNAMIC win_RegGet
DYNAMIC win_RegOpenKeyEx
DYNAMIC win_RegPathSplit
DYNAMIC win_RegQuery
DYNAMIC win_RegQueryValueEx
DYNAMIC win_RegRead
DYNAMIC win_RegSet
DYNAMIC win_RegSetValueEx
DYNAMIC win_RegWrite
DYNAMIC win_regCloseKey
DYNAMIC win_regCreateKeyEx
DYNAMIC win_regDelete
DYNAMIC win_regDeleteKey
DYNAMIC win_regDeleteValue
DYNAMIC win_regGet
DYNAMIC win_regOpenKeyEx
DYNAMIC win_regPathSplit
DYNAMIC win_regQuery
DYNAMIC win_regQueryValueEx
DYNAMIC win_regRead
DYNAMIC win_regSet
DYNAMIC win_regSetValueEx
DYNAMIC win_regWrite
DYNAMIC win_ReportEvent
DYNAMIC win_RunDetached
DYNAMIC win_ServiceDelete
DYNAMIC win_ServiceGetStatus
DYNAMIC win_ServiceInstall
DYNAMIC win_ServiceSetExitCode
DYNAMIC win_ServiceSetStatus
DYNAMIC win_ServiceStart
DYNAMIC win_ServiceStop
DYNAMIC win_serviceDelete
DYNAMIC win_serviceGetStatus
DYNAMIC win_serviceInstall
DYNAMIC win_serviceSetExitCode
DYNAMIC win_serviceSetStatus
DYNAMIC win_serviceStart
DYNAMIC win_serviceStop
DYNAMIC win_SetBkMode
DYNAMIC win_SetColor
DYNAMIC win_SetDocumentProperties
@@ -415,7 +415,7 @@ DYNAMIC win_StartPage
DYNAMIC win_SysRefresh
DYNAMIC win_TextOut
DYNAMIC win_Unicode
DYNAMIC win_UUIDCreateString
DYNAMIC win_UuidCreateString
DYNAMIC win_WideToansi
DYNAMIC __axDoVerb
DYNAMIC __axGetControl
@@ -432,9 +432,9 @@ DYNAMIC __oleIsDisp
DYNAMIC __oleVariantGetType
DYNAMIC __oleVariantGetValue
DYNAMIC __oleVariantNew
DYNAMIC __wapi_DevMode_Get
DYNAMIC __wapi_DevMode_New
DYNAMIC __wapi_DevMode_Set
DYNAMIC __wapi_DEVMODE_Get
DYNAMIC __wapi_DEVMODE_New
DYNAMIC __wapi_DEVMODE_Set
#if defined( __HBEXTREQ__ ) .OR. defined( __HBEXTERN__HBWIN__REQUEST )
#uncommand DYNAMIC <fncs,...> => EXTERNAL <fncs>

View File

@@ -76,7 +76,7 @@ METHOD __enumStart( enum, lDescend ) CLASS WIN_OLEAUTO
LOCAL hObjEnum
hObjEnum := __OleEnumCreate( ::__hObj, lDescend )
hObjEnum := __oleEnumCreate( ::__hObj, lDescend )
IF ! Empty( hObjEnum )
IF ! Empty( ::__hObjEnum )
/* small hack - clone the object array for nested FOR EACH calls */
@@ -97,7 +97,7 @@ METHOD __enumSkip( enum, lDescend ) CLASS WIN_OLEAUTO
HB_SYMBOL_UNUSED( lDescend )
xValue := __OleEnumNext( ::__hObjEnum, @lContinue, ::classH )
xValue := __oleEnumNext( ::__hObjEnum, @lContinue, ::classH )
/* set enumerator value */
( @enum ):__enumValue( xValue )
@@ -113,26 +113,26 @@ METHOD PROCEDURE __enumStop() CLASS WIN_OLEAUTO
/* OLE functions */
FUNCTION win_OleGetActiveObject( ... )
FUNCTION win_oleGetActiveObject( ... )
LOCAL oOle, hOle
hOle := __OleGetActiveObject( ... )
hOle := __oleGetActiveObject( ... )
IF ! Empty( hOle )
oOle := win_OleAuto()
oOle := win_oleAuto()
oOle:__hObj := hOle
ENDIF
RETURN oOle
FUNCTION win_OleCreateObject( ... )
FUNCTION win_oleCreateObject( ... )
LOCAL oOle, hOle
hOle := __OleCreateObject( ... )
hOle := __oleCreateObject( ... )
IF ! Empty( hOle )
oOle := win_OleAuto()
oOle := win_oleAuto()
oOle:__hObj := hOle
ENDIF

View File

@@ -19,7 +19,7 @@ PROCEDURE Main()
LOCAL oObject
oObject := win_OleCreateObject( "MyOleRPCServer" )
oObject := win_oleCreateObject( "MyOleRPCServer" )
IF ! Empty( oObject )
IF oObject:connect( NETSERVER, NETPORT,, NETPASSWD )

View File

@@ -16,7 +16,7 @@ PROCEDURE Main()
LOCAL oObject
oObject := win_OleCreateObject( "MyOleTimeServer" )
oObject := win_oleCreateObject( "MyOleTimeServer" )
IF ! Empty( oObject )
? "DATE:", oObject:Date()

View File

@@ -17,7 +17,7 @@ PROCEDURE Main()
LOCAL oObject, oTime, oInfo
LOCAL p1, p2, p3, p4, p5, p6, p7
oObject := win_OleCreateObject( "MyOleObjServer" )
oObject := win_oleCreateObject( "MyOleObjServer" )
IF ! Empty( oObject )
oTime := oObject:timer()

View File

@@ -24,7 +24,7 @@ PROCEDURE Main()
LOCAL oPC, nTime, cDefaultPrinter, cFilename, oPrinter, nEvent := 0
IF Empty( oPC := WIN_OLECreateObject( "PDFCreator.clsPDFCreator" ) )
IF Empty( oPC := win_oleCreateObject( "PDFCreator.clsPDFCreator" ) )
? "Unable to create PDFCreator COM object"
RETURN
ENDIF
@@ -32,7 +32,7 @@ PROCEDURE Main()
cFilename := hb_ProgName()
/* Setup event notification */
oPC:__hSink := __AxRegisterHandler( oPC:__hObj, {| X | nEvent := X } )
oPC:__hSink := __axRegisterHandler( oPC:__hObj, {| X | nEvent := X } )
oPC:cStart( "/NoProcessingAtStartup" )
oPC:_cOption( "UseAutosave", 1 )
@@ -48,7 +48,7 @@ PROCEDURE Main()
/* You can do any printing here using WinAPI or
call a 3rd party application to do printing */
#if 1
oPrinter := Win_Prn():New( "PDFCreator" )
oPrinter := win_Prn():New( "PDFCreator" )
oPrinter:Create()
oPrinter:startDoc( "Harbour print job via PDFCreator" )
oPrinter:NewLine()

View File

@@ -21,7 +21,7 @@ PROCEDURE Main()
#endif
WAIT "Make sure we are 'Active Window'"
oMSCAL := HActiveX():Init( WAPI_GetActiveWindow(), "MSCAL.Calendar", 0, 0, 300, 300 )
oMSCAL := HActiveX():Init( wapi_GetActiveWindow(), "MSCAL.Calendar", 0, 0, 300, 300 )
WAIT "Press any key to exit"
HB_SYMBOL_UNUSED( oMSCAL )
@@ -43,10 +43,10 @@ METHOD Init( hWnd, cProgId, nTop, nLeft, nWidth, nHeight, cID ) CLASS HActiveX
LOCAL nStyle := WIN_WS_CHILD + WIN_WS_VISIBLE + WIN_WS_CLIPCHILDREN
win_AxInit()
::hWnd := WAPI_CreateWindowEX( 0, "AtlAxWin", cProgId, nStyle, nLeft, nTop, nWidth, nHeight, hWnd, 0 )
win_axInit()
::hWnd := wapi_CreateWindowEx( 0, "AtlAxWin", cProgId, nStyle, nLeft, nTop, nWidth, nHeight, hWnd, 0 )
/* WAPI_SetWindowPos( ::hWnd, WIN_HWND_TOPMOST, 0, 0, 1, 1, hb_bitOr( WIN_SWP_NOSIZE, WIN_SWP_DRAWFRAME ) ) */
::oOLE := WIN_AxGetControl( ::hWnd, {| event, ... | ::Event( event, ... ) }, cID )
::oOLE := win_axGetControl( ::hWnd, {| event, ... | ::Event( event, ... ) }, cID )
RETURN self
@@ -66,7 +66,7 @@ METHOD OnError() CLASS HActiveX
METHOD Close() CLASS HActiveX
wapi_OutputDebugString( "Close" )
WAPI_DestroyWindow( ::hWnd )
wapi_DestroyWindow( ::hWnd )
::hWnd := NIL
::oOLE := NIL
wapi_OutputDebugString( "After Close" )

View File

@@ -56,7 +56,7 @@
PROCEDURE Main( cPortName )
LOCAL oWinPort := win_Com():Init( cPortName, WIN_CBR_9600, WIN_NOPARITY, 8, WIN_ONESTOPBIT )
LOCAL oWinPort := win_com():Init( cPortName, WIN_CBR_9600, WIN_NOPARITY, 8, WIN_ONESTOPBIT )
LOCAL cString := "ATE0" + Chr( 13 ) + "ATI3" + Chr( 13 )
LOCAL nResult

View File

@@ -71,7 +71,7 @@ PROCEDURE Main( cPortName )
?
Inkey( 0 )
oWinPort := win_Com():Init( cPortName, WIN_CBR_9600, WIN_ODDPARITY, 7, WIN_ONESTOPBIT )
oWinPort := win_com():Init( cPortName, WIN_CBR_9600, WIN_ODDPARITY, 7, WIN_ONESTOPBIT )
IF ! oWinPort:Open()
? "Open() failed"
ELSE
@@ -166,7 +166,7 @@ PROCEDURE Main( cPortName )
? "This is going to fail, so no device needed"
Inkey( 0 )
oWinPort := Win_Com():Init( cPortName, WIN_CBR_9600, WIN_NOPARITY, 99, WIN_ONESTOPBIT )
oWinPort := win_com():Init( cPortName, WIN_CBR_9600, WIN_NOPARITY, 99, WIN_ONESTOPBIT )
IF ! oWinPort:Open
? "Open() failed :", oWinPort:ErrorText()
ELSE
@@ -178,7 +178,7 @@ PROCEDURE Main( cPortName )
?
Inkey( 0 )
oWinPort := Win_Com():Init( cPortName, WIN_CBR_9600, WIN_NOPARITY, 8, WIN_ONESTOPBIT )
oWinPort := win_com():Init( cPortName, WIN_CBR_9600, WIN_NOPARITY, 8, WIN_ONESTOPBIT )
IF ! oWinPort:Open
? "Open() failed :", oWinPort:ErrorText()
ELSE

View File

@@ -22,7 +22,7 @@ PROCEDURE Main()
LOCAL lAbort
LOCAL tmp
? "0x" + hb_NumToHex( WIN_SHFileOperation( NIL, WIN_FO_COPY, { __FILE__, "olesrv1.prg" }, { "testcopy1" }, ;
? "0x" + hb_NumToHex( win_SHFileOperation( NIL, WIN_FO_COPY, { __FILE__, "olesrv1.prg" }, { "testcopy1" }, ;
NIL, @lAbort, ;
NIL, "Harbour SHFile 1" ) )
? lAbort
@@ -31,7 +31,7 @@ PROCEDURE Main()
hb_MemoWrit( "rename1.txt", "hello2" )
a := {}
? "0x" + hb_NumToHex( WIN_SHFileOperation( NIL, WIN_FO_RENAME, { "rename.txt" }, { "rename1.txt" }, ;
? "0x" + hb_NumToHex( win_SHFileOperation( NIL, WIN_FO_RENAME, { "rename.txt" }, { "rename1.txt" }, ;
WIN_FOF_WANTMAPPINGHANDLE, @lAbort, ;
a, "Harbour SHFile 2" ) )
? lAbort
@@ -43,7 +43,7 @@ PROCEDURE Main()
FErase( "rename1.txt" )
? "0x" + hb_NumToHex( WIN_SHFileOperation( NIL, WIN_FO_COPY, __FILE__ + Chr( 0 ) + "olesrv1.prg" + Chr( 0 ), "testcopy2", ;
? "0x" + hb_NumToHex( win_SHFileOperation( NIL, WIN_FO_COPY, __FILE__ + Chr( 0 ) + "olesrv1.prg" + Chr( 0 ), "testcopy2", ;
NIL, @lAbort, ;
NIL, "Harbour SHFile 3" ) )
? lAbort

View File

@@ -16,7 +16,7 @@
PROCEDURE Main()
? WIN_REPORTEVENT( NIL, "Application", WIN_EVENTLOG_SUCCESS, 0, 0, "hello" )
? WIN_REPORTEVENT( NIL, "Application", WIN_EVENTLOG_SUCCESS, 0, 0, { "hello", "world" } )
? win_ReportEvent( NIL, "Application", WIN_EVENTLOG_SUCCESS, 0, 0, "hello" )
? win_ReportEvent( NIL, "Application", WIN_EVENTLOG_SUCCESS, 0, 0, { "hello", "world" } )
RETURN

View File

@@ -243,7 +243,7 @@ STATIC PROCEDURE Exm_IExplorer2()
LOCAL oIE
IF ( oIE := win_oleCreateObject( "InternetExplorer.Application" ) ) != NIL
oIE:__hSink := __AxRegisterHandler( oIE:__hObj, {| ... | QOut( ... ) } )
oIE:__hSink := __axRegisterHandler( oIE:__hObj, {| ... | QOut( ... ) } )
oIE:Visible := .T.
oIE:Navigate( "http://harbour-project.org" )
WHILE oIE:ReadyState != 4

View File

@@ -10,7 +10,7 @@ PROCEDURE Main( cPar1 )
LOCAL nPrn := 1
LOCAL cBMPFile := Space( 40 )
LOCAL aPrn := WIN_PRINTERLIST()
LOCAL aPrn := win_printerList()
LOCAL GetList := {}
CLS
@@ -36,7 +36,7 @@ PROCEDURE Main( cPar1 )
STATIC PROCEDURE PrnTest( cPrinter, cBMPFile, lAsk )
LOCAL oPrinter := Win_Prn():New( cPrinter )
LOCAL oPrinter := win_Prn():New( cPrinter )
LOCAL aFonts
LOCAL x
LOCAL nColFixed

View File

@@ -6,7 +6,7 @@ PROCEDURE Main()
LOCAL nPrn := 1
LOCAL cFileName := Space( 40 )
LOCAL aPrn := WIN_PRINTERLIST()
LOCAL aPrn := win_printerList()
LOCAL GetList := {}
CLS
@@ -36,6 +36,6 @@ STATIC PROCEDURE PrnTest( cPrinter, cFileName )
hb_MemoWrit( cFileName := "_hbtest.prn", "Hello World!" + Chr( 12 ) )
ENDIF
Alert( "win_PrintFileRaw() returned: " + hb_ntos( WIN_PRINTFILERAW( cPrinter, cFileName, "testing raw printing" ) ) )
Alert( "win_PrintFileRaw() returned: " + hb_ntos( win_PrintFileRaw( cPrinter, cFileName, "testing raw printing" ) ) )
RETURN

View File

@@ -14,13 +14,13 @@
PROCEDURE Main()
Dump( WIN_PRINTERLIST( .F., .F. ) )
Dump( WIN_PRINTERLIST( .F., .T. ) )
Dump( WIN_PRINTERLIST( .T., .F. ) )
Dump( WIN_PRINTERLIST( .T., .T. ) )
Dump( win_printerList( .F., .F. ) )
Dump( win_printerList( .F., .T. ) )
Dump( win_printerList( .T., .F. ) )
Dump( win_printerList( .T., .T. ) )
? "WIN_PRINTERGETDEFAULT:", ">" + WIN_PRINTERGETDEFAULT() + "<"
? "WIN_PRINTERSTATUS:", WIN_PRINTERSTATUS()
? "WIN_PRINTERGETDEFAULT:", ">" + win_printerGetDefault() + "<"
? "WIN_PRINTERSTATUS:", win_printerStatus()
RETURN
@@ -35,13 +35,13 @@ STATIC PROCEDURE Dump( a )
FOR EACH c IN b
?? c:__enumIndex(), c
IF c:__enumIndex() == 2
?? ">>" + WIN_PRINTERPORTTONAME( c ) + "<<", "|>>" + WIN_PRINTERPORTTONAME( c, .T. ) + "<<|"
?? ">>" + win_printerPortToName( c ) + "<<", "|>>" + win_printerPortToName( c, .T. ) + "<<|"
ENDIF
?
NEXT
? "-----"
ELSE
? b, WIN_PRINTEREXISTS( b ), WIN_PRINTERSTATUS( b )
? b, win_printerExists( b ), win_printerStatus( b )
ENDIF
NEXT

View File

@@ -14,10 +14,10 @@
PROCEDURE Main()
LOCAL a := WIN_PRINTERGETDEFAULT()
LOCAL a := win_printerGetDefault()
? ">" + a + "<"
? WIN_PRINTERSETDEFAULT( a )
? win_printerSetDefault( a )
RETURN

View File

@@ -18,7 +18,7 @@ PROCEDURE Main()
#if defined( __PLATFORM__WINCE )
LOCAL o := wce_sim():New()
LOCAL o := wce_Sim():New()
LOCAL a
IF o:lInitialize()

View File

@@ -115,7 +115,7 @@ METHOD lNumberOfPhoneBookEntries( nType, /* @ */ nTotal, /* @ */ nUsed ) CLASS w
nType := SIM_PBSTORAGE_SIM
ENDIF
nResult := wce_SimPhoneBookStatus( ::hSim, nType, @nTotal, @nUsed )
nResult := wce_SimPhonebookStatus( ::hSim, nType, @nTotal, @nUsed )
::nLastError := nResult
RETURN nResult == SIM_E_OK
@@ -147,7 +147,7 @@ METHOD aGetAllPhoneBookEntries( nType ) CLASS wce_sim
FOR nPos := 1 TO nUsed
aEntry := {}
nResult := wce_SimReadPhoneBookEntry( ::hSim, nType, nPos, @aEntry )
nResult := wce_SimReadPhonebookEntry( ::hSim, nType, nPos, @aEntry )
IF nResult != SIM_E_OK
::nLastError := nResult
EXIT
@@ -174,7 +174,7 @@ METHOD lGetSimPhoneEntry( nPos, nType, /* @ */ aEntry ) CLASS wce_sim
nType := SIM_PBSTORAGE_SIM
ENDIF
nResult := wce_SimReadPhoneBookEntry( ::hSim, nType, nPos, @a )
nResult := wce_SimReadPhonebookEntry( ::hSim, nType, nPos, @a )
aEntry := { a }
::nLastError := nResult
@@ -197,7 +197,7 @@ METHOD lSetSimPhoneEntry( nPos, nType, cNumber, cName, nPlan, nAddrType ) CLASS
nType := SIM_PBSTORAGE_SIM
ENDIF
nResult := wce_SimWritePhoneBookEntry( ::hSim, nType, nPos, cNumber, cName, nPlan, nAddrType )
nResult := wce_SimWritePhonebookEntry( ::hSim, nType, nPos, cNumber, cName, nPlan, nAddrType )
::nLastError := nResult
RETURN nResult == SIM_E_OK
@@ -215,7 +215,7 @@ METHOD lDelSimPhoneEntry( nPos, nType ) CLASS wce_sim
nType := SIM_PBSTORAGE_SIM
ENDIF
nResult := wce_SimDeletePhoneBookEntry( ::hSim, nType, nPos )
nResult := wce_SimDeletePhonebookEntry( ::hSim, nType, nPos )
::nLastError := nResult
RETURN nResult == SIM_E_OK

View File

@@ -66,7 +66,7 @@
/* NOTE: To change any of these registry settings
Administrator rights are required by default in Windows. [vszakats] */
FUNCTION WIN_OSNETREGOK( lSetIt, lDoVista )
FUNCTION win_osNetRegOk( lSetIt, lDoVista )
LOCAL bRetVal := .T.
LOCAL cKeySrv
@@ -123,7 +123,7 @@ FUNCTION WIN_OSNETREGOK( lSetIt, lDoVista )
RETURN bRetVal
FUNCTION WIN_OSNETVREDIROK( /* @ */ nResult )
FUNCTION win_osNetVRedirOk( /* @ */ nResult )
LOCAL aFiles

View File

@@ -84,7 +84,7 @@ METHOD New() CLASS WIN_BMP
METHOD LoadFile( cFileName, aDimXY ) CLASS WIN_BMP
::FileName := cFileName
::Bitmap := win_LoadBitMapFile( ::FileName )
::Bitmap := win_LoadBitmapFile( ::FileName )
IF Empty( ::Bitmap )
::Type := 0
::DimXY := { 0, 0 }
@@ -92,7 +92,7 @@ METHOD LoadFile( cFileName, aDimXY ) CLASS WIN_BMP
::Type := win_bitmapType( ::Bitmap )
IF HB_ISARRAY( aDimXY )
::DimXY := aDimXY
ELSEIF ! win_BitMapDimensions( ::Bitmap, @::DimXY[ 1 ], @::DimXY[ 2 ] )
ELSEIF ! win_bitmapDimensions( ::Bitmap, @::DimXY[ 1 ], @::DimXY[ 2 ] )
::DimXY := { 1, 1 } // Driver may use the original dimensions
ENDIF
ENDIF
@@ -106,7 +106,7 @@ METHOD Destroy() CLASS WIN_BMP // Compatibility function for Alaska Xbase++
RETURN NIL
METHOD IsSupported( oPrn, /* @ */ nError ) CLASS WIN_BMP
RETURN ( nError := win_BitmapIsSupported( oPrn:hPrinterDc, ::Bitmap ) ) == 0
RETURN ( nError := win_bitmapIsSupported( oPrn:hPrinterDc, ::Bitmap ) ) == 0
METHOD Draw( oPrn, aRectangle, /* @ */ nError ) CLASS WIN_BMP // Pass a WIN_PRN object reference & Rectangle array

View File

@@ -108,7 +108,7 @@ METHOD Init( cPortName, nBaudRate, nParity, nByteSize, nStopBits ) CLASS win_Com
::cPortName := Upper( cPortName )
IF Left( ::cPortName, 3 ) == "COM"
::nPort := Val( SubStr( ::cPortName, 4 ) ) - 1
IF win_ComOpen( ::nPort, nBaudRate, nParity, nByteSize, nStopBits ) != -1
IF win_comOpen( ::nPort, nBaudRate, nParity, nByteSize, nStopBits ) != -1
::lOpen := .T.
ENDIF
ENDIF
@@ -116,19 +116,19 @@ METHOD Init( cPortName, nBaudRate, nParity, nByteSize, nStopBits ) CLASS win_Com
RETURN self
METHOD QueueSize( nInQueue, nOutQueue ) CLASS win_Com
RETURN win_ComSetQueueSize( ::nPort, nInQueue, nOutQueue )
RETURN win_comSetQueueSize( ::nPort, nInQueue, nOutQueue )
METHOD TimeOuts( nReadInterval, nReadMultiplier, nReadConstant, nWriteMultiplier, nWriteConstant ) CLASS win_Com
RETURN win_ComSetTimeOuts( ::nPort, nReadInterval, nReadMultiplier, nReadConstant, nWriteMultiplier, nWriteConstant )
RETURN win_comSetTimeouts( ::nPort, nReadInterval, nReadMultiplier, nReadConstant, nWriteMultiplier, nWriteConstant )
METHOD Read( /* @ */ cString, nLength ) CLASS win_Com
cString := Space( nlength )
RETURN win_ComRead( ::nPort, @cString )
RETURN win_comRead( ::nPort, @cString )
METHOD Recv( nLength, nResult ) CLASS win_Com
RETURN win_ComRecv( ::nPort, nLength, @nResult )
RETURN win_comRecv( ::nPort, nLength, @nResult )
METHOD RecvTo( cDelim, nMaxlen ) CLASS win_Com
@@ -139,7 +139,7 @@ METHOD RecvTo( cDelim, nMaxlen ) CLASS win_Com
DO WHILE .T.
cString := Space( 1 )
IF ( nResult := win_ComRead( ::nPort, @cString ) ) != -1
IF ( nResult := win_comRead( ::nPort, @cString ) ) != -1
IF nResult == 0
EXIT
ELSE
@@ -159,50 +159,50 @@ METHOD RecvTo( cDelim, nMaxlen ) CLASS win_Com
RETURN cRecv
METHOD Write( cString ) CLASS win_Com
RETURN win_ComWrite( ::nPort, cString )
RETURN win_comWrite( ::nPort, cString )
METHOD Status( lCTS, lDSR, lRing, lDCD ) CLASS win_Com
RETURN win_ComStatus( ::nPort, @lCTS, @lDSR, @lRing, @lDCD )
RETURN win_comStatus( ::nPort, @lCTS, @lDSR, @lRing, @lDCD )
METHOD QueueStatus( lCTSHold, lDSRHold, lDCDHold, lXoffHold, lXoffSent, nInQueue, nOutQueue ) CLASS win_Com
RETURN win_ComQueueStatus( ::nPort, @lCTSHold, @lDSRHold, @lDCDHold, @lXoffHold, @lXoffSent, @nInQueue, @nOutQueue )
RETURN win_comQueueStatus( ::nPort, @lCTSHold, @lDSRHold, @lDCDHold, @lXoffHold, @lXoffSent, @nInQueue, @nOutQueue )
METHOD SetRTS( lCTS ) CLASS win_Com
RETURN win_ComSetRTS( ::nPort, lCTS ) /* boolean return is the status of the call not the line! */
RETURN win_comSetRTS( ::nPort, lCTS ) /* boolean return is the status of the call not the line! */
METHOD SetDTR( lDTR ) CLASS win_Com
RETURN win_ComSetDTR( ::nPort, lDTR ) /* boolean return is the status of the call not the line! */
RETURN win_comSetDTR( ::nPort, lDTR ) /* boolean return is the status of the call not the line! */
METHOD RTSFlow( nRTS ) CLASS win_Com
RETURN win_ComRTSFlow( ::nPort, nRTS )
RETURN win_comRTSFlow( ::nPort, nRTS )
METHOD DTRFlow( nDTR ) CLASS win_Com
RETURN win_ComDTRFlow( ::nPort, nDTR )
RETURN win_comDTRFlow( ::nPort, nDTR )
METHOD XonXoffFlow( lXonXoff ) CLASS win_Com
RETURN win_ComXonXoffFlow( ::nPort, lXonXoff )
RETURN win_comXonXoffFlow( ::nPort, lXonXoff )
METHOD Purge( lRXBuffer, lTXBuffer ) CLASS win_Com
RETURN win_ComPurge( ::nPort, lRXBuffer, lTXBuffer )
RETURN win_comPurge( ::nPort, lRXBuffer, lTXBuffer )
METHOD PurgeRX() CLASS win_Com
RETURN win_ComPurge( ::nPort, .T., .F. )
RETURN win_comPurge( ::nPort, .T., .F. )
METHOD PurgeTX() CLASS win_Com
RETURN win_ComPurge( ::nPort, .F., .T. )
RETURN win_comPurge( ::nPort, .F., .T. )
METHOD Close( nDrain ) CLASS win_Com
RETURN win_ComClose( ::nPort, iif( Empty( nDrain ), 0, nDrain ) )
RETURN win_comClose( ::nPort, iif( Empty( nDrain ), 0, nDrain ) )
METHOD DebugDCB( nDebug ) CLASS win_Com
RETURN win_ComDebugDCB( ::nPort, nDebug )
RETURN win_comDebugDCB( ::nPort, nDebug )
/* Since the win_Com functions are an amalgamation of Win functions this allows
you to see what call did the deed when things go wrong. */
METHOD ErrorText() CLASS win_Com
LOCAL nFcn := win_ComFuncLast( ::nPort )
LOCAL nFcn := win_comFuncLast( ::nPort )
LOCAL cString
LOCAL nError
LOCAL cMsg
@@ -230,9 +230,9 @@ METHOD ErrorText() CLASS win_Com
/* WinPortError clears the error - don't call it twice */
cMsg := Space( 256 )
wapi_FormatMessage( NIL, NIL, nError := win_ComError( ::nPort ), NIL, @cMsg )
wapi_FormatMessage( NIL, NIL, nError := win_comError( ::nPort ), NIL, @cMsg )
RETURN cString + "error (" + hb_ntos( nError ) + ") : " + cMsg
METHOD Error() CLASS win_Com
RETURN win_ComError( ::nPort )
RETURN win_comError( ::nPort )

View File

@@ -216,7 +216,7 @@ ENDCLASS
METHOD New( cPrinter ) CLASS WIN_PRN
::PrinterName := iif( Empty( cPrinter ), win_PrinterGetDefault(), cPrinter )
::PrinterName := iif( Empty( cPrinter ), win_printerGetDefault(), cPrinter )
/* Initialized with the current properties of the printer [jarabal] */
::GetDocumentProperties()
@@ -270,7 +270,7 @@ METHOD Create() CLASS WIN_PRN
::BottomMargin := ( ::PageHeight - ::TopMargin ) + 1
// Set .T. if can print bitmaps
::BitMapsOk := win_BitMapsOk( ::hPrinterDC )
::BitMapsOk := win_BitmapsOK( ::hPrinterDC )
// supports Colour
::NumColors := win_GetDeviceCaps( ::hPrinterDC, WIN_NUMCOLORS )
@@ -815,7 +815,7 @@ METHOD DrawBitMap( oBmp ) CLASS WIN_PRN
LOCAL lResult := .F.
IF ::BitMapsOk .AND. ::CheckPage() .AND. ! Empty( oBmp:BitMap )
IF ( lResult := win_DrawBitMap( ::hPrinterDc, oBmp:BitMap, oBmp:Rect[ 1 ], oBmp:Rect[ 2 ], oBmp:Rect[ 3 ], oBmp:Rect[ 4 ], oBmp:DimXY[ 1 ], oBmp:DimXY[ 2 ] ) )
IF ( lResult := win_DrawBitmap( ::hPrinterDc, oBmp:BitMap, oBmp:Rect[ 1 ], oBmp:Rect[ 2 ], oBmp:Rect[ 3 ], oBmp:Rect[ 4 ], oBmp:DimXY[ 1 ], oBmp:DimXY[ 2 ] ) )
::HavePrinted := .T.
ENDIF
ENDIF

View File

@@ -89,9 +89,9 @@ FUNCTION hb_GetZipComment( cFileName )
cFileName := hb_FNameExtSetDef( cFileName, ".zip" )
ENDIF
IF ! Empty( hUnzip := hb_UnzipOpen( cFileName ) )
hb_UnzipGlobalInfo( hUnzip, NIL, @cComment )
hb_UnzipClose( hUnzip )
IF ! Empty( hUnzip := hb_unzipOpen( cFileName ) )
hb_unzipGlobalInfo( hUnzip, NIL, @cComment )
hb_unzipClose( hUnzip )
ELSE
cComment := ""
ENDIF
@@ -107,9 +107,9 @@ FUNCTION hb_GetFileCount( cFileName )
cFileName := hb_FNameExtSetDef( cFileName, ".zip" )
ENDIF
IF ! Empty( hUnzip := hb_UnzipOpen( cFileName ) )
hb_UnzipGlobalInfo( hUnzip, @nEntries, NIL )
hb_UnzipClose( hUnzip )
IF ! Empty( hUnzip := hb_unzipOpen( cFileName ) )
hb_unzipGlobalInfo( hUnzip, @nEntries, NIL )
hb_unzipClose( hUnzip )
ELSE
nEntries := 0
ENDIF
@@ -125,13 +125,13 @@ FUNCTION hb_ZipWithPassword( cFileName )
cFileName := hb_FNameExtSetDef( cFileName, ".zip" )
ENDIF
IF ! Empty( hUnzip := hb_UnzipOpen( cFileName ) )
IF ! Empty( hUnzip := hb_unzipOpen( cFileName ) )
IF hb_UnzipFileFirst( hUnzip ) == 0
hb_UnzipFileInfo( hUnzip, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, @lCrypted )
IF hb_unzipFileFirst( hUnzip ) == 0
hb_unzipFileInfo( hUnzip, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, @lCrypted )
ENDIF
hb_UnzipClose( hUnzip )
hb_unzipClose( hUnzip )
ENDIF
RETURN lCrypted
@@ -158,14 +158,14 @@ FUNCTION hb_GetFilesInZip( cFileName, lVerbose )
cFileName := hb_FNameExtSetDef( cFileName, ".zip" )
ENDIF
IF ! Empty( hUnzip := hb_UnzipOpen( cFileName ) )
IF ! Empty( hUnzip := hb_unzipOpen( cFileName ) )
hb_default( @lVerbose, .F. )
nErr := hb_UnzipFileFirst( hUnzip )
nErr := hb_unzipFileFirst( hUnzip )
DO WHILE nErr == 0
hb_UnzipFileInfo( hUnzip, @cFileName, @dDate, @cTime, @nInternalAttr, NIL, @nMethod, @nSize, @nCompSize, @lCrypted, @cComment, @nCRC )
hb_unzipFileInfo( hUnzip, @cFileName, @dDate, @cTime, @nInternalAttr, NIL, @nMethod, @nSize, @nCompSize, @lCrypted, @cComment, @nCRC )
IF lVerbose
@@ -185,10 +185,10 @@ FUNCTION hb_GetFilesInZip( cFileName, lVerbose )
AAdd( aFiles, cFileName )
ENDIF
nErr := hb_UnzipFileNext( hUnzip )
nErr := hb_unzipFileNext( hUnzip )
ENDDO
hb_UnzipClose( hUnzip )
hb_unzipClose( hUnzip )
ENDIF
RETURN aFiles
@@ -291,7 +291,7 @@ FUNCTION hb_ZipFile( ;
FErase( cFileName )
ENDIF
IF ! Empty( hZip := hb_ZipOpen( cFileName, iif( ! lOverwrite .AND. hb_FileExists( cFileName ), HB_ZIP_OPEN_ADDINZIP, NIL ) ) )
IF ! Empty( hZip := hb_zipOpen( cFileName, iif( ! lOverwrite .AND. hb_FileExists( cFileName ), HB_ZIP_OPEN_ADDINZIP, NIL ) ) )
IF HB_ISSTRING( acFiles )
acFiles := { acFiles }
@@ -357,8 +357,8 @@ FUNCTION hb_ZipFile( ;
hb_FGetDateTime( cFileToZip, @tTime )
hb_FNameSplit( cFileToZip, @cPath, @cName, @cExt, @cDrive )
hb_ZipFileCreate( hZip, hb_FNameMerge( iif( lWithPath, cPath, NIL ), cName, cExt, iif( lWithDrive, cDrive, NIL ) ), ;
tTime, NIL, NIL, NIL, NIL, nLevel, cPassword, iif( Empty( cPassword ), NIL, hb_ZipFileCRC32( cFileToZip ) ), NIL )
hb_zipFileCreate( hZip, hb_FNameMerge( iif( lWithPath, cPath, NIL ), cName, cExt, iif( lWithDrive, cDrive, NIL ) ), ;
tTime, NIL, NIL, NIL, NIL, nLevel, cPassword, iif( Empty( cPassword ), NIL, hb_zipFileCRC32( cFileToZip ) ), NIL )
DO WHILE ( nLen := FRead( hHandle, @cBuffer, hb_BLen( cBuffer ) ) ) > 0
@@ -367,10 +367,10 @@ FUNCTION hb_ZipFile( ;
Eval( bProgress, nRead, nSize )
ENDIF
hb_ZipFileWrite( hZip, cBuffer, nLen )
hb_zipFileWrite( hZip, cBuffer, nLen )
ENDDO
hb_ZipFileClose( hZip )
hb_zipFileClose( hZip )
FClose( hHandle )
@@ -378,7 +378,7 @@ FUNCTION hb_ZipFile( ;
ENDIF
NEXT
hb_ZipClose( hZip, t_cComment )
hb_zipClose( hZip, t_cComment )
ELSE
lRetVal := .F.
ENDIF
@@ -417,7 +417,7 @@ FUNCTION hb_UnzipFile( cFileName, bUpdate, lWithPath, cPassword, cPath, acFiles,
cFileName := hb_FNameExtSetDef( cFileName, ".zip" )
ENDIF
IF ! Empty( hUnzip := hb_UnzipOpen( cFileName ) )
IF ! Empty( hUnzip := hb_unzipOpen( cFileName ) )
IF HB_ISNUMERIC( acFiles ) .OR. ;
HB_ISSTRING( acFiles )
@@ -431,12 +431,12 @@ FUNCTION hb_UnzipFile( cFileName, bUpdate, lWithPath, cPassword, cPath, acFiles,
cPath := hb_DirSepAdd( cPath )
nPos := 0
nErr := hb_UnzipFileFirst( hUnzip )
nErr := hb_unzipFileFirst( hUnzip )
DO WHILE nErr == 0
nPos++
IF hb_UnzipFileInfo( hUnzip, @cZipName, @dDate, @cTime, , , , @nSize ) == 0
IF hb_unzipFileInfo( hUnzip, @cZipName, @dDate, @cTime, , , , @nSize ) == 0
/* NOTE: As opposed to original hbziparch we don't do a second match without path. */
lExtract := Empty( acFiles ) .OR. ;
@@ -444,15 +444,15 @@ FUNCTION hb_UnzipFile( cFileName, bUpdate, lWithPath, cPassword, cPath, acFiles,
AScan( acFiles, {| cMask | hb_FileMatch( cZipName, cMask ) } ) > 0
IF lExtract .AND. ;
( hHandle := FCreate( cPath + cZipName ) ) != F_ERROR
( hHandle := FCreate( cPath + cZipName ) ) != F_ERROR
IF hb_UnzipFileOpen( hUnzip, cPassword ) != UNZ_OK
IF hb_unzipFileOpen( hUnzip, cPassword ) != UNZ_OK
lRetVal := .F.
EXIT
ENDIF
nRead := 0
DO WHILE ( nLen := hb_UnzipFileRead( hUnzip, @cBuffer, hb_BLen( cBuffer ) ) ) > 0
DO WHILE ( nLen := hb_unzipFileRead( hUnzip, @cBuffer, hb_BLen( cBuffer ) ) ) > 0
IF HB_ISBLOCK( bProgress )
nRead += nLen
Eval( bProgress, nRead, nSize )
@@ -460,7 +460,7 @@ FUNCTION hb_UnzipFile( cFileName, bUpdate, lWithPath, cPassword, cPath, acFiles,
FWrite( hHandle, cBuffer, nLen )
ENDDO
hb_UnzipFileClose( hUnzip )
hb_unzipFileClose( hUnzip )
FClose( hHandle )
hb_FSetDateTime( cPath + cZipName, dDate, cTime )
@@ -471,10 +471,10 @@ FUNCTION hb_UnzipFile( cFileName, bUpdate, lWithPath, cPassword, cPath, acFiles,
ENDIF
ENDIF
nErr := hb_UnzipFileNext( hUnzip )
nErr := hb_unzipFileNext( hUnzip )
ENDDO
hb_UnzipClose( hUnzip )
hb_unzipClose( hUnzip )
ELSE
lRetVal := .F.
ENDIF
@@ -502,7 +502,7 @@ FUNCTION hb_ZipDeleteFiles( cFileName, acFiles )
ENDIF
FOR EACH cFileToProc IN acFiles
lRetVal := lRetVal .AND. hb_ZipDeleteFile( cFileName, cFileToProc )
lRetVal := lRetVal .AND. hb_zipDeleteFile( cFileName, cFileToProc )
NEXT
RETURN lRetVal