2009-02-02 22:40 UTC+0100 Viktor Szakats (harbour.01 syenar hu)

* contrib/hbct/fcopy.prg
  * contrib/hbtpathy/telepath.prg
  * contrib/hbziparc/hbziparc.prg
  * contrib/rddado/adordd.prg
  * contrib/gtwvg/wvgpaint.prg
  * contrib/gtwvg/tests/demowvg.prg
  * contrib/hbpgsql/pgrdd.prg
  * contrib/hbwin/win_tole.prg
  * contrib/hbvpdf/hbvpdf.prg
  * contrib/hbwhat/wincore.prg
    * Renamed THREAD STATIC vars to t_* (from s_*).
This commit is contained in:
Viktor Szakats
2009-02-02 21:45:25 +00:00
parent d13af773dd
commit 11b824d53b
11 changed files with 784 additions and 772 deletions

View File

@@ -8,6 +8,19 @@
2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org)
*/
2009-02-02 22:40 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* contrib/hbct/fcopy.prg
* contrib/hbtpathy/telepath.prg
* contrib/hbziparc/hbziparc.prg
* contrib/rddado/adordd.prg
* contrib/gtwvg/wvgpaint.prg
* contrib/gtwvg/tests/demowvg.prg
* contrib/hbpgsql/pgrdd.prg
* contrib/hbwin/win_tole.prg
* contrib/hbvpdf/hbvpdf.prg
* contrib/hbwhat/wincore.prg
* Renamed THREAD STATIC vars to t_* (from s_*).
2009-02-02 17:25 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* doc/cmpopt.txt
! Fixed missing SVN keyword.

View File

