2001-07-09 22:00 UTC-0800 Ron Pinkas <ron@profit-master.com>
* contrib/dot/pp.prg
* Changed PP_Main() to STATIC Main() to have a Main procedure for build that require a MAIN yet avoid conflict if linked with a prg including a MAIN.
* contrib/dot/pp_harb.ch
* Wrapped a Windows specific code within #ifdef WIN.
/* Thanks to input from Toma Zupan. */
* source/pp/ppcore.c
! Added a BOOL 2nd parameter to isExpres() to flag a LIST MP. This fixes problem with matching a list exp with an empty component.
This commit is contained in:
@@ -1,3 +1,13 @@
|
||||
2001-07-09 22:00 UTC-0800 Ron Pinkas <ron@profit-master.com>
|
||||
* contrib/dot/pp.prg
|
||||
* Changed PP_Main() to STATIC Main() to have a Main procedure for build that require a MAIN yet avoid conflict if linked with a prg including a MAIN.
|
||||
* contrib/dot/pp_harb.ch
|
||||
* Wrapped a Windows specific code within #ifdef WIN.
|
||||
/* Thanks to input from Tomaž Zupan. */
|
||||
|
||||
* source/pp/ppcore.c
|
||||
! Added a BOOL 2nd parameter to isExpres() to flag a LIST MP. This fixes problem with matching a list exp with an empty component.
|
||||
|
||||
2001-07-10 01:15 UTC+1 JFL (mafact) <jfl@mafact.com>
|
||||
* harbour/source/vm/Classe.c
|
||||
- Hb_ClsScope() Remed :-((((((((((
|
||||
@@ -9,9 +19,9 @@
|
||||
- Hb_ClsScope() Corrected and re-added
|
||||
- hb_getRrealclsName() enhanced to keep a better trace of Class tree
|
||||
- __ClsInst simplified
|
||||
- List of modifs simplified
|
||||
- List of modifs simplified
|
||||
* harbour/include/Hbclass.ch
|
||||
- List of modifs simplified
|
||||
- List of modifs simplified
|
||||
- Added a line of explanation for HB_CLS_ENFORCERO
|
||||
* harbour/utils/hbmake/hbmake.prg
|
||||
- added #ifndef __HARBOUR__ around Function HB_OSNEWLINE()
|
||||
|
||||
@@ -199,7 +199,7 @@ static s_lRunLoaded := .F., s_lClsLoaded := .F., s_lFWLoaded := .F.
|
||||
|
||||
//--------------------------------------------------------------//
|
||||
|
||||
PROCEDURE PP_Main( sSource, p1, p2, p3, p4, p5, p6, p7, p8, p9 )
|
||||
STATIC PROCEDURE Main( sSource, p1, p2, p3, p4, p5, p6, p7, p8, p9 )
|
||||
|
||||
LOCAL sIncludePath, nNext, sPath, sSwitch := ""
|
||||
LOCAL nAt, sParams, sPPOExt, aParams
|
||||
|
||||
@@ -1,9 +1,31 @@
|
||||
//--------------------------------------------------------------//
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* Pre-Processor/Dot prompt environment
|
||||
*
|
||||
* Copyright 2000 Ron Pinkas <ronpinkas@profit-master.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 of the License, 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 program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit
|
||||
* their web site at http://www.gnu.org/).
|
||||
*/
|
||||
|
||||
#ifdef __HARBOUR__
|
||||
|
||||
#include "hbclass.ch"
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
CLASS TInterpreter
|
||||
|
||||
DATA cText
|
||||
@@ -29,6 +51,7 @@ CLASS TInterpreter
|
||||
METHOD LoadFiveWin() INLINE PP_LoadFw()
|
||||
ENDCLASS
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
METHOD Run( p1, p2, p3, p4, p5, p6, p7, p8, p9 )
|
||||
|
||||
LOCAL aParams := HB_aParams(), xRet
|
||||
@@ -43,6 +66,7 @@ METHOD Run( p1, p2, p3, p4, p5, p6, p7, p8, p9 )
|
||||
|
||||
RETURN xRet
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
METHOD Compile()
|
||||
|
||||
LOCAL nLine, nLines, nProcId := 0
|
||||
@@ -68,6 +92,7 @@ METHOD Compile()
|
||||
|
||||
RETURN nProcId > 0
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
#pragma BEGINDUMP
|
||||
|
||||
#include <ctype.h>
|
||||
@@ -81,6 +106,7 @@ RETURN nProcId > 0
|
||||
|
||||
static BOOL s_bArrayPrefix = FALSE;
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
static HB_FUNC( SETARRAYPREFIX )
|
||||
{
|
||||
PHB_ITEM pbArrayPrefix = hb_param( 1, HB_IT_LOGICAL );
|
||||
@@ -91,6 +117,7 @@ static HB_FUNC( SETARRAYPREFIX )
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
static HB_FUNC( NEXTTOKEN )
|
||||
{
|
||||
PHB_ITEM pLine = hb_param( 1, HB_IT_STRING );
|
||||
@@ -425,6 +452,7 @@ static HB_FUNC( NEXTTOKEN )
|
||||
hb_retclen( sReturn, nLen );
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
static HB_FUNC( NEXTIDENTIFIER )
|
||||
{
|
||||
PHB_ITEM pLine = hb_param( 1, HB_IT_STRING );
|
||||
@@ -567,16 +595,25 @@ static HB_FUNC( NEXTIDENTIFIER )
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
#include <Windows.h>
|
||||
|
||||
HB_FUNC( MESSAGEBOX )
|
||||
{
|
||||
hb_retni( MessageBox( ( HWND ) hb_parnl( 1 ), hb_parc( 2 ), hb_parc( 3 ), hb_parni( 4 ) ) );
|
||||
}
|
||||
|
||||
#pragma STOPDUMP
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
#ifdef WIN
|
||||
|
||||
#pragma BEGINDUMP
|
||||
|
||||
#include <Windows.h>
|
||||
|
||||
HB_FUNC( MESSAGEBOX )
|
||||
{
|
||||
hb_retni( MessageBox( ( HWND ) hb_parnl( 1 ), hb_parc( 2 ), hb_parc( 3 ), hb_parni( 4 ) ) );
|
||||
}
|
||||
|
||||
#pragma STOPDUMP
|
||||
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
STATIC FUNCTION InitFWRules()
|
||||
|
||||
/* Defines */
|
||||
|
||||
@@ -111,7 +111,7 @@ static int CommandStuff( char *, char *, char *, int *, BOOL, BOOL );
|
||||
static int RemoveSlash( char * );
|
||||
static int WorkMarkers( char **, char **, char *, int *, BOOL );
|
||||
static int getExpReal( char *, char **, BOOL, int, BOOL );
|
||||
static BOOL isExpres( char * );
|
||||
static BOOL isExpres( char *, BOOL );
|
||||
static BOOL TestOptional( char *, char * );
|
||||
static BOOL CheckOptional( char *, char *, char *, int *, BOOL, BOOL );
|
||||
static void SkipOptional( char ** );
|
||||
@@ -1805,7 +1805,7 @@ static int WorkMarkers( char ** ptrmp, char ** ptri, char * ptro, int * lenres,
|
||||
*ptri += lenreal;
|
||||
}
|
||||
}
|
||||
else if( isExpres( expreal ) )
|
||||
else if( isExpres( expreal, *(exppatt+2) == '1' ) )
|
||||
{
|
||||
/*
|
||||
printf( "Accepted: >%s<\n", expreal );
|
||||
@@ -2385,7 +2385,7 @@ static int getExpReal( char * expreal, char ** ptri, BOOL prlist, int maxrez, BO
|
||||
return lens;
|
||||
}
|
||||
|
||||
static BOOL isExpres( char * stroka )
|
||||
static BOOL isExpres( char * stroka, BOOL prlist )
|
||||
{
|
||||
int l1,l2;
|
||||
|
||||
@@ -2396,7 +2396,7 @@ static BOOL isExpres( char * stroka )
|
||||
#endif
|
||||
|
||||
l1 = strlen( stroka );
|
||||
l2 = getExpReal( NULL, &stroka, FALSE, HB_PP_STR_SIZE, TRUE );
|
||||
l2 = getExpReal( NULL, &stroka, prlist, HB_PP_STR_SIZE, TRUE );
|
||||
|
||||
#if 0
|
||||
printf( "Len1: %i Len2: %i RealExp: >%s< Last: %c\n", l1, l2, stroka - l2, ( stroka - l2 )[l1-1] );
|
||||
|
||||
Reference in New Issue
Block a user