2012-06-04 23:24 UTC+0200 Viktor Szakats (harbour syenar.net)

* contrib\gtwvg\wvgwing.c
    ! fixed 64-bit warning (do not use NULL for numeric parameters)

  * contrib\hbqt\gtqtc\gtqtc.cpp
  * contrib\hbqt\hbmk2_qt.hb
  * contrib\hbqt\qtcore\hbqt_bind.cpp
  * contrib\hbqt\qtcore\hbqt_pointer.cpp
  * contrib\hbqt\qtgui\hbqt_errorsys.prg
  * contrib\hbqt\tests\demoqt.prg
  * contrib\hbqt\tests\testbrow.prg
    ! killed HB_TR_ALWAYS _again_. Do not readd them.
    + added TOFIX for .qth information embedded into plugin
    % minor opt in .prg code

  * include\harbour.hbx
  * src\rtl\hbdef.c
    + added __DEFAULTNIL() which is fully compatible with DEFAULT ... TO ...

  * src\debug\dbghelp.prg
  * src\debug\dbgtarr.prg
  * src\debug\dbgthsh.prg
  * src\debug\dbgtmitm.prg
  * src\debug\dbgtobj.prg
  * src\debug\dbgtwin.prg
  * src\debug\debugger.prg
  * src\rdd\usrrdd\rdds\arrayrdd.prg
  * src\rtl\achoice.prg
  * src\rtl\radiogrp.prg
  * src\rtl\tbrowse.prg
  * src\rtl\tclass.prg
  * src\rtl\tget.prg
  * src\rtl\tlabel.prg
  * src\rtl\treport.prg
    * using HB_DEFAULT() instead of DEFAULT ... TO ...
    % deleted '#include "common.ch"' where possible
This commit is contained in:
Viktor Szakats
2012-06-04 21:28:37 +00:00
parent 80e1f2399a
commit d67c95e1bb
26 changed files with 258 additions and 221 deletions

View File

@@ -62,7 +62,6 @@
redirection, and is also slower. [vszakats] */
#include "box.ch"
#include "common.ch"
#include "inkey.ch"
PROCEDURE __dbgHelp( nTopic )
@@ -72,7 +71,7 @@ PROCEDURE __dbgHelp( nTopic )
LOCAL oBrw
LOCAL aTopics := GetTopics()
DEFAULT nTopic TO 1
hb_default( @nTopic, 1 )
oDlg := HBDbWindow():New( 2, 2, MaxRow() - 2, MaxCol() - 2, "Help", cColor )

View File

@@ -55,7 +55,6 @@
#define HB_CLS_NOTOBJECT /* do not inherit from HBObject calss */
#include "hbclass.ch"
#include "common.ch"
#include "inkey.ch"
#include "setcurs.ch"
@@ -77,7 +76,7 @@ ENDCLASS
METHOD New( aArray, cVarName, lEditable ) CLASS HBDbArray
DEFAULT lEditable TO .T.
hb_default( @lEditable, .T. )
::arrayName := cVarName
::TheArray := aArray

View File

@@ -55,7 +55,6 @@
#define HB_CLS_NOTOBJECT /* do not inherit from HBObject calss */
#include "hbclass.ch"
#include "common.ch"
#include "inkey.ch"
#include "setcurs.ch"
@@ -77,7 +76,7 @@ ENDCLASS
METHOD New( hHash, cVarName, lEditable ) CLASS HBDbHash
DEFAULT lEditable TO .T.
hb_default( @lEditable, .T. )
::hashName := cVarName
::TheHash := hHash

View File

@@ -59,8 +59,6 @@
#define HB_CLS_NOTOBJECT /* do not inherit from HBObject calss */
#include "hbclass.ch"
#include "common.ch"
CREATE CLASS HBDbMenuItem
VAR nRow
@@ -81,7 +79,7 @@ ENDCLASS
METHOD New( cPrompt, bAction, lChecked, xIdent ) CLASS HBDbMenuItem
DEFAULT lChecked TO .F.
hb_default( @lChecked, .F. )
::cPrompt := cPrompt
::bAction := bAction

