From d2e235ebbf7bbb77f9145849622ad0e16e15987f Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 25 Feb 2010 12:34:40 +0000 Subject: [PATCH] 2010-02-25 13:33 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * src/pp/ppcore.c * src/compiler/cmdcheck.c * src/compiler/hbusage.c * include/hbpp.h - Deleted -kl option. "multiline strings" converted back to build-time option. It's not a documented option anymore, usage is not recommended. See 2010-02-24 20:04 UTC+0100 for valid alternatives. --- harbour/ChangeLog | 10 ++++++++++ harbour/include/hbpp.h | 6 ------ harbour/src/compiler/cmdcheck.c | 12 ------------ harbour/src/compiler/hbusage.c | 3 --- harbour/src/pp/ppcore.c | 27 +++------------------------ 5 files changed, 13 insertions(+), 45 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 85337a7491..34dd57f7a2 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,16 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-02-25 13:33 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * src/pp/ppcore.c + * src/compiler/cmdcheck.c + * src/compiler/hbusage.c + * include/hbpp.h + - Deleted -kl option. "multiline strings" converted back + to build-time option. It's not a documented option anymore, + usage is not recommended. See 2010-02-24 20:04 UTC+0100 + for valid alternatives. + 2010-02-25 11:08 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * include/hbextern.ch ! Added __QUITCANCEL. diff --git a/harbour/include/hbpp.h b/harbour/include/hbpp.h index 8a4fe180a5..589eb14269 100644 --- a/harbour/include/hbpp.h +++ b/harbour/include/hbpp.h @@ -582,9 +582,6 @@ typedef struct HB_BOOL fWriteTrace; /* write translation to file (.ppt) */ HB_PATHNAMES * pIncludePath; /* search path(s) for included files */ -#ifdef HB_LEGACY_LEVEL3 - HB_BOOL fMultiLine; /* 'multiline strings' compatibility feature enabled */ -#endif char * szOutFileName; /* output file name */ FILE * file_out; /* output file handle */ @@ -661,9 +658,6 @@ extern void hb_pp_readRules( PHB_PP_STATE pState, const char * szRulesFile ); extern void hb_pp_setStdRules( PHB_PP_STATE pState ); extern void hb_pp_setStdBase( PHB_PP_STATE pState ); extern void hb_pp_setStream( PHB_PP_STATE pState, int iMode ); -#ifdef HB_LEGACY_LEVEL3 -extern void hb_pp_setMultiLine( PHB_PP_STATE pState, HB_BOOL fMultiLine ); -#endif extern void hb_pp_addSearchPath( PHB_PP_STATE pState, const char * szPath, HB_BOOL fReplace ); extern HB_BOOL hb_pp_inBuffer( PHB_PP_STATE pState, const char * pBuffer, HB_SIZE ulLen ); extern HB_BOOL hb_pp_inFile( PHB_PP_STATE pState, const char * szFileName, HB_BOOL fSearchPath, FILE * file_in, HB_BOOL fError ); diff --git a/harbour/src/compiler/cmdcheck.c b/harbour/src/compiler/cmdcheck.c index 945cc020ce..c3e03c8228 100644 --- a/harbour/src/compiler/cmdcheck.c +++ b/harbour/src/compiler/cmdcheck.c @@ -407,18 +407,6 @@ static void hb_compChkEnvironVar( HB_COMP_DECL, const char *szSwitch ) HB_COMP_PARAM->supported &= ~HB_COMPFLAG_OPTJUMP; break; -#ifdef HB_LEGACY_LEVEL3 - case 'L': - case 'l': - if( s[i] == '-' ) - { - i++; - hb_pp_setMultiLine( HB_COMP_PARAM->pLex->pPP, HB_FALSE ); - } - else - hb_pp_setMultiLine( HB_COMP_PARAM->pLex->pPP, HB_TRUE ); - break; -#endif case 'm': case 'M': if( s[i] == '+' ) diff --git a/harbour/src/compiler/hbusage.c b/harbour/src/compiler/hbusage.c index 94458a83fa..386833fd1a 100644 --- a/harbour/src/compiler/hbusage.c +++ b/harbour/src/compiler/hbusage.c @@ -143,9 +143,6 @@ void hb_compPrintModes( HB_COMP_DECL ) "\n s[-] allow indexed assignment on all types", "\n x[-] extended Xbase++ mode", "\n j[+] turn off jump optimization in pcode", -#ifdef HB_LEGACY_LEVEL3 - "\n l[-] enable support for multiline strings (deprecated)", -#endif "\n m[+] turn off macrotext substitution", "\n ? this info", "\n" diff --git a/harbour/src/pp/ppcore.c b/harbour/src/pp/ppcore.c index 353e270215..a8fb3c0cc2 100644 --- a/harbour/src/pp/ppcore.c +++ b/harbour/src/pp/ppcore.c @@ -317,7 +317,7 @@ static void hb_membufFlush( PHB_MEM_BUFFER pBuffer ) pBuffer->ulLen = 0; } -#ifdef HB_LEGACY_LEVEL3 +#ifdef HB_PP_MULTILINE_STRINGS static void hb_membufRemove( PHB_MEM_BUFFER pBuffer, HB_SIZE ulLeft ) { if( ulLeft < pBuffer->ulLen ) @@ -1113,8 +1113,7 @@ static void hb_pp_getLine( PHB_PP_STATE pState ) } } -#ifdef HB_LEGACY_LEVEL3 - if( pState->fMultiLine ) +#ifdef HB_PP_MULTILINE_STRINGS { while( ul == ulLen ) { @@ -1197,8 +1196,7 @@ static void hb_pp_getLine( PHB_PP_STATE pState ) if( ch == '`' ) ch = '\''; while( ++ul < ulLen && pBuffer[ ul ] != ch ) {}; -#ifdef HB_LEGACY_LEVEL3 - if( pState->fMultiLine ) +#ifdef HB_PP_MULTILINE_STRINGS { while( ul == ulLen ) { @@ -5398,25 +5396,6 @@ void hb_pp_reset( PHB_PP_STATE pState ) hb_pp_ruleListNonStdFree( &pState->pCommands ); } -#ifdef HB_LEGACY_LEVEL3 - -/* - * set compatibility flag for multiline strings concatenated by ';' - * f.e.: - * cVar := "line 1; - * line 2; - * line 3" - * It's not Clipper compatible extension and it's not enabled by default - * anyhow old Harbour PP worked in such way and people may have some code - * which needs it - */ -void hb_pp_setMultiLine( PHB_PP_STATE pState, HB_BOOL fMultiLine ) -{ - pState->fMultiLine = fMultiLine; -} - -#endif - /* * add search path for included files */