1 /* Copyright (C) 1991-2005 Free Software Foundation, Inc.
3 This file is part of GNU Bash, the Bourne Again SHell.
5 Bash is free software; you can redistribute it and/or modify it under
6 the terms of the GNU General Public License as published by the Free
7 Software Foundation; either version 2, or (at your option) any later
10 Bash is distributed in the hope that it will be useful, but WITHOUT ANY
11 WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 You should have received a copy of the GNU General Public License along
16 with Bash; see the file COPYING. If not, write to the Free Software
17 Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
19 static int INTERNAL_GLOB_PATTERN_P __P((const CHAR *));
21 /* Return nonzero if PATTERN has any special globbing chars in it.
22 Compiled twice, once each for single-byte and multibyte characters. */
24 INTERNAL_GLOB_PATTERN_P (pattern)
27 register const CHAR *p;
34 while ((c = *p++) != L('\0'))
41 case L('['): /* Only accept an open brace if there is a close */
42 bopen++; /* brace to match it. Bracket expressions must be */
43 continue; /* complete, according to Posix.2 */
49 case L('+'): /* extended matching operators */
52 if (*p == L('(')) /*) */
64 #undef INTERNAL_GLOB_PATTERN_P