From 97f459c7d37dc59dbe05dff46731f13d65306d1f Mon Sep 17 00:00:00 2001 From: Jean-Francois Lefebvre Date: Tue, 19 Sep 2000 22:57:06 +0000 Subject: [PATCH] 2000-09-20 00:52 UTC+0200 JFL (mafact) --- harbour/ChangeLog | 8 ++++++++ harbour/include/hbclass.ch | 17 ++++++++--------- harbour/source/pp/ppcore.c | 22 +++++++++++++++++++--- 3 files changed, 35 insertions(+), 12 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 880ad7a524..09f6525599 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,11 @@ +2000-09-20 00:52 UTC+0200 JFL (mafact) + * source/pp/ppcore.c + corrected #command @@ => ... + #xtranslate = name{ ... + * include/hbclass.ch + supresses the (now) unneeded #xtranslate := name{ ... + as = name{... is working for the two case + 2000-09-19 10:40 UTC+0800 Ron Pinkas * config/dos/djgpp.cf + Added support for $(L_USR) diff --git a/harbour/include/hbclass.ch b/harbour/include/hbclass.ch index 31c6c6d908..20c2a711c7 100644 --- a/harbour/include/hbclass.ch +++ b/harbour/include/hbclass.ch @@ -49,14 +49,14 @@ */ DECLARE TClass ; - New( cName AS STRING, OPTIONAL SuperParams ) AS CLASS TClass ; - Create() AS OBJECT; - Instance() AS OBJECT ; - AddClsMthds( cName AS STRING, @MethodName(), nScope AS NUMERIC, n2 AS NUMERIC, n3 AS NUMERIC ); - AddMultiClsData( cType AS STRING, uVal, nScope AS NUMERIC, aDatas AS ARRAY OF STRING ); - AddMultiData( cType AS STRING, uVal, nScope AS NUMERIC, aDatas AS ARRAY OF STRING ); - AddMethod( cName AS STRING, @MethodName(), nScope AS NUMERIC ); - AddInLine( cName AS STRING, bBlock AS CODEBLOCK, nScope AS NUMERIC ); + New( cName AS STRING, OPTIONAL SuperParams ) AS CLASS TClass ; + Create() AS OBJECT; + Instance() AS OBJECT ; + AddClsMthds( cName AS STRING, @MethodName(), nScope AS NUMERIC, n2 AS NUMERIC, n3 AS NUMERIC ); + AddMultiClsData( cType AS STRING, uVal, nScope AS NUMERIC, aDatas AS ARRAY OF STRING ); + AddMultiData( cType AS STRING, uVal, nScope AS NUMERIC, aDatas AS ARRAY OF STRING ); + AddMethod( cName AS STRING, @MethodName(), nScope AS NUMERIC ); + AddInLine( cName AS STRING, bBlock AS CODEBLOCK, nScope AS NUMERIC ); AddVirtual( cName AS STRING ) #ifndef HB_CLASS_CH_ @@ -197,7 +197,6 @@ DECLARE TClass ; #ifdef HB_CLS_VO #xtranslate ( { [] } => ( ():New(

) -#xtranslate := { [] } => := ():New(

) #xtranslate = { [] } => = ():New(

) #xtranslate , { [] } => , ():New(

) diff --git a/harbour/source/pp/ppcore.c b/harbour/source/pp/ppcore.c index c238b4cff0..4ac4f422bc 100644 --- a/harbour/source/pp/ppcore.c +++ b/harbour/source/pp/ppcore.c @@ -696,7 +696,15 @@ static void ParseCommand( char * sLine, BOOL com_or_xcom, BOOL com_or_tra ) HB_SKIPTABSPACES( sLine ); ipos = 0; - while( *sLine != '\0' && *sLine != ' ' && *sLine != '\t' && *sLine != '<' && *sLine != '=' && ( *sLine != '(' || ipos == 0 ) ) + + + /* JFL 2000-09-19 */ + /* This was the original line as Alexander wrote it */ + /* while( *sLine != '\0' && *sLine != ' ' && *sLine != '\t' && *sLine != '<' && *sLine != '=' && ( *sLine != '(' || ipos == 0 ) ) */ + /* Now the line #xtranslate = name(.. => will be allowed + + /* I changed it to the following to allow < and = to be the first char within a translate or xtranslate */ + while( *sLine != '\0' && *sLine != ' ' && *sLine != '\t' && ( *sLine != '<' || ipos == 0 ) && ( *sLine != '=' || ipos == 0 ) && ( *sLine != '(' || ipos == 0 ) ) { *(cmdname+ipos++) = *sLine++; } @@ -728,9 +736,11 @@ static void ParseCommand( char * sLine, BOOL com_or_xcom, BOOL com_or_tra ) stcmd->mpatt = hb_strdup( mpatt ); stcmd->value = ( rlen > 0 ) ? hb_strdup( rpatt ) : NULL; + /* JFL */ /* - printf( "Name: %s Pat: %s Val: %s\n", stcmd->name, stcmd->mpatt, stcmd->value ); + printf( "Parsecommand Name: %s Pat: %s Val: %s\n", stcmd->name, stcmd->mpatt, stcmd->value ); */ + } else hb_compGenError( hb_pp_szErrors, 'F', HB_PP_ERR_COMMAND_DEFINITION, NULL, NULL ); @@ -2518,7 +2528,11 @@ int hb_pp_RdStr( FILE * handl_i, char * buffer, int maxlen, BOOL lDropSpaces, ch case ';': bNewLine = TRUE; break; - case '@': + + /* JFL 2000-09-19 */ + /* Supressed this code wich avoid the use of #command @@ => ... + /* I'm not sure what it was intended for ... so I let it here commented */ +/* case '@': if( bNewLine && sBuffer[ *iBuffer ] != ' ' && sBuffer[ *iBuffer ] != '\t' ) { buffer[readed++] = cha; @@ -2526,6 +2540,8 @@ int hb_pp_RdStr( FILE * handl_i, char * buffer, int maxlen, BOOL lDropSpaces, ch cha = ' '; } break; +*/ + /* Ron Pinkas end 2000-06-01 */ } if( cha != ' ' && cha != ';' ) s_prevchar = cha;