2008-06-27 12:24 UTC+0200 Viktor Szakats (harbour.01 syenar hu)

* include/hbstdgen.ch
   * include/hbver.h
   * include/hbdefs.h
   * source/pp/pplib.c
   * source/pp/ppcore.c
   * source/pp/hbpp.c
   * source/common/hbver.c
   * source/common/hbverdsp.c
   * contrib/hbsqlit3/hbsqlit3.c
   * contrib/examples/pp/hbppdef.h
     * Changed .c level __HARBOUR__ to have the same value 
       as the existing .prg level one.
     * PP now gets the __HARBOUR__ define directly from the .c 
       level instead of generating it locally.
     ; QUESTION: Should or shouldn't we change __HARBOUR__ 
       to contain revision number too? (0x0100 -> 0x01000)
       This would allow for a greater level of development 
       opportunities between minor revisions, more "agile" 
       development.

   * include/hbpp.h
   * source/pp/ppcore.c
     - Two __XHARBOUR__ guards removed.
This commit is contained in:
Viktor Szakats
2008-06-27 10:27:35 +00:00
parent a1eb99932d
commit 53c7ccc18b
12 changed files with 54 additions and 36 deletions

View File

@@ -8,6 +8,31 @@
2008-12-31 13:59 UTC+0100 Foo Bar <foo.bar@foobar.org>
*/
2008-06-27 12:24 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* include/hbstdgen.ch
* include/hbver.h
* include/hbdefs.h
* source/pp/pplib.c
* source/pp/ppcore.c
* source/pp/hbpp.c
* source/common/hbver.c
* source/common/hbverdsp.c
* contrib/hbsqlit3/hbsqlit3.c
* contrib/examples/pp/hbppdef.h
* Changed .c level __HARBOUR__ to have the same value
as the existing .prg level one.
* PP now gets the __HARBOUR__ define directly from the .c
level instead of generating it locally.
; QUESTION: Should or shouldn't we change __HARBOUR__
to contain revision number too? (0x0100 -> 0x01000)
This would allow for a greater level of development
opportunities between minor revisions, more "agile"
development.
* include/hbpp.h
* source/pp/ppcore.c
- Two __XHARBOUR__ guards removed.
2008-06-27 03:27 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* contrib/gtwvg/Makefile
* contrib/gtwvg/common.mak

View File

@@ -56,7 +56,6 @@
#include "hbapi.h"
#include "hbapifs.h"
#include "hberrors.h"
#include "hbver.h"
HB_EXTERN_BEGIN

View File

@@ -63,7 +63,6 @@
#include "hbapiitm.h"
#include "hbapierr.h"
#include "hbapifs.h"
#include "hbver.h"
#ifdef NODLL
extern char * sqlite3_temp_directory;

View File

