2010-02-20 04:29 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)

- src/rtl/browdbx.prg
  - src/rtl/mousex.c
  * src/rtl/tbcolumn.prg
  - src/rtl/philesx.c
  * src/rtl/Makefile
  - src/rtl/thfuncx.prg
  - src/rtl/oemansix.c
  - src/rtl/tthreadx.prg
  - src/rtl/tgetx.prg
  - src/rtl/idlex.c
  * src/rtl/browdb.prg
  - src/rtl/typefilx.prg
  - src/rtl/binnumx.c
  * src/rtl/tbrowse.prg
  - src/rdd/dbjoinx.prg
  - src/rdd/dblistx.prg
  - src/rdd/dbtotalx.prg
  - src/rdd/dbstruxx.prg
  - src/rdd/dbsortx.prg
  * src/rdd/Makefile
  - src/rdd/dbcmdx.c
  - src/rdd/dbdetacx.c
  - src/rdd/dbupdatx.prg
  - src/rdd/dbfuncsx.prg
  * include/hbextern.ch
  * contrib/xpp/xppextrn.ch
  * contrib/xpp/binnumx.c
  * contrib/xpp/tthreadx.prg
    * Synced contrib/xpp compatibility lib source with core.
    - Deleted Xbase++ compatibility functions from core.
    ; NOTE: INCOMPATIBLE. If you use Xbase++ function, you should now link 
            xpp lib. (the name of the lib is not yet finalized)
    ; TODO: Clean remaining four HB_COMPAT_XPP guards and delete this 
            build-time option from core.
This commit is contained in:
Viktor Szakats
2010-02-20 03:31:25 +00:00
parent 7feb3ba1b3
commit 73aa1fd7d5
29 changed files with 45 additions and 1926 deletions

View File

@@ -17,6 +17,42 @@
past entries belonging to author(s): Viktor Szakats.
*/
2010-02-20 04:29 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
- src/rtl/browdbx.prg
- src/rtl/mousex.c
* src/rtl/tbcolumn.prg
- src/rtl/philesx.c
* src/rtl/Makefile
- src/rtl/thfuncx.prg
- src/rtl/oemansix.c
- src/rtl/tthreadx.prg
- src/rtl/tgetx.prg
- src/rtl/idlex.c
* src/rtl/browdb.prg
- src/rtl/typefilx.prg
- src/rtl/binnumx.c
* src/rtl/tbrowse.prg
- src/rdd/dbjoinx.prg
- src/rdd/dblistx.prg
- src/rdd/dbtotalx.prg
- src/rdd/dbstruxx.prg
- src/rdd/dbsortx.prg
* src/rdd/Makefile
- src/rdd/dbcmdx.c
- src/rdd/dbdetacx.c
- src/rdd/dbupdatx.prg
- src/rdd/dbfuncsx.prg
* include/hbextern.ch
* contrib/xpp/xppextrn.ch
* contrib/xpp/binnumx.c
* contrib/xpp/tthreadx.prg
* Synced contrib/xpp compatibility lib source with core.
- Deleted Xbase++ compatibility functions from core.
; NOTE: INCOMPATIBLE. If you use Xbase++ function, you should now link
xpp lib. (the name of the lib is not yet finalized)
; TODO: Clean remaining four HB_COMPAT_XPP guards and delete this
build-time option from core.
2010-02-20 03:59 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
- contrib/hbgt/doc/en
+ contrib/hbgt/doc/en-EN

View File