View File

@@ -55,7 +55,6 @@
#define HB_CLS_NOTOBJECT /* do not inherit from HBObject calss */
#include "hbclass.ch"
#include "common.ch"
#include "inkey.ch"
#include "setcurs.ch"
@@ -84,7 +83,7 @@ METHOD New( oObject, cVarName, lEditable ) CLASS HBDbObject
LOCAL aMessages, aMethods
LOCAL xValue
DEFAULT lEditable TO .T.
hb_default( @lEditable, .T. )
/* create list of object messages */
aMessages := oObject:classSel()

View File

@@ -73,7 +73,6 @@
#include "hbmemvar.ch"
#include "box.ch"
#include "common.ch"
#include "inkey.ch"
#include "setcurs.ch"
@@ -123,7 +122,7 @@ ENDCLASS
METHOD New( nTop, nLeft, nBottom, nRight, cCaption, cColor ) CLASS HBDbWindow
DEFAULT cColor TO __DbgColors()[ 1 ]
hb_default( @cColor, __DbgColors()[ 1 ] )
::nTop := nTop
::nLeft := nLeft
@@ -157,7 +156,7 @@ METHOD IsOver( nRow, nCol ) CLASS HBDbWindow
METHOD ScrollUp( nLines ) CLASS HBDbWindow
DEFAULT nLines TO 1
hb_default( @nLines, 1 )
SetColor( ::cColor )
Scroll( ::nTop + 1, ::nLeft + 1, ::nBottom - 1, ::nRight - 1, nLines )
@@ -215,7 +214,7 @@ METHOD Show( lFocused ) CLASS HBDbWindow
LOCAL nRow := Row()
LOCAL nCol := Col()
DEFAULT lFocused TO ::lFocused
hb_default( @lFocused, ::lFocused )
::cBackImage := SaveScreen( ::nTop, ::nLeft, ::nBottom + iif( ::lShadow, 1, 0 ),;
::nRight + iif( ::lShadow, 2, 0 ) )

View File

@@ -81,7 +81,6 @@
#include "hbmemvar.ch"
#include "box.ch"
#include "common.ch"
#include "getexit.ch"
#include "inkey.ch"
#include "set.ch"
@@ -1499,7 +1498,7 @@ METHOD InputBox( cMsg, uValue, bValid, lEditable ) CLASS HBDebugger
LOCAL lExit
LOCAL oWndInput := HBDbWindow():New( nTop, nLeft, nBottom, nRight, cMsg,;
::oPullDown:cClrPopup )
DEFAULT lEditable TO .T.
hb_default( @lEditable, .T. )
oWndInput:lShadow := .T.
oWndInput:Show()
@@ -1587,7 +1586,7 @@ METHOD IsValidStopLine( cName, nLine ) CLASS HBDebugger
METHOD LineNumbers( lLineNumbers ) CLASS HBDebugger
DEFAULT lLineNumbers TO !::lLineNumbers
hb_default( @lLineNumbers, !::lLineNumbers )
::lLineNumbers := lLineNumbers
::oPulldown:GetItemByIdent( "LINE" ):checked := ::lLineNumbers
@@ -1798,7 +1797,7 @@ METHOD Locate( nMode, cValue ) CLASS HBDebugger
LOCAL lFound
DEFAULT nMode TO 0
hb_default( @nMode, 0 )
IF Empty( cValue )
::cSearchString := PadR( ::cSearchString, 256 )
@@ -3290,7 +3289,7 @@ STATIC FUNCTION strip_path( cFileName )
LOCAL cName
LOCAL cExt
DEFAULT cFileName TO ""
hb_default( @cFileName, "" )
hb_FNameSplit( cFileName, NIL, @cName, @cExt )

View File

@@ -1620,8 +1620,8 @@ STATIC FUNCTION PutValue( xValue, cType, nLen, nDec )
STATIC FUNCTION EmptyValue( cType, nLen, nDec )
LOCAL xVal
DEFAULT nLen TO 0
DEFAULT nDec TO 0
hb_default( @nLen, 0 )
hb_default( @nDec, 0 )
DO CASE
CASE cType == "C" .OR. cType == "M"

