2007-11-16 14:46 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)

* include/hbsetup.ch
     ! Minor fix in comments.

   * contrib/xhb/hbcompat.ch
     + Added hb_rddInfo() translation for xhb apps.

   * common.mak
   * include/hbextern.ch
   * source/rtl/Makefile
   + source/rtl/natmsgu.c
   * source/rtl/natmsg.c
     + Added Harbour internal version of undocument Clipper 
       Nat*() (and friends) calls. These are always available 
       in core.
       Harbour __natIsAffirm()   = Clipper IsAffirm()
       Harbour __natIsNegative() = Clipper IsNegative()
       Harbour __natMsg()        = Clipper NationMsg()
       Harbour __natSortVer()    = Clipper _NatSortVer()
       Harbour __natMsgVer()     = Clipper _NatMsgVer()

   * utils/hbtest/rt_misc.prg
   * source/rtl/dircmd.prg
   * source/rtl/getsys.prg
   * source/rtl/tgetlist.prg
   * source/rtl/tlabel.prg
   * source/rtl/treport.prg
     ! Now using Harbour internal __NAT*() functions 
       instead of C5.x undocumented calls, so Harbour 
       will now compile with HB_C52_UNDOC turned off.
This commit is contained in:
Viktor Szakats
2007-11-16 13:48:29 +00:00
parent 3105623c05
commit 0de23eaa4f
14 changed files with 185 additions and 34 deletions

View File

@@ -8,6 +8,37 @@
2002-12-01 13:30 UTC+0100 Foo Bar <foo.bar@foobar.org>
*/
2007-11-16 14:46 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* include/hbsetup.ch
! Minor fix in comments.
* contrib/xhb/hbcompat.ch
+ Added hb_rddInfo() translation for xhb apps.
* common.mak
* include/hbextern.ch
* source/rtl/Makefile
+ source/rtl/natmsgu.c
* source/rtl/natmsg.c
+ Added Harbour internal version of undocument Clipper
Nat*() (and friends) calls. These are always available
in core.
Harbour __natIsAffirm() = Clipper IsAffirm()
Harbour __natIsNegative() = Clipper IsNegative()
Harbour __natMsg() = Clipper NationMsg()
Harbour __natSortVer() = Clipper _NatSortVer()
Harbour __natMsgVer() = Clipper _NatMsgVer()
* utils/hbtest/rt_misc.prg
* source/rtl/dircmd.prg
* source/rtl/getsys.prg
* source/rtl/tgetlist.prg
* source/rtl/tlabel.prg
* source/rtl/treport.prg
! Now using Harbour internal __NAT*() functions
instead of C5.x undocumented calls, so Harbour
will now compile with HB_C52_UNDOC turned off.
2007-11-16 01:25 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
+ contrib/freeimage
+ contrib/freeimage/Makefile

View File

@@ -493,6 +493,7 @@ RTL_LIB_OBJS = \
$(OBJ_DIR)\mousex$(OBJEXT) \
$(OBJ_DIR)\mtran$(OBJEXT) \
$(OBJ_DIR)\natmsg$(OBJEXT) \
$(OBJ_DIR)\natmsgu$(OBJEXT) \
$(OBJ_DIR)\net$(OBJEXT) \
$(OBJ_DIR)\oemansi$(OBJEXT) \
$(OBJ_DIR)\oemansix$(OBJEXT) \

View File

@@ -70,6 +70,7 @@
#xtranslate hb_setLastKey([<x,...>])=> setLastKey(<x>)
#xtranslate hb_CStr([<x,...>]) => CStr(<x>)
#xtranslate hb_DirExists(<x>) => IsDirectory(<x>)
#xtranslate hb_rddInfo([<x,...>]) => rddInfo(<x>)
#xtranslate hb_HexToNum([<c,...>]) => HexToNum(<c>)
#xtranslate hb_NumToHex([<n,...>]) => NumToHex(<n>)

View File

@@ -442,6 +442,12 @@ EXTERNAL __XSAVESCREEN
/* Harbour internal functions */
EXTERNAL __NATISAFFIRM
EXTERNAL __NATISNEGATIVE
EXTERNAL __NATMSG
EXTERNAL __NATSORTVER
EXTERNAL __NATMSGVER
EXTERNAL __DBSQL
EXTERNAL __RDDGETTEMPALIAS
EXTERNAL __GETMSGPRF