@@ -61,11 +61,11 @@ HB_FUNC( BIN2U )
if( pItem )
{
HB_SIZE ulLen = hb_itemGetCLen( pItem );
if( ulLen )
HB_SIZE nLen = hb_itemGetCLen( pItem );
if( nLen )
{
const char * pszString = hb_itemGetCPtr( pItem );
if( ulLen >= 3 )
if( nLen >= 3 )
uiResult = HB_GET_LE_UINT32( pszString );
else
uiResult = HB_GET_LE_UINT16( pszString );

View File

@@ -198,14 +198,15 @@ METHOD start( xAction, ... ) CLASS TTHREAD
IF ::active
RETURN .F.
ELSEIF xAction == NIL
::active := .T.
::pThreadID := hb_threadStart( HB_THREAD_INHERIT_PUBLIC, ;
{ |...|
WHILE .T.
::startTime := Seconds()
::active := .T.
ThreadObject( Self )
::result := ::execute( ... )
::startTime := NIL
::active := .F.
IF ISNUMBER( ::interval )
hb_idleSleep( ::interval / 100 )
LOOP
@@ -215,11 +216,11 @@ METHOD start( xAction, ... ) CLASS TTHREAD
RETURN NIL
}, ... )
ELSEIF !Empty( xAction ) .AND. ValType( xAction ) $ "CBS"
::active := .T.
::pThreadID := hb_threadStart( HB_THREAD_INHERIT_PUBLIC, ;
{ |...|
WHILE .T.
::startTime := Seconds()
::active := .T.
ThreadObject( Self )
IF ::atStart != NIL
EVAL( ::atStart, ... )
@@ -229,6 +230,7 @@ METHOD start( xAction, ... ) CLASS TTHREAD
EVAL( ::atEnd, ... )
ENDIF
::startTime := NIL
::active := .F.
IF ISNUMBER( ::interval )
hb_idleSleep( ::interval / 100 )
LOOP

View File

@@ -58,6 +58,8 @@ EXTERNAL XPP_TBROWSE
EXTERNAL XPP_TBCOLUMN
EXTERNAL XPP_SLEEP
EXTERNAL BIN2U
EXTERNAL BIN2F
EXTERNAL F2BIN
EXTERNAL DBPACK
EXTERNAL DBZAP
EXTERNAL DBCOPYEXTSTRUCT
@@ -73,7 +75,6 @@ EXTERNAL CURDRIVE
EXTERNAL DBSKIPPER
EXTERNAL NUMBUTTONS
EXTERNAL SETMOUSE
EXTERNAL STOD
EXTERNAL U2BIN
EXTERNAL W2BIN
EXTERNAL ORDWILDSEEK

View File

@@ -778,46 +778,6 @@ EXTERNAL SHOWMSG
#endif /* HB_COMPAT_C53 */
/* Xbase++ compatible functions */
#ifdef HB_COMPAT_XPP
EXTERNAL XPP_GET
EXTERNAL XPP_TBROWSE
EXTERNAL XPP_TBCOLUMN
EXTERNAL XPP_SLEEP
EXTERNAL BIN2U
EXTERNAL BIN2F
EXTERNAL F2BIN
EXTERNAL DBPACK
EXTERNAL DBZAP
EXTERNAL DBCOPYEXTSTRUCT
EXTERNAL DBCOPYSTRUCT
EXTERNAL DBJOIN
EXTERNAL DBLIST
EXTERNAL DBSORT
EXTERNAL DBTOTAL
EXTERNAL DBUPDATE
EXTERNAL CONVTOANSICP
EXTERNAL CONVTOOEMCP
EXTERNAL CURDRIVE
EXTERNAL DBSKIPPER
EXTERNAL NUMBUTTONS
EXTERNAL SETMOUSE
EXTERNAL U2BIN
EXTERNAL W2BIN
EXTERNAL ORDWILDSEEK
EXTERNAL _DBEXPORT
EXTERNAL _TYPEFILE
EXTERNAL THREADID
EXTERNAL THREADWAIT
EXTERNAL THREADWAITALL
EXTERNAL THREADOBJECT
EXTERNAL THREAD
EXTERNAL SIGNAL
#endif /* HB_COMPAT_XPP */
/* Harbour extensions */
EXTERNAL HB_PROGNAME

View File

@@ -14,9 +14,7 @@ C_SOURCES := \
dbcmd.c \
dbcmd53.c \
dbcmdhb.c \
dbcmdx.c \
dbdetach.c \
dbdetacx.c \
dbdrop.c \
dbexists.c \
dbrename.c \
@@ -35,21 +33,14 @@ C_SOURCES := \
PRG_SOURCES := \
dbdelim.prg \
dbfuncs.prg \
dbfuncsx.prg \
dbjoin.prg \
dbjoinx.prg \
dblist.prg \
dblistx.prg \
dbsdf.prg \
dbsort.prg \
dbsortx.prg \
dbstrux.prg \
dbstruxu.prg \
dbstruxx.prg \
dbtotal.prg \
dbtotalx.prg \
dbupdat.prg \
dbupdatx.prg \
rddord.prg \
rddordu.prg \
rddsys.prg \

View File

@@ -1,185 +0,0 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* Base RDD module (XPP functions)
*
* Copyright 1999 Bruno Cantero <bruno@issnet.net>
* Copyright 2004-2007 Przemyslaw Czerpak <druzus / at / priv.onet.pl>
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
*
* As a special exception, the Harbour Project gives permission for
* additional uses of the text contained in its release of Harbour.
*
* The exception is that, if you link the Harbour libraries with other
* files to produce an executable, this does not by itself cause the
* resulting executable to be covered by the GNU General Public License.
* Your use of that executable is in no way restricted on account of
* linking the Harbour library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the Harbour
* Project under the name Harbour. If you copy code from other
* Harbour Project or Free Software Foundation releases into a copy of
* Harbour, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for Harbour, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice.
*
*/
#include "hbapi.h"
#include "hbapirdd.h"
#include "hbapierr.h"
#include "hbapiitm.h"
#ifdef HB_COMPAT_XPP
HB_FUNC_EXTERN( HB_DBPACK );
HB_FUNC( DBPACK )
{
HB_FUNC_EXEC( HB_DBPACK );
}
HB_FUNC_EXTERN( HB_DBZAP );
HB_FUNC( DBZAP )
{
HB_FUNC_EXEC( HB_DBZAP );
}
HB_FUNC( ORDWILDSEEK )
{
AREAP pArea = ( AREAP ) hb_rddGetCurrentWorkAreaPointer();
if( pArea )
{
const char * szPattern = hb_parc( 1 );
if( szPattern )
{
HB_BOOL fCont = hb_parl( 2 ), fBack = hb_parl( 3 ), fFound = HB_FALSE;
DBORDERINFO OrderInfo;
HB_ERRCODE errCode = HB_SUCCESS;
memset( &OrderInfo, 0, sizeof( DBORDERINFO ) );
OrderInfo.itmResult = hb_itemNew( NULL );
if( !fCont )
{
const char * szKey;
if( fBack )
errCode = SELF_GOBOTTOM( pArea );
else
errCode = SELF_GOTOP( pArea );
if( errCode == HB_SUCCESS )
{
errCode = SELF_ORDINFO( pArea, DBOI_KEYVAL, &OrderInfo );
if( errCode == HB_SUCCESS )
{
szKey = hb_itemGetCPtr( OrderInfo.itmResult );
fFound = hb_strMatchWild( szKey, szPattern );
}
}
}
if( !fFound && errCode == HB_SUCCESS )
{
OrderInfo.itmNewVal = hb_param( 1, HB_IT_STRING );
if( SELF_ORDINFO( pArea, fBack ? DBOI_SKIPWILDBACK : DBOI_SKIPWILD,
&OrderInfo ) == HB_SUCCESS )
fFound = hb_itemGetL( OrderInfo.itmResult );
}
hb_itemRelease( OrderInfo.itmResult );
hb_retl( fFound );
}
else
hb_errRT_DBCMD( EG_ARG, EDBCMD_DBFILEPUTBADPARAMETER, NULL, HB_ERR_FUNCNAME );
}
else
hb_errRT_DBCMD( EG_NOTABLE, EDBCMD_NOTABLE, NULL, HB_ERR_FUNCNAME );
}
HB_FUNC( DBSKIPPER )
{
AREAP pArea = ( AREAP ) hb_rddGetCurrentWorkAreaPointer();
if( pArea )
{
HB_LONG lSkipped = 0;
HB_LONG lRecs = 1;
HB_BOOL fBEof;
HB_ULONG ulRecords = 0;
if( SELF_RECCOUNT( pArea, &ulRecords ) == HB_SUCCESS && ulRecords > 0 )
{
if( HB_ISNUM( 1 ) )
lRecs = hb_parnl( 1 );
if( lRecs == 0 )
SELF_SKIP( pArea, 0 );
else if( lRecs > 0 )
{
if( SELF_EOF( pArea, &fBEof ) == HB_SUCCESS )
{
while( lSkipped < lRecs )
{
if( SELF_SKIP( pArea, 1 ) != HB_SUCCESS )
break;
if( SELF_EOF( pArea, &fBEof ) != HB_SUCCESS )
break;
if( fBEof )
{
SELF_SKIP( pArea, -1 );
break;
}
lSkipped++;
}
}
}
else /* if( lRecs < 0 ) */
{
while( lSkipped > lRecs )
{
if( SELF_SKIP( pArea, -1 ) != HB_SUCCESS )
break;
if( SELF_BOF( pArea, &fBEof ) != HB_SUCCESS )
break;
if( fBEof )
break;
lSkipped--;
}
}
}
hb_retnl( lSkipped );
}
else
hb_errRT_DBCMD( EG_NOTABLE, EDBCMD_NOTABLE, NULL, HB_ERR_FUNCNAME );
}
#endif

View File

@@ -1,71 +0,0 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* .prg functions for workarea detaching
*
* Copyright 2008 Przemyslaw Czerpak <druzus / at / priv.onet.pl>
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
*
* As a special exception, the Harbour Project gives permission for
* additional uses of the text contained in its release of Harbour.
*
* The exception is that, if you link the Harbour libraries with other
* files to produce an executable, this does not by itself cause the
* resulting executable to be covered by the GNU General Public License.
* Your use of that executable is in no way restricted on account of
* linking the Harbour library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the Harbour
* Project under the name Harbour. If you copy code from other
* Harbour Project or Free Software Foundation releases into a copy of
* Harbour, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for Harbour, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice.
*
*/
#include "hbapi.h"
#ifdef HB_COMPAT_XPP
HB_FUNC_EXTERN( HB_DBDETACH );
HB_FUNC( DBRELEASE )
{
HB_FUNC_EXEC( HB_DBDETACH );
}
HB_FUNC_EXTERN( HB_DBREQUEST );
HB_FUNC( DBREQUEST )
{
HB_FUNC_EXEC( HB_DBREQUEST );
}
#endif

View File

@@ -1,70 +0,0 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* XPP compatible _dbExport() function
*
* Copyright 1999-2007 Viktor Szakats (harbour.01 syenar.hu)
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
*
* As a special exception, the Harbour Project gives permission for
* additional uses of the text contained in its release of Harbour.
*
* The exception is that, if you link the Harbour libraries with other
* files to produce an executable, this does not by itself cause the
* resulting executable to be covered by the GNU General Public License.
* Your use of that executable is in no way restricted on account of
* linking the Harbour library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the Harbour
* Project under the name Harbour. If you copy code from other
* Harbour Project or Free Software Foundation releases into a copy of
* Harbour, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for Harbour, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice.
*
*/
#ifdef HB_COMPAT_XPP
FUNCTION _dbExport( cFile, aFields, bFor, bWhile, nNext, nRecord, lRest, cXPP_Driver, cDelimiter )
DO CASE
CASE cXPP_Driver == "SDFDBE"
RETURN __dbCopy( cFile, aFields, bFor, bWhile, nNext, nRecord, lRest, "SDF" )
/* Alternate CA-Cl*pper compatible call:
RETURN __dbSDF( .T., cFile, aFields, bFor, bWhile, nNext, nRecord, lRest ) */
CASE cXPP_Driver == "DELDBE"
RETURN __dbCopy( cFile, aFields, bFor, bWhile, nNext, nRecord, lRest, "DELIM", , , cDelimiter )
/* Alternate CA-Cl*pper compatible call:
RETURN __dbDelim( .T., cFile, cDelimiter, aFields, bFor, bWhile, nNext, nRecord, lRest ) */
ENDCASE
RETURN __dbCopy( cFile, aFields, bFor, bWhile, nNext, nRecord, lRest, cXPP_Driver )
#endif

View File

@@ -1,58 +0,0 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* XPP compatible dbJoin() function
*
* Copyright 1999-2007 Viktor Szakats (harbour.01 syenar.hu)
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
*
* As a special exception, the Harbour Project gives permission for
* additional uses of the text contained in its release of Harbour.
*
* The exception is that, if you link the Harbour libraries with other
* files to produce an executable, this does not by itself cause the
* resulting executable to be covered by the GNU General Public License.
* Your use of that executable is in no way restricted on account of
* linking the Harbour library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the Harbour
* Project under the name Harbour. If you copy code from other
* Harbour Project or Free Software Foundation releases into a copy of
* Harbour, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for Harbour, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice.
*
*/
#ifdef HB_COMPAT_XPP
FUNCTION dbJoin( cAlias, cFile, aFields, bFor )
RETURN __dbJoin( cAlias, cFile, aFields, bFor )
#endif

View File

@@ -1,58 +0,0 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* XPP compatible dbList() function
*
* Copyright 1999-2007 Viktor Szakats (harbour.01 syenar.hu)
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
*
* As a special exception, the Harbour Project gives permission for
* additional uses of the text contained in its release of Harbour.
*
* The exception is that, if you link the Harbour libraries with other
* files to produce an executable, this does not by itself cause the
* resulting executable to be covered by the GNU General Public License.
* Your use of that executable is in no way restricted on account of
* linking the Harbour library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the Harbour
* Project under the name Harbour. If you copy code from other
* Harbour Project or Free Software Foundation releases into a copy of
* Harbour, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for Harbour, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice.
*
*/
#ifdef HB_COMPAT_XPP
FUNCTION dbList( lOff, abEval, lAll, bFor, bWhile, nNext, nRecord, lRest, lToPrint, cToFileName )
RETURN __dbList( abEval, lOff, lAll, bFor, bWhile, nNext, nRecord, lRest, lToPrint, cToFileName )
#endif

View File

@@ -1,58 +0,0 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* XPP compatible dbSort() function
*
* Copyright 1999-2007 Viktor Szakats (harbour.01 syenar.hu)
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
*
* As a special exception, the Harbour Project gives permission for
* additional uses of the text contained in its release of Harbour.
*
* The exception is that, if you link the Harbour libraries with other
* files to produce an executable, this does not by itself cause the
* resulting executable to be covered by the GNU General Public License.
* Your use of that executable is in no way restricted on account of
* linking the Harbour library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the Harbour
* Project under the name Harbour. If you copy code from other
* Harbour Project or Free Software Foundation releases into a copy of
* Harbour, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for Harbour, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice.
*
*/
#ifdef HB_COMPAT_XPP
FUNCTION dbSort( cToFileName, aFields, bFor, bWhile, nNext, nRecord, lRest )
RETURN __dbSort( cToFileName, aFields, bFor, bWhile, nNext, nRecord, lRest )
#endif

View File

@@ -1,63 +0,0 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* XPP compatible dbCopyStruct(), dbCopyExtStruct() functions
*
* Copyright 1999-2007 Viktor Szakats (harbour.01 syenar.hu)
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
*
* As a special exception, the Harbour Project gives permission for
* additional uses of the text contained in its release of Harbour.
*
* The exception is that, if you link the Harbour libraries with other
* files to produce an executable, this does not by itself cause the
* resulting executable to be covered by the GNU General Public License.
* Your use of that executable is in no way restricted on account of
* linking the Harbour library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the Harbour
* Project under the name Harbour. If you copy code from other
* Harbour Project or Free Software Foundation releases into a copy of
* Harbour, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for Harbour, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice.
*
*/
#ifdef HB_COMPAT_XPP
/* Identical to __dbCopyStruct() */
FUNCTION dbCopyStruct( cFileName, aFieldList )
RETURN dbCreate( cFileName, __dbStructFilter( dbStruct(), aFieldList ) )
FUNCTION dbCopyExtStruct( cFileName )
RETURN __dbCopyXStruct( cFileName )
#endif

View File

@@ -1,58 +0,0 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* XPP compatible dbTotal() function
*
* Copyright 1999-2007 Viktor Szakats (harbour.01 syenar.hu)
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
*
* As a special exception, the Harbour Project gives permission for
* additional uses of the text contained in its release of Harbour.
*
* The exception is that, if you link the Harbour libraries with other
* files to produce an executable, this does not by itself cause the
* resulting executable to be covered by the GNU General Public License.
* Your use of that executable is in no way restricted on account of
* linking the Harbour library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the Harbour
* Project under the name Harbour. If you copy code from other
* Harbour Project or Free Software Foundation releases into a copy of
* Harbour, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for Harbour, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice.
*
*/
#ifdef HB_COMPAT_XPP
FUNCTION dbTotal( cFile, xKey, aFields, xFor, xWhile, nNext, nRec, lRest )
RETURN __dbTotal( cFile, xKey, aFields, xFor, xWhile, nNext, nRec, lRest )
#endif

View File

@@ -1,58 +0,0 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* XPP compatible dbUpdate() function
*
* Copyright 1999-2007 Viktor Szakats (harbour.01 syenar.hu)
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
*
* As a special exception, the Harbour Project gives permission for
* additional uses of the text contained in its release of Harbour.
*
* The exception is that, if you link the Harbour libraries with other
* files to produce an executable, this does not by itself cause the
* resulting executable to be covered by the GNU General Public License.
* Your use of that executable is in no way restricted on account of
* linking the Harbour library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the Harbour
* Project under the name Harbour. If you copy code from other
* Harbour Project or Free Software Foundation releases into a copy of
* Harbour, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for Harbour, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice.
*
*/
#ifdef HB_COMPAT_XPP
FUNCTION dbUpdate( cAlias, bAssign, bKey, lRandom )
RETURN __dbUpdate( cAlias, bKey, lRandom, bAssign )
#endif

View File

@@ -18,7 +18,6 @@ C_SOURCES := \
ati.c \
base64c.c \
binnum.c \
binnumx.c \
box.c \
cdpapi.c \
cdpapihb.c \
@@ -102,7 +101,6 @@ C_SOURCES := \
hbzlibgz.c \
hbznet.c \
idle.c \
idlex.c \
inkey.c \
inkeyapi.c \
is.c \
@@ -122,13 +120,11 @@ C_SOURCES := \
mouse53.c \
mouseapi.c \
mousehb.c \
mousex.c \
mtran.c \
natmsg.c \
natmsgu.c \
net.c \
oemansi.c \
oemansix.c \
oldbox.c \
oldclear.c \
pad.c \
@@ -137,7 +133,6 @@ C_SOURCES := \
padr.c \
philes.c \
philes53.c \
philesx.c \
rat.c \
replic.c \
right.c \
@@ -206,7 +201,6 @@ PRG_SOURCES := \
altd.prg \
base64.prg \
browdb.prg \
browdbx.prg \
browse.prg \
checkbox.prg \
color53.prg \
@@ -253,8 +247,6 @@ PRG_SOURCES := \
tgethb.prg \
tgetint.prg \
tgetlist.prg \
tgetx.prg \
thfuncx.prg \
tlabel.prg \
tmenuitm.prg \
tmenusys.prg \
@@ -265,10 +257,8 @@ PRG_SOURCES := \
tscalar.prg \
tsymbol.prg \
ttextlin.prg \
tthreadx.prg \
ttopbar.prg \
typefile.prg \
typefilx.prg \
valtoexp.prg \
wait.prg \

View File

@@ -1,118 +0,0 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* BIN2U(), W2BIN(), U2BIN() functions
*
* Copyright 2009 Przemyslaw Czerpak <druzus / at / priv.onet.pl>
* Copyright 1999-2001 Viktor Szakats (harbour.01 syenar.hu)
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
*
* As a special exception, the Harbour Project gives permission for
* additional uses of the text contained in its release of Harbour.
*
* The exception is that, if you link the Harbour libraries with other
* files to produce an executable, this does not by itself cause the
* resulting executable to be covered by the GNU General Public License.
* Your use of that executable is in no way restricted on account of
* linking the Harbour library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the Harbour
* Project under the name Harbour. If you copy code from other
* Harbour Project or Free Software Foundation releases into a copy of
* Harbour, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for Harbour, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice.
*
*/
/* NOTE: Xbase++ compatible functions */
#include "hbapi.h"
#include "hbapiitm.h"
#ifdef HB_COMPAT_XPP
HB_FUNC( BIN2U )
{
PHB_ITEM pItem = hb_param( 1, HB_IT_STRING );
HB_U32 uiResult = 0;
if( pItem )
{
HB_SIZE nLen = hb_itemGetCLen( pItem );
if( nLen )
{
const char * pszString = hb_itemGetCPtr( pItem );
if( nLen >= 3 )
uiResult = HB_GET_LE_UINT32( pszString );
else
uiResult = HB_GET_LE_UINT16( pszString );
}
}
hb_retnint( uiResult );
}
HB_FUNC( U2BIN )
{
char szResult[ 4 ];
HB_U32 uiValue = ( HB_U32 ) hb_parnint( 1 );
HB_PUT_LE_UINT32( szResult, uiValue );
hb_retclen( szResult, 4 );
}
HB_FUNC( W2BIN )
{
char szResult[ 2 ];
HB_U16 uiValue = ( HB_U16 ) hb_parni( 1 );
HB_PUT_LE_UINT16( szResult, uiValue );
hb_retclen( szResult, 4 );
}
HB_FUNC( F2BIN )
{
char buf[ sizeof( double ) ];
double d = hb_parnd( 1 );
HB_PUT_LE_DOUBLE( buf, d );
hb_retclen( buf, sizeof( buf ) );
}
HB_FUNC( BIN2F )
{
if( hb_parclen( 1 ) >= sizeof( double ) )
{
const char * buf = hb_parc( 1 );
hb_retnd( HB_GET_LE_DOUBLE( buf ) );
}
else
hb_retnd( 0.0 );
}
#endif

View File

@@ -54,17 +54,12 @@ FUNCTION TBrowseDB( nTop, nLeft, nBottom, nRight )
LOCAL oBrowse := TBrowseNew( nTop, nLeft, nBottom, nRight )
#ifdef HB_COMPAT_XPP
oBrowse:SkipBlock := { | nRecs | DbSkipper( nRecs ) }
#else
oBrowse:SkipBlock := { | nRecs | Skipped( nRecs ) }
#endif
oBrowse:GoTopBlock := { || dbGoTop() }
oBrowse:GoBottomBlock := { || dbGoBottom() }
RETURN oBrowse
#ifndef HB_COMPAT_XPP
STATIC FUNCTION Skipped( nRecs )
LOCAL nSkipped := 0
@@ -93,4 +88,3 @@ STATIC FUNCTION Skipped( nRecs )
ENDIF
RETURN nSkipped
#endif

View File

@@ -1,93 +0,0 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* DBSKIPPER() function for Xbase++
*
* Copyright 1999 Paul Tucker <ptucker@sympatico.ca>
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
*
* As a special exception, the Harbour Project gives permission for
* additional uses of the text contained in its release of Harbour.
*
* The exception is that, if you link the Harbour libraries with other
* files to produce an executable, this does not by itself cause the
* resulting executable to be covered by the GNU General Public License.
* Your use of that executable is in no way restricted on account of
* linking the Harbour library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the Harbour
* Project under the name Harbour. If you copy code from other
* Harbour Project or Free Software Foundation releases into a copy of
* Harbour, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for Harbour, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice.
*
*/
/* NOTE: Xbase++ has a standard function named dbSkipper(), it's not a
standard CA-Cl*pper 5.x function, though. */
/* NOTE: This function is exactly the same as Skipped() in browdb.prg */
#ifdef HB_COMPAT_XPP
#ifdef HB_PRG_DBSKIPPER
FUNCTION dbSkipper( nRecs )
LOCAL nSkipped := 0
IF LastRec() != 0
IF nRecs == 0
dbSkip( 0 )
ELSEIF nRecs > 0 .AND. RecNo() != LastRec() + 1
DO WHILE nSkipped < nRecs
dbSkip( 1 )
IF Eof()
dbSkip( -1 )
EXIT
ENDIF
nSkipped++
ENDDO
ELSEIF nRecs < 0
DO WHILE nSkipped > nRecs
dbSkip( -1 )
IF Bof()
EXIT
ENDIF
nSkipped--
ENDDO
ENDIF
ENDIF
RETURN nSkipped
#endif
#endif

View File

@@ -1,65 +0,0 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* Xbase++ compatible SLEEP() function
*
* Copyright 2009 Viktor Szakats (harbour.01 syenar.hu)
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
*
* As a special exception, the Harbour Project gives permission for
* additional uses of the text contained in its release of Harbour.
*
* The exception is that, if you link the Harbour libraries with other
* files to produce an executable, this does not by itself cause the
* resulting executable to be covered by the GNU General Public License.
* Your use of that executable is in no way restricted on account of
* linking the Harbour library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the Harbour
* Project under the name Harbour. If you copy code from other
* Harbour Project or Free Software Foundation releases into a copy of
* Harbour, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for Harbour, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice.
*
*/
#include "hbapi.h"
#ifdef HB_COMPAT_XPP
/* NOTE: Not using the original name SLEEP() as it collides with
other implementations with the same name (FlagsShip, CLIP)
which also expects parameter differently. [vszakats] */
HB_FUNC( XPP_SLEEP )
{
hb_idleSleep( ( ( double ) hb_parnl( 1 ) ) / 100 );
}
#endif

View File

@@ -1,94 +0,0 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* NUMBUTTONS(), SETMOUSE() Xbase++ compatible functions.
*
* Copyright 1999-2001 Viktor Szakats (harbour.01 syenar.hu)
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
*
* As a special exception, the Harbour Project gives permission for
* additional uses of the text contained in its release of Harbour.
*
* The exception is that, if you link the Harbour libraries with other
* files to produce an executable, this does not by itself cause the
* resulting executable to be covered by the GNU General Public License.
* Your use of that executable is in no way restricted on account of
* linking the Harbour library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the Harbour
* Project under the name Harbour. If you copy code from other
* Harbour Project or Free Software Foundation releases into a copy of
* Harbour, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for Harbour, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice.
*
*/
#include "hbapi.h"
#include "hbapiitm.h"
#include "hbapigt.h"
/* NOTE: Xbase++ compatible functions */
#ifdef HB_COMPAT_XPP
HB_FUNC( NUMBUTTONS )
{
hb_retni( hb_mouseCountButton() );
}
HB_FUNC( SETMOUSE )
{
HB_BOOL fRow, fCol;
hb_retl( hb_mouseGetCursor() );
if( HB_ISLOG( 1 ) )
hb_mouseSetCursor( hb_parl( 1 ) );
fRow = HB_ISNUM( 2 );
fCol = HB_ISNUM( 3 );
if( fRow || fCol )
{
int iRow = 0, iCol = 0;
if( !fRow || !fCol )
hb_mouseGetPos( &iRow, &iCol );
if( fRow )
iRow = hb_parni( 2 );
if( fCol )
iCol = hb_parni( 3 );
hb_mouseSetPos( iRow, iCol );
}
}
#endif

View File

@@ -1,70 +0,0 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* XPP compatible OEM <-> ANSI string conversion functions
*
* Copyright 1999-2007 Viktor Szakats (harbour.01 syenar.hu)
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
*
* As a special exception, the Harbour Project gives permission for
* additional uses of the text contained in its release of Harbour.
*
* The exception is that, if you link the Harbour libraries with other
* files to produce an executable, this does not by itself cause the
* resulting executable to be covered by the GNU General Public License.
* Your use of that executable is in no way restricted on account of
* linking the Harbour library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the Harbour
* Project under the name Harbour. If you copy code from other
* Harbour Project or Free Software Foundation releases into a copy of
* Harbour, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for Harbour, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice.
*
*/
#include "hbapi.h"
#ifdef HB_COMPAT_XPP
HB_FUNC_EXTERN( HB_ANSITOOEM );
HB_FUNC_EXTERN( HB_OEMTOANSI );
HB_FUNC( CONVTOOEMCP )
{
HB_FUNC_EXEC( HB_ANSITOOEM );
}
HB_FUNC( CONVTOANSICP )
{
HB_FUNC_EXEC( HB_OEMTOANSI );
}
#endif

View File

@@ -1,97 +0,0 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* CURDRIVE() function
*
* Copyright 1999-2001 Viktor Szakats (harbour.01 syenar.hu)
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
*
* As a special exception, the Harbour Project gives permission for
* additional uses of the text contained in its release of Harbour.
*
* The exception is that, if you link the Harbour libraries with other
* files to produce an executable, this does not by itself cause the
* resulting executable to be covered by the GNU General Public License.
* Your use of that executable is in no way restricted on account of
* linking the Harbour library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the Harbour
* Project under the name Harbour. If you copy code from other
* Harbour Project or Free Software Foundation releases into a copy of
* Harbour, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for Harbour, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice.
*
*/
#include "hbapi.h"
#include "hbapifs.h"
#include "hbapierr.h"
#ifdef HB_COMPAT_XPP
/* NOTE: Xbase++ compatible */
HB_FUNC( CURDRIVE )
{
#if defined( HB_OS_HAS_DRIVE_LETTER )
char szCurDrive[ 1 ];
const char * szDrive;
szCurDrive[ 0 ] = ( ( char ) hb_fsCurDrv() ) + 'A';
hb_retclen( szCurDrive, 1 );
szDrive = hb_parc( 1 );
if( szDrive )
{
int iDrive = -1;
if( *szDrive >= 'A' && *szDrive <= 'Z' )
iDrive = *szDrive - 'A';
else if( *szDrive >= 'a' && *szDrive <= 'z' )
iDrive = *szDrive - 'a';
if( iDrive >= 0 )
{
while( hb_fsChDrv( iDrive ) != 0 )
{
HB_USHORT uiAction = hb_errRT_BASE_Ext1( EG_OPEN, 6001, "Operating system error",
HB_ERR_FUNCNAME, 0, EF_CANDEFAULT | EF_CANRETRY,
HB_ERR_ARGS_BASEPARAMS );
if( uiAction != E_RETRY )
break;
}
}
}
#else
hb_retc_null();
#endif
}
#endif

View File

@@ -216,10 +216,3 @@ METHOD New( cHeading, bBlock ) CLASS TBCOLUMN
FUNCTION TBColumnNew( cHeading, bBlock )
RETURN TBColumn():New( cHeading, bBlock )
#ifdef HB_COMPAT_XPP
CREATE CLASS xpp_TBColumn INHERIT TBColumn
ENDCLASS
#endif

View File

@@ -244,15 +244,6 @@ EXPORTED:
/* NOTE: nMode is an undocumented parameter in CA-Cl*pper */
METHOD configure( nMode ) // mark that the internal settings of the TBrowse object should be reconfigured
#ifdef HB_COMPAT_XPP
METHOD viewArea() // Xbase++ compatible method
METHOD firstScrCol() // Xbase++ compatible method
MESSAGE _left() METHOD Left()
MESSAGE _right() METHOD Right()
MESSAGE _end() METHOD End()
#endif
METHOD new( nTop, nLeft, nBottom, nRight ) // constructor, NOTE: This method is a Harbour extension [vszakats]
PROTECTED:
@@ -2361,45 +2352,6 @@ METHOD nRight( nRight ) CLASS TBROWSE
RETURN ::n_Right
#ifdef HB_COMPAT_XPP
METHOD viewArea() CLASS TBROWSE
LOCAL nWidth, nFrozenWidth
IF ::nConfigure != 0
::doConfigure()
ENDIF
// TOFIX
nWidth := nFrozenWidth := _TBR_COORD( ::n_Right ) - _TBR_COORD( ::n_Left ) + 1
_MAXFREEZE( ::nFrozen, ::aColData, @nWidth )
nFrozenWidth -= nWidth
RETURN { ::n_Top + ::nHeadHeight + iif( ::lHeadSep, 1, 0 ),;
::n_Left,;
::n_Bottom - ::nFootHeight - iif( ::lFootSep, 1, 0 ),;
::n_Right,;
nFrozenWidth }
/* NOTE: Returns the left margin relative column position of the first
non-frozen column. Xbase++ compatible method. */
METHOD firstScrCol() CLASS TBROWSE
IF ::nConfigure != 0
::doConfigure()
ENDIF
// TOFIX
RETURN iif( ::leftVisible == 0, 0, ::aColData[ ::leftVisible ][ _TBCI_COLPOS ] )
#endif
#ifdef HB_COMPAT_C53
METHOD nRow() CLASS TBROWSE
@@ -2760,61 +2712,3 @@ FUNCTION TBMouse( oBrw, nMRow, nMCol )
RETURN TBR_EXCEPTION
#endif
#ifdef HB_COMPAT_XPP
CREATE CLASS xpp_TBrowse INHERIT TBrowse
EXPORTED:
METHOD viewArea()
METHOD firstScrCol()
METHOD _left()
METHOD _right()
METHOD _end()
ENDCLASS
METHOD viewArea() CLASS xpp_TBrowse
LOCAL nWidth, nFrozenWidth
IF ::nConfigure != 0
::doConfigure()
ENDIF
// TOFIX
nWidth := nFrozenWidth := _TBR_COORD( ::n_Right ) - _TBR_COORD( ::n_Left ) + 1
_MAXFREEZE( ::nFrozen, ::aColData, @nWidth )
nFrozenWidth -= nWidth
RETURN { ::n_Top + ::nHeadHeight + iif( ::lHeadSep, 1, 0 ),;
::n_Left,;
::n_Bottom - ::nFootHeight - iif( ::lFootSep, 1, 0 ),;
::n_Right,;
nFrozenWidth }
/* NOTE: Returns the left margin relative column position of the first
non-frozen column. Xbase++ compatible method. */
METHOD firstScrCol() CLASS xpp_TBrowse
IF ::nConfigure != 0
::doConfigure()
ENDIF
// TOFIX
RETURN iif( ::leftVisible == 0, 0, ::aColData[ ::leftVisible ][ _TBCI_COLPOS ] )
METHOD _left() CLASS xpp_TBrowse
RETURN ::left()
METHOD _right() CLASS xpp_TBrowse
RETURN ::right()
METHOD _end() CLASS xpp_TBrowse
RETURN ::end()
#endif

View File

@@ -1,95 +0,0 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* Get Class (Xbase++ compatible)
*
* Copyright 2007-2009 Viktor Szakats (harbour.01 syenar.hu)
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
*
* As a special exception, the Harbour Project gives permission for
* additional uses of the text contained in its release of Harbour.
*
* The exception is that, if you link the Harbour libraries with other
* files to produce an executable, this does not by itself cause the
* resulting executable to be covered by the GNU General Public License.
* Your use of that executable is in no way restricted on account of
* linking the Harbour library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the Harbour
* Project under the name Harbour. If you copy code from other
* Harbour Project or Free Software Foundation releases into a copy of
* Harbour, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for Harbour, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice.
*
*/
#include "hbclass.ch"
#include "common.ch"
#ifdef HB_COMPAT_XPP
CREATE CLASS xpp_Get INHERIT Get
EXPORTED:
METHOD posInBuffer( nRow, nCol )
METHOD _end()
METHOD _assign()
METHOD _delete()
ENDCLASS
/* NOTE: Not tested or compared to Xbase++. [vszakats] */
/* TOFIX: To make it work when @S was used. [vszakats] */
METHOD posInBuffer( nRow, nCol ) CLASS xpp_Get
IF ::hasFocus .AND. ;
nRow == ::nRow .AND. ;
nCol >= ::nCol + ::nPos - 1 .AND. ;
nCol <= ::nCol + ::nDispLen
RETURN nCol - ::nCol + 1
ENDIF
RETURN 0
METHOD _end() CLASS xpp_Get
RETURN ::end()
METHOD _assign() CLASS xpp_Get
RETURN ::assign()
METHOD _delete() CLASS xpp_Get
RETURN ::delete()
#endif

View File

@@ -1,107 +0,0 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* XPP compatible thread functions
*
* Copyright 2008 Przemyslaw Czerpak <druzus / at / priv.onet.pl>
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
*
* As a special exception, the Harbour Project gives permission for
* additional uses of the text contained in its release of Harbour.
*
* The exception is that, if you link the Harbour libraries with other
* files to produce an executable, this does not by itself cause the
* resulting executable to be covered by the GNU General Public License.
* Your use of that executable is in no way restricted on account of
* linking the Harbour library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the Harbour
* Project under the name Harbour. If you copy code from other
* Harbour Project or Free Software Foundation releases into a copy of
* Harbour, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for Harbour, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice.
*
*/
#include "common.ch"
#ifdef HB_COMPAT_XPP
FUNCTION ThreadID()
RETURN hb_threadId()
FUNCTION ThreadObject( oThread )
THREAD STATIC t_oThread
IF PCount() > 0
t_oThread := oThread
ENDIF
RETURN t_oThread
FUNCTION ThreadWait( aThreads, nTimeOut )
LOCAL xResult, nPos, apThIDs, th
apThIDs := {}
FOR each th IN aThreads
IF ISOBJECT( th )
AAdd( apThIDs, th:threadSelf )
ELSE
AAdd( apThIDs, th )
ENDIF
NEXT
nPos := hb_threadWait( apThIDs, iif( ISNUMBER( nTimeOut ) .AND. nTimeOut != 0, ;
nTimeOut / 100, ) )
IF nPos != 0
xResult := aThreads[ nPos ]
ENDIF
RETURN xResult
FUNCTION ThreadWaitAll( aThreads, nTimeOut )
LOCAL apThIDs, th
apThIDs := {}
FOR each th IN aThreads
IF ISOBJECT( th )
AAdd( apThIDs, th:threadSelf )
ELSE
AAdd( apThIDs, th )
ENDIF
NEXT
RETURN hb_threadWait( apThIDs, iif( ISNUMBER( nTimeOut ) .AND. nTimeOut != 0, ;
nTimeOut / 100, ), .T. ) == Len( apThIDs )
/* TODO: ThreadInfo() */
#endif

View File

@@ -1,266 +0,0 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* XPP compatible classes to manage threads
*
* Copyright 2008 Przemyslaw Czerpak <druzus / at / priv.onet.pl>
* www - http://www.harbour-project.org
* special thanks for Pritpal Bedi for class skeleton with info about
* Xbase++ and to other contributors which I hope will finish and fix
* this code
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
*
* As a special exception, the Harbour Project gives permission for
* additional uses of the text contained in its release of Harbour.
*
* The exception is that, if you link the Harbour libraries with other
* files to produce an executable, this does not by itself cause the
* resulting executable to be covered by the GNU General Public License.
* Your use of that executable is in no way restricted on account of
* linking the Harbour library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the Harbour
* Project under the name Harbour. If you copy code from other
* Harbour Project or Free Software Foundation releases into a copy of
* Harbour, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for Harbour, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice.
*
*/
#include "common.ch"
#include "hbclass.ch"
#include "hbthread.ch"
#ifdef HB_COMPAT_XPP
/* I do not know Xbase++ values */
#define QUIT_NORESTART 1
#define QUIT_RESTART 2
/*
* SIGNAL class
*/
CREATE CLASS TSignal FUNCTION Signal
VAR cargo AS USUAL EXPORTED
VAR mutex AS USUAL PROTECTED
EXPORTED:
METHOD new( ... )
METHOD wait( nTimeOut )
METHOD signal()
ENDCLASS
METHOD new( ... ) CLASS TSIGNAL
::mutex := hb_mutexCreate()
::Init( ... )
RETURN Self
METHOD wait( nTimeOut ) CLASS TSIGNAL
RETURN __ClsSyncWait( ::mutex, nTimeOut )
METHOD signal() CLASS TSIGNAL
__ClsSyncSignal( ::mutex )
RETURN Self
/*
* THREAD class
*/
CREATE CLASS TThread FUNCTION Thread
EXPORTED:
VAR cargo AS USUAL
VAR active AS LOGICAL READONLY INIT .f.
VAR deltaTime AS NUMERIC READONLY INIT 0
VAR interval AS USUAL READONLY INIT NIL
VAR priority AS NUMERIC READONLY INIT 0
VAR startCount AS NUMERIC READONLY INIT 0
VAR startTime AS USUAL READONLY INIT NIL
VAR atEnd AS USUAL INIT NIL
VAR atStart AS USUAL INIT NIL
VAR result AS USUAL INIT NIL
PROTECTED:
VAR maxStackSize AS USUAL INIT 50000
HIDDEN:
VAR pThreadID AS USUAL INIT NIL
EXPORTED:
METHOD new( ... )
PROTECTED:
/* METHOD atEnd() */
/* METHOD atStart() */
METHOD execute()
EXPORTED:
METHOD quit( xResult, nRestart )
METHOD setInterval( nHSeconds )
METHOD setPriority( nPriority )
METHOD setStartTime( nSeconds )
METHOD start( xAction, ... )
METHOD synchronize( nTimeOut )
METHOD threadSelf()
METHOD threadID()
METHOD thread INLINE ::TThread()
ENDCLASS
METHOD new( ... ) CLASS TTHREAD
LOCAL nMaxStackSize
IF PCount() == 1
nMaxStackSize := hb_PValue( 1 )
IF ISNUMBER( nMaxStackSize )
::maxStackSize := nMaxStackSize
ENDIF
ENDIF
::Init( ... )
RETURN Self
METHOD execute() CLASS TTHREAD
HB_SYMBOL_UNUSED( Self )
RETURN NIL
METHOD quit( xResult, nRestart ) CLASS TTHREAD
IF hb_threadSelf() == ::pThreadID
IF ISNUMBER( nRestart )
IF nRestart == QUIT_NORESTART
::interval := NIL
ELSEIF nRestart == QUIT_RESTART
IF ISNUMBER( ::interval )
/* TODO: do not interrupt by QUIT but restart execution */
ENDIF
ENDIF
ENDIF
IF PCOUNT() > 0
::result := xResult
ENDIF
QUIT
ENDIF
RETURN NIL
METHOD setInterval( nHSeconds ) CLASS TTHREAD
IF nHSeconds == NIL .OR. ISNUMBER( nHSeconds )
::interval := nHSeconds
ENDIF
RETURN .F.
METHOD setPriority( nPriority ) CLASS TTHREAD
/* TODO: add thread priority setting */
IF ISNUMBER( nPriority )
::priority := nPriority
ENDIF
RETURN .F.
METHOD setStartTime( nSeconds ) CLASS TTHREAD
/* TODO: add such functionality, probably by special thread */
IF ISNUMBER( nSeconds )
::startTime := nSeconds
ELSEIF nSeconds == NIL
::startTime := NIL
ENDIF
RETURN .F.
METHOD start( xAction, ... ) CLASS TTHREAD
/* TODO: thread stack size set by user ::maxStackSize */
IF ::active
RETURN .F.
ELSEIF xAction == NIL
::pThreadID := hb_threadStart( HB_THREAD_INHERIT_PUBLIC, ;
{ |...|
WHILE .T.
::startTime := Seconds()
::active := .T.
ThreadObject( Self )
::result := ::execute( ... )
::startTime := NIL
::active := .F.
IF ISNUMBER( ::interval )
hb_idleSleep( ::interval / 100 )
LOOP
ENDIF
EXIT
ENDDO
RETURN NIL
}, ... )
ELSEIF !Empty( xAction ) .AND. ValType( xAction ) $ "CBS"
::pThreadID := hb_threadStart( HB_THREAD_INHERIT_PUBLIC, ;
{ |...|
WHILE .T.
::startTime := Seconds()
::active := .T.
ThreadObject( Self )
IF ::atStart != NIL
EVAL( ::atStart, ... )
ENDIF
::result := DO( xAction, ... )
IF ::atEnd != NIL
EVAL( ::atEnd, ... )
ENDIF
::startTime := NIL
::active := .F.
IF ISNUMBER( ::interval )
hb_idleSleep( ::interval / 100 )
LOOP
ENDIF
EXIT
ENDDO
RETURN NIL
}, ... )
ELSE
RETURN .F.
ENDIF
RETURN .T.
METHOD synchronize( nTimeOut ) CLASS TTHREAD
LOCAL pThreadID := ::pThreadID
IF hb_threadSelf() != pThreadID
RETURN hb_threadWait( pThreadID, ;
iif( ISNUMBER( nTimeOut ) .AND. nTimeOut != 0, ;
nTimeOut / 100, ) )
ENDIF
RETURN .F.
METHOD threadSelf() CLASS TTHREAD
RETURN ::pThreadID
METHOD threadID() CLASS TTHREAD
LOCAL pThreadID := ::pThreadID
RETURN IIF( pThreadID == NIL, 0, hb_threadID( pThreadID ) )
#endif

View File

@@ -1,58 +0,0 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* XPP compatible _Typefile() function
*
* Copyright 1999-2007 Viktor Szakats (harbour.01 syenar.hu)
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
*
* As a special exception, the Harbour Project gives permission for
* additional uses of the text contained in its release of Harbour.
*
* The exception is that, if you link the Harbour libraries with other
* files to produce an executable, this does not by itself cause the
* resulting executable to be covered by the GNU General Public License.
* Your use of that executable is in no way restricted on account of
* linking the Harbour library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the Harbour
* Project under the name Harbour. If you copy code from other
* Harbour Project or Free Software Foundation releases into a copy of
* Harbour, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for Harbour, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice.
*
*/
#ifdef HB_COMPAT_XPP
FUNCTION _TypeFile( cFile, lPrint )
RETURN __TypeFile( cFile, lPrint )
#endif