[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/tests/lib/libc/gen
On Oct 14, 12:31am, justin%specialbusservice.com@localhost (Justin Cormack) wrote:
-- Subject: Re: CVS commit: src/tests/lib/libc/gen
| Well also there is the bit thats says
| When pattern matching is used where shell quote removal is not
| performed (such as in the argument to the find - name primary when
| find is being called using one of the exec functions as defined in the
| System Interfaces volume of IEEE Std 1003.1-2001, or in the pattern
| argument to the fnmatch() function), special characters can be escaped
| to remove their special meaning by preceding them with a backslash
| character. This escaping backslash is discarded. The sequence "\\"
| represents one literal backslash. All of the requirements and effects
| of quoting on ordinary, shell special, and special pattern characters
| shall apply to escaping in this context.
| Which seems to suggest your change is correct... will see if can get agreement.
| The / handling for fnmatch seems to be covered by
| The flags argument shall modify the interpretation of pattern and
| string. It is the bitwise-inclusive OR of zero or more of the flags
| defined in <fnmatch.h>. If the FNM_PATHNAME flag is set in flags, then
| a slash character ( '/' ) in string shall be explicitly matched by a
| slash in pattern; it shall not be matched by either the asterisk or
| question-mark special characters, nor by a bracket expression. If the
| FNM_PATHNAME flag is not set, the slash character shall be treated as
| an ordinary character.
| Which suggests \/ is not allowed, you are matching pathnames or not
| and cannot escape a /
The part of the / inside a brace expression does not mention FNM_PATHNAME,
and seems to be special. The whole thing is ambiguous and seems to try
to document existing practice instead of what makes sense.
Main Index |
Thread Index |