source/compiler/harbour.c
* hb_compCompile() Added Clipper like message showing how many parse errors found.
* hb_compAutoOpen() added 2nd paramter pointer to bSkipGen of caller (hb_compCompile()).
Added logic to not "remember" hb_comp_bAnyWarning and hb_comp_iErrorCount from previous parsings.
* include/hbcomp.h
* Enclosed declarations of functions to support in-line nested compilation within #ifdef HB_NESTED_COMPILE
source/compiler/harbour.y
* Enclosed functions to support in-line nested compilation within #ifdef HB_NESTED_COMPILE
* Changed rules for DO ... to add name of module to hb_comp_pAutoOpen linked list.
+ Added hb_compAutoOpen() - Parses the needed externals when -m not specified
- Defed out hb_compYACCMAIN() (#if 0) - no longer needed, moved logic into hb_compCompile() and hb_compAutoOpen()
source/compiler/harbour.l
+ Added #define YY_USER_ACTION ... to fix Flex problem with ^ (BOL RegExp)
* Enclosed functions to support in-line nested compilation within #ifdef HB_NESTED_COMPILE
source/compiler/harbour.c
* Enclosed functions to support in-line nested compilation within #ifdef HB_NESTED_COMPILE
* Modified hb_compCompile() to support future in-line nested compilation, and defed it out.
* Changed hb_compCompile() to call hb_compAutoOpen() for modules called in DO ... that are not defined in main prg.
! Completed -m support, by default directives in external opened modules will be avialable to subsequent externals.
this feature is defed out if strict compatibilty ise selected.
* include/hbpp.h
* source/compiler/harbour.c
* source/pp/ppcore.c
* Modified hb_pp_SetRules() to receive 2nd parameter BOOL hb_comp_bQuiet, since ppcore is part of PP.lib which is linked
into HBRUN.exe which does not include harbour.c where hb_comp_bQuiet is defined.
* source/compiler/harbour.l
! Fixed parse error on IF [...]
* source/vm/classes.c
Posted patch provided by JF
* source/rtl/tobject.prg
Posted missing file provided by JF
* source/rdd/dbfntx1.c
After this change we can create indexes. And they working with Clipper !
But this isn't optimized.
* Module initialization for other then GNU compilers
+ static ERRCODE hb_ntxPageKeyAdd( LPPAGEINFO pPage, PHB_ITEM pKey, int level)
+ static ERRCODE hb_ntxPageKeyInsert( LPPAGEINFO pPage, PHB_ITEM pKey, int pos )
+ static int hb_ntxItemCompare( PHB_ITEM pKey1, PHB_ITEM pKey2 )
+ static ERRCODE hb_ntxPageAddPageKeyAdd( LPPAGEINFO pPage, PHB_ITEM pKey, int level, int pos )
* source/compiler/harbour.c
* main() Moved calls to hb_pp_init() to hb_pp_SetRules() in ppcore.c to avoid redefinition of standard defs.
* source/pp/ppcore.c
* hb_pp_SetRules() Moved calls to hb_pp_init() from main() in Harbour.c to avoid redefinition of standard defs.
! Minor fixes to warnings and errors.
* source/pp/ppcore.c
* Changed hb_pp_SetRules() to only always default to .CH extension, if file name supplied without extension.
! Converted some printf() messages to standard warnnings and errors.
* include/hberrors.h
+ Added:
#define HB_PP_ERR_CANNOT_OPEN_RULES 15
#define HB_COMP_ERR_BAD_RULES_FILE_NAME 16
#define HB_PP_WARN_NO_DIRECTIVES 2
* source/compiler/cmdcheck.c
+ Implemented support for -m
* include/hbcomp.h
+ Added structure _HARBVARS to hold Harbour Session Variables
+ Added structure +AUTOOPEN to hold names of external modules already compiled.
* source/compiler/harbour.c
+ Moved the parsing/compiling logic into new hb_compCompile()
+ Added:
static void hb_compAutoOpenAdd( char * szName );
static BOOL hb_compAutoOpenFind( char * szName );
static void hb_compSaveVars( PHARBVARS, int );
static void hb_compRestoreVars( PHARBVARS, int );
* source/compiler/harbour.l
+ Added:
void * hb_compGet_YY_CURRENT_BUFFER()
void hb_compSet_YY_CURRENT_BUFFER( void * pBuffer )
int hb_compGet_yy_init( void )
void hb_compSet_yy_init( int i )
int hb_compGet_yy_start( void )
void hb_compSet_yy_start( int i )
int hb_compGet_yy_did_buffer_switch_on_eof( void )
void hb_compSet_yy_did_buffer_switch_on_eof( int i )
* source/compiler/harbour.y
+ Added logic to call hb_compCompile() when DO ... or DO ... WITH
+ Added:
void * hb_compGet_pLoops( void )
void hb_compSet_pLoops( void * pLoops )
void * hb_compGet_rtvars( void )
void hb_compSet_rtvars( void * rtvars )
* source/compiler/hbusage.c
+ Added display of -m compiler switch
Please note:
1. Implementation is practicaly completed, but there is one known issue to be resolved: Once we open and compile
an external module, the very next prg line in the parent prg is not processed, I would love to get some assistance
with this - Ryszard, Antonio, Victor, Paul? as I am seriously limited with time over this week.
It seems I am not saving one of Bison/Flex vars, so my restore of the previous session is not complete :-(
2. Clipper seem to have a bug, on the following code:
DO WHILE WITH ...
Clipper will attempt to compile external "WITH.PRG" instead of "WHILE.PRG", can any one advise if I am missing something here...
In our implementation the above line will attemp to compile "WHILE.PRG"
* source/pp/ppcore.c
* Changed hb_pp_SetRules() to only default to .CH extension, if file name as supplied without extension was not found.
! Improved Messages to report various possible conditions.
* include/hbcomp.h
+ Added: extern char * hb_pp_STD_CH;
* include/hbpp.h
+ Added: extern void hb_pp_SetRules( BOOL (*hb_compInclude)(char *, PATHNAMES * ) );
* source/compiler/hbusage.c
* source/compiler/harbour.c
* source/compiler/cmdcheck.c
+ Added support for -u[FileName]
- Removed TODO for -u
* source/pp/ppcomp.c
+ Added hb_pp_ReadRules() - Logic to process directives from user supplied command defs.
* source/pp/ppcore.c
+ Added hb_pp_SetRules() - Logic to use predefined rules, none, or user defined.
* source/pp/pptable.c
+ Added hb_pp_Table() - Moved predefined rules into this function, to allow for conditional use.