2010-06-12 14:11 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/vm/set.c
* Reset default value to "hb_out.log".
+ mpkg_nightly.sh
+ Added script to generate nightly sources.
; TODO: Upload nightlies to sf.net.
; TODO: Change nightly filenames to match our normal source releases.
; TOFIX: Current .zip nighly has wrong (*nix) EOLs. This has to be
changed to CRLF.
* INSTALL
* Changed nightly script URLs to point to sf.net file area.
! Minor fix to bug tracker address.
* contrib/xhb/regexrpl.prg
* contrib/hbtip/httpcli.prg
* contrib/hbtip/mail.prg
! Fixed to use EMPTY() on HB_REGEX[ALL]() return
value instead of NIL check.
Required after recent change in HB_REGEX*()
return values in no-match case.
* contrib/hbcurl/hbcurl.c
* contrib/hbcurl/hbcurl.ch
+ Added support to download-to/upload-from file handle.
* contrib/hbqt/qtgui/Makefile
* contrib/hbqt/qtcore/Makefile
* contrib/hbqt/Makefile
* contrib/hbqt/gtqtc/Makefile
* contrib/hbqt/qtnetwork/Makefile
! Fixed to not build separate HBQT libs for static
linkage for non-win/wce targets.
* package/mpkg_win.nsi
* package/winuni/mpkg_win_uni.nsi
* Changed to use 'Harbour Project' as folder name in registry.
(instead of 'Harbour'). Just to be consistent.
* package/winuni/mpkg_win_uni.nsi
+ Add major.minor version number to registry folder names.
This allows multiple major versions of Harbour to be installed
in parallel.
* contrib/xhb/ttable.prg
% '&("{||" + c + "}")' -> HB_MACROBLOCK()
* contrib/xhb/trpccli.prg
* contrib/xhb/hblognet.prg
* contrib/xhb/xcstr.prg
* contrib/xhb/tedit.prg
* contrib/xhb/xdbmodst.prg
* contrib/xhb/trpc.prg
* contrib/xhb/thtm.prg
* contrib/xhb/dumpvar.prg
* contrib/xhb/xhbmt.prg
* contrib/xhb/xhberr.prg
* contrib/xhb/ttable.prg
* contrib/xhb/txml.prg
* '.NOT.' -> '!'
% ValType( x ) == "Y" -> IS*()
* Some other basic formatting and cleanup.
* src/rtl/hbini.prg
* examples/httpsrv/session.prg
* Formatting.
* tests/db_brows.prg
* tests/server.prg
* tests/testrdd2.prg
* tests/setkeys.prg
* contrib/hbtip/tests/tiptest.prg
* contrib/hbtip/tests/loadhtml.prg
* examples/hbsqlit2/tests/hbsqlite.prg
* examples/gtwvw/tests/wvwtest9.prg
* examples/gtwvw/tests/ebtest7.prg
* '.NOT.' -> '!'
This commit is contained in:
@@ -16,6 +16,85 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2010-06-12 14:11 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* src/vm/set.c
|
||||
* Reset default value to "hb_out.log".
|
||||
|
||||
+ mpkg_nightly.sh
|
||||
+ Added script to generate nightly sources.
|
||||
; TODO: Upload nightlies to sf.net.
|
||||
; TODO: Change nightly filenames to match our normal source releases.
|
||||
; TOFIX: Current .zip nighly has wrong (*nix) EOLs. This has to be
|
||||
changed to CRLF.
|
||||
|
||||
* INSTALL
|
||||
* Changed nightly script URLs to point to sf.net file area.
|
||||
! Minor fix to bug tracker address.
|
||||
|
||||
* contrib/xhb/regexrpl.prg
|
||||
* contrib/hbtip/httpcli.prg
|
||||
* contrib/hbtip/mail.prg
|
||||
! Fixed to use EMPTY() on HB_REGEX[ALL]() return
|
||||
value instead of NIL check.
|
||||
Required after recent change in HB_REGEX*()
|
||||
return values in no-match case.
|
||||
|
||||
* contrib/hbcurl/hbcurl.c
|
||||
* contrib/hbcurl/hbcurl.ch
|
||||
+ Added support to download-to/upload-from file handle.
|
||||
|
||||
* contrib/hbqt/qtgui/Makefile
|
||||
* contrib/hbqt/qtcore/Makefile
|
||||
* contrib/hbqt/Makefile
|
||||
* contrib/hbqt/gtqtc/Makefile
|
||||
* contrib/hbqt/qtnetwork/Makefile
|
||||
! Fixed to not build separate HBQT libs for static
|
||||
linkage for non-win/wce targets.
|
||||
|
||||
* package/mpkg_win.nsi
|
||||
* package/winuni/mpkg_win_uni.nsi
|
||||
* Changed to use 'Harbour Project' as folder name in registry.
|
||||
(instead of 'Harbour'). Just to be consistent.
|
||||
|
||||
* package/winuni/mpkg_win_uni.nsi
|
||||
+ Add major.minor version number to registry folder names.
|
||||
This allows multiple major versions of Harbour to be installed
|
||||
in parallel.
|
||||
|
||||
* contrib/xhb/ttable.prg
|
||||
% '&("{||" + c + "}")' -> HB_MACROBLOCK()
|
||||
|
||||
* contrib/xhb/trpccli.prg
|
||||
* contrib/xhb/hblognet.prg
|
||||
* contrib/xhb/xcstr.prg
|
||||
* contrib/xhb/tedit.prg
|
||||
* contrib/xhb/xdbmodst.prg
|
||||
* contrib/xhb/trpc.prg
|
||||
* contrib/xhb/thtm.prg
|
||||
* contrib/xhb/dumpvar.prg
|
||||
* contrib/xhb/xhbmt.prg
|
||||
* contrib/xhb/xhberr.prg
|
||||
* contrib/xhb/ttable.prg
|
||||
* contrib/xhb/txml.prg
|
||||
* '.NOT.' -> '!'
|
||||
% ValType( x ) == "Y" -> IS*()
|
||||
* Some other basic formatting and cleanup.
|
||||
|
||||
* src/rtl/hbini.prg
|
||||
* examples/httpsrv/session.prg
|
||||
* Formatting.
|
||||
|
||||
* tests/db_brows.prg
|
||||
* tests/server.prg
|
||||
* tests/testrdd2.prg
|
||||
* tests/setkeys.prg
|
||||
* contrib/hbtip/tests/tiptest.prg
|
||||
* contrib/hbtip/tests/loadhtml.prg
|
||||
* examples/hbsqlit2/tests/hbsqlite.prg
|
||||
* examples/gtwvw/tests/wvwtest9.prg
|
||||
* examples/gtwvw/tests/ebtest7.prg
|
||||
* '.NOT.' -> '!'
|
||||
|
||||
2010-06-11 08:52 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* ChangeLog
|
||||
* Correcting some English in prev entries.
|
||||
@@ -4724,7 +4803,7 @@
|
||||
% Further cleaned context passing, so that now even the
|
||||
'state' variable is passed as part of context rather than
|
||||
as separate variable, so now the only parameter the plugin
|
||||
gets is the callback. This is much more flexible and future
|
||||
gets in the callback. This is much more flexible and future
|
||||
proof this way.
|
||||
|
||||
2010-05-24 13:20 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
|
||||
@@ -1094,9 +1094,9 @@ HARBOUR
|
||||
3.) Harbour nightly sources (updated once a day from source repository)
|
||||
|
||||
Download source archive from any of these links and unpack:
|
||||
http://harbour-project.org/harbour-nightly.zip
|
||||
http://harbour-project.org/harbour-nightly.tgz
|
||||
http://harbour-project.org/harbour-nightly.bz2
|
||||
http://sourceforge.net/projects/harbour-project/files/source/nightly/harbour-nightly-src.zip/download
|
||||
http://sourceforge.net/projects/harbour-project/files/source/nightly/harbour-nightly.tar.gz/download
|
||||
http://sourceforge.net/projects/harbour-project/files/source/nightly/harbour-nightly.tar.bz2/download
|
||||
|
||||
4.) Harbour source download (stable)
|
||||
|
||||
@@ -1531,7 +1531,7 @@ HARBOUR
|
||||
http://sourceforge.net/apps/trac/harbour-project/timeline/
|
||||
|
||||
Bug Tracker:
|
||||
https://sourceforge.net/tracker/?group_id=681
|
||||
http://sourceforge.net/tracker/?group_id=681
|
||||
|
||||
Source Repository Browser:
|
||||
http://harbour-project.svn.sourceforge.net/viewvc/harbour-project/
|
||||
|
||||
@@ -266,6 +266,25 @@ static size_t hb_curl_read_file_callback( void * buffer, size_t size, size_t nme
|
||||
return ( size_t ) -1;
|
||||
}
|
||||
|
||||
static size_t hb_curl_read_fhandle_callback( void * buffer, size_t size, size_t nmemb, void * Cargo )
|
||||
{
|
||||
PHB_CURL hb_curl = ( PHB_CURL ) Cargo;
|
||||
|
||||
if( hb_curl )
|
||||
{
|
||||
size_t ret;
|
||||
|
||||
if( hb_curl->ul_handle == FS_ERROR )
|
||||
return ( size_t ) -1;
|
||||
|
||||
ret = ( size_t ) hb_fsReadLarge( hb_curl->ul_handle, buffer, size * nmemb );
|
||||
|
||||
return hb_fsError() ? CURL_READFUNC_ABORT : ret;
|
||||
}
|
||||
|
||||
return ( size_t ) -1;
|
||||
}
|
||||
|
||||
static size_t hb_curl_read_buff_callback( void * buffer, size_t size, size_t nmemb, void * Cargo )
|
||||
{
|
||||
PHB_CURL hb_curl = ( PHB_CURL ) Cargo;
|
||||
@@ -308,6 +327,21 @@ static size_t hb_curl_write_file_callback( void * buffer, size_t size, size_t nm
|
||||
return ( size_t ) -1;
|
||||
}
|
||||
|
||||
static size_t hb_curl_write_fhandle_callback( void * buffer, size_t size, size_t nmemb, void * Cargo )
|
||||
{
|
||||
PHB_CURL hb_curl = ( PHB_CURL ) Cargo;
|
||||
|
||||
if( hb_curl )
|
||||
{
|
||||
if( hb_curl->dl_handle == FS_ERROR )
|
||||
return ( size_t ) -1;
|
||||
|
||||
return hb_fsWriteLarge( hb_curl->dl_handle, buffer, size * nmemb );
|
||||
}
|
||||
|
||||
return ( size_t ) -1;
|
||||
}
|
||||
|
||||
#define HB_CURL_DL_BUFF_SIZE_INIT ( CURL_MAX_WRITE_SIZE * 4 )
|
||||
#define HB_CURL_DL_BUFF_SIZE_INCR ( CURL_MAX_WRITE_SIZE * 4 )
|
||||
|
||||
@@ -1413,6 +1447,21 @@ HB_FUNC( CURL_EASY_SETOPT )
|
||||
}
|
||||
break;
|
||||
|
||||
case HB_CURLOPT_UL_FHANDLE_SETUP:
|
||||
{
|
||||
hb_curl_file_ul_free( hb_curl );
|
||||
|
||||
if( HB_ISNUMBER( 3 ) )
|
||||
{
|
||||
hb_curl->ul_name = NULL;
|
||||
hb_curl->ul_handle = hb_numToHandle( hb_parnint( 3 ) );
|
||||
|
||||
curl_easy_setopt( hb_curl->curl, CURLOPT_READFUNCTION, hb_curl_read_fhandle_callback );
|
||||
res = curl_easy_setopt( hb_curl->curl, CURLOPT_READDATA, hb_curl );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case HB_CURLOPT_UL_FILE_CLOSE:
|
||||
hb_curl_file_ul_free( hb_curl );
|
||||
res = CURLE_OK;
|
||||
@@ -1433,6 +1482,21 @@ HB_FUNC( CURL_EASY_SETOPT )
|
||||
}
|
||||
break;
|
||||
|
||||
case HB_CURLOPT_DL_FHANDLE_SETUP:
|
||||
{
|
||||
hb_curl_file_dl_free( hb_curl );
|
||||
|
||||
if( HB_ISNUMBER( 3 ) )
|
||||
{
|
||||
hb_curl->dl_name = NULL;
|
||||
hb_curl->dl_handle = hb_numToHandle( hb_parnint( 3 ) );
|
||||
|
||||
curl_easy_setopt( hb_curl->curl, CURLOPT_WRITEFUNCTION, hb_curl_write_fhandle_callback );
|
||||
res = curl_easy_setopt( hb_curl->curl, CURLOPT_WRITEDATA, hb_curl );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case HB_CURLOPT_DL_FILE_CLOSE:
|
||||
hb_curl_file_dl_free( hb_curl );
|
||||
res = CURLE_OK;
|
||||
|
||||
@@ -240,6 +240,8 @@
|
||||
#define HB_CURLOPT_DL_BUFF_SETUP 1008
|
||||
#define HB_CURLOPT_DL_BUFF_GET 1009
|
||||
#define HB_CURLOPT_UL_NULL_SETUP 1010
|
||||
#define HB_CURLOPT_UL_FHANDLE_SETUP 1011
|
||||
#define HB_CURLOPT_DL_FHANDLE_SETUP 1012
|
||||
/* Compatibility ones. Please don't use these. */
|
||||
#define HB_CURLOPT_SETUPLOADFILE HB_CURLOPT_UL_FILE_SETUP
|
||||
#define HB_CURLOPT_CLOSEUPLOADFILE HB_CURLOPT_UL_FILE_CLOSE
|
||||
|
||||
@@ -22,7 +22,9 @@ ifneq ($(HB_HAS_QT),)
|
||||
include $(TOP)$(ROOT)config/lib.mk
|
||||
|
||||
ifneq ($(HB_QT_STATIC),)
|
||||
DIRS += hbqts
|
||||
ifneq ($(filter $(HB_PLATFORM),win wce),)
|
||||
DIRS += hbqts
|
||||
endif
|
||||
endif
|
||||
|
||||
DIRS += \
|
||||
|
||||
@@ -25,8 +25,8 @@ ifneq ($(HB_HAS_QT),)
|
||||
include $(TOP)$(ROOT)config/header.mk
|
||||
include $(TOP)$(ROOT)config/lib.mk
|
||||
|
||||
ifneq ($(filter $(HB_PLATFORM),win wce),)
|
||||
ifneq ($(HB_QT_STATIC),)
|
||||
ifneq ($(HB_QT_STATIC),)
|
||||
ifneq ($(filter $(HB_PLATFORM),win wce),)
|
||||
DIRS += gtqtcs
|
||||
include $(TOP)$(ROOT)config/dir.mk
|
||||
endif
|
||||
|
||||
@@ -19,7 +19,9 @@ ifneq ($(HB_HAS_QT),)
|
||||
include $(TOP)$(ROOT)config/lib.mk
|
||||
|
||||
ifneq ($(HB_QT_STATIC),)
|
||||
DIRS += qtcores
|
||||
include $(TOP)$(ROOT)config/dir.mk
|
||||
ifneq ($(filter $(HB_PLATFORM),win wce),)
|
||||
DIRS += qtcores
|
||||
include $(TOP)$(ROOT)config/dir.mk
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -19,7 +19,9 @@ ifneq ($(HB_HAS_QT),)
|
||||
include $(TOP)$(ROOT)config/lib.mk
|
||||
|
||||
ifneq ($(HB_QT_STATIC),)
|
||||
DIRS += qtguis
|
||||
include $(TOP)$(ROOT)config/dir.mk
|
||||
ifneq ($(filter $(HB_PLATFORM),win wce),)
|
||||
DIRS += qtguis
|
||||
include $(TOP)$(ROOT)config/dir.mk
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -19,8 +19,10 @@ ifneq ($(HB_HAS_QT),)
|
||||
include $(TOP)$(ROOT)config/lib.mk
|
||||
|
||||
ifneq ($(HB_QT_STATIC),)
|
||||
DIRS += qtnetworks
|
||||
include $(TOP)$(ROOT)config/dir.mk
|
||||
ifneq ($(filter $(HB_PLATFORM),win wce),)
|
||||
DIRS += qtnetworks
|
||||
include $(TOP)$(ROOT)config/dir.mk
|
||||
endif
|
||||
endif
|
||||
else
|
||||
HB_SKIP_REASON := $(_DET_RES_TEXT)
|
||||
|
||||
@@ -229,7 +229,7 @@ METHOD ReadHeaders( lClear ) CLASS tIPClientHTTP
|
||||
aVersion := hb_regex( "^HTTP/(.)\.(.) ([0-9][0-9][0-9]) +(.*)$", cLine )
|
||||
::cReply := cLine
|
||||
|
||||
IF aVersion == NIL
|
||||
IF Empty( aVersion )
|
||||
::nVersion := 0
|
||||
::nSubversion := 9
|
||||
::nReplyCode := 0
|
||||
|
||||
@@ -193,7 +193,7 @@ METHOD GetFieldOption( cPart, cOption ) CLASS TipMail
|
||||
cEnc := hb_HValueAt( ::hHeaders, nPos )
|
||||
// Case insensitive check
|
||||
aMatch := hb_regex( ";\s*" + cOption + "\s*=\s*([^;]*)", cEnc, .F. )
|
||||
IF aMatch != NIL
|
||||
IF ! Empty( aMatch )
|
||||
cEnc := aMatch[ 2 ]
|
||||
ELSE
|
||||
RETURN ""
|
||||
|
||||
@@ -8,7 +8,7 @@ PROCEDURE Main
|
||||
LOCAL oHttp, cHtml, hQuery, aLink, oNode, oDoc
|
||||
|
||||
oHttp:= TIpClientHttp():new( "http://www.google.de/search" )
|
||||
|
||||
|
||||
// build the Google query
|
||||
hQUery := hb_Hash()
|
||||
hb_hSetCaseMatch( hQuery, .F. )
|
||||
@@ -21,7 +21,7 @@ PROCEDURE Main
|
||||
oHttp:oUrl:addGetForm( hQuery )
|
||||
|
||||
// Connect to the HTTP server
|
||||
IF .NOT. oHttp:open()
|
||||
IF ! oHttp:open()
|
||||
? "Connection error:", oHttp:lastErrorMessage()
|
||||
QUIT
|
||||
ENDIF
|
||||
|
||||
@@ -92,7 +92,7 @@ PROCEDURE MAIN( cUrl, cFile )
|
||||
oClient:nConnTimeout := 2000 //:= 20000
|
||||
|
||||
|
||||
oUrl:cUserid := STRTRAN(oUrl:cUserid, "&at;", "@")
|
||||
oUrl:cUserid := STRTRAN(oUrl:cUserid, "&at;", "@")
|
||||
|
||||
@4,5 SAY "Connecting to " + oUrl:cProto + "://" + oUrl:cServer
|
||||
IF oClient:Open()
|
||||
@@ -102,7 +102,7 @@ PROCEDURE MAIN( cUrl, cFile )
|
||||
@5,5 SAY "Connection status: " + oClient:cReply
|
||||
ENDIF
|
||||
|
||||
IF .not. Empty( cFile ) .and. Left( cFile, 1 ) == '+'
|
||||
IF ! Empty( cFile ) .and. Left( cFile, 1 ) == '+'
|
||||
cFile := Substr( cFile, 2 )
|
||||
bWrite := .T.
|
||||
ENDIF
|
||||
@@ -120,7 +120,7 @@ PROCEDURE MAIN( cUrl, cFile )
|
||||
ELSE
|
||||
IF Empty( cFile )
|
||||
cData := oClient:Read()
|
||||
IF .not. Empty( cData )
|
||||
IF ! Empty( cData )
|
||||
@7,5 SAY "First 80 characters:"
|
||||
? Trim(SubStr( cData, 1, 80 ))
|
||||
ELSE
|
||||
@@ -144,7 +144,7 @@ PROCEDURE MAIN( cUrl, cFile )
|
||||
ENDIF
|
||||
ELSE
|
||||
@5,5 SAY "Can't open URI " + cUrl
|
||||
IF .not. Empty( oClient:cReply )
|
||||
IF ! Empty( oClient:cReply )
|
||||
@6,5 SAY oClient:cReply
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
@@ -176,7 +176,7 @@ STATIC FUNCTION DShowProperties( oVar, nScope, lRecursive, nIndent, nRecursionLe
|
||||
|
||||
DEFAULT nIndent TO 0
|
||||
|
||||
IF ValType( oVar ) == "O"
|
||||
IF ISOBJECT( oVar )
|
||||
// lOldScope := __SetClassScope( .F. )
|
||||
aMethods := __objGetMsgFullList( oVar, .F., HB_MSGLISTALL, nScope )
|
||||
aProps := __objGetValueFullList( oVar, NIL, nScope )
|
||||
@@ -215,7 +215,7 @@ STATIC FUNCTION DShowArray( aVar, lRecursive, nIndent, nRecursionLevel, nMaxRecu
|
||||
|
||||
//TraceLog( "DShowArray: aVar, lRecursive", aVar, lRecursive )
|
||||
|
||||
IF ValType( aVar ) == "A"
|
||||
IF ISARRAY( aVar )
|
||||
nEolLen := Len( CRLF )
|
||||
nChar := Len( LTrim( Str( Len( aVar ) ) ) ) // return number of chars to display that value
|
||||
// i.e. if Len( aVar ) == 99, then nChar := 2
|
||||
@@ -364,15 +364,15 @@ STATIC FUNCTION __objGetMsgFullList( oObject, lData, nRange, nScope, nNoScope )
|
||||
LOCAL aReturn
|
||||
LOCAL nFirstProperty, aMsg
|
||||
|
||||
IF ValType( oObject ) != 'O'
|
||||
IF ! ISOBJECT( oObject )
|
||||
__errRT_BASE( EG_ARG, 3101, NIL, ProcName() )
|
||||
ENDIF
|
||||
|
||||
IF ValType( lData ) != 'L'
|
||||
IF ! ISLOGICAL( lData )
|
||||
lData := .T.
|
||||
ENDIF
|
||||
|
||||
IF ValType( nNoScope ) != 'N'
|
||||
IF ! ISNUMBER( nNoScope )
|
||||
nNoScope := 0
|
||||
ENDIF
|
||||
|
||||
@@ -408,11 +408,11 @@ STATIC FUNCTION __objGetValueFullList( oObject, aExcept, nScope, nNoScope )
|
||||
LOCAL aReturn
|
||||
LOCAL aVar
|
||||
|
||||
IF ValType( oObject ) != 'O'
|
||||
IF ! IOBJECT( oObject )
|
||||
__errRT_BASE( EG_ARG, 3101, NIL, ProcName( 0 ) )
|
||||
ENDIF
|
||||
|
||||
IF ValType( aExcept ) != 'A'
|
||||
IF ! ISARRAY( aExcept )
|
||||
aExcept := {}
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -135,34 +135,34 @@ METHOD Send( nStyle, cMessage, cName, nPriority ) CLASS HB_LogEmail
|
||||
|
||||
hb_inetConnect( ::cServer, ::nPort, skCon )
|
||||
|
||||
IF hb_inetErrorCode( skCon ) != 0 .or. .not. ::GetOk( skCon )
|
||||
IF hb_inetErrorCode( skCon ) != 0 .or. ! ::GetOk( skCon )
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
|
||||
hb_inetSendAll( skCon, "HELO " + ::cHelo + hb_inetCRLF() )
|
||||
IF .not. ::GetOk( skCon )
|
||||
IF ! ::GetOk( skCon )
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
|
||||
hb_inetSendAll( skCon, "MAIL FROM: <" + ::cAddress +">" + hb_inetCRLF() )
|
||||
IF .not. ::GetOk( skCon )
|
||||
IF ! ::GetOk( skCon )
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
|
||||
hb_inetSendAll( skCon, "RCPT TO: <" + ::cSendTo +">" + hb_inetCRLF() )
|
||||
IF .not. ::GetOk( skCon )
|
||||
IF ! ::GetOk( skCon )
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
|
||||
hb_inetSendAll( skCon, "DATA" + hb_inetCRLF() )
|
||||
IF .not. ::GetOk( skCon )
|
||||
IF ! ::GetOk( skCon )
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
|
||||
cMessage := ::Prepare( nStyle, cMessage, cName, nPriority )
|
||||
|
||||
hb_inetSendAll( skCon, cMessage + hb_inetCRLF() + "." + hb_inetCRLF() )
|
||||
IF .not. ::GetOk( skCon )
|
||||
IF ! ::GetOk( skCon )
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
|
||||
@@ -189,13 +189,13 @@ METHOD Prepare( nStyle, cMessage, cName, nPriority ) CLASS HB_LogEmail
|
||||
"TO: " + ::cSendTo + hb_inetCRLF() +;
|
||||
"Subject:" + ::cSubject + hb_inetCRLF() + hb_inetCRLF()
|
||||
|
||||
IF .not. Empty( ::cPrefix )
|
||||
IF ! Empty( ::cPrefix )
|
||||
cPre += ::cPrefix + hb_inetCRLF() + hb_inetCRLF()
|
||||
ENDIF
|
||||
|
||||
cPre += ::Format( nStyle, cMessage, cName, nPriority )
|
||||
|
||||
IF .not. Empty( ::cPostfix )
|
||||
IF ! Empty( ::cPostfix )
|
||||
cPre += hb_inetCRLF() +hb_inetCRLF() + ::cPostfix + hb_inetCRLF()
|
||||
ENDIF
|
||||
|
||||
@@ -340,7 +340,7 @@ METHOD AcceptCon() CLASS HB_LogInetPort
|
||||
LOCAL sk
|
||||
|
||||
hb_inetTimeout( ::skIn, 250 )
|
||||
DO WHILE .not. ::bTerminate
|
||||
DO WHILE ! ::bTerminate
|
||||
sk := hb_inetAccept( ::skIn )
|
||||
// A gentle termination request, or an error
|
||||
IF sk != NIL
|
||||
|
||||
@@ -65,7 +65,7 @@ FUNCTION hb_RegexReplace( cRegex, cString, cReplace, lCaseSensitive, lNewLine, n
|
||||
|
||||
aMatches := HB_RegExAll( cRegEx, cString, lCaseSensitive, lNewLine, nMaxMatches, nGetMatch, .F. )
|
||||
|
||||
IF aMatches != NIL
|
||||
IF ! Empty( aMatches )
|
||||
cReturn := cString
|
||||
FOR EACH aMatch IN aMatches
|
||||
//TraceLog( "ValToPrg( aMatch ), cReturn", ValToPrg( aMatch ), cReturn )
|
||||
|
||||
@@ -488,7 +488,7 @@ CLASS THtmlForm
|
||||
|
||||
METHOD setwidth( c ) INLINE ::width := c
|
||||
|
||||
METHOD AddControl( o ) INLINE IIF( Valtype( o ) == "O", ( o:nH := ::nH, o:Form := Self ), ),;
|
||||
METHOD AddControl( o ) INLINE IIF( ISOBJECT( o ), ( o:nH := ::nH, o:Form := Self ), ),;
|
||||
Aadd( ::aControls, o )
|
||||
|
||||
METHOD PutControls() INLINE Aeval( ::aControls, { | e | e:Put() } )
|
||||
@@ -544,19 +544,19 @@ METHOD Put( lPutControls ) CLASS THtmlForm
|
||||
|
||||
DEFAULT lPutControls TO .F.
|
||||
|
||||
IF Valtype( ::width ) != "N"
|
||||
IF ! ISNUMBER( ::width )
|
||||
::width := 90
|
||||
ENDIF
|
||||
|
||||
IF Valtype( ::color ) != "C"
|
||||
IF ! ISCHARACTER( ::color )
|
||||
::Color := "#9196A0"
|
||||
ENDIF
|
||||
|
||||
IF Valtype( ::fontColor ) != "C"
|
||||
IF ! ISCHARACTER( ::fontColor )
|
||||
::fontColor := "black"
|
||||
ENDIF
|
||||
|
||||
IF Valtype( ::CaptionColor ) != "C"
|
||||
IF ! ISCHARACTER( ::CaptionColor )
|
||||
::CaptionColor := "black"
|
||||
ENDIF
|
||||
|
||||
@@ -681,7 +681,7 @@ METHOD Put( lPutControls ) CLASS THtmlForm
|
||||
// Fwrite( ::nH, ::cOutput )
|
||||
::oHtm:cStr += ::cOutput
|
||||
IF lPutControls
|
||||
Aeval( ::aControls, { | e | IIF( Valtype( e ) == "O", ;
|
||||
Aeval( ::aControls, { | e | IIF( ISOBJECT( e ), ;
|
||||
e:Put(), ::oHtm:cStr += e ) } )
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -746,7 +746,7 @@ METHOD SAY( str, font, size, type, color, style ) CLASS THtml
|
||||
|
||||
ENDIF
|
||||
|
||||
IF Valtype( type ) == "C"
|
||||
IF ISCHARACTER( type )
|
||||
|
||||
IF "<" $ type
|
||||
|
||||
@@ -1000,18 +1000,18 @@ METHOD PutImageUrl( cImage, nBorder, nHeight, cUrl, ;
|
||||
ENDIF
|
||||
|
||||
IF nBorder != NIL
|
||||
cStr += " border = " + IIF( Valtype( nBorder ) == "N", hb_ntos( nBorder ), nBorder ) + CRLF()
|
||||
cStr += " border = " + IIF( ISNUMBER( nBorder ), hb_ntos( nBorder ), nBorder ) + CRLF()
|
||||
ENDIF
|
||||
|
||||
IF nHeight != NIL .and. Valtype( nHeight ) == "N"
|
||||
IF nHeight != NIL .and. ISNUMBER( nHeight )
|
||||
cStr += " height = " + hb_ntos( nHeight ) + " " + CRLF()
|
||||
ELSEIF nHeight != NIL .and. Valtype( nHeight ) == "C"
|
||||
ELSEIF nHeight != NIL .and. ISCHARACTER( nHeight )
|
||||
cStr += " height = " + nHeight + " " + CRLF()
|
||||
ENDIF
|
||||
|
||||
IF nWidth != NIL .and. Valtype( nWidth ) == "N"
|
||||
IF nWidth != NIL .and. ISNUMBER( nWidth )
|
||||
cStr += " width = " + hb_ntos( nWidth ) + " " + CRLF()
|
||||
ELSEIF nWidth != NIL .and. Valtype( nWidth ) == "C"
|
||||
ELSEIF nWidth != NIL .and. ISCHARACTER( nWidth )
|
||||
cStr += " width = " + nWidth + " " + CRLF()
|
||||
ENDIF
|
||||
|
||||
@@ -1065,15 +1065,15 @@ METHOD PutTextImageUrl( cImage, nBorder, nHeight, cUrl, ;
|
||||
cStr += " border = " + hb_ntos( nBorder )
|
||||
ENDIF
|
||||
|
||||
IF nHeight != NIL .and. Valtype( nHeight ) == "N"
|
||||
IF nHeight != NIL .and. ISNUMBER( nHeight )
|
||||
cStr += " height = " + hb_ntos( nHeight ) + " "
|
||||
ELSEIF nHeight != NIL .and. Valtype( nHeight ) == "C"
|
||||
ELSEIF nHeight != NIL .and. ISCHARACTER( nHeight )
|
||||
cStr += " height = " + nHeight + " "
|
||||
ENDIF
|
||||
|
||||
IF nWidth != NIL .and. Valtype( nWidth ) == "N"
|
||||
IF nWidth != NIL .and. ISNUMBER( nWidth )
|
||||
cStr += " width = " + hb_ntos( nWidth ) + " "
|
||||
ELSEIF nWidth != NIL .and. Valtype( nWidth ) == "C"
|
||||
ELSEIF nWidth != NIL .and. ISCHARACTER( nWidth )
|
||||
cStr += " width = " + nWidth + " "
|
||||
ENDIF
|
||||
|
||||
@@ -1120,21 +1120,21 @@ METHOD PutImage( cImage, nBorder, nHeight, ;
|
||||
cStr += ' ALT= "' + cAlt + '"'
|
||||
ENDIF
|
||||
|
||||
IF nBorder != NIL .and. Valtype( nBorder ) == "N"
|
||||
IF nBorder != NIL .and. ISNUMBER( nBorder )
|
||||
cStr += " BORDER = " + hb_ntos( nBorder )
|
||||
ELSEIF nBorder != NIL .and. Valtype( nBorder ) == "C"
|
||||
ELSEIF nBorder != NIL .and. ISCHARACTER( nBorder )
|
||||
cStr += " BORDER = " + '"' + nBorder + '"'
|
||||
ENDIF
|
||||
|
||||
IF nHeight != NIL .and. Valtype( nHeight ) == "N"
|
||||
IF nHeight != NIL .and. ISNUMBER( nHeight )
|
||||
cStr += " HEIGHT = " + hb_ntos( nHeight ) + " "
|
||||
ELSEIF nHeight != NIL .and. Valtype( nHeight ) == "C"
|
||||
ELSEIF nHeight != NIL .and. ISCHARACTER( nHeight )
|
||||
cStr += " HEIGHT = " + '"' + nHeight + '"'
|
||||
ENDIF
|
||||
|
||||
IF nWidth != NIL .and. Valtype( nWidth ) == "N"
|
||||
IF nWidth != NIL .and. ISNUMBER( nWidth )
|
||||
cStr += " width = " + hb_ntos( nWidth ) + " "
|
||||
ELSEIF nWidth != NIL .and. Valtype( nWidth ) == "C"
|
||||
ELSEIF nWidth != NIL .and. ISCHARACTER( nWidth )
|
||||
cStr += " width = " + nWidth + " "
|
||||
ENDIF
|
||||
|
||||
@@ -1259,15 +1259,15 @@ METHOD DefineTable( nCols, nBorder, nWidth, nHeight, ColorFore, ColorBG, ;
|
||||
|
||||
cStr += IIF( xCols != NIL, " COLS=" + hb_ntos( nCols ), "" )
|
||||
|
||||
IF nWidth != NIL .and. Valtype( nWidth ) == "N"
|
||||
IF nWidth != NIL .and. ISNUMBER( nWidth )
|
||||
cStr += " WIDTH=" + hb_ntos( nWidth )
|
||||
ELSEIF nWidth != NIL .and. Valtype( nWidth ) == "C"
|
||||
ELSEIF nWidth != NIL .and. ISCHARACTER( nWidth )
|
||||
cStr += " WIDTH=" + '"' + nWidth + '"'
|
||||
ENDIF
|
||||
|
||||
IF nHeight != NIL .and. Valtype( nHeight ) == "N"
|
||||
IF nHeight != NIL .and. ISNUMBER( nHeight )
|
||||
cStr += " HEIGHT=" + hb_ntos( nHeight )
|
||||
ELSEIF nHeight != NIL .and. Valtype( nHeight ) == "C"
|
||||
ELSEIF nHeight != NIL .and. ISCHARACTER( nHeight )
|
||||
cStr += " HEIGHT=" + '"' + nHeight + '"'
|
||||
ENDIF
|
||||
|
||||
@@ -1451,9 +1451,9 @@ METHOD NewTableCell( cAlign, cColor, ;
|
||||
cStr += " VALIGN=" + cValign
|
||||
ENDIF
|
||||
|
||||
IF nHeight != NIL .and. Valtype( nHeight ) = "N"
|
||||
IF nHeight != NIL .and. ISNUMBER( nHeight )
|
||||
cStr += " HEIGHT=" + hb_ntos( nHeight )
|
||||
ELSEIF nHeight != NIL .and. Valtype( nHeight ) = "C"
|
||||
ELSEIF nHeight != NIL .and. ISCHARACTER( nHeight )
|
||||
cStr += " HEIGHT=" + '"' + nHeight + '"'
|
||||
ENDIF
|
||||
|
||||
@@ -1461,15 +1461,15 @@ METHOD NewTableCell( cAlign, cColor, ;
|
||||
cStr += " BACKGROUND=" + '"' + cBgPic + '"'
|
||||
ENDIF
|
||||
|
||||
IF nWidth != NIL .and. Valtype( nWidth ) = "N"
|
||||
IF nWidth != NIL .and. ISNUMBER( nWidth )
|
||||
cStr += " WIDTH=" + hb_ntos( nWidth )
|
||||
ELSEIF nWidth != NIL .and. Valtype( nWidth ) = "C"
|
||||
ELSEIF nWidth != NIL .and. ISCHARACTER( nWidth )
|
||||
cStr += " WIDTH=" + '"' + nWidth + '"'
|
||||
ENDIF
|
||||
|
||||
IF nColspan != NIL .and. Valtype( nColspan ) = "N"
|
||||
IF nColspan != NIL .and. ISNUMBER( nColspan )
|
||||
cStr += " COLSPAN=" + hb_ntos( nColspan )
|
||||
ELSEIF nColspan != NIL .and. Valtype( nColspan ) = "C"
|
||||
ELSEIF nColspan != NIL .and. ISCHARACTER( nColspan )
|
||||
cStr += " COLSPAN=" + '"' + nColspan + '"'
|
||||
ENDIF
|
||||
|
||||
@@ -1485,9 +1485,9 @@ METHOD NewTableCell( cAlign, cColor, ;
|
||||
cStr += ' Class ="' + cClass + '" '
|
||||
ENDIF
|
||||
|
||||
IF nRowspan != NIL .and. Valtype( nRowspan ) = "N"
|
||||
IF nRowspan != NIL .and. ISNUMBER( nRowspan )
|
||||
cStr += " ROWSPAN=" + hb_ntos( nRowspan )
|
||||
ELSEIF nRowspan != NIL .and. Valtype( nRowspan ) = "C"
|
||||
ELSEIF nRowspan != NIL .and. ISCHARACTER( nRowspan )
|
||||
cStr += " ROWSPAN=" + '"' + nRowspan + '"'
|
||||
ENDIF
|
||||
|
||||
@@ -1828,7 +1828,7 @@ METHOD Marquee( cText, cFont, cFntColor, nFntSize, ;
|
||||
::cStr += 'bgColor="' + cBgColor + '" '
|
||||
::cStr += 'scrollamount="' + hb_ntos( nScrollAmt ) + '" '
|
||||
::cStr += 'scrolldelay="' + hb_ntos( nScrollDelay ) + '" '
|
||||
::cStr += 'loop=' + IIF( Valtype( loop ) == "N", hb_ntos( loop ), loop ) + ' '
|
||||
::cStr += 'loop=' + IIF( ISNUMBER( loop ), hb_ntos( loop ), loop ) + ' '
|
||||
::cStr += 'direction="' + cDirection + '" '
|
||||
::cStr += IIF( onMsOver != NIL, 'onMouseOver="' + onMsOver + '" ', "" )
|
||||
::cStr += IIF( onMsOut != NIL, 'onMouseOut="' + onMsOut + '" ', "" )
|
||||
@@ -1879,7 +1879,7 @@ METHOD StartMarquee( cFont, cFntColor, nFntSize, ;
|
||||
'bgColor="' + cBgColor + '" ' + ;
|
||||
'scrollamount="' + hb_ntos( nScrollAmt ) + '" ' + ;
|
||||
'scrolldelay="' + hb_ntos( nScrollDelay ) + '" ' + ;
|
||||
'loop=' + IIF( Valtype( loop ) == "N", hb_ntos( loop ), loop ) + ' ' + ;
|
||||
'loop=' + IIF( ISNUMBER( loop ), hb_ntos( loop ), loop ) + ' ' + ;
|
||||
'direction="' + cDirection + '" ' + ;
|
||||
IIF( onMsOver != NIL, 'onMouseOver="' + onMsOver + '" ', "" ) + ;
|
||||
IIF( onMsOut != NIL, 'onMouseOut="' + onMsOut + '" ', "" ) + ;
|
||||
@@ -2017,15 +2017,15 @@ METHOD AddObject( cType, cClassid, cAling, cCode, lDisable, cCodeBase, cName, nW
|
||||
cStr += ' Name ="' + cName + '"' + CRLF()
|
||||
ENDIF
|
||||
|
||||
IF nHeight != NIL .and. Valtype( nHeight ) == "N"
|
||||
IF nHeight != NIL .and. ISNUMBER( nHeight )
|
||||
cStr += " height = " + hb_ntos( nHeight ) + " " + CRLF()
|
||||
ELSEIF nHeight != NIL .and. Valtype( nHeight ) == "C"
|
||||
ELSEIF nHeight != NIL .and. ISCHARACTER( nHeight )
|
||||
cStr += " height = " + nHeight + " " + CRLF()
|
||||
ENDIF
|
||||
|
||||
IF nWidth != NIL .and. Valtype( nWidth ) == "N"
|
||||
IF nWidth != NIL .and. ISNUMBER( nWidth )
|
||||
cStr += " width = " + hb_ntos( nWidth ) + " " + CRLF()
|
||||
ELSEIF nWidth != NIL .and. Valtype( nWidth ) == "C"
|
||||
ELSEIF nWidth != NIL .and. ISCHARACTER( nWidth )
|
||||
cStr += " width = " + nWidth + " " + CRLF()
|
||||
ENDIF
|
||||
|
||||
@@ -2259,7 +2259,7 @@ FUNCTION HtmlPadR( cStr, n )
|
||||
RETURN cRet
|
||||
|
||||
|
||||
//ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
|
||||
//----------------------------------------------------------------------------
|
||||
function ANY2STR( xVal )
|
||||
return HTMLANY2STR( xVal )
|
||||
|
||||
@@ -2267,22 +2267,22 @@ FUNCTION HTMLANY2STR( xVal )
|
||||
|
||||
LOCAL xRet := NIL
|
||||
|
||||
IF Valtype( xVal ) == "C"
|
||||
IF ISCHARACTER( xVal )
|
||||
xRet := IIF( Empty( xVal ), ".", xVal )
|
||||
|
||||
ELSEIF Valtype( xVal ) == "N"
|
||||
ELSEIF ISNUMBER( xVal )
|
||||
xRet := Alltrim( Str( xVal ) )
|
||||
|
||||
ELSEIF Valtype( xVal ) == "O"
|
||||
ELSEIF ISOBJECT( xVal )
|
||||
xRet := "<" + xVal:CLASSNAME() + ">"
|
||||
|
||||
ELSEIF Valtype( xVal ) == "D"
|
||||
ELSEIF ISDATE( xVal )
|
||||
xRet := Dtoc( xVal )
|
||||
|
||||
ELSEIF Valtype( xVal ) == "L"
|
||||
ELSEIF ISLOGICAL( xVal )
|
||||
xRet := LTOC( xVal )
|
||||
|
||||
ELSEIF Valtype( xVal ) == "B"
|
||||
ELSEIF ISBLOCK( xVal )
|
||||
xRet := "{||...}"
|
||||
|
||||
ELSEIF Valtype( xVal ) == NIL
|
||||
|
||||
@@ -199,6 +199,7 @@
|
||||
|
||||
#include "hbrpc.ch"
|
||||
|
||||
#include "common.ch"
|
||||
|
||||
/************************************
|
||||
* RPC FUNCTION
|
||||
@@ -260,7 +261,7 @@ METHOD New( cFname, cSerial, nAuthLevel, oExec, oMeth ) CLASS tRPCFunction
|
||||
::CheckParam( ::cReturn )
|
||||
|
||||
// Analyze function serial number
|
||||
IF .not. HB_RegexMatch( "[0-9]{8}\..", cSerial )
|
||||
IF ! HB_RegexMatch( "[0-9]{8}\..", cSerial )
|
||||
Alert( "Serial value not valid" )
|
||||
ErrorLevel( 1 )
|
||||
QUIT
|
||||
@@ -286,7 +287,7 @@ RETURN Self
|
||||
|
||||
METHOD SetCallable( oExec, oMeth ) CLASS tRPCFunction
|
||||
// If the callable is an object, we need to store the method
|
||||
IF ValType( oExec ) == "O"
|
||||
IF ISOBJECT( oExec )
|
||||
::aCall := Array( Len( ::aParameters ) + 3 )
|
||||
::aCall[2] := oMeth
|
||||
ELSE
|
||||
@@ -300,11 +301,11 @@ RETURN .T.
|
||||
METHOD Run( aParams, oClient ) CLASS tRPCFunction
|
||||
LOCAL nStart, nCount, xRet
|
||||
|
||||
IF .not. ::CheckTypes( aParams )
|
||||
IF ! ::CheckTypes( aParams )
|
||||
RETURN NIL
|
||||
ENDIF
|
||||
|
||||
nStart := IIF( ValType( ::aCall[1] ) == "O", 3, 2 )
|
||||
nStart := IIF( ISOBJECT( ::aCall[1] ), 3, 2 )
|
||||
|
||||
FOR nCount := 1 TO Len( aParams )
|
||||
::aCall[ nStart ] := aParams[ nCount ]
|
||||
@@ -318,7 +319,7 @@ RETURN xRet
|
||||
|
||||
|
||||
METHOD CheckParam( cParam ) CLASS tRPCFunction
|
||||
IF .not. HB_RegexMatch( ::cPattern, cParam )
|
||||
IF ! HB_RegexMatch( ::cPattern, cParam )
|
||||
Alert("tRPCFunction:CheckParam() wrong parameter specification: " + cParam )
|
||||
QUIT
|
||||
ENDIF
|
||||
@@ -328,7 +329,7 @@ RETURN .T.
|
||||
METHOD CheckTypes( aParams ) CLASS tRPCFunction
|
||||
LOCAL oElem, i := 0
|
||||
|
||||
IF ValType( aParams ) != 'A'
|
||||
IF ! ISARRAY( aParams )
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
|
||||
@@ -489,7 +490,7 @@ METHOD Run() CLASS tRPCServeCon
|
||||
LOCAL aData
|
||||
LOCAL nSafeStatus
|
||||
|
||||
DO WHILE hb_inetErrorCode( ::skRemote ) == 0 .and. .not. lBreak
|
||||
DO WHILE hb_inetErrorCode( ::skRemote ) == 0 .and. ! lBreak
|
||||
|
||||
/* Get the request code */
|
||||
hb_inetRecvAll( ::skRemote, @cCode, 6 )
|
||||
@@ -511,8 +512,8 @@ METHOD Run() CLASS tRPCServeCon
|
||||
/* Read autorization request */
|
||||
CASE cCode == "XHBR90"
|
||||
IF nSafeStatus == RPCS_STATUS_NONE
|
||||
lBreak := .not. ::RecvAuth( .F. )
|
||||
IF .not. lBreak
|
||||
lBreak := ! ::RecvAuth( .F. )
|
||||
IF ! lBreak
|
||||
nSafeStatus := RPCS_STATUS_LOGGED
|
||||
ENDIF
|
||||
ELSE
|
||||
@@ -522,8 +523,8 @@ METHOD Run() CLASS tRPCServeCon
|
||||
/* Read encrypted autorization request */
|
||||
CASE cCode == "XHBR93"
|
||||
IF nSafeStatus == RPCS_STATUS_NONE
|
||||
lBreak := .not. ::RecvAuth( .T. )
|
||||
IF .not. lBreak
|
||||
lBreak := ! ::RecvAuth( .T. )
|
||||
IF ! lBreak
|
||||
nSafeStatus := RPCS_STATUS_CHALLENGE
|
||||
ENDIF
|
||||
ELSE
|
||||
@@ -533,8 +534,8 @@ METHOD Run() CLASS tRPCServeCon
|
||||
/* Challeng reply */
|
||||
CASE cCode == "XHBR95"
|
||||
IF nSafeStatus == RPCS_STATUS_CHALLENGE
|
||||
lBreak := .not. ::RecvChallenge( )
|
||||
IF .not. lBreak
|
||||
lBreak := ! ::RecvChallenge( )
|
||||
IF ! lBreak
|
||||
nSafeStatus := RPCS_STATUS_LOGGED
|
||||
ENDIF
|
||||
ELSE
|
||||
@@ -551,7 +552,7 @@ METHOD Run() CLASS tRPCServeCon
|
||||
IF nSafeStatus == RPCS_STATUS_LOGGED
|
||||
aData := ::RecvFunction( .F., .F. )
|
||||
IF aData != NIL
|
||||
lBreak := .not. ::FuncCall( aData[2] )
|
||||
lBreak := ! ::FuncCall( aData[2] )
|
||||
ELSE
|
||||
lBreak := .T.
|
||||
ENDIF
|
||||
@@ -567,7 +568,7 @@ METHOD Run() CLASS tRPCServeCon
|
||||
IF nSafeStatus == RPCS_STATUS_LOGGED
|
||||
aData := ::RecvFunction( .T., .F. )
|
||||
IF aData != NIL
|
||||
lBreak := .not. ::FuncCall( aData[2] )
|
||||
lBreak := ! ::FuncCall( aData[2] )
|
||||
ELSE
|
||||
lBreak := .T.
|
||||
ENDIF
|
||||
@@ -582,7 +583,7 @@ METHOD Run() CLASS tRPCServeCon
|
||||
IF nSafeStatus == RPCS_STATUS_LOGGED
|
||||
aData := ::RecvFunction( .F., .T. )
|
||||
IF aData != NIL
|
||||
lBreak := .not. ::FuncLoopCall( aData[1], aData[2] )
|
||||
lBreak := ! ::FuncLoopCall( aData[1], aData[2] )
|
||||
ELSE
|
||||
lBreak := .T.
|
||||
ENDIF
|
||||
@@ -597,7 +598,7 @@ METHOD Run() CLASS tRPCServeCon
|
||||
IF nSafeStatus == RPCS_STATUS_LOGGED
|
||||
aData := ::RecvFunction( .T., .T. )
|
||||
IF aData != NIL
|
||||
lBreak := .not. ::FuncLoopCall( aData[1], aData[2] )
|
||||
lBreak := ! ::FuncLoopCall( aData[1], aData[2] )
|
||||
ELSE
|
||||
lBreak := .T.
|
||||
ENDIF
|
||||
@@ -612,7 +613,7 @@ METHOD Run() CLASS tRPCServeCon
|
||||
IF nSafeStatus == RPCS_STATUS_LOGGED
|
||||
aData := ::RecvFunction( .F., .T. )
|
||||
IF aData != NIL
|
||||
lBreak := .not. ::FuncForeachCall( aData[1], aData[2] )
|
||||
lBreak := ! ::FuncForeachCall( aData[1], aData[2] )
|
||||
ELSE
|
||||
lBreak := .T.
|
||||
ENDIF
|
||||
@@ -627,7 +628,7 @@ METHOD Run() CLASS tRPCServeCon
|
||||
IF nSafeStatus == RPCS_STATUS_LOGGED
|
||||
aData := ::RecvFunction( .T., .T. )
|
||||
IF aData != NIL
|
||||
lBreak := .not. ::FuncForeachCall( aData[1], aData[2] )
|
||||
lBreak := ! ::FuncForeachCall( aData[1], aData[2] )
|
||||
ELSE
|
||||
lBreak := .T.
|
||||
ENDIF
|
||||
@@ -696,7 +697,7 @@ METHOD RecvAuth( lEncrypt ) CLASS tRPCServeCon
|
||||
|
||||
nLen := HB_GetLen8( cLength )
|
||||
|
||||
IF (lEncrypt .and. nLen > 128 ) .or. ( .not. lEncrypt .and. nLen > 37 )
|
||||
IF (lEncrypt .and. nLen > 128 ) .or. ( ! lEncrypt .and. nLen > 37 )
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
|
||||
@@ -713,7 +714,7 @@ METHOD RecvAuth( lEncrypt ) CLASS tRPCServeCon
|
||||
cUserID := Substr(cReadin, 1, nPos-1 )
|
||||
cPassword := Substr( cReadin, nPos+1 )
|
||||
|
||||
IF .not. lEncrypt
|
||||
IF ! lEncrypt
|
||||
::nAuthLevel := ::oServer:Authorize( cUserid, cPassword )
|
||||
IF ::nAuthLevel == 0
|
||||
hb_inetSendAll( ::skRemote, "XHBR91NO" )
|
||||
@@ -928,7 +929,7 @@ METHOD LaunchFunction( cFuncName, aParams, nMode, aDesc ) CLASS tRPCServeCon
|
||||
ENDIF
|
||||
|
||||
//check for parameters
|
||||
IF aParams == NIL .or. .not. oFunc:CheckTypes( aParams )
|
||||
IF aParams == NIL .or. ! oFunc:CheckTypes( aParams )
|
||||
// signal error
|
||||
::oServer:OnFunctionError( Self, cFuncName,02 )
|
||||
hb_inetSendAll( ::skRemote, "XHBR4002" )
|
||||
@@ -963,7 +964,7 @@ METHOD FunctionRunner( cFuncName, oFunc, nMode, aParams, aDesc ) CLASS tRPCServe
|
||||
|
||||
CASE nMode == 1 // run in loop
|
||||
aSubst := AClone( aParams )
|
||||
nSubstPos := AScan( aParams, {|x| ValType( x ) == "C" .and. x == "$."} )
|
||||
nSubstPos := AScan( aParams, {|x| ISCHARACTER( x ) .and. x == "$."} )
|
||||
|
||||
SWITCH aDesc[1]
|
||||
CASE 'A' // all results
|
||||
@@ -1016,7 +1017,7 @@ METHOD FunctionRunner( cFuncName, oFunc, nMode, aParams, aDesc ) CLASS tRPCServe
|
||||
|
||||
CASE nMode == 2 // Run in a foreach loop
|
||||
aSubst := AClone( aParams )
|
||||
nSubstPos := AScan( aParams, {|x| ValType( x ) == "C" .and. x == "$."} )
|
||||
nSubstPos := AScan( aParams, {|x| ISCHARACTER( x ) .and. x == "$."} )
|
||||
|
||||
SWITCH aDesc[1]
|
||||
CASE 'A' // all results
|
||||
@@ -1124,7 +1125,7 @@ METHOD SendProgress( nProgress, oData ) CLASS tRPCServeCon
|
||||
|
||||
//Ignore if told so
|
||||
HB_MutexLock( ::mtxBusy )
|
||||
IF .not. ::lAllowProgress .or. ::lCanceled
|
||||
IF ! ::lAllowProgress .or. ::lCanceled
|
||||
HB_MutexUnlock( ::mtxBusy )
|
||||
RETURN .T.
|
||||
ENDIF
|
||||
@@ -1260,7 +1261,7 @@ METHOD Add( xFunction, cVersion, nLevel, oExec, oMethod )
|
||||
LOCAL nElem, lRet := .F.
|
||||
LOCAL oFunction
|
||||
|
||||
IF ValType( xFunction ) == "C"
|
||||
IF ISCHARACTER( xFunction )
|
||||
oFunction := TRpcFunction():New( xFunction, cVersion, nLevel, oExec, oMethod )
|
||||
ELSE
|
||||
oFunction := xFunction
|
||||
@@ -1451,7 +1452,7 @@ METHOD UDPInterpretRequest( cData, nPacketLen, cRes ) CLASS tRPCService
|
||||
|
||||
/* XHRB00 - server scan */
|
||||
CASE cCode == "XHBR00"
|
||||
IF .not. ::OnServerScan()
|
||||
IF ! ::OnServerScan()
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
IF nPacketLen > 6
|
||||
@@ -1466,7 +1467,7 @@ METHOD UDPInterpretRequest( cData, nPacketLen, cRes ) CLASS tRPCService
|
||||
|
||||
/* XRB01 - Function scan */
|
||||
CASE cCode == "XHBR01"
|
||||
IF .not. ::OnFunctionScan()
|
||||
IF ! ::OnFunctionScan()
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
/* minimal length to be valid */
|
||||
@@ -1474,7 +1475,7 @@ METHOD UDPInterpretRequest( cData, nPacketLen, cRes ) CLASS tRPCService
|
||||
cSerial := HB_DeserialBegin( Substr( cData, 7 ) )
|
||||
cMatch := HB_DeserialNext( @cSerial )
|
||||
cNumber := NIL
|
||||
IF .not. Empty ( cMatch )
|
||||
IF ! Empty ( cMatch )
|
||||
cMatch := HB_RegexComp( cMatch )
|
||||
cNumber := HB_DeserialNext( @cSerial )
|
||||
ELSE
|
||||
|
||||
@@ -55,6 +55,8 @@
|
||||
|
||||
#include "hbrpc.ch"
|
||||
|
||||
#include "common.ch"
|
||||
|
||||
CLASS tRPCClient
|
||||
|
||||
DATA aServers
|
||||
@@ -236,7 +238,7 @@ RETURN .T.
|
||||
|
||||
|
||||
METHOD SetEncryption( cKey )
|
||||
IF .not. Empty( cKey )
|
||||
IF ! Empty( cKey )
|
||||
::bEncrypted := .T.
|
||||
::cCryptKey := cKey
|
||||
ELSE
|
||||
@@ -247,7 +249,7 @@ RETURN .T.
|
||||
|
||||
METHOD ScanServers(cName) CLASS tRPCClient
|
||||
// do not allow asynchronous mode without timeout
|
||||
IF .not. ::lAsyncMode .and. ( ::nTimeout == NIL .or. ::nTimeOut <= 0 )
|
||||
IF ! ::lAsyncMode .and. ( ::nTimeout == NIL .or. ::nTimeOut <= 0 )
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
|
||||
@@ -289,7 +291,7 @@ RETURN .F.
|
||||
|
||||
METHOD ScanFunctions( cFunc, cSerial ) CLASS tRPCClient
|
||||
// do not allow asynchronous mode without timeout
|
||||
IF .not. ::lAsyncMode .and. ( ::nTimeOut == NIL .or. ::nTimeOut <= 0 )
|
||||
IF ! ::lAsyncMode .and. ( ::nTimeOut == NIL .or. ::nTimeOut <= 0 )
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
|
||||
@@ -441,7 +443,7 @@ METHOD Connect( cServer, cUserId, cPassword ) CLASS tRPCClient
|
||||
ENDIF
|
||||
|
||||
IF hb_inetErrorCode( ::skTcp ) == 0
|
||||
IF .not. ::bEncrypted
|
||||
IF ! ::bEncrypted
|
||||
hb_inetRecvAll( ::skTcp, @cReply )
|
||||
IF hb_inetErrorCode( ::skTcp ) == 0 .and. cReply == "XHBR91OK"
|
||||
::nStatus := RPC_STATUS_LOGGED // Logged in
|
||||
@@ -544,7 +546,7 @@ METHOD SetLoopMode( nMethod, xData, nEnd, nStep ) CLASS tRPCClient
|
||||
RETURN .T.
|
||||
ENDIF
|
||||
|
||||
IF ValType( xData ) == "A"
|
||||
IF ISARRAY( xData )
|
||||
::aLoopData := xData
|
||||
ELSE
|
||||
IF ValType( xData ) == "NI"
|
||||
@@ -592,12 +594,12 @@ METHOD Call( ... ) CLASS tRPCClient
|
||||
::oResult := NIL
|
||||
|
||||
// do not allow asynchronous mode without timeout
|
||||
IF .not. ::lAsyncMode .and. ( ::nTimeOut == NIL .or. ::nTimeOut <= 0 )
|
||||
IF ! ::lAsyncMode .and. ( ::nTimeOut == NIL .or. ::nTimeOut <= 0 )
|
||||
RETURN NIL
|
||||
ENDIF
|
||||
|
||||
oCalling := hb_PValue( 1 )
|
||||
IF ValType( oCalling ) == "A"
|
||||
IF ISARRAY( oCalling )
|
||||
cFunction := oCalling[1]
|
||||
ADel( oCalling, 1 )
|
||||
ASize( oCalling, Len( oCalling ) -1 )
|
||||
@@ -625,7 +627,7 @@ METHOD Call( ... ) CLASS tRPCClient
|
||||
::nStatus := RPC_STATUS_WAITING // waiting for a reply
|
||||
|
||||
// send the call through the socket
|
||||
IF .not. ::SendCall( cFunction, aParams )
|
||||
IF ! ::SendCall( cFunction, aParams )
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
|
||||
@@ -655,7 +657,7 @@ METHOD SetPeriodCallback( ... ) CLASS tRPCClient
|
||||
::nTimeLimit := hb_PValue( 2 )
|
||||
|
||||
caCalling := hb_PValue( 3 )
|
||||
IF ValType( caCalling ) != "A"
|
||||
IF ! ISARRAY( caCalling )
|
||||
caCalling := Array( Pcount() -2 )
|
||||
FOR nCount := 3 TO Pcount()
|
||||
caCalling[nCount - 2] := hb_PValue( nCount )
|
||||
@@ -813,7 +815,7 @@ METHOD TCPAccept() CLASS tRPCClient
|
||||
EXIT
|
||||
ENDIF
|
||||
|
||||
IF .not. ::TCPParse( cCode )
|
||||
IF ! ::TCPParse( cCode )
|
||||
EXIT
|
||||
ENDIF
|
||||
|
||||
@@ -884,7 +886,7 @@ METHOD TCPParse( cCode ) CLASS tRPCClient
|
||||
cData := Space( nDataLen )
|
||||
IF hb_inetRecvAll( ::skTCP, @cData ) == nDataLen
|
||||
cData := HB_Uncompress( nOrigLen, ::Decrypt( cData ) )
|
||||
IF .not. Empty( cData )
|
||||
IF ! Empty( cData )
|
||||
::oResult := HB_Deserialize( cData, nDataLen )
|
||||
IF ::oResult != NIL
|
||||
::OnFunctionReturn( ::oResult )
|
||||
@@ -932,7 +934,7 @@ METHOD TCPParse( cCode ) CLASS tRPCClient
|
||||
cData := Space( nDataLen )
|
||||
IF hb_inetRecvAll( ::skTCP, @cData ) == nDataLen
|
||||
cData := HB_Uncompress( nOrigLen, cData )
|
||||
IF .not. Empty( cData )
|
||||
IF ! Empty( cData )
|
||||
::oResult := HB_Deserialize( ::Decrypt( cData), nDataLen )
|
||||
IF ::oResult != NIL
|
||||
lContinue := .T.
|
||||
@@ -953,7 +955,7 @@ RETURN lContinue
|
||||
METHOD GetFunctionName( xId ) CLASS tRpcClient
|
||||
LOCAL cData, nPos
|
||||
|
||||
IF ValType( xID ) == "A"
|
||||
IF ISARRAY( xID )
|
||||
cData := xId[3]
|
||||
ELSEIF Len( ::aFunctions ) > 0
|
||||
cData := ::aFunctions[xId][3]
|
||||
@@ -961,7 +963,7 @@ METHOD GetFunctionName( xId ) CLASS tRpcClient
|
||||
cData := ""
|
||||
ENDIF
|
||||
|
||||
IF .not. Empty(cData)
|
||||
IF ! Empty(cData)
|
||||
nPos := At( "(", cData )
|
||||
cData := Substr( cData, 1, nPos-1 )
|
||||
ENDIF
|
||||
@@ -972,7 +974,7 @@ RETURN cData
|
||||
METHOD GetServerName( xId ) CLASS tRpcClient
|
||||
LOCAL cData
|
||||
|
||||
IF ValType( xID ) == "A"
|
||||
IF ISARRAY( xID )
|
||||
cData := xId[2]
|
||||
ELSE
|
||||
IF Len( ::aFunctions ) > 0
|
||||
@@ -989,12 +991,12 @@ RETURN cData
|
||||
METHOD GetServerAddress( xId ) CLASS tRpcClient
|
||||
LOCAL cData
|
||||
|
||||
IF ValType( xID ) == "A"
|
||||
IF ISARRAY( xID )
|
||||
cData := xId[1]
|
||||
ELSE
|
||||
IF .not. Empty( ::aFunctions )
|
||||
IF ! Empty( ::aFunctions )
|
||||
cData := ::aFunctions[xId][1]
|
||||
ELSEIF .not. Empty( ::aServers )
|
||||
ELSEIF ! Empty( ::aServers )
|
||||
cData := ::aServers[xId][1]
|
||||
ELSE
|
||||
cData := ""
|
||||
|
||||
@@ -71,8 +71,6 @@
|
||||
#include "dbinfo.ch"
|
||||
#include "error.ch"
|
||||
|
||||
#define COMPILE(c) &("{||" + c + "}")
|
||||
|
||||
STATIC saTables := {}
|
||||
/* NetWork Functions */
|
||||
STATIC snNetDelay := 30
|
||||
@@ -153,10 +151,10 @@ FUNCTION NetLock( nType, lReleaseLocks, nSeconds )
|
||||
LOCAL nCh
|
||||
LOCAL cWord
|
||||
|
||||
IF .not. ( VALTYPE( nType ) == "N" ) .or. ;
|
||||
( ( .not. ( nType == 1 ) ) .and. ;
|
||||
( .not. ( nType == 2 ) ) .and. ;
|
||||
( .not. ( nType == 3 ) ) )
|
||||
IF ! ISNUMBER( nType ) .or. ;
|
||||
( ( nType != 1 ) .and. ;
|
||||
( nType != 2 ) .and. ;
|
||||
( nType != 3 ) )
|
||||
ALERT( "Invalid Argument passed to NETLOCK()" )
|
||||
RETURN lSuccess
|
||||
ENDIF
|
||||
@@ -291,7 +289,7 @@ FUNCTION NetOpenFiles( aFiles )
|
||||
ENDIF
|
||||
|
||||
IF NetDbUse( xFile[ 1 ], xFile[ 2 ], snNetDelay, "DBFCDX" )
|
||||
IF VALTYPE( xFile[ 3 ] ) == "A"
|
||||
IF ISARRAY( xFile[ 3 ] )
|
||||
FOR EACH cIndex IN xFile[ 3 ]
|
||||
IF hb_FileExists( cIndex )
|
||||
ORDLISTADD( cIndex )
|
||||
@@ -760,7 +758,7 @@ CLASS HBTable
|
||||
|
||||
METHOD DBFILTER() INLINE ( ::Alias )->( DBFILTER() )
|
||||
METHOD SetFilter( c ) INLINE ;
|
||||
IF( c != NIL, ( ::Alias )->( DBSETFILTER( COMPILE( c ), c ) ), ;
|
||||
IF( c != NIL, ( ::Alias )->( DBSETFILTER( hb_macroBlock( c ), c ) ), ;
|
||||
( ::Alias )->( DBCLEARFILTER() ) )
|
||||
|
||||
METHOD AddChild( oChild, cKey )
|
||||
@@ -1381,10 +1379,9 @@ RETURN ::aOrders[ nPos ] // returns oOrder
|
||||
|
||||
METHOD SetOrder( xTag ) CLASS HBTable
|
||||
|
||||
LOCAL xType := VALTYPE( xTag )
|
||||
LOCAL nOldOrd := ( ::Alias )->( ORDSETFOCUS() )
|
||||
|
||||
SWITCH xType
|
||||
SWITCH VALTYPE( xTag )
|
||||
CASE "C" // we have an Order-TAG
|
||||
( ::Alias )->( ORDSETFOCUS( xTag ) )
|
||||
EXIT
|
||||
@@ -1420,7 +1417,7 @@ PROCEDURE AddChild( oChild, cKey ) CLASS HBTable // ::addChild()
|
||||
|
||||
AADD( ::aChildren, { oChild, cKey } )
|
||||
oChild:oParent := Self
|
||||
( ::Alias )->( ORDSETRELATION( oChild:Alias, COMPILE( cKey ), cKey ) )
|
||||
( ::Alias )->( ORDSETRELATION( oChild:Alias, hb_macroBlock( cKey ), cKey ) )
|
||||
RETURN
|
||||
|
||||
/****
|
||||
@@ -1534,9 +1531,9 @@ METHOD New( cTag, cKey, cLabel, cFor, cWhile, lUnique, bEval, nInterval, cOrderB
|
||||
::cKey := cKey
|
||||
::cFor := cFor
|
||||
::cWhile := cWhile
|
||||
::bKey := COMPILE( cKey )
|
||||
::bFor := COMPILE( cFor )
|
||||
::bWhile := COMPILE( cWhile )
|
||||
::bKey := hb_macroBlock( cKey )
|
||||
::bFor := hb_macroBlock( cFor )
|
||||
::bWhile := hb_macroBlock( cWhile )
|
||||
::bEval := bEval
|
||||
::nInterval := nInterval
|
||||
::Label := cLabel
|
||||
|
||||
@@ -270,7 +270,7 @@ METHOD MatchCriteria( oFound ) CLASS TXmlIteratorScan
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
|
||||
IF ::cAttribute != NIL .and. .not. ::cAttribute $ oFound:aAttributes
|
||||
IF ::cAttribute != NIL .and. ! ::cAttribute $ oFound:aAttributes
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
|
||||
@@ -303,7 +303,7 @@ RETURN Self
|
||||
METHOD MatchCriteria( oFound ) CLASS TXmlIteratorRegex
|
||||
|
||||
IF ::cName != NIL .and. ;
|
||||
( oFound:cName == NIL .or. .not. HB_REGEXLIKE( ::cName, oFound:cName, .t. ) )
|
||||
( oFound:cName == NIL .or. ! HB_REGEXLIKE( ::cName, oFound:cName, .t. ) )
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
|
||||
@@ -318,7 +318,7 @@ METHOD MatchCriteria( oFound ) CLASS TXmlIteratorRegex
|
||||
ENDIF
|
||||
|
||||
IF ::cData != NIL .and. ;
|
||||
( oFound:cData == NIL .or. .not. HB_REGEXHAS( ::cData, oFound:cData, .F. ) )
|
||||
( oFound:cData == NIL .or. ! HB_REGEXHAS( ::cData, oFound:cData, .F. ) )
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -115,8 +115,8 @@ FUNCTION StringToLiteral( cString )
|
||||
|
||||
LOCAL lDouble := .F., lSingle := .F.
|
||||
|
||||
IF hb_RegExHas( "\n|\r", cString ) .OR. ;
|
||||
( ( lDouble := '"' $ cString ) .AND. ( lSingle := "'" $ cString ) .AND. hb_RegExHas( "\[|\]", cString ) )
|
||||
IF hb_regexHas( "\n|\r", cString ) .OR. ;
|
||||
( ( lDouble := '"' $ cString ) .AND. ( lSingle := "'" $ cString ) .AND. hb_regexHas( "\[|\]", cString ) )
|
||||
|
||||
cString := StrTran( cString, '"', '\"' )
|
||||
cString := StrTran( cString, Chr(10), '\n' )
|
||||
|
||||
@@ -192,14 +192,14 @@ FUNCTION dbMerge( xSource, lAppend )
|
||||
|
||||
// Validate args
|
||||
//-------------------------------------------------------------//
|
||||
IF ValType( xSource ) == 'C'
|
||||
IF ISCHARACTER( xSource )
|
||||
nArea := Select()
|
||||
|
||||
USE ( xSource ) ALIAS MergeSource EXCLUSIVE NEW
|
||||
nSource := Select()
|
||||
|
||||
SELECT ( nArea )
|
||||
ELSEIF ValType( xSource ) == 'N'
|
||||
ELSEIF ISNUMBER( xSource )
|
||||
nSource := xSource
|
||||
ELSE
|
||||
RETURN .F.
|
||||
|
||||
@@ -131,7 +131,7 @@ STATIC FUNCTION xhb_DefError( oError )
|
||||
Endif
|
||||
|
||||
|
||||
If ValType( oError:Args ) == "A"
|
||||
If ISARRAY( oError:Args )
|
||||
cMessage += " Arguments: (" + Arguments( oError ) + ")"
|
||||
Endif
|
||||
|
||||
@@ -293,46 +293,46 @@ STATIC FUNCTION LogError( oerr )
|
||||
Endif
|
||||
|
||||
|
||||
If nHandle < 3 .and. lower( cLogFile ) != 'error.log'
|
||||
If nHandle < 3 .and. lower( cLogFile ) != "error.log"
|
||||
// Force creating error.log in case supplied log file cannot
|
||||
// be created for any reason
|
||||
cLogFile := 'error.log'
|
||||
cLogFile := "error.log"
|
||||
nHandle := Fcreate( cLogFile, FC_NORMAL )
|
||||
Endif
|
||||
|
||||
If nHandle < 3
|
||||
Else
|
||||
|
||||
FWriteLine( nHandle, Padc( ' xHarbour Error Log ' , 79, '-' ) )
|
||||
FWriteLine( nHandle, '' )
|
||||
FWriteLine( nHandle, Padc( " xHarbour Error Log " , 79, "-" ) )
|
||||
FWriteLine( nHandle, "" )
|
||||
|
||||
FWriteLine( nHandle, 'Date...............: ' + dtoc( date() ) )
|
||||
FWriteLine( nHandle, 'Time...............: ' + time() )
|
||||
FWriteLine( nHandle, "Date...............: " + dtoc( date() ) )
|
||||
FWriteLine( nHandle, "Time...............: " + time() )
|
||||
|
||||
FWriteLine( nHandle, '' )
|
||||
FWriteLine( nHandle, 'Application name...: ' + hb_cmdargargv() )
|
||||
FWriteLine( nHandle, 'Workstation name...: ' + netname() )
|
||||
FWriteLine( nHandle, 'Available memory...: ' + strvalue( Memory(0) ) )
|
||||
FWriteLine( nHandle, 'Current disk.......: ' + diskname() )
|
||||
FWriteLine( nHandle, 'Current directory..: ' + curdir() )
|
||||
FWriteLine( nHandle, 'Free disk space....: ' + strvalue( DiskSpace() ) )
|
||||
FWriteLine( nHandle, '' )
|
||||
FWriteLine( nHandle, 'Operating system...: ' + os() )
|
||||
FWriteLine( nHandle, 'xHarbour version...: ' + version() )
|
||||
FWriteLine( nHandle, 'xHarbour built on..: ' + hb_builddate() )
|
||||
FWriteLine( nHandle, 'C/C++ compiler.....: ' + hb_compiler() )
|
||||
FWriteLine( nHandle, "" )
|
||||
FWriteLine( nHandle, "Application name...: " + hb_cmdargargv() )
|
||||
FWriteLine( nHandle, "Workstation name...: " + netname() )
|
||||
FWriteLine( nHandle, "Available memory...: " + strvalue( Memory(0) ) )
|
||||
FWriteLine( nHandle, "Current disk.......: " + diskname() )
|
||||
FWriteLine( nHandle, "Current directory..: " + curdir() )
|
||||
FWriteLine( nHandle, "Free disk space....: " + strvalue( DiskSpace() ) )
|
||||
FWriteLine( nHandle, "" )
|
||||
FWriteLine( nHandle, "Operating system...: " + os() )
|
||||
FWriteLine( nHandle, "xHarbour version...: " + version() )
|
||||
FWriteLine( nHandle, "xHarbour built on..: " + hb_builddate() )
|
||||
FWriteLine( nHandle, "C/C++ compiler.....: " + hb_compiler() )
|
||||
|
||||
FWriteLine( nHandle, 'Multi Threading....: ' + If( hb_mtvm(),"YES","NO" ) )
|
||||
FWriteLine( nHandle, 'VM Optimization....: ' + strvalue( Hb_VmMode() ) )
|
||||
FWriteLine( nHandle, "Multi Threading....: " + If( hb_mtvm(),"YES","NO" ) )
|
||||
FWriteLine( nHandle, "VM Optimization....: " + strvalue( Hb_VmMode() ) )
|
||||
|
||||
IF __dynsIsFun( "Select" )
|
||||
FWriteLine( nHandle, '' )
|
||||
FWriteLine( nHandle, 'Current Area ......:' + strvalue( &("Select()") ) )
|
||||
FWriteLine( nHandle, "" )
|
||||
FWriteLine( nHandle, "Current Area ......:" + strvalue( &("Select()") ) )
|
||||
ENDIF
|
||||
|
||||
FWriteLine( nHandle, '' )
|
||||
FWriteLine( nHandle, Padc( ' Environmental Information ', 79, '-' ) )
|
||||
FWriteLine( nHandle, '' )
|
||||
FWriteLine( nHandle, "" )
|
||||
FWriteLine( nHandle, Padc( " Environmental Information ", 79, "-" ) )
|
||||
FWriteLine( nHandle, "" )
|
||||
|
||||
FWriteLine( nHandle, "SET ALTERNATE......: " + strvalue( Set( _SET_ALTERNATE ), .T. ) )
|
||||
FWriteLine( nHandle, "SET ALTFILE........: " + strvalue( Set( _SET_ALTFILE ) ) )
|
||||
@@ -436,9 +436,9 @@ STATIC FUNCTION LogError( oerr )
|
||||
FWriteLine( nHandle, "" )
|
||||
|
||||
IF nCols > 0
|
||||
FWriteLine( nHandle, Padc( 'Detailed Work Area Items', nCols, '-' ) )
|
||||
FWriteLine( nHandle, Padc( "Detailed Work Area Items", nCols, "-" ) )
|
||||
ELSE
|
||||
FWriteLine( nHandle, 'Detailed Work Area Items ' )
|
||||
FWriteLine( nHandle, "Detailed Work Area Items " )
|
||||
ENDIF
|
||||
FWriteLine( nHandle, "" )
|
||||
|
||||
@@ -499,22 +499,22 @@ STATIC FUNCTION LogError( oerr )
|
||||
|
||||
nCount := 3
|
||||
While !Empty( Procname( ++ nCount ) )
|
||||
FWriteLine( nHandle, Padr( Procname( nCount ), 21 ) + ' : ' + Transform( Procline( nCount ), "999,999" ) + " in Module: " + ProcFile( nCount ) )
|
||||
FWriteLine( nHandle, Padr( Procname( nCount ), 21 ) + " : " + Transform( Procline( nCount ), "999,999" ) + " in Module: " + ProcFile( nCount ) )
|
||||
Enddo
|
||||
|
||||
FWriteLine( nHandle, "" )
|
||||
FWriteLine( nHandle, "" )
|
||||
|
||||
IF valtype( cScreen ) == "C"
|
||||
IF ISCHARACTER( cScreen )
|
||||
FWriteLine( nHandle, Padc( " Video Screen Dump ", nCols, "#" ) )
|
||||
FWriteLine( nHandle, "" )
|
||||
//FWriteLine( nHandle, "" )
|
||||
FWriteLine( nHandle, "+" + Replicate( '-', nCols + 1 ) + "+" )
|
||||
FWriteLine( nHandle, "+" + Replicate( "-", nCols + 1 ) + "+" )
|
||||
//FWriteLine( nHandle, "" )
|
||||
nCellSize := len( Savescreen( 0, 0, 0, 0 ) )
|
||||
nRange := ( nCols + 1 ) * nCellSize
|
||||
For nCount := 1 To nRows + 1
|
||||
cOutString := ''
|
||||
cOutString := ""
|
||||
cSubString := Substr( cScreen, nStart, nRange )
|
||||
For nForLoop := 1 To nRange step nCellSize
|
||||
cOutString += Substr( cSubString, nForLoop, 1 )
|
||||
@@ -522,7 +522,7 @@ STATIC FUNCTION LogError( oerr )
|
||||
FWriteLine( nHandle, "|" + cOutString + "|" )
|
||||
nStart += nRange
|
||||
Next
|
||||
FWriteLine( nHandle, "+" + Replicate( '-', nCols + 1 ) + "+" )
|
||||
FWriteLine( nHandle, "+" + Replicate( "-", nCols + 1 ) + "+" )
|
||||
FWriteLine( nHandle, "" )
|
||||
FWriteLine( nHandle, "" )
|
||||
ELSE
|
||||
@@ -531,10 +531,10 @@ STATIC FUNCTION LogError( oerr )
|
||||
|
||||
|
||||
/*
|
||||
* FWriteLine( nHandle, padc(" Available Memory Variables ",nCols,'+') )
|
||||
* FWriteLine( nHandle, padc(" Available Memory Variables ",nCols,"+") )
|
||||
* FWriteLine( nHandle, "" )
|
||||
* Save All Like * To errormem
|
||||
* nMemHandle := Fopen( 'errormem.mem', FO_READWRITE )
|
||||
* nMemHandle := Fopen( "errormem.mem", FO_READWRITE )
|
||||
* nMemLength := Fseek( nMemHandle, 0, 2 )
|
||||
* Fseek( nMemHandle, 0 )
|
||||
* nCount := 1
|
||||
@@ -557,18 +557,18 @@ STATIC FUNCTION LogError( oerr )
|
||||
* Case "N"
|
||||
* nBytes += ( nLenTemp := 9 )
|
||||
* exit
|
||||
* Case 'L'
|
||||
* Case "L"
|
||||
* nBytes += ( nLenTemp := 2 )
|
||||
* exit
|
||||
* Case "D"
|
||||
* nBytes += ( nLenTemp := 9 )
|
||||
* exit
|
||||
* End
|
||||
* Fwrite( nFhandle, " " + Transform( nLenTemp, '999999' ) + 'bytes -> ' )
|
||||
* Fwrite( nFhandle, " " + Transform( nLenTemp, "999999" ) + "bytes -> " )
|
||||
* FWriteLine( nHandle, " " + cTemp )
|
||||
* Enddo
|
||||
* Fclose( nMemHandle )
|
||||
* Ferase( 'errormem.mem' )
|
||||
* Ferase( "errormem.mem" )
|
||||
*/
|
||||
if lAppendLog .and. nHandle2 != -1
|
||||
|
||||
@@ -599,7 +599,7 @@ Return .f.
|
||||
|
||||
STATIC FUNCTION strvalue( c, l )
|
||||
|
||||
LOCAL cr := ''
|
||||
LOCAL cr := ""
|
||||
|
||||
DEFAULT l TO .F.
|
||||
|
||||
@@ -656,19 +656,19 @@ PROCEDURE __MinimalErrorHandler( oError )
|
||||
|
||||
LOCAL cError := "Error!" + hb_osNewLine()
|
||||
|
||||
IF ValType( oError:Operation ) == 'C'
|
||||
IF ISCHARACTER( oError:Operation )
|
||||
cError += "Operation: " + oError:Operation + hb_osNewLine()
|
||||
ENDIF
|
||||
IF ValType( oError:Description ) == 'C'
|
||||
IF ISCHARACTER( oError:Description )
|
||||
cError += "Description: " + oError:Description + hb_osNewLine()
|
||||
ENDIF
|
||||
IF ValType( oError:ModuleName ) == 'C'
|
||||
IF ISCHARACTER( oError:ModuleName )
|
||||
cError += "Source: " + oError:ModuleName + hb_osNewLine()
|
||||
ENDIF
|
||||
IF ValType( oError:ProcName ) == 'C'
|
||||
IF ISCHARACTER( oError:ProcName )
|
||||
cError += "Procedure: " + oError:ProcName + hb_osNewLine()
|
||||
ENDIF
|
||||
IF ValType( oError:ProcLine ) == 'N'
|
||||
IF ISNUMBER( oError:ProcLine )
|
||||
cError += "Line: " + hb_ntos( oError:ProcLine ) + hb_osNewLine()
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
function StartThread( p1, p2, ... )
|
||||
if PCount() < 2
|
||||
return hb_threadStart( p1 )
|
||||
elseif valtype( p1 ) == "O" .and. ISCHARACTER( p2 )
|
||||
elseif ISOBJECT( p1 ) .and. ISCHARACTER( p2 )
|
||||
return hb_threadStart( {|...| p1:&p2( ... ) }, ... )
|
||||
endif
|
||||
return hb_threadStart( p1, p2, ... )
|
||||
|
||||
@@ -721,7 +721,7 @@ Local ol := 0
|
||||
CM := SubStr ( Mask , icp+x , 1 )
|
||||
|
||||
If !IsDigit(CB) .And. !IsAlpha(CB) .And.;
|
||||
( ( .Not. CB = ' ' ) .or. ( CB == ' ' .and. CM == ' ' ) )
|
||||
( !( CB == ' ' ) .or. ( CB == ' ' .and. CM == ' ' ) )
|
||||
wvw_ebsetsel(mnwinnum, mnebid, icp+x, icp+x)
|
||||
Else
|
||||
Exit
|
||||
|
||||
@@ -1200,7 +1200,7 @@ cErr := "Runtime error" + CRLF + ;
|
||||
CRLF
|
||||
|
||||
|
||||
do while .not. Empty( ProcName( ++i ) )
|
||||
do while ! Empty( ProcName( ++i ) )
|
||||
cErr += Trim( ProcName( i ) ) + "(" + Ltrim( Str( ProcLine( i ) ) ) + ")" + CRLF
|
||||
enddo
|
||||
|
||||
|
||||
@@ -1057,7 +1057,7 @@ RETURN( cQuery )
|
||||
* insert
|
||||
* CAMBIA EL MODO INSERT ON /OFF DESDE UN "READ"
|
||||
*---------------------------------------------------------------------------
|
||||
ins_on := .NOT. ins_on
|
||||
ins_on := ! ins_on
|
||||
IIF(ins_on, READINSERT(.T.), READINSERT(.F.))
|
||||
Ins_stat()
|
||||
RETURN
|
||||
|
||||
@@ -417,10 +417,10 @@ METHOD GetSessionVars( aHashVars, cFields, cSeparator ) CLASS uhttpd_Session
|
||||
LOCAL cSessVarName
|
||||
DEFAULT cSeparator TO "&"
|
||||
|
||||
aFields := HB_RegExSplit( cSeparator, cFields )
|
||||
aFields := hb_regexSplit( cSeparator, cFields )
|
||||
|
||||
FOR EACH cField in aFields
|
||||
aField := HB_RegexSplit( "=", cField, 2 )
|
||||
aField := hb_regexSplit( "=", cField, 2 )
|
||||
IF Len( aField ) != 2
|
||||
LOOP
|
||||
ENDIF
|
||||
|
||||
31
harbour/mpkg_nightly.sh
Executable file
31
harbour/mpkg_nightly.sh
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
[ "$BASH" ] || exec bash $0 "$@"
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
[ -n harbour-nightly-src.zip ] || rm harbour-nightly-src.zip
|
||||
[ -n harbour-nightly.tar.bz2 ] || rm harbour-nightly.tar.bz2
|
||||
[ -n harbour-nightly.tar.gz ] || rm harbour-nightly.tar.gz
|
||||
|
||||
rm -f -r _mk_nightly
|
||||
mkdir _mk_nightly
|
||||
cd _mk_nightly
|
||||
|
||||
rm -f -r harbour
|
||||
svn export --native-eol LF http://harbour-project.svn.sourceforge.net/svnroot/harbour-project/trunk/harbour
|
||||
tar -c harbour/* > harbour-nightly.tar
|
||||
bzip2 -c -z harbour-nightly.tar > ../harbour-nightly.tar.bz2
|
||||
gzip -c harbour-nightly.tar > ../harbour-nightly.tar.gz
|
||||
rm harbour-nightly.tar
|
||||
|
||||
rm -f -r harbour
|
||||
svn export --native-eol CRLF http://harbour-project.svn.sourceforge.net/svnroot/harbour-project/trunk/harbour
|
||||
zip -X -r -o ../harbour-nightly-src.zip harbour/*
|
||||
|
||||
cd ..
|
||||
rm -f -r _mk_nightly
|
||||
|
||||
scp harbour-nightly-src.zip $USER,harbour-project@frs.sourceforge.net:/home/frs/project/h/ha/harbour-project/source/nightly/
|
||||
scp harbour-nightly.tar.bz2 $USER,harbour-project@frs.sourceforge.net:/home/frs/project/h/ha/harbour-project/source/nightly/
|
||||
scp harbour-nightly.tar.gz $USER,harbour-project@frs.sourceforge.net:/home/frs/project/h/ha/harbour-project/source/nightly/
|
||||
@@ -95,14 +95,14 @@ Section "Main components" hb_main
|
||||
File /r "$%HB_INSTALL_PREFIX%\doc\*.*"
|
||||
|
||||
; Write the installation path into the registry
|
||||
; WriteRegStr HKLM "SOFTWARE\Harbour" "InstallDir" "$INSTDIR"
|
||||
WriteRegStr HKCU "Software\Harbour" "InstallDir" "$INSTDIR"
|
||||
; WriteRegStr HKLM "SOFTWARE\Harbour Project" "InstallDir" "$INSTDIR"
|
||||
WriteRegStr HKCU "Software\Harbour Project" "InstallDir" "$INSTDIR"
|
||||
|
||||
; Write the uninstall keys for Windows
|
||||
; WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Harbour" "DisplayName" "Harbour Project"
|
||||
; WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Harbour" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
||||
; WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Harbour" "NoModify" 1
|
||||
; WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Harbour" "NoRepair" 1
|
||||
; WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Harbour Project" "DisplayName" "Harbour Project"
|
||||
; WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Harbour Project" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
||||
; WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Harbour Project" "NoModify" 1
|
||||
; WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Harbour Project" "NoRepair" 1
|
||||
WriteUninstaller "uninstall.exe"
|
||||
|
||||
SectionEnd
|
||||
@@ -170,7 +170,7 @@ Section "Uninstall"
|
||||
|
||||
Delete "$DESKTOP\Harbour Project.lnk"
|
||||
|
||||
; DeleteRegKey HKLM "SOFTWARE\Harbour"
|
||||
DeleteRegKey HKCU "Software\Harbour"
|
||||
; DeleteRegKey HKLM "SOFTWARE\Harbour Project"
|
||||
DeleteRegKey HKCU "Software\Harbour Project"
|
||||
|
||||
SectionEnd
|
||||
|
||||
@@ -119,14 +119,14 @@ Section "Main components" hb_main
|
||||
File "$%HB_ROOT%hb21\addons\HARBOUR_README_ADDONS"
|
||||
|
||||
; Write the installation path into the registry
|
||||
; WriteRegStr HKLM "SOFTWARE\Harbour" "InstallDir" "$INSTDIR"
|
||||
WriteRegStr HKCU "Software\Harbour" "InstallDir" "$INSTDIR"
|
||||
; WriteRegStr HKLM "SOFTWARE\Harbour Project 2.1" "InstallDir" "$INSTDIR"
|
||||
WriteRegStr HKCU "Software\Harbour Project 2.1" "InstallDir" "$INSTDIR"
|
||||
|
||||
; Write the uninstall keys for Windows
|
||||
; WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Harbour" "DisplayName" "Harbour Project"
|
||||
; WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Harbour" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
||||
; WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Harbour" "NoModify" 1
|
||||
; WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Harbour" "NoRepair" 1
|
||||
; WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Harbour Project 2.1" "DisplayName" "Harbour Project"
|
||||
; WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Harbour Project 2.1" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
||||
; WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Harbour Project 2.1" "NoModify" 1
|
||||
; WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Harbour Project 2.1" "NoRepair" 1
|
||||
WriteUninstaller "uninstall.exe"
|
||||
|
||||
SectionEnd
|
||||
@@ -441,7 +441,7 @@ Section "Uninstall"
|
||||
|
||||
Delete "$DESKTOP\Harbour Project 2.1.lnk"
|
||||
|
||||
; DeleteRegKey HKLM "SOFTWARE\Harbour"
|
||||
DeleteRegKey HKCU "Software\Harbour"
|
||||
; DeleteRegKey HKLM "SOFTWARE\Harbour Project 2.1"
|
||||
DeleteRegKey HKCU "Software\Harbour Project 2.1"
|
||||
|
||||
SectionEnd
|
||||
|
||||
@@ -174,10 +174,10 @@ STATIC FUNCTION hb_IniStringLow( hIni, cData, lKeyCaseSens, cSplitters, lAutoMai
|
||||
LOCAL cLine
|
||||
LOCAL reComment, reInclude, reSection, reSplitters
|
||||
|
||||
reComment := hb_RegexComp( s_cHalfLineComment + "|^[ \t]*" + s_cLineComment )
|
||||
reInclude := hb_RegexComp( "include (.*)" )
|
||||
reSection := hb_RegexComp( "[[](.*)[]]" )
|
||||
reSplitters := hb_RegexComp( cSplitters )
|
||||
reComment := hb_regexComp( s_cHalfLineComment + "|^[ \t]*" + s_cLineComment )
|
||||
reInclude := hb_regexComp( "include (.*)" )
|
||||
reSection := hb_regexComp( "[[](.*)[]]" )
|
||||
reSplitters := hb_regexComp( cSplitters )
|
||||
|
||||
/* Always begin with the MAIN section */
|
||||
IF lAutoMain
|
||||
@@ -226,7 +226,7 @@ STATIC FUNCTION hb_IniStringLow( hIni, cData, lKeyCaseSens, cSplitters, lAutoMai
|
||||
ENDIF
|
||||
|
||||
/* remove eventual comments */
|
||||
aKeyVal := hb_RegexSplit( reComment, cLine )
|
||||
aKeyVal := hb_regexSplit( reComment, cLine )
|
||||
IF ! Empty( aKeyVal )
|
||||
cLine := AllTrim( aKeyVal[ 1 ] )
|
||||
ENDIF
|
||||
@@ -237,7 +237,7 @@ STATIC FUNCTION hb_IniStringLow( hIni, cData, lKeyCaseSens, cSplitters, lAutoMai
|
||||
ENDIF
|
||||
|
||||
/* Is it an "INCLUDE" statement ? */
|
||||
aKeyVal := hb_RegEx( reInclude, cLine )
|
||||
aKeyVal := hb_regex( reInclude, cLine )
|
||||
IF ! Empty( aKeyVal )
|
||||
/* ignore void includes */
|
||||
aKeyVal[ 2 ] := AllTrim( aKeyVal[ 2 ] )
|
||||
@@ -250,7 +250,7 @@ STATIC FUNCTION hb_IniStringLow( hIni, cData, lKeyCaseSens, cSplitters, lAutoMai
|
||||
ENDIF
|
||||
|
||||
/* Is it a NEW section? */
|
||||
aKeyVal := hb_Regex( reSection, cLine )
|
||||
aKeyVal := hb_regex( reSection, cLine )
|
||||
IF ! Empty( aKeyVal )
|
||||
cLine := AllTrim( aKeyVal[ 2 ] )
|
||||
IF Len( cLine ) != 0
|
||||
@@ -265,7 +265,7 @@ STATIC FUNCTION hb_IniStringLow( hIni, cData, lKeyCaseSens, cSplitters, lAutoMai
|
||||
ENDIF
|
||||
|
||||
/* Is it a valid key */
|
||||
aKeyVal := hb_RegexSplit( reSplitters, cLine,,, 2 )
|
||||
aKeyVal := hb_regexSplit( reSplitters, cLine,,, 2 )
|
||||
IF Len( aKeyVal ) == 1
|
||||
/* TODO: Signal error */
|
||||
cLine := ""
|
||||
|
||||
@@ -1115,7 +1115,7 @@ void hb_setInitialize( PHB_SET_STRUCT pSet )
|
||||
pSet->HB_SET_DEFEXTENSIONS = HB_TRUE;
|
||||
pSet->HB_SET_EOL = hb_strdup( hb_conNewLine() );
|
||||
pSet->HB_SET_TRIMFILENAME = HB_FALSE;
|
||||
pSet->HB_SET_HBOUTLOG = NULL;
|
||||
pSet->HB_SET_HBOUTLOG = hb_strdup( "hb_out.log" );
|
||||
pSet->HB_SET_HBOUTLOGINFO = hb_strdup( "" );
|
||||
pSet->HB_SET_OSCODEPAGE = NULL;
|
||||
pSet->HB_SET_DBCODEPAGE = NULL;
|
||||
|
||||
@@ -186,13 +186,13 @@ PRIVATE str_bar := "-
|
||||
SETCOLOR( LI_CLR )
|
||||
@ LI_Y1, LI_X1, LI_Y2, LI_X2 BOX "ÚÄ¿³ÙÄÀ³ "
|
||||
IF title <> Nil
|
||||
@ LI_Y1, ( LI_X2 - LI_X1 - 1 - LEN( title ) ) / 2 + LI_X1 SAY " " + title + " "
|
||||
@ LI_Y1, ( LI_X2 - LI_X1 - 1 - LEN( title ) ) / 2 + LI_X1 SAY " " + title + " "
|
||||
ENDIF
|
||||
IF title <> Nil .AND. LI_NAMES <> Nil
|
||||
LI_Y1 ++
|
||||
ENDIF
|
||||
razmer := LI_Y2 - LI_Y1 - 1
|
||||
IF .NOT. LI_PRFLT
|
||||
IF ! LI_PRFLT
|
||||
LI_KOLZ := EVAL( LI_RCOU, mslist )
|
||||
ENDIF
|
||||
LI_COLPOS := 1
|
||||
@@ -231,17 +231,17 @@ PRIVATE str_bar := "-
|
||||
//
|
||||
#ifdef RDD_AX
|
||||
@ LI_Y1 + 2, LI_X2, LI_Y2 - 2, LI_X2 BOX LEFT( str_bar, 1 )
|
||||
@ LI_Y1 + 1, LI_X2 SAY SUBSTR( str_bar, 2, 1 )
|
||||
@ LI_Y2 - 1, LI_X2 SAY SUBSTR( str_bar, 2, 1 )
|
||||
@ LI_Y1 + 2 + INT( IIF( LI_PRFLT, LI_TEKZP, Ax_Keyno() ) * ( LI_Y2 - LI_Y1 - 4 ) / IIF( LI_PRFLT, LI_KOLZ, Ax_KeyCount() ) ), LI_X2 SAY RIGHT( str_bar, 1 )
|
||||
@ LI_Y1 + 1, LI_X2 SAY SUBSTR( str_bar, 2, 1 )
|
||||
@ LI_Y2 - 1, LI_X2 SAY SUBSTR( str_bar, 2, 1 )
|
||||
@ LI_Y1 + 2 + INT( IIF( LI_PRFLT, LI_TEKZP, Ax_Keyno() ) * ( LI_Y2 - LI_Y1 - 4 ) / IIF( LI_PRFLT, LI_KOLZ, Ax_KeyCount() ) ), LI_X2 SAY RIGHT( str_bar, 1 )
|
||||
#else
|
||||
IF .NOT. ( TYPE( "Sx_Keyno()" ) == "U" )
|
||||
IF ! ( TYPE( "Sx_Keyno()" ) == "U" )
|
||||
@ LI_Y1 + 2, LI_X2, LI_Y2 - 2, LI_X2 BOX LEFT( str_bar, 1 )
|
||||
@ LI_Y1 + 1, LI_X2 SAY SUBSTR( str_bar, 2, 1 )
|
||||
@ LI_Y2 - 1, LI_X2 SAY SUBSTR( str_bar, 2, 1 )
|
||||
@ LI_Y1 + 1, LI_X2 SAY SUBSTR( str_bar, 2, 1 )
|
||||
@ LI_Y2 - 1, LI_X2 SAY SUBSTR( str_bar, 2, 1 )
|
||||
fbar1 := "Sx_Keyno()"
|
||||
fbar2 := "Sx_KeyCount()"
|
||||
@ LI_Y1 + 2 + INT( IIF( LI_PRFLT, LI_TEKZP, &fbar1 ) * ( LI_Y2 - LI_Y1 - 4 ) / IIF( LI_PRFLT, LI_KOLZ, &fbar2 ) ), LI_X2 SAY RIGHT( str_bar, 1 )
|
||||
@ LI_Y1 + 2 + INT( IIF( LI_PRFLT, LI_TEKZP, &fbar1 ) * ( LI_Y2 - LI_Y1 - 4 ) / IIF( LI_PRFLT, LI_KOLZ, &fbar2 ) ), LI_X2 SAY RIGHT( str_bar, 1 )
|
||||
ENDIF
|
||||
#endif
|
||||
//
|
||||
@@ -293,7 +293,7 @@ PRIVATE str_bar := "-
|
||||
IF xkey < 500
|
||||
DO CASE
|
||||
CASE xkey == 24 // Šãàá®à ¢¨§
|
||||
IF ( LI_KOLZ > 0 .OR. predit == 3 ) .AND. ( LI_KOLZ == 0 .OR. .NOT. EVAL( LI_BEOF, mslist ) )
|
||||
IF ( LI_KOLZ > 0 .OR. predit == 3 ) .AND. ( LI_KOLZ == 0 .OR. ! EVAL( LI_BEOF, mslist ) )
|
||||
EVAL( LI_BSKIP, mslist, 1 )
|
||||
IF EVAL( LI_BEOF, mslist ) .AND. ( predit < 3 .OR. LI_PRFLT )
|
||||
EVAL( LI_BSKIP, mslist, - 1 )
|
||||
@@ -426,7 +426,7 @@ PRIVATE str_bar := "-
|
||||
ENDIF
|
||||
vartmp := READEXIT( .T. )
|
||||
varbuf := FIELDGET( fipos )
|
||||
@ LI_NSTR + LI_Y1, LI_XPOS GET varbuf PICTURE Defpict( mslist, fipos, LI_X2 - LI_X1 - 3 )
|
||||
@ LI_NSTR + LI_Y1, LI_XPOS GET varbuf PICTURE Defpict( mslist, fipos, LI_X2 - LI_X1 - 3 )
|
||||
IF LI_VALID <> Nil .AND. LEN( LI_VALID ) >= fipos .AND. LI_VALID[ fipos ] <> Nil
|
||||
Getlist[ 1 ] :postBlock := LI_VALID[ fipos ]
|
||||
ENDIF
|
||||
@@ -436,7 +436,7 @@ PRIVATE str_bar := "-
|
||||
APPEND BLANK
|
||||
LI_KOLZ := EVAL( LI_RCOU, mslist )
|
||||
ELSE
|
||||
IF .NOT. SET( _SET_EXCLUSIVE )
|
||||
IF ! SET( _SET_EXCLUSIVE )
|
||||
RLOCK()
|
||||
IF NETERR()
|
||||
LOOP
|
||||
@@ -447,11 +447,11 @@ PRIVATE str_bar := "-
|
||||
varbuf := EVAL( LI_BDESHOUT, mslist, varbuf )
|
||||
ENDIF
|
||||
FIELDPUT( fipos, varbuf )
|
||||
IF .NOT. SET( _SET_EXCLUSIVE )
|
||||
IF ! SET( _SET_EXCLUSIVE )
|
||||
UNLOCK
|
||||
ENDIF
|
||||
ENDIF
|
||||
IF ( LASTKEY() == 27 .OR. .NOT. UPDATED() ) .AND. EVAL( LI_BEOF, mslist )
|
||||
IF ( LASTKEY() == 27 .OR. ! UPDATED() ) .AND. EVAL( LI_BEOF, mslist )
|
||||
SETCOLOR( LI_CLR )
|
||||
@ LI_NSTR + LI_Y1, LI_X1 + 1 CLEAR TO LI_NSTR + LI_Y1, LI_X2 - 1
|
||||
LI_NSTR --
|
||||
@@ -572,7 +572,7 @@ LOCAL i := 1, x, oldc, fif
|
||||
// DO MSFNEXT WITH mslist,fif
|
||||
DO WHILE i <= LI_NCOLUMNS .AND. fif <= LEN( LI_NAMES )
|
||||
IF LI_NAMES[ fif ] <> Nil
|
||||
@ LI_Y1, x SAY LI_NAMES[ fif ]
|
||||
@ LI_Y1, x SAY LI_NAMES[ fif ]
|
||||
ENDIF
|
||||
x := x + MAX( LEN( FLDSTR( mslist, fif ) ), LEN( LI_NAMES[ fif ] ) ) + 1
|
||||
fif := IIF( fif == LI_FREEZE, LI_NLEFT, fif + 1 )
|
||||
@@ -634,10 +634,10 @@ LOCAL x, i, shablon, sviv, fif, fldname
|
||||
fldname := SPACE( 8 )
|
||||
fif := IIF( LI_FREEZE > 0, 1, LI_NLEFT )
|
||||
IF LI_NLEFT <> LI_LEFTVISIBLE .AND. vybfld == 0
|
||||
@ nstroka, LI_X1 + 1 SAY "<"
|
||||
@ nstroka, LI_X1 + 1 SAY "<"
|
||||
ENDIF
|
||||
IF DELETED()
|
||||
@ nstroka, LI_X1 + 1 SAY "*"
|
||||
@ nstroka, LI_X1 + 1 SAY "*"
|
||||
ENDIF
|
||||
FOR i := 1 TO LI_NCOLUMNS
|
||||
IF i == LI_COLPOS
|
||||
@@ -647,7 +647,7 @@ LOCAL x, i, shablon, sviv, fif, fldname
|
||||
// DO MSFNEXT WITH mslist,fif
|
||||
sviv := FLDSTR( mslist, fif )
|
||||
sviv := IIF( LEN( sviv ) < LI_X2 - 1 - x, sviv, SUBSTR( sviv, 1, LI_X2 - 1 - x ) )
|
||||
@ nstroka, x SAY sviv
|
||||
@ nstroka, x SAY sviv
|
||||
ELSE
|
||||
sviv := FLDSTR( mslist, fif )
|
||||
sviv := IIF( LEN( sviv ) < LI_X2 - 1 - x, sviv, SUBSTR( sviv, 1, LI_X2 - 1 - x ) )
|
||||
@@ -659,9 +659,9 @@ LOCAL x, i, shablon, sviv, fif, fldname
|
||||
IF fif <= LI_COLCOUNT .AND. vybfld == 0
|
||||
IF LI_X2 - 1 - x > 0
|
||||
sviv := FLDSTR( mslist, fif )
|
||||
@ nstroka, x SAY SUBSTR( sviv, 1, LI_X2 - 1 - x )
|
||||
@ nstroka, x SAY SUBSTR( sviv, 1, LI_X2 - 1 - x )
|
||||
ENDIF
|
||||
@ nstroka, LI_X2 - 1 SAY ">"
|
||||
@ nstroka, LI_X2 - 1 SAY ">"
|
||||
ENDIF
|
||||
ENDIF
|
||||
RETURN
|
||||
|
||||
@@ -53,7 +53,7 @@ Procedure Main( cPort )
|
||||
ENDIF
|
||||
ENDDO
|
||||
|
||||
IF .not. bCont
|
||||
IF ! bCont
|
||||
EXIT
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ Procedure Main()
|
||||
setKey( K_F9 , {|| k := hb_SetKeySave( NIL ), ;
|
||||
SetKey( K_F9, {|| hb_SetKeySave( k ) } ) } )
|
||||
SetKey( K_F8 , {|| SubMain() }, {|| F8Active } )
|
||||
SetKey( K_F7 , {|| F8Active := .not. F8Active } )
|
||||
SetKey( K_F7 , {|| F8Active := ! F8Active } )
|
||||
|
||||
read
|
||||
? alpha, bravo, charlie
|
||||
|
||||
@@ -119,7 +119,7 @@ DBCreate( "test.dbf", ;
|
||||
{ "LOG", "L", 1, 0 }, ;
|
||||
{ "MEMO", "M", 10, 0 } } )
|
||||
|
||||
if .not. File( "test.dbf" )
|
||||
if ! File( "test.dbf" )
|
||||
NotifyUser( "Failed to create test.dbf" )
|
||||
endif
|
||||
|
||||
@@ -127,25 +127,25 @@ endif
|
||||
|
||||
use test.dbf new shared alias MYTEST
|
||||
|
||||
if .not. Alias() == "MYTEST"
|
||||
if ! Alias() == "MYTEST"
|
||||
NotifyUser( "Failed to open test.dbf" )
|
||||
endif
|
||||
|
||||
// TEST: RDDName()
|
||||
|
||||
if .not. RDDName() == cRDD
|
||||
if ! RDDName() == cRDD
|
||||
NotifyUser( "Failed to set RDD to " + cRDD )
|
||||
endif
|
||||
|
||||
// TEST: DBStruct()
|
||||
|
||||
if .not. CompareArray( aStruct, DBStruct() )
|
||||
if ! CompareArray( aStruct, DBStruct() )
|
||||
NotifyUser( "Resulting table structure is not what we asked for" )
|
||||
endif
|
||||
|
||||
// TEST: Header()
|
||||
|
||||
if .not. Header() == 194
|
||||
if ! Header() == 194
|
||||
NotifyUser( "Header() returned wrong size (" + LTrim( Str( Header() ) ) + " bytes)" )
|
||||
endif
|
||||
|
||||
@@ -173,7 +173,7 @@ enddo
|
||||
|
||||
// TEST: LastRec()
|
||||
|
||||
if .not. LastRec() == MAX_TEST_RECS
|
||||
if ! LastRec() == MAX_TEST_RECS
|
||||
NotifyUser( "DbAppend and/or LastRec failed" )
|
||||
endif
|
||||
|
||||
@@ -181,7 +181,7 @@ endif
|
||||
|
||||
go bottom
|
||||
|
||||
if .not. RecNo() == MAX_TEST_RECS
|
||||
if ! RecNo() == MAX_TEST_RECS
|
||||
NotifyUser( "DbGoBottom failed" )
|
||||
endif
|
||||
|
||||
@@ -189,22 +189,22 @@ endif
|
||||
|
||||
go top
|
||||
|
||||
if .not. RecNo() == 1
|
||||
if ! RecNo() == 1
|
||||
NotifyUser( "DbGoTop failed" )
|
||||
endif
|
||||
|
||||
// Now check each and every record for accuracy
|
||||
|
||||
do while .not. EOF()
|
||||
do while ! EOF()
|
||||
|
||||
// TEST: Field access
|
||||
|
||||
if .not. Trim( FIELD->CHAR ) == Chr( 65 + Val( SubStr( LTrim( Str( RecNo() ) ), 2, 1 ) ) ) + ;
|
||||
if ! Trim( FIELD->CHAR ) == Chr( 65 + Val( SubStr( LTrim( Str( RecNo() ) ), 2, 1 ) ) ) + ;
|
||||
" RECORD " + LTrim( Str( RecNo() ) ) .or. ;
|
||||
.not. FIELD->NUM == ( iif( RecNo() % 2 > 0, -1, 1 ) * RecNo() ) + ( RecNo() / 1000 ) .or. ;
|
||||
.not. FIELD->DATE == Date() + Int( FIELD->NUM ) .or. ;
|
||||
.not. FIELD->LOG == ( FIELD->NUM < 0 ) .or. ;
|
||||
.not. FIELD->MEMO == Eval( bMemoText )
|
||||
! FIELD->NUM == ( iif( RecNo() % 2 > 0, -1, 1 ) * RecNo() ) + ( RecNo() / 1000 ) .or. ;
|
||||
! FIELD->DATE == Date() + Int( FIELD->NUM ) .or. ;
|
||||
! FIELD->LOG == ( FIELD->NUM < 0 ) .or. ;
|
||||
! FIELD->MEMO == Eval( bMemoText )
|
||||
|
||||
NotifyUser( "Data in table is incorrect" )
|
||||
|
||||
@@ -223,68 +223,68 @@ index on INDEX_KEY_LOG to TESTL additive
|
||||
|
||||
// TEST: IndexOrd()
|
||||
|
||||
if .not. IndexOrd() == 4
|
||||
if ! IndexOrd() == 4
|
||||
NotifyUser( "Bad IndexOrd()" )
|
||||
endif
|
||||
|
||||
// TEST: DBOI_KEYCOUNT
|
||||
|
||||
set order to 1
|
||||
if .not. DbOrderInfo( DBOI_KEYCOUNT ) == MAX_TEST_RECS
|
||||
if ! DbOrderInfo( DBOI_KEYCOUNT ) == MAX_TEST_RECS
|
||||
NotifyUser( "Bad DBOI_KEYCOUNT/1" )
|
||||
endif
|
||||
|
||||
set order to 2
|
||||
if .not. DbOrderInfo( DBOI_KEYCOUNT ) == MAX_TEST_RECS
|
||||
if ! DbOrderInfo( DBOI_KEYCOUNT ) == MAX_TEST_RECS
|
||||
NotifyUser( "Bad DBOI_KEYCOUNT/2" )
|
||||
endif
|
||||
|
||||
set order to 3
|
||||
if .not. DbOrderInfo( DBOI_KEYCOUNT ) == MAX_TEST_RECS
|
||||
if ! DbOrderInfo( DBOI_KEYCOUNT ) == MAX_TEST_RECS
|
||||
NotifyUser( "Bad DBOI_KEYCOUNT/3" )
|
||||
endif
|
||||
|
||||
set order to 4
|
||||
if .not. DbOrderInfo( DBOI_KEYCOUNT ) == MAX_TEST_RECS
|
||||
if ! DbOrderInfo( DBOI_KEYCOUNT ) == MAX_TEST_RECS
|
||||
NotifyUser( "Bad DBOI_KEYCOUNT/4" )
|
||||
endif
|
||||
|
||||
// TEST: Character index
|
||||
set order to 1
|
||||
go top
|
||||
if .not. DbOrderInfo( DBOI_KEYVAL ) == INDEX_KEY_CHAR
|
||||
if ! DbOrderInfo( DBOI_KEYVAL ) == INDEX_KEY_CHAR
|
||||
NotifyUser( "Bad DBOI_KEYVAL (CHAR)" )
|
||||
endif
|
||||
|
||||
// TEST: Positive index key
|
||||
set order to 2
|
||||
locate for FIELD->NUM > 0
|
||||
if .not. DbOrderInfo( DBOI_KEYVAL ) == INDEX_KEY_NUM
|
||||
if ! DbOrderInfo( DBOI_KEYVAL ) == INDEX_KEY_NUM
|
||||
NotifyUser( "Bad DBOI_KEYVAL (NUM)" )
|
||||
endif
|
||||
|
||||
// TEST: Negative index key
|
||||
set order to 2
|
||||
locate for FIELD->NUM < 0
|
||||
if .not. DbOrderInfo( DBOI_KEYVAL ) == INDEX_KEY_NUM
|
||||
if ! DbOrderInfo( DBOI_KEYVAL ) == INDEX_KEY_NUM
|
||||
NotifyUser( "Bad DBOI_KEYVAL (NUM)" )
|
||||
endif
|
||||
|
||||
// TEST: Date index
|
||||
set order to 3
|
||||
go bottom
|
||||
if .not. DbOrderInfo( DBOI_KEYVAL ) == INDEX_KEY_DATE
|
||||
if ! DbOrderInfo( DBOI_KEYVAL ) == INDEX_KEY_DATE
|
||||
NotifyUser( "Bad DBOI_KEYVAL (DATE)" )
|
||||
endif
|
||||
|
||||
// TEST: Logical index
|
||||
set order to 4
|
||||
go top
|
||||
if .not. DbOrderInfo( DBOI_KEYVAL ) == INDEX_KEY_LOG
|
||||
if ! DbOrderInfo( DBOI_KEYVAL ) == INDEX_KEY_LOG
|
||||
NotifyUser( "Bad DBOI_KEYVAL (LOG/1)" )
|
||||
endif
|
||||
go bottom
|
||||
if .not. DbOrderInfo( DBOI_KEYVAL ) == INDEX_KEY_LOG
|
||||
if ! DbOrderInfo( DBOI_KEYVAL ) == INDEX_KEY_LOG
|
||||
NotifyUser( "Bad DBOI_KEYVAL (LOG/2)" )
|
||||
endif
|
||||
|
||||
@@ -294,7 +294,7 @@ set order to 0
|
||||
|
||||
set exact on
|
||||
locate for FIELD->CHAR = "J RECORD"
|
||||
if .not. EOF()
|
||||
if ! EOF()
|
||||
NotifyUser( "LOCATE with EXACT ON failed" )
|
||||
endif
|
||||
|
||||
@@ -310,7 +310,7 @@ set exact on
|
||||
set order to 0
|
||||
count for Trim( FIELD->CHAR ) = "A RECORD 1" to xTemp // Get proper count
|
||||
index on CHAR to TESTE for Trim( FIELD->CHAR ) = "A RECORD 1" additive
|
||||
if .not. DbOrderInfo( DBOI_KEYCOUNT ) == xTemp
|
||||
if ! DbOrderInfo( DBOI_KEYCOUNT ) == xTemp
|
||||
NotifyUser( "Bad conditional index count with EXACT ON" )
|
||||
endif
|
||||
|
||||
@@ -318,7 +318,7 @@ set exact off
|
||||
set order to 0
|
||||
count for Trim( FIELD->CHAR ) = "A RECORD 1" to xTemp // Get proper count
|
||||
index on CHAR to TESTE for Trim( FIELD->CHAR ) = "A RECORD 1" additive
|
||||
if .not. DbOrderInfo( DBOI_KEYCOUNT ) == xTemp
|
||||
if ! DbOrderInfo( DBOI_KEYCOUNT ) == xTemp
|
||||
NotifyUser( "Bad conditional index count with EXACT OFF" )
|
||||
endif
|
||||
|
||||
@@ -362,7 +362,7 @@ cErr := "Runtime error" + CRLF + ;
|
||||
"Call trace:" + CRLF + ;
|
||||
CRLF
|
||||
|
||||
do while .not. Empty( ProcName( ++i ) )
|
||||
do while ! Empty( ProcName( ++i ) )
|
||||
cErr += Trim( ProcName( i ) ) + "(" + Ltrim( Str( ProcLine( i ) ) ) + ")" + CRLF
|
||||
enddo
|
||||
|
||||
@@ -375,7 +375,7 @@ static function CompareArray( a1, a2 )
|
||||
|
||||
local i, j
|
||||
|
||||
if .not. Len( a1 ) == Len( a2 )
|
||||
if ! Len( a1 ) == Len( a2 )
|
||||
return .f.
|
||||
endif
|
||||
|
||||
@@ -383,7 +383,7 @@ for i := 1 to Len( a1 )
|
||||
|
||||
for j := 1 to Len( a1[i] )
|
||||
|
||||
if .not. a1[i,j] == a2[i,j]
|
||||
if ! a1[i,j] == a2[i,j]
|
||||
return .f.
|
||||
endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user