1N/A * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers. 1N/A * All rights reserved. 1N/A * By using this file, you agree to the terms and conditions set 1N/A * forth in the LICENSE file which can be found at the top level of 1N/A * the sendmail distribution. 1N/A#
pragma ident "%Z%%M% %I% %E% SMI" 1N/A** SM_MATCH -- Match a character string against a glob pattern. 1N/A** par -- pattern to find in str. 1N/A** true on match, false on non-match. 1N/A** A pattern consists of normal characters, which match themselves, 1N/A** and meta-sequences. A * matches any sequence of characters. 1N/A** A ? matches any single character. A [ introduces a character class. 1N/A** A ] marks the end of a character class; if the ] is missing then 1N/A** the [ matches itself rather than introducing a character class. 1N/A** A character class matches any of the characters between the brackets. 1N/A** The range of characters from X to Y inclusive is written X-Y. 1N/A** If the first character after the [ is ! then the character class is 1N/A** To include a ] in a character class, make it the first character 1N/A** listed (after the !, if any). To include a -, make it the first 1N/A** character listed (after the !, if any) or the last character. 1N/A** It is impossible for a ] to be the final character in a range. 1N/A** For glob patterns that literally match "*", "?" or "[", 1N/A** use [*], [?] or [[]. 1N/A /* optimize case of trailing '*' */