From 44ea2145527af98c0410eadbd7de9e413d2a5de1 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 7 Mar 2011 11:29:01 +0000 Subject: [PATCH] 2011-03-07 12:28 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * utils/hbmk2/hbmk2.prg ! Fixed to recognize filters in options having ${} macros, if the filter is placed after the macros. --- harbour/ChangeLog | 5 +++++ harbour/utils/hbmk2/hbmk2.prg | 17 ++++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index e58077a6cb..a272ba854a 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,11 @@ The license applies to all entries newer than 2009-04-28. */ +2011-03-07 12:28 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * utils/hbmk2/hbmk2.prg + ! Fixed to recognize filters in options having ${} macros, + if the filter is placed after the macros. + 2011-03-06 18:38 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbpost.hbm * config/postinst.hbs diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index 8d31171a80..5034e0b198 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -9467,9 +9467,20 @@ STATIC FUNCTION ArchCompFilter( hbmk, cItem ) LOCAL cExprWithValue := "hbmk_KEYW( hbmk, '%1', '%2', '%3' )" LOCAL tmp - IF ( nStart := At( _MACRO_OPEN, cItem ) ) > 0 .AND. ; - !( SubStr( cItem, nStart - 1, 1 ) $ _MACRO_PREFIX_ALL ) .AND. ; - ( nEnd := hb_At( _MACRO_CLOSE, cItem, nStart + Len( _MACRO_OPEN ) ) ) > 0 + nEnd := 1 + DO WHILE .T. + IF ( nStart := hb_At( _MACRO_OPEN, cItem, nEnd ) ) == 0 + EXIT + ENDIF + IF ( nEnd := hb_At( _MACRO_CLOSE, cItem, nStart + Len( _MACRO_OPEN ) ) ) == 0 + EXIT + ENDIF + IF !( SubStr( cItem, nStart - 1, 1 ) $ _MACRO_PREFIX_ALL ) + EXIT + ENDIF + ENDDO + + IF nStart > 0 /* Separate filter from the rest of the item */ cFilterSrc := SubStr( cItem, nStart + Len( _MACRO_OPEN ), nEnd - nStart - Len( _MACRO_OPEN ) )