2000-11-17 16:40 GMT+1 Maurilio Longo <maurilio.longo@libero.it>

This commit is contained in:
Maurilio Longo
2000-11-17 15:41:48 +00:00
parent 5497bdf1e1
commit 1573328aa8
4 changed files with 12 additions and 12 deletions

View File

@@ -1,3 +1,7 @@
2000-11-17 16:40 GMT+1 Maurilio Longo <maurilio.longo@libero.it>
* source/rtl/tbrowse.prg
! fixed redrawing of header and footer separator (it was shorter than needed)
2000-11-16 02:35 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source/compiler/harbour.c
! Fixed jump optimization for HB_P_SEQBEGIN and HB_P_SEQEND

View File

@@ -55,8 +55,6 @@ HB_FUNC(SQLCONNECT) // MYSQL *mysql_real_connect(MYSQL*, char * host, char * use
{
MYSQL * mysql = NULL;
HB_TRACE(HB_TR_DEBUG, ("mysql_real_connect(%s, %s, %s)", _parc(1), _parc(2), _parc(3)));
#if MYSQL_VERSION_ID > 32200
/* from 3.22.x of MySQL there is a new parameter in mysql_real_connect() call, that is char * db
which is not used here */
@@ -79,16 +77,12 @@ HB_FUNC(SQLCLOSE) // void mysql_close(MYSQL *mysql)
HB_FUNC(SQLSELECTD) // int mysql_select_db(MYSQL *, char *)
{
HB_TRACE(HB_TR_DEBUG, ("mysql_select_db(%lu, %s)", _parnl(1), _parc(2)));
_retnl((long) mysql_select_db((MYSQL *)_parnl(1), _parc(2)));
}
HB_FUNC(SQLQUERY) // int mysql_query(MYSQL *, char *)
{
HB_TRACE(HB_TR_DEBUG, ("mysql_query(%lu, %s)", _parnl(1), _parc(2)));
_retnl((long) mysql_query((MYSQL *)_parnl(1), _parc(2)));
}

View File

@@ -89,7 +89,7 @@ METHOD FieldGet(nNum) CLASS TMySQLRow
if nNum > 0 .AND. nNum <= Len(::aRow)
// Char fields are padded with spaces since a real .dbf field would be
if ValType(::aRow[nNum]) == "C"
if ::FieldType(nNum) == "C"
return PadR(::aRow[nNum], ::aFieldStruct[nNum][MYSQL_FS_LENGTH])
else
return ::aRow[nNum]
@@ -186,6 +186,7 @@ METHOD FieldType(nNum) CLASS TMySQLRow
case ::aFieldStruct[nNum][MYSQL_FS_TYPE] == MYSQL_SHORT_TYPE .OR.;
::aFieldStruct[nNum][MYSQL_FS_TYPE] == MYSQL_LONG_TYPE .OR.;
::aFieldStruct[nNum][MYSQL_FS_TYPE] == MYSQL_LONGLONG_TYPE .OR.;
::aFieldStruct[nNum][MYSQL_FS_TYPE] == MYSQL_FLOAT_TYPE .OR.;
::aFieldStruct[nNum][MYSQL_FS_TYPE] == MYSQL_DOUBLE_TYPE
cType := "N"
@@ -427,7 +428,8 @@ METHOD GetRow(nRow) CLASS TMySQLQuery
aRow[i] := iif(Val(aRow[i]) == 0, .F., .T.)
case ::aFieldStruct[i][MYSQL_FS_TYPE] == MYSQL_SHORT_TYPE .OR.;
::aFieldStruct[i][MYSQL_FS_TYPE] == MYSQL_LONG_TYPE
::aFieldStruct[i][MYSQL_FS_TYPE] == MYSQL_LONG_TYPE .OR.;
::aFieldStruct[i][MYSQL_FS_TYPE] == MYSQL_LONGLONG_TYPE
aRow[i] := Val(aRow[i])
case ::aFieldStruct[i][MYSQL_FS_TYPE] == MYSQL_DOUBLE_TYPE .OR.;
@@ -868,7 +870,7 @@ METHOD Error() CLASS TMySQLServer
::lError := .F.
return sqlGetErr(::nSocket)
return iif(::nSocket > 0, sqlGetErr(::nSocket), "No connection to server")
METHOD ListDBs() CLASS TMySQLServer

View File

@@ -719,7 +719,7 @@ METHOD Stabilize() CLASS TBrowse
else
DispOut( Replicate( ::HeadSep, nColsWidth ), ::ColorSpec )
endif
DispOut( Replicate( Right( ::HeadSep, 1 ), ( nWidth - nColsWidth ) / 2 ), ::ColorSpec )
DispOut( Replicate( Right( ::HeadSep, 1 ), Int(Round((nWidth - nColsWidth) / 2, 0)) ), ::ColorSpec )
endif
if ! Empty( ::FootSep ) // Drawing footing separator
DispOutAt( ::nBottom - iif( ::lFooters, 1, 0 ), ::nLeft, Replicate( Right( ::FootSep, 1 ), ( nWidth - nColsWidth ) / 2 ), ::ColorSpec )
@@ -739,7 +739,7 @@ METHOD Stabilize() CLASS TBrowse
else
DispOut( Replicate( ::FootSep, nColsWidth ), ::ColorSpec )
endif
DispOut( Replicate( Right( ::FootSep, 1 ), ( nWidth - nColsWidth ) / 2 ), ::ColorSpec )
DispOut( Replicate( Right( ::FootSep, 1 ), Int(Round((nWidth - nColsWidth) / 2, 0)) ), ::ColorSpec )
endif
if ::lFooters // Drawing footers
DispOutAt( ::nBottom, ::nLeft, Space( ( nWidth - nColsWidth ) / 2 ), ::ColorSpec )
@@ -906,7 +906,7 @@ method initKeys(o) CLASS TBROWSE
{K_CTRL_RIGHT,{|Ob,nKey| Ob:PanRight(),0}},;
{K_RIGHT,{|Ob,nKey| Ob:Right(),0}},;
{K_UP,{|Ob,nKey| Ob:Up(),0}},;
{K_ESC,{|Ob,nKey| -1 }}}
{K_ESC,{|Ob,nKey| -1 }}}
return o
Method SetKey(nKey,bBlock) CLASS TBrowse