From 73aa1fd7d5422bcbe1845f8206e47b2146b78df3 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sat, 20 Feb 2010 03:31:25 +0000 Subject: [PATCH] 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. --- harbour/ChangeLog | 36 +++++ harbour/contrib/xpp/binnumx.c | 6 +- harbour/contrib/xpp/tthreadx.prg | 6 +- harbour/contrib/xpp/xppextrn.ch | 3 +- harbour/include/hbextern.ch | 40 ----- harbour/src/rdd/Makefile | 9 -- harbour/src/rdd/dbcmdx.c | 185 --------------------- harbour/src/rdd/dbdetacx.c | 71 --------- harbour/src/rdd/dbfuncsx.prg | 70 -------- harbour/src/rdd/dbjoinx.prg | 58 ------- harbour/src/rdd/dblistx.prg | 58 ------- harbour/src/rdd/dbsortx.prg | 58 ------- harbour/src/rdd/dbstruxx.prg | 63 -------- harbour/src/rdd/dbtotalx.prg | 58 ------- harbour/src/rdd/dbupdatx.prg | 58 ------- harbour/src/rtl/Makefile | 10 -- harbour/src/rtl/binnumx.c | 118 -------------- harbour/src/rtl/browdb.prg | 6 - harbour/src/rtl/browdbx.prg | 93 ----------- harbour/src/rtl/idlex.c | 65 -------- harbour/src/rtl/mousex.c | 94 ----------- harbour/src/rtl/oemansix.c | 70 -------- harbour/src/rtl/philesx.c | 97 ----------- harbour/src/rtl/tbcolumn.prg | 7 - harbour/src/rtl/tbrowse.prg | 106 ------------ harbour/src/rtl/tgetx.prg | 95 ----------- harbour/src/rtl/thfuncx.prg | 107 ------------- harbour/src/rtl/tthreadx.prg | 266 ------------------------------- harbour/src/rtl/typefilx.prg | 58 ------- 29 files changed, 45 insertions(+), 1926 deletions(-) delete mode 100644 harbour/src/rdd/dbcmdx.c delete mode 100644 harbour/src/rdd/dbdetacx.c delete mode 100644 harbour/src/rdd/dbfuncsx.prg delete mode 100644 harbour/src/rdd/dbjoinx.prg delete mode 100644 harbour/src/rdd/dblistx.prg delete mode 100644 harbour/src/rdd/dbsortx.prg delete mode 100644 harbour/src/rdd/dbstruxx.prg delete mode 100644 harbour/src/rdd/dbtotalx.prg delete mode 100644 harbour/src/rdd/dbupdatx.prg delete mode 100644 harbour/src/rtl/binnumx.c delete mode 100644 harbour/src/rtl/browdbx.prg delete mode 100644 harbour/src/rtl/idlex.c delete mode 100644 harbour/src/rtl/mousex.c delete mode 100644 harbour/src/rtl/oemansix.c delete mode 100644 harbour/src/rtl/philesx.c delete mode 100644 harbour/src/rtl/tgetx.prg delete mode 100644 harbour/src/rtl/thfuncx.prg delete mode 100644 harbour/src/rtl/tthreadx.prg delete mode 100644 harbour/src/rtl/typefilx.prg diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 04eb3cb273..c93d9a2593 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -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 diff --git a/harbour/contrib/xpp/binnumx.c b/harbour/contrib/xpp/binnumx.c index ff68151a82..edb786f52f 100644 --- a/harbour/contrib/xpp/binnumx.c +++ b/harbour/contrib/xpp/binnumx.c @@ -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 ); diff --git a/harbour/contrib/xpp/tthreadx.prg b/harbour/contrib/xpp/tthreadx.prg index 1dd90e49f0..ece9b7ee5b 100644 --- a/harbour/contrib/xpp/tthreadx.prg +++ b/harbour/contrib/xpp/tthreadx.prg @@ -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 diff --git a/harbour/contrib/xpp/xppextrn.ch b/harbour/contrib/xpp/xppextrn.ch index 004d7d3526..c230b380db 100644 --- a/harbour/contrib/xpp/xppextrn.ch +++ b/harbour/contrib/xpp/xppextrn.ch @@ -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 diff --git a/harbour/include/hbextern.ch b/harbour/include/hbextern.ch index f2a8360796..58c7cf1a39 100644 --- a/harbour/include/hbextern.ch +++ b/harbour/include/hbextern.ch @@ -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 diff --git a/harbour/src/rdd/Makefile b/harbour/src/rdd/Makefile index 5a87a91182..7ff40c7ec8 100644 --- a/harbour/src/rdd/Makefile +++ b/harbour/src/rdd/Makefile @@ -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 \ diff --git a/harbour/src/rdd/dbcmdx.c b/harbour/src/rdd/dbcmdx.c deleted file mode 100644 index 382c422e3f..0000000000 --- a/harbour/src/rdd/dbcmdx.c +++ /dev/null @@ -1,185 +0,0 @@ -/* - * $Id$ - */ - -/* - * Harbour Project source code: - * Base RDD module (XPP functions) - * - * Copyright 1999 Bruno Cantero - * Copyright 2004-2007 Przemyslaw Czerpak - * 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 diff --git a/harbour/src/rdd/dbdetacx.c b/harbour/src/rdd/dbdetacx.c deleted file mode 100644 index 3555cfd7a5..0000000000 --- a/harbour/src/rdd/dbdetacx.c +++ /dev/null @@ -1,71 +0,0 @@ -/* - * $Id$ - */ - -/* - * Harbour Project source code: - * .prg functions for workarea detaching - * - * Copyright 2008 Przemyslaw Czerpak - * 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 diff --git a/harbour/src/rdd/dbfuncsx.prg b/harbour/src/rdd/dbfuncsx.prg deleted file mode 100644 index 91e6bac119..0000000000 --- a/harbour/src/rdd/dbfuncsx.prg +++ /dev/null @@ -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 diff --git a/harbour/src/rdd/dbjoinx.prg b/harbour/src/rdd/dbjoinx.prg deleted file mode 100644 index b791a6e781..0000000000 --- a/harbour/src/rdd/dbjoinx.prg +++ /dev/null @@ -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 diff --git a/harbour/src/rdd/dblistx.prg b/harbour/src/rdd/dblistx.prg deleted file mode 100644 index bd011374d3..0000000000 --- a/harbour/src/rdd/dblistx.prg +++ /dev/null @@ -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 diff --git a/harbour/src/rdd/dbsortx.prg b/harbour/src/rdd/dbsortx.prg deleted file mode 100644 index c20439ee56..0000000000 --- a/harbour/src/rdd/dbsortx.prg +++ /dev/null @@ -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 diff --git a/harbour/src/rdd/dbstruxx.prg b/harbour/src/rdd/dbstruxx.prg deleted file mode 100644 index a31b4f60fa..0000000000 --- a/harbour/src/rdd/dbstruxx.prg +++ /dev/null @@ -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 diff --git a/harbour/src/rdd/dbtotalx.prg b/harbour/src/rdd/dbtotalx.prg deleted file mode 100644 index 20f0370068..0000000000 --- a/harbour/src/rdd/dbtotalx.prg +++ /dev/null @@ -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 diff --git a/harbour/src/rdd/dbupdatx.prg b/harbour/src/rdd/dbupdatx.prg deleted file mode 100644 index 81057f0d55..0000000000 --- a/harbour/src/rdd/dbupdatx.prg +++ /dev/null @@ -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 diff --git a/harbour/src/rtl/Makefile b/harbour/src/rtl/Makefile index 7c558cbe51..064d31ef4d 100644 --- a/harbour/src/rtl/Makefile +++ b/harbour/src/rtl/Makefile @@ -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 \ diff --git a/harbour/src/rtl/binnumx.c b/harbour/src/rtl/binnumx.c deleted file mode 100644 index f244d43b5e..0000000000 --- a/harbour/src/rtl/binnumx.c +++ /dev/null @@ -1,118 +0,0 @@ -/* - * $Id$ - */ - -/* - * Harbour Project source code: - * BIN2U(), W2BIN(), U2BIN() functions - * - * Copyright 2009 Przemyslaw Czerpak - * 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 diff --git a/harbour/src/rtl/browdb.prg b/harbour/src/rtl/browdb.prg index 990d5ec14b..3e087dc468 100644 --- a/harbour/src/rtl/browdb.prg +++ b/harbour/src/rtl/browdb.prg @@ -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 diff --git a/harbour/src/rtl/browdbx.prg b/harbour/src/rtl/browdbx.prg deleted file mode 100644 index 2fb5f7b7d9..0000000000 --- a/harbour/src/rtl/browdbx.prg +++ /dev/null @@ -1,93 +0,0 @@ -/* - * $Id$ - */ - -/* - * Harbour Project source code: - * DBSKIPPER() function for Xbase++ - * - * Copyright 1999 Paul Tucker - * 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 diff --git a/harbour/src/rtl/idlex.c b/harbour/src/rtl/idlex.c deleted file mode 100644 index f0f7c933ff..0000000000 --- a/harbour/src/rtl/idlex.c +++ /dev/null @@ -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 diff --git a/harbour/src/rtl/mousex.c b/harbour/src/rtl/mousex.c deleted file mode 100644 index 5693347ee3..0000000000 --- a/harbour/src/rtl/mousex.c +++ /dev/null @@ -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 diff --git a/harbour/src/rtl/oemansix.c b/harbour/src/rtl/oemansix.c deleted file mode 100644 index 2298305af9..0000000000 --- a/harbour/src/rtl/oemansix.c +++ /dev/null @@ -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 diff --git a/harbour/src/rtl/philesx.c b/harbour/src/rtl/philesx.c deleted file mode 100644 index 18c973f12e..0000000000 --- a/harbour/src/rtl/philesx.c +++ /dev/null @@ -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 diff --git a/harbour/src/rtl/tbcolumn.prg b/harbour/src/rtl/tbcolumn.prg index e62f915b7f..b7c7f16fd4 100644 --- a/harbour/src/rtl/tbcolumn.prg +++ b/harbour/src/rtl/tbcolumn.prg @@ -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 diff --git a/harbour/src/rtl/tbrowse.prg b/harbour/src/rtl/tbrowse.prg index 94d6430fc1..d86425a05d 100644 --- a/harbour/src/rtl/tbrowse.prg +++ b/harbour/src/rtl/tbrowse.prg @@ -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 diff --git a/harbour/src/rtl/tgetx.prg b/harbour/src/rtl/tgetx.prg deleted file mode 100644 index d7f56dd10a..0000000000 --- a/harbour/src/rtl/tgetx.prg +++ /dev/null @@ -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 diff --git a/harbour/src/rtl/thfuncx.prg b/harbour/src/rtl/thfuncx.prg deleted file mode 100644 index 9926c44a69..0000000000 --- a/harbour/src/rtl/thfuncx.prg +++ /dev/null @@ -1,107 +0,0 @@ -/* - * $Id$ - */ - -/* - * Harbour Project source code: - * XPP compatible thread functions - * - * Copyright 2008 Przemyslaw Czerpak - * 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 diff --git a/harbour/src/rtl/tthreadx.prg b/harbour/src/rtl/tthreadx.prg deleted file mode 100644 index ff1c6b02ed..0000000000 --- a/harbour/src/rtl/tthreadx.prg +++ /dev/null @@ -1,266 +0,0 @@ -/* - * $Id$ - */ - -/* - * Harbour Project source code: - * XPP compatible classes to manage threads - * - * Copyright 2008 Przemyslaw Czerpak - * 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 diff --git a/harbour/src/rtl/typefilx.prg b/harbour/src/rtl/typefilx.prg deleted file mode 100644 index 31331a11c6..0000000000 --- a/harbour/src/rtl/typefilx.prg +++ /dev/null @@ -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