View File

@@ -60,8 +60,8 @@
different Clipper implementations. */
/* #define HB_EXTENSION */ /* Enable Harbour extensions */
#define HB_C52_UNDOC /* Enable CA-Cl*pper 5.2e undocumented features */
/* #define HB_C52_STRICT */ /* Enable CA-Cl*pper 5.2e strict compatibility */
#define HB_C52_UNDOC /* Enable CA-Cl*pper 5.2e/5.3x undocumented features */
/* #define HB_C52_STRICT */ /* Enable CA-Cl*pper 5.2e/5.3x strict compatibility */
#define HB_COMPAT_C53 /* Enable CA-Cl*pper 5.3x extensions */
#define HB_COMPAT_XPP /* Enable Alaska Xbase++ extensions */
/* #define HB_COMPAT_VO */ /* Enable CA-VO extensions */

View File

@@ -84,6 +84,7 @@ C_SOURCES=\
mousex.c \
mtran.c \
natmsg.c \
natmsgu.c \
net.c \
oemansi.c \
oemansix.c \

View File

@@ -70,7 +70,7 @@ PROCEDURE __Dir( cFileMask )
#ifdef HB_C52_STRICT
QOut( "Database Files # Records Last Update Size" )
#else
QOut( NationMsg( _DIR_HEADER ) )
QOut( __NatMsg( _DIR_HEADER ) )
#endif
AEval( Directory( hb_FNameMerge( Set( _SET_DEFAULT ), "*", ".dbf" ) ),;

View File

@@ -314,8 +314,8 @@ FUNCTION RangeCheck( oGet, xDummy, xLow, xHigh )
IF Set( _SET_SCOREBOARD )
cMessage := Left( NationMsg( _GET_RANGE_FROM ) + LTrim( Transform( xLow, "" ) ) + ;
NationMsg( _GET_RANGE_TO ) + LTrim( Transform( xHigh, "" ) ), MaxCol() )
cMessage := Left( __NatMsg( _GET_RANGE_FROM ) + LTrim( Transform( xLow, "" ) ) + ;
__NatMsg( _GET_RANGE_TO ) + LTrim( Transform( xHigh, "" ) ), MaxCol() )
nOldRow := Row()
nOldCol := Col()

View File

@@ -55,8 +55,8 @@
* www - http://www.harbour-project.org
*
* Copyright 1999-2001 Viktor Szakats <viktor.szakats@syenar.hu>
* _NATSORTVER()
* _NATMSGVER()
* __NATSORTVER()
* __NATMSGVER()
*
* See doc/license.txt for licensing terms.
*
@@ -93,23 +93,21 @@ static char * hb_nationGetMsg( USHORT uiMsg )
return ( uiMsg >= 1 && uiMsg <= 13 ) ? ( char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_NATMSG + uiMsg - 1 ) : ( char * ) "";
}
#ifdef HB_C52_UNDOC
HB_FUNC( ISAFFIRM )
HB_FUNC( __NATISAFFIRM )
{
PHB_ITEM pItem = hb_param( 1, HB_IT_STRING );
hb_retl( pItem && hb_itemGetCLen( pItem ) >= 1 && toupper( hb_itemGetCPtr( pItem )[ 0 ] ) == ( ( char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_NATMSG + _LF_YN - 1 ) )[ 0 ] );
}
HB_FUNC( ISNEGATIVE )
HB_FUNC( __NATISNEGATIVE )
{
PHB_ITEM pItem = hb_param( 1, HB_IT_STRING );
hb_retl( pItem && hb_itemGetCLen( pItem ) >= 1 && toupper( hb_itemGetCPtr( pItem )[ 0 ] ) == ( ( char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_NATMSG + _LF_YN - 1 ) )[ 2 ] );
}
HB_FUNC( NATIONMSG )
HB_FUNC( __NATMSG )
{
if( hb_pcount() == 0 )
/* TODO: Replace this with Language API call. */
@@ -120,10 +118,7 @@ HB_FUNC( NATIONMSG )
hb_retc( NULL );
}
/* NOTE: Intentionally using one leading underscore, like in Clipper.
[vszakats] */
HB_FUNC( _NATSORTVER )
HB_FUNC( __NATSORTVER )
{
/* NOTE: CA-Cl*pper 5.2e Intl. will return: "NATSORT v1.2i x14 19/Mar/93" */
/* NOTE: CA-Cl*pper 5.3 Intl. will return: "NATSORT v1.3i x19 06/Mar/95" */
@@ -131,15 +126,10 @@ HB_FUNC( _NATSORTVER )
hb_retc( "NATSORT (Harbour)" );
}
/* NOTE: Intentionally using one leading underscore, like in Clipper.
[vszakats] */
HB_FUNC( _NATMSGVER )
HB_FUNC( __NATMSGVER )
{
/* NOTE: CA-Cl*pper 5.2e Intl. will return: "NATMSGS v1.2i x14 19/Mar/93" */
/* NOTE: CA-Cl*pper 5.3 Intl. will return: "NATMSGS v1.3i x19 06/Mar/95" */
hb_retc( "NATMSGS (Harbour)" );
}
#endif

