autoconf
[Top][All Lists]
Advanced

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

Re: AS_DIRNAME and expr


From: Akim Demaille
Subject: Re: AS_DIRNAME and expr
Date: 10 Nov 2000 10:28:29 +0100
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands)

| The POSIX standard says:
| 
|    Usually, the matching operator shall return a string representing
|    the number of characters matched ('0' on failure). Alternatively,
|    if the pattern contains at least one regular expression
|    subexpression "[\(...\)]", the string corresponding to "\1" shall
|    be returned.
| 
| This leaves it ambiguous as to what expr 'a' : '\(b\)' should return.
| One could easily argue that it should be '0'.  But in practice,
| GNU/Linux and Solaris expr both return the empty string, under the
| theory that the operation is returning a string.

Thanks for the information.  May I include as are those two paragraphs
in the documentation?  In particular are there any license issues wrt
POSIX snippets?


| By the way, In reviewing the latest AS_DIRNAME I see a quoting
| problem.  AS_DIRNAME_SED shell-quotes its argument, but
| AS_DIRNAME_EXPR doesn't.  This needs to be handled consistently.

Yep, indeed.  Thanks.  I prefer the non-quoted version.

| Also, in looking at the callers of AS_DIRNAME, I see that some callers
| quote their arguments, but some don't.  This also needs to get fixed.

Right, I'll handle this.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]