diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 0235ec8d3b..03b631f236 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,32 @@ past entries belonging to these authors: Viktor Szakats. */ +2009-05-12 10:37 UTC+0200 Viktor Szakats (harbour.01 syenar hu) + * contrib/xhb/hbcompat.ch + + Added HB_GETENV() <-> GETENV() conversions. + + Added MEMOWRIT() translation for xhb sources. + + * source/rtl/at.c + * source/rtl/gete.c + * source/rtl/memofile.c + - Deleted HB_EXTENSION branches. Users of extended + GETENV(), GETE(), AT() and MEMOWRIT() functionality + will have to use hbcompat.ch to stay compatible with xhb + (this isn't needed for MEMOWRIT()). + INCOMPATIBLE change for those who enabled HB_EXTENSION + in Harbour. Hopefully xhb will implement HB_AT() and + HB_GETENV() in the future so hbcompat.ch will become + unnecessary. + + * include/hbextern.ch + + source/rtl/radiobhb.prg + * source/rtl/radiobtn.prg + * RADIOBUTTON() Harbour extension moved to a separate file + to cause no harm for programs defining this function locally. + At the same time, HB_EXTENSION protection got removed so + it can be accessed in default builds as a RADIOBUTTO() + alternative. + 2009-05-12 09:25 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * doc/cmdline.txt * doc/howtosvn.txt diff --git a/harbour/contrib/xhb/hbcompat.ch b/harbour/contrib/xhb/hbcompat.ch index 631d9f76f6..293b145386 100644 --- a/harbour/contrib/xhb/hbcompat.ch +++ b/harbour/contrib/xhb/hbcompat.ch @@ -111,6 +111,8 @@ #xtranslate hb_ADel([]) => ADel() #xtranslate hb_At([]) => At() + #xtranslate hb_GetEnv([]) => GetEnv() + #xtranslate hb_i18n_gettext() => i18n() #xtranslate hb_ARGV([]) => hb_CMDARGARGV() @@ -213,6 +215,9 @@ #xtranslate ADel(,,) => hb_ADel(,,) #xtranslate At(,,[]) => hb_At(,,) + #xtranslate GetEnv([]) => hb_GetEnv() + #xtranslate MemoWrit(,,) => iif( hb_isLogical() .AND. , MemoWrit(,), hb_MemoWrit(,) ) + #xtranslate i18n() => hb_i18n_gettext() /* MT functions */ diff --git a/harbour/include/hbextern.ch b/harbour/include/hbextern.ch index 1ac7790cfd..47e2dba8ce 100644 --- a/harbour/include/hbextern.ch +++ b/harbour/include/hbextern.ch @@ -719,9 +719,7 @@ EXTERNAL ORDKEYRELPOS EXTERNAL POPUP EXTERNAL PUSHBUTTON EXTERNAL RADIOBUTTO -#ifdef HB_EXTENSION EXTERNAL RADIOBUTTON -#endif EXTERNAL RADIOGROUP EXTERNAL TOPBAR diff --git a/harbour/source/rtl/Makefile b/harbour/source/rtl/Makefile index 5f03444763..654fb5feae 100644 --- a/harbour/source/rtl/Makefile +++ b/harbour/source/rtl/Makefile @@ -205,6 +205,7 @@ PRG_SOURCES=\ perfuncs.prg \ profiler.prg \ pushbtn.prg \ + radiobhb.prg \ radiobtn.prg \ radiogrp.prg \ readkey.prg \ diff --git a/harbour/source/rtl/at.c b/harbour/source/rtl/at.c index c489aad141..2c1c149d5b 100644 --- a/harbour/source/rtl/at.c +++ b/harbour/source/rtl/at.c @@ -88,15 +88,6 @@ HB_FUNC( HB_AT ) hb_errRT_BASE_SubstR( EG_ARG, 1108, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); } -#if defined( HB_EXTENSION ) - -HB_FUNC( AT ) -{ - HB_FUNC_EXEC( HB_AT ); -} - -#else - HB_FUNC( AT ) { PHB_ITEM pSub = hb_param( 1, HB_IT_STRING ); @@ -110,5 +101,3 @@ HB_FUNC( AT ) else hb_errRT_BASE_SubstR( EG_ARG, 1108, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); } - -#endif diff --git a/harbour/source/rtl/gete.c b/harbour/source/rtl/gete.c index ee561a0328..1754927298 100644 --- a/harbour/source/rtl/gete.c +++ b/harbour/source/rtl/gete.c @@ -64,19 +64,11 @@ #include "hbapi.h" #include "hbapiitm.h" -/* NOTE: The second parameter is a Harbour extension. In CA-Cl*pper the - function will return an empty string if called with more than one - parameter. [vszakats] */ - HB_FUNC( GETENV ) { PHB_ITEM pName = hb_param( 1, HB_IT_STRING ); -#ifdef HB_EXTENSION - if( pName ) -#else if( pName && hb_pcount() == 1 ) -#endif { char * pszName = hb_itemGetC( pName ); ULONG ulName = strlen( pszName ); @@ -121,11 +113,8 @@ HB_FUNC( GETENV ) { if( szValue ) hb_xfree( szValue ); -#ifdef HB_EXTENSION - hb_retc( hb_parc( 2 ) ); -#else + hb_retc( NULL ); -#endif } } else diff --git a/harbour/source/rtl/memofile.c b/harbour/source/rtl/memofile.c index fd1b039d8a..5a0bf15578 100644 --- a/harbour/source/rtl/memofile.c +++ b/harbour/source/rtl/memofile.c @@ -162,9 +162,5 @@ HB_FUNC( HB_MEMOWRIT ) HB_FUNC( MEMOWRIT ) { -#ifdef HB_EXTENSION - hb_retl( hb_memowrit( hb_parinfo( 0 ) == 3 && ISLOG( 3 ) ? hb_parl( 3 ) : TRUE ) ); -#else hb_retl( hb_memowrit( TRUE ) ); -#endif } diff --git a/harbour/source/rtl/radiobhb.prg b/harbour/source/rtl/radiobhb.prg new file mode 100644 index 0000000000..eff99e3969 --- /dev/null +++ b/harbour/source/rtl/radiobhb.prg @@ -0,0 +1,62 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * RADIOBUTTON() constructor function + * + * Copyright 2009 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. + * + */ + +/* NOTE: This function is a new Harbour functions implemented in the + original CA-Cl*pper namespace. This should have been marked as + HB_EXTENSION, but it's not. */ + +#ifdef HB_COMPAT_C53 + +FUNCTION RadioButton( nRow, nCol, cCaption, cData ) /* NOTE: cData argument is undocumented */ + RETURN HBRadioButton():New( nRow, nCol, cCaption, cData ) + +#endif diff --git a/harbour/source/rtl/radiobtn.prg b/harbour/source/rtl/radiobtn.prg index da3ff4e387..6df7f59a5b 100644 --- a/harbour/source/rtl/radiobtn.prg +++ b/harbour/source/rtl/radiobtn.prg @@ -56,11 +56,11 @@ #include "color.ch" #include "common.ch" -/* NOTE: Harbour doesn't support CA-Cl*pper 5.3 GUI functionality, but +/* NOTE: Harbour doesn't support CA-Cl*pper 5.3 GUI functionality, but it has all related variables and methods. */ -/* NOTE: CA-Cl*pper 5.3 uses a mixture of QQOut(), DevOut(), Disp*() - functions to generate screen output. Harbour uses Disp*() +/* NOTE: CA-Cl*pper 5.3 uses a mixture of QQOut(), DevOut(), Disp*() + functions to generate screen output. Harbour uses Disp*() functions only. [vszakats] */ #ifdef HB_COMPAT_C53 @@ -140,7 +140,7 @@ METHOD select( lState ) CLASS RADIOBUTTN RETURN Self METHOD killFocus() CLASS RADIOBUTTN - + IF ::lHasFocus ::lHasFocus := .F. @@ -188,7 +188,7 @@ METHOD display() CLASS RADIOBUTTN RETURN Self METHOD isAccel( xKey ) CLASS RADIOBUTTN - + LOCAL nPos LOCAL cCaption @@ -240,7 +240,7 @@ METHOD buffer() CLASS RADIOBUTTN RETURN ::lBuffer METHOD data( cData ) CLASS RADIOBUTTN - + IF PCount() > 0 ::cData := iif( cData == NIL, NIL, __eInstVar53( Self, "DATA", cData, "C", 1001 ) ) ENDIF @@ -289,7 +289,7 @@ METHOD colorSpec( cColorSpec ) CLASS RADIOBUTTN RETURN ::cColorSpec METHOD fBlock( bFBlock ) CLASS RADIOBUTTN - + IF PCount() > 0 ::bFBlock := iif( bFBlock == NIL, NIL, __eInstVar53( Self, "FBLOCK", bFBlock, "B", 1001 ) ) ENDIF @@ -308,7 +308,7 @@ METHOD row( nRow ) CLASS RADIOBUTTN RETURN ::nRow METHOD sBlock( bSBlock ) CLASS RADIOBUTTN - + IF PCount() > 0 ::bSBlock := iif( bSBlock == NIL, NIL, __eInstVar53( Self, "SBLOCK", bSBlock, "B", 1001 ) ) ENDIF @@ -361,11 +361,4 @@ METHOD New( nRow, nCol, cCaption, cData ) CLASS RADIOBUTTN FUNCTION RadioButto( nRow, nCol, cCaption, cData ) /* NOTE: cData argument is undocumented */ RETURN HBRadioButton():New( nRow, nCol, cCaption, cData ) -#ifdef HB_EXTENSION - -FUNCTION RadioButton( nRow, nCol, cCaption, cData ) /* NOTE: cData argument is undocumented */ - RETURN HBRadioButton():New( nRow, nCol, cCaption, cData ) - -#endif - #endif