2013-02-26 14:41 UTC+0100 Viktor Szakats (harbour syenar.net)
* utils/hbmk2/hbmk2.*.po
* utils/hbmk2/hbmk2.prg
+ do not share plugin variables (hbmk[ "vars" ])
between different plugins. It avoids potentially nasty
issues with plugins stepping onto each other's toes.
[INCOMPATIBLE - though it's unlikely anyone is
affected. If you must communicate between plugins,
use public function or variable.]
+ clarified in help that -icon might not work on all
platforms/compilers and detailed Windows implementation
(in particular it's disabled on bcc/bcc64 and on
mingw it won't work when a manual .rc is specified,
also on some (old?) msvc versions. Consult your
C compiler's Windows resource handling limitations.)
+ clarified in help the syntax of filters
+ clarified in help that .hbp references are handled as
sub-projects
+ clarification to command substitution macro
+ clarification to filter syntax note
! strict parameter checks in all public shell APIs to
avoid RTEs inside hbmk2 due to faulty API usage by scripts
* utils/hbmk2/examples/plug_bis.hb
* updated according to latest plugin changes
* include/harbour.hbx
* include/hbapi.h
* src/vm/debug.c
* src/vm/hvm.c
+ added internal function hb_vmInternalsEnabled()
to query whether potentially sensitive internals
are allowed to be accessed by public Harbour APIs
+ added .prg level function __vmNoInternals()
to disable potentially sensitive internals
by default accessible via public APIs.
Intentionally a one-way function: once disabled,
it cannot be reenabled from .prg or .c level.
NOTE: It will break Harbour debug functionality,
so it'd will be useful for hbrun scripts and
release (non-debug) builds.
+ modified internal __dbg*() functions to return
dummy values when internals are disabled via
__vmNoInternals() functions. While the function
return types are kept, apps relying on their
specific values and certain relationships between
them might break.
; NOTE: In the future, some more internals might
be protected by this setting (f.e. low-level
object and class functions and some API from
hbdebug lib)
; Please review
* tests/debugtst.prg
! fixed to compile warning-free without lowering
warning level
! fixed to run RTE-free with internals disabled
* bin/3rdpatch.hb
* bin/commit.hb
* config/postinst.hb
* contrib/make.hb
* contrib/hbtest/hbtest.ch
* src/debug/*.prg
* src/rtl/tclass.prg
* utils/hbmk2/examples/plug_bis.hb
* utils/hbmk2/examples/plug_tpl.hb
* use short form #pragmas (the ones identical
to Harbour options)
; NOTE: Except -l which works reversed compared
to cmdline -l option. TOFIX? (I tried and failed)
* src/rtl/hbi18n2.prg
* contrib/xhb/tfile.prg
* use F_ERROR instead of -1 literal
* contrib/xhb/xhbtedit.prg
! replaced dirty xhb extension with std SubStr() call
Reported by Tony Quick
[pls report such bugs on Harbour devl list]
* contrib/hbodbc/todbc.prg
! Don't continue ::Open() when SQLExecDir() have error
Fix from xhb via Vicente Guerra, with cleanups.
* tests/multifnc/multifnc.hbp
+ added comment
+ support for watcom
* tests/multifnc/t1.prg
! missing file ending EOL
* tests/*.prg
* extras/gtwvw/tests/wvwtest9.prg
* formatting
This commit is contained in:
@@ -10,6 +10,102 @@
|
||||
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
|
||||
*/
|
||||
|
||||
2013-02-26 14:41 UTC+0100 Viktor Szakats (harbour syenar.net)
|
||||
* utils/hbmk2/hbmk2.*.po
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
+ do not share plugin variables (hbmk[ "vars" ])
|
||||
between different plugins. It avoids potentially nasty
|
||||
issues with plugins stepping onto each other's toes.
|
||||
[INCOMPATIBLE - though it's unlikely anyone is
|
||||
affected. If you must communicate between plugins,
|
||||
use public function or variable.]
|
||||
+ clarified in help that -icon might not work on all
|
||||
platforms/compilers and detailed Windows implementation
|
||||
(in particular it's disabled on bcc/bcc64 and on
|
||||
mingw it won't work when a manual .rc is specified,
|
||||
also on some (old?) msvc versions. Consult your
|
||||
C compiler's Windows resource handling limitations.)
|
||||
+ clarified in help the syntax of filters
|
||||
+ clarified in help that .hbp references are handled as
|
||||
sub-projects
|
||||
+ clarification to command substitution macro
|
||||
+ clarification to filter syntax note
|
||||
! strict parameter checks in all public shell APIs to
|
||||
avoid RTEs inside hbmk2 due to faulty API usage by scripts
|
||||
|
||||
* utils/hbmk2/examples/plug_bis.hb
|
||||
* updated according to latest plugin changes
|
||||
|
||||
* include/harbour.hbx
|
||||
* include/hbapi.h
|
||||
* src/vm/debug.c
|
||||
* src/vm/hvm.c
|
||||
+ added internal function hb_vmInternalsEnabled()
|
||||
to query whether potentially sensitive internals
|
||||
are allowed to be accessed by public Harbour APIs
|
||||
+ added .prg level function __vmNoInternals()
|
||||
to disable potentially sensitive internals
|
||||
by default accessible via public APIs.
|
||||
Intentionally a one-way function: once disabled,
|
||||
it cannot be reenabled from .prg or .c level.
|
||||
NOTE: It will break Harbour debug functionality,
|
||||
so it'd will be useful for hbrun scripts and
|
||||
release (non-debug) builds.
|
||||
+ modified internal __dbg*() functions to return
|
||||
dummy values when internals are disabled via
|
||||
__vmNoInternals() functions. While the function
|
||||
return types are kept, apps relying on their
|
||||
specific values and certain relationships between
|
||||
them might break.
|
||||
; NOTE: In the future, some more internals might
|
||||
be protected by this setting (f.e. low-level
|
||||
object and class functions and some API from
|
||||
hbdebug lib)
|
||||
; Please review
|
||||
|
||||
* tests/debugtst.prg
|
||||
! fixed to compile warning-free without lowering
|
||||
warning level
|
||||
! fixed to run RTE-free with internals disabled
|
||||
|
||||
* bin/3rdpatch.hb
|
||||
* bin/commit.hb
|
||||
* config/postinst.hb
|
||||
* contrib/make.hb
|
||||
* contrib/hbtest/hbtest.ch
|
||||
* src/debug/*.prg
|
||||
* src/rtl/tclass.prg
|
||||
* utils/hbmk2/examples/plug_bis.hb
|
||||
* utils/hbmk2/examples/plug_tpl.hb
|
||||
* use short form #pragmas (the ones identical
|
||||
to Harbour options)
|
||||
; NOTE: Except -l which works reversed compared
|
||||
to cmdline -l option. TOFIX? (I tried and failed)
|
||||
|
||||
* src/rtl/hbi18n2.prg
|
||||
* contrib/xhb/tfile.prg
|
||||
* use F_ERROR instead of -1 literal
|
||||
|
||||
* contrib/xhb/xhbtedit.prg
|
||||
! replaced dirty xhb extension with std SubStr() call
|
||||
Reported by Tony Quick
|
||||
[pls report such bugs on Harbour devl list]
|
||||
|
||||
* contrib/hbodbc/todbc.prg
|
||||
! Don't continue ::Open() when SQLExecDir() have error
|
||||
Fix from xhb via Vicente Guerra, with cleanups.
|
||||
|
||||
* tests/multifnc/multifnc.hbp
|
||||
+ added comment
|
||||
+ support for watcom
|
||||
|
||||
* tests/multifnc/t1.prg
|
||||
! missing file ending EOL
|
||||
|
||||
* tests/*.prg
|
||||
* extras/gtwvw/tests/wvwtest9.prg
|
||||
* formatting
|
||||
|
||||
2013-02-25 17:56 UTC+0100 Viktor Szakats (harbour syenar.net)
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
+ documented hbmk2 plugin API calls
|
||||
|
||||
@@ -213,7 +213,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma warninglevel=3
|
||||
#pragma -w3
|
||||
#pragma -km+
|
||||
#pragma -ko+
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#define _CONFIGFIL_ ".hbcommit"
|
||||
#define _CONFIGENV_ "HBCOMMIT_USER"
|
||||
|
||||
#pragma warninglevel=3
|
||||
#pragma -w3
|
||||
#pragma -km+
|
||||
#pragma -ko+
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
* See COPYING.txt for licensing terms.
|
||||
*/
|
||||
|
||||
#pragma warninglevel=3
|
||||
#pragma -w3
|
||||
#pragma -km+
|
||||
#pragma -ko+
|
||||
|
||||
|
||||
@@ -51,11 +51,11 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* A simple RDD which uses HB_F*() functions from MISC library
|
||||
* A simple RDD which uses hb_F*() functions from MISC library
|
||||
* to access CSV files. It allow to open an CSV file and navigate
|
||||
* using SKIP()/GOTO()/GOTOP()/GOBOTTOM() functions using
|
||||
* using Skip()/Goto()/GoTop()/GoBottom() functions using
|
||||
* Bof()/Eof()/RecNo()/LastRec() to check current state.
|
||||
* HB_F*() functions does not support single field access and allow
|
||||
* hb_F*() functions does not support single field access and allow
|
||||
* to read only the whole line. This RDD also. I only added one
|
||||
* virtual field which exist in all tables open by this RDD called
|
||||
* LINE which contains the current .csv file line.
|
||||
@@ -77,8 +77,8 @@ STATIC FUNCTION FCM_INIT( nRDD )
|
||||
|
||||
LOCAL aRData := Array( 10 )
|
||||
|
||||
/* Set in our private RDD ITEM the array with HB_F*() work are numbers */
|
||||
AFill( aRData, -1 )
|
||||
/* Set in our private RDD ITEM the array with hb_F*() work are numbers */
|
||||
AFill( aRData, F_ERROR )
|
||||
USRRDD_RDDDATA( nRDD, aRData )
|
||||
|
||||
RETURN HB_SUCCESS
|
||||
@@ -96,7 +96,7 @@ STATIC FUNCTION FCM_NEW( pWA )
|
||||
|
||||
/*
|
||||
* Set in our private AREA item the array with slot number and
|
||||
* BOF/EOF flags. There is no BOF support in HB_F* function so
|
||||
* BOF/EOF flags. There is no BOF support in hb_F* function so
|
||||
* we have to emulate it and there is no phantom record so we
|
||||
* cannot return EOF flag directly.
|
||||
*/
|
||||
@@ -135,7 +135,7 @@ STATIC FUNCTION FCM_OPEN( nWA, aOpenInfo )
|
||||
|
||||
aRData := USRRDD_RDDDATA( USRRDD_ID( nWA ) )
|
||||
aWData := USRRDD_AREADATA( nWA )
|
||||
nSlot := AScan( aRData, -1 )
|
||||
nSlot := AScan( aRData, F_ERROR )
|
||||
|
||||
IF nSlot == 0
|
||||
oError := ErrorNew()
|
||||
@@ -150,7 +150,7 @@ STATIC FUNCTION FCM_OPEN( nWA, aOpenInfo )
|
||||
|
||||
hb_FSelect( nSlot )
|
||||
nHandle := hb_FUse( aOpenInfo[ UR_OI_NAME ], nMode )
|
||||
IF nHandle == -1
|
||||
IF nHandle == F_ERROR
|
||||
oError := ErrorNew()
|
||||
oError:GenCode := EG_OPEN
|
||||
oError:SubCode := 1001
|
||||
@@ -193,7 +193,7 @@ STATIC FUNCTION FCM_CLOSE( nWA )
|
||||
hb_FSelect( nSlot )
|
||||
hb_FUse()
|
||||
aRData := USRRDD_RDDDATA( USRRDD_ID( nWA ) )
|
||||
aRData[ nSlot ] := -1
|
||||
aRData[ nSlot ] := F_ERROR
|
||||
ENDIF
|
||||
|
||||
RETURN UR_SUPER_CLOSE( nWA )
|
||||
@@ -226,7 +226,7 @@ STATIC FUNCTION FCM_GOTO( nWA, nRecord )
|
||||
hb_FGoTop()
|
||||
aWData[ 2 ] := aWData[ 3 ] := hb_FEof()
|
||||
ELSE
|
||||
hb_FSkip( 0 ) /* Clear the EOF flag inside HB_F* engin
|
||||
hb_FSkip( 0 ) /* Clear the EOF flag inside hb_F* engin
|
||||
- it's not done automatically in hb_FGoBottom() :-( */
|
||||
hb_FGoto( nRecord )
|
||||
aWData[ 2 ] := hb_FRecNo() == 0
|
||||
@@ -256,7 +256,7 @@ STATIC FUNCTION FCM_GOBOTTOM( nWA )
|
||||
IF hb_FLastRec() == 0
|
||||
aWData[ 2 ] := aWData[ 3 ] := .T.
|
||||
ELSE
|
||||
hb_FSkip( 0 ) /* Clear the EOF flag inside HB_F* engin
|
||||
hb_FSkip( 0 ) /* Clear the EOF flag inside hb_F* engin
|
||||
- it's not done automatically in hb_FGoBottom() :-( */
|
||||
hb_FGoBottom()
|
||||
aWData[ 2 ] := aWData[ 3 ] := .F.
|
||||
|
||||
@@ -299,7 +299,9 @@ METHOD Open() CLASS TODBC
|
||||
|
||||
// Allocates and executes the statement
|
||||
SQLAllocStmt( ::hDbc, @::hStmt )
|
||||
nRet := SQLExecDirect( ::hStmt, ::cSQL )
|
||||
IF ( nRet := SQLExecDirect( ::hStmt, ::cSQL ) ) != SQL_SUCCESS
|
||||
EXIT
|
||||
ENDIF
|
||||
|
||||
// Get result information about fields and stores it
|
||||
// on Fields collection
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma warninglevel=3
|
||||
#pragma -w3
|
||||
#pragma -km+
|
||||
#pragma -ko+
|
||||
|
||||
|
||||
@@ -190,7 +190,7 @@ METHOD Create( nAttr ) CLASS TCgiFile
|
||||
nSuccess := FCreate( ::Name, nAttr )
|
||||
::Handle := nSuccess
|
||||
|
||||
RETURN nSuccess != -1
|
||||
RETURN nSuccess != F_ERROR
|
||||
|
||||
/*
|
||||
** ::Size() --> nFileSize
|
||||
@@ -278,7 +278,7 @@ METHOD Readline( nSize ) CLASS TCgiFile
|
||||
RETURN ::Buffer
|
||||
|
||||
/*
|
||||
** ::ReadByte() --> nByte or -1 if unsuccessfull
|
||||
** ::ReadByte() --> nByte or -1 if unsuccessfull
|
||||
*/
|
||||
|
||||
METHOD ReadByte() CLASS TCgiFile
|
||||
@@ -304,7 +304,7 @@ METHOD ReadInt() CLASS TCgiFile
|
||||
RETURN iif( nBytes > 0, Bin2I( cBuff ), -1 )
|
||||
|
||||
/*
|
||||
** ::ReadLong() --> nLong or -1 if unsuccessfull
|
||||
** ::ReadLong() --> nLong or -1 if unsuccessfull
|
||||
*/
|
||||
|
||||
METHOD ReadLong() CLASS TCgiFile
|
||||
|
||||
@@ -2051,7 +2051,7 @@ STATIC FUNCTION GetParagraph( oSelf, nRow )
|
||||
LOCAL cLine := ""
|
||||
|
||||
DO WHILE oSelf:aText[ nRow ]:lSoftCR
|
||||
cLine := cline + oSelf:aText[ nRow ]:cText
|
||||
cLine += oSelf:aText[ nRow ]:cText
|
||||
// I don't need to increment nRow since I'm removing lines, ie line n is
|
||||
// a different line each time I add it to cLine
|
||||
oSelf:RemoveLine( nRow )
|
||||
@@ -2150,7 +2150,7 @@ METHOD SplitLine( nRow ) CLASS XHBEditor
|
||||
|
||||
// Split line at fist space before current position
|
||||
//
|
||||
DO WHILE nFirstSpace > 1 .AND. !( cLine[ nFirstSpace ] == " " )
|
||||
DO WHILE nFirstSpace > 1 .AND. !( SubStr( cLine, nFirstSpace, 1 ) == " " )
|
||||
nFirstSpace--
|
||||
ENDDO
|
||||
|
||||
|
||||
@@ -674,7 +674,7 @@ FUNCTION VXBscroller( oBrowse, nWinNum, XBid, XBmsg )
|
||||
LOCAL lNeedStabilize
|
||||
|
||||
// if we can't handle non topmost window we must return right away
|
||||
// if nWinNum != wvw_nNumWindows()-1 ; return ; endif
|
||||
// IF nWinNum != wvw_nNumWindows() - 1 ; RETURN ; ENDIF
|
||||
|
||||
nOldWin := wvw_nSetCurWindow( nWinNum )
|
||||
|
||||
@@ -719,7 +719,7 @@ FUNCTION HXBscroller( oBrowse, nWinNum, XBid, XBmsg )
|
||||
LOCAL lNeedStabilize
|
||||
|
||||
// if we can't handle non topmost window we must return right away
|
||||
// if nWinNum != wvw_nNumWindows()-1 ; return ; endif
|
||||
// IF nWinNum != wvw_nNumWindows() - 1 ; RETURN ; ENDIF
|
||||
|
||||
nOldWin := wvw_nSetCurWindow( nWinNum )
|
||||
|
||||
@@ -758,10 +758,10 @@ FUNCTION HXBscroller( oBrowse, nWinNum, XBid, XBmsg )
|
||||
/**
|
||||
20040704 notes:
|
||||
|
||||
0 <= nPage <= (nMax - nMin + 1)
|
||||
0 <= nPage <= ( nMax - nMin + 1 )
|
||||
nPage :: pagesize
|
||||
|
||||
nMin <= nPos <= (nMax - Max(nPage-1, 0))
|
||||
nMin <= nPos <= ( nMax - Max( nPage - 1, 0 ) )
|
||||
**/
|
||||
|
||||
STATIC FUNCTION RefreshVXB( oBrowse, nWinNum, XBid )
|
||||
|
||||
@@ -1490,6 +1490,7 @@ DYNAMIC __TextSave
|
||||
DYNAMIC __TracePrgCalls
|
||||
DYNAMIC __TypeFile
|
||||
DYNAMIC __vmItemID
|
||||
DYNAMIC __vmNoInternals
|
||||
DYNAMIC __Wait
|
||||
DYNAMIC __wapi_GetACP
|
||||
DYNAMIC __wapi_GetOEMCP
|
||||
|
||||
@@ -1156,6 +1156,7 @@ extern void * hb_i18n_alloc( void * cargo );
|
||||
|
||||
extern HB_EXPORT void hb_vmSetLinkedMain( const char * szMain );
|
||||
extern HB_EXPORT void hb_vmSetDefaultGT( const char * szGtName );
|
||||
extern HB_EXPORT HB_BOOL hb_vmInternalsEnabled( void );
|
||||
|
||||
extern HB_EXPORT PHB_FUNC hb_vmProcAddress( const char * szFuncName );
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma DEBUGINFO=OFF
|
||||
#pragma -b-
|
||||
|
||||
#define HB_CLS_NOTOBJECT /* do not inherit from HBObject calss */
|
||||
#include "hbclass.ch"
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma DEBUGINFO=OFF
|
||||
#pragma -b-
|
||||
|
||||
/* NOTE: Don't use SAY/DevOut()/DevPos() for screen output, otherwise
|
||||
the debugger output may interfere with the applications output
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma DEBUGINFO=OFF
|
||||
#pragma -b-
|
||||
|
||||
#xcommand MENU [<oMenu>] => [ <oMenu> := ] HBDbMenu():New()
|
||||
#xcommand MENUITEM [ <oMenuItem> PROMPT ] <cPrompt> ;
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma DEBUGINFO=OFF
|
||||
#pragma -b-
|
||||
|
||||
#define HB_CLS_NOTOBJECT /* do not inherit from HBObject calss */
|
||||
#include "hbclass.ch"
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma DEBUGINFO=OFF
|
||||
#pragma -b-
|
||||
|
||||
#define HB_CLS_NOTOBJECT /* do not inherit from HBObject calss */
|
||||
#include "hbclass.ch"
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma DEBUGINFO=OFF
|
||||
#pragma -b-
|
||||
|
||||
#define HB_CLS_NOTOBJECT /* do not inherit from HBObject calss */
|
||||
#include "hbclass.ch"
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
the debugger output may interfere with the applications output
|
||||
redirection, and is also slower. [vszakats] */
|
||||
|
||||
#pragma DEBUGINFO=OFF
|
||||
#pragma -b-
|
||||
|
||||
#define HB_CLS_NOTOBJECT /* do not inherit from HBObject calss */
|
||||
#include "hbclass.ch"
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
the debugger output may interfere with the applications output
|
||||
redirection, and is also slower. [vszakats] */
|
||||
|
||||
#pragma DEBUGINFO=OFF
|
||||
#pragma -b-
|
||||
|
||||
#define HB_CLS_NOTOBJECT /* do not inherit from HBObject calss */
|
||||
#include "hbclass.ch"
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma DEBUGINFO=OFF
|
||||
#pragma -b-
|
||||
|
||||
#define HB_CLS_NOTOBJECT /* do not inherit from HBObject calss */
|
||||
#include "hbclass.ch"
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
the debugger output may interfere with the applications output
|
||||
redirection, and is also slower. [vszakats] */
|
||||
|
||||
#pragma DEBUGINFO=OFF
|
||||
#pragma -b-
|
||||
|
||||
#define HB_CLS_NOTOBJECT /* do not inherit from HBObject calss */
|
||||
#include "hbclass.ch"
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma DEBUGINFO=OFF
|
||||
#pragma -b-
|
||||
|
||||
#include "box.ch"
|
||||
#include "setcurs.ch"
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
the debugger output may interfere with the applications output
|
||||
redirection, and is also slower. [vszakats] */
|
||||
|
||||
#pragma DEBUGINFO=OFF
|
||||
#pragma -b-
|
||||
|
||||
#define HB_CLS_NOTOBJECT /* do not inherit from HBObject calss */
|
||||
#include "hbclass.ch"
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma DEBUGINFO=OFF
|
||||
#pragma -b-
|
||||
|
||||
#define HB_CLS_NOTOBJECT /* do not inherit from HBObject calss */
|
||||
#include "hbclass.ch"
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
#define LEFTEQUAL( l, r ) ( Left( l, Len( r ) ) == r )
|
||||
|
||||
STATIC FUNCTION __I18N_fileName( cFileName )
|
||||
STATIC FUNCTION __i18n_fileName( cFileName )
|
||||
|
||||
IF Set( _SET_DEFEXTENSIONS )
|
||||
cFileName := hb_FNameExtSetDef( cFileName, ".pot" )
|
||||
@@ -74,11 +74,11 @@ STATIC FUNCTION __I18N_fileName( cFileName )
|
||||
|
||||
RETURN cFileName
|
||||
|
||||
STATIC FUNCTION __I18N_strEncode( cStr )
|
||||
STATIC FUNCTION __i18n_strEncode( cStr )
|
||||
|
||||
RETURN SubStr( hb_StrToExp( cStr, .T. ), 2 )
|
||||
|
||||
STATIC FUNCTION __I18N_strDecode( cLine, cValue, lCont )
|
||||
STATIC FUNCTION __i18n_strDecode( cLine, cValue, lCont )
|
||||
|
||||
LOCAL lRet := .F.
|
||||
LOCAL cText
|
||||
@@ -106,9 +106,9 @@ FUNCTION __i18n_potArrayLoad( cFile, cErrorMsg )
|
||||
LOCAL lCont
|
||||
LOCAL hFile
|
||||
|
||||
__I18N_fileName( @cFile )
|
||||
__i18n_fileName( @cFile )
|
||||
hFile := FOpen( cFile, FO_READ )
|
||||
IF hFile == -1
|
||||
IF hFile == F_ERROR
|
||||
cErrorMsg := "cannot open file: " + cFile
|
||||
RETURN NIL
|
||||
ENDIF
|
||||
@@ -265,7 +265,7 @@ FUNCTION __i18n_potArrayLoad( cFile, cErrorMsg )
|
||||
IF ( nMode != _I18N_CONTEXT .AND. ;
|
||||
nMode != _I18N_MSGID .AND. ;
|
||||
nMode != _I18N_MSGSTR ) .OR. ;
|
||||
! __I18N_strDecode( cLine, @cValue, @lCont )
|
||||
! __i18n_strDecode( cLine, @cValue, @lCont )
|
||||
cErrorMsg := "unrecognized line"
|
||||
EXIT
|
||||
ENDIF
|
||||
@@ -343,7 +343,7 @@ FUNCTION __i18n_potArraySave( cFile, aTrans, cErrorMsg, lVersionNo, lSourceRef )
|
||||
cPOT += cFlg
|
||||
IF ! aItem[ _I18N_CONTEXT ] == ""
|
||||
cPOT += "msgctxt "
|
||||
cPOT += __I18N_strEncode( aItem[ _I18N_CONTEXT ] )
|
||||
cPOT += __i18n_strEncode( aItem[ _I18N_CONTEXT ] )
|
||||
cPOT += cEol
|
||||
ENDIF
|
||||
FOR EACH msg IN aItem[ _I18N_MSGID ]
|
||||
@@ -354,7 +354,7 @@ FUNCTION __i18n_potArraySave( cFile, aTrans, cErrorMsg, lVersionNo, lSourceRef )
|
||||
ELSE
|
||||
cPOT += "msgid_plural" + hb_ntos( msg:__enumIndex() - 1 ) + " "
|
||||
ENDIF
|
||||
cPOT += __I18N_strEncode( msg )
|
||||
cPOT += __i18n_strEncode( msg )
|
||||
cPOT += cEol
|
||||
NEXT
|
||||
lPlural := aItem[ _I18N_PLURAL ] .OR. Len( aItem[ _I18N_MSGSTR ] ) > 1
|
||||
@@ -364,14 +364,14 @@ FUNCTION __i18n_potArraySave( cFile, aTrans, cErrorMsg, lVersionNo, lSourceRef )
|
||||
ELSE
|
||||
cPOT += "msgstr "
|
||||
ENDIF
|
||||
cPOT += __I18N_strEncode( msg )
|
||||
cPOT += __i18n_strEncode( msg )
|
||||
cPOT += cEol
|
||||
NEXT
|
||||
NEXT
|
||||
|
||||
__I18N_fileName( @cFile )
|
||||
__i18n_fileName( @cFile )
|
||||
hFile := FCreate( cFile )
|
||||
IF hFile == -1
|
||||
IF hFile == F_ERROR
|
||||
cErrorMsg := "cannot create translation file: " + cFile
|
||||
ELSEIF FWrite( hFile, cPOT ) != hb_BLen( cPOT )
|
||||
cErrorMsg := "cannot write to file: " + cFile
|
||||
@@ -560,34 +560,34 @@ FUNCTION hb_i18n_SavePOT( cFile, pI18N, cErrorMsg )
|
||||
"#" + cEol
|
||||
FOR EACH context IN hI18N[ "CONTEXT" ]
|
||||
msgctxt := iif( context:__enumKey() == "", NIL, ;
|
||||
"msgctxt " + __I18N_strEncode( context:__enumKey() ) + cEol )
|
||||
"msgctxt " + __i18n_strEncode( context:__enumKey() ) + cEol )
|
||||
FOR EACH trans IN context
|
||||
cPOT += cEol + cFlg
|
||||
IF msgctxt != NIL
|
||||
cPOT += msgctxt
|
||||
ENDIF
|
||||
cPOT += "msgid "
|
||||
cPOT += __I18N_strEncode( trans:__enumKey() )
|
||||
cPOT += __i18n_strEncode( trans:__enumKey() )
|
||||
cPOT += cEol
|
||||
IF HB_ISARRAY( trans )
|
||||
FOR EACH msgstr IN trans
|
||||
cPOT += "msgstr["
|
||||
cPOT += hb_ntos( msgstr:__enumIndex() - 1 )
|
||||
cPOT += "] "
|
||||
cPOT += __I18N_strEncode( msgstr )
|
||||
cPOT += __i18n_strEncode( msgstr )
|
||||
cPOT += cEol
|
||||
NEXT
|
||||
ELSE
|
||||
cPOT += "msgstr "
|
||||
cPOT += __I18N_strEncode( trans )
|
||||
cPOT += __i18n_strEncode( trans )
|
||||
cPOT += cEol
|
||||
ENDIF
|
||||
NEXT
|
||||
NEXT
|
||||
|
||||
__I18N_fileName( @cFile )
|
||||
__i18n_fileName( @cFile )
|
||||
hFile := FCreate( cFile )
|
||||
IF hFile == -1
|
||||
IF hFile == F_ERROR
|
||||
cErrorMsg := "cannot create translation file: " + cFile
|
||||
lRet := .F.
|
||||
ELSEIF FWrite( hFile, cPOT ) != hb_BLen( cPOT )
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
/* NOTE: This .prg is also used by the debugger subsystem,
|
||||
therefore we need this switch to avoid an infinite
|
||||
loop when launching it. [vszakats] */
|
||||
#pragma DEBUGINFO=OFF
|
||||
#pragma -b-
|
||||
|
||||
/* Harbour Class HBClass to build classes */
|
||||
|
||||
|
||||
@@ -137,7 +137,10 @@ static void AddToArray( PHB_ITEM pItem, PHB_ITEM pReturn, HB_SIZE nPos )
|
||||
* $End$ */
|
||||
HB_FUNC( __DBGVMSTKGCOUNT )
|
||||
{
|
||||
hb_retns( hb_stackTopOffset() );
|
||||
if( hb_vmInternalsEnabled() )
|
||||
hb_retns( hb_stackTopOffset() );
|
||||
else
|
||||
hb_retns( 0 );
|
||||
}
|
||||
|
||||
/* $Doc$
|
||||
@@ -146,16 +149,21 @@ HB_FUNC( __DBGVMSTKGCOUNT )
|
||||
* $End$ */
|
||||
HB_FUNC( __DBGVMSTKGLIST )
|
||||
{
|
||||
PHB_ITEM pReturn;
|
||||
HB_ISIZ nLen = hb_stackTopOffset();
|
||||
HB_ISIZ nPos;
|
||||
if( hb_vmInternalsEnabled() )
|
||||
{
|
||||
PHB_ITEM pReturn;
|
||||
HB_ISIZ nLen = hb_stackTopOffset();
|
||||
HB_ISIZ nPos;
|
||||
|
||||
pReturn = hb_itemArrayNew( nLen ); /* Create a transfer array */
|
||||
pReturn = hb_itemArrayNew( nLen ); /* Create a transfer array */
|
||||
|
||||
for( nPos = 0; nPos < nLen; ++nPos )
|
||||
AddToArray( hb_stackItem( nPos ), pReturn, nPos + 1 );
|
||||
for( nPos = 0; nPos < nLen; ++nPos )
|
||||
AddToArray( hb_stackItem( nPos ), pReturn, nPos + 1 );
|
||||
|
||||
hb_itemReturnRelease( pReturn );
|
||||
hb_itemReturnRelease( pReturn );
|
||||
}
|
||||
else
|
||||
hb_reta( 0 );
|
||||
}
|
||||
|
||||
/* $Doc$
|
||||
@@ -189,7 +197,10 @@ static HB_ISIZ hb_stackLen( int iLevel )
|
||||
* $End$ */
|
||||
HB_FUNC( __DBGVMSTKLCOUNT )
|
||||
{
|
||||
hb_retns( hb_stackLen( hb_parni( 1 ) + 1 ) );
|
||||
if( hb_vmInternalsEnabled() )
|
||||
hb_retns( hb_stackLen( hb_parni( 1 ) + 1 ) );
|
||||
else
|
||||
hb_retns( 0 );
|
||||
}
|
||||
|
||||
/* $Doc$
|
||||
@@ -205,55 +216,68 @@ HB_FUNC( __DBGVMSTKLCOUNT )
|
||||
* $End$ */
|
||||
HB_FUNC( __DBGVMSTKLLIST )
|
||||
{
|
||||
PHB_ITEM pReturn;
|
||||
HB_ISIZ nLen, n;
|
||||
HB_ISIZ nBaseOffset, nPrevOffset;
|
||||
if( hb_vmInternalsEnabled() )
|
||||
{
|
||||
PHB_ITEM pReturn;
|
||||
HB_ISIZ nLen, n;
|
||||
HB_ISIZ nBaseOffset, nPrevOffset;
|
||||
|
||||
nBaseOffset = hb_stackBaseOffset();
|
||||
nPrevOffset = hb_stackItem( nBaseOffset - 1 )->item.asSymbol.stackstate->nBaseItem;
|
||||
nBaseOffset = hb_stackBaseOffset();
|
||||
nPrevOffset = hb_stackItem( nBaseOffset - 1 )->item.asSymbol.stackstate->nBaseItem;
|
||||
|
||||
nLen = nBaseOffset - nPrevOffset - 3;
|
||||
pReturn = hb_itemArrayNew( nLen ); /* Create a transfer array */
|
||||
for( n = 0; n < nLen; ++n )
|
||||
AddToArray( hb_stackItem( nPrevOffset + n ), pReturn, n + 1 );
|
||||
nLen = nBaseOffset - nPrevOffset - 3;
|
||||
pReturn = hb_itemArrayNew( nLen ); /* Create a transfer array */
|
||||
for( n = 0; n < nLen; ++n )
|
||||
AddToArray( hb_stackItem( nPrevOffset + n ), pReturn, n + 1 );
|
||||
|
||||
hb_itemReturnRelease( pReturn );
|
||||
hb_itemReturnRelease( pReturn );
|
||||
}
|
||||
else
|
||||
hb_reta( 0 );
|
||||
}
|
||||
|
||||
HB_FUNC( __DBGVMLOCALLIST )
|
||||
{
|
||||
PHB_ITEM pArray;
|
||||
HB_ISIZ nBaseOffset, nPrevOffset, nLen, n;
|
||||
int iLevel = hb_parni( 1 ) + 1;
|
||||
|
||||
nBaseOffset = hb_stackBaseOffset();
|
||||
while( --iLevel > 0 && nBaseOffset > 1 )
|
||||
nBaseOffset = hb_stackItem( nBaseOffset - 1 )->item.asSymbol.stackstate->nBaseItem + 1;
|
||||
|
||||
if( nBaseOffset > 1 )
|
||||
if( hb_vmInternalsEnabled() )
|
||||
{
|
||||
PHB_ITEM pSymItm;
|
||||
PHB_ITEM pArray;
|
||||
HB_ISIZ nBaseOffset, nPrevOffset, nLen, n;
|
||||
int iLevel = hb_parni( 1 ) + 1;
|
||||
|
||||
nPrevOffset = hb_stackItem( nBaseOffset - 1 )->item.asSymbol.stackstate->nBaseItem;
|
||||
pSymItm = hb_stackItem( nPrevOffset );
|
||||
nPrevOffset += HB_MAX( pSymItm->item.asSymbol.paramdeclcnt,
|
||||
pSymItm->item.asSymbol.paramcnt ) + 1;
|
||||
nLen = nBaseOffset - nPrevOffset - 2;
|
||||
nBaseOffset = hb_stackBaseOffset();
|
||||
while( --iLevel > 0 && nBaseOffset > 1 )
|
||||
nBaseOffset = hb_stackItem( nBaseOffset - 1 )->item.asSymbol.stackstate->nBaseItem + 1;
|
||||
|
||||
if( nBaseOffset > 1 )
|
||||
{
|
||||
PHB_ITEM pSymItm;
|
||||
|
||||
nPrevOffset = hb_stackItem( nBaseOffset - 1 )->item.asSymbol.stackstate->nBaseItem;
|
||||
pSymItm = hb_stackItem( nPrevOffset );
|
||||
nPrevOffset += HB_MAX( pSymItm->item.asSymbol.paramdeclcnt,
|
||||
pSymItm->item.asSymbol.paramcnt ) + 1;
|
||||
nLen = nBaseOffset - nPrevOffset - 2;
|
||||
}
|
||||
else
|
||||
nLen = nPrevOffset = 0;
|
||||
|
||||
pArray = hb_itemArrayNew( nLen );
|
||||
for( n = 1; n <= nLen; ++n )
|
||||
hb_itemCopyFromRef( hb_arrayGetItemPtr( pArray, n ),
|
||||
hb_stackItem( nPrevOffset + n ) );
|
||||
|
||||
hb_itemReturnRelease( pArray );
|
||||
}
|
||||
else
|
||||
nLen = nPrevOffset = 0;
|
||||
|
||||
pArray = hb_itemArrayNew( nLen );
|
||||
for( n = 1; n <= nLen; ++n )
|
||||
hb_itemCopyFromRef( hb_arrayGetItemPtr( pArray, n ),
|
||||
hb_stackItem( nPrevOffset + n ) );
|
||||
|
||||
hb_itemReturnRelease( pArray );
|
||||
hb_reta( 0 );
|
||||
}
|
||||
|
||||
HB_FUNC( __DBGVMPARLLIST )
|
||||
{
|
||||
hb_itemReturnRelease( hb_arrayFromParams( hb_parni( 1 ) + 1 ) );
|
||||
if( hb_vmInternalsEnabled() )
|
||||
hb_itemReturnRelease( hb_arrayFromParams( hb_parni( 1 ) + 1 ) );
|
||||
else
|
||||
hb_reta( 0 );
|
||||
}
|
||||
|
||||
PHB_ITEM hb_dbg_vmVarLGet( int iLevel, int iLocal )
|
||||
@@ -295,48 +319,54 @@ PHB_ITEM hb_dbg_vmVarLGet( int iLevel, int iLocal )
|
||||
|
||||
HB_FUNC( __DBGVMVARLGET )
|
||||
{
|
||||
int iLevel = hb_parni( 1 ) + 1;
|
||||
int iLocal = hb_parni( 2 );
|
||||
PHB_ITEM pLocal = hb_dbg_vmVarLGet( iLevel, iLocal );
|
||||
if( hb_vmInternalsEnabled() )
|
||||
{
|
||||
int iLevel = hb_parni( 1 ) + 1;
|
||||
int iLocal = hb_parni( 2 );
|
||||
PHB_ITEM pLocal = hb_dbg_vmVarLGet( iLevel, iLocal );
|
||||
|
||||
if( pLocal )
|
||||
hb_itemReturn( pLocal );
|
||||
else
|
||||
hb_errRT_BASE( EG_ARG, 6005, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
|
||||
if( pLocal )
|
||||
hb_itemReturn( pLocal );
|
||||
else
|
||||
hb_errRT_BASE( EG_ARG, 6005, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
|
||||
}
|
||||
}
|
||||
|
||||
HB_FUNC( __DBGVMVARLSET )
|
||||
{
|
||||
int iLevel = hb_parni( 1 ) + 1;
|
||||
int iLocal = hb_parni( 2 );
|
||||
HB_ISIZ nBaseOffset;
|
||||
PHB_ITEM pLocal;
|
||||
|
||||
nBaseOffset = hb_stackBaseOffset();
|
||||
while( iLevel-- > 0 && nBaseOffset > 1 )
|
||||
nBaseOffset = hb_stackItem( nBaseOffset - 1 )->item.asSymbol.stackstate->nBaseItem + 1;
|
||||
|
||||
if( iLevel < 0 )
|
||||
if( hb_vmInternalsEnabled() )
|
||||
{
|
||||
if( iLocal > SHRT_MAX )
|
||||
int iLevel = hb_parni( 1 ) + 1;
|
||||
int iLocal = hb_parni( 2 );
|
||||
HB_ISIZ nBaseOffset;
|
||||
PHB_ITEM pLocal;
|
||||
|
||||
nBaseOffset = hb_stackBaseOffset();
|
||||
while( iLevel-- > 0 && nBaseOffset > 1 )
|
||||
nBaseOffset = hb_stackItem( nBaseOffset - 1 )->item.asSymbol.stackstate->nBaseItem + 1;
|
||||
|
||||
if( iLevel < 0 )
|
||||
{
|
||||
iLocal -= USHRT_MAX;
|
||||
iLocal--;
|
||||
if( iLocal > SHRT_MAX )
|
||||
{
|
||||
iLocal -= USHRT_MAX;
|
||||
iLocal--;
|
||||
}
|
||||
|
||||
if( iLocal >= 0 )
|
||||
{
|
||||
PHB_ITEM pBase = hb_stackItem( nBaseOffset - 1 );
|
||||
|
||||
if( pBase->item.asSymbol.paramcnt > pBase->item.asSymbol.paramdeclcnt &&
|
||||
iLocal > pBase->item.asSymbol.paramdeclcnt )
|
||||
iLocal += pBase->item.asSymbol.paramcnt - pBase->item.asSymbol.paramdeclcnt;
|
||||
|
||||
pLocal = hb_stackItem( nBaseOffset + iLocal );
|
||||
}
|
||||
else
|
||||
pLocal = hb_codeblockGetRef( hb_stackItem( nBaseOffset )->item.asBlock.value, iLocal );
|
||||
|
||||
hb_itemCopyToRef( pLocal, hb_stackItemFromBase( 3 ) );
|
||||
}
|
||||
|
||||
if( iLocal >= 0 )
|
||||
{
|
||||
PHB_ITEM pBase = hb_stackItem( nBaseOffset - 1 );
|
||||
|
||||
if( pBase->item.asSymbol.paramcnt > pBase->item.asSymbol.paramdeclcnt &&
|
||||
iLocal > pBase->item.asSymbol.paramdeclcnt )
|
||||
iLocal += pBase->item.asSymbol.paramcnt - pBase->item.asSymbol.paramdeclcnt;
|
||||
|
||||
pLocal = hb_stackItem( nBaseOffset + iLocal );
|
||||
}
|
||||
else
|
||||
pLocal = hb_codeblockGetRef( hb_stackItem( nBaseOffset )->item.asBlock.value, iLocal );
|
||||
|
||||
hb_itemCopyToRef( pLocal, hb_stackItemFromBase( 3 ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -226,6 +226,8 @@ static PHB_DYNS s_pDynsDbgEntry = NULL; /* Cached __DBGENTRY symbol */
|
||||
static HB_DBGENTRY_FUNC s_pFunDbgEntry; /* C level debugger entry */
|
||||
#endif
|
||||
|
||||
static HB_BOOL s_fInternalsEnabled = HB_TRUE;
|
||||
|
||||
#if defined( HB_MT_VM )
|
||||
static int volatile hb_vmThreadRequest = 0;
|
||||
static void hb_vmRequestTest( void );
|
||||
@@ -8918,6 +8920,11 @@ HB_BOOL hb_vmIsReady( void )
|
||||
#endif
|
||||
}
|
||||
|
||||
HB_BOOL hb_vmInternalsEnabled( void )
|
||||
{
|
||||
return s_fInternalsEnabled;
|
||||
}
|
||||
|
||||
PHB_CODEPAGE hb_vmCDP( void )
|
||||
{
|
||||
HB_STACK_TLS_PRELOAD
|
||||
@@ -11845,23 +11852,34 @@ HB_FUNC( __DBGINVOKEDEBUG )
|
||||
{
|
||||
HB_STACK_TLS_PRELOAD
|
||||
|
||||
if( hb_vmInternalsEnabled() )
|
||||
{
|
||||
#ifndef HB_NO_DEBUG
|
||||
HB_BOOL * pfRequest = hb_stackDebugRequest();
|
||||
HB_BOOL * pfRequest = hb_stackDebugRequest();
|
||||
|
||||
hb_retl( *pfRequest );
|
||||
*pfRequest = hb_parl( 1 );
|
||||
hb_retl( *pfRequest );
|
||||
*pfRequest = hb_parl( 1 );
|
||||
#else
|
||||
hb_retl( HB_FALSE );
|
||||
hb_retl( HB_FALSE );
|
||||
#endif
|
||||
}
|
||||
else
|
||||
hb_retl( HB_FALSE );
|
||||
}
|
||||
|
||||
/* $Doc$
|
||||
* $FuncName$ <aStat> __dbgvmVarSList()
|
||||
* $Description$ Return the statics array. Please aClone before assignments
|
||||
* $Description$ Return the statics array. Please AClone() before assignments
|
||||
* $End$ */
|
||||
HB_FUNC( __DBGVMVARSLIST )
|
||||
{
|
||||
hb_itemReturnRelease( hb_vmStaticsArray() );
|
||||
if( hb_vmInternalsEnabled() )
|
||||
hb_itemReturnRelease( hb_vmStaticsArray() );
|
||||
else
|
||||
{
|
||||
HB_STACK_TLS_PRELOAD
|
||||
hb_reta( 0 );
|
||||
}
|
||||
}
|
||||
|
||||
/* $Doc$
|
||||
@@ -11871,7 +11889,11 @@ HB_FUNC( __DBGVMVARSLIST )
|
||||
HB_FUNC( __DBGVMVARSLEN )
|
||||
{
|
||||
HB_STACK_TLS_PRELOAD
|
||||
hb_retnint( hb_vmStaticsCount() );
|
||||
|
||||
if( hb_vmInternalsEnabled() )
|
||||
hb_retnint( hb_vmStaticsCount() );
|
||||
else
|
||||
hb_retnint( 0 );
|
||||
}
|
||||
|
||||
/* $Doc$
|
||||
@@ -11880,7 +11902,8 @@ HB_FUNC( __DBGVMVARSLEN )
|
||||
* $End$ */
|
||||
HB_FUNC( __DBGVMVARSGET )
|
||||
{
|
||||
hb_itemReturn( hb_dbg_vmVarSGet( hb_param( 1, HB_IT_ARRAY ), hb_parni( 2 ) ) );
|
||||
if( hb_vmInternalsEnabled() )
|
||||
hb_itemReturn( hb_dbg_vmVarSGet( hb_param( 1, HB_IT_ARRAY ), hb_parni( 2 ) ) );
|
||||
}
|
||||
|
||||
/* $Doc$
|
||||
@@ -11889,17 +11912,23 @@ HB_FUNC( __DBGVMVARSGET )
|
||||
* $End$ */
|
||||
HB_FUNC( __DBGVMVARSSET )
|
||||
{
|
||||
PHB_ITEM pStaticsBase = hb_param( 1, HB_IT_ARRAY );
|
||||
PHB_ITEM pItem = hb_param( 3, HB_IT_ANY );
|
||||
if( hb_vmInternalsEnabled() )
|
||||
{
|
||||
PHB_ITEM pStaticsBase = hb_param( 1, HB_IT_ARRAY );
|
||||
PHB_ITEM pItem = hb_param( 3, HB_IT_ANY );
|
||||
|
||||
if( pStaticsBase && pItem )
|
||||
hb_arraySet( pStaticsBase, hb_parni( 2 ), pItem );
|
||||
if( pStaticsBase && pItem )
|
||||
hb_arraySet( pStaticsBase, hb_parni( 2 ), pItem );
|
||||
}
|
||||
}
|
||||
|
||||
HB_FUNC( __DBGPROCLEVEL )
|
||||
{
|
||||
HB_STACK_TLS_PRELOAD
|
||||
hb_retnl( hb_dbg_ProcLevel() - 1 ); /* Don't count self */
|
||||
if( hb_vmInternalsEnabled() )
|
||||
{
|
||||
HB_STACK_TLS_PRELOAD
|
||||
hb_retnl( hb_dbg_ProcLevel() - 1 ); /* Don't count self */
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -11933,26 +11962,38 @@ PHB_ITEM hb_dbg_vmVarGGet( int nGlobal, int nOffset )
|
||||
* $End$ */
|
||||
HB_FUNC( __DBGVMVARGLIST )
|
||||
{
|
||||
if( hb_vmInternalsEnabled() )
|
||||
{
|
||||
#if 0
|
||||
PHB_ITEM pGlobals = hb_itemClone( &s_aGlobals );
|
||||
PHB_ITEM pGlobals = hb_itemClone( &s_aGlobals );
|
||||
#else
|
||||
PHB_ITEM pGlobals = hb_itemArrayNew( 0 );
|
||||
PHB_ITEM pGlobals = hb_itemArrayNew( 0 );
|
||||
#endif
|
||||
|
||||
hb_itemReturnRelease( pGlobals );
|
||||
hb_itemReturnRelease( pGlobals );
|
||||
}
|
||||
else
|
||||
{
|
||||
HB_STACK_TLS_PRELOAD
|
||||
hb_reta( 0 );
|
||||
}
|
||||
}
|
||||
|
||||
HB_FUNC( __DBGVMVARGGET )
|
||||
{
|
||||
hb_itemReturn( hb_dbg_vmVarGGet( hb_parni( 1 ), hb_parni( 2 ) ) );
|
||||
if( hb_vmInternalsEnabled() )
|
||||
hb_itemReturn( hb_dbg_vmVarGGet( hb_parni( 1 ), hb_parni( 2 ) ) );
|
||||
}
|
||||
|
||||
HB_FUNC( __DBGVMVARGSET )
|
||||
{
|
||||
#if 0
|
||||
PHB_ITEM pItem = hb_param( 3, HB_IT_ANY );
|
||||
if( pItem )
|
||||
hb_arraySet( &s_aGlobals, hb_parni( 1 ) + hb_parni( 2 ), pItem );
|
||||
if( hb_vmInternalsEnabled() )
|
||||
{
|
||||
PHB_ITEM pItem = hb_param( 3, HB_IT_ANY );
|
||||
if( pItem )
|
||||
hb_arraySet( &s_aGlobals, hb_parni( 1 ) + hb_parni( 2 ), pItem );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -12106,6 +12147,11 @@ HB_FUNC( __QUITCANCEL )
|
||||
}
|
||||
}
|
||||
|
||||
HB_FUNC( __VMNOINTERNALS )
|
||||
{
|
||||
s_fInternalsEnabled = HB_FALSE;
|
||||
}
|
||||
|
||||
HB_FUNC( __VMITEMID )
|
||||
{
|
||||
HB_STACK_TLS_PRELOAD
|
||||
|
||||
@@ -10,42 +10,42 @@ PROCEDURE Main()
|
||||
LOCAL oSecond
|
||||
|
||||
? "What's the default oForm and calculate area"
|
||||
? hb_ValToExp( oForm )
|
||||
? hb_ValToExp( oForm )
|
||||
? oForm:CalcArea()
|
||||
? "Set nTop to 5 and recalculate"
|
||||
oForm:nTop := 5
|
||||
? hb_ValToExp( oForm )
|
||||
? hb_ValToExp( oForm )
|
||||
? oForm:CalcArea()
|
||||
|
||||
? "Create a new instance and calculate area"
|
||||
oSecond := TForm():New()
|
||||
? hb_ValToExp( oSecond )
|
||||
? hb_ValToExp( oSecond )
|
||||
? oSecond:CalcArea()
|
||||
|
||||
RETURN
|
||||
|
||||
FUNCTION TForm()
|
||||
|
||||
STATIC oClass
|
||||
STATIC s_oClass
|
||||
|
||||
IF oClass == NIL
|
||||
oClass := HBClass():New( "TFORM" ) // starts a new class definition
|
||||
IF s_oClass == NIL
|
||||
s_oClass := HBClass():New( "TFORM" ) // starts a new class definition
|
||||
|
||||
oClass:AddData( "cName" ) // define this class objects datas
|
||||
oClass:AddData( "nTop" , 10 )
|
||||
oClass:AddData( "nLeft" , 10 )
|
||||
oClass:AddData( "nBottom", 20 )
|
||||
oClass:AddData( "nRight" , 40 )
|
||||
s_oClass:AddData( "cName" ) // define this class objects datas
|
||||
s_oClass:AddData( "nTop" , 10 )
|
||||
s_oClass:AddData( "nLeft" , 10 )
|
||||
s_oClass:AddData( "nBottom", 20 )
|
||||
s_oClass:AddData( "nRight" , 40 )
|
||||
|
||||
oClass:AddMethod( "New", @New() ) // define this class objects methods
|
||||
oClass:AddMethod( "Show", @Show() )
|
||||
oClass:AddInline( "CalcArea", ;
|
||||
s_oClass:AddMethod( "New", @New() ) // define this class objects methods
|
||||
s_oClass:AddMethod( "Show", @Show() )
|
||||
s_oClass:AddInline( "CalcArea", ;
|
||||
{| self | ( ::nRight - ::nLeft ) * ( ::nBottom - ::nTop ) } )
|
||||
|
||||
oClass:Create() // builds this class
|
||||
s_oClass:Create() // builds this class
|
||||
ENDIF
|
||||
|
||||
RETURN oClass:Instance() // builds an object of this class
|
||||
RETURN s_oClass:Instance() // builds an object of this class
|
||||
|
||||
STATIC FUNCTION New()
|
||||
|
||||
|
||||
@@ -16,24 +16,24 @@ PROCEDURE Main()
|
||||
|
||||
FUNCTION TForm()
|
||||
|
||||
STATIC oClass
|
||||
STATIC s_oClass
|
||||
|
||||
IF oClass == NIL
|
||||
oClass := HBClass():New( "TFORM" ) // starts a new class definition
|
||||
IF s_oClass == NIL
|
||||
s_oClass := HBClass():New( "TFORM" ) // starts a new class definition
|
||||
|
||||
oClass:AddData( "cName" ) // define this class objects datas
|
||||
oClass:AddData( "nTop" )
|
||||
oClass:AddData( "nLeft" )
|
||||
oClass:AddData( "nBottom" )
|
||||
oClass:AddData( "nRight" )
|
||||
s_oClass:AddData( "cName" ) // define this class objects datas
|
||||
s_oClass:AddData( "nTop" )
|
||||
s_oClass:AddData( "nLeft" )
|
||||
s_oClass:AddData( "nBottom" )
|
||||
s_oClass:AddData( "nRight" )
|
||||
|
||||
oClass:AddMethod( "New", @New() ) // define this class objects methods
|
||||
oClass:AddMethod( "Show", @Show() )
|
||||
s_oClass:AddMethod( "New", @New() ) // define this class objects methods
|
||||
s_oClass:AddMethod( "Show", @Show() )
|
||||
|
||||
oClass:Create() // builds this class
|
||||
s_oClass:Create() // builds this class
|
||||
ENDIF
|
||||
|
||||
RETURN oClass:Instance() // builds an object of this class
|
||||
RETURN s_oClass:Instance() // builds an object of this class
|
||||
|
||||
STATIC FUNCTION New()
|
||||
|
||||
|
||||
@@ -16,20 +16,20 @@ PROCEDURE Main()
|
||||
|
||||
FUNCTION TBaseObject()
|
||||
|
||||
STATIC oClass
|
||||
STATIC s_oClass
|
||||
|
||||
IF oClass == NIL
|
||||
oClass := HBClass():New( "TBaseObject" )
|
||||
oClass:AddData( "Data1" )
|
||||
oClass:AddClassData( "ClassData1" )
|
||||
oClass:AddMethod( "NewBase", @NewBase() )
|
||||
oClass:AddMethod( "Test", @Test() )
|
||||
oClass:AddMethod( "Method1", @Method1Base() )
|
||||
oClass:AddMethod( "Method2", @Method2Base() )
|
||||
oClass:Create()
|
||||
IF s_oClass == NIL
|
||||
s_oClass := HBClass():New( "TBaseObject" )
|
||||
s_oClass:AddData( "Data1" )
|
||||
s_oClass:AddClassData( "ClassData1" )
|
||||
s_oClass:AddMethod( "NewBase", @NewBase() )
|
||||
s_oClass:AddMethod( "Test", @Test() )
|
||||
s_oClass:AddMethod( "Method1", @Method1Base() )
|
||||
s_oClass:AddMethod( "Method2", @Method2Base() )
|
||||
s_oClass:Create()
|
||||
ENDIF
|
||||
|
||||
RETURN oClass:Instance()
|
||||
RETURN s_oClass:Instance()
|
||||
|
||||
STATIC FUNCTION NewBase()
|
||||
|
||||
@@ -69,19 +69,19 @@ STATIC FUNCTION Method2Base()
|
||||
|
||||
FUNCTION HBObject()
|
||||
|
||||
STATIC oClass
|
||||
STATIC s_oClass
|
||||
|
||||
IF oClass == NIL
|
||||
oClass := HBClass():New( "HBObject", "TBaseObject" )
|
||||
oClass:AddData( "Data2" )
|
||||
oClass:AddClassData( "ClassData2" )
|
||||
oClass:AddMethod( "New", @New() )
|
||||
oClass:AddMethod( "Method1", @Method1() )
|
||||
oClass:AddMethod( "Method2", @Method2() )
|
||||
oClass:Create()
|
||||
IF s_oClass == NIL
|
||||
s_oClass := HBClass():New( "HBObject", "TBaseObject" )
|
||||
s_oClass:AddData( "Data2" )
|
||||
s_oClass:AddClassData( "ClassData2" )
|
||||
s_oClass:AddMethod( "New", @New() )
|
||||
s_oClass:AddMethod( "Method1", @Method1() )
|
||||
s_oClass:AddMethod( "Method2", @Method2() )
|
||||
s_oClass:Create()
|
||||
ENDIF
|
||||
|
||||
RETURN oClass:Instance()
|
||||
RETURN s_oClass:Instance()
|
||||
|
||||
STATIC FUNCTION New()
|
||||
|
||||
|
||||
@@ -14,50 +14,49 @@
|
||||
* Placed in the public domain
|
||||
*/
|
||||
|
||||
#pragma warninglevel=1
|
||||
|
||||
PROCEDURE Main()
|
||||
|
||||
LOCAL oForm := TForm():New()
|
||||
LOCAL nNumber := 15
|
||||
|
||||
HB_SYMBOL_UNUSED( nNumber )
|
||||
|
||||
? oForm:ClassName()
|
||||
oForm:Show()
|
||||
?
|
||||
|
||||
? "-OBJECT additions-"
|
||||
? "What is in oForm ? "
|
||||
? hb_ValToExp( oForm:Transfer() )
|
||||
? hb_ValToExp( oForm:Transfer() )
|
||||
|
||||
? "Does transfer exists ? ", __objHasMsg ( oForm, "Transfer" )
|
||||
? "Is transfer DATA ? ", __objHasData ( oForm, "Transfer" )
|
||||
? "Does transfer exists ? ", __objHasMsg( oForm, "Transfer" )
|
||||
? "Is transfer DATA ? ", __objHasData( oForm, "Transfer" )
|
||||
? "Is transfer METHOD ? ", __objHasMethod( oForm, "Transfer" )
|
||||
? "Does nLeft exists ? ", __objHasMsg ( oForm, "nLeft" )
|
||||
? "Is nLeft DATA ? ", __objHasData ( oForm, "nLeft" )
|
||||
? "Does nLeft exists ? ", __objHasMsg( oForm, "nLeft" )
|
||||
? "Is nLeft DATA ? ", __objHasData( oForm, "nLeft" )
|
||||
? "Is nLeft METHOD ? ", __objHasMethod( oForm, "nLeft" )
|
||||
? "Does unknown exists ? ", __objHasMsg ( oForm, "Unknown" )
|
||||
? "Is unknown DATA ? ", __objHasData ( oForm, "Unknown" )
|
||||
? "Does unknown exists ? ", __objHasMsg( oForm, "Unknown" )
|
||||
? "Is unknown DATA ? ", __objHasData( oForm, "Unknown" )
|
||||
? "Is unknown METHOD ? ", __objHasMethod( oForm, "Unknown" )
|
||||
|
||||
? "Set nLeft to 50 and nRight to 100"
|
||||
oForm:Transfer( { "nLeft", 50 }, { "nRight", 100 } )
|
||||
? hb_ValToExp( oForm:Transfer() )
|
||||
? hb_ValToExp( oForm:Transfer() )
|
||||
|
||||
Pause()
|
||||
|
||||
|
||||
? "-DEBUG Functions-"
|
||||
? "-Statics-"
|
||||
? hb_ValToExp( __dbgVMVarSList() )
|
||||
? hb_ValToExp( __dbgVMVarSList() )
|
||||
|
||||
? "-Global Stack-"
|
||||
? hb_ValToExp( __dbgVMStkGList() )
|
||||
? hb_ValToExp( __dbgVMStkGList() )
|
||||
|
||||
? "-Local Stack-"
|
||||
? hb_ValToExp( __dbgVMStkLList() )
|
||||
? hb_ValToExp( __dbgVMStkLList() )
|
||||
|
||||
? "-Parameters-"
|
||||
? hb_ValToExp( __dbgVMParLList() )
|
||||
? hb_ValToExp( __dbgVMParLList() )
|
||||
|
||||
Pause()
|
||||
|
||||
@@ -76,25 +75,32 @@ FUNCTION FuncSecond( nParam, cParam, uParam )
|
||||
LOCAL xParam
|
||||
LOCAL xStack
|
||||
|
||||
HB_SYMBOL_UNUSED( cWhat )
|
||||
HB_SYMBOL_UNUSED( nNumber )
|
||||
|
||||
HB_SYMBOL_UNUSED( nParam )
|
||||
HB_SYMBOL_UNUSED( cParam )
|
||||
HB_SYMBOL_UNUSED( uParam )
|
||||
|
||||
?
|
||||
? "-Second procedure-"
|
||||
?
|
||||
|
||||
? "-Statics-"
|
||||
? hb_ValToExp( __dbgVMVarSList() )
|
||||
? hb_ValToExp( __dbgVMVarSList() )
|
||||
?
|
||||
|
||||
? "-Global Stack- Len=", __dbgVMStkGCount()
|
||||
? hb_ValToExp( __dbgVMStkGList() )
|
||||
? hb_ValToExp( __dbgVMStkGList() )
|
||||
?
|
||||
|
||||
? "-Local Stack- Len=", __dbgVMStkLCount()
|
||||
? hb_ValToExp( xStack := __dbgVMStkLList() )
|
||||
? hb_ValToExp( xStack := __dbgVMStkLList() )
|
||||
?
|
||||
|
||||
? "-Parameters-"
|
||||
? hb_ValToExp( xParam := __dbgVMParLList() )
|
||||
IF xParam[ xStack[ 7 ] ] == "Hello"
|
||||
? hb_ValToExp( xParam := __dbgVMParLList() )
|
||||
IF ! Empty( xStack ) .AND. xParam[ xStack[ 7 ] ] == "Hello"
|
||||
? ":-)"
|
||||
ENDIF
|
||||
|
||||
@@ -110,27 +116,27 @@ FUNCTION FuncSecond( nParam, cParam, uParam )
|
||||
|
||||
FUNCTION TForm()
|
||||
|
||||
STATIC oClass
|
||||
STATIC s_oClass
|
||||
|
||||
IF oClass == NIL
|
||||
oClass := HBClass():New( "TFORM" ) // starts a new class definition
|
||||
IF s_oClass == NIL
|
||||
s_oClass := HBClass():New( "TFORM" ) // starts a new class definition
|
||||
|
||||
oClass:AddData( "cName" ) // define this class objects datas
|
||||
oClass:AddData( "nTop" )
|
||||
oClass:AddData( "nLeft" )
|
||||
oClass:AddData( "nBottom" )
|
||||
oClass:AddData( "nRight" )
|
||||
s_oClass:AddData( "cName" ) // define this class objects datas
|
||||
s_oClass:AddData( "nTop" )
|
||||
s_oClass:AddData( "nLeft" )
|
||||
s_oClass:AddData( "nBottom" )
|
||||
s_oClass:AddData( "nRight" )
|
||||
|
||||
oClass:AddVirtual( "aExcept" ) // Export exceptions
|
||||
s_oClass:AddVirtual( "aExcept" ) // Export exceptions
|
||||
|
||||
oClass:AddMethod( "New", @New() ) // define this class objects methods
|
||||
oClass:AddMethod( "Show", @Show() )
|
||||
oClass:AddMethod( "Transfer", @Transfer() )
|
||||
s_oClass:AddMethod( "New", @New() ) // define this class objects methods
|
||||
s_oClass:AddMethod( "Show", @Show() )
|
||||
s_oClass:AddMethod( "Transfer", @Transfer() )
|
||||
|
||||
oClass:Create() // builds this class
|
||||
s_oClass:Create() // builds this class
|
||||
ENDIF
|
||||
|
||||
RETURN oClass:Instance() // builds an object of this class
|
||||
RETURN s_oClass:Instance() // builds an object of this class
|
||||
|
||||
|
||||
/* $Doc$
|
||||
@@ -223,21 +229,19 @@ STATIC FUNCTION Show()
|
||||
// oTarget:Transfer( DbObject->Memo )
|
||||
//
|
||||
|
||||
STATIC FUNCTION Transfer( x1, x2, x3, x4, x5, x6, x7, x8, x9, x10 ) /* etc */
|
||||
STATIC FUNCTION Transfer( ... )
|
||||
|
||||
LOCAL self := QSelf()
|
||||
LOCAL aParam := __dbgVMParLList()
|
||||
LOCAL nLen := PCount()
|
||||
LOCAL xRet
|
||||
LOCAL xData
|
||||
LOCAL n
|
||||
|
||||
IF nLen == 0
|
||||
xRet := __objGetValueList( self, ::aExcept() )
|
||||
ELSE
|
||||
FOR n := 1 TO nLen
|
||||
FOR EACH xData IN aParam
|
||||
|
||||
xData := aParam[ n ]
|
||||
IF HB_ISARRAY( xData )
|
||||
|
||||
IF HB_ISARRAY( xData[ 1 ] ) // 2D array passed
|
||||
@@ -249,7 +253,7 @@ STATIC FUNCTION Transfer( x1, x2, x3, x4, x5, x6, x7, x8, x9, x10 ) /* etc */
|
||||
ELSEIF HB_ISOBJECT( xData ) // Object passed
|
||||
xRet := ::Transfer( xData:Transfer() )
|
||||
ELSEIF !( ValType( xData ) == "U" )
|
||||
? "TRANSFER: Incorrect argument(", n, ") ", xData
|
||||
? "TRANSFER: Incorrect argument(", xData:__enumIndex(), ") ", xData
|
||||
ENDIF
|
||||
|
||||
NEXT
|
||||
|
||||
@@ -18,7 +18,7 @@ PROCEDURE Main()
|
||||
LOCAL oForm := TForm():New()
|
||||
|
||||
? "What methods are in the class :"
|
||||
? hb_ValToExp( __objGetMethodList( oForm ) )
|
||||
? hb_ValToExp( __objGetMethodList( oForm ) )
|
||||
|
||||
/* Let's add an inline at run-time. Should already be possible */
|
||||
|
||||
@@ -28,7 +28,7 @@ PROCEDURE Main()
|
||||
{| self | ( ::nRight - ::nLeft ) * ( ::nBottom - ::nTop ) } )
|
||||
|
||||
? "What methods are in the class :"
|
||||
? hb_ValToExp( __objGetMethodList( oForm ) )
|
||||
? hb_ValToExp( __objGetMethodList( oForm ) )
|
||||
|
||||
? "What is the Form area ?"
|
||||
? oForm:CalcArea()
|
||||
@@ -38,7 +38,7 @@ PROCEDURE Main()
|
||||
__objAddMethod( oForm, "Smile", @Smile() )
|
||||
|
||||
? "What methods are in the class :"
|
||||
? hb_ValToExp( __objGetMethodList( oForm ) )
|
||||
? hb_ValToExp( __objGetMethodList( oForm ) )
|
||||
|
||||
? "Smile please "
|
||||
oForm:Smile()
|
||||
@@ -46,7 +46,7 @@ PROCEDURE Main()
|
||||
Pause()
|
||||
|
||||
? "Data items before"
|
||||
? hb_ValToExp( oForm )
|
||||
? hb_ValToExp( oForm )
|
||||
|
||||
? "Let's add an additional data item"
|
||||
|
||||
@@ -55,7 +55,7 @@ PROCEDURE Main()
|
||||
oForm:cHelp := "This is a real tricky test"
|
||||
|
||||
? "Data items after"
|
||||
? hb_ValToExp( oForm )
|
||||
? hb_ValToExp( oForm )
|
||||
|
||||
Pause()
|
||||
|
||||
@@ -75,31 +75,31 @@ PROCEDURE Main()
|
||||
? oForm:CalcArea()
|
||||
|
||||
? "What methods are in the class :"
|
||||
? hb_ValToExp( __objGetMethodList( oForm ) )
|
||||
? hb_ValToExp( __objGetMethodList( oForm ) )
|
||||
|
||||
? "Delete CalcArea"
|
||||
__objDelInline( oForm, "CalcArea" )
|
||||
|
||||
? "What methods are in the class :"
|
||||
? hb_ValToExp( __objGetMethodList( oForm ) )
|
||||
? hb_ValToExp( __objGetMethodList( oForm ) )
|
||||
|
||||
? "Delete Smile"
|
||||
__objDelMethod( oForm, "Smile" )
|
||||
|
||||
? "What methods are in the class :"
|
||||
? hb_ValToExp( __objGetMethodList( oForm ) )
|
||||
? hb_ValToExp( __objGetMethodList( oForm ) )
|
||||
|
||||
Pause()
|
||||
|
||||
? "Data items before"
|
||||
? hb_ValToExp( oForm )
|
||||
? hb_ValToExp( oForm )
|
||||
|
||||
? "Let's delete cHelp"
|
||||
|
||||
__objDelData( oForm, "cHelp" )
|
||||
|
||||
? "Data items after"
|
||||
? hb_ValToExp( oForm )
|
||||
? hb_ValToExp( oForm )
|
||||
|
||||
/* oForm:cHelp := "Please crash" */
|
||||
|
||||
@@ -107,24 +107,24 @@ PROCEDURE Main()
|
||||
|
||||
FUNCTION TForm()
|
||||
|
||||
STATIC oClass
|
||||
STATIC s_oClass
|
||||
|
||||
IF oClass == NIL
|
||||
oClass := HBClass():New( "TFORM" ) // starts a new class definition
|
||||
IF s_oClass == NIL
|
||||
s_oClass := HBClass():New( "TFORM" ) // starts a new class definition
|
||||
|
||||
oClass:AddData( "cText" ) // define this class objects datas
|
||||
oClass:AddData( "nTop" )
|
||||
oClass:AddData( "nLeft" )
|
||||
oClass:AddData( "nBottom" )
|
||||
oClass:AddData( "nRight" )
|
||||
s_oClass:AddData( "cText" ) // define this class objects datas
|
||||
s_oClass:AddData( "nTop" )
|
||||
s_oClass:AddData( "nLeft" )
|
||||
s_oClass:AddData( "nBottom" )
|
||||
s_oClass:AddData( "nRight" )
|
||||
|
||||
oClass:AddMethod( "New", @New() ) // define this class objects methods
|
||||
oClass:AddInline( "Show", {| self | ::cText } )
|
||||
s_oClass:AddMethod( "New", @New() ) // define this class objects methods
|
||||
s_oClass:AddInline( "Show", {| self | ::cText } )
|
||||
|
||||
oClass:Create() // builds this class
|
||||
s_oClass:Create() // builds this class
|
||||
ENDIF
|
||||
|
||||
RETURN oClass:Instance() // builds an object of this class
|
||||
RETURN s_oClass:Instance() // builds an object of this class
|
||||
|
||||
STATIC FUNCTION New()
|
||||
|
||||
|
||||
@@ -25,11 +25,11 @@ PROCEDURE Main()
|
||||
oTo := TTextFile():New( "hello.out", "W" )
|
||||
|
||||
? "What's in oFrom"
|
||||
? hb_ValToExp( { oFrom, __objGetMethodList( oFrom ) } )
|
||||
? hb_ValToExp( { oFrom, __objGetMethodList( oFrom ) } )
|
||||
|
||||
?
|
||||
? "What's in oFrom:TEmpty"
|
||||
? hb_ValToExp( { oFrom:TEmpty, __objGetMethodList( oFrom:TEmpty ) } )
|
||||
? hb_ValToExp( { oFrom:TEmpty, __objGetMethodList( oFrom:TEmpty ) } )
|
||||
|
||||
?
|
||||
? "Let's call Run() from TEmpty : "
|
||||
|
||||
@@ -19,24 +19,24 @@ PROCEDURE Main()
|
||||
|
||||
FUNCTION TForm()
|
||||
|
||||
STATIC oClass
|
||||
STATIC s_oClass
|
||||
|
||||
IF oClass == NIL
|
||||
oClass := HBClass():New( "TFORM" ) // starts a new class definition
|
||||
IF s_oClass == NIL
|
||||
s_oClass := HBClass():New( "TFORM" ) // starts a new class definition
|
||||
|
||||
oClass:AddData( "cText" ) // define this class objects datas
|
||||
oClass:AddData( "nTop" )
|
||||
oClass:AddData( "nLeft" )
|
||||
oClass:AddData( "nBottom" )
|
||||
oClass:AddData( "nRight" )
|
||||
s_oClass:AddData( "cText" ) // define this class objects datas
|
||||
s_oClass:AddData( "nTop" )
|
||||
s_oClass:AddData( "nLeft" )
|
||||
s_oClass:AddData( "nBottom" )
|
||||
s_oClass:AddData( "nRight" )
|
||||
|
||||
oClass:AddMethod( "New", @New() ) // define this class objects methods
|
||||
oClass:AddInline( "Show", {| self | QOut( self:cText ) } )
|
||||
s_oClass:AddMethod( "New", @New() ) // define this class objects methods
|
||||
s_oClass:AddInline( "Show", {| self | QOut( self:cText ) } )
|
||||
|
||||
oClass:Create() // builds this class
|
||||
s_oClass:Create() // builds this class
|
||||
ENDIF
|
||||
|
||||
RETURN oClass:Instance() // builds an object of this class
|
||||
RETURN s_oClass:Instance() // builds an object of this class
|
||||
|
||||
STATIC FUNCTION New()
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ PROCEDURE Main()
|
||||
|
||||
RETURN
|
||||
|
||||
#pragma BEGINDUMP
|
||||
#pragma begindump
|
||||
|
||||
#include "hbapi.h"
|
||||
|
||||
@@ -19,7 +19,7 @@ HB_FUNC( C_FUNC )
|
||||
hb_retc( "returned from C_FUNC()\n" );
|
||||
}
|
||||
|
||||
#pragma ENDDUMP
|
||||
#pragma enddump
|
||||
|
||||
FUNCTION EndDumpTest()
|
||||
RETURN "End Dump Test"
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
# $Id$
|
||||
#
|
||||
|
||||
# Testing dirty function overload
|
||||
-ldflag={allgcc}-Wl,--allow-multiple-definition
|
||||
-ldflag={allmsvc|allpocc|xcc}/force:multiple
|
||||
-ldflag={allmsvc|allpocc|xcc|watcom}/force:multiple
|
||||
|
||||
t0.prg
|
||||
t1.prg
|
||||
|
||||
@@ -32,4 +32,4 @@ HB_FUNC( P7 )
|
||||
{
|
||||
hb_retc( "P7:t1.prg" );
|
||||
}
|
||||
#pragma enddump
|
||||
#pragma enddump
|
||||
|
||||
@@ -55,9 +55,9 @@ PROCEDURE Main()
|
||||
? "To the power 3 : ", hb_ValToStr( o:x )
|
||||
|
||||
? "Global stack"
|
||||
? hb_ValToExp( __dbgVMStkGList() )
|
||||
? hb_ValToExp( __dbgVMStkGList() )
|
||||
? "Statics"
|
||||
? hb_ValToExp( __dbgVMVarSList() )
|
||||
? hb_ValToExp( __dbgVMVarSList() )
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
@@ -47,9 +47,9 @@ PROCEDURE Main()
|
||||
? "To the power 3 : ", o:x
|
||||
|
||||
? "Global stack"
|
||||
? hb_ValToExp( __dbgVMStkGList() )
|
||||
? hb_ValToExp( __dbgVMStkGList() )
|
||||
? "Statics"
|
||||
? hb_ValToExp( __dbgVMVarSList() )
|
||||
? hb_ValToExp( __dbgVMVarSList() )
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
@@ -32,11 +32,11 @@ PROCEDURE Main( cFrom, cTo )
|
||||
hb_default( @cTo, "strip.out" )
|
||||
|
||||
oFrom := TTextFile()
|
||||
// ? hb_ValToExp( __objGetMethodList( oFrom ) )
|
||||
// ? hb_ValToExp( __objGetMethodList( oFrom ) )
|
||||
oFrom:New( cFrom, "R" )
|
||||
oTo := TTextFile()
|
||||
// ? hb_ValToExp( __objGetMethodList( oTo ) )
|
||||
oTo:New( cTo , "W" )
|
||||
// ? hb_ValToExp( __objGetMethodList( oTo ) )
|
||||
oTo:New( cTo, "W" )
|
||||
|
||||
DO WHILE ! oFrom:Eof()
|
||||
cOut := oFrom:Run()
|
||||
|
||||
@@ -102,7 +102,7 @@ METHOD AddPara( cPara, cAlign ) CLASS THTML
|
||||
|
||||
METHOD Generate() CLASS THTML
|
||||
|
||||
::cContent := ;
|
||||
::cContent := ;
|
||||
"<html><head>" + hb_eol() + ;
|
||||
"<title>" + ::cTitle + "</title>" + hb_eol() + ;
|
||||
"<body link='" + ::cLinkColor + "' " + ;
|
||||
@@ -114,7 +114,7 @@ METHOD Generate() CLASS THTML
|
||||
|
||||
METHOD ShowResult() CLASS THTML
|
||||
|
||||
OutStd( ;
|
||||
OutStd( ;
|
||||
;// "HTTP/1.0 200 OK" + hb_eol() + ;
|
||||
"CONTENT-TYPE: TEXT/HTML" + hb_eol() + hb_eol() + ;
|
||||
::cContent )
|
||||
|
||||
@@ -57,19 +57,19 @@ PROCEDURE Main()
|
||||
|
||||
FUNCTION TValue
|
||||
|
||||
STATIC oClass
|
||||
STATIC s_oClass
|
||||
|
||||
IF oClass == NIL
|
||||
oClass := HBClass():New( "TValue" )
|
||||
IF s_oClass == NIL
|
||||
s_oClass := HBClass():New( "TValue" )
|
||||
|
||||
oClass:AddData( "cVal" )
|
||||
oClass:AddMethod( "New", @New() ) // New Method
|
||||
s_oClass:AddData( "cVal" )
|
||||
s_oClass:AddMethod( "New", @New() ) // New() Method
|
||||
|
||||
oClass:Create()
|
||||
s_oClass:Create()
|
||||
|
||||
ENDIF
|
||||
|
||||
RETURN oClass:Instance()
|
||||
RETURN s_oClass:Instance()
|
||||
|
||||
STATIC FUNCTION New()
|
||||
|
||||
|
||||
@@ -43,13 +43,13 @@ PROCEDURE Main()
|
||||
#pragma /Z-
|
||||
/* or #pragma Shortcut=Off */
|
||||
|
||||
#pragma Exitseverity=0
|
||||
#pragma Exitseverity=1
|
||||
#pragma Exitseverity(0)
|
||||
#pragma Exitseverity( 1 )
|
||||
#pragma Exitseverity( 0 )
|
||||
#pragma Exitseverity= 2
|
||||
#pragma Exitseverity= 1
|
||||
#pragma ExitSeverity=0
|
||||
#pragma ExitSeverity=1
|
||||
#pragma ExitSeverity(0)
|
||||
#pragma ExitSeverity( 1 )
|
||||
#pragma ExitSeverity( 0 )
|
||||
#pragma ExitSeverity= 2
|
||||
#pragma ExitSeverity= 1
|
||||
|
||||
/* Pragmas with bad values will cause an error */
|
||||
#pragma WarningLevel=8
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
/*
|
||||
* hbmk2 plugin script, implementing support for bison
|
||||
*
|
||||
* Copyright 2011 Viktor Szakats (harbour syenar.net)
|
||||
* Copyright 2011-2013 Viktor Szakats (harbour syenar.net)
|
||||
* www - http://harbour-project.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -25,7 +25,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma warninglevel=3
|
||||
#pragma -w3
|
||||
#pragma -km+
|
||||
#pragma -ko+
|
||||
|
||||
@@ -120,8 +120,8 @@ FUNCTION hbmk_plugin_bison( hbmk )
|
||||
|
||||
cCommand := hbmk[ "vars" ][ "cBIS_BIN" ] + ;
|
||||
" -d -p hb_comp" + ;
|
||||
" -o " + hbmk_FNameEscape( hbmk_PathSepToTarget( hbmk, cDst ), hbmk[ "nCmd_Esc" ], hbmk[ "nCmd_FNF" ] ) + ;
|
||||
" " + hbmk_FNameEscape( hbmk_PathSepToTarget( hbmk, cSrc ), hbmk[ "nCmd_Esc" ], hbmk[ "nCmd_FNF" ] )
|
||||
" -o " + hbmk_FNameEscape( hbmk, hbmk_PathSepToTarget( hbmk, cDst ) ) + ;
|
||||
" " + hbmk_FNameEscape( hbmk, hbmk_PathSepToTarget( hbmk, cSrc ) )
|
||||
|
||||
IF hbmk[ "lTRACE" ]
|
||||
IF ! hbmk[ "lQUIET" ]
|
||||
@@ -187,7 +187,8 @@ STATIC FUNCTION tool_detect( hbmk, cName )
|
||||
|
||||
PROCEDURE Main()
|
||||
|
||||
? "Cannot be run in standalone mode. Use it with -plugin= option of hbmk2."
|
||||
?? "Cannot be run in standalone mode. Use it with -plugin= option of hbmk2."
|
||||
?
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
/*
|
||||
* hbmk2 plugin example
|
||||
*
|
||||
* Copyright 2010 Viktor Szakats (harbour syenar.net)
|
||||
* Copyright 2010-2013 Viktor Szakats (harbour syenar.net)
|
||||
* www - http://harbour-project.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -29,7 +29,7 @@
|
||||
PUBLIC, PRIVATE and STATIC variables. Also do not use
|
||||
temporary disk files with non-random names. [vszakats] */
|
||||
|
||||
#pragma warninglevel=3
|
||||
#pragma -w3
|
||||
|
||||
#if defined( __HBSCRIPT__HBMK_PLUGIN )
|
||||
|
||||
@@ -65,7 +65,8 @@ FUNCTION hbmk_plugin_tpl( hbmk )
|
||||
|
||||
PROCEDURE Main()
|
||||
|
||||
? "Cannot be run in standalone mode. Use it with -plugin= option of hbmk2."
|
||||
?? "Cannot be run in standalone mode. Use it with -plugin= option of hbmk2."
|
||||
?
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
@@ -723,7 +723,7 @@ msgstr "especifique un nuevo destino de compilación. <script> puede ser módulo
|
||||
|
||||
#: hbmk2.prg:7960 hbmk2.prg:11650 hbmk2.prg:13120
|
||||
#, c-format
|
||||
msgid "Options accepting macro variables also support command substitution. Enclose command inside ``, and, if the command contains space, also enclose in double quotes. F.e. \"-cflag=`wx-config --cflags`\", or ldflags={unix&gcc}\"`wx-config --libs`\"."
|
||||
msgid "Options accepting macro variables also support command substitution. Enclose command inside ``, and, if the command contains space, also enclose in double quotes. Standard output of the command will be used as the value. F.e. \"-cflag=`wx-config --cflags`\", or ldflags={unix&gcc}\"`wx-config --libs`\"."
|
||||
msgstr "Tambien acepta Opciones de macros sustitución de comandos. Incluya comando dentro de ``, y, si el comando contiene espacios, también entre comillas dobles. F.e. \"-cflag==`wx-config -cflags`\", o ldflags={unix&gcc}\"`wx-config --libs`\"."
|
||||
|
||||
#: hbmk2.prg:6872 hbmk2.prg:10136 hbmk2.prg:10862
|
||||
@@ -943,7 +943,7 @@ msgstr "no agregue lista adicional de librerías del sistema a lista de librerí
|
||||
|
||||
#: hbmk2.prg:7960 hbmk2.prg:11650 hbmk2.prg:13120
|
||||
#, c-format
|
||||
msgid "Platform filters are accepted in each .hbc line and with several options.\nFilter format: {[!][<platform>|<compiler>|<cpu>|<keyword>]}. Filters can be combined using '&', '|' operators and grouped by parentheses. Ex.: {win}, {gcc}, {linux|darwin}, {win&!pocc}, {(win|linux)&!watcom}, {unix&mt&gui}, -cflag={win}-DMYDEF, -stop{dos}, -stop{!allwin}"
|
||||
msgid "Filters are accepted in each .hbc line and most options.\nFilters can be combined using '&' (and), '|' (or) operators, negated by '!' operator and grouped by parentheses. Ex.: {win}, {gcc}, {linux|darwin}, {win&!pocc}, {(win|linux)&!watcom}, {unix&mt&gui}, -cflag={win}-DMYDEF, -stop{dos}, -stop{!allwin}"
|
||||
msgstr "filtros para plataformas son aceptados en cada linea de archivo .hbc y con varias opciones.\nFormato de filtro: {[!][<plataforma>|<compilador>|<cpu>|<palabra-clave>]}. Filtros pueden ser combinados usando los operadores '&', '|' y agrupados en parénteses. Ej.: {win}, {gcc}, {linux|darwin}, {win&!pocc}, {(win|linux)&!watcom}, {unix&mt&gui}, -cflag={win}-DMYDEF, -stop{dos}, -stop{!allwin}"
|
||||
|
||||
#: hbmk2.prg:7555 hbmk2.prg:7672 hbmk2.prg:7755 hbmk2.prg:11163 hbmk2.prg:11284 hbmk2.prg:11408 hbmk2.prg:12183 hbmk2.prg:12311 hbmk2.prg:12459
|
||||
|
||||
@@ -99,7 +99,7 @@ msgstr "Figyelem: Hibás -gt érték figyelmen kívül hagyva: %1$s"
|
||||
|
||||
#: hbmk2.prg:7959 hbmk2.prg:11650 hbmk2.prg:13120
|
||||
#, c-format
|
||||
msgid "Platform filters are accepted in each .hbc line and with several options.\nFilter format: {[!][<platform>|<compiler>|<cpu>|<keyword>]}. Filters can be combined using '&', '|' operators and grouped by parentheses. Ex.: {win}, {gcc}, {linux|darwin}, {win&!pocc}, {(win|linux)&!watcom}, {unix&mt&gui}, -cflag={win}-DMYDEF, -stop{dos}, -stop{!allwin}"
|
||||
msgid "Filters are accepted in each .hbc line and most options.\nFilters can be combined using '&' (and), '|' (or) operators, negated by '!' operator and grouped by parentheses. Ex.: {win}, {gcc}, {linux|darwin}, {win&!pocc}, {(win|linux)&!watcom}, {unix&mt&gui}, -cflag={win}-DMYDEF, -stop{dos}, -stop{!allwin}"
|
||||
msgstr "A szűrők az egyes .hbc sorokban használhatók és számos opció esetén támogatottak.\nSzűrő formátum: {[!][<platform>|<compiler>|<cpu>|<keyword>]}. Szűrők kombinálhatók '&', '|' operátorokkal és zárójelekkel csoportosíthatók. Pl.: {win}, {gcc}, {linux|darwin}, {win&!pocc}, {(win|linux)&!watcom}, {unix&mt&gui}, -cflag={win}-DMYDEF, -stop{dos}, -stop{!allwin}"
|
||||
|
||||
#: hbmk2.prg:4128 hbmk2.prg:5633 hbmk2.prg:6212
|
||||
@@ -689,7 +689,7 @@ msgstr "nyelvek listája, amelyek a .pot/.po és .hbl/.po állományokban levő
|
||||
|
||||
#: hbmk2.prg:7959 hbmk2.prg:11650 hbmk2.prg:13120
|
||||
#, c-format
|
||||
msgid "Options accepting macro variables also support command substitution. Enclose command inside ``, and, if the command contains space, also enclose in double quotes. F.e. \"-cflag=`wx-config --cflags`\", or ldflags={unix&gcc}\"`wx-config --libs`\"."
|
||||
msgid "Options accepting macro variables also support command substitution. Enclose command inside ``, and, if the command contains space, also enclose in double quotes. Standard output of the command will be used as the value. F.e. \"-cflag=`wx-config --cflags`\", or ldflags={unix&gcc}\"`wx-config --libs`\"."
|
||||
msgstr ""
|
||||
|
||||
#: hbmk2.prg:7959 hbmk2.prg:11650 hbmk2.prg:13120
|
||||
|
||||
@@ -641,7 +641,7 @@ PROCEDURE __hbmk_public_entry( ... )
|
||||
|
||||
RETURN
|
||||
#elif defined( HBMK_USE_APPMAIN )
|
||||
/* for GNU Make build (we can't override default entry, so we use this alternate built-in one */
|
||||
/* for GNU Make build (we cannot override default entry, so we use this alternate built-in one */
|
||||
PROCEDURE _APPMAIN( ... )
|
||||
|
||||
hbmk_local_entry( ... )
|
||||
@@ -7481,7 +7481,7 @@ STATIC PROCEDURE AAddWithWarning( hbmk, aArray, cOption, aParam, lNew )
|
||||
STATIC sc_aWarning := { ;
|
||||
"-Wl,--allow-multiple-definition", ; /* gcc */
|
||||
"muldefs", ; /* ld '-z muldefs' */
|
||||
"force:multiple", ; /* msvc, pocc, watcom */
|
||||
"force:multiple", ; /* msvc, pocc, watcom, xcc */
|
||||
"w-dup" , ; /* bcc */
|
||||
"w-dpl" } /* bcc (for libs) */
|
||||
|
||||
@@ -7534,7 +7534,7 @@ STATIC FUNCTION CheckParamLibPath( hbmk, cPath )
|
||||
ENDIF
|
||||
|
||||
/* check against Harbour core lib directory in its legacy
|
||||
(non multi-compiler/platform) location. It's even more
|
||||
(non multi-compiler/platform) location. It is even more
|
||||
dangerous than above. */
|
||||
IF ! hbmk[ _HBMK_lSysLoc ] .AND. ;
|
||||
hb_FileMatch( cPath, hb_PathNormalize( hb_DirSepAdd( hbmk[ _HBMK_cHB_INSTALL_PFX ] ) + "lib" ) )
|
||||
@@ -9314,7 +9314,8 @@ STATIC PROCEDURE PlugIn_Load( hbmk, cFileName )
|
||||
ENDIF
|
||||
|
||||
IF ! Empty( hrb )
|
||||
IF ! PlugIn_call_low( hbmk, cFileName, hrb, PlugIn_make_ctx( hbmk, "init" ) )
|
||||
hbmk[ _HBMK_hPLUGINVars ][ cFileName ] := { => }
|
||||
IF ! PlugIn_call_low( hbmk, cFileName, hrb, PlugIn_make_ctx( hbmk, "init", hbmk[ _HBMK_hPLUGINVars ][ cFileName ] ) )
|
||||
/* Do not call plugin any further if initialization returned error */
|
||||
IF hbmk[ _HBMK_lInfo ]
|
||||
_hbmk_OutErr( hbmk, hb_StrFormat( I_( "Error: Initializing plugin: %1$s" ), cFileName ) )
|
||||
@@ -9573,12 +9574,12 @@ STATIC FUNCTION hbmk_SecToken()
|
||||
|
||||
/* ; */
|
||||
|
||||
STATIC FUNCTION PlugIn_make_ctx( hbmk, cState )
|
||||
STATIC FUNCTION PlugIn_make_ctx( hbmk, cState, hVars )
|
||||
RETURN { ;
|
||||
"apiver" => _HBMK_PLUGIN_APIVER , ;
|
||||
"cSTATE" => cState , ;
|
||||
"params" => hbmk[ _HBMK_aPLUGINPars ] , ;
|
||||
"vars" => hbmk[ _HBMK_hPLUGINVars ] , ;
|
||||
"vars" => hVars , ;
|
||||
"cPLAT" => hbmk[ _HBMK_cPLAT ] , ;
|
||||
"cCOMP" => hbmk[ _HBMK_cCOMP ] , ;
|
||||
"nCOMPVer" => hbmk[ _HBMK_nCOMPVer ] , ;
|
||||
@@ -9645,14 +9646,12 @@ STATIC FUNCTION PlugIn_Execute_All( hbmk, cState )
|
||||
LOCAL ctx
|
||||
LOCAL lSuccess := .T.
|
||||
|
||||
IF ! Empty( hbmk[ _HBMK_hPLUGINHRB ] )
|
||||
ctx := PlugIn_make_ctx( hbmk, cState )
|
||||
FOR EACH hrb IN hbmk[ _HBMK_hPLUGINHRB ]
|
||||
IF ! PlugIn_call_low( hbmk, hrb:__enumKey(), hrb, ctx )
|
||||
lSuccess := .F.
|
||||
ENDIF
|
||||
NEXT
|
||||
ENDIF
|
||||
FOR EACH hrb IN hbmk[ _HBMK_hPLUGINHRB ]
|
||||
ctx := PlugIn_make_ctx( hbmk, cState, hbmk[ _HBMK_hPLUGINVars ][ hrb:__enumKey() ] )
|
||||
IF ! PlugIn_call_low( hbmk, hrb:__enumKey(), hrb, ctx )
|
||||
lSuccess := .F.
|
||||
ENDIF
|
||||
NEXT
|
||||
|
||||
RETURN lSuccess
|
||||
|
||||
@@ -10306,7 +10305,7 @@ STATIC FUNCTION AutoConfPathList( lCWD, lForDocOutput )
|
||||
|
||||
LOCAL aPath := {}
|
||||
|
||||
/* It will form the output so that it doesn't contain
|
||||
/* It will form the output so that it does not contain
|
||||
configuration specific (potentially sensitive)
|
||||
information by using generic term. */
|
||||
hb_default( @lForDocOutput, .F. )
|
||||
@@ -13697,7 +13696,7 @@ STATIC FUNCTION __hbshell_ConfigDir( lForDocOutput )
|
||||
|
||||
LOCAL cDir
|
||||
|
||||
/* It will form the output so that it doesn't contain
|
||||
/* It will form the output so that it does not contain
|
||||
configuration specific (potentially sensitive)
|
||||
information by using generic term. */
|
||||
hb_default( @lForDocOutput, .F. )
|
||||
@@ -13814,7 +13813,7 @@ FUNCTION hbshell_ext_load( cName )
|
||||
LOCAL cHBC
|
||||
LOCAL cVersion
|
||||
|
||||
IF ! Empty( cName )
|
||||
IF HB_ISSTRING( cName ) .AND. ! Empty( cName )
|
||||
IF __hbshell_CanLoadDyn()
|
||||
IF !( cName $ hbsh[ _HBSH_hLibExt ] )
|
||||
|
||||
@@ -13866,7 +13865,7 @@ FUNCTION hbshell_ext_unload( cName )
|
||||
|
||||
LOCAL hbsh := hbsh()
|
||||
|
||||
IF cName $ hbsh[ _HBSH_hLibExt ] .AND. hbsh[ _HBSH_hLibExt ][ cName ] != NIL
|
||||
IF HB_ISSTRING( cName ) .AND. cName $ hbsh[ _HBSH_hLibExt ] .AND. hbsh[ _HBSH_hLibExt ][ cName ] != NIL
|
||||
hb_HDel( hbsh[ _HBSH_hINCPATH ], cName )
|
||||
hb_HDel( hbsh[ _HBSH_hCH ], cName )
|
||||
hb_HDel( hbsh[ _HBSH_hOPTPRG ], cName )
|
||||
@@ -14665,11 +14664,14 @@ FUNCTION hbshell_include( cName )
|
||||
|
||||
LOCAL hbsh := hbsh()
|
||||
|
||||
cName := Lower( cName )
|
||||
IF HB_ISSTRING( cName )
|
||||
|
||||
IF !( cName $ hbsh[ _HBSH_hCHCORE ] ) .AND. __hbshell_TryHeader( cName )
|
||||
hbsh[ _HBSH_hCHCORE ][ cName ] := NIL
|
||||
RETURN .T.
|
||||
cName := Lower( cName )
|
||||
|
||||
IF !( cName $ hbsh[ _HBSH_hCHCORE ] ) .AND. __hbshell_TryHeader( cName )
|
||||
hbsh[ _HBSH_hCHCORE ][ cName ] := NIL
|
||||
RETURN .T.
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
RETURN .F.
|
||||
@@ -14678,11 +14680,14 @@ FUNCTION hbshell_uninclude( cName )
|
||||
|
||||
LOCAL hbsh := hbsh()
|
||||
|
||||
cName := Lower( cName )
|
||||
IF HB_ISSTRING( cName )
|
||||
|
||||
IF cName $ hbsh[ _HBSH_hCHCORE ]
|
||||
hb_HDel( hbsh[ _HBSH_hCHCORE ], cName )
|
||||
RETURN .T.
|
||||
cName := Lower( cName )
|
||||
|
||||
IF cName $ hbsh[ _HBSH_hCHCORE ]
|
||||
hb_HDel( hbsh[ _HBSH_hCHCORE ], cName )
|
||||
RETURN .T.
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
RETURN .F.
|
||||
@@ -15443,7 +15448,7 @@ STATIC PROCEDURE ShowHelp( hbmk, lFull, lLong )
|
||||
{ "-run[-]" , I_( "run/do not run output executable" ) }, ;
|
||||
{ "-vcshead=<file>" , I_( "generate .ch header file with local repository information. SVN, CVS, Git, Mercurial, Bazaar, Fossil and Monotone are currently supported. Generated header will define preprocessor constant _HBMK_VCS_TYPE_ with the name of detected VCS and _HBMK_VCS_ID_ with the unique ID of local repository" ) }, ;
|
||||
{ "-tshead=<file>" , I_( "generate .ch header file with timestamp information. Generated header will define preprocessor constants _HBMK_BUILD_DATE_, _HBMK_BUILD_TIME_, _HBMK_BUILD_TIMESTAMP_ with the date/time of build" ) }, ;
|
||||
{ "-icon=<file>" , I_( "set <file> as application icon. <file> should be a supported format on the target platform" ) }, ;
|
||||
{ "-icon=<file>" , I_( "set <file> as application icon. <file> should be a supported format on the target platform (not supported by some platforms/compilers). On Windows, it is implemented by generating and linking a resource file." ) }, ;
|
||||
{ "-manifest=<file>" , I_( "embed manifest <file> in executable/dynamic lib (Windows only)" ) }, ;
|
||||
{ "-sign=<key>" , I_( "sign executable with <key> (Windows and Darwin only)" ) }, ;
|
||||
{ "-signpw=<pw>" , I_( "use <pw> as password when signing executable (Windows and Darwin only)" ) }, ;
|
||||
@@ -15481,7 +15486,7 @@ STATIC PROCEDURE ShowHelp( hbmk, lFull, lLong )
|
||||
{ "-clean" , I_( "clean (in incremental build mode)" ) }, ;
|
||||
{ "-workdir=<dir>" , hb_StrFormat( I_( e"working directory\n(default: %1$s/<platform>/<compiler> [*] in incremental mode, OS temp directory otherwise)" ), _WORKDIR_BASE_ ) }, ;
|
||||
NIL, ;
|
||||
{ "-hbcontainer" , I_( "virtual target, it doesn't create anything. Useful for creating an .hbp with the sole purpose of referencing subprojects" ) }, ;
|
||||
{ "-hbcontainer" , I_( "virtual target, it does not create anything. Useful for creating an .hbp with the sole purpose of referencing sub-projects" ) }, ;
|
||||
{ "-hbimplib" , I_( "create import library (Windows only)" ) }, ;
|
||||
NIL, ;
|
||||
{ "-hbl[=<output>]" , hb_StrFormat( I_( "output .hbl filename. %1$s macro is accepted in filename" ), _LNG_MARKER ) }, ;
|
||||
@@ -15615,7 +15620,7 @@ STATIC PROCEDURE ShowHelp( hbmk, lFull, lLong )
|
||||
|
||||
LOCAL aLst_File := { ;
|
||||
NIL, ;
|
||||
{ "*.hbp" , I_( "project file. Can contain command line options, expected to create an output. Lines beginning with '#' character are ignored, otherwise newline is optional, same rules apply as for the command-line." ) }, ;
|
||||
{ "*.hbp" , I_( "project file. Can contain command line options, expected to create an output. Lines beginning with '#' character are ignored, otherwise newline is optional, same rules apply as for the command-line. Each .hbp file reference will be executed as a sub-project." ) }, ;
|
||||
{ "*.hbm" , I_( "collection of options. Can be used to collect common ones into a file and include that into project files. Lines beginning with '#' character are ignored, otherwise newline is optional, same rules apply as for the command-line." ) }, ;
|
||||
{ "*.hbc" , I_( "collection of options that accompany components (aka 'libs', aka packages). Use different syntax than command-line and .hbp/.hbm files. Lines beginning with '#' character are ignored, each directive must be placed in separate lines." ) }, ;
|
||||
{ "*.hb" , I_( "Harbour script" ) }, ;
|
||||
@@ -15669,7 +15674,7 @@ STATIC PROCEDURE ShowHelp( hbmk, lFull, lLong )
|
||||
{ "${hb_first}" , I_( "Name of source file that holds the entry function (without directory and extension)" ) }, ;
|
||||
{ "${hb_outputdir}" , I_( "Directory of the output" ) }, ;
|
||||
{ "${hb_outputname}" , I_( "Name of the output (without extension)" ) }, ;
|
||||
{ "${hb_level}" , I_( "Subproject recursion level" ) }, ;
|
||||
{ "${hb_level}" , I_( "Sub-project recursion level" ) }, ;
|
||||
{ "${<depname>}" , I_( "Returns the header directory of dependency <depname>, or '1' if it is not detected" ) }, ;
|
||||
{ "${<envvar>}" , I_( "Returns the value of the environment variable <envvar>" ) } }
|
||||
|
||||
@@ -15804,7 +15809,7 @@ STATIC PROCEDURE ShowHelp( hbmk, lFull, lLong )
|
||||
LOCAL aLst_PredBuild := { ;
|
||||
NIL, ;
|
||||
{ hb_StrFormat( _HBMK_HAS_TPL, I_( "<depname>" ) ) , I_( "when <depname> dependency was detected" ) }, ;
|
||||
{ hb_StrFormat( _HBMK_DIR_TPL, I_( "<depname>" ) ) , I_( "return the header directory where <depname> was detected, or empty if it wasn't." ) }, ;
|
||||
{ hb_StrFormat( _HBMK_DIR_TPL, I_( "<depname>" ) ) , I_( "return the header directory where <depname> was detected, or empty if it was not." ) }, ;
|
||||
{ hb_StrFormat( _HBMK_HAS_TPL_LOCAL, I_( "<depname>" ) ) , I_( "when <depname> dependency was detected in a location configured by -depincpathlocal= option" ) } }
|
||||
|
||||
#ifndef _HBMK_EMBEDDED_
|
||||
@@ -15848,7 +15853,7 @@ STATIC PROCEDURE ShowHelp( hbmk, lFull, lLong )
|
||||
{ "hbmk_PathSepToTarget( hbmk, cFileName ) -> <cFileName>" , I_( "Convert filename to the format required for the target toolchain." ) }, ;
|
||||
{ "hbmk_PathSepToForward( <cPath> ) -> <cPath>" , I_( "Convert filename to have forward slash directory separators." ) }, ;
|
||||
{ "hbmk_PathFromWorkdirToCWD( hbmk ) -> <cRelativePath>" , I_( "Return relative path of -workdir= value from current working directory." ) }, ;
|
||||
{ "hbmk_FindInPath( <cFileName>, [<xPath>], [<aExtDef>] ) -> <cFNFound> | NIL" , I_( "Find file in <xPath> (array or pathsep delimited string are accepted) with list of <aExtDef> alternate extensions. Returns filename if found and NIL if not." ) }, ;
|
||||
{ "hbmk_FindInPath( <cFileName>, [<xPath>], [<aExtDef>] ) -> <cFNFound> | NIL" , I_( "Find file in <xPath> (array or pathsep delimited string are accepted) with list of <aExtDef> alternate extensions (defaults to executable binaries). Returns filename if found and NIL if not." ) }, ;
|
||||
{ "hbmk_FNameDirExtSet( <cFileName>, [<cDirNew>], [<cExtNew>] ) -> <cFileName>" , I_( "Change directory and/or extension in filename." ) }, ;
|
||||
{ "hbmk_FuncNameEncode( <cFuncName> ) -> <cFuncNameEncoded>" , I_( "Encode function name according to Harbour compiler rules for forming HB_FUNC() function names in C code." ) }, ;
|
||||
{ "hbmk_StrStripQuote( cString ) -> <cString>" , I_( "Strip double quote enclosure from a string." ) }, ;
|
||||
@@ -15863,7 +15868,7 @@ STATIC PROCEDURE ShowHelp( hbmk, lFull, lLong )
|
||||
{ '"apiver"' , I_( "API version as an integer" ) }, ;
|
||||
{ '"cSTATE"' , I_( "callback state. Can be: 'init', 'pre_all', 'pre_prg', 'pre_res', 'pre_c', 'pre_link', 'pre_lib', 'pre_cleanup', 'post_build', 'post_all'" ) }, ;
|
||||
{ '"params"' , I_( "array of parameters passed to plugins via -pflag=/pi= options or having an extension registered via hbmk_Register_Input_File_Extension()" ) }, ;
|
||||
{ '"vars"' , I_( "hash of plugin custom variables. Common to all plugins, writable" ) }, ;
|
||||
{ '"vars"' , I_( "hash of plugin custom variables. Writable, local to each plugin" ) }, ;
|
||||
{ '"cPLAT"' , I_( "-plat value" ) }, ;
|
||||
{ '"cCOMP"' , I_( "-comp value" ) }, ;
|
||||
{ '"nCOMPVer"' , I_( "see HB_COMPILER_VER envvar" ) }, ;
|
||||
@@ -15904,9 +15909,9 @@ STATIC PROCEDURE ShowHelp( hbmk, lFull, lLong )
|
||||
I_( e"Regular Harbour compiler options are also accepted as is.\n(see them with -harbourhelp option)" ), ;
|
||||
hb_StrFormat( I_( "%1$s option file in %2$s directory is always processed if it exists. On *nix platforms ~/.harbour, /etc/harbour, <base>/etc/harbour, <base>/etc are checked (in that order) before the %2$s directory." ), _HBMK_AUTOHBC_NAME, _SELF_NAME_ ), ;
|
||||
hb_StrFormat( I_( "%1$s make script in current directory is always processed if it exists." ), _HBMK_AUTOHBM_NAME ), ;
|
||||
I_( e"Platform filters are accepted in each .hbc line and with several options.\nFilter format: {[!][<platform>|<compiler>|<cpu>|<keyword>]}. Filters can be combined using '&', '|' operators and grouped by parentheses. Ex.: {win}, {gcc}, {linux|darwin}, {win&!pocc}, {(win|linux)&!watcom}, {unix&mt&gui}, -cflag={win}-DMYDEF, -stop{dos}, -stop{!allwin}" ), ;
|
||||
I_( e"Filters are accepted in each .hbc line and most options.\nFilters can be combined using '&' (and), '|' (or) operators, negated by '!' operator and grouped by parentheses. Ex.: {win}, {gcc}, {linux|darwin}, {win&!pocc}, {(win|linux)&!watcom}, {unix&mt&gui}, -cflag={win}-DMYDEF, -stop{dos}, -stop{!allwin}" ), ;
|
||||
I_( "Most .hbc lines (libs=, hbcs=, prgflags=, cflags=, ldflags=, libpaths=, instfiles=, instpaths=, echo=) and corresponding command line parameters will accept macro variables. libpaths= also accepts %{hb_name} which translates to the name of the .hbc file under search." ), ;
|
||||
I_( 'Options accepting macro variables also support command substitution. Enclose command inside ``, and, if the command contains space, also enclose in double quotes. F.e. "-cflag=`wx-config --cflags`", or ldflags={unix&gcc}"`wx-config --libs`".' ), ;
|
||||
I_( e"Options accepting macro variables also support command substitution. Enclose command inside ``, and, if the command contains space, also enclose in double quotes. Standard output of the command will be used as the value. F.e. \"-cflag=`wx-config --cflags`\", or ldflags={unix&gcc}\"`wx-config --libs`\"." ), ;
|
||||
I_( "Libraries and object files built with/for CA-Cl*pper will not work with any supported platform/compiler." ), ;
|
||||
I_( "Defaults and feature support may vary by platform/compiler." ), ;
|
||||
hb_StrFormat( I_( "GNU Make or any C compiler specific make tool and MSYS (on Windows) are not needed to run %1$s." ), _SELF_NAME_ ), ;
|
||||
@@ -15933,8 +15938,7 @@ STATIC PROCEDURE ShowHelp( hbmk, lFull, lLong )
|
||||
e"and other required tools and call them appropriately. " + ;
|
||||
e"%1$s allows to extend the types of supported source files via plugins.\n" + ;
|
||||
e"Besides building executables, %1$s is able to run Harbour scripts directly, " + ;
|
||||
e"and it also features an integrated shell prompt." + ;
|
||||
e"" ), _SELF_NAME_ )
|
||||
e"and it also features an integrated shell prompt." ), _SELF_NAME_ )
|
||||
|
||||
LOCAL aLst_Desc := { ;
|
||||
NIL, ;
|
||||
@@ -16047,10 +16051,7 @@ STATIC PROCEDURE ShowHelp( hbmk, lFull, lLong )
|
||||
AEval( aHdr_APIShell, {| tmp | OutHdr( hbmk, tmp + _OUT_EOL ) } )
|
||||
AEval( aLst_APIShell, {| tmp | OutOpt( hbmk, tmp, -1 ) } )
|
||||
#endif
|
||||
/* TODO: Move to separate section from notes:
|
||||
- filter and macro syntax, %{}, subprojects
|
||||
- shell plugins
|
||||
*/
|
||||
/* TODO: %{}, shell plugins */
|
||||
ENDIF
|
||||
AEval( aHdr_ExampleBasic, {| tmp | OutOpt( hbmk, tmp, 0 ) } )
|
||||
AEval( aLst_ExampleBasic, {| tmp | OutOpt( hbmk, tmp, -1 ) } )
|
||||
|
||||
@@ -723,7 +723,7 @@ msgstr "especifique um novo alvo para compilação. <script> pode ser módulo .p
|
||||
|
||||
#: hbmk2.prg:7960 hbmk2.prg:11650 hbmk2.prg:13120
|
||||
#, c-format
|
||||
msgid "Options accepting macro variables also support command substitution. Enclose command inside ``, and, if the command contains space, also enclose in double quotes. F.e. \"-cflag=`wx-config --cflags`\", or ldflags={unix&gcc}\"`wx-config --libs`\"."
|
||||
msgid "Options accepting macro variables also support command substitution. Enclose command inside ``, and, if the command contains space, also enclose in double quotes. Standard output of the command will be used as the value. F.e. \"-cflag=`wx-config --cflags`\", or ldflags={unix&gcc}\"`wx-config --libs`\"."
|
||||
msgstr "Opções aceitando macros também suportam linhas de comando. Neste caso basta rodeiar o comando dentro de ``, e, se o comando contiver espaço, também adicione aspas duplas. i.e. \"-cflag=`wx-config --cflags`\", ou ldflags={unix&gcc}\"`wx-config --libs`\"."
|
||||
|
||||
#: hbmk2.prg:6872 hbmk2.prg:10136 hbmk2.prg:10862
|
||||
@@ -943,7 +943,7 @@ msgstr "não adicione bibliotecas extras do sistema à lista padrão de bibliote
|
||||
|
||||
#: hbmk2.prg:7960 hbmk2.prg:11650 hbmk2.prg:13120
|
||||
#, c-format
|
||||
msgid "Platform filters are accepted in each .hbc line and with several options.\nFilter format: {[!][<platform>|<compiler>|<cpu>|<keyword>]}. Filters can be combined using '&', '|' operators and grouped by parentheses. Ex.: {win}, {gcc}, {linux|darwin}, {win&!pocc}, {(win|linux)&!watcom}, {unix&mt&gui}, -cflag={win}-DMYDEF, -stop{dos}, -stop{!allwin}"
|
||||
msgid "Filters are accepted in each .hbc line and most options.\nFilters can be combined using '&' (and), '|' (or) operators, negated by '!' operator and grouped by parentheses. Ex.: {win}, {gcc}, {linux|darwin}, {win&!pocc}, {(win|linux)&!watcom}, {unix&mt&gui}, -cflag={win}-DMYDEF, -stop{dos}, -stop{!allwin}"
|
||||
msgstr "Os filtros para plataformas são aceitos para cada uma das linhas de um arquivo .hbc e possuem diversas opções.\nFormato de um filtro: {[!][<arquitetura>|<compilador>|<cpu>|<palavra-chave>]}. Os filtros podem ser combinados usando os operadores '&', '|' e agrupados por parênteses. Ex.: {win}, {gcc}, {linux|darwin}, {win&!pocc}, {(win|linux)&!watcom}, {unix&mt&gui}, -cflag={win}-DMYDEF, -stop{dos}, -stop{!allwin}"
|
||||
|
||||
#: hbmk2.prg:7555 hbmk2.prg:7672 hbmk2.prg:7755 hbmk2.prg:11163 hbmk2.prg:11284 hbmk2.prg:11408 hbmk2.prg:12183 hbmk2.prg:12311 hbmk2.prg:12459
|
||||
|
||||
Reference in New Issue
Block a user