From 9ecc338c5ec803db6c317481ac0e57be401aee42 Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Sun, 6 Jun 2010 18:03:10 +0000 Subject: [PATCH] 2010-06-06 10:55 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbide/idetools.prg ! Changed: macro notation for "Tools and Utilities" to confirm to hbMK2 standards. {source_fullname} => ${source_fullname} {source_name} => ${source_name} {source_path} => ${source_path} => ${source_ext} [Added] {%MY_ENV_VAR%} => ${MY_ENV_VAR} If marco keywords are not recognized, they are assumed to be environment variables and return value of hb_GetEnv( cMacro ) is substituted. --- harbour/ChangeLog | 14 ++++++++++++++ harbour/contrib/hbide/idetools.prg | 11 ++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 712d58c159..3819d44f8e 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,20 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-06-06 10:55 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/hbide/idetools.prg + ! Changed: macro notation for "Tools and Utilities" to confirm + to hbMK2 standards. + {source_fullname} => ${source_fullname} + {source_name} => ${source_name} + {source_path} => ${source_path} + => ${source_ext} [Added] + {%MY_ENV_VAR%} => ${MY_ENV_VAR} + + If marco keywords are not recognized, they are assumed to be + environment variables and return value of hb_GetEnv( cMacro ) + is substituted. + 2010-06-06 19:16 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * src/rtl/gtdos/gtdos.c ! Fixed C++ compilation (caused by BYTE -> HB_BYTE change) diff --git a/harbour/contrib/hbide/idetools.prg b/harbour/contrib/hbide/idetools.prg index f785405e4e..77214b40c1 100644 --- a/harbour/contrib/hbide/idetools.prg +++ b/harbour/contrib/hbide/idetools.prg @@ -492,10 +492,11 @@ METHOD IdeToolsManager:parseParams( cP ) IF !empty( cP ) DO WHILE .t. lHas := .f. - IF ( n := at( "{" , cP ) ) > 0 + + IF ( n := at( "${" , cP ) ) > 0 IF ( n1 := at( "}" , cP ) ) > 0 lHas := .t. - cMacro := substr( cP, n + 1, n1 - n - 1 ) + cMacro := substr( cP, n + 2, n1 - n - 2 ) cP := substr( cP, 1, n - 1 ) + ::macro2value( cMacro ) + substr( cP, n1 + 1 ) ENDIF ENDIF @@ -532,11 +533,11 @@ METHOD IdeToolsManager:macro2value( cMacro ) CASE cMacroL == "source_path" cVal := hbide_pathToOSPath( cPath ) - CASE "%" $ cMacro - cVal := hb_GetEnv( strtran( cMacro, "%", "" ) ) + CASE cMacroL == "source_ext" + cVal := cExt OTHERWISE - cVal := cMacro + cVal := hb_GetEnv( cMacro ) ENDCASE