fnmatch.c (8870) | fnmatch.c (17141) |
---|---|
1/* 2 * Copyright (c) 1989, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Guido van Rossum. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 133 unchanged lines hidden (view full) --- 142 143 /* 144 * A bracket expression starting with an unquoted circumflex 145 * character produces unspecified results (IEEE 1003.2-1992, 146 * 3.13.2). This implementation treats it like '!', for 147 * consistency with the regular expression syntax. 148 * J.T. Conklin (conklin@ngai.kaleida.com) 149 */ | 1/* 2 * Copyright (c) 1989, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Guido van Rossum. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 133 unchanged lines hidden (view full) --- 142 143 /* 144 * A bracket expression starting with an unquoted circumflex 145 * character produces unspecified results (IEEE 1003.2-1992, 146 * 3.13.2). This implementation treats it like '!', for 147 * consistency with the regular expression syntax. 148 * J.T. Conklin (conklin@ngai.kaleida.com) 149 */ |
150 if (negate = (*pattern == '!' || *pattern == '^')) | 150 if ( (negate = (*pattern == '!' || *pattern == '^')) ) |
151 ++pattern; 152 153 for (ok = 0; (c = *pattern++) != ']';) { 154 if (c == '\\' && !(flags & FNM_NOESCAPE)) 155 c = *pattern++; 156 if (c == EOS) 157 return (NULL); 158 if (*pattern == '-' --- 13 unchanged lines hidden --- | 151 ++pattern; 152 153 for (ok = 0; (c = *pattern++) != ']';) { 154 if (c == '\\' && !(flags & FNM_NOESCAPE)) 155 c = *pattern++; 156 if (c == EOS) 157 return (NULL); 158 if (*pattern == '-' --- 13 unchanged lines hidden --- |