@@ -108,25 +108,25 @@ MEMVAR cCdxExp, First, Last, City
//-------------------------------------------------------------------//
thread static wvtScreen := {}
thread static pic_:= { , , , , , , , , , , , , , , , , , , , }
thread static keys_:= { , , , , , , , , , , , , , , , , , , , }
thread static t_wvtScreen := {}
thread static t_pic_:= { , , , , , , , , , , , , , , , , , , , }
thread static t_keys_:= { , , , , , , , , , , , , , , , , , , , }
thread static ahFonts := {}
thread static aSlides := {}
thread static shIcon, shImage
thread static t_ahFonts := {}
thread static t_aSlides := {}
thread static t_hIcon, t_hImage
#ifdef __XCC__
static paint_:= { { "", {} } }
static s_paint_:= { { "", {} } }
#endif
static pGT_:= { NIL,NIL,NIL }
static s_pGT_:= { NIL,NIL,NIL }
//-------------------------------------------------------------------//
EXIT PROCEDURE KillGTs()
pGT_[ 1 ] := NIL
pGT_[ 2 ] := NIL
pGT_[ 3 ] := NIL
s_pGT_[ 1 ] := NIL
s_pGT_[ 2 ] := NIL
s_pGT_[ 3 ] := NIL
RETURN
//----------------------------------------------------------------------//
@@ -173,7 +173,7 @@ PROCEDURE Main()
hPopup := Wvt_SetPopupMenu()
oMenu := CreateMainMenu()
pGT_[ 1 ] := hb_gtSelect()
s_pGT_[ 1 ] := hb_gtSelect()
// Force mouse pointer right below the xHarbour label
//
@@ -297,7 +297,7 @@ PROCEDURE Main()
Wvt_SetPopupMenu( hPopup )
Popups( 1, .t. )
pGT_[ 1 ] := NIL
s_pGT_[ 1 ] := NIL
RETURN
//-------------------------------------------------------------------//
@@ -457,25 +457,25 @@ PROCEDURE WvtNextGets_X()
FUNCTION WvtSetKeys( lSet )
if lSet
keys_[ 2 ] := SetKey( K_F2, {|| WvtNextGets() } )
keys_[ 3 ] := SetKey( K_F3, {|| WvtWindowExpand( 1 ) } )
keys_[ 4 ] := SetKey( K_F4, {|| WvtWindowExpand( -1 ) } )
keys_[ 5 ] := SetKey( K_F5, {|| WvtMyBrowse() } )
keys_[ 6 ] := SetKey( K_F6, {|| Wvt_Minimize() } )
keys_[ 7 ] := SetKey( K_F7, {|| WvtPartialScreen() } )
keys_[ 8 ] := SetKey( K_F8, {|| WvtLines() } )
keys_[ 9 ] := SetKey( K_F9, {|| Wvt_ChooseFont() } )
keys_[ 10] := SetKey( K_F10,{|| Wvt_ChooseColor() } )
t_keys_[ 2 ] := SetKey( K_F2, {|| WvtNextGets() } )
t_keys_[ 3 ] := SetKey( K_F3, {|| WvtWindowExpand( 1 ) } )
t_keys_[ 4 ] := SetKey( K_F4, {|| WvtWindowExpand( -1 ) } )
t_keys_[ 5 ] := SetKey( K_F5, {|| WvtMyBrowse() } )
t_keys_[ 6 ] := SetKey( K_F6, {|| Wvt_Minimize() } )
t_keys_[ 7 ] := SetKey( K_F7, {|| WvtPartialScreen() } )
t_keys_[ 8 ] := SetKey( K_F8, {|| WvtLines() } )
t_keys_[ 9 ] := SetKey( K_F9, {|| Wvt_ChooseFont() } )
t_keys_[ 10] := SetKey( K_F10,{|| Wvt_ChooseColor() } )
else
SetKey( K_F2, keys_[ 2 ] )
SetKey( K_F3, keys_[ 3 ] )
SetKey( K_F4, keys_[ 4 ] )
SetKey( K_F5, keys_[ 5 ] )
SetKey( K_F6, keys_[ 6 ] )
SetKey( K_F7, keys_[ 7 ] )
SetKey( K_F8, keys_[ 8 ] )
SetKey( K_F9, keys_[ 9 ] )
SetKey( K_F10, keys_[ 10] )
SetKey( K_F2, t_keys_[ 2 ] )
SetKey( K_F3, t_keys_[ 3 ] )
SetKey( K_F4, t_keys_[ 4 ] )
SetKey( K_F5, t_keys_[ 5 ] )
SetKey( K_F6, t_keys_[ 6 ] )
SetKey( K_F7, t_keys_[ 7 ] )
SetKey( K_F8, t_keys_[ 8 ] )
SetKey( K_F9, t_keys_[ 9 ] )
SetKey( K_F10, t_keys_[ 10] )
endif
RETURN Nil
@@ -610,12 +610,12 @@ FUNCTION Wvt_Mouse( nKey, nRow, nCol )
FUNCTION WvtSetBlocks( a_ )
LOCAL o
THREAD STATIC s := {}
THREAD STATIC t := {}
o := aclone( s )
o := aclone( t )
IF a_ != nil
s := aclone( a_ )
t := aclone( a_ )
ENDIF
RETURN o
@@ -773,7 +773,7 @@ FUNCTION WvtMyBrowse_X( oCrt )
BrwBuildMenu( oCrt )
oTBar := ActiveXBuildToolBar( oCrt )
pGT_[ 2 ] := hb_gtSelect()
s_pGT_[ 2 ] := hb_gtSelect()
cRDD := "DBFCDX"
cFileDbf := "test.dbf"
@@ -891,7 +891,7 @@ FUNCTION WvtMyBrowse_X( oCrt )
DBCloseArea()
RestScreen( 0, 0, maxrow(), maxcol(), cScr )
Wvt_setPopupMenu( hPopup )
pGT_[ 2 ] := NIL
s_pGT_[ 2 ] := NIL
RETURN nil
//-------------------------------------------------------------------//
@@ -1355,9 +1355,9 @@ FUNCTION Popups( nID, lDestroy )
FUNCTION WvtPictures( nSlot,cFilePic )
if nSlot != nil .and. nSlot <= 20 .and. file( cFilePic )
if pic_[ nSlot ] != cFilePic
if t_pic_[ nSlot ] != cFilePic
if Wvt_LoadPicture( cFilePic, nSlot )
pic_[ nSlot ] := cFilePic
t_pic_[ nSlot ] := cFilePic
endif
endif
endif
@@ -1366,7 +1366,7 @@ FUNCTION WvtPictures( nSlot,cFilePic )
//-------------------------------------------------------------------//
FUNCTION WvtExePicture( nTop, nLeft, nBottom, nRight, nSlot, aOffset )
if pic_[ nSlot ] != nil
if t_pic_[ nSlot ] != nil
Wvt_DrawPicture( nTop, nLeft, nBottom, nRight, nSlot, aOffSet )
endif
@@ -2053,29 +2053,29 @@ Function DynDlgProc_2( hDlg, nMsg, wParam, lParam )
case WM_INITDIALOG
Win_SetTimer( hDlg, 5001, 1000 ) // 1 sec
if empty( ahFonts )
if empty( t_ahFonts )
if ( hFont := Wvt_CreateFont( "Times New Roman", 18 ) ) != 0
aadd( ahFonts, hFont )
aadd( t_ahFonts, hFont )
endif
endif
if len( ahFonts ) > 0
Win_SendMessage( Win_GetDlgItem( hDlg, ID_MLE ), WM_SETFONT, ahFonts[ 1 ], 0 )
if len( t_ahFonts ) > 0
Win_SendMessage( Win_GetDlgItem( hDlg, ID_MLE ), WM_SETFONT, t_ahFonts[ 1 ], 0 )
endif
if shIcon == nil
shIcon := Win_LoadIcon( "vr_1.ico" )
if t_hIcon == nil
t_hIcon := Win_LoadIcon( "vr_1.ico" )
endif
if shIcon != nil .or. shIcon != 0
Win_SendMessage( Win_GetDlgItem( hDlg, ID_ICO_VOUCH ), STM_SETIMAGE, IMAGE_ICON, shIcon )
if t_hIcon != nil .or. t_hIcon != 0
Win_SendMessage( Win_GetDlgItem( hDlg, ID_ICO_VOUCH ), STM_SETIMAGE, IMAGE_ICON, t_hIcon )
endif
/*
if shImage == nil
shImage := Win_LoadImage( "vouch1.bmp", 2 )
if t_hImage == nil
t_hImage := Win_LoadImage( "vouch1.bmp", 2 )
endif
if shImage != nil .and. shImage != 0
Win_SendMessage( Win_GetDlgItem( hDlg, ID_STA_IMAGE ), STM_SETIMAGE, IMAGE_BITMAP, shImage )
if t_hImage != nil .and. t_hImage != 0
Win_SendMessage( Win_GetDlgItem( hDlg, ID_STA_IMAGE ), STM_SETIMAGE, IMAGE_BITMAP, t_hImage )
endif
*/
Win_SetDlgItemText( hDlg, ID_MLE , GetEditText() )
@@ -2153,16 +2153,16 @@ static function GetEditText()
EXIT PROCEDURE CleanHandles()
LOCAL i
for i := 1 to len( ahFonts )
Win_DeleteObject( ahFonts[ i ] )
for i := 1 to len( t_ahFonts )
Win_DeleteObject( t_ahFonts[ i ] )
next
if shIcon != nil
Win_DeleteObject( shIcon )
if t_hIcon != nil
Win_DeleteObject( t_hIcon )
endif
if shImage != nil
Win_DeleteObject( shImage )
if t_hImage != nil
Win_DeleteObject( t_hImage )
endif
Return
@@ -2172,7 +2172,7 @@ EXIT PROCEDURE CleanHandles()
FUNCTION DlgSlideShow()
LOCAL hDlg, aDlg, nStyle
aSlides := { "vouch1.bmp", "v_notes.ico", "2000.gif", "v_lock.bmp", "v_help.ico" }
t_aSlides := { "vouch1.bmp", "v_notes.ico", "2000.gif", "v_lock.bmp", "v_help.ico" }
nStyle := DS_SETFONT + WS_VISIBLE + WS_POPUP + WS_CAPTION + WS_SYSMENU + WS_THICKFRAME + WS_MINIMIZEBOX
@@ -2203,7 +2203,7 @@ FUNCTION DlgSlideShowProc( hDlg, nMsg, wParam, lParam )
case WM_TIMER
nSlide++
if nSlide > len( aSlides )
if nSlide > len( t_aSlides )
nSlide := 1
endif
DrawSlide( hDlg, nSlide )
@@ -2222,7 +2222,7 @@ FUNCTION DrawSlide( hDlg, nSlide )
Win_Rectangle( hDC, aRect[ 1 ]+10, aRect[ 2 ]+10, aRect[ 3 ]-10, aRect[ 4 ]-10 )
Win_DrawImage( hDC, aRect[ 1 ]+10, aRect[ 2 ]+10, aRect[ 3 ] - aRect[ 1 ] -20, ;
aRect[ 4 ] - aRect[ 2 ] - 20, aSlides[ nSlide ] )
aRect[ 4 ] - aRect[ 2 ] - 20, t_aSlides[ nSlide ] )
Win_ReleaseDC( hDlg,hDC )
@@ -2280,7 +2280,7 @@ Static Function DoModalWindow()
oCrt:Create()
oCrt:show()
pGT_[ 3 ] := hb_gtSelect()
s_pGT_[ 3 ] := hb_gtSelect()
// Here goes the Clipper Code
//
@@ -2297,7 +2297,7 @@ Static Function DoModalWindow()
// Cleanup
//
pGT_[ 3 ] := NIL
s_pGT_[ 3 ] := NIL
oCrt:Destroy()
Return nil

View File

