2009-06-25 12:15 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)

* INSTALL
    * Minor

  * contrib/hbmysql/mysql.c
  * contrib/hbodbc/odbc.c
  * contrib/hbtpathy/tpcommon.c
  * contrib/hbsqlit3/hbsqlit3.c
  * contrib/hbpgsql/postgres.c
  * contrib/hbmisc/strfmt.c
  * contrib/hbwin/win_prn2.c
  * contrib/hbwin/win_prt.c
  * contrib/hbwin/win_prn1.c
  * contrib/hbqt/hbqt_slots.cpp
    * 'const' cleanup.

  * contrib/hbqt/generator/hbqtgen.prg
  + contrib/hbqt/generator/hbmk.hbm
    ! Fixed all warnings.
    ! Fixed to generate different Harbour interface code
      for different QT integer types.
    * Some formatting. (IF() -> iif(), spaces)
    + Added .hbm file to ensure warning-free code.

  * contrib/hbqt/hbqt_qimage.cpp
  * contrib/hbqt/hbqt_qlatin1char.cpp
  * contrib/hbqt/hbqt_qdatetime.cpp
  * contrib/hbqt/hbqt_qfilesystemmodel.cpp
  * contrib/hbqt/hbqt_qpalette.cpp
  * contrib/hbqt/hbqt_qicon.cpp
  * contrib/hbqt/hbqt_qhttp.cpp
  * contrib/hbqt/hbqt_qftp.cpp
  * contrib/hbqt/hbqt_qwebpage.cpp
  * contrib/hbqt/hbqt_qresource.cpp
  * contrib/hbqt/hbqt_qvariant.cpp
  * contrib/hbqt/hbqt_qcolordialog.cpp
  * contrib/hbqt/hbqt_qpixmap.cpp
  * contrib/hbqt/hbqt_qlatin1string.cpp
  * contrib/hbqt/Makefile_gen
  * contrib/hbqt/hbqt_qkeyevent.cpp
  * contrib/hbqt/hbqt_qcoreapplication.cpp
  * contrib/hbqt/hbqt_qcolor.cpp
  * contrib/hbqt/hbqt_qtextstream.cpp
  * contrib/hbqt/hbqt_qmodelindex.cpp
    * Regenerated after generator fixes.
This commit is contained in:
Viktor Szakats
2009-06-25 10:18:21 +00:00
parent 219a90337d
commit f52e6b0f52
34 changed files with 225 additions and 125 deletions

View File

@@ -17,6 +17,52 @@
past entries belonging to author(s): Viktor Szakats.
*/
2009-06-25 12:15 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* INSTALL
* Minor
* contrib/hbmysql/mysql.c
* contrib/hbodbc/odbc.c
* contrib/hbtpathy/tpcommon.c
* contrib/hbsqlit3/hbsqlit3.c
* contrib/hbpgsql/postgres.c
* contrib/hbmisc/strfmt.c
* contrib/hbwin/win_prn2.c
* contrib/hbwin/win_prt.c
* contrib/hbwin/win_prn1.c
* contrib/hbqt/hbqt_slots.cpp
* 'const' cleanup.
* contrib/hbqt/generator/hbqtgen.prg
+ contrib/hbqt/generator/hbmk.hbm
! Fixed all warnings.
! Fixed to generate different Harbour interface code
for different QT integer types.
* Some formatting. (IF() -> iif(), spaces)
+ Added .hbm file to ensure warning-free code.
* contrib/hbqt/hbqt_qimage.cpp
* contrib/hbqt/hbqt_qlatin1char.cpp
* contrib/hbqt/hbqt_qdatetime.cpp
* contrib/hbqt/hbqt_qfilesystemmodel.cpp
* contrib/hbqt/hbqt_qpalette.cpp
* contrib/hbqt/hbqt_qicon.cpp
* contrib/hbqt/hbqt_qhttp.cpp
* contrib/hbqt/hbqt_qftp.cpp
* contrib/hbqt/hbqt_qwebpage.cpp
* contrib/hbqt/hbqt_qresource.cpp
* contrib/hbqt/hbqt_qvariant.cpp
* contrib/hbqt/hbqt_qcolordialog.cpp
* contrib/hbqt/hbqt_qpixmap.cpp
* contrib/hbqt/hbqt_qlatin1string.cpp
* contrib/hbqt/Makefile_gen
* contrib/hbqt/hbqt_qkeyevent.cpp
* contrib/hbqt/hbqt_qcoreapplication.cpp
* contrib/hbqt/hbqt_qcolor.cpp
* contrib/hbqt/hbqt_qtextstream.cpp
* contrib/hbqt/hbqt_qmodelindex.cpp
* Regenerated after generator fixes.
2009-06-25 01:14 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* harbour/contrib/hbxbp/xbpdialog.prg
* harbour/contrib/hbxbp/xbpgeneric.prg
@@ -25,7 +71,7 @@
* harbour/contrib/hbxbp/tests/demoxbp.prg
+ Implemented new mechanism of event handelling.
Now you can click on X button and it will show up a dialog.
Still one point to control but is in working stage.
Still one point to control but is in working stage.
2009-06-25 01:05 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* harbour/contrib/hbqt/Makefile_gen

View File

@@ -689,7 +689,7 @@ QUICK START TO BUILD YOUR OWN HARBOUR APPLICATIONS
'hbmk2 -help'
Besides the ones listed, you can use all regular Harbour
compiler command line options, like:
-l, -b, -n, -w3
-l, -b, -n, -w3 (etc...)
- To make it easier to work with Harbour, it's recommended to
put Harbour binary dir into the PATH:
set PATH=C:\harbour\bin;%PATH% (on Windows)

View File