View File

@@ -0,0 +1,110 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* NATION undocumented functions
*
* Copyright 1999 Jose Lalin <dezac@corevia.com>
* 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.
*
*/
/*
* The following parts are Copyright of the individual authors.
* www - http://www.harbour-project.org
*
* Copyright 1999-2001 Viktor Szakats <viktor.szakats@syenar.hu>
* _NATSORTVER()
* _NATMSGVER()
*
* See doc/license.txt for licensing terms.
*
*/
#include "hbapi.h"
#ifdef HB_C52_UNDOC
HB_FUNC_EXTERN( __NATISAFFIRM );
HB_FUNC( ISAFFIRM )
{
HB_FUNC_EXEC( __NATISAFFIRM )
}
HB_FUNC_EXTERN( __NATISNEGATIVE );
HB_FUNC( ISNEGATIVE )
{
HB_FUNC_EXEC( __NATISNEGATIVE )
}
HB_FUNC_EXTERN( __NATISAFFIRM );
HB_FUNC( NATIONMSG )
{
HB_FUNC_EXEC( __NATMSG )
}
/* NOTE: Intentionally using one leading underscore, like in Clipper.
[vszakats] */
HB_FUNC_EXTERN( __NATSORTVER );
HB_FUNC( _NATSORTVER )
{
HB_FUNC_EXEC( __NATSORTVER )
}
/* NOTE: Intentionally using one leading underscore, like in Clipper.
[vszakats] */
HB_FUNC_EXTERN( __NATMSGVER );
HB_FUNC( _NATMSGVER )
{
HB_FUNC_EXEC( __NATMSGVER )
}
#endif

View File

@@ -807,7 +807,7 @@ METHOD ShowScoreboard() CLASS HBGetList
nOldCursor := SetCursor( SC_NONE )
DispOutAt( SCORE_ROW, SCORE_COL, iif( Set( _SET_INSERT ), NationMsg( _GET_INSERT_ON ), NationMsg( _GET_INSERT_OFF ) ) )
DispOutAt( SCORE_ROW, SCORE_COL, iif( Set( _SET_INSERT ), __NatMsg( _GET_INSERT_ON ), __NatMsg( _GET_INSERT_OFF ) ) )
SetPos( nRow, nCol )
SetCursor( nOldCursor )
@@ -826,13 +826,13 @@ METHOD DateMsg() CLASS HBGetList
nRow := Row()
nCol := Col()
DispOutAt( SCORE_ROW, SCORE_COL, NationMsg( _GET_INVD_DATE ) )
DispOutAt( SCORE_ROW, SCORE_COL, __NatMsg( _GET_INVD_DATE ) )
SetPos( nRow, nCol )
DO WHILE NextKey() == 0
ENDDO
DispOutAt( SCORE_ROW, SCORE_COL, Space( Len( NationMsg( _GET_INVD_DATE ) ) ) )
DispOutAt( SCORE_ROW, SCORE_COL, Space( Len( __NatMsg( _GET_INVD_DATE ) ) ) )
SetPos( nRow, nCol )
ENDIF

View File

