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.
This commit is contained in:
Viktor Szakats
2009-05-12 08:44:03 +00:00
parent 52e2e002e5
commit 301c1c5f98
9 changed files with 103 additions and 44 deletions

View File

@@ -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

View File

@@ -111,6 +111,8 @@
#xtranslate hb_ADel([<x,...>]) => ADel(<x>)
#xtranslate hb_At([<x,...>]) => At(<x>)
#xtranslate hb_GetEnv([<x,...>]) => GetEnv(<x>)
#xtranslate hb_i18n_gettext(<x>) => i18n(<x>)
#xtranslate hb_ARGV([<x,...>]) => hb_CMDARGARGV(<x>)
@@ -213,6 +215,9 @@
#xtranslate ADel(<a>,<n>,<l>) => hb_ADel(<a>,<n>,<l>)
#xtranslate At(<a>,<b>,[<x,...>]) => hb_At(<a>,<b>,<x>)
#xtranslate GetEnv([<x,...>]) => hb_GetEnv(<x>)
#xtranslate MemoWrit(<x>,<y>,<z>) => iif( hb_isLogical(<z>) .AND. <z>, MemoWrit(<x>,<y>), hb_MemoWrit(<x>,<y>) )
#xtranslate i18n(<x>) => hb_i18n_gettext(<x>)
/* MT functions */

View File

@@ -719,9 +719,7 @@ EXTERNAL ORDKEYRELPOS
EXTERNAL POPUP
EXTERNAL PUSHBUTTON
EXTERNAL RADIOBUTTO
#ifdef HB_EXTENSION
EXTERNAL RADIOBUTTON
#endif
EXTERNAL RADIOGROUP
EXTERNAL TOPBAR

View File

@@ -205,6 +205,7 @@ PRG_SOURCES=\
perfuncs.prg \
profiler.prg \
pushbtn.prg \
radiobhb.prg \
radiobtn.prg \
radiogrp.prg \
readkey.prg \

View File

@@ -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

View File

@@ -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

View File

@@ -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
}

View File

@@ -0,0 +1,62 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* RADIOBUTTON() constructor function
*
* Copyright 2009 Viktor Szakats <viktor.szakats@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: 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

View File

@@ -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