From e49d89c9dfb98d895d9dc0370bdd2f4a044be902 Mon Sep 17 00:00:00 2001 From: Ron Pinkas Date: Wed, 21 Jun 2000 18:01:23 +0000 Subject: [PATCH] 2000-06-21 10:58 UTC-0800 Ron Pinkas * source/pp/ppcore.c ! getExpReal() to not return invalid Clipper Expression like unterminated '([{'. This will solve many PP problems. --- harbour/ChangeLog | 16 ++++++++++------ harbour/source/pp/ppcore.c | 15 +++++++++++++++ 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c7a99f8bc9..40419162c0 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,7 @@ +2000-06-21 10:58 UTC-0800 Ron Pinkas + * source/pp/ppcore.c + ! getExpReal() to not return invalid Clipper Expression like unterminated '([{'. This will solve many PP problems. + 2000-06-21 14:19 UTC+0100 Victor Szakats * include/hbextern.ch @@ -7,11 +11,11 @@ * makefile.bc * makefile.vc * DISKSPACE() made 100% CA-Clipper compatible, so that the second optional - extension parameter was removed. The UNIX support has been removed + extension parameter was removed. The UNIX support has been removed since the first parameter should always be a numeric value. - + HB_DISKSPACE() extension function added, with the optional second - parameter. This function will always need a string as the first - parameter, you can also query space data for a specific directory + + HB_DISKSPACE() extension function added, with the optional second + parameter. This function will always need a string as the first + parameter, you can also query space data for a specific directory on the systems where this is supported (Unix, Win32). This version will also support the Retry operation on error. @@ -21,7 +25,7 @@ * include/fileio.ch - Removed non-Clipper compatible macros. - Add these to your local headers if you need them, as I've already + Add these to your local headers if you need them, as I've already noted here: 20000322-16:33 GMT+1 Victor Szakats #define CD( d ) DIRCHANGE( d ) @@ -37,7 +41,7 @@ ! Fixed several bugs. * source/rtl/filesys.c - ! Rearranged the OS/2 hb_fsSeek() support, to not contain redundant + ! Rearranged the OS/2 hb_fsSeek() support, to not contain redundant code, and use the Harbour standard for multiplatform code. * source/vm/extend.c diff --git a/harbour/source/pp/ppcore.c b/harbour/source/pp/ppcore.c index 15084dcc4d..36920d2543 100644 --- a/harbour/source/pp/ppcore.c +++ b/harbour/source/pp/ppcore.c @@ -1914,6 +1914,16 @@ static int getExpReal( char * expreal, char ** ptri, BOOL prlist, int maxrez ) */ } + /* Ron Pinkas added 2000-06-21 */ + if( STATE_QUOTE1 || STATE_QUOTE2 || STATE_QUOTE3 || StBr1 || StBr2 || StBr3 ) + { + /* Alexander should we include this??? + expreal = NULL; + */ + lens = 0; + } + /* Ron Pinkas added 2000-06-21 */ + return lens; } @@ -1937,6 +1947,11 @@ static BOOL isExpres( char * stroka ) /* Ron Pinkas modified 2000-06-17 Expression can't be valid if last charcter is one of these: ":/+*-%^=(<>" return ( l1 <= l2 ); */ + + /* + printf( "l1: %i l2: %i\n", l1, l2 ); + */ + return ( l1 <= l2 && ! IsInStr( ( stroka - l2 )[l1-1], ":/+*-%^=(<>[{" ) ); }