[mm-common] Avoid leading special character in expr argument



commit dc52fd8710088ad2876081b3cfbfdc5cd73b0bab
Author: Daniel Elstner <daniel kitta gmail com>
Date:   Thu Jan 7 11:31:57 2010 +0100

    Avoid leading special character in expr argument
    
    * macros/mm-doc.m4 (_MM_ARG_WITH_TAGFILE_DOC): Be prudent and begin
    any expression argument to expr with a known non-special character.

 macros/mm-doc.m4 |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/macros/mm-doc.m4 b/macros/mm-doc.m4
index 70297d1..9f236ee 100644
--- a/macros/mm-doc.m4
+++ b/macros/mm-doc.m4
@@ -1,4 +1,4 @@
-## Copyright (c) 2009  Openismus GmbH  <http://www.openismus.com/>
+## Copyright (c) 2009-2010  Openismus GmbH  <http://www.openismus.com/>
 ##
 ## This file is part of mm-common.
 ##
@@ -15,7 +15,7 @@
 ## You should have received a copy of the GNU General Public License
 ## along with mm-common.  If not, see <http://www.gnu.org/licenses/>.
 
-#serial 20090828
+#serial 20100107
 
 ## _MM_CONFIG_DOCTOOL_DIR
 ##
@@ -159,8 +159,8 @@ m4_define([_MM_ARG_WITH_TAGFILE_DOC],
               [AS_HELP_STRING([[--with-$1-doc=[TAGFILE ]HTMLREFDIR]],
                               [Link to external $1 documentation]m4_ifval([$4], [[ [auto]]]))],
   [
-    mm_htmlrefdir=`[expr "@$withval" : ' * \(.*\)' 2>&]AS_MESSAGE_LOG_FD`
-    mm_tagname=`[expr "/$withval" : '[^ ]*[\\/]\([^\\/@]*\)@' 2>&]AS_MESSAGE_LOG_FD`
+    mm_htmlrefdir=`[expr "X $withval" : ' * \(.*\)' 2>&]AS_MESSAGE_LOG_FD`
+    mm_tagname=`[expr "X/$withval" : '[^ ]*[\\/]\([^\\/@]*\)@' 2>&]AS_MESSAGE_LOG_FD`
     mm_tagpath=`[expr "X$withval" : 'X\([^ ]*\)@' 2>&]AS_MESSAGE_LOG_FD`
     test "x$mm_tagname" != x || mm_tagname="$3"
     test "x$mm_tagpath" != x || mm_tagpath=$mm_tagname[]dnl



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]