@@ -65,9 +65,9 @@
//-------------------------------------------------------------------//
#if 0 // Until THREAD STATIC is made true thread sttaic
thread static paint_:= { { '', {} } }
thread static t_paint_:= { { '', {} } }
#else
thread static paint_
thread static t_paint_
#endif
//-------------------------------------------------------------------//
@@ -148,16 +148,16 @@ function WvtPaintObjects()
function WvtSetPaint( a_ )
local o
thread static s
thread static t
IF s == nil
s := {}
IF t == nil
t := {}
ENDIF
o := s
o := t
if a_ <> nil
s := a_
t := a_
endif
return o
@@ -167,23 +167,23 @@ function WvtSetPaint( a_ )
function SetPaint( cID, nAction, xData, aAttr )
local n, n1, oldData
IF paint_== NIL
paint_:= { { '', {} } }
IF t_paint_== NIL
t_paint_:= { { '', {} } }
ENDIF
if xData <> nil
if ( n := ascan( paint_, { |e_| e_[ 1 ] == cID } ) ) > 0
if ( n1 := ascan( paint_[ n,2 ], {|e_| e_[ 1 ] == nAction } ) ) > 0
oldData := paint_[ n,2,n1,2 ]
paint_[ n,2,n1,2 ] := xData
paint_[ n,2,n1,3 ] := aAttr
if ( n := ascan( t_paint_, { |e_| e_[ 1 ] == cID } ) ) > 0
if ( n1 := ascan( t_paint_[ n,2 ], {|e_| e_[ 1 ] == nAction } ) ) > 0
oldData := t_paint_[ n,2,n1,2 ]
t_paint_[ n,2,n1,2 ] := xData
t_paint_[ n,2,n1,3 ] := aAttr
else
aadd( paint_[ n,2 ], { nAction,xData,aAttr } )
aadd( t_paint_[ n,2 ], { nAction,xData,aAttr } )
endif
else
aadd( paint_, { cID, {} } )
n := len( paint_ )
aadd( paint_[ n,2 ], { nAction, xData, aAttr } )
aadd( t_paint_, { cID, {} } )
n := len( t_paint_ )
aadd( t_paint_[ n,2 ], { nAction, xData, aAttr } )
endif
endif
@@ -194,12 +194,12 @@ function SetPaint( cID, nAction, xData, aAttr )
function GetPaint( cID )
local n
IF paint_== NIL
paint_:= { { '', {} } }
IF t_paint_== NIL
t_paint_:= { { '', {} } }
ENDIF
if ( n := ascan( paint_, { |e_| e_[ 1 ] == cID } ) ) > 0
return paint_[ n,2 ]
if ( n := ascan( t_paint_, { |e_| e_[ 1 ] == cID } ) ) > 0
return t_paint_[ n,2 ]
endif
return {}
@@ -209,14 +209,14 @@ function GetPaint( cID )
function DelPaint( cID, nAction )
local xData, n1, n
IF paint_== NIL
paint_:= { { '', {} } }
IF t_paint_== NIL
t_paint_:= { { '', {} } }
ENDIF
if ( n := ascan( paint_, { |e_| e_[ 1 ] == cID } ) ) > 0
if ( n1 := ascan( paint_[ n,2 ], {|e_| e_[ 1 ] == nAction } ) ) > 0
xData := paint_[ n,2,n1,2 ]
paint_[ n,2,n1,2 ] := {|| .t. }
if ( n := ascan( t_paint_, { |e_| e_[ 1 ] == cID } ) ) > 0
if ( n1 := ascan( t_paint_[ n,2 ], {|e_| e_[ 1 ] == nAction } ) ) > 0
xData := t_paint_[ n,2,n1,2 ]
t_paint_[ n,2,n1,2 ] := {|| .t. }
endif
endif
@@ -229,14 +229,14 @@ function PurgePaint( cID,lDummy )
DEFAULT lDummy TO .f.
IF paint_== NIL
paint_:= { { '', {} } }
IF t_paint_== NIL
t_paint_:= { { '', {} } }
ENDIF
if ( n := ascan( paint_, { |e_| e_[ 1 ] == cID } ) ) > 0
aPaint := paint_[ n ]
ADel( paint_, n )
aSize( paint_, len( paint_ ) - 1 )
if ( n := ascan( t_paint_, { |e_| e_[ 1 ] == cID } ) ) > 0
aPaint := t_paint_[ n ]
ADel( t_paint_, n )
aSize( t_paint_, len( t_paint_ ) - 1 )
endif
if lDummy
@@ -252,14 +252,14 @@ function InsertPaint( cID, aPaint, lSet )
DEFAULT lSet TO .f.
IF paint_== NIL
paint_:= { { '', {} } }
IF t_paint_== NIL
t_paint_:= { { '', {} } }
ENDIF
if ( n := ascan( paint_, { |e_| e_[ 1 ] == cID } ) ) > 0
paint_[ n ] := aPaint
if ( n := ascan( t_paint_, { |e_| e_[ 1 ] == cID } ) ) > 0
t_paint_[ n ] := aPaint
else
aadd( paint_, aPaint )
aadd( t_paint_, aPaint )
endif
if lSet

View File