@@ -328,7 +328,7 @@ METHOD SampleLabels() CLASS HBLabelForm
ENDIF
// Prompt for more
@ ROW(), 0 SAY NationMsg(_LF_SAMPLES)+" ("+Nationmsg(_LF_YN)+")"
@ ROW(), 0 SAY __NatMsg(_LF_SAMPLES)+" ("+__NatMsg(_LF_YN)+")"
nGetKey := INKEY(0)
@ ROW(), COL() SAY CHR(nGetKey)
IF ROW() == MAXROW()
@@ -337,7 +337,7 @@ METHOD SampleLabels() CLASS HBLabelForm
ELSE
@ ROW()+1, 0 SAY ""
ENDIF
IF IsNegative(CHR(nGetKey)) // Don't give sample labels
IF __NatIsNegative(CHR(nGetKey)) // Don't give sample labels
lMoreSamples := .F.
ENDIF
ENDDO

View File

@@ -334,8 +334,8 @@ METHOD New( cFrmName, lPrinter, cAltFile, lNoConsole, bFor, bWhile, nNext, nReco
// Print the first line
::PrintIt( SPACE( ::aReportData[RPT_LMARGIN] ) + ;
iif( nGroup == 1, NationMsg( _RFRM_SUBTOTAL ),;
NationMsg( _RFRM_SUBSUBTOTAL ) ) )
iif( nGroup == 1, __NatMsg( _RFRM_SUBTOTAL ),;
__NatMsg( _RFRM_SUBSUBTOTAL ) ) )
// Print the second line
QQOUT( SPACE(::aReportData[RPT_LMARGIN]) )
@@ -379,7 +379,7 @@ METHOD New( cFrmName, lPrinter, cAltFile, lNoConsole, bFor, bWhile, nNext, nReco
ENDIF
// Print the first line
::PrintIt( SPACE(::aReportData[RPT_LMARGIN]) + NationMsg(_RFRM_TOTAL ) )
::PrintIt( SPACE(::aReportData[RPT_LMARGIN]) + __NatMsg(_RFRM_TOTAL ) )
// Print the second line
QQOUT( SPACE(::aReportData[RPT_LMARGIN]) )
@@ -471,7 +471,7 @@ METHOD ReportHeader() CLASS HBReportForm
IF !::aReportData[RPT_PLAIN]
IF ::aReportData[RPT_HEADING] == ""
AADD( aPageHeader,NationMsg(_RFRM_PAGENO) + STR(::nPageNumber,6))
AADD( aPageHeader,__NatMsg(_RFRM_PAGENO) + STR(::nPageNumber,6))
ELSE
aTempPgHeader:=ParseHeader( ::aReportData[RPT_HEADING],;
@@ -489,7 +489,7 @@ METHOD ReportHeader() CLASS HBReportForm
NEXT nHeadLine
NEXT nLine
aPageHeader[ 1 ] := STUFF(aPageHeader[ 1 ], 1, 14, ;
NationMsg(_RFRM_PAGENO)+STR(::nPageNumber,6))
__NatMsg(_RFRM_PAGENO)+STR(::nPageNumber,6))
ENDIF
AADD( aPageHeader, DTOC(DATE()) )
@@ -619,8 +619,8 @@ METHOD ExecuteReport() CLASS HBReportForm
IF lGroupChanged .OR. MakeAStr(EVAL(::aReportData[RPT_GROUPS,nGroup,RGT_EXP]),;
::aReportData[RPT_GROUPS,nGroup,RGT_TYPE]) != ::aGroupTotals[nGroup]
AADD( aRecordHeader, iif( nGroup == 1, NationMsg(_RFRM_SUBTOTAL),;
NationMsg(_RFRM_SUBSUBTOTAL) ) )
AADD( aRecordHeader, iif( nGroup == 1, __NatMsg(_RFRM_SUBTOTAL),;
__NatMsg(_RFRM_SUBSUBTOTAL) ) )
AADD( aRecordHeader, "" )

View File

@@ -378,6 +378,17 @@ FUNCTION Main_MISC()
/* NATION functions (do not exist in 5.2e US) */
#ifdef __HARBOUR__
#ifndef HB_C52_UNDOC
/* NOTE: Use the identical internal versions if Harbour
was compiled without C5.x undocumented features.
[vszakats] */
#xtranslate NationMsg([<x,...>]) => __NatMsg(<x>)
#xtranslate IsAffirm([<x,...>]) => __NatIsAffirm(<x>)
#xtranslate IsNegative([<x,...>]) => __NatIsNegative(<x>)
#endif
#endif
#ifndef __XPP__
TEST_LINE( NationMsg() , "Invalid argument" )
#endif