@@ -73,7 +73,7 @@ HB_FUNC( STRFORMAT )
if( nParNum >= 1 )
{
char * pszMask = hb_parcx( 1 );
const char * pszMask = hb_parcx( 1 );
ULONG nMaskLen = hb_parclen( 1 );
ULONG nMaskPos;
ULONG nPos;
@@ -142,7 +142,7 @@ HB_FUNC( STRFORMAT )
hb_retclen_buffer( pszRetValSave, nRetValLen );
/* Free parameter buffers */
/* Free parameter buffers */
for( nPos = 0; nPos < HB_STRFORMAT_PARNUM_MAX_; nPos++ )
{
if( strpar[ nPos ].raw && strpar[ nPos ].bFreeReq )

View File

@@ -277,7 +277,7 @@ HB_FUNC( MYSQL_LIST_DBS ) /* MYSQL_RES * mysql_list_dbs( MYSQL *, char * wild );
HB_FUNC( MYSQL_LIST_TABLES ) /* MYSQL_RES * mysql_list_tables( MYSQL *, char * wild ); */
{
MYSQL * mysql = ( MYSQL * ) HB_PARPTR( 1 );
char * cWild = hb_parc( 2 );
const char * cWild = hb_parc( 2 );
MYSQL_RES * mresult = mysql_list_tables( mysql, cWild );
long nr = ( long ) mysql_num_rows( mresult );
PHB_ITEM aTables = hb_itemArrayNew( nr );
@@ -317,7 +317,7 @@ HB_FUNC( MYSQL_ESCAPE_STRING )
hb_retclen_buffer( ( char * ) buffer, iSize );
}
static char * filetoBuff( char * fname, int * size )
static char * filetoBuff( const char * fname, int * size )
{
char * buffer = NULL;
HB_FHANDLE handle = hb_fsOpen( ( BYTE * ) fname, FO_READWRITE );

View File

@@ -634,8 +634,8 @@ HB_FUNC( SQLSTOD )
{
if( hb_parclen( 1 ) >= 10 )
{
char * szSqlDate = hb_parc( 1 ); /* YYYY-MM-DD */
char szHrbDate[ 9 ]; /* YYYYMMDD */
const char * szSqlDate = hb_parc( 1 ); /* YYYY-MM-DD */
char szHrbDate[ 9 ]; /* YYYYMMDD */
szHrbDate[ 0 ] = szSqlDate[ 0 ];
szHrbDate[ 1 ] = szSqlDate[ 1 ];

View File

@@ -269,12 +269,12 @@ HB_FUNC( PQEXECPARAMS )
long n = hb_arrayLen( aParam );
long i;
char ** paramvalues = ( char ** ) hb_xgrab( sizeof( char * ) * n );
const char ** paramvalues = ( const char ** ) hb_xgrab( sizeof( char * ) * n );
for( i = 0; i < n; i++ )
paramvalues[ i ] = hb_arrayGetCPtr( aParam, i + 1 );
res = PQexecParams( PGconn_par( 1 ), hb_parcx( 2 ), n, NULL, ( const char * const * ) paramvalues, NULL, NULL, 1 );
res = PQexecParams( PGconn_par( 1 ), hb_parcx( 2 ), n, NULL, paramvalues, NULL, NULL, 1 );
hb_xfree( paramvalues );
}
@@ -552,7 +552,7 @@ HB_FUNC( PQCMDTUPLES )
HB_FUNC( PQESCAPESTRING )
{
char * source = hb_parcx( 1 );
const char * source = hb_parcx( 1 );
size_t size = strlen( source );
char * dest = ( char * ) hb_xgrab( size * 2 + 1 );

View File

@@ -228,7 +228,6 @@ PRG_SOURCES=\
TQAbstractSpinBox.prg \
TQAbstractTableModel.prg \
TQAction.prg \
TQCoreApplication.prg \
TQApplication.prg \
TQBitmap.prg \
TQBoxLayout.prg \
@@ -242,6 +241,7 @@ PRG_SOURCES=\
TQCommandLinkButton.prg \
TQCommonStyle.prg \
TQConicalGradient.prg \
TQCoreApplication.prg \
TQDateEdit.prg \
TQDateTime.prg \
TQDateTimeEdit.prg \

View File

@@ -0,0 +1,5 @@
#
# $Id$
#
-w3 -es2

View File

@@ -66,7 +66,6 @@ FUNCTION Main( ... )
LOCAL x, cPath, cFile, cExt
LOCAL aPrjFiles := {}
LOCAL aProFiles := {}
LOCAL lBuilds := .f.
s_NewLine := hb_OsNewLine()
s_PathSep := hb_OsPathSeparator()
@@ -271,8 +270,8 @@ STATIC FUNCTION PullOutSection( cQth, cSec )
STATIC FUNCTION GenSource( cProFile, cPathIn, cPathOut, cPathDoc )
LOCAL cFile, cWidget, cExt, cPath, cOrg, cCPP, cPRG
LOCAL cQth, cFileCpp
LOCAL s, n, hHandle, nFuncs, nCnvrtd
LOCAL b_, txt_, enum_, code_, func_, dummy_, cpp_, cmntd_, doc_, vrb_, varbls_
LOCAL s, n, nFuncs, nCnvrtd
LOCAL b_, txt_, enum_, code_, func_, dummy_, cpp_, cmntd_, doc_, varbls_
LOCAL class_, cls_, protos_, slots_, enums_
hb_fNameSplit( cProFile, @cPath, @cWidget, @cExt )
@@ -427,7 +426,7 @@ STATIC FUNCTION GenSource( cProFile, cPathIn, cPathOut, cPathDoc )
#if 0
IF !empty( enums_ )
aadd( cpp_, '/*' )
aeval( enums_, {|e| IF( !empty( e ), aadd( cpp_, ' * ' + e ), NIL ) } )
aeval( enums_, {|e| iif( !empty( e ), aadd( cpp_, ' * ' + e ), NIL ) } )
aadd( cpp_, ' */ ' )
aadd( cpp_, '' )
ENDIF
@@ -509,7 +508,9 @@ STATIC FUNCTION ParseProto( cProto, cWidget, txt_, doc_, aEnum, func_ )
LOCAL cPre, cPar, cRet, cFun, cParas, cDocs, cCmd, cPas, s, ss
LOCAL cWdg, cCmn, cPrgRet, cHBFunc, cHBIdx, cDocNM
LOCAL lSuccess
LOCAL cIntegers := 'int,qint16,qint32,qint64,quint16,quint32,quint64,qlonglong,qulonglong,QRgb,QChar'
LOCAL cInt := 'int,qint16,quint16,QChar'
LOCAL cIntLong := 'qint32,quint32,QRgb'
LOCAL cIntLongLong := 'qint64,quint64,qlonglong,qulonglong'
cParas := ''
cDocs := ''
@@ -559,7 +560,7 @@ STATIC FUNCTION ParseProto( cProto, cWidget, txt_, doc_, aEnum, func_ )
ENDIF
aRet[ PRT_NAME ] := aRet[ PRT_CAST ]
IF ascan( aEnum, {|e| IF( empty( e ), .f., e == aRet[ PRT_CAST ] ) } ) > 0
IF ascan( aEnum, {|e| iif( empty( e ), .f., e == aRet[ PRT_CAST ] ) } ) > 0
aRet[ PRT_CAST ] := cWidget + '::' + aRet[ PRT_CAST ]
ENDIF
@@ -611,7 +612,7 @@ STATIC FUNCTION ParseProto( cProto, cWidget, txt_, doc_, aEnum, func_ )
aA[ PRT_NAME ] := cPre
ENDIF
IF ascan( aEnum, {|e| IF( empty( e ), .f., e == aA[ PRT_CAST ] ) } ) > 0
IF ascan( aEnum, {|e| iif( empty( e ), .f., e == aA[ PRT_CAST ] ) } ) > 0
aA[ PRT_CAST ] := cWidget + '::' + aA[ PRT_CAST ]
ENDIF
@@ -628,12 +629,22 @@ STATIC FUNCTION ParseProto( cProto, cWidget, txt_, doc_, aEnum, func_ )
aA[ PRT_DOC ] := 'x'+ cDocNM
/* Values by reference */
CASE aA[ PRT_CAST ] $ cIntegers .and. aA[ PRT_L_FAR ]
aadd( aPre, { 'int i'+cDocNM+' = 0;', nHBIdx, 'i'+ cDocNM, 'hb_storni' } )
aA[ PRT_BODY ] := '&i'+cDocNM
CASE aA[ PRT_CAST ] $ cInt .and. aA[ PRT_L_FAR ]
aadd( aPre, { aA[ PRT_CAST ] + ' i' + cDocNM + ' = 0;', nHBIdx, 'i'+ cDocNM, 'hb_storni' } )
aA[ PRT_BODY ] := '&i' + cDocNM
aA[ PRT_DOC ] := '@n'+ cDocNM
CASE aA[ PRT_CAST ] $ cIntegers
CASE aA[ PRT_CAST ] $ cIntLong .and. aA[ PRT_L_FAR ]
aadd( aPre, { aA[ PRT_CAST ] + ' i' + cDocNM + ' = 0;', nHBIdx, 'i'+ cDocNM, 'hb_stornl' } )
aA[ PRT_BODY ] := '&i' + cDocNM
aA[ PRT_DOC ] := '@n'+ cDocNM
CASE aA[ PRT_CAST ] $ cIntLongLong .and. aA[ PRT_L_FAR ]
aadd( aPre, { aA[ PRT_CAST ] + ' i' + cDocNM + ' = 0;', nHBIdx, 'i'+ cDocNM, 'hb_stornint' } )
aA[ PRT_BODY ] := '&i' + cDocNM
aA[ PRT_DOC ] := '@n'+ cDocNM
CASE aA[ PRT_CAST ] $ cInt
s := 'hb_parni( '+ cHBIdx +' )'
IF !empty( aA[ PRT_DEFAULT ] ) .AND. !( aA[ PRT_DEFAULT ] == "0" )
aA[ PRT_BODY ] := '( HB_ISNUM( '+cHBIdx+' ) ? ' + s + ' : ' + aA[ PRT_DEFAULT ] + ' )'
@@ -642,9 +653,27 @@ STATIC FUNCTION ParseProto( cProto, cWidget, txt_, doc_, aEnum, func_ )
ENDIF
aA[ PRT_DOC ] := 'n'+ cDocNM
CASE aA[ PRT_CAST ] $ cIntLong
s := 'hb_parnl( '+ cHBIdx +' )'
IF !empty( aA[ PRT_DEFAULT ] ) .AND. !( aA[ PRT_DEFAULT ] == "0" )
aA[ PRT_BODY ] := '( HB_ISNUM( '+cHBIdx+' ) ? ' + s + ' : ' + aA[ PRT_DEFAULT ] + ' )'
ELSE
aA[ PRT_BODY ] := s
ENDIF
aA[ PRT_DOC ] := 'n'+ cDocNM
CASE aA[ PRT_CAST ] $ cIntLongLong
s := 'hb_parnint( '+ cHBIdx +' )'
IF !empty( aA[ PRT_DEFAULT ] ) .AND. !( aA[ PRT_DEFAULT ] == "0" )
aA[ PRT_BODY ] := '( HB_ISNUM( '+cHBIdx+' ) ? ' + s + ' : ' + aA[ PRT_DEFAULT ] + ' )'
ELSE
aA[ PRT_BODY ] := s
ENDIF
aA[ PRT_DOC ] := 'n'+ cDocNM
CASE aA[ PRT_CAST ] $ 'double,qreal' .and. aA[ PRT_L_FAR ]
aadd( aPre, { 'qreal qr'+cDocNM+' = 0;', nHBIdx, 'qr'+ cDocNM, 'hb_stornd' } )
aA[ PRT_BODY ] := '&qr'+cDocNM
aadd( aPre, { 'qreal qr' + cDocNM + ' = 0;', nHBIdx, 'qr'+ cDocNM, 'hb_stornd' } )
aA[ PRT_BODY ] := '&qr' + cDocNM
aA[ PRT_DOC ] := '@n'+ cDocNM
CASE aA[ PRT_CAST ] $ 'double,qreal,float'
@@ -656,8 +685,8 @@ STATIC FUNCTION ParseProto( cProto, cWidget, txt_, doc_, aEnum, func_ )
aA[ PRT_DOC ] := 'n'+ cDocNM
CASE ( '::' $ aA[ PRT_CAST ] ) .and. aA[ PRT_L_FAR ]
aadd( aPre, { aA[ PRT_CAST ]+' i'+cDocNM+';', nHBIdx, 'i'+ cDocNM, 'hb_storni' } )
aA[ PRT_BODY ] := '&i'+cDocNM
aadd( aPre, { aA[ PRT_CAST ]+' i' + cDocNM + ';', nHBIdx, 'i'+ cDocNM, 'hb_storni' } )
aA[ PRT_BODY ] := '&i' + cDocNM
aA[ PRT_DOC ] := '@n'+ cDocNM
CASE ( '::' $ aA[ PRT_CAST ] )
@@ -666,8 +695,8 @@ STATIC FUNCTION ParseProto( cProto, cWidget, txt_, doc_, aEnum, func_ )
IF ascan( aEnum, aA[ PRT_DEFAULT ] ) > 0
ss := cWidget+'::'+aA[ PRT_DEFAULT ]
ELSE
ss := IF( '::' $ aA[ PRT_DEFAULT ], aA[ PRT_DEFAULT ], ;
IF( isDigit( left( aA[ PRT_DEFAULT ], 1 ) ), aA[ PRT_DEFAULT ], cWidget+'::'+aA[ PRT_DEFAULT ] ) )
ss := iif( '::' $ aA[ PRT_DEFAULT ], aA[ PRT_DEFAULT ], ;
iif( isDigit( left( aA[ PRT_DEFAULT ], 1 ) ), aA[ PRT_DEFAULT ], cWidget+'::'+aA[ PRT_DEFAULT ] ) )
ENDIF
ss := '( '+ aA[ PRT_CAST ] +' ) '+ss
aA[ PRT_BODY ] := '( HB_ISNUM( '+cHBIdx+' ) ? ' + s + ' : ' + ss + ' )'
@@ -677,8 +706,8 @@ STATIC FUNCTION ParseProto( cProto, cWidget, txt_, doc_, aEnum, func_ )
aA[ PRT_DOC ] := 'n'+ cDocNM
CASE aA[ PRT_CAST ] == 'bool' .and. aA[ PRT_L_FAR ]
aadd( aPre, { 'bool i'+cDocNM+' = 0;', nHBIdx, 'i'+ cDocNM, 'hb_stornl' } )
aA[ PRT_BODY ] := '&i'+cDocNM
aadd( aPre, { 'bool i' + cDocNM + ' = 0;', nHBIdx, 'i'+ cDocNM, 'hb_stornl' } )
aA[ PRT_BODY ] := '&i' + cDocNM
aA[ PRT_DOC ] := '@l'+ cDocNM
CASE aA[ PRT_CAST ] == 'bool'
@@ -741,65 +770,73 @@ STATIC FUNCTION ParseProto( cProto, cWidget, txt_, doc_, aEnum, func_ )
DO CASE
CASE aA[ PRT_CAST ] == 'T'
cCmd := 'hb_retptr( '+ cCmn +' )'
cPrgRet := 'p'+cDocNM
cPrgRet := 'p' + cDocNM
CASE aA[ PRT_CAST ] == 'void'
cCmd := cCmn
cPrgRet := 'NIL'
CASE aA[ PRT_CAST ] $ cIntegers
CASE aA[ PRT_CAST ] $ cInt
cCmd := 'hb_retni( '+ cCmn +' )'
cPrgRet := 'n'+cDocNM
cPrgRet := 'n' + cDocNM
CASE aA[ PRT_CAST ] $ cIntLong
cCmd := 'hb_retnl( '+ cCmn +' )'
cPrgRet := 'n' + cDocNM
CASE aA[ PRT_CAST ] $ cIntLongLong
cCmd := 'hb_retnint( '+ cCmn +' )'
cPrgRet := 'n' + cDocNM
CASE aA[ PRT_CAST ] $ 'double,qreal'
cCmd := 'hb_retnd( '+ cCmn +' )'
cPrgRet := 'n'+cDocNM
cPrgRet := 'n' + cDocNM
CASE ( '::' $ aA[ PRT_CAST ] )
cCmd := 'hb_retni( ( '+ aA[ PRT_CAST ] +' ) ' + cCmn +' )'
cPrgRet := 'n'+cDocNM
cPrgRet := 'n' + cDocNM
CASE aA[ PRT_CAST ] == 'bool'
cCmd := 'hb_retl( '+ cCmn +' )'
cPrgRet := 'l'+cDocNM
cPrgRet := 'l' + cDocNM
CASE aA[ PRT_CAST ] == 'char' .AND. aA[ PRT_L_FAR ]
cCmd := 'hb_retc( '+ cCmn +' )'
cPrgRet := 'c'+cDocNM
cPrgRet := 'c' + cDocNM
CASE aA[ PRT_CAST ] == 'char'
cCmd := 'hb_retni( '+ cCmn +' )'
cPrgRet := 'c'+cDocNM
cPrgRet := 'c' + cDocNM
CASE aA[ PRT_CAST ] == 'QString'
cCmd := 'hb_retc( '+ cCmn +'.toLatin1().data()' +' )'
cPrgRet := 'c'+cDocNM
cPrgRet := 'c' + cDocNM
CASE aA[ PRT_CAST ] == 'FT_Face'
cCmd := 'hb_retc( '+ cCmn +' )'
cPrgRet := 'c'+cDocNM
cPrgRet := 'c' + cDocNM
CASE aA[ PRT_L_FAR ]
cCmd := 'hb_retptr( ( '+ aA[ PRT_CAST ] + '* ) ' + cCmn + ' )'
cPrgRet := 'p'+cDocNM
cPrgRet := 'p' + cDocNM
CASE aA[ PRT_L_AND ] .and. aA[ PRT_L_CONST ]
cCmd := 'hb_retptr( new '+ aA[ PRT_CAST ] + '( ' + cCmn + ' ) )'
cPrgRet := 'p'+cDocNM
cPrgRet := 'p' + cDocNM
CASE aA[ PRT_L_CONST ]
cCmd := 'hb_retptr( new '+ aA[ PRT_CAST ] + '( ' + cCmn + ' ) )'
cPrgRet := 'p'+cDocNM
cPrgRet := 'p' + cDocNM
CASE aA[ PRT_L_AND ]
cCmd := 'hb_retptr( ( '+ aA[ PRT_CAST ] + '* ) ' + cCmn + ' )'
cPrgRet := 'p'+cDocNM
cPrgRet := 'p' + cDocNM
OTHERWISE
/* No attribute is attached to return value */
IF left( aA[ PRT_CAST ], 1 ) == 'Q'
cCmd := 'hb_retptr( new '+ aA[ PRT_CAST ] + '( ' + cCmn + ' ) )'
cPrgRet := 'p'+cDocNM
cPrgRet := 'p' + cDocNM
ELSE
OutStd( '<<< '+cProto + ' | ' + aA[ PRT_CAST ]+' >>>' + s_NewLine )
@@ -856,7 +893,7 @@ STATIC FUNCTION ParseProto( cProto, cWidget, txt_, doc_, aEnum, func_ )
aadd( txt_, "" )
aadd( doc_, 'Qt_'+ cWidget + '_' + cHBFunc +'( p'+ cWidget + ;
IF( empty( cDocs ), '', ', '+ cDocs ) +' ) -> '+ cPrgRet )
iif( empty( cDocs ), '', ', '+ cDocs ) +' ) -> '+ cPrgRet )
aadd( doc_, '' )
ENDIF
@@ -865,17 +902,19 @@ STATIC FUNCTION ParseProto( cProto, cWidget, txt_, doc_, aEnum, func_ )
/*----------------------------------------------------------------------*/
STATIC FUNCTION ParseVariables( cProto, cWidget, txt_, doc_, aEnum, func_ )
LOCAL aRet, aA, aArgus, aArg, aPar, aPre
LOCAL n, nn, nHBIdx
LOCAL cPre, cPar, cRet, cFun, cParas, cDocs, cCmd, cPas, s, ss
LOCAL cWdg, cCmn, cPrgRet, cHBFunc, cHBIdx, cDocNM
LOCAL aRet, aA, aPre
LOCAL n
LOCAL cRet, cFun, cDocs, cCmd
LOCAL cWdg, cCmn, cPrgRet, cHBFunc, cDocNM
LOCAL lSuccess
LOCAL cIntegers := 'int,qint16,qint32,qint64,quint16,quint32,quint64,qlonglong,qulonglong,QRgb,QChar'
LOCAL cInt := 'int,qint16,quint16,QChar'
LOCAL cIntLong := 'qint32,quint32,QRgb'
LOCAL cIntLongLong := 'qint64,quint64,qlonglong,qulonglong'
cParas := ''
aPre := {}
cDocs := ''
aRet := {}; aArgus := {}
aRet := {}
n := at( ' ', cProto )
IF n > 0
IF .t.
@@ -888,7 +927,7 @@ STATIC FUNCTION ParseVariables( cProto, cWidget, txt_, doc_, aEnum, func_ )
aRet[ PRT_CAST ] := cRet
aRet[ PRT_NAME ] := aRet[ PRT_CAST ]
IF ascan( aEnum, {|e| IF( empty( e ), .f., e == aRet[ PRT_CAST ] ) } ) > 0
IF ascan( aEnum, {|e| iif( empty( e ), .f., e == aRet[ PRT_CAST ] ) } ) > 0
aRet[ PRT_CAST ] := cWidget + '::' + aRet[ PRT_CAST ]
ENDIF
@@ -902,48 +941,56 @@ STATIC FUNCTION ParseVariables( cProto, cWidget, txt_, doc_, aEnum, func_ )
DO CASE
CASE aA[ PRT_CAST ] == 'T'
cCmd := 'hb_ret( '+ cCmn +' )'
cPrgRet := 'x'+cDocNM
cPrgRet := 'x' + cDocNM
CASE aA[ PRT_CAST ] $ cIntegers
CASE aA[ PRT_CAST ] $ cInt
cCmd := 'hb_retni( '+ cCmn +' )'
cPrgRet := 'n'+cDocNM
cPrgRet := 'n' + cDocNM
CASE aA[ PRT_CAST ] $ cIntLong
cCmd := 'hb_retnl( '+ cCmn +' )'
cPrgRet := 'n' + cDocNM
CASE aA[ PRT_CAST ] $ cIntLongLong
cCmd := 'hb_retnint( '+ cCmn +' )'
cPrgRet := 'n' + cDocNM
CASE aA[ PRT_CAST ] $ 'double,qreal'
cCmd := 'hb_retnd( '+ cCmn +' )'
cPrgRet := 'n'+cDocNM
cPrgRet := 'n' + cDocNM
CASE ( '::' $ aA[ PRT_CAST ] )
cCmd := 'hb_retni( ( '+ aA[ PRT_CAST ] +' ) ' + cCmn +' )'
cPrgRet := 'n'+cDocNM
cPrgRet := 'n' + cDocNM
CASE aA[ PRT_CAST ] == 'bool'
cCmd := 'hb_retl( '+ cCmn +' )'
cPrgRet := 'l'+cDocNM
cPrgRet := 'l' + cDocNM
CASE aA[ PRT_CAST ] == 'char*'
cCmd := 'hb_retc( '+ cCmn +' )'
cPrgRet := 'c'+cDocNM
cPrgRet := 'c' + cDocNM
CASE aA[ PRT_CAST ] == 'char'
cCmd := 'hb_retni( '+ cCmn +' )'
cPrgRet := 'c'+cDocNM
cPrgRet := 'c' + cDocNM
CASE aA[ PRT_CAST ] == 'QString'
cCmd := 'hb_retc( '+ cCmn +'.toLatin1().data()' +' )'
cPrgRet := 'c'+cDocNM
cPrgRet := 'c' + cDocNM
CASE aA[ PRT_CAST ] == 'FT_Face'
cCmd := 'hb_retc( '+ cCmn +' )'
cPrgRet := 'c'+cDocNM
cPrgRet := 'c' + cDocNM
OTHERWISE
/* No attribute is attached to return value */
IF left( aA[ PRT_CAST ], 1 ) == 'Q'
cCmd := 'hb_retptr( new '+ aA[ PRT_CAST ] + '( ' + cCmn + ' ) )'
cPrgRet := 'p'+cDocNM
cPrgRet := 'p' + cDocNM
ELSE
OutStd( '<<< '+cProto + ' | ' + aA[ PRT_CAST ]+' >>>' + s_NewLine )
OutStd( '<<< ' + cProto + ' | ' + aA[ PRT_CAST ] + ' >>>' + s_NewLine )
cCmd := ''
cPrgRet := ''
@@ -997,7 +1044,7 @@ STATIC FUNCTION ParseVariables( cProto, cWidget, txt_, doc_, aEnum, func_ )
aadd( txt_, "" )
aadd( doc_, 'Qt_'+ cWidget + '_' + cHBFunc +'( p'+ cWidget + ;
IF( empty( cDocs ), '', ', '+ cDocs ) +' ) -> '+ cPrgRet )
iif( empty( cDocs ), '', ', '+ cDocs ) +' ) -> '+ cPrgRet )
aadd( doc_, '' )
ENDIF
@@ -1192,7 +1239,7 @@ STATIC FUNCTION Build_Class( cWidget, cls_, doc_, cPathOut )
aadd( txt_, '' )
n := ascan( cls_, {|e_| left( lower( e_[ 1 ] ),7 ) == 'inherit' .and. !empty( e_[ 2 ] ) } )
s := 'CREATE CLASS '+ cWidget + IF( n > 0, ' INHERIT ' + cls_[ n,2 ], '' )
s := 'CREATE CLASS '+ cWidget + iif( n > 0, ' INHERIT ' + cls_[ n,2 ], '' )
aadd( txt_, s )
aadd( txt_, '' )
@@ -1219,7 +1266,7 @@ STATIC FUNCTION Build_Class( cWidget, cls_, doc_, cPathOut )
cM := strtran( cM, ss, '' )
cM := strtran( cM, '( )', '()' )
cM := strtran( cM, '( ', '( ' )
cM := IF( len( cM ) > 35, cM, pad( cM,35 ) )
cM := iif( len( cM ) > 35, cM, pad( cM,35 ) )
ss := 'p'+cWidget
cCall := strtran( s, ss, '::pPtr' )
@@ -1295,4 +1342,3 @@ STATIC FUNCTION Build_MakeFile( cpp_, prg_, cPathOut )
RETURN CreateTarget( cFile, txt_ )
/*----------------------------------------------------------------------*/

View File

@@ -387,7 +387,7 @@ HB_FUNC( QT_QCOLOR_REDF )
*/
HB_FUNC( QT_QCOLOR_RGB )
{
hb_retni( hbqt_par_QColor( 1 )->rgb() );
hb_retnl( hbqt_par_QColor( 1 )->rgb() );
}
/*
@@ -395,7 +395,7 @@ HB_FUNC( QT_QCOLOR_RGB )
*/
HB_FUNC( QT_QCOLOR_RGBA )
{
hb_retni( hbqt_par_QColor( 1 )->rgba() );
hb_retnl( hbqt_par_QColor( 1 )->rgba() );
}
/*
@@ -523,7 +523,7 @@ HB_FUNC( QT_QCOLOR_SETREDF )
*/
HB_FUNC( QT_QCOLOR_SETRGB )
{
hbqt_par_QColor( 1 )->setRgb( hb_parni( 2 ) );
hbqt_par_QColor( 1 )->setRgb( hb_parnl( 2 ) );
}
/*
@@ -539,7 +539,7 @@ HB_FUNC( QT_QCOLOR_SETRGB_1 )
*/
HB_FUNC( QT_QCOLOR_SETRGBA )
{
hbqt_par_QColor( 1 )->setRgba( hb_parni( 2 ) );
hbqt_par_QColor( 1 )->setRgba( hb_parnl( 2 ) );
}
/*
@@ -659,7 +659,7 @@ HB_FUNC( QT_QCOLOR_FROMHSVF )
*/
HB_FUNC( QT_QCOLOR_FROMRGB )
{
hb_retptr( new QColor( hbqt_par_QColor( 1 )->fromRgb( hb_parni( 2 ) ) ) );
hb_retptr( new QColor( hbqt_par_QColor( 1 )->fromRgb( hb_parnl( 2 ) ) ) );
}
/*
@@ -683,7 +683,7 @@ HB_FUNC( QT_QCOLOR_FROMRGBF )
*/
HB_FUNC( QT_QCOLOR_FROMRGBA )
{
hb_retptr( new QColor( hbqt_par_QColor( 1 )->fromRgba( hb_parni( 2 ) ) ) );
hb_retptr( new QColor( hbqt_par_QColor( 1 )->fromRgba( hb_parnl( 2 ) ) ) );
}

View File

@@ -157,7 +157,7 @@ HB_FUNC( QT_QCOLORDIALOG_TESTOPTION )
*/
HB_FUNC( QT_QCOLORDIALOG_CUSTOMCOLOR )
{
hb_retni( hbqt_par_QColorDialog( 1 )->customColor( hb_parni( 2 ) ) );
hb_retnl( hbqt_par_QColorDialog( 1 )->customColor( hb_parni( 2 ) ) );
}
/*
@@ -189,7 +189,7 @@ HB_FUNC( QT_QCOLORDIALOG_GETCOLOR_1 )
*/
HB_FUNC( QT_QCOLORDIALOG_SETCUSTOMCOLOR )
{
hbqt_par_QColorDialog( 1 )->setCustomColor( hb_parni( 2 ), hb_parni( 3 ) );
hbqt_par_QColorDialog( 1 )->setCustomColor( hb_parni( 2 ), hb_parnl( 3 ) );
}
/*
@@ -197,7 +197,7 @@ HB_FUNC( QT_QCOLORDIALOG_SETCUSTOMCOLOR )
*/
HB_FUNC( QT_QCOLORDIALOG_SETSTANDARDCOLOR )
{
hbqt_par_QColorDialog( 1 )->setStandardColor( hb_parni( 2 ), hb_parni( 3 ) );
hbqt_par_QColorDialog( 1 )->setStandardColor( hb_parni( 2 ), hb_parnl( 3 ) );
}

View File

@@ -126,7 +126,7 @@ HB_FUNC( QT_QCOREAPPLICATION_APPLICATIONNAME )
*/
HB_FUNC( QT_QCOREAPPLICATION_APPLICATIONPID )
{
hb_retni( hbqt_par_QCoreApplication( 1 )->applicationPid() );
hb_retnint( hbqt_par_QCoreApplication( 1 )->applicationPid() );
}
/*

View File

@@ -88,7 +88,7 @@ HB_FUNC( QT_QDATETIME_ADDDAYS )
*/
HB_FUNC( QT_QDATETIME_ADDMSECS )
{
hb_retptr( new QDateTime( hbqt_par_QDateTime( 1 )->addMSecs( hb_parni( 2 ) ) ) );
hb_retptr( new QDateTime( hbqt_par_QDateTime( 1 )->addMSecs( hb_parnint( 2 ) ) ) );
}
/*

View File

@@ -317,7 +317,7 @@ HB_FUNC( QT_QFILESYSTEMMODEL_SETROOTPATH )
*/
HB_FUNC( QT_QFILESYSTEMMODEL_SIZE )
{
hb_retni( hbqt_par_QFileSystemModel( 1 )->size( *hbqt_par_QModelIndex( 2 ) ) );
hb_retnint( hbqt_par_QFileSystemModel( 1 )->size( *hbqt_par_QModelIndex( 2 ) ) );
}
/*

View File

@@ -77,7 +77,7 @@ HB_FUNC( QT_QFTP )
*/
HB_FUNC( QT_QFTP_BYTESAVAILABLE )
{
hb_retni( hbqt_par_QFtp( 1 )->bytesAvailable() );
hb_retnint( hbqt_par_QFtp( 1 )->bytesAvailable() );
}
/*
@@ -221,7 +221,7 @@ HB_FUNC( QT_QFTP_RAWCOMMAND )
*/
HB_FUNC( QT_QFTP_READ )
{
hb_retni( hbqt_par_QFtp( 1 )->read( hbqt_par_char( 2 ), hb_parni( 3 ) ) );
hb_retnint( hbqt_par_QFtp( 1 )->read( hbqt_par_char( 2 ), hb_parnint( 3 ) ) );
}
/*

View File

@@ -79,7 +79,7 @@ HB_FUNC( QT_QHTTP )
*/
HB_FUNC( QT_QHTTP_BYTESAVAILABLE )
{
hb_retni( hbqt_par_QHttp( 1 )->bytesAvailable() );
hb_retnint( hbqt_par_QHttp( 1 )->bytesAvailable() );
}
/*
@@ -199,7 +199,7 @@ HB_FUNC( QT_QHTTP_POST_1 )
*/
HB_FUNC( QT_QHTTP_READ )
{
hb_retni( hbqt_par_QHttp( 1 )->read( hbqt_par_char( 2 ), hb_parni( 3 ) ) );
hb_retnint( hbqt_par_QHttp( 1 )->read( hbqt_par_char( 2 ), hb_parnint( 3 ) ) );
}
/*

View File

@@ -115,7 +115,7 @@ HB_FUNC( QT_QICON_ADDPIXMAP )
*/
HB_FUNC( QT_QICON_CACHEKEY )
{
hb_retni( hbqt_par_QIcon( 1 )->cacheKey() );
hb_retnint( hbqt_par_QIcon( 1 )->cacheKey() );
}
/*

View File

@@ -138,7 +138,7 @@ HB_FUNC( QT_QIMAGE_BYTESPERLINE )
*/
HB_FUNC( QT_QIMAGE_CACHEKEY )
{
hb_retni( hbqt_par_QImage( 1 )->cacheKey() );
hb_retnint( hbqt_par_QImage( 1 )->cacheKey() );
}
/*
@@ -146,7 +146,7 @@ HB_FUNC( QT_QIMAGE_CACHEKEY )
*/
HB_FUNC( QT_QIMAGE_COLOR )
{
hb_retni( hbqt_par_QImage( 1 )->color( hb_parni( 2 ) ) );
hb_retnl( hbqt_par_QImage( 1 )->color( hb_parni( 2 ) ) );
}
/*
@@ -194,7 +194,7 @@ HB_FUNC( QT_QIMAGE_CREATEHEURISTICMASK )
*/
HB_FUNC( QT_QIMAGE_CREATEMASKFROMCOLOR )
{
hb_retptr( new QImage( hbqt_par_QImage( 1 )->createMaskFromColor( hb_parni( 2 ), ( HB_ISNUM( 3 ) ? ( Qt::MaskMode ) hb_parni( 3 ) : ( Qt::MaskMode ) Qt::MaskInColor ) ) ) );
hb_retptr( new QImage( hbqt_par_QImage( 1 )->createMaskFromColor( hb_parnl( 2 ), ( HB_ISNUM( 3 ) ? ( Qt::MaskMode ) hb_parni( 3 ) : ( Qt::MaskMode ) Qt::MaskInColor ) ) ) );
}
/*
@@ -338,7 +338,7 @@ HB_FUNC( QT_QIMAGE_OFFSET )
*/
HB_FUNC( QT_QIMAGE_PIXEL )
{
hb_retni( hbqt_par_QImage( 1 )->pixel( *hbqt_par_QPoint( 2 ) ) );
hb_retnl( hbqt_par_QImage( 1 )->pixel( *hbqt_par_QPoint( 2 ) ) );
}
/*
@@ -346,7 +346,7 @@ HB_FUNC( QT_QIMAGE_PIXEL )
*/
HB_FUNC( QT_QIMAGE_PIXEL_1 )
{
hb_retni( hbqt_par_QImage( 1 )->pixel( hb_parni( 2 ), hb_parni( 3 ) ) );
hb_retnl( hbqt_par_QImage( 1 )->pixel( hb_parni( 2 ), hb_parni( 3 ) ) );
}
/*
@@ -450,7 +450,7 @@ HB_FUNC( QT_QIMAGE_SCANLINE_1 )
*/
HB_FUNC( QT_QIMAGE_SETCOLOR )
{
hbqt_par_QImage( 1 )->setColor( hb_parni( 2 ), hb_parni( 3 ) );
hbqt_par_QImage( 1 )->setColor( hb_parni( 2 ), hb_parnl( 3 ) );
}
/*

View File

@@ -116,7 +116,7 @@ HB_FUNC( QT_QKEYEVENT_MODIFIERS )
*/
HB_FUNC( QT_QKEYEVENT_NATIVEMODIFIERS )
{
hb_retni( hbqt_par_QKeyEvent( 1 )->nativeModifiers() );
hb_retnl( hbqt_par_QKeyEvent( 1 )->nativeModifiers() );
}
/*
@@ -124,7 +124,7 @@ HB_FUNC( QT_QKEYEVENT_NATIVEMODIFIERS )
*/
HB_FUNC( QT_QKEYEVENT_NATIVESCANCODE )
{
hb_retni( hbqt_par_QKeyEvent( 1 )->nativeScanCode() );
hb_retnl( hbqt_par_QKeyEvent( 1 )->nativeScanCode() );
}
/*
@@ -132,7 +132,7 @@ HB_FUNC( QT_QKEYEVENT_NATIVESCANCODE )
*/
HB_FUNC( QT_QKEYEVENT_NATIVEVIRTUALKEY )
{
hb_retni( hbqt_par_QKeyEvent( 1 )->nativeVirtualKey() );
hb_retnl( hbqt_par_QKeyEvent( 1 )->nativeVirtualKey() );
}
/*

View File

@@ -91,3 +91,4 @@ HB_FUNC( QT_QLATIN1CHAR_UNICODE )
/*----------------------------------------------------------------------*/
#endif /* #if QT_VERSION >= 0x040500 */
/*----------------------------------------------------------------------*/

View File

@@ -83,3 +83,4 @@ HB_FUNC( QT_QLATIN1STRING_LATIN1 )
/*----------------------------------------------------------------------*/
#endif /* #if QT_VERSION >= 0x040500 */
/*----------------------------------------------------------------------*/

View File

@@ -110,7 +110,7 @@ HB_FUNC( QT_QMODELINDEX_FLAGS )
*/
HB_FUNC( QT_QMODELINDEX_INTERNALID )
{
hb_retni( hbqt_par_QModelIndex( 1 )->internalId() );
hb_retnint( hbqt_par_QModelIndex( 1 )->internalId() );
}
/*

View File

@@ -160,7 +160,7 @@ HB_FUNC( QT_QPALETTE_BUTTONTEXT )
*/
HB_FUNC( QT_QPALETTE_CACHEKEY )
{
hb_retni( hbqt_par_QPalette( 1 )->cacheKey() );
hb_retnint( hbqt_par_QPalette( 1 )->cacheKey() );
}
/*

View File

@@ -90,7 +90,7 @@ HB_FUNC( QT_QPIXMAP_ALPHACHANNEL )
*/
HB_FUNC( QT_QPIXMAP_CACHEKEY )
{
hb_retni( hbqt_par_QPixmap( 1 )->cacheKey() );
hb_retnint( hbqt_par_QPixmap( 1 )->cacheKey() );
}
/*

View File

@@ -141,7 +141,7 @@ HB_FUNC( QT_QRESOURCE_SETLOCALE )
*/
HB_FUNC( QT_QRESOURCE_SIZE )
{
hb_retni( hbqt_par_QResource( 1 )->size() );
hb_retnint( hbqt_par_QResource( 1 )->size() );
}
/*

View File

@@ -178,7 +178,7 @@ HB_FUNC( QT_QTEXTSTREAM_NUMBERFLAGS )
*/
HB_FUNC( QT_QTEXTSTREAM_POS )
{
hb_retni( hbqt_par_QTextStream( 1 )->pos() );
hb_retnint( hbqt_par_QTextStream( 1 )->pos() );
}
/*
@@ -186,7 +186,7 @@ HB_FUNC( QT_QTEXTSTREAM_POS )
*/
HB_FUNC( QT_QTEXTSTREAM_READ )
{
hb_retc( hbqt_par_QTextStream( 1 )->read( hb_parni( 2 ) ).toLatin1().data() );
hb_retc( hbqt_par_QTextStream( 1 )->read( hb_parnint( 2 ) ).toLatin1().data() );
}
/*
@@ -202,7 +202,7 @@ HB_FUNC( QT_QTEXTSTREAM_READALL )
*/
HB_FUNC( QT_QTEXTSTREAM_READLINE )
{
hb_retc( hbqt_par_QTextStream( 1 )->readLine( hb_parni( 2 ) ).toLatin1().data() );
hb_retc( hbqt_par_QTextStream( 1 )->readLine( hb_parnint( 2 ) ).toLatin1().data() );
}
/*
@@ -242,7 +242,7 @@ HB_FUNC( QT_QTEXTSTREAM_RESETSTATUS )
*/
HB_FUNC( QT_QTEXTSTREAM_SEEK )
{
hb_retl( hbqt_par_QTextStream( 1 )->seek( hb_parni( 2 ) ) );
hb_retl( hbqt_par_QTextStream( 1 )->seek( hb_parnint( 2 ) ) );
}
/*
@@ -377,3 +377,4 @@ HB_FUNC( QT_QTEXTSTREAM_STATUS )
/*----------------------------------------------------------------------*/
#endif /* #if QT_VERSION >= 0x040500 */
/*----------------------------------------------------------------------*/

View File

@@ -273,7 +273,7 @@ HB_FUNC( QT_QVARIANT_TOLONGLONG )
{
bool iOk = 0;
hb_retni( hbqt_par_QVariant( 1 )->toLongLong( &iOk ) );
hb_retnint( hbqt_par_QVariant( 1 )->toLongLong( &iOk ) );
hb_stornl( iOk, 2 );
}
@@ -377,7 +377,7 @@ HB_FUNC( QT_QVARIANT_TOULONGLONG )
{
bool iOk = 0;
hb_retni( hbqt_par_QVariant( 1 )->toULongLong( &iOk ) );
hb_retnint( hbqt_par_QVariant( 1 )->toULongLong( &iOk ) );
hb_stornl( iOk, 2 );
}

View File

@@ -86,7 +86,7 @@ HB_FUNC( QT_QWEBPAGE_ACTION )
*/
HB_FUNC( QT_QWEBPAGE_BYTESRECEIVED )
{
hb_retni( hbqt_par_QWebPage( 1 )->bytesReceived() );
hb_retnint( hbqt_par_QWebPage( 1 )->bytesReceived() );
}
/*
@@ -302,7 +302,7 @@ HB_FUNC( QT_QWEBPAGE_SWALLOWCONTEXTMENUEVENT )
*/
HB_FUNC( QT_QWEBPAGE_TOTALBYTES )
{
hb_retni( hbqt_par_QWebPage( 1 )->totalBytes() );
hb_retnint( hbqt_par_QWebPage( 1 )->totalBytes() );
}
/*

View File

@@ -748,7 +748,7 @@ HB_FUNC( QT_DISCONNECT_SIGNAL )
QWidget * widget = ( QWidget* ) hb_parptr( 1 );
if( widget )
{
char * event = hb_parcx( 2 );
const char * event = hb_parcx( 2 );
int i = widget->property( event ).toInt();
if( i > 0 && i <= s_s->listBlock.size() )
@@ -809,7 +809,7 @@ MyMainWindow::MyMainWindow()
Qt::WindowFlags flags = Qt::WindowCloseButtonHint | Qt::WindowMaximizeButtonHint |
Qt::WindowMinimizeButtonHint | Qt::WindowSystemMenuHint |
Qt::CustomizeWindowHint | Qt::WindowTitleHint |
Qt::Window ;
Qt::Window;
setWindowFlags( flags );
setFocusPolicy( Qt::StrongFocus );
setAttribute( Qt::WA_DeleteOnClose );

View File

@@ -737,7 +737,7 @@ HB_FUNC( SQLITE3_PREPARE )
if( SQL )
{
char *pSQL = hb_itemGetCPtr( SQL );
const char *pSQL = hb_itemGetCPtr( SQL );
ULONG ulLen = hb_itemGetCLen( SQL );
psqlite3_stmt pStmt;
const char *pszTail;

View File

@@ -99,7 +99,7 @@ static unsigned short crctab[ 256 ] = {
HB_FUNC( P_CRC16 )
{
char *ptr = hb_parc( 1 );
const char *ptr = hb_parc( 1 );
int count = hb_parclen( 1 );
register unsigned short crc = 0;
@@ -164,7 +164,7 @@ static ULONG crc32tbl[ 256 ] = {
HB_FUNC( P_CRC32 )
{
char * ptr = hb_parc( 1 );
const char * ptr = hb_parc( 1 );
int count = hb_parclen( 1 );
register ULONG crc = CRC32INIT;

View File

@@ -142,7 +142,7 @@ HB_FUNC( WIN_STARTDOC )
if( hDC )
{
char * szDocName = hb_parc( 2 );
const char * szDocName = hb_parc( 2 );
LPTSTR lpDocName = szDocName ? HB_TCHAR_CONVTO( szDocName ) : NULL;
sDoc.cbSize = sizeof( DOCINFO );
sDoc.lpszDocName = lpDocName;
@@ -339,7 +339,7 @@ HB_FUNC( WIN_CREATEFONT )
BOOL Result = FALSE;
HDC hDC = win_HDC_par( 1 );
HFONT hFont;
char * pszFont = hb_parc( 2 );
const char * pszFont = hb_parc( 2 );
LPTSTR lpFont = pszFont ? HB_TCHAR_CONVTO( pszFont ) : NULL;
int iHeight = hb_parni( 3 );
int iMul = hb_parni( 4 );
@@ -407,7 +407,7 @@ HB_FUNC( WIN_SETDOCUMENTPROPERTIES )
if( hDC )
{
HANDLE hPrinter;
char * pszPrinterName = hb_parc( 2 );
const char * pszPrinterName = hb_parc( 2 );
LPTSTR lpPrinterName = pszPrinterName ? HB_TCHAR_CONVTO( pszPrinterName ) : NULL;
if( OpenPrinter( lpPrinterName, &hPrinter, NULL ) )
@@ -461,7 +461,7 @@ HB_FUNC( WIN_SETDOCUMENTPROPERTIES )
HB_FUNC( WIN_LOADBITMAPFILE )
{
char * pstrFileName = hb_parc( 1 );
const char * pstrFileName = hb_parc( 1 );
BOOL bSuccess = FALSE;
DWORD dwFileSize = 0, dwHighSize, dwBytesRead;
HANDLE hFile;

View File

@@ -68,7 +68,7 @@
#define MAXBUFFERSIZE 255
BOOL hb_isLegacyDevice( LPSTR pPrinterName )
BOOL hb_isLegacyDevice( LPCSTR pPrinterName )
{
BOOL bLegacyDev = FALSE;
int n = 0;
@@ -82,7 +82,7 @@ BOOL hb_isLegacyDevice( LPSTR pPrinterName )
return bLegacyDev;
}
BOOL hb_PrinterExists( LPSTR pPrinterName )
BOOL hb_PrinterExists( LPCSTR pPrinterName )
{
BOOL Result = FALSE;
@@ -324,7 +324,7 @@ static DWORD IsPrinterErrorn( HANDLE hPrinter )
return dwError;
}
static DWORD hb_printerIsReadyn( char * pszPrinterName )
static DWORD hb_printerIsReadyn( const char * pszPrinterName )
{
DWORD dwPrinter = ( DWORD ) -1;
HANDLE hPrinter;
@@ -344,10 +344,10 @@ static DWORD hb_printerIsReadyn( char * pszPrinterName )
HB_FUNC( XISPRINTER )
{
char szDefaultPrinter[ MAXBUFFERSIZE ], * pszPrinterName;
char szDefaultPrinter[ MAXBUFFERSIZE ];
DWORD pdwBufferSize = sizeof( szDefaultPrinter );
const char * pszPrinterName = hb_parc( 1 );
pszPrinterName = hb_parc( 1 );
if( !pszPrinterName )
{
hb_GetDefaultPrinter( szDefaultPrinter, &pdwBufferSize );
@@ -357,7 +357,7 @@ HB_FUNC( XISPRINTER )
}
BOOL hb_GetPrinterNameByPort( char * pPrinterName, LPDWORD pdwBufferSize,
char * pPortName, BOOL bSubStr )
const char * pPortName, BOOL bSubStr )
{
BOOL Result = FALSE, bFound = FALSE;
ULONG needed, returned;

View File

@@ -320,7 +320,7 @@ HB_FUNC( WINPORTCLOSE )
HB_FUNC( WINPORTWRITE )
{
int Port = hb_parni( 1 );
char * lpBuffer = hb_parcx( 2 );
const char * lpBuffer = hb_parcx( 2 );
LONG NumberofBytesToWrite = hb_parclen( 2 );
HANDLE hCommPort = s_PortData[ Port ].Port;
DWORD NumberofBytesWritten;