@@ -21,7 +21,7 @@
* Copyright 2007 Przemyslaw Czerpak <druzus / at / priv.onet.pl>
*
* added FILECDATI() and rewritten above functions for CT3 compatibility
* and some problems fixing,
* and some problems fixing,
*
* www - http://www.harbour-project.org
*
@@ -72,10 +72,10 @@
#define F_BLOCK 512
THREAD STATIC s_hSrcFile := -1
THREAD STATIC s_lSetDaTi := .T.
THREAD STATIC s_fileDate
THREAD STATIC s_fileTime
THREAD STATIC t_hSrcFile := -1
THREAD STATIC t_lSetDaTi := .T.
THREAD STATIC t_fileDate
THREAD STATIC t_fileTime
/*
* FileCopy()
@@ -91,15 +91,15 @@ FUNCTION FILECOPY( cSource, cDest, lMode )
IF !ISLOGICAL( lMode )
lMode := .F.
ENDIF
IF s_hSrcFile != -1
FCLOSE( s_hSrcFile )
IF t_hSrcFile != -1
FCLOSE( t_hSrcFile )
ENDIF
s_hSrcFile := FOPEN( cSource, FO_READ )
IF s_hSrcFile != -1
t_hSrcFile := FOPEN( cSource, FO_READ )
IF t_hSrcFile != -1
hDstFile := FCREATE( cDest )
IF hDstFile != -1
DO WHILE !lDone
nSrcBytes := FREAD( s_hSrcFile, @cBuffer, F_BLOCK )
nSrcBytes := FREAD( t_hSrcFile, @cBuffer, F_BLOCK )
IF nSrcBytes == 0
lDone := .T.
EXIT
@@ -114,30 +114,30 @@ FUNCTION FILECOPY( cSource, cDest, lMode )
ENDDO
FCLOSE( hDstFile )
IF lDone .OR. !lMode
FCLOSE( s_hSrcFile )
s_hSrcFile := -1
FCLOSE( t_hSrcFile )
t_hSrcFile := -1
ENDIF
s_fileDate := FILEDATE( cSource )
s_fileTime := FILETIME( cSource )
IF s_lSetDaTi
SETFDATI( cDest, s_fileDate, s_fileTime )
t_fileDate := FILEDATE( cSource )
t_fileTime := FILETIME( cSource )
IF t_lSetDaTi
SETFDATI( cDest, t_fileDate, t_fileTime )
ENDIF
ELSE
FCLOSE( s_hSrcFile )
s_hSrcFile := -1
FCLOSE( t_hSrcFile )
t_hSrcFile := -1
ENDIF
ENDIF
RETURN nTotBytes
FUNCTION FILECOPEN()
RETURN s_hSrcFile != -1
RETURN t_hSrcFile != -1
FUNCTION FILECDATI( lNewMode )
LOCAL lOldMode := s_lSetDaTi
LOCAL lOldMode := t_lSetDaTi
IF ISLOGICAL( lNewMode )
s_lSetDaTi := lNewMode
t_lSetDaTi := lNewMode
ENDIF
RETURN lOldMode
@@ -148,11 +148,11 @@ FUNCTION FILECCONT( cDest )
LOCAL lDone := .F.
LOCAL nSrcBytes, nDstBytes, nTotBytes := 0
IF s_hSrcFile != -1
IF t_hSrcFile != -1
hDstFile := FCREATE( cDest )
IF hDstFile != -1
DO WHILE !lDone
nSrcBytes := FREAD( s_hSrcFile, @cBuffer, F_BLOCK )
nSrcBytes := FREAD( t_hSrcFile, @cBuffer, F_BLOCK )
IF nSrcBytes == 0
lDone := 0
EXIT
@@ -167,11 +167,11 @@ FUNCTION FILECCONT( cDest )
ENDDO
FCLOSE( hDstFile )
IF lDone
FCLOSE( s_hSrcFile )
s_hSrcFile := -1
FCLOSE( t_hSrcFile )
t_hSrcFile := -1
ENDIF
IF s_lSetDaTi
SETFDATI( cDest, s_fileDate, s_fileTime )
IF t_lSetDaTi
SETFDATI( cDest, t_fileDate, t_fileTime )
ENDIF
ENDIF
ENDIF
@@ -179,9 +179,9 @@ RETURN nTotBytes
FUNCTION FILECCLOSE()
IF s_hSrcFile != -1
FCLOSE( s_hSrcFile )
s_hSrcFile := -1
IF t_hSrcFile != -1
FCLOSE( t_hSrcFile )
t_hSrcFile := -1
RETURN .T.
ENDIF
RETURN .F.

View File

@@ -72,7 +72,7 @@
ANNOUNCE PGRDD
THREAD STATIC s_aConnections := {}
THREAD STATIC t_aConnections := {}
FUNCTION DBPGCONNECTION( cConnString )
@@ -90,24 +90,24 @@ FUNCTION DBPGCONNECTION( cConnString )
alert( oServer:ErrorMsg() )
RETURN FAILURE
ELSE
aadd( s_aConnections, oServer )
nConn := len( s_aConnections )
aadd( t_aConnections, oServer )
nConn := len( t_aConnections )
ENDIF
RETURN nConn
FUNCTION DBPGCLEARCONNECTION( nConn )
LOCAL oServer
oServer := s_aConnections[ nConn ]
oServer := t_aConnections[ nConn ]
oServer:Close()
s_aConnections[ nConn ] := nil
t_aConnections[ nConn ] := nil
RETURN SUCCESS
/*
* non work area methods receive RDD ID as first parameter
* Methods INIT and EXIT does not have to execute SUPER methods - these is
@@ -137,8 +137,8 @@ STATIC FUNCTION PG_OPEN( nWA, aOpenInfo )
LOCAL oServer, oQuery, aStruct, aFieldStruct
LOCAL aWAData := USRRDD_AREADATA( nWA )
if !empty( aOpenInfo[ UR_OI_CONNECT ] ) .and. aOpenInfo[ UR_OI_CONNECT ] <= len( s_aConnections )
oServer := s_aConnections[ aOpenInfo[ UR_OI_CONNECT ] ]
if !empty( aOpenInfo[ UR_OI_CONNECT ] ) .and. aOpenInfo[ UR_OI_CONNECT ] <= len( t_aConnections )
oServer := t_aConnections[ aOpenInfo[ UR_OI_CONNECT ] ]
endif
if !empty( oServer )
@@ -147,7 +147,7 @@ STATIC FUNCTION PG_OPEN( nWA, aOpenInfo )
lError := oQuery:NetErr()
cError := oQuery:ErrorMsg()
else
lError := .T.
lError := .T.
cError := "Invalid connection handle"
endif
@@ -163,7 +163,7 @@ STATIC FUNCTION PG_OPEN( nWA, aOpenInfo )
ELSE
aWAData[ AREA_QUERY ] := oQuery
ENDIF
UR_SUPER_SETFIELDEXTENT( nWA, oQuery:nFields )
aStruct := oQuery:Struct()
@@ -194,11 +194,11 @@ RETURN UR_SUPER_CLOSE( nWA )
STATIC FUNCTION PG_GETVALUE( nWA, nField, xValue )
LOCAL aWAData := USRRDD_AREADATA( nWA )
if !empty( aWAData[ AREA_ROW ] )
xValue := aWAData[ AREA_ROW ]:FieldGet( nField )
else
xValue := aWAData[ AREA_QUERY ]:FieldGet( nField )
xValue := aWAData[ AREA_QUERY ]:FieldGet( nField )
endif
RETURN SUCCESS
@@ -301,13 +301,13 @@ STATIC FUNCTION PG_FLUSH( nWA )
oError := ErrorNew()
oError:GenCode := EG_DATATYPE
oError:SubCode := 3000
oError:Description := HB_LANGERRMSG( EG_DATATYPE ) + ", " + aWAData[ AREA_QUERY ]:ErrorMsg()
oError:Description := HB_LANGERRMSG( EG_DATATYPE ) + ", " + aWAData[ AREA_QUERY ]:ErrorMsg()
UR_SUPER_ERROR( nWA, oError )
RETURN FAILURE
ENDIF
/*
* The :Refresh() below costs a lot in term of performance.
* The :Refresh() below costs a lot in term of performance.
* It redo the select to include inserts and updates.
* It is the only solution I've found so far to simulate dbf behaviour
*/
@@ -340,7 +340,7 @@ RETURN SUCCESS
STATIC FUNCTION PG_DELETE( nWA )
LOCAL oError
LOCAL aWAData := USRRDD_AREADATA( nWA )
aWAData[ AREA_ROW ] := aWAData[ AREA_QUERY ]:GetRow()
aWAData[ AREA_QUERY ]:Delete( aWAData[ AREA_ROW ] )
@@ -349,11 +349,11 @@ STATIC FUNCTION PG_DELETE( nWA )
oError := ErrorNew()
oError:GenCode := EG_DATATYPE
oError:SubCode := 2000
oError:Description := HB_LANGERRMSG( EG_DATATYPE ) + ", " + aWAData[ AREA_QUERY ]:ErrorMsg()
oError:Description := HB_LANGERRMSG( EG_DATATYPE ) + ", " + aWAData[ AREA_QUERY ]:ErrorMsg()
UR_SUPER_ERROR( nWA, oError )
RETURN FAILURE
ENDIF
aWAData[ AREA_ROW ] := nil
RETURN SUCCESS

