2009-11-20 00:18 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/src/rtl/gtcrs/gtcrs.c
    * pacified warning caused by wrong tigetnum() declarations in some
      curses versions

  * harbour/src/rtl/gtsln/gtsln.c
    ! fixed non ANSI-C variable declarations

  * harbour/include/hbsetup.h
    + added macros for PURE and CONST function attributes

  * harbour/contrib/hbct/ctc.c
    * modified variable names
This commit is contained in:
Przemyslaw Czerpak
2009-11-19 23:18:42 +00:00
parent cf888ae565
commit 496972d91e
5 changed files with 54 additions and 30 deletions

View File

@@ -17,6 +17,20 @@
past entries belonging to author(s): Viktor Szakats.
*/
2009-11-20 00:18 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rtl/gtcrs/gtcrs.c
* pacified warning caused by wrong tigetnum() declarations in some
curses versions
* harbour/src/rtl/gtsln/gtsln.c
! fixed non ANSI-C variable declarations
* harbour/include/hbsetup.h
+ added macros for PURE and CONST function attributes
* harbour/contrib/hbct/ctc.c
* modified variable names
2009-11-19 19:57 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbqt/detect.mk
! Fix attempt to handle cross-build situations.

View File

@@ -59,8 +59,9 @@
/* throwing a CT-subsystem error without value substitution
- function adapted from errorapi.c */
USHORT ct_error( USHORT uiSeverity, HB_ERRCODE ulGenCode, HB_ERRCODE ulSubCode,
const char * szDescription, const char * szOperation, HB_ERRCODE uiOsCode, USHORT uiFlags, ULONG ulArgCount, ... )
USHORT ct_error( USHORT uiSeverity, HB_ERRCODE errGenCode, HB_ERRCODE errSubCode,
const char * szDescription, const char * szOperation,
HB_ERRCODE errOsCode, USHORT uiFlags, ULONG ulArgCount, ... )
{
USHORT uiAction;
PHB_ITEM pError;
@@ -70,9 +71,9 @@ USHORT ct_error( USHORT uiSeverity, HB_ERRCODE ulGenCode, HB_ERRCODE ulSubCode,
ULONG ulArgPos;
HB_TRACE( HB_TR_DEBUG, ( "ct_error(%hu, %d, %d, %s, %s, %d, %hu, %lu)",
uiSeverity, ulGenCode, ulSubCode, szDescription, szOperation, uiOsCode, uiFlags, ulArgCount ) );
uiSeverity, errGenCode, errSubCode, szDescription, szOperation, errOsCode, uiFlags, ulArgCount ) );
pError = hb_errRT_New( uiSeverity, CT_SUBSYSTEM, ulGenCode, ulSubCode, szDescription, szOperation, uiOsCode, uiFlags );
pError = hb_errRT_New( uiSeverity, CT_SUBSYSTEM, errGenCode, errSubCode, szDescription, szOperation, errOsCode, uiFlags );
/* Build the array from the passed arguments. */
if( ulArgCount == 0 )
@@ -126,8 +127,9 @@ USHORT ct_error( USHORT uiSeverity, HB_ERRCODE ulGenCode, HB_ERRCODE ulSubCode,
/* throwing a CT-subsystem error with value substitution
- function adapted from errorapi.c */
PHB_ITEM ct_error_subst( USHORT uiSeverity, HB_ERRCODE ulGenCode, HB_ERRCODE ulSubCode,
const char * szDescription, const char * szOperation, HB_ERRCODE uiOsCode, USHORT uiFlags, ULONG ulArgCount, ... )
PHB_ITEM ct_error_subst( USHORT uiSeverity, HB_ERRCODE errGenCode, HB_ERRCODE errSubCode,
const char * szDescription, const char * szOperation,
HB_ERRCODE errOsCode, USHORT uiFlags, ULONG ulArgCount, ... )
{
PHB_ITEM pRetVal;
PHB_ITEM pError;
@@ -137,9 +139,9 @@ PHB_ITEM ct_error_subst( USHORT uiSeverity, HB_ERRCODE ulGenCode, HB_ERRCODE ulS
ULONG ulArgPos;
HB_TRACE( HB_TR_DEBUG, ( "ct_error_subst(%hu, %d, %d, %s, %s, %d, %hu, %lu)",
uiSeverity, ulGenCode, ulSubCode, szDescription, szOperation, uiOsCode, uiFlags, ulArgCount ) );
uiSeverity, errGenCode, errSubCode, szDescription, szOperation, errOsCode, uiFlags, ulArgCount ) );
pError = hb_errRT_New_Subst( uiSeverity, CT_SUBSYSTEM, ulGenCode, ulSubCode, szDescription, szOperation, uiOsCode, uiFlags );
pError = hb_errRT_New_Subst( uiSeverity, CT_SUBSYSTEM, errGenCode, errSubCode, szDescription, szOperation, errOsCode, uiFlags );
/* Build the array from the passed arguments. */
if( ulArgCount == 0 )

View File

@@ -482,19 +482,20 @@
#define HB_EXTERN_END
#endif
#if defined( __GNUC__ )
#if defined( __GNUC__ ) && ( __GNUC__ - 0 >= 3 )
#define HB_PRINTF_FORMAT( _nStr, _nParam ) \
__attribute__ (( format (printf, _nStr, _nParam)))
# if ( __GNUC__ >= 3 )
#define HB_MALLOC_ATTR \
__attribute__ (( malloc ))
# else
#define HB_MALLOC_ATTR
# endif
#define HB_HOT_ATTR \
__attribute__ (( hot ))
#define HB_COLD_ATTR \
__attribute__ (( cold ))
#define HB_PURE_ATTR \
__attribute__ (( pure ))
#define HB_CONST_ATTR \
__attribute__ (( const ))
# if 0
#define HB_NORETURN_ATTR \
__attribute__ (( noreturn ))
@@ -516,12 +517,15 @@
#define HB_ALLOC_SIZE_ATTR( _nParam )
# endif
#define HB_RESTRICT __restrict
#else
#define HB_PRINTF_FORMAT( _nStr, _nParam )
#define HB_MALLOC_ATTR
#define HB_NORETURN_ATTR
#define HB_HOT_ATTR
#define HB_COLD_ATTR
#define HB_PURE_ATTR
#define HB_CONST_ATTR
#define HB_FLATTEN_ATTR
#define HB_ALLOC_SIZE_ATTR( _nParam )
#define HB_RESTRICT

View File

@@ -1241,7 +1241,7 @@ static void mouse_init( InOutBase * ioBase )
memset( ( void * ) &ioBase->mLastEvt, 0, sizeof( ioBase->mLastEvt ) );
ioBase->mLastEvt.click_delay = DBLCLK_DELAY;
/* curses mouse buttons check */
ioBase->mButtons = tigetnum( "btns" );
ioBase->mButtons = tigetnum( ( char * ) "btns" );
if ( ioBase->mButtons < 1 )
ioBase->mButtons = 3;
}