@@ -61,6 +61,7 @@
#include "hbsetup.h"
#include "hbtrace.h"
#include "hbver.h"
#if defined( __XCC__ ) || defined( __MINGW32__ ) || \
( defined( __GNUC__ ) && \
@@ -1146,10 +1147,6 @@ typedef unsigned long HB_COUNTER;
#define HARBOUR void
#endif
#if ! defined(__HARBOUR__)
#define __HARBOUR__
#endif
typedef HARBOUR ( * PHB_FUNC )( void );
typedef PHB_FUNC HB_FUNC_PTR;

View File

@@ -198,9 +198,12 @@ typedef HB_PP_SWITCH_FUNC * PHB_PP_SWITCH_FUNC;
#define HB_PP_TOKEN_MOD 84
#define HB_PP_TOKEN_POWER 85
#define HB_PP_TOKEN_EPSILON 86
/* xhb stuff */
#if 0
#define HB_PP_TOKEN_SHIFTL 87
#define HB_PP_TOKEN_SHIFTR 88
#define HB_PP_TOKEN_BITXOR 89
#endif
#define HB_PP_TOKEN_TYPE(t) ( (t) & 0xff )
/* bitfields */

View File

@@ -52,13 +52,19 @@
/* include hbsetup.ch to set default build settings */
#include "hbsetup.ch"
/* include version macros */
#ifndef _HB_PRG_LEVEL
#define _HB_PRG_LEVEL
#endif
#include "hbver.h"
#undef _HB_PRG_LEVEL
/* include std.ch to set default rules */
#include "std.ch"
/* undefine all rules which are not necessary in default PP tables */
#undef HB_VER_H_
#undef HB_SETUP_CH_
#undef __HARBOUR__
#undef __DATE__
#undef __TIME__
#undef __HB_MAIN__

View File

@@ -53,6 +53,8 @@
#ifndef HB_VER_H_
#define HB_VER_H_
#ifndef _HB_PRG_LEVEL
/* NOTE: One of these next three fields can be incremented by the hbverfix program */
#define HB_VER_MAJOR 1 /* Major version number */
@@ -61,6 +63,14 @@
#define HB_VER_STATUS "RC1" /* Build status */
#define HB_VERSION 0x010000 /* Three bytes: Major + Minor + Revision */
#endif
/* #include "hb_verbld.h" */
#if defined(__HARBOUR__)
#undef __HARBOUR__
#endif
#define __HARBOUR__ 0x0100 /* Two bytes: Major + Minor. This is recommented for 3rd party .c and .prg level code. */
#endif /* HB_VER_H_ */

View File

@@ -75,7 +75,6 @@
#define HB_OS_WIN_32_USED
#include "hbapi.h"
#include "hbver.h"
#include "hbmemory.ch"
#if defined(HB_OS_WIN_32)

View File

@@ -50,14 +50,7 @@
*
*/
/*
*
* See doc/license.txt for licensing terms.
*
*/
#include "hbapi.h"
#include "hbver.h"
#include "hbmemory.ch"
void hb_verBuildInfo( void )

View File

@@ -236,8 +236,7 @@ static void hb_pp_undefCompilerRules( PHB_PP_STATE pState )
{
int i;
PHB_PP_RULE * pRulePtr, pRule;
char * szRules[] = { "__HARBOUR__",
"__DATE__",
char * szRules[] = { "__DATE__",
"__TIME__",
"__HB_MAIN__",
"__ARCH16BIT__",

View File

@@ -63,7 +63,6 @@
#endif
#include "hbpp.h"
#include "hbver.h"
#include "hbdate.h"
#define HB_PP_WARN_DEFINE_REDEF 1 /* C1005 */
@@ -177,11 +176,6 @@ static const HB_PP_OPERATOR s_operators[] =
{ "!=" , 2, "<>" , HB_PP_TOKEN_NE | HB_PP_TOKEN_STATIC },
{ "<>" , 2, "<>" , HB_PP_TOKEN_NE | HB_PP_TOKEN_STATIC },
{ "->" , 2, "->" , HB_PP_TOKEN_ALIAS | HB_PP_TOKEN_STATIC },
#ifdef __XHARBOUR__
{ "<<" , 2, "<<" , HB_PP_TOKEN_SHIFTL | HB_PP_TOKEN_STATIC },
{ ">>" , 2, ">>" , HB_PP_TOKEN_SHIFTR | HB_PP_TOKEN_STATIC },
{ "^^" , 2, "^^" , HB_PP_TOKEN_BITXOR | HB_PP_TOKEN_STATIC },
#endif
{ "@" , 1, "@" , HB_PP_TOKEN_REFERENCE | HB_PP_TOKEN_STATIC },
{ "(" , 1, "(" , HB_PP_TOKEN_LEFT_PB | HB_PP_TOKEN_STATIC },
{ ")" , 1, ")" , HB_PP_TOKEN_RIGHT_PB | HB_PP_TOKEN_STATIC },
@@ -4382,11 +4376,14 @@ static PHB_PP_TOKEN hb_pp_calcPrecedence( PHB_PP_TOKEN pToken,
*piNextPrec = HB_PP_PREC_BIT;
break;
/* xhb stuff */
#if 0
case HB_PP_TOKEN_BITXOR:
case HB_PP_TOKEN_SHIFTL:
case HB_PP_TOKEN_SHIFTR:
*piNextPrec = HB_PP_PREC_BIT;
break;
#endif
/* math plus/minus */
case HB_PP_TOKEN_PLUS:
@@ -4448,6 +4445,8 @@ static HB_LONG hb_pp_calcOperation( HB_LONG lValueLeft, HB_LONG lValueRight,
lValueLeft &= lValueRight;
break;
case HB_PP_TOKEN_POWER:
/* xhb stuff */
#if 0
case HB_PP_TOKEN_BITXOR:
lValueLeft ^= lValueRight;
break;
@@ -4457,6 +4456,7 @@ static HB_LONG hb_pp_calcOperation( HB_LONG lValueLeft, HB_LONG lValueRight,
case HB_PP_TOKEN_SHIFTR:
lValueLeft >>= lValueRight;
break;
#endif
case HB_PP_TOKEN_PLUS:
lValueLeft += lValueRight;
@@ -5220,18 +5220,6 @@ void hb_pp_initDynDefines( PHB_PP_STATE pState )
hb_pp_addDefine( pState, szDefine, szResult );
#endif
#if defined( __HARBOUR__ ) || defined( __XHARBOUR__ )
snprintf( szResult, sizeof( szResult ), "%05d", HB_MAX( ( HB_VER_MAJOR << 8 ) | HB_VER_MINOR, 1 ) );
#ifdef __HARBOUR__
/* __HARBOUR__ */
hb_pp_addDefine( pState, "__HARBOUR__", szResult );
#endif
#ifdef __XHARBOUR__
/* __XHARBOUR__ */
hb_pp_addDefine( pState, "__XHARBOUR__", szResult );
#endif
#endif
/* __DATE__ */
hb_dateToday( &iYear, &iMonth, &iDay );
hb_dateStrPut( szResult + 1, iYear, iMonth, iDay );

View File

@@ -134,7 +134,7 @@ PHB_PP_STATE hb_pp_Param( int iParam )
* initialize new PP context and return pointer to it.
* __PP_INIT( [<cIncludePath>] [, <cStdChFile> ] )
* when <cStdChFile> is empty string ("") then no default rules are used
* only the dynamically created #defines like __HARBOUR__, __DATE__, __TIME__
* only the dynamically created #defines like __DATE__, __TIME__
*/
HB_FUNC( __PP_INIT )
{