View File

@@ -608,7 +608,7 @@ STATIC PROCEDURE DispPage( acItems, alSelect, nTop, nLeft, nRight, nNumRows, nPo
LOCAL nRow // Screen row
LOCAL nIndex // Array index
DEFAULT nRowsClr TO nNumRows
hb_default( @nRowsClr, nNumRows )
DispBegin()

View File

@@ -55,7 +55,7 @@
HB_FUNC( HB_DEFAULT )
{
if( hb_pcount() == 2 )
if( hb_pcount() >= 2 )
{
PHB_ITEM pDefault = hb_param( 2, HB_IT_ANY );
@@ -63,3 +63,11 @@ HB_FUNC( HB_DEFAULT )
hb_itemParamStore( 1, pDefault );
}
}
/* For compatibility with legacy DEFAULT ... TO ... command.
Not recommended for new code. */
HB_FUNC( __DEFAULTNIL )
{
if( hb_pcount() >= 2 && HB_IS_NIL( hb_param( 1, HB_IT_ANY ) ) )
hb_itemParamStore( 1, hb_param( 2, HB_IT_ANY ) );
}

View File

@@ -427,7 +427,7 @@ METHOD select( xValue ) CLASS RADIOGROUP
FOR nPos := 1 TO nLen
IF ::aItems[ nPos ]:data == xValue
DEFAULT ::xBuffer TO ""
hb_default( @::xBuffer, "" )
::changeButton( ::nValue, nPos )
EXIT
@@ -440,7 +440,7 @@ METHOD select( xValue ) CLASS RADIOGROUP
ELSEIF cType == "N" .AND. xValue >= 1 .AND. xValue <= ::nItemCount
DEFAULT ::xBuffer TO 0
hb_default( @::xBuffer, 0 )
::changeButton( ::nValue, xValue )
ENDIF

View File

@@ -2666,7 +2666,7 @@ METHOD setStyle( nStyle, lNewValue ) CLASS TBROWSE
/* NOTE: CA-Cl*pper 5.3 will initialize this var on the first
:setStyle() method call. [vszakats] */
DEFAULT ::styles TO { .F., .F., .F., .F., .F., NIL }
hb_default( @::styles, { .F., .F., .F., .F., .F., NIL } )
/* NOTE: CA-Cl*pper 5.3 does no checks on the value of nStyle, so in case
it is zero or non-numeric, a regular RTE will happen. [vszakats] */

View File

@@ -170,7 +170,7 @@ STATIC FUNCTION New( cClassName, xSuper, sClassFunc, lModuleFriendly )
LOCAL Self := QSelf()
LOCAL i
DEFAULT lModuleFriendly TO .F.
hb_default( @lModuleFriendly, .F. )
IF HB_ISSYMBOL( xSuper )
::asSuper := { xSuper }
@@ -304,8 +304,8 @@ STATIC FUNCTION Instance()
STATIC PROCEDURE AddData( cData, xInit, cType, nScope, lNoinit )
DEFAULT lNoInit TO .F.
DEFAULT nScope TO HB_OO_CLSTP_EXPORTED
hb_default( @lNoInit, .F. )
hb_default( @nScope, HB_OO_CLSTP_EXPORTED )
/* Default Init for Logical and numeric */
IF ! lNoInit .AND. cType != NIL .AND. xInit == NIL
@@ -349,8 +349,8 @@ STATIC PROCEDURE AddMultiData( cType, xInit, nScope, aData, lNoInit )
STATIC PROCEDURE AddClassData( cData, xInit, cType, nScope, lNoInit )
DEFAULT lNoInit TO .F.
DEFAULT nScope TO HB_OO_CLSTP_EXPORTED
hb_default( @lNoInit, .F. )
hb_default( @nScope, HB_OO_CLSTP_EXPORTED )
nScope := hb_bitOr( nScope, HB_OO_CLSTP_CLASS )
@@ -396,7 +396,7 @@ STATIC PROCEDURE AddMultiClsData( cType, xInit, nScope, aData, lNoInit )
STATIC PROCEDURE AddInline( cMethod, bCode, nScope )
DEFAULT nScope TO HB_OO_CLSTP_EXPORTED
hb_default( @nScope, HB_OO_CLSTP_EXPORTED )
AAdd( QSelf():aInlines, { cMethod, bCode, nScope } )
@@ -404,7 +404,7 @@ STATIC PROCEDURE AddInline( cMethod, bCode, nScope )
STATIC PROCEDURE AddMethod( cMethod, nFuncPtr, nScope )
DEFAULT nScope TO HB_OO_CLSTP_EXPORTED
hb_default( @nScope, HB_OO_CLSTP_EXPORTED )
AAdd( QSelf():aMethods, { cMethod, nFuncPtr, nScope } )
@@ -412,7 +412,7 @@ STATIC PROCEDURE AddMethod( cMethod, nFuncPtr, nScope )
STATIC PROCEDURE AddClsMethod( cMethod, nFuncPtr, nScope )
DEFAULT nScope TO HB_OO_CLSTP_EXPORTED
hb_default( @nScope, HB_OO_CLSTP_EXPORTED )
nScope := hb_bitOr( nScope, HB_OO_CLSTP_CLASS )

View File

@@ -1156,7 +1156,7 @@ METHOD PutMask( xValue, lEdit ) CLASS GET
LOCAL cPicMask := ::cPicMask
LOCAL nFor
DEFAULT lEdit TO ::hasFocus
hb_default( @lEdit, ::hasFocus )
IF !( ValType( xValue ) $ "CNDTL" )
xValue := ""

View File

@@ -466,7 +466,7 @@ FUNCTION __LabelForm( cLBLName, lPrinter, cAltFile, lNoConsole, bFor, ;
STATIC PROCEDURE PrintIt( cString )
DEFAULT cString TO ""
hb_default( @cString, "" )
QQOut( cString )
QOut()
@@ -479,7 +479,7 @@ STATIC FUNCTION ListAsArray( cList, cDelimiter )
LOCAL aList := {} // Define an empty array
LOCAL lDelimLast := .F.
DEFAULT cDelimiter TO ","
hb_default( @cDelimiter, "," )
DO WHILE Len( cList ) != 0

View File

@@ -450,7 +450,7 @@ METHOD New( cFrmName AS STRING,;
METHOD PrintIt( cString AS STRING ) CLASS HBReportForm
DEFAULT cString TO ""
hb_default( @cString, "" )
QQOut( cString )
QOut()
@@ -1207,9 +1207,9 @@ STATIC FUNCTION Occurs( cSearch, cTarget )
STATIC FUNCTION XMLCOUNT( cString, nLineLength, nTabSize, lWrap )
DEFAULT nLineLength TO 79
DEFAULT nTabSize TO 4
DEFAULT lWrap TO .T.
hb_default( @nLineLength, 79 )
hb_default( @nTabSize, 4 )
hb_default( @lWrap, .T. )
IF nTabSize >= nLineLength
nTabSize := nLineLength - 1
@@ -1225,10 +1225,10 @@ STATIC FUNCTION XMLCOUNT( cString, nLineLength, nTabSize, lWrap )
*/
STATIC FUNCTION XMEMOLINE( cString, nLineLength, nLineNumber, nTabSize, lWrap )
DEFAULT nLineLength TO 79
DEFAULT nLineNumber TO 1
DEFAULT nTabSize TO 4
DEFAULT lWrap TO .T.
hb_default( @nLineLength, 79 )
hb_default( @nLineNumber, 1 )
hb_default( @nTabSize, 4 )
hb_default( @lWrap, .T. )
IF nTabSize >= nLineLength
nTabSize := nLineLength - 1
@@ -1362,7 +1362,7 @@ STATIC FUNCTION ListAsArray( cList, cDelimiter )
LOCAL aList := {} // Define an empty array
LOCAL lDelimLast := .F.
DEFAULT cDelimiter TO ","
hb_default( @cDelimiter, "," )
DO WHILE Len( cList ) != 0