View File

@@ -956,17 +956,19 @@ static BOOL hb_gt_sln_SetDispCP( PHB_GT pGT, const char * pszTermCDP, const char
HB_GTSUPER_SETDISPCP( pGT, pszTermCDP, pszHostCDP, fBox );
#ifndef HB_CDP_SUPPORT_OFF
PHB_CODEPAGE cdpTerm = NULL, cdpHost = NULL;
{
PHB_CODEPAGE cdpTerm = NULL, cdpHost = NULL;
if ( pszHostCDP )
cdpHost = hb_cdpFind( pszHostCDP );
if ( ! cdpHost )
cdpHost = hb_vmCDP();
if ( pszHostCDP )
cdpHost = hb_cdpFind( pszHostCDP );
if ( ! cdpHost )
cdpHost = hb_vmCDP();
if ( pszTermCDP )
cdpTerm = hb_cdpFind( pszTermCDP );
if ( pszTermCDP )
cdpTerm = hb_cdpFind( pszTermCDP );
hb_sln_setCharTrans( cdpHost, cdpTerm, fBox );
hb_sln_setCharTrans( cdpHost, cdpTerm, fBox );
}
#endif
return TRUE;
@@ -979,17 +981,19 @@ static BOOL hb_gt_sln_SetKeyCP( PHB_GT pGT, const char * pszTermCDP, const char
HB_GTSUPER_SETKEYCP( pGT, pszTermCDP, pszHostCDP );
#ifndef HB_CDP_SUPPORT_OFF
PHB_CODEPAGE cdpTerm = NULL, cdpHost = NULL;
{
PHB_CODEPAGE cdpTerm = NULL, cdpHost = NULL;
if ( pszHostCDP )
cdpHost = hb_cdpFind( pszHostCDP );
if ( ! cdpHost )
cdpHost = hb_vmCDP();
if ( pszHostCDP )
cdpHost = hb_cdpFind( pszHostCDP );
if ( ! cdpHost )
cdpHost = hb_vmCDP();
if ( pszTermCDP )
cdpTerm = hb_cdpFind( pszTermCDP );
if ( pszTermCDP )
cdpTerm = hb_cdpFind( pszTermCDP );
hb_sln_setKeyTrans( cdpHost, cdpTerm );
hb_sln_setKeyTrans( cdpHost, cdpTerm );
}
#endif
return TRUE;