From 95422142ab424646da0553c4f69c38f69de755ae Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 17 Oct 2007 09:57:59 +0000 Subject: [PATCH] 2007-10-17 11:55 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * common.mak * source/rtl/Makefile * source/rtl/oemansi.c + source/rtl/oemansix.c * source/rtl/typefile.prg + source/rtl/typefilx.prg * source/rdd/Makefile * source/rdd/dbjoin.prg + source/rdd/dbjoinx.prg * source/rdd/dblist.prg + source/rdd/dblistx.prg * source/rdd/dbtotal.prg + source/rdd/dbtotalx.prg * source/rdd/dbstrux.prg + source/rdd/dbstruxx.prg * source/rdd/dbfuncs.prg + source/rdd/dbfuncsx.prg * source/rdd/dbsort.prg + source/rdd/dbsortx.prg * source/rdd/dbcmd.c + source/rdd/dbcmdx.c * source/rdd/dbupdat.prg + source/rdd/dbupdatx.prg + Moved XPP compatible functions into separated source files. --- harbour/ChangeLog | 26 +++++ harbour/common.mak | 10 ++ harbour/source/rdd/Makefile | 12 ++- harbour/source/rdd/dbcmd.c | 115 +-------------------- harbour/source/rdd/dbcmdx.c | 171 ++++++++++++++++++++++++++++++++ harbour/source/rdd/dbfuncs.prg | 19 ---- harbour/source/rdd/dbfuncsx.prg | 70 +++++++++++++ harbour/source/rdd/dbjoin.prg | 7 -- harbour/source/rdd/dbjoinx.prg | 58 +++++++++++ harbour/source/rdd/dblist.prg | 7 -- harbour/source/rdd/dblistx.prg | 58 +++++++++++ harbour/source/rdd/dbsort.prg | 7 -- harbour/source/rdd/dbsortx.prg | 58 +++++++++++ harbour/source/rdd/dbstrux.prg | 12 --- harbour/source/rdd/dbstruxx.prg | 63 ++++++++++++ harbour/source/rdd/dbtotal.prg | 7 -- harbour/source/rdd/dbtotalx.prg | 58 +++++++++++ harbour/source/rdd/dbupdat.prg | 7 -- harbour/source/rdd/dbupdatx.prg | 58 +++++++++++ harbour/source/rtl/Makefile | 2 + harbour/source/rtl/oemansi.c | 20 +--- harbour/source/rtl/oemansix.c | 68 +++++++++++++ harbour/source/rtl/typefile.prg | 7 -- harbour/source/rtl/typefilx.prg | 58 +++++++++++ 24 files changed, 770 insertions(+), 208 deletions(-) create mode 100644 harbour/source/rdd/dbcmdx.c create mode 100644 harbour/source/rdd/dbfuncsx.prg create mode 100644 harbour/source/rdd/dbjoinx.prg create mode 100644 harbour/source/rdd/dblistx.prg create mode 100644 harbour/source/rdd/dbsortx.prg create mode 100644 harbour/source/rdd/dbstruxx.prg create mode 100644 harbour/source/rdd/dbtotalx.prg create mode 100644 harbour/source/rdd/dbupdatx.prg create mode 100644 harbour/source/rtl/oemansix.c create mode 100644 harbour/source/rtl/typefilx.prg diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c33d8d9b2b..a9e0db87f3 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,32 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ +2007-10-17 11:55 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * common.mak + * source/rtl/Makefile + * source/rtl/oemansi.c + + source/rtl/oemansix.c + * source/rtl/typefile.prg + + source/rtl/typefilx.prg + * source/rdd/Makefile + * source/rdd/dbjoin.prg + + source/rdd/dbjoinx.prg + * source/rdd/dblist.prg + + source/rdd/dblistx.prg + * source/rdd/dbtotal.prg + + source/rdd/dbtotalx.prg + * source/rdd/dbstrux.prg + + source/rdd/dbstruxx.prg + * source/rdd/dbfuncs.prg + + source/rdd/dbfuncsx.prg + * source/rdd/dbsort.prg + + source/rdd/dbsortx.prg + * source/rdd/dbcmd.c + + source/rdd/dbcmdx.c + * source/rdd/dbupdat.prg + + source/rdd/dbupdatx.prg + + Moved XPP compatible functions into separated source files. + 2007-10-17 00:33 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/Makefile + contrib/win32prn/Makefile diff --git a/harbour/common.mak b/harbour/common.mak index d5b258969c..b8d3042da2 100644 --- a/harbour/common.mak +++ b/harbour/common.mak @@ -471,6 +471,7 @@ RTL_LIB_OBJS = \ $(OBJ_DIR)\natmsg$(OBJEXT) \ $(OBJ_DIR)\net$(OBJEXT) \ $(OBJ_DIR)\oemansi$(OBJEXT) \ + $(OBJ_DIR)\oemansix$(OBJEXT) \ $(OBJ_DIR)\oldbox$(OBJEXT) \ $(OBJ_DIR)\oldclear$(OBJEXT) \ $(OBJ_DIR)\pad$(OBJEXT) \ @@ -588,6 +589,7 @@ RTL_LIB_OBJS = \ $(OBJ_DIR)\ttextlin$(OBJEXT) \ $(OBJ_DIR)\ttopbar$(OBJEXT) \ $(OBJ_DIR)\typefile$(OBJEXT) \ + $(OBJ_DIR)\typefilx$(OBJEXT) \ $(OBJ_DIR)\valtoexp$(OBJEXT) \ $(OBJ_DIR)\wait$(OBJEXT) \ @@ -777,6 +779,7 @@ CODEPAGE_LIB_OBJS = \ RDD_LIB_OBJS = \ $(OBJ_DIR)\dbcmd$(OBJEXT) \ + $(OBJ_DIR)\dbcmdx$(OBJEXT) \ $(OBJ_DIR)\hbdbsort$(OBJEXT) \ $(OBJ_DIR)\workarea$(OBJEXT) \ $(OBJ_DIR)\wacore$(OBJEXT) \ @@ -790,12 +793,19 @@ RDD_LIB_OBJS = \ $(OBJ_DIR)\dbdelim$(OBJEXT) \ $(OBJ_DIR)\dbsdf$(OBJEXT) \ $(OBJ_DIR)\dbjoin$(OBJEXT) \ + $(OBJ_DIR)\dbjoinx$(OBJEXT) \ $(OBJ_DIR)\dbtotal$(OBJEXT) \ + $(OBJ_DIR)\dbtotalx$(OBJEXT) \ $(OBJ_DIR)\dbfuncs$(OBJEXT) \ + $(OBJ_DIR)\dbfuncsx$(OBJEXT) \ $(OBJ_DIR)\dblist$(OBJEXT) \ + $(OBJ_DIR)\dblistx$(OBJEXT) \ $(OBJ_DIR)\dbsort$(OBJEXT) \ + $(OBJ_DIR)\dbsortx$(OBJEXT) \ $(OBJ_DIR)\dbstrux$(OBJEXT) \ + $(OBJ_DIR)\dbstruxx$(OBJEXT) \ $(OBJ_DIR)\dbupdat$(OBJEXT) \ + $(OBJ_DIR)\dbupdatx$(OBJEXT) \ $(OBJ_DIR)\rddord$(OBJEXT) \ $(OBJ_DIR)\rddsys$(OBJEXT) \ diff --git a/harbour/source/rdd/Makefile b/harbour/source/rdd/Makefile index 11a055ecb8..e2f8259844 100644 --- a/harbour/source/rdd/Makefile +++ b/harbour/source/rdd/Makefile @@ -6,6 +6,7 @@ ROOT = ../../ C_SOURCES=\ dbcmd.c \ + dbcmdx.c \ workarea.c \ wacore.c \ wafunc.c \ @@ -19,16 +20,23 @@ C_SOURCES=\ PRG_SOURCES=\ dbdelim.prg \ dbfuncs.prg \ + dbfuncsx.prg \ dbjoin.prg \ - dbtotal.prg \ + dbjoinx.prg \ dblist.prg \ + dblistx.prg \ dbsdf.prg \ dbsort.prg \ + dbsortx.prg \ dbstrux.prg \ + dbstruxx.prg \ + dbtotal.prg \ + dbtotalx.prg \ dbupdat.prg \ + dbupdatx.prg \ rddord.prg \ rddsys.prg \ - + ifeq ($(HB_MT),MT) MT_LIBNAME=rddmt endif diff --git a/harbour/source/rdd/dbcmd.c b/harbour/source/rdd/dbcmd.c index 5d3b9f9125..d232c1d361 100644 --- a/harbour/source/rdd/dbcmd.c +++ b/harbour/source/rdd/dbcmd.c @@ -50,6 +50,7 @@ * If you do not wish that, delete this exception notice. * */ + /* * The following functions are added by * Horacio Roldan @@ -1715,61 +1716,6 @@ HB_FUNC( ORDCOUNT ) #endif -#ifdef HB_COMPAT_XPP -HB_FUNC( ORDWILDSEEK ) -{ - AREAP pArea = ( AREAP ) hb_rddGetCurrentWorkAreaPointer(); - - if( pArea ) - { - char * szPattern = hb_parc( 1 ); - - if( szPattern ) - { - BOOL fCont = hb_parl( 2 ), fBack = hb_parl( 3 ), fFound = FALSE; - DBORDERINFO OrderInfo; - ERRCODE errCode = SUCCESS; - - memset( &OrderInfo, 0, sizeof( DBORDERINFO ) ); - OrderInfo.itmResult = hb_itemNew( NULL ); - - if( !fCont ) - { - char * szKey; - - if( fBack ) - errCode = SELF_GOBOTTOM( pArea ); - else - errCode = SELF_GOTOP( pArea ); - - if( errCode == SUCCESS ) - { - errCode = SELF_ORDINFO( pArea, DBOI_KEYVAL, &OrderInfo ); - if( errCode == SUCCESS ) - { - szKey = hb_itemGetCPtr( OrderInfo.itmResult ); - fFound = hb_strMatchWild( szKey, szPattern ); - } - } - } - if( !fFound && errCode == SUCCESS ) - { - OrderInfo.itmNewVal = hb_param( 1, HB_IT_STRING ); - if( SELF_ORDINFO( pArea, fBack ? DBOI_SKIPWILDBACK : DBOI_SKIPWILD, - &OrderInfo ) == SUCCESS ) - fFound = hb_itemGetL( OrderInfo.itmResult ); - } - hb_itemRelease( OrderInfo.itmResult ); - hb_retl( fFound ); - } - else - hb_errRT_DBCMD( EG_ARG, EDBCMD_DBFILEPUTBADPARAMETER, NULL, "ORDWILDSEEK" ); - } - else - hb_errRT_DBCMD( EG_NOTABLE, EDBCMD_NOTABLE, NULL, "ORDWILDSEEK" ); -} -#endif - HB_FUNC( ORDLISTADD ) { AREAP pArea = ( AREAP ) hb_rddGetCurrentWorkAreaPointer(); @@ -2692,62 +2638,3 @@ HB_FUNC( __RDDGETTEMPALIAS ) else hb_ret(); } - -#ifdef HB_COMPAT_XPP -HB_FUNC( DBSKIPPER ) -{ - AREAP pArea = ( AREAP ) hb_rddGetCurrentWorkAreaPointer(); - - if( pArea ) - { - LONG lSkipped = 0; - LONG lRecs = 1; - BOOL fBEof; - ULONG ulRecords = 0; - - if( SELF_RECCOUNT( pArea, &ulRecords ) == SUCCESS && ulRecords > 0 ) - { - if( ISNUM( 1 ) ) - lRecs = hb_parnl( 1 ) ; - - if( lRecs == 0 ) - SELF_SKIP( pArea, 0 ); - else if( lRecs > 0 ) - { - if( SELF_EOF( pArea, &fBEof ) == SUCCESS ) - { - while( lSkipped < lRecs ) - { - if( SELF_SKIP( pArea, 1 ) != SUCCESS ) - break; - if( SELF_EOF( pArea, &fBEof ) != SUCCESS ) - break; - if( fBEof ) - { - SELF_SKIP( pArea, -1 ); - break; - } - lSkipped++; - } - } - } - else /* if( lRecs < 0 ) */ - { - while( lSkipped > lRecs ) - { - if( SELF_SKIP( pArea, -1 ) != SUCCESS ) - break; - if( SELF_BOF( pArea, &fBEof ) != SUCCESS ) - break; - if( fBEof ) - break; - lSkipped--; - } - } - } - hb_retnl( lSkipped ); - } - else - hb_errRT_DBCMD( EG_NOTABLE, EDBCMD_NOTABLE, NULL, "DBSKIPPER" ); -} -#endif diff --git a/harbour/source/rdd/dbcmdx.c b/harbour/source/rdd/dbcmdx.c new file mode 100644 index 0000000000..7f27f66ef9 --- /dev/null +++ b/harbour/source/rdd/dbcmdx.c @@ -0,0 +1,171 @@ +/* + * $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( ORDWILDSEEK ) +{ + AREAP pArea = ( AREAP ) hb_rddGetCurrentWorkAreaPointer(); + + if( pArea ) + { + char * szPattern = hb_parc( 1 ); + + if( szPattern ) + { + BOOL fCont = hb_parl( 2 ), fBack = hb_parl( 3 ), fFound = FALSE; + DBORDERINFO OrderInfo; + ERRCODE errCode = SUCCESS; + + memset( &OrderInfo, 0, sizeof( DBORDERINFO ) ); + OrderInfo.itmResult = hb_itemNew( NULL ); + + if( !fCont ) + { + char * szKey; + + if( fBack ) + errCode = SELF_GOBOTTOM( pArea ); + else + errCode = SELF_GOTOP( pArea ); + + if( errCode == SUCCESS ) + { + errCode = SELF_ORDINFO( pArea, DBOI_KEYVAL, &OrderInfo ); + if( errCode == SUCCESS ) + { + szKey = hb_itemGetCPtr( OrderInfo.itmResult ); + fFound = hb_strMatchWild( szKey, szPattern ); + } + } + } + if( !fFound && errCode == SUCCESS ) + { + OrderInfo.itmNewVal = hb_param( 1, HB_IT_STRING ); + if( SELF_ORDINFO( pArea, fBack ? DBOI_SKIPWILDBACK : DBOI_SKIPWILD, + &OrderInfo ) == SUCCESS ) + fFound = hb_itemGetL( OrderInfo.itmResult ); + } + hb_itemRelease( OrderInfo.itmResult ); + hb_retl( fFound ); + } + else + hb_errRT_DBCMD( EG_ARG, EDBCMD_DBFILEPUTBADPARAMETER, NULL, "ORDWILDSEEK" ); + } + else + hb_errRT_DBCMD( EG_NOTABLE, EDBCMD_NOTABLE, NULL, "ORDWILDSEEK" ); +} + +HB_FUNC( DBSKIPPER ) +{ + AREAP pArea = ( AREAP ) hb_rddGetCurrentWorkAreaPointer(); + + if( pArea ) + { + LONG lSkipped = 0; + LONG lRecs = 1; + BOOL fBEof; + ULONG ulRecords = 0; + + if( SELF_RECCOUNT( pArea, &ulRecords ) == SUCCESS && ulRecords > 0 ) + { + if( ISNUM( 1 ) ) + lRecs = hb_parnl( 1 ) ; + + if( lRecs == 0 ) + SELF_SKIP( pArea, 0 ); + else if( lRecs > 0 ) + { + if( SELF_EOF( pArea, &fBEof ) == SUCCESS ) + { + while( lSkipped < lRecs ) + { + if( SELF_SKIP( pArea, 1 ) != SUCCESS ) + break; + if( SELF_EOF( pArea, &fBEof ) != SUCCESS ) + break; + if( fBEof ) + { + SELF_SKIP( pArea, -1 ); + break; + } + lSkipped++; + } + } + } + else /* if( lRecs < 0 ) */ + { + while( lSkipped > lRecs ) + { + if( SELF_SKIP( pArea, -1 ) != SUCCESS ) + break; + if( SELF_BOF( pArea, &fBEof ) != SUCCESS ) + break; + if( fBEof ) + break; + lSkipped--; + } + } + } + hb_retnl( lSkipped ); + } + else + hb_errRT_DBCMD( EG_NOTABLE, EDBCMD_NOTABLE, NULL, "DBSKIPPER" ); +} + +#endif diff --git a/harbour/source/rdd/dbfuncs.prg b/harbour/source/rdd/dbfuncs.prg index c7a5043bc0..f94656bbc3 100644 --- a/harbour/source/rdd/dbfuncs.prg +++ b/harbour/source/rdd/dbfuncs.prg @@ -119,22 +119,3 @@ FUNCTION ordSetFocu( xOrder, cFile ) FUNCTION ordSetRela( xArea, bRelation, cRelation ) RETURN ordSetRelation( xArea, bRelation, cRelation ) - -#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/source/rdd/dbfuncsx.prg b/harbour/source/rdd/dbfuncsx.prg new file mode 100644 index 0000000000..2bee553e31 --- /dev/null +++ b/harbour/source/rdd/dbfuncsx.prg @@ -0,0 +1,70 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * XPP compatible _dbExport() function + * + * Copyright 1999-2007 Viktor Szakats + * 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/source/rdd/dbjoin.prg b/harbour/source/rdd/dbjoin.prg index 122ec26fe8..83d7043b82 100644 --- a/harbour/source/rdd/dbjoin.prg +++ b/harbour/source/rdd/dbjoin.prg @@ -169,10 +169,3 @@ STATIC PROCEDURE __doJoinList( aList ) ENDIF RETURN - -#ifdef HB_COMPAT_XPP - -FUNCTION dbJoin( cAlias, cFile, aFields, bFor ) - RETURN __dbJoin( cAlias, cFile, aFields, bFor ) - -#endif diff --git a/harbour/source/rdd/dbjoinx.prg b/harbour/source/rdd/dbjoinx.prg new file mode 100644 index 0000000000..1d2ee0c367 --- /dev/null +++ b/harbour/source/rdd/dbjoinx.prg @@ -0,0 +1,58 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * XPP compatible dbJoin() function + * + * Copyright 1999-2007 Viktor Szakats + * 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/source/rdd/dblist.prg b/harbour/source/rdd/dblist.prg index 74e0353840..a4e085ae00 100644 --- a/harbour/source/rdd/dblist.prg +++ b/harbour/source/rdd/dblist.prg @@ -126,10 +126,3 @@ PROCEDURE __dbList( lOff, abEval, lAll, bFor, bWhile, nNext, nRecord, lRest, lTo ENDIF RETURN - -#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/source/rdd/dblistx.prg b/harbour/source/rdd/dblistx.prg new file mode 100644 index 0000000000..06a97e3cd4 --- /dev/null +++ b/harbour/source/rdd/dblistx.prg @@ -0,0 +1,58 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * XPP compatible dbList() function + * + * Copyright 1999-2007 Viktor Szakats + * 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/source/rdd/dbsort.prg b/harbour/source/rdd/dbsort.prg index f1954dd3ea..0f25de7e90 100644 --- a/harbour/source/rdd/dbsort.prg +++ b/harbour/source/rdd/dbsort.prg @@ -91,10 +91,3 @@ FUNCTION __dbSort( cToFileName, aFields, bFor, bWhile, nNext, nRecord, lRest,; ENDIF RETURN .T. - -#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/source/rdd/dbsortx.prg b/harbour/source/rdd/dbsortx.prg new file mode 100644 index 0000000000..92e0daef70 --- /dev/null +++ b/harbour/source/rdd/dbsortx.prg @@ -0,0 +1,58 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * XPP compatible dbSort() function + * + * Copyright 1999-2007 Viktor Szakats + * 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/source/rdd/dbstrux.prg b/harbour/source/rdd/dbstrux.prg index b70b7fd0eb..d98b94abe8 100644 --- a/harbour/source/rdd/dbstrux.prg +++ b/harbour/source/rdd/dbstrux.prg @@ -189,15 +189,3 @@ FUNCTION __dbStructFilter( aStruct, aFieldList ) iif( nIndex == 0, NIL, AAdd( aStructFiltered, aStruct[ nIndex] ) ) } ) RETURN aStructFiltered - -#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/source/rdd/dbstruxx.prg b/harbour/source/rdd/dbstruxx.prg new file mode 100644 index 0000000000..2c68de3f87 --- /dev/null +++ b/harbour/source/rdd/dbstruxx.prg @@ -0,0 +1,63 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * XPP compatible dbCopyStruct(), dbCopyExtStruct() functions + * + * Copyright 1999-2007 Viktor Szakats + * 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/source/rdd/dbtotal.prg b/harbour/source/rdd/dbtotal.prg index 23b8be98e3..7aba4ff4af 100644 --- a/harbour/source/rdd/dbtotal.prg +++ b/harbour/source/rdd/dbtotal.prg @@ -229,10 +229,3 @@ STATIC FUNCTION __GetField( cField ) FUNCTION __dbTransRec( nDstArea, aFieldsStru ) RETURN __dbTrans( nDstArea, aFieldsStru, NIL, NIL, 1 ) - -#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/source/rdd/dbtotalx.prg b/harbour/source/rdd/dbtotalx.prg new file mode 100644 index 0000000000..d3c301c8d7 --- /dev/null +++ b/harbour/source/rdd/dbtotalx.prg @@ -0,0 +1,58 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * XPP compatible dbTotal() function + * + * Copyright 1999-2007 Viktor Szakats + * 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/source/rdd/dbupdat.prg b/harbour/source/rdd/dbupdat.prg index cbc69613c4..05ed06395a 100644 --- a/harbour/source/rdd/dbupdat.prg +++ b/harbour/source/rdd/dbupdat.prg @@ -101,10 +101,3 @@ FUNCTION __dbUpdate( cAlias, bKey, lRandom, bAssign ) ENDIF RETURN .T. - -#ifdef HB_COMPAT_XPP - -FUNCTION dbUpdate( cAlias, bAssign, bKey, lRandom ) - RETURN __dbUpdate( cAlias, bKey, lRandom, bAssign ) - -#endif diff --git a/harbour/source/rdd/dbupdatx.prg b/harbour/source/rdd/dbupdatx.prg new file mode 100644 index 0000000000..742c31fc88 --- /dev/null +++ b/harbour/source/rdd/dbupdatx.prg @@ -0,0 +1,58 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * XPP compatible dbUpdate() function + * + * Copyright 1999-2007 Viktor Szakats + * 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/source/rtl/Makefile b/harbour/source/rtl/Makefile index 2e8ec10664..c63d5ff293 100644 --- a/harbour/source/rtl/Makefile +++ b/harbour/source/rtl/Makefile @@ -83,6 +83,7 @@ C_SOURCES=\ natmsg.c \ net.c \ oemansi.c \ + oemansix.c \ oldbox.c \ oldclear.c \ pad.c \ @@ -202,6 +203,7 @@ PRG_SOURCES=\ ttextlin.prg \ ttopbar.prg \ typefile.prg \ + typefilx.prg \ valtoexp.prg \ wait.prg \ diff --git a/harbour/source/rtl/oemansi.c b/harbour/source/rtl/oemansi.c index 11d6caaf31..bb592544f4 100644 --- a/harbour/source/rtl/oemansi.c +++ b/harbour/source/rtl/oemansi.c @@ -6,7 +6,7 @@ * Harbour Project source code: * OEM <-> ANSI string conversion functions (Win32 specific, Xbase++ ext.) * - * Copyright 1999-2001 Viktor Szakats + * Copyright 1999-2007 Viktor Szakats * www - http://www.harbour-project.org * * This program is free software; you can redistribute it and/or modify @@ -99,21 +99,3 @@ HB_FUNC( HB_OEMTOANSI ) else hb_retc( NULL ); } - -#ifdef HB_COMPAT_XPP - -/* NOTE: Xbase++ compatible function */ - -HB_FUNC( CONVTOOEMCP ) -{ - HB_FUNC_EXEC( HB_ANSITOOEM ); -} - -/* NOTE: Xbase++ compatible function */ - -HB_FUNC( CONVTOANSICP ) -{ - HB_FUNC_EXEC( HB_OEMTOANSI ); -} - -#endif diff --git a/harbour/source/rtl/oemansix.c b/harbour/source/rtl/oemansix.c new file mode 100644 index 0000000000..63ccb0f392 --- /dev/null +++ b/harbour/source/rtl/oemansix.c @@ -0,0 +1,68 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * XPP compatible OEM <-> ANSI string conversion functions + * + * Copyright 1999-2007 Viktor Szakats + * 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 + +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/source/rtl/typefile.prg b/harbour/source/rtl/typefile.prg index dd5e29669c..26f16ed4c4 100644 --- a/harbour/source/rtl/typefile.prg +++ b/harbour/source/rtl/typefile.prg @@ -145,10 +145,3 @@ PROCEDURE __TypeFile( cFile, lPrint ) ENDIF RETURN - -#ifdef HB_COMPAT_XPP - -FUNCTION _TypeFile( cFile, lPrint ) - RETURN __TypeFile( cFile, lPrint ) - -#endif diff --git a/harbour/source/rtl/typefilx.prg b/harbour/source/rtl/typefilx.prg new file mode 100644 index 0000000000..e0140e5620 --- /dev/null +++ b/harbour/source/rtl/typefilx.prg @@ -0,0 +1,58 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * XPP compatible _Typefile() function + * + * Copyright 1999-2007 Viktor Szakats + * 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