View File

@@ -64,8 +64,8 @@
THREAD STATIC s_aPorts // Array with port info
THREAD STATIC s_nErrorCode := 0 // Error code from last operation, 0 if no error
THREAD STATIC t_aPorts // Array with port info
THREAD STATIC t_nErrorCode := 0 // Error code from last operation, 0 if no error
@@ -74,7 +74,7 @@ function tp_baud( nPort, nNewBaud )
default nNewBaud to 0
if ! isport( nPort ) .OR. Empty( s_aPorts[ nPort, TPFP_NAME ] )
if ! isport( nPort ) .OR. Empty( t_aPorts[ nPort, TPFP_NAME ] )
return TE_NOPORT
endif
@@ -83,13 +83,13 @@ function tp_baud( nPort, nNewBaud )
endif
if nNewBaud > 0
if p_InitPortSpeed( s_aPorts[ nPort, TPFP_HANDLE ] ,;
if p_InitPortSpeed( t_aPorts[ nPort, TPFP_HANDLE ] ,;
nNewBaud,;
s_aPorts[ nPort, TPFP_DBITS ] ,;
s_aPorts[ nPort, TPFP_PARITY ] ,;
s_aPorts[ nPort, TPFP_SBITS ] ) == 0
t_aPorts[ nPort, TPFP_DBITS ] ,;
t_aPorts[ nPort, TPFP_PARITY ] ,;
t_aPorts[ nPort, TPFP_SBITS ] ) == 0
s_aPorts[ nPort, TPFP_BAUD ] := nNewBaud
t_aPorts[ nPort, TPFP_BAUD ] := nNewBaud
else
@@ -97,7 +97,7 @@ function tp_baud( nPort, nNewBaud )
endif
endif
return s_aPorts[ nPort, TPFP_BAUD ]
return t_aPorts[ nPort, TPFP_BAUD ]
@@ -148,16 +148,16 @@ function tp_close( nPort, nTimeout )
tp_flush( nPort, nTimeout )
endif
if s_aPorts[ nPort, TPFP_HANDLE ] >= 0
if t_aPorts[ nPort, TPFP_HANDLE ] >= 0
fClose( s_aPorts[ nPort, TPFP_HANDLE ] )
fClose( t_aPorts[ nPort, TPFP_HANDLE ] )
/* Port parameters should stay the same for the case the port
gets reopened
*/
s_aPorts[ nPort, TPFP_OC ] := .F.
s_aPorts[ nPort, TPFP_INBUF ] := ""
s_aPorts[ nPort, TPFP_HANDLE ] := -1
t_aPorts[ nPort, TPFP_OC ] := .F.
t_aPorts[ nPort, TPFP_INBUF ] := ""
t_aPorts[ nPort, TPFP_HANDLE ] := -1
endif
return 0
@@ -170,15 +170,15 @@ function tp_reopen( nPort, nInSize, nOutSize )
default nInSize to 1536, nOutSize to 1536
if ! isport( nPort ) .OR. Empty( s_aPorts[ nPort, TPFP_NAME ] )
if ! isport( nPort ) .OR. Empty( t_aPorts[ nPort, TPFP_NAME ] )
return TE_NOPORT
endif
cPortname := s_aPorts[ nPort, TPFP_NAME ]
nBaud := s_aPorts[ nPort, TPFP_BAUD ]
nData := s_aPorts[ nPort, TPFP_DBITS ]
cParity := s_aPorts[ nPort, TPFP_PARITY ]
nStop := s_aPorts[ nPort, TPFP_SBITS ]
cPortname := t_aPorts[ nPort, TPFP_NAME ]
nBaud := t_aPorts[ nPort, TPFP_BAUD ]
nData := t_aPorts[ nPort, TPFP_DBITS ]
cParity := t_aPorts[ nPort, TPFP_PARITY ]
nStop := t_aPorts[ nPort, TPFP_SBITS ]
return tp_open( nPort, nInSize, nOutSize, nBaud, nData, cParity, nStop, cPortName )
@@ -230,37 +230,37 @@ function tp_open( nPort, nInSize, nOutSize, nBaud, nData, cParity, nStop, cPortn
return TE_NOPORT
endif
s_aPorts[ nPort, TPFP_NAME ] := cPortname
s_aPorts[ nPort, TPFP_BAUD ] := nBaud
s_aPorts[ nPort, TPFP_DBITS ] := nData
s_aPorts[ nPort, TPFP_PARITY ] := cParity
s_aPorts[ nPort, TPFP_SBITS ] := nStop
s_aPorts[ nPort, TPFP_OC ] := .F.
s_aPorts[ nPort, TPFP_INBUF ] := ""
s_aPorts[ nPort, TPFP_INBUF_SIZE ] := nInSize
t_aPorts[ nPort, TPFP_NAME ] := cPortname
t_aPorts[ nPort, TPFP_BAUD ] := nBaud
t_aPorts[ nPort, TPFP_DBITS ] := nData
t_aPorts[ nPort, TPFP_PARITY ] := cParity
t_aPorts[ nPort, TPFP_SBITS ] := nStop
t_aPorts[ nPort, TPFP_OC ] := .F.
t_aPorts[ nPort, TPFP_INBUF ] := ""
t_aPorts[ nPort, TPFP_INBUF_SIZE ] := nInSize
#ifdef __PLATFORM__LINUX
// Maybe we should have a p_Open() on every platform
s_aPorts[ nPort, TPFP_HANDLE ] := p_Open( cPortname )
t_aPorts[ nPort, TPFP_HANDLE ] := p_Open( cPortname )
#else
s_aPorts[ nPort, TPFP_HANDLE ] := fOpen( cPortname, FO_READWRITE )
t_aPorts[ nPort, TPFP_HANDLE ] := fOpen( cPortname, FO_READWRITE )
#endif
if s_aPorts[ nPort, TPFP_HANDLE ] >= 0
if t_aPorts[ nPort, TPFP_HANDLE ] >= 0
/* low level C functions are prefixed p_ (don't ask me why :)) */
if ( nRes := p_InitPortSpeed( s_aPorts[ nPort, TPFP_HANDLE ] ,;
s_aPorts[ nPort, TPFP_BAUD ] ,;
s_aPorts[ nPort, TPFP_DBITS ] ,;
s_aPorts[ nPort, TPFP_PARITY ] ,;
s_aPorts[ nPort, TPFP_SBITS ] ) ) == 0
if ( nRes := p_InitPortSpeed( t_aPorts[ nPort, TPFP_HANDLE ] ,;
t_aPorts[ nPort, TPFP_BAUD ] ,;
t_aPorts[ nPort, TPFP_DBITS ] ,;
t_aPorts[ nPort, TPFP_PARITY ] ,;
t_aPorts[ nPort, TPFP_SBITS ] ) ) == 0
s_aPorts[ nPort, TPFP_OC ] := .T.
t_aPorts[ nPort, TPFP_OC ] := .T.
return nRes
else
tp_Close( s_aPorts[ nPort, TPFP_HANDLE ] )
tp_Close( t_aPorts[ nPort, TPFP_HANDLE ] )
return nRes
endif
@@ -270,15 +270,15 @@ function tp_open( nPort, nInSize, nOutSize, nBaud, nData, cParity, nStop, cPortn
// set error code to a static var to have tp_error() work as expected
//cnHandle := ferror()
s_aPorts[ nPort, TPFP_NAME ] := ""
s_aPorts[ nPort, TPFP_HANDLE ] := -1
s_aPorts[ nPort, TPFP_BAUD ] := 1200
s_aPorts[ nPort, TPFP_DBITS ] := 8
s_aPorts[ nPort, TPFP_PARITY ] := "N"
s_aPorts[ nPort, TPFP_SBITS ] := 1
s_aPorts[ nPort, TPFP_OC ] := .F.
s_aPorts[ nPort, TPFP_INBUF ] := ""
s_aPorts[ nPort, TPFP_INBUF_SIZE ] := 0
t_aPorts[ nPort, TPFP_NAME ] := ""
t_aPorts[ nPort, TPFP_HANDLE ] := -1
t_aPorts[ nPort, TPFP_BAUD ] := 1200
t_aPorts[ nPort, TPFP_DBITS ] := 8
t_aPorts[ nPort, TPFP_PARITY ] := "N"
t_aPorts[ nPort, TPFP_SBITS ] := 1
t_aPorts[ nPort, TPFP_OC ] := .F.
t_aPorts[ nPort, TPFP_INBUF ] := ""
t_aPorts[ nPort, TPFP_INBUF_SIZE ] := 0
return TE_CONFL // maybe should return something different?
@@ -289,14 +289,14 @@ function tp_recv( nPort, nLength, nTimeout )
local nDone
local cRet
default nLength to s_aPorts[ nPort, TPFP_INBUF_SIZE ]
default nLength to t_aPorts[ nPort, TPFP_INBUF_SIZE ]
default nTimeout to 0
FetchChars( nPort )
nDone := Seconds() + iif( nTimeout >= 0, nTimeout, 0 )
while Len( s_aPorts[ nPort, TPFP_INBUF ] ) < nLength .AND.;
while Len( t_aPorts[ nPort, TPFP_INBUF ] ) < nLength .AND.;
( nTimeout < 0 .OR. Seconds() < nDone )
if ! tp_idle()
@@ -307,12 +307,12 @@ function tp_recv( nPort, nLength, nTimeout )
enddo
if nLength > Len( s_aPorts[ nPort, TPFP_INBUF ] )
cRet := s_aPorts[ nPort, TPFP_INBUF ]
s_aPorts[ nPort, TPFP_INBUF ] := ""
if nLength > Len( t_aPorts[ nPort, TPFP_INBUF ] )
cRet := t_aPorts[ nPort, TPFP_INBUF ]
t_aPorts[ nPort, TPFP_INBUF ] := ""
else
cRet := SubStr( s_aPorts[ nPort, TPFP_INBUF ], 1, nLength )
s_aPorts[ nPort, TPFP_INBUF ] := SubStr( s_aPorts[ nPort, TPFP_INBUF ], nLength + 1 )
cRet := SubStr( t_aPorts[ nPort, TPFP_INBUF ], 1, nLength )
t_aPorts[ nPort, TPFP_INBUF ] := SubStr( t_aPorts[ nPort, TPFP_INBUF ], nLength + 1 )
endif
return cRet
@@ -339,7 +339,7 @@ function tp_send( nPort, cString, nTimeout )
while nTotWritten < Len( cString ) .AND. ;
( nTimeout < 0 .OR. Seconds() <= nDone )
nWritten := p_WritePort( s_aPorts[ nPort, TPFP_HANDLE ], SubStr( cString, nTotWritten + 1 ) )
nWritten := p_WritePort( t_aPorts[ nPort, TPFP_HANDLE ], SubStr( cString, nTotWritten + 1 ) )
if nWritten >= 0
@@ -398,7 +398,7 @@ function tp_recvto( nPort, cDelim, nMaxlen, nTimeout )
/* Telepathy ng: [...] If nTimeout is omitted or zero, reads until finding the
delimiter or the input buffer is empty. */
if nTimeout == 0 .AND. Empty( s_aPorts[ nPort, TPFP_INBUF ] )
if nTimeout == 0 .AND. Empty( t_aPorts[ nPort, TPFP_INBUF ] )
return ""
endif
@@ -408,7 +408,7 @@ function tp_recvto( nPort, cDelim, nMaxlen, nTimeout )
if Len( cDelim ) == 1
nAt := hb_At( cDelim, s_aPorts[ nPort, TPFP_INBUF ], nStartPos )
nAt := hb_At( cDelim, t_aPorts[ nPort, TPFP_INBUF ], nStartPos )
if nAt > 0 .AND. iif( nFirst > 0, nAt < nFirst, .T. )
nFirst := nAt
@@ -418,7 +418,7 @@ function tp_recvto( nPort, cDelim, nMaxlen, nTimeout )
FOR EACH cChar IN cDelim
nAt := hb_At( cChar, s_aPorts[ nPort, TPFP_INBUF ], nStartPos )
nAt := hb_At( cChar, t_aPorts[ nPort, TPFP_INBUF ], nStartPos )
if nAt > 0 .AND. iif( nFirst > 0, nAt < nFirst, .T. )
nFirst := nAt
@@ -435,7 +435,7 @@ function tp_recvto( nPort, cDelim, nMaxlen, nTimeout )
else
// Next loop I don't need to search that part of the input buffer that
// I've already just searched for
nStartPos := Max( Len( s_aPorts[ nPort, TPFP_INBUF ] ), 1 )
nStartPos := Max( Len( t_aPorts[ nPort, TPFP_INBUF ] ), 1 )
// I've read more characters than I'm allowed to, so I exit
if nStartPos >= nMaxLen
@@ -452,8 +452,8 @@ function tp_recvto( nPort, cDelim, nMaxlen, nTimeout )
enddo
if nFirst > 0
cRet := Left( s_aPorts[ nPort, TPFP_INBUF ], nFirst )
s_aPorts[ nPort, TPFP_INBUF ] := SubStr( s_aPorts[ nPort, TPFP_INBUF ], nFirst + 1 )
cRet := Left( t_aPorts[ nPort, TPFP_INBUF ], nFirst )
t_aPorts[ nPort, TPFP_INBUF ] := SubStr( t_aPorts[ nPort, TPFP_INBUF ], nFirst + 1 )
endif
return cRet
@@ -474,7 +474,7 @@ function tp_lookfor( nPort, cLookfor )
FetchChars( nPort )
return At( cLookfor, s_aPorts[ nPort, TPFP_INBUF ] )
return At( cLookfor, t_aPorts[ nPort, TPFP_INBUF ] )
@@ -486,7 +486,7 @@ function tp_inchrs( nPort )
FetchChars( nPort )
return Len( s_aPorts[ nPort, TPFP_INBUF ] )
return Len( t_aPorts[ nPort, TPFP_INBUF ] )
@@ -496,7 +496,7 @@ function tp_outfree( nPort )
return 0
endif
return p_OutFree( s_aPorts[ nPort, TPFP_HANDLE ] )
return p_OutFree( t_aPorts[ nPort, TPFP_HANDLE ] )
@@ -504,7 +504,7 @@ function tp_clearin( nPort )
if isopenport( nPort )
FetchChars( nPort )
s_aPorts[ nPort, TPFP_INBUF ] := ""
t_aPorts[ nPort, TPFP_INBUF ] := ""
endif
return nil
@@ -567,9 +567,9 @@ function tp_waitfor( ... )
for x := 1 to len( acList )
if lIgnorecase
nAt := at( upper( acList[ x ] ), upper( s_aPorts[ nPort, TPFP_INBUF ] ))
nAt := at( upper( acList[ x ] ), upper( t_aPorts[ nPort, TPFP_INBUF ] ))
else
nAt := at( acList[ x ] , s_aPorts[ nPort, TPFP_INBUF ] )
nAt := at( acList[ x ] , t_aPorts[ nPort, TPFP_INBUF ] )
endif
if nAt > 0 .and. nAt < nFirst
nFirst := nAt
@@ -608,10 +608,10 @@ function tp_ctrlcts( nPort, nNewCtrl )
endif
if Valtype( nNewCtrl ) == "U"
nCurValue := p_ctrlcts( s_aPorts[ nPort, TPFP_HANDLE ] )
nCurValue := p_ctrlcts( t_aPorts[ nPort, TPFP_HANDLE ] )
else
nCurValue := p_ctrlcts( s_aPorts[ nPort, TPFP_HANDLE ], nNewCtrl )
nCurValue := p_ctrlcts( t_aPorts[ nPort, TPFP_HANDLE ], nNewCtrl )
endif
@@ -637,7 +637,7 @@ function tp_ctrldtr( nPort, nParamNewval )
if ! isopenport( nPort )
return -1
endif
nph := s_aPorts[ nPort, TPFP_HANDLE ]
nph := t_aPorts[ nPort, TPFP_HANDLE ]
_P_CTRLDTR(nph, @nnewval, @noldval)
@@ -652,7 +652,7 @@ function tp_isdcd( nPort )
return .f.
endif
return p_isdcd( s_aPorts[ nPort, TPFP_HANDLE ] )
return p_isdcd( t_aPorts[ nPort, TPFP_HANDLE ] )
@@ -662,7 +662,7 @@ function tp_isri( nPort )
return .f.
endif
return p_isri( s_aPorts[ nPort, TPFP_HANDLE ] )
return p_isri( t_aPorts[ nPort, TPFP_HANDLE ] )
@@ -672,7 +672,7 @@ function tp_isdsr( nPort )
return .f.
endif
return p_isdsr( s_aPorts[ nPort, TPFP_HANDLE ] )
return p_isdsr( t_aPorts[ nPort, TPFP_HANDLE ] )
@@ -682,7 +682,7 @@ function tp_iscts( nPort )
return .f.
endif
return p_iscts( s_aPorts[ nPort, TPFP_HANDLE ] )
return p_iscts( t_aPorts[ nPort, TPFP_HANDLE ] )
@@ -700,7 +700,7 @@ function tp_flush( nPort, nTimeout )
return TE_CLOSED
endif
nRes := p_Drain( s_aPorts[ nPort, TPFP_HANDLE ] )
nRes := p_Drain( t_aPorts[ nPort, TPFP_HANDLE ] )
// Sleep rest of timeout
/*
@@ -767,7 +767,7 @@ static function isopenport( nPort )
return .f.
endif
return s_aPorts[ nPort, TPFP_OC ]
return t_aPorts[ nPort, TPFP_OC ]
@@ -789,10 +789,10 @@ static function FetchChars( nPort )
return 0
endif
cStr := p_ReadPort( s_aPorts[ nPort, TPFP_HANDLE ] )
cStr := p_ReadPort( t_aPorts[ nPort, TPFP_HANDLE ] )
if ! Empty( cStr )
s_aPorts[ nPort, TPFP_INBUF ] += cStr
t_aPorts[ nPort, TPFP_INBUF ] += cStr
endif
return Len( cStr )
@@ -803,11 +803,11 @@ INIT PROCEDURE _tpinit()
local x
if s_aPorts == nil
s_aPorts := array( TP_MAXPORTS )
for x := 1 to len( s_aPorts )
if t_aPorts == nil
t_aPorts := array( TP_MAXPORTS )
for x := 1 to len( t_aPorts )
/// port name, file handle, baud, data bits, parity, stop bits, Open?, input buffer, input buff.size
s_aPorts[ x ] := { "", -1, 1200, 8, "N", 1, .F., "", 0 }
t_aPorts[ x ] := { "", -1, 1200, 8, "N", 1, .F., "", 0 }
next
endif

File diff suppressed because it is too large Load Diff

View File

@@ -30,7 +30,7 @@
//PUBLIC lPrevInstance
//PUBLIC hThisInstance
THREAD STATIC s_hWndActive := 0
THREAD STATIC t_hWndActive := 0
STATIC s_aClass:={} // cClass,nType,{{anWM,bAction,nProc,0}}
STATIC s_aWindow:={} // hWnd, nType, {{anWM,bAction,nProc,nOldProc}}
@@ -323,7 +323,7 @@ Function __KillWindow( hWnd )
// to the codeblock
//
Function WHT__ProcessDlgMsg( hDlg, nMsg, nwParam, nlParam )
Local nIndex
Local nIndex
Local nResult
Local n
@@ -659,10 +659,10 @@ Function WHT_WinProcCount( hWnd, nProc )
Function WHT_SelectWindow( hNewWnd )
Local hOldActive := s_hWndActive
Local hOldActive := t_hWndActive
If hNewWnd != NIL .AND. VWN_IsWindow( hNewWnd )
s_hWndActive := hNewWnd
t_hWndActive := hNewWnd
EndIf
Return( hOldActive )

View File

@@ -67,11 +67,11 @@
#define EG_OLEEXCEPTION 1001
#xcommand TRY => BEGIN SEQUENCE WITH s_bBreak
#xcommand TRY => BEGIN SEQUENCE WITH t_bBreak
#xcommand CATCH [<!oErr!>] => RECOVER [USING <oErr>] <-oErr->
#xcommand FINALLY => ALWAYS
THREAD STATIC s_bBreak := { |oErr| break( oErr ) }
THREAD STATIC t_bBreak := { |oErr| break( oErr ) }
STATIC PROCEDURE THROW( oError )
LOCAL lError := Eval( ErrorBlock(), oError )
@@ -215,7 +215,7 @@ METHOD New( uObj, cClass, cLicense ) CLASS TOleAuto
IF ::hObj != NIL
RETURN HB_ExecFromArray( Self, "_New", HB_aParams() )
ENDIF
IF ISCHARACTER( uObj )
::hObj := CreateOleObject( uObj, , cLicense )

View File

@@ -57,16 +57,15 @@
#include "directry.ch"
#include "fileio.ch"
THREAD STATIC s_nReadBuffer := 32768
THREAD STATIC s_cComment
THREAD STATIC s_lReadOnly := .F.
THREAD STATIC s_bProgress
THREAD STATIC t_nReadBuffer := 32768
THREAD STATIC t_cComment
THREAD STATIC t_lReadOnly := .F.
PROCEDURE SetZipReadOnly( lReadOnly )
DEFAULT lReadOnly TO .F.
s_lReadOnly := lReadOnly
t_lReadOnly := lReadOnly
/* TODO: Implement. */
@@ -104,7 +103,7 @@ PROCEDURE SetZipReadOnly( lReadOnly )
PROCEDURE hb_SetZipComment( cComment )
IF cComment == NIL .OR. ISCHARACTER( cComment )
s_cComment := cComment
t_cComment := cComment
ENDIF
RETURN
@@ -406,7 +405,7 @@ PROCEDURE hb_SetBuffer( nWriteBuffer, nExtractBuffer, nReadBuffer )
HB_SYMBOL_UNUSED( nExtractBuffer )
IF !Empty( nReadBuffer )
s_nReadBuffer := Min( nReadBuffer, 32768 )
t_nReadBuffer := Min( nReadBuffer, 32768 )
ENDIF
RETURN
@@ -737,7 +736,7 @@ FUNCTION hb_ZipFile( cFileName,;
LOCAL hZip
LOCAL hHandle
LOCAL nLen
LOCAL cBuffer := Space( s_nReadBuffer )
LOCAL cBuffer := Space( t_nReadBuffer )
LOCAL cFileToZip
LOCAL nPos
LOCAL nRead
@@ -852,7 +851,7 @@ FUNCTION hb_ZipFile( cFileName,;
ENDIF
NEXT
hb_ZipClose( hZip, s_cComment )
hb_ZipClose( hZip, t_cComment )
ELSE
lRetVal := .F.
ENDIF

View File

@@ -83,11 +83,11 @@
#ifndef __XHARBOUR__
#include "hbusrrdd.ch"
#xcommand TRY => s_bError := errorBlock( {|oErr| break( oErr ) } ) ;;
#xcommand TRY => t_bError := errorBlock( {|oErr| break( oErr ) } ) ;;
BEGIN SEQUENCE
#xcommand CATCH [<!oErr!>] => errorBlock( s_bError ) ;;
#xcommand CATCH [<!oErr!>] => errorBlock( t_bError ) ;;
RECOVER [USING <oErr>] <-oErr-> ;;
errorBlock( s_bError )
errorBlock( t_bError )
#command FINALLY => ALWAYS
#else
#include "usrrdd.ch"
@@ -120,15 +120,15 @@
ANNOUNCE ADORDD
THREAD STATIC s_cTableName
THREAD STATIC s_cEngine
THREAD STATIC s_cServer
THREAD STATIC s_cUserName
THREAD STATIC s_cPassword
THREAD STATIC s_cQuery := ""
THREAD STATIC t_cTableName
THREAD STATIC t_cEngine
THREAD STATIC t_cServer
THREAD STATIC t_cUserName
THREAD STATIC t_cPassword
THREAD STATIC t_cQuery := ""
#ifndef __XHARBOUR__
THREAD STATIC s_bError
THREAD STATIC t_bError
#endif
#ifdef __XHARBOUR__
@@ -317,12 +317,12 @@ STATIC FUNCTION ADO_OPEN( nWA, aOpenInfo )
IF Empty( aOpenInfo[ UR_OI_CONNECT ] )
aWAData[ WA_CONNECTION ] := TOleAuto():New( "ADODB.Connection" )
aWAData[ WA_TABLENAME ] := s_cTableName
aWAData[ WA_QUERY ] := s_cQuery
aWAData[ WA_USERNAME ] := s_cUserName
aWAData[ WA_PASSWORD ] := s_cPassword
aWAData[ WA_SERVER ] := s_cServer
aWAData[ WA_ENGINE ] := s_cEngine
aWAData[ WA_TABLENAME ] := t_cTableName
aWAData[ WA_QUERY ] := t_cQuery
aWAData[ WA_USERNAME ] := t_cUserName
aWAData[ WA_PASSWORD ] := t_cPassword
aWAData[ WA_SERVER ] := t_cServer
aWAData[ WA_ENGINE ] := t_cEngine
aWAData[ WA_CONNOPEN ] := .T.
DO CASE
@@ -372,17 +372,17 @@ STATIC FUNCTION ADO_OPEN( nWA, aOpenInfo )
ENDCASE
ELSE
aWAData[ WA_CONNECTION ] := TOleAuto():New( aOpenInfo[ UR_OI_CONNECT ], "ADODB.Connection" )
aWAData[ WA_TABLENAME ] := s_cTableName
aWAData[ WA_QUERY ] := s_cQuery
aWAData[ WA_USERNAME ] := s_cUserName
aWAData[ WA_PASSWORD ] := s_cPassword
aWAData[ WA_SERVER ] := s_cServer
aWAData[ WA_ENGINE ] := s_cEngine
aWAData[ WA_TABLENAME ] := t_cTableName
aWAData[ WA_QUERY ] := t_cQuery
aWAData[ WA_USERNAME ] := t_cUserName
aWAData[ WA_PASSWORD ] := t_cPassword
aWAData[ WA_SERVER ] := t_cServer
aWAData[ WA_ENGINE ] := t_cEngine
aWAData[ WA_CONNOPEN ] := .F.
ENDIF
// will be initilized
s_cQuery := ""
t_cQuery := ""
IF Empty( aWAData[ WA_QUERY ] )
aWAData[ WA_QUERY ] := "SELECT * FROM "
@@ -1625,31 +1625,31 @@ RETURN nDBFFieldType
function HB_AdoSetTable( cTableName )
s_cTableName := cTableName
t_cTableName := cTableName
return nil
function HB_AdoSetEngine( cEngine )
s_cEngine := cEngine
t_cEngine := cEngine
return nil
function HB_AdoSetServer( cServer )
s_cServer := cServer
t_cServer := cServer
return nil
function HB_AdoSetUser( cUser )
s_cUserName := cUser
t_cUserName := cUser
RETURN NIL
function HB_AdoSetPassword( cPassword )
s_cPassword := cPassword
t_cPassword := cPassword
RETURN NIL
@@ -1657,7 +1657,7 @@ FUNCTION HB_AdoSetQuery( cQuery )
DEFAULT cQuery TO "SELECT * FROM "
s_cQuery := cQuery
t_cQuery := cQuery
RETURN NIL