From 41b753425136690849b1a8ebe8cc2f8a5991398f Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 17 Jun 2009 22:34:21 +0000 Subject: [PATCH] 2009-06-18 00:33 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * include/hbextern.ch * source/rtl/datesx.c * STOD() function not protected by HB_COMPAT_XPP anymore. Instead it's turned off only in HB_C52_STRICT mode. + contrib/xpp/xppextrn.ch + Added. * contrib/hbwin/win_misc.c + Added WIN_HIWORD() and WIN_LOWORD() functions (from GTWVG). But commented because of colliding names. --- harbour/ChangeLog | 13 +++++ harbour/contrib/hbwin/win_misc.c | 14 +++++ harbour/contrib/xpp/xppextrn.ch | 89 ++++++++++++++++++++++++++++++++ harbour/include/hbextern.ch | 4 +- harbour/source/rtl/datesx.c | 14 +++-- 5 files changed, 130 insertions(+), 4 deletions(-) create mode 100644 harbour/contrib/xpp/xppextrn.ch diff --git a/harbour/ChangeLog b/harbour/ChangeLog index dfa5aab5a8..e47e3f3047 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,19 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-06-18 00:33 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * include/hbextern.ch + * source/rtl/datesx.c + * STOD() function not protected by HB_COMPAT_XPP anymore. + Instead it's turned off only in HB_C52_STRICT mode. + + + contrib/xpp/xppextrn.ch + + Added. + + * contrib/hbwin/win_misc.c + + Added WIN_HIWORD() and WIN_LOWORD() functions (from GTWVG). + But commented because of colliding names. + 2009-06-17 23:07 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbblat/blatcls.prg ! Added type checks for all params. diff --git a/harbour/contrib/hbwin/win_misc.c b/harbour/contrib/hbwin/win_misc.c index 1ddf559405..38480bd8b9 100644 --- a/harbour/contrib/hbwin/win_misc.c +++ b/harbour/contrib/hbwin/win_misc.c @@ -229,3 +229,17 @@ HB_FUNC( WIN_NCMDSHOW ) hb_retni( nCmdShow ); } + +#if 0 /* Enable when name isn't occupied anymore by other contrib. */ + +HB_FUNC( WIN_LOWORD ) +{ + hb_retnl( LOWORD( hb_parnl( 1 ) ) ); +} + +HB_FUNC( WIN_HIWORD ) +{ + hb_retnl( HIWORD( hb_parnl( 1 ) ) ); +} + +#endif diff --git a/harbour/contrib/xpp/xppextrn.ch b/harbour/contrib/xpp/xppextrn.ch new file mode 100644 index 0000000000..004d7d3526 --- /dev/null +++ b/harbour/contrib/xpp/xppextrn.ch @@ -0,0 +1,89 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * The declarations for all harbour defined functions/procedures. + * + * Copyright 1999 Ryszard Glab + * 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. + * + */ + +#ifndef XPP_EXTERN_CH_ +#define XPP_EXTERN_CH_ + +EXTERNAL XPP_GET +EXTERNAL XPP_TBROWSE +EXTERNAL XPP_TBCOLUMN +EXTERNAL XPP_SLEEP +EXTERNAL BIN2U +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 STOD +EXTERNAL U2BIN +EXTERNAL W2BIN +EXTERNAL ORDWILDSEEK +EXTERNAL _DBEXPORT +EXTERNAL _TYPEFILE +EXTERNAL THREADID +EXTERNAL THREADWAIT +EXTERNAL THREADWAITALL +EXTERNAL THREADOBJECT +EXTERNAL THREAD +EXTERNAL SIGNAL + +#endif /* XPP_EXTERN_CH_ */ diff --git a/harbour/include/hbextern.ch b/harbour/include/hbextern.ch index 1fd3e2bb09..2743f589d0 100644 --- a/harbour/include/hbextern.ch +++ b/harbour/include/hbextern.ch @@ -338,6 +338,9 @@ EXTERNAL FIELDLEN EXTERNAL FIELDDEC EXTERNAL FIELDTYPE EXTERNAL MMIDDLEDOWN +#ifndef HB_C52_STRICT +EXTERNAL STOD +#endif /* HiPer-SEEK / CFTS compatible functions */ @@ -792,7 +795,6 @@ EXTERNAL CURDRIVE EXTERNAL DBSKIPPER EXTERNAL NUMBUTTONS EXTERNAL SETMOUSE -EXTERNAL STOD EXTERNAL U2BIN EXTERNAL W2BIN EXTERNAL ORDWILDSEEK diff --git a/harbour/source/rtl/datesx.c b/harbour/source/rtl/datesx.c index 3edfcecbc7..6d4d9d3e1a 100644 --- a/harbour/source/rtl/datesx.c +++ b/harbour/source/rtl/datesx.c @@ -53,10 +53,18 @@ #include "hbapi.h" #include "hbapiitm.h" -#ifdef HB_COMPAT_XPP +/* NOTE: This function is a non-CA-Cl*pper function implemented + in the original CA-Cl*pper namespace. This should have + been marked as HB_COMPAT_*, but it's not, as it's a + well-known name with similar functionality under most + Clipper dialects and libraries. (differences may exist + though, like behaviour for non-string, empty or + no-parameter scenarios. + Nevertheless this function must be kept in a separate + source file to avoid linking errors when a 3rd party + library would also define this function. [vszakats] */ -/* NOTE: Xbase++ compatible function */ -/* NOTE: Xbase++ checks for the parameter count at compile time */ +#ifndef HB_C52_STRICT HB_FUNC( STOD ) {