| Line | Source | Count |
| 1 | struct smat_struct | - |
| 2 | { | - |
| 3 | unsigned char *pattern; | - |
| 4 | unsigned char *string; | - |
| 5 | }; | - |
| 6 | | - |
| 7 | int internal_strmatch (unsigned char *, unsigned char *, int); | - |
| 8 | | - |
| 9 | static int gmatch (unsigned char *, unsigned char *, unsigned char *, unsigned char *, struct smat_struct *, int); | - |
| 10 | static unsigned char *parse_collsym (unsigned char *, int *); | - |
| 11 | static unsigned char *brackmatch (unsigned char *, unsigned char, int); | - |
| 12 | static int extmatch (int, unsigned char *, unsigned char *, unsigned char *, unsigned char *, int); | - |
| 13 | | - |
| 14 | unsigned char *glob_patscan (unsigned char *, unsigned char *, int); | - |
| 15 | | - |
| 16 | int | - |
| 17 | internal_strmatch (pattern, string, flags) | - |
| 18 | unsigned char *pattern; | - |
| 19 | unsigned char *string; | - |
| 20 | int flags; | - |
| 21 | { | - |
| 22 | unsigned char *se, *pe; | - |
| 23 | | - |
| 24 | if (string == 0| TRUE | never evaluated | | FALSE | evaluated 48823644 times by 1 test |
|| pattern == 0| TRUE | never evaluated | | FALSE | evaluated 48823644 times by 1 test |
) | 0-48823644 |
| 25 | return never executed: return 1; 1;never executed: return 1; | 0 |
| 26 | | - |
| 27 | se = string + strlen((char *)string); | - |
| 28 | pe = pattern + strlen((char *)pattern); | - |
| 29 | | - |
| 30 | returnexecuted 48823644 times by 1 test: return (gmatch (string, se, pattern, pe, (struct smat_struct *) ((void *)0) , flags)); (gmatch (string, se, pattern, pe, (struct smat_struct *)executed 48823644 times by 1 test: return (gmatch (string, se, pattern, pe, (struct smat_struct *) ((void *)0) , flags)); | 48823644 |
| 31 | ((void *)0)executed 48823644 times by 1 test: return (gmatch (string, se, pattern, pe, (struct smat_struct *) ((void *)0) , flags)); | 48823644 |
| 32 | , flags));executed 48823644 times by 1 test: return (gmatch (string, se, pattern, pe, (struct smat_struct *) ((void *)0) , flags)); | 48823644 |
| 33 | } | - |
| 34 | | - |
| 35 | | - |
| 36 | | - |
| 37 | static int | - |
| 38 | gmatch (string, se, pattern, pe, ends, flags) | - |
| 39 | unsigned char *string, *se; | - |
| 40 | unsigned char *pattern, *pe; | - |
| 41 | struct smat_struct *ends; | - |
| 42 | int flags; | - |
| 43 | { | - |
| 44 | unsigned char *p, *n; | - |
| 45 | int c; | - |
| 46 | int sc; | - |
| 47 | | - |
| 48 | p = pattern; | - |
| 49 | n = string; | - |
| 50 | | - |
| 51 | if (string == 0| TRUE | never evaluated | | FALSE | evaluated 49026933 times by 1 test |
|| pattern == 0| TRUE | never evaluated | | FALSE | evaluated 49026933 times by 1 test |
) | 0-49026933 |
| 52 | return never executed: return 1; 1;never executed: return 1; | 0 |
| 53 | | - |
| 54 | | - |
| 55 | | - |
| 56 | | - |
| 57 | | - |
| 58 | | - |
| 59 | while (p < pe| TRUE | evaluated 121590254 times by 1 test | | FALSE | evaluated 28282211 times by 1 test |
) | 28282211-121590254 |
| 60 | { | - |
| 61 | c = *p++; | - |
| 62 | c = ((| TRUE | evaluated 152 times by 1 test | | FALSE | evaluated 121590102 times by 1 test |
flags & (1 << 4))| TRUE | evaluated 152 times by 1 test | | FALSE | evaluated 121590102 times by 1 test |
? ((1 && | 152-121590102 |
| 63 | ((*| TRUE | evaluated 12 times by 1 test | | FALSE | evaluated 140 times by 1 test |
__ctype_b_loc ())[(int) ((| TRUE | evaluated 12 times by 1 test | | FALSE | evaluated 140 times by 1 test |
| 12-140 |
| 64 | (unsigned char)(unsigned char)c| TRUE | evaluated 12 times by 1 test | | FALSE | evaluated 140 times by 1 test |
| 12-140 |
| 65 | ))] & (unsigned short int) _ISupper)| TRUE | evaluated 12 times by 1 test | | FALSE | evaluated 140 times by 1 test |
| 12-140 |
| 66 | ) ? | - |
| 67 | (__extension__ ({ int __res; if (sizeof (| TRUE | never evaluated | | FALSE | evaluated 12 times by 1 test |
| 0-12 |
| 68 | (unsigned char)c| TRUE | never evaluated | | FALSE | evaluated 12 times by 1 test |
| 0-12 |
| 69 | ) > 1| TRUE | never evaluated | | FALSE | evaluated 12 times by 1 test |
) { if (__builtin_constant_p (| TRUE | never evaluated | | FALSE | never evaluated |
| 0-12 |
| 70 | (unsigned char)c| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 71 | )| TRUE | never evaluated | | FALSE | never evaluated |
) { int __c = ( | 0 |
| 72 | (unsigned char)c | - |
| 73 | ); __res = __c < -128| TRUE | never evaluated | | FALSE | never evaluated |
|| __c > 255| TRUE | never evaluated | | FALSE | never evaluated |
? __c : (*__ctype_tolower_loc ())[__c]; }never executed: end of block else __res = tolower (never executed: __res = tolower ( (unsigned char)c ); | 0 |
| 74 | (unsigned char)c never executed: __res = tolower ( (unsigned char)c ); | 0 |
| 75 | ); never executed: __res = tolower ( (unsigned char)c ); } else __res = (*__ctype_tolower_loc ())[(int) (executed 12 times by 1 test: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)c )]; | 0-12 |
| 76 | (unsigned char)cexecuted 12 times by 1 test: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)c )]; | 12 |
| 77 | )];executed 12 times by 1 test: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)c )]; __res; })) | 12 |
| 78 | : ((unsigned char)c)) : ((unsigned char)c)); | - |
| 79 | | - |
| 80 | sc = n < se| TRUE | evaluated 121315965 times by 1 test | | FALSE | evaluated 274289 times by 1 test |
? *n : '\0'; | 274289-121315965 |
| 81 | | - |
| 82 | | - |
| 83 | | - |
| 84 | | - |
| 85 | if ((| TRUE | evaluated 8030821 times by 1 test | | FALSE | evaluated 113559433 times by 1 test |
flags & (1 << 5))| TRUE | evaluated 8030821 times by 1 test | | FALSE | evaluated 113559433 times by 1 test |
&& *| TRUE | evaluated 8437 times by 1 test | | FALSE | evaluated 8022384 times by 1 test |
p == '('| TRUE | evaluated 8437 times by 1 test | | FALSE | evaluated 8022384 times by 1 test |
&& | 8437-113559433 |
| 86 | (c == '+'| TRUE | evaluated 163 times by 1 test | | FALSE | evaluated 8274 times by 1 test |
|| c == '*'| TRUE | evaluated 3021 times by 1 test | | FALSE | evaluated 5253 times by 1 test |
|| c == '?'| TRUE | evaluated 44 times by 1 test | | FALSE | evaluated 5209 times by 1 test |
|| c == '@'| TRUE | evaluated 5060 times by 1 test | | FALSE | evaluated 149 times by 1 test |
|| c == '!'| TRUE | evaluated 149 times by 1 test | | FALSE | never evaluated |
)) | 0-8274 |
| 87 | { | - |
| 88 | int lflags; | - |
| 89 | | - |
| 90 | | - |
| 91 | lflags = (| TRUE | evaluated 7382 times by 1 test | | FALSE | evaluated 1055 times by 1 test |
n == string)| TRUE | evaluated 7382 times by 1 test | | FALSE | evaluated 1055 times by 1 test |
? flags : (flags & ~(1 << 2)); | 1055-7382 |
| 92 | returnexecuted 8437 times by 1 test: return (extmatch (c, n, se, p, pe, lflags)); (extmatch (c, n, se, p, pe, lflags));executed 8437 times by 1 test: return (extmatch (c, n, se, p, pe, lflags)); | 8437 |
| 93 | } | - |
| 94 | | - |
| 95 | | - |
| 96 | switch (c) | - |
| 97 | { | - |
| 98 | caseexecuted 18876 times by 1 test: case '?': '?':executed 18876 times by 1 test: case '?': | 18876 |
| 99 | if (sc == '\0'| TRUE | evaluated 18 times by 1 test | | FALSE | evaluated 18858 times by 1 test |
) | 18-18858 |
| 100 | returnexecuted 18 times by 1 test: return 1; 1;executed 18 times by 1 test: return 1; | 18 |
| 101 | else if ((| TRUE | evaluated 1772 times by 1 test | | FALSE | evaluated 17086 times by 1 test |
flags & (1 << 0))| TRUE | evaluated 1772 times by 1 test | | FALSE | evaluated 17086 times by 1 test |
&& sc == '/'| TRUE | never evaluated | | FALSE | evaluated 1772 times by 1 test |
) | 0-17086 |
| 102 | | - |
| 103 | return never executed: return 1; 1;never executed: return 1; | 0 |
| 104 | else if ((| TRUE | evaluated 1748 times by 1 test | | FALSE | evaluated 17110 times by 1 test |
flags & (1 << 2))| TRUE | evaluated 1748 times by 1 test | | FALSE | evaluated 17110 times by 1 test |
&& sc == '.'| TRUE | never evaluated | | FALSE | evaluated 1748 times by 1 test |
&& | 0-17110 |
| 105 | (n == string| TRUE | never evaluated | | FALSE | never evaluated |
|| ((| TRUE | never evaluated | | FALSE | never evaluated |
flags & (1 << 0))| TRUE | never evaluated | | FALSE | never evaluated |
&& n[-1] == '/'| TRUE | never evaluated | | FALSE | never evaluated |
))) | 0 |
| 106 | | - |
| 107 | | - |
| 108 | | - |
| 109 | return never executed: return 1; 1;never executed: return 1; | 0 |
| 110 | break;executed 18858 times by 1 test: break; | 18858 |
| 111 | | - |
| 112 | caseexecuted 85217778 times by 1 test: case '\\': '\\':executed 85217778 times by 1 test: case '\\': | 85217778 |
| 113 | if (p == pe| TRUE | evaluated 6 times by 1 test | | FALSE | evaluated 85217772 times by 1 test |
&& sc == '\\'| TRUE | evaluated 6 times by 1 test | | FALSE | never evaluated |
&& (| TRUE | evaluated 6 times by 1 test | | FALSE | never evaluated |
n+1 == se)| TRUE | evaluated 6 times by 1 test | | FALSE | never evaluated |
) | 0-85217772 |
| 114 | break;executed 6 times by 1 test: break; | 6 |
| 115 | | - |
| 116 | if (p == pe| TRUE | never evaluated | | FALSE | evaluated 85217772 times by 1 test |
) | 0-85217772 |
| 117 | return never executed: return 1; 1;never executed: return 1; | 0 |
| 118 | | - |
| 119 | if ((| TRUE | evaluated 85217772 times by 1 test | | FALSE | never evaluated |
flags & (1 << 1)) == 0| TRUE | evaluated 85217772 times by 1 test | | FALSE | never evaluated |
) | 0-85217772 |
| 120 | { | - |
| 121 | c = *p++; | - |
| 122 | | - |
| 123 | if (p > pe| TRUE | never evaluated | | FALSE | evaluated 85217772 times by 1 test |
) | 0-85217772 |
| 124 | return never executed: return 1; 1;never executed: return 1; | 0 |
| 125 | c = ((| TRUE | never evaluated | | FALSE | evaluated 85217772 times by 1 test |
flags & (1 << 4))| TRUE | never evaluated | | FALSE | evaluated 85217772 times by 1 test |
? ((1 && | 0-85217772 |
| 126 | ((*| TRUE | never evaluated | | FALSE | never evaluated |
__ctype_b_loc ())[(int) ((| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 127 | (unsigned char)(unsigned char)c| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 128 | ))] & (unsigned short int) _ISupper)| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 129 | ) ? | - |
| 130 | (__extension__ ({ int __res; if (sizeof (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 131 | (unsigned char)c| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 132 | ) > 1| TRUE | never evaluated | | FALSE | never evaluated |
) { if (__builtin_constant_p (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 133 | (unsigned char)c| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 134 | )| TRUE | never evaluated | | FALSE | never evaluated |
) { int __c = ( | 0 |
| 135 | (unsigned char)c | - |
| 136 | ); __res = __c < -128| TRUE | never evaluated | | FALSE | never evaluated |
|| __c > 255| TRUE | never evaluated | | FALSE | never evaluated |
? __c : (*__ctype_tolower_loc ())[__c]; }never executed: end of block else __res = tolower (never executed: __res = tolower ( (unsigned char)c ); | 0 |
| 137 | (unsigned char)c never executed: __res = tolower ( (unsigned char)c ); | 0 |
| 138 | ); never executed: __res = tolower ( (unsigned char)c ); } else __res = (*__ctype_tolower_loc ())[(int) (never executed: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)c )]; | 0 |
| 139 | (unsigned char)c never executed: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)c )]; | 0 |
| 140 | )]; never executed: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)c )]; __res; })) | 0 |
| 141 | : ((unsigned char)c)) : ((unsigned char)c)); | - |
| 142 | }executed 85217772 times by 1 test: end of block | 85217772 |
| 143 | if (((| TRUE | never evaluated | | FALSE | evaluated 85217772 times by 1 test |
| TRUE | evaluated 1390451 times by 1 test | | FALSE | evaluated 83827321 times by 1 test |
| TRUE | never evaluated | | FALSE | evaluated 85217772 times by 1 test |
flags & (1 << 4))| TRUE | evaluated 1390451 times by 1 test | | FALSE | evaluated 83827321 times by 1 test |
| TRUE | never evaluated | | FALSE | evaluated 85217772 times by 1 test |
? ((1 && | TRUE | evaluated 1390451 times by 1 test | | FALSE | evaluated 83827321 times by 1 test |
| 0-85217772 |
| 144 | ((*| TRUE | never evaluated | | FALSE | never evaluated |
__ctype_b_loc ())[(int) ((| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | evaluated 1390451 times by 1 test | | FALSE | evaluated 83827321 times by 1 test |
| 0-83827321 |
| 145 | (unsigned char)(unsigned char)sc| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | evaluated 1390451 times by 1 test | | FALSE | evaluated 83827321 times by 1 test |
| 0-83827321 |
| 146 | ))] & (unsigned short int) _ISupper)| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | evaluated 1390451 times by 1 test | | FALSE | evaluated 83827321 times by 1 test |
| 0-83827321 |
| 147 | ) ? | TRUE | evaluated 1390451 times by 1 test | | FALSE | evaluated 83827321 times by 1 test |
| 1390451-83827321 |
| 148 | (__extension__ ({ int __res; if (sizeof (| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | evaluated 1390451 times by 1 test | | FALSE | evaluated 83827321 times by 1 test |
| 0-83827321 |
| 149 | (unsigned char)sc| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | evaluated 1390451 times by 1 test | | FALSE | evaluated 83827321 times by 1 test |
| 0-83827321 |
| 150 | ) > 1| TRUE | never evaluated | | FALSE | never evaluated |
) { if (__builtin_constant_p (| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | evaluated 1390451 times by 1 test | | FALSE | evaluated 83827321 times by 1 test |
| 0-83827321 |
| 151 | (unsigned char)sc| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | evaluated 1390451 times by 1 test | | FALSE | evaluated 83827321 times by 1 test |
| 0-83827321 |
| 152 | )| TRUE | never evaluated | | FALSE | never evaluated |
) { int __c = (| TRUE | evaluated 1390451 times by 1 test | | FALSE | evaluated 83827321 times by 1 test |
| 0-83827321 |
| 153 | (unsigned char)sc| TRUE | evaluated 1390451 times by 1 test | | FALSE | evaluated 83827321 times by 1 test |
| 1390451-83827321 |
| 154 | ); __res = __c < -128| TRUE | never evaluated | | FALSE | never evaluated |
|| __c > 255| TRUE | never evaluated | | FALSE | never evaluated |
? __c : (*__ctype_tolower_loc ())[__c]; }never executed: end of block else __res = tolower (never executed: __res = tolower ( (unsigned char)sc ); | TRUE | evaluated 1390451 times by 1 test | | FALSE | evaluated 83827321 times by 1 test |
| 0-83827321 |
| 155 | (unsigned char)sc| TRUE | evaluated 1390451 times by 1 test | | FALSE | evaluated 83827321 times by 1 test |
never executed: __res = tolower ( (unsigned char)sc ); | 0-83827321 |
| 156 | );| TRUE | evaluated 1390451 times by 1 test | | FALSE | evaluated 83827321 times by 1 test |
never executed: __res = tolower ( (unsigned char)sc ); } else __res = (*__ctype_tolower_loc ())[(int) (never executed: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)sc )]; | TRUE | evaluated 1390451 times by 1 test | | FALSE | evaluated 83827321 times by 1 test |
| 0-83827321 |
| 157 | (unsigned char)sc| TRUE | evaluated 1390451 times by 1 test | | FALSE | evaluated 83827321 times by 1 test |
never executed: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)sc )]; | 0-83827321 |
| 158 | )];| TRUE | evaluated 1390451 times by 1 test | | FALSE | evaluated 83827321 times by 1 test |
never executed: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)sc )]; __res; })) | TRUE | evaluated 1390451 times by 1 test | | FALSE | evaluated 83827321 times by 1 test |
| 0-83827321 |
| 159 | : ((unsigned char)sc)) : ((unsigned char)sc)) != (unsigned char)c| TRUE | evaluated 1390451 times by 1 test | | FALSE | evaluated 83827321 times by 1 test |
) | 1390451-83827321 |
| 160 | returnexecuted 1390451 times by 1 test: return 1; 1;executed 1390451 times by 1 test: return 1; | 1390451 |
| 161 | break;executed 83827321 times by 1 test: break; | 83827321 |
| 162 | | - |
| 163 | caseexecuted 4904304 times by 1 test: case '*': '*':executed 4904304 times by 1 test: case '*': | 4904304 |
| 164 | | - |
| 165 | | - |
| 166 | if (ends != | TRUE | evaluated 59159 times by 1 test | | FALSE | evaluated 4845145 times by 1 test |
| 59159-4845145 |
| 167 | ((void *)0)| TRUE | evaluated 59159 times by 1 test | | FALSE | evaluated 4845145 times by 1 test |
| 59159-4845145 |
| 168 | ) | - |
| 169 | { | - |
| 170 | ends->pattern = p - 1; | - |
| 171 | ends->string = n; | - |
| 172 | returnexecuted 59159 times by 1 test: return (0); (0);executed 59159 times by 1 test: return (0); | 59159 |
| 173 | } | - |
| 174 | | - |
| 175 | if ((| TRUE | evaluated 24186 times by 1 test | | FALSE | evaluated 4820959 times by 1 test |
flags & (1 << 2))| TRUE | evaluated 24186 times by 1 test | | FALSE | evaluated 4820959 times by 1 test |
&& sc == '.'| TRUE | evaluated 9 times by 1 test | | FALSE | evaluated 24177 times by 1 test |
&& | 9-4820959 |
| 176 | (n == string| TRUE | evaluated 7 times by 1 test | | FALSE | evaluated 2 times by 1 test |
|| ((| TRUE | evaluated 2 times by 1 test | | FALSE | never evaluated |
flags & (1 << 0))| TRUE | evaluated 2 times by 1 test | | FALSE | never evaluated |
&& n[-1] == '/'| TRUE | never evaluated | | FALSE | evaluated 2 times by 1 test |
))) | 0-7 |
| 177 | | - |
| 178 | | - |
| 179 | | - |
| 180 | returnexecuted 7 times by 1 test: return 1; 1;executed 7 times by 1 test: return 1; | 7 |
| 181 | | - |
| 182 | if (p == pe| TRUE | evaluated 4757910 times by 1 test | | FALSE | evaluated 87228 times by 1 test |
) | 87228-4757910 |
| 183 | returnexecuted 4757910 times by 1 test: return 0; 0;executed 4757910 times by 1 test: return 0; | 4757910 |
| 184 | | - |
| 185 | | - |
| 186 | | - |
| 187 | for (c = *p++; (c == '?'| TRUE | evaluated 2811 times by 1 test | | FALSE | evaluated 87222 times by 1 test |
|| c == '*'| TRUE | evaluated 407 times by 1 test | | FALSE | evaluated 86815 times by 1 test |
); c = *p++) | 407-87222 |
| 188 | { | - |
| 189 | if ((| TRUE | evaluated 6 times by 1 test | | FALSE | evaluated 3212 times by 1 test |
flags & (1 << 0))| TRUE | evaluated 6 times by 1 test | | FALSE | evaluated 3212 times by 1 test |
&& sc == '/'| TRUE | never evaluated | | FALSE | evaluated 6 times by 1 test |
) | 0-3212 |
| 190 | | - |
| 191 | return never executed: return 1; 1;never executed: return 1; | 0 |
| 192 | | - |
| 193 | else if ((| TRUE | evaluated 19 times by 1 test | | FALSE | evaluated 3199 times by 1 test |
flags & (1 << 5))| TRUE | evaluated 19 times by 1 test | | FALSE | evaluated 3199 times by 1 test |
&& c == '?'| TRUE | evaluated 6 times by 1 test | | FALSE | evaluated 13 times by 1 test |
&& *| TRUE | evaluated 6 times by 1 test | | FALSE | never evaluated |
p == '('| TRUE | evaluated 6 times by 1 test | | FALSE | never evaluated |
) | 0-3199 |
| 194 | { | - |
| 195 | unsigned char *newn; | - |
| 196 | | - |
| 197 | | - |
| 198 | if (extmatch (c, n, se, p, pe, flags) == 0| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 5 times by 1 test |
) | 1-5 |
| 199 | returnexecuted 1 time by 1 test: return (0); (0);executed 1 time by 1 test: return (0); | 1 |
| 200 | | - |
| 201 | | - |
| 202 | | - |
| 203 | | - |
| 204 | | - |
| 205 | newn = glob_patscan (p + 1, pe, 0); | - |
| 206 | | - |
| 207 | p = newn| TRUE | evaluated 5 times by 1 test | | FALSE | never evaluated |
? newn : pe; | 0-5 |
| 208 | }executed 5 times by 1 test: end of block | 5 |
| 209 | | - |
| 210 | else if (c == '?'| TRUE | evaluated 2805 times by 1 test | | FALSE | evaluated 407 times by 1 test |
) | 407-2805 |
| 211 | { | - |
| 212 | if (sc == '\0'| TRUE | evaluated 5 times by 1 test | | FALSE | evaluated 2800 times by 1 test |
) | 5-2800 |
| 213 | returnexecuted 5 times by 1 test: return 1; 1;executed 5 times by 1 test: return 1; | 5 |
| 214 | | - |
| 215 | | - |
| 216 | | - |
| 217 | n++; | - |
| 218 | sc = n < se| TRUE | evaluated 2721 times by 1 test | | FALSE | evaluated 79 times by 1 test |
? *n : '\0'; | 79-2721 |
| 219 | }executed 2800 times by 1 test: end of block | 2800 |
| 220 | | - |
| 221 | | - |
| 222 | | - |
| 223 | if ((| TRUE | evaluated 18 times by 1 test | | FALSE | evaluated 3194 times by 1 test |
flags & (1 << 5))| TRUE | evaluated 18 times by 1 test | | FALSE | evaluated 3194 times by 1 test |
&& c == '*'| TRUE | evaluated 13 times by 1 test | | FALSE | evaluated 5 times by 1 test |
&& *| TRUE | evaluated 8 times by 1 test | | FALSE | evaluated 5 times by 1 test |
p == '('| TRUE | evaluated 8 times by 1 test | | FALSE | evaluated 5 times by 1 test |
) | 5-3194 |
| 224 | { | - |
| 225 | unsigned char *newn; | - |
| 226 | | - |
| 227 | | - |
| 228 | | - |
| 229 | for (newn = n; newn < se| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 3 times by 1 test |
; ++newn) | 3-16 |
| 230 | { | - |
| 231 | if (extmatch (c, newn, se, p, pe, flags) == 0| TRUE | evaluated 5 times by 1 test | | FALSE | evaluated 11 times by 1 test |
) | 5-11 |
| 232 | returnexecuted 5 times by 1 test: return (0); (0);executed 5 times by 1 test: return (0); | 5 |
| 233 | }executed 11 times by 1 test: end of block | 11 |
| 234 | | - |
| 235 | | - |
| 236 | | - |
| 237 | | - |
| 238 | newn = glob_patscan (p + 1, pe, 0); | - |
| 239 | | - |
| 240 | p = newn| TRUE | evaluated 3 times by 1 test | | FALSE | never evaluated |
? newn : pe; | 0-3 |
| 241 | }executed 3 times by 1 test: end of block | 3 |
| 242 | | - |
| 243 | if (p == pe| TRUE | evaluated 402 times by 1 test | | FALSE | evaluated 2805 times by 1 test |
) | 402-2805 |
| 244 | break;executed 402 times by 1 test: break; | 402 |
| 245 | }executed 2805 times by 1 test: end of block | 2805 |
| 246 | | - |
| 247 | | - |
| 248 | | - |
| 249 | | - |
| 250 | if (c == '\0'| TRUE | never evaluated | | FALSE | evaluated 87217 times by 1 test |
) | 0-87217 |
| 251 | { | - |
| 252 | int r = (| TRUE | never evaluated | | FALSE | never evaluated |
flags & (1 << 0)) == 0| TRUE | never evaluated | | FALSE | never evaluated |
? 0 : 1; | 0 |
| 253 | if (flags & (1 << 0)| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 254 | { | - |
| 255 | if (flags & (1 << 3)| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 256 | r = 0; never executed: r = 0; | 0 |
| 257 | else if (memchr((n), ('/'), (se - n)) == | TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 258 | ((void *)0)| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 259 | ) | - |
| 260 | r = 0; never executed: r = 0; | 0 |
| 261 | } never executed: end of block | 0 |
| 262 | return never executed: return r; r;never executed: return r; | 0 |
| 263 | } | - |
| 264 | | - |
| 265 | | - |
| 266 | | - |
| 267 | | - |
| 268 | if (p == pe| TRUE | evaluated 7686 times by 1 test | | FALSE | evaluated 79531 times by 1 test |
&& (c == '?'| TRUE | evaluated 149 times by 1 test | | FALSE | evaluated 7537 times by 1 test |
|| c == '*'| TRUE | evaluated 253 times by 1 test | | FALSE | evaluated 7284 times by 1 test |
)) | 149-79531 |
| 269 | returnexecuted 402 times by 1 test: return (0); (0);executed 402 times by 1 test: return (0); | 402 |
| 270 | | - |
| 271 | | - |
| 272 | | - |
| 273 | | - |
| 274 | if (n == se| TRUE | evaluated 86 times by 1 test | | FALSE | evaluated 86729 times by 1 test |
&& ((| TRUE | evaluated 66 times by 1 test | | FALSE | evaluated 20 times by 1 test |
flags & (1 << 5))| TRUE | evaluated 66 times by 1 test | | FALSE | evaluated 20 times by 1 test |
&& (c == '!'| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 65 times by 1 test |
|| c == '?'| TRUE | never evaluated | | FALSE | evaluated 65 times by 1 test |
) && *| TRUE | evaluated 1 time by 1 test | | FALSE | never evaluated |
p == '('| TRUE | evaluated 1 time by 1 test | | FALSE | never evaluated |
)) | 0-86729 |
| 275 | { | - |
| 276 | --p; | - |
| 277 | if (extmatch (c, n, se, p, pe, flags) == 0| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
| 278 | return never executed: return (c == '!' ? 1 : 0); (c == '!' ? 1 : 0);never executed: return (c == '!' ? 1 : 0); | 0 |
| 279 | returnexecuted 1 time by 1 test: return (c == '!' ? 0 : 1); (c == '!' ? 0 : 1);executed 1 time by 1 test: return (c == '!' ? 0 : 1); | 1 |
| 280 | } | - |
| 281 | | - |
| 282 | | - |
| 283 | | - |
| 284 | | - |
| 285 | | - |
| 286 | | - |
| 287 | if (c == '/'| TRUE | evaluated 55 times by 1 test | | FALSE | evaluated 86759 times by 1 test |
&& (| TRUE | never evaluated | | FALSE | evaluated 55 times by 1 test |
flags & (1 << 0))| TRUE | never evaluated | | FALSE | evaluated 55 times by 1 test |
) | 0-86759 |
| 288 | { | - |
| 289 | while (n < se| TRUE | never evaluated | | FALSE | never evaluated |
&& *| TRUE | never evaluated | | FALSE | never evaluated |
n != '/'| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 290 | ++ never executed: ++n; n;never executed: ++n; | 0 |
| 291 | if (n < se| TRUE | never evaluated | | FALSE | never evaluated |
&& *| TRUE | never evaluated | | FALSE | never evaluated |
n == '/'| TRUE | never evaluated | | FALSE | never evaluated |
&& (| TRUE | never evaluated | | FALSE | never evaluated |
gmatch (n+1, se, p, pe, | TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 292 | ((void *)0)| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 293 | , flags) == 0)| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 294 | return never executed: return 0; 0;never executed: return 0; | 0 |
| 295 | return never executed: return 1; 1;never executed: return 1; | 0 |
| 296 | } | - |
| 297 | | - |
| 298 | | - |
| 299 | { | - |
| 300 | unsigned char c1; | - |
| 301 | const unsigned char *endp; | - |
| 302 | struct smat_struct end; | - |
| 303 | | - |
| 304 | end.pattern = | - |
| 305 | ((void *)0) | - |
| 306 | ; | - |
| 307 | endp = memchr((n), ((flags & (1 << 0)) ? '/' : '\0'), (se - n)); | - |
| 308 | if (endp == 0| TRUE | evaluated 86814 times by 1 test | | FALSE | never evaluated |
) | 0-86814 |
| 309 | endp = se;executed 86814 times by 1 test: endp = se; | 86814 |
| 310 | | - |
| 311 | c1 = ((| TRUE | evaluated 86814 times by 1 test | | FALSE | never evaluated |
flags & (1 << 1)) == 0| TRUE | evaluated 86814 times by 1 test | | FALSE | never evaluated |
&& c == '\\'| TRUE | evaluated 330 times by 1 test | | FALSE | evaluated 86484 times by 1 test |
) ? *p : c; | 0-86814 |
| 312 | c1 = ((| TRUE | evaluated 20 times by 1 test | | FALSE | evaluated 86794 times by 1 test |
flags & (1 << 4))| TRUE | evaluated 20 times by 1 test | | FALSE | evaluated 86794 times by 1 test |
? ((1 && | 20-86794 |
| 313 | ((*| TRUE | evaluated 8 times by 1 test | | FALSE | evaluated 12 times by 1 test |
__ctype_b_loc ())[(int) ((| TRUE | evaluated 8 times by 1 test | | FALSE | evaluated 12 times by 1 test |
| 8-12 |
| 314 | (unsigned char)(unsigned char)c1| TRUE | evaluated 8 times by 1 test | | FALSE | evaluated 12 times by 1 test |
| 8-12 |
| 315 | ))] & (unsigned short int) _ISupper)| TRUE | evaluated 8 times by 1 test | | FALSE | evaluated 12 times by 1 test |
| 8-12 |
| 316 | ) ? | - |
| 317 | (__extension__ ({ int __res; if (sizeof (| TRUE | never evaluated | | FALSE | evaluated 8 times by 1 test |
| 0-8 |
| 318 | (unsigned char)c1| TRUE | never evaluated | | FALSE | evaluated 8 times by 1 test |
| 0-8 |
| 319 | ) > 1| TRUE | never evaluated | | FALSE | evaluated 8 times by 1 test |
) { if (__builtin_constant_p (| TRUE | never evaluated | | FALSE | never evaluated |
| 0-8 |
| 320 | (unsigned char)c1| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 321 | )| TRUE | never evaluated | | FALSE | never evaluated |
) { int __c = ( | 0 |
| 322 | (unsigned char)c1 | - |
| 323 | ); __res = __c < -128| TRUE | never evaluated | | FALSE | never evaluated |
|| __c > 255| TRUE | never evaluated | | FALSE | never evaluated |
? __c : (*__ctype_tolower_loc ())[__c]; }never executed: end of block else __res = tolower (never executed: __res = tolower ( (unsigned char)c1 ); | 0 |
| 324 | (unsigned char)c1 never executed: __res = tolower ( (unsigned char)c1 ); | 0 |
| 325 | ); never executed: __res = tolower ( (unsigned char)c1 ); } else __res = (*__ctype_tolower_loc ())[(int) (executed 8 times by 1 test: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)c1 )]; | 0-8 |
| 326 | (unsigned char)c1executed 8 times by 1 test: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)c1 )]; | 8 |
| 327 | )];executed 8 times by 1 test: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)c1 )]; __res; })) | 8 |
| 328 | : ((unsigned char)c1)) : ((unsigned char)c1)); | - |
| 329 | for (--p; n < endp| TRUE | evaluated 633708 times by 1 test | | FALSE | evaluated 27520 times by 1 test |
; ++n) | 27520-633708 |
| 330 | { | - |
| 331 | | - |
| 332 | | - |
| 333 | | - |
| 334 | if ((| TRUE | evaluated 630288 times by 1 test | | FALSE | evaluated 3420 times by 1 test |
flags & (1 << 5)) == 0| TRUE | evaluated 630288 times by 1 test | | FALSE | evaluated 3420 times by 1 test |
&& c != '['| TRUE | evaluated 486190 times by 1 test | | FALSE | evaluated 144098 times by 1 test |
&& ((| TRUE | evaluated 464082 times by 1 test | | FALSE | evaluated 22108 times by 1 test |
flags & (1 << 4)) ? ((1 && | TRUE | evaluated 464082 times by 1 test | | FALSE | evaluated 22108 times by 1 test |
| 14-630288 |
| 335 | ((*| TRUE | never evaluated | | FALSE | evaluated 14 times by 1 test |
__ctype_b_loc ())[(int) ((| TRUE | never evaluated | | FALSE | evaluated 14 times by 1 test |
| TRUE | evaluated 464082 times by 1 test | | FALSE | evaluated 22108 times by 1 test |
| 0-464082 |
| 336 | (unsigned char)(unsigned char)*n| TRUE | never evaluated | | FALSE | evaluated 14 times by 1 test |
| TRUE | evaluated 464082 times by 1 test | | FALSE | evaluated 22108 times by 1 test |
| 0-464082 |
| 337 | ))] & (unsigned short int) _ISupper)| TRUE | never evaluated | | FALSE | evaluated 14 times by 1 test |
| TRUE | evaluated 464082 times by 1 test | | FALSE | evaluated 22108 times by 1 test |
| 0-464082 |
| 338 | ) ? | TRUE | evaluated 464082 times by 1 test | | FALSE | evaluated 22108 times by 1 test |
| 22108-464082 |
| 339 | (__extension__ ({ int __res; if (sizeof (| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | evaluated 464082 times by 1 test | | FALSE | evaluated 22108 times by 1 test |
| 0-464082 |
| 340 | (unsigned char)*n| TRUE | evaluated 464082 times by 1 test | | FALSE | evaluated 22108 times by 1 test |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0-464082 |
| 341 | ) > 1| TRUE | evaluated 464082 times by 1 test | | FALSE | evaluated 22108 times by 1 test |
| TRUE | never evaluated | | FALSE | never evaluated |
) { if (__builtin_constant_p (| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | evaluated 464082 times by 1 test | | FALSE | evaluated 22108 times by 1 test |
| 0-464082 |
| 342 | (unsigned char)*n| TRUE | evaluated 464082 times by 1 test | | FALSE | evaluated 22108 times by 1 test |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0-464082 |
| 343 | )| TRUE | evaluated 464082 times by 1 test | | FALSE | evaluated 22108 times by 1 test |
| TRUE | never evaluated | | FALSE | never evaluated |
) { int __c = (| TRUE | evaluated 464082 times by 1 test | | FALSE | evaluated 22108 times by 1 test |
| 0-464082 |
| 344 | (unsigned char)*n| TRUE | evaluated 464082 times by 1 test | | FALSE | evaluated 22108 times by 1 test |
| 22108-464082 |
| 345 | ); __res = __c < -128| TRUE | never evaluated | | FALSE | never evaluated |
|| __c > 255| TRUE | never evaluated | | FALSE | never evaluated |
? __c : (*__ctype_tolower_loc ())[__c]; }never executed: end of block else __res = tolower (never executed: __res = tolower ( (unsigned char)*n ); | TRUE | evaluated 464082 times by 1 test | | FALSE | evaluated 22108 times by 1 test |
| 0-464082 |
| 346 | (unsigned char)*n| TRUE | evaluated 464082 times by 1 test | | FALSE | evaluated 22108 times by 1 test |
never executed: __res = tolower ( (unsigned char)*n ); | 0-464082 |
| 347 | );| TRUE | evaluated 464082 times by 1 test | | FALSE | evaluated 22108 times by 1 test |
never executed: __res = tolower ( (unsigned char)*n ); } else __res = (*__ctype_tolower_loc ())[(int) (never executed: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)*n )]; | TRUE | evaluated 464082 times by 1 test | | FALSE | evaluated 22108 times by 1 test |
| 0-464082 |
| 348 | (unsigned char)*n| TRUE | evaluated 464082 times by 1 test | | FALSE | evaluated 22108 times by 1 test |
never executed: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)*n )]; | 0-464082 |
| 349 | )];| TRUE | evaluated 464082 times by 1 test | | FALSE | evaluated 22108 times by 1 test |
never executed: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)*n )]; __res; })) | TRUE | evaluated 464082 times by 1 test | | FALSE | evaluated 22108 times by 1 test |
| 0-464082 |
| 350 | : ((unsigned char)*n)) : ((unsigned char)*n)) != c1| TRUE | evaluated 464082 times by 1 test | | FALSE | evaluated 22108 times by 1 test |
) | 22108-464082 |
| 351 | continue;executed 464082 times by 1 test: continue; | 464082 |
| 352 | | - |
| 353 | | - |
| 354 | | - |
| 355 | | - |
| 356 | if ((| TRUE | evaluated 3420 times by 1 test | | FALSE | evaluated 166206 times by 1 test |
flags & (1 << 5))| TRUE | evaluated 3420 times by 1 test | | FALSE | evaluated 166206 times by 1 test |
&& p[1] != '('| TRUE | evaluated 1012 times by 1 test | | FALSE | evaluated 2408 times by 1 test |
&& | 1012-166206 |
| 357 | | - |
| 358 | (| TRUE | evaluated 1012 times by 1 test | | FALSE | never evaluated |
__extension__ (__builtin_constant_p (| TRUE | never evaluated | | FALSE | evaluated 1012 times by 1 test |
| TRUE | evaluated 1012 times by 1 test | | FALSE | never evaluated |
| 0-1012 |
| 359 | (*p)| TRUE | never evaluated | | FALSE | evaluated 1012 times by 1 test |
| TRUE | evaluated 1012 times by 1 test | | FALSE | never evaluated |
| 0-1012 |
| 360 | )| TRUE | never evaluated | | FALSE | evaluated 1012 times by 1 test |
&& !__builtin_constant_p (| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | evaluated 1012 times by 1 test | | FALSE | never evaluated |
| 0-1012 |
| 361 | ("?*+@!")| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | evaluated 1012 times by 1 test | | FALSE | never evaluated |
| 0-1012 |
| 362 | )| TRUE | never evaluated | | FALSE | never evaluated |
&& (| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | evaluated 1012 times by 1 test | | FALSE | never evaluated |
| 0-1012 |
| 363 | (*p)| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | evaluated 1012 times by 1 test | | FALSE | never evaluated |
| 0-1012 |
| 364 | ) == '\0'| TRUE | never evaluated | | FALSE | never evaluated |
? (char *) __rawmemchr (| TRUE | evaluated 1012 times by 1 test | | FALSE | never evaluated |
| 0-1012 |
| 365 | ("?*+@!")| TRUE | evaluated 1012 times by 1 test | | FALSE | never evaluated |
| 0-1012 |
| 366 | , | TRUE | evaluated 1012 times by 1 test | | FALSE | never evaluated |
| 0-1012 |
| 367 | (*p)| TRUE | evaluated 1012 times by 1 test | | FALSE | never evaluated |
| 0-1012 |
| 368 | ) : __builtin_strchr (| TRUE | evaluated 1012 times by 1 test | | FALSE | never evaluated |
| 0-1012 |
| 369 | ("?*+@!")| TRUE | evaluated 1012 times by 1 test | | FALSE | never evaluated |
| 0-1012 |
| 370 | , | TRUE | evaluated 1012 times by 1 test | | FALSE | never evaluated |
| 0-1012 |
| 371 | (*p)| TRUE | evaluated 1012 times by 1 test | | FALSE | never evaluated |
| 0-1012 |
| 372 | ))) | TRUE | evaluated 1012 times by 1 test | | FALSE | never evaluated |
| 0-1012 |
| 373 | == 0| TRUE | evaluated 1012 times by 1 test | | FALSE | never evaluated |
&& c != '['| TRUE | evaluated 1012 times by 1 test | | FALSE | never evaluated |
&& ((| TRUE | never evaluated | | FALSE | evaluated 1012 times by 1 test |
| TRUE | evaluated 904 times by 1 test | | FALSE | evaluated 108 times by 1 test |
flags & (1 << 4))| TRUE | never evaluated | | FALSE | evaluated 1012 times by 1 test |
? ((1 && | TRUE | evaluated 904 times by 1 test | | FALSE | evaluated 108 times by 1 test |
| 0-1012 |
| 374 | ((*| TRUE | never evaluated | | FALSE | never evaluated |
__ctype_b_loc ())[(int) ((| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | evaluated 904 times by 1 test | | FALSE | evaluated 108 times by 1 test |
| 0-904 |
| 375 | (unsigned char)(unsigned char)*n| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | evaluated 904 times by 1 test | | FALSE | evaluated 108 times by 1 test |
| 0-904 |
| 376 | ))] & (unsigned short int) _ISupper)| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | evaluated 904 times by 1 test | | FALSE | evaluated 108 times by 1 test |
| 0-904 |
| 377 | ) ? | TRUE | evaluated 904 times by 1 test | | FALSE | evaluated 108 times by 1 test |
| 108-904 |
| 378 | (__extension__ ({ int __res; if (sizeof (| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | evaluated 904 times by 1 test | | FALSE | evaluated 108 times by 1 test |
| 0-904 |
| 379 | (unsigned char)*n| TRUE | evaluated 904 times by 1 test | | FALSE | evaluated 108 times by 1 test |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0-904 |
| 380 | ) > 1| TRUE | evaluated 904 times by 1 test | | FALSE | evaluated 108 times by 1 test |
| TRUE | never evaluated | | FALSE | never evaluated |
) { if (__builtin_constant_p (| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | evaluated 904 times by 1 test | | FALSE | evaluated 108 times by 1 test |
| 0-904 |
| 381 | (unsigned char)*n| TRUE | evaluated 904 times by 1 test | | FALSE | evaluated 108 times by 1 test |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0-904 |
| 382 | )| TRUE | evaluated 904 times by 1 test | | FALSE | evaluated 108 times by 1 test |
| TRUE | never evaluated | | FALSE | never evaluated |
) { int __c = (| TRUE | evaluated 904 times by 1 test | | FALSE | evaluated 108 times by 1 test |
| 0-904 |
| 383 | (unsigned char)*n| TRUE | evaluated 904 times by 1 test | | FALSE | evaluated 108 times by 1 test |
| 108-904 |
| 384 | ); __res = __c < -128| TRUE | never evaluated | | FALSE | never evaluated |
|| __c > 255| TRUE | never evaluated | | FALSE | never evaluated |
? __c : (*__ctype_tolower_loc ())[__c]; }never executed: end of block else __res = tolower (never executed: __res = tolower ( (unsigned char)*n ); | TRUE | evaluated 904 times by 1 test | | FALSE | evaluated 108 times by 1 test |
| 0-904 |
| 385 | (unsigned char)*n| TRUE | evaluated 904 times by 1 test | | FALSE | evaluated 108 times by 1 test |
never executed: __res = tolower ( (unsigned char)*n ); | 0-904 |
| 386 | );| TRUE | evaluated 904 times by 1 test | | FALSE | evaluated 108 times by 1 test |
never executed: __res = tolower ( (unsigned char)*n ); } else __res = (*__ctype_tolower_loc ())[(int) (never executed: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)*n )]; | TRUE | evaluated 904 times by 1 test | | FALSE | evaluated 108 times by 1 test |
| 0-904 |
| 387 | (unsigned char)*n| TRUE | evaluated 904 times by 1 test | | FALSE | evaluated 108 times by 1 test |
never executed: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)*n )]; | 0-904 |
| 388 | )];| TRUE | evaluated 904 times by 1 test | | FALSE | evaluated 108 times by 1 test |
never executed: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)*n )]; __res; })) | TRUE | evaluated 904 times by 1 test | | FALSE | evaluated 108 times by 1 test |
| 0-904 |
| 389 | : ((unsigned char)*n)) : ((unsigned char)*n)) != c1| TRUE | evaluated 904 times by 1 test | | FALSE | evaluated 108 times by 1 test |
) | 108-904 |
| 390 | continue;executed 904 times by 1 test: continue; | 904 |
| 391 | | - |
| 392 | | - |
| 393 | if (gmatch (n, se, p, pe, &end, flags & ~(1 << 2)) == 0| TRUE | evaluated 59294 times by 1 test | | FALSE | evaluated 109428 times by 1 test |
) | 59294-109428 |
| 394 | { | - |
| 395 | if (end.pattern == | TRUE | evaluated 135 times by 1 test | | FALSE | evaluated 59159 times by 1 test |
| 135-59159 |
| 396 | ((void *)0)| TRUE | evaluated 135 times by 1 test | | FALSE | evaluated 59159 times by 1 test |
| 135-59159 |
| 397 | ) | - |
| 398 | returnexecuted 135 times by 1 test: return (0); (0);executed 135 times by 1 test: return (0); | 135 |
| 399 | break;executed 59159 times by 1 test: break; | 59159 |
| 400 | } | - |
| 401 | }executed 109428 times by 1 test: end of block | 109428 |
| 402 | | - |
| 403 | | - |
| 404 | | - |
| 405 | | - |
| 406 | if (end.pattern != | TRUE | evaluated 59159 times by 1 test | | FALSE | evaluated 27520 times by 1 test |
| 27520-59159 |
| 407 | ((void *)0)| TRUE | evaluated 59159 times by 1 test | | FALSE | evaluated 27520 times by 1 test |
| 27520-59159 |
| 408 | ) | - |
| 409 | { | - |
| 410 | p = end.pattern; | - |
| 411 | n = end.string; | - |
| 412 | continue;executed 59159 times by 1 test: continue; | 59159 |
| 413 | } | - |
| 414 | | - |
| 415 | returnexecuted 27520 times by 1 test: return 1; 1;executed 27520 times by 1 test: return 1; | 27520 |
| 416 | } | - |
| 417 | | - |
| 418 | caseexecuted 280515 times by 1 test: case '[': '[':executed 280515 times by 1 test: case '[': | 280515 |
| 419 | { | - |
| 420 | if (sc == '\0'| TRUE | evaluated 191 times by 1 test | | FALSE | evaluated 280324 times by 1 test |
|| n == se| TRUE | never evaluated | | FALSE | evaluated 280324 times by 1 test |
) | 0-280324 |
| 421 | returnexecuted 191 times by 1 test: return 1; 1;executed 191 times by 1 test: return 1; | 191 |
| 422 | | - |
| 423 | | - |
| 424 | | - |
| 425 | | - |
| 426 | if ((| TRUE | evaluated 36812 times by 1 test | | FALSE | evaluated 243512 times by 1 test |
flags & (1 << 2))| TRUE | evaluated 36812 times by 1 test | | FALSE | evaluated 243512 times by 1 test |
&& sc == '.'| TRUE | evaluated 42 times by 1 test | | FALSE | evaluated 36770 times by 1 test |
&& | 42-243512 |
| 427 | (n == string| TRUE | never evaluated | | FALSE | evaluated 42 times by 1 test |
|| ((| TRUE | evaluated 42 times by 1 test | | FALSE | never evaluated |
flags & (1 << 0))| TRUE | evaluated 42 times by 1 test | | FALSE | never evaluated |
&& n[-1] == '/'| TRUE | never evaluated | | FALSE | evaluated 42 times by 1 test |
))) | 0-42 |
| 428 | return never executed: return (1); (1);never executed: return (1); | 0 |
| 429 | | - |
| 430 | p = brackmatch (p, sc, flags); | - |
| 431 | if (p == 0| TRUE | evaluated 103457 times by 1 test | | FALSE | evaluated 176867 times by 1 test |
) | 103457-176867 |
| 432 | returnexecuted 103457 times by 1 test: return 1; 1;executed 103457 times by 1 test: return 1; | 103457 |
| 433 | } | - |
| 434 | break;executed 176867 times by 1 test: break; | 176867 |
| 435 | | - |
| 436 | defaultexecuted 31160344 times by 1 test: default: :executed 31160344 times by 1 test: default: | 31160344 |
| 437 | if ((| TRUE | evaluated 14397023 times by 1 test | | FALSE | evaluated 16763321 times by 1 test |
unsigned char)c != ((| TRUE | evaluated 32 times by 1 test | | FALSE | evaluated 31160312 times by 1 test |
flags & (1 << 4))| TRUE | evaluated 32 times by 1 test | | FALSE | evaluated 31160312 times by 1 test |
? ((1 && | TRUE | evaluated 14397023 times by 1 test | | FALSE | evaluated 16763321 times by 1 test |
| 32-31160312 |
| 438 | ((*| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 31 times by 1 test |
__ctype_b_loc ())[(int) ((| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 31 times by 1 test |
| TRUE | evaluated 14397023 times by 1 test | | FALSE | evaluated 16763321 times by 1 test |
| 1-16763321 |
| 439 | (unsigned char)(unsigned char)sc| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 31 times by 1 test |
| TRUE | evaluated 14397023 times by 1 test | | FALSE | evaluated 16763321 times by 1 test |
| 1-16763321 |
| 440 | ))] & (unsigned short int) _ISupper)| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 31 times by 1 test |
| TRUE | evaluated 14397023 times by 1 test | | FALSE | evaluated 16763321 times by 1 test |
| 1-16763321 |
| 441 | ) ? | TRUE | evaluated 14397023 times by 1 test | | FALSE | evaluated 16763321 times by 1 test |
| 14397023-16763321 |
| 442 | (__extension__ ({ int __res; if (sizeof (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| TRUE | evaluated 14397023 times by 1 test | | FALSE | evaluated 16763321 times by 1 test |
| 0-16763321 |
| 443 | (unsigned char)sc| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| TRUE | evaluated 14397023 times by 1 test | | FALSE | evaluated 16763321 times by 1 test |
| 0-16763321 |
| 444 | ) > 1| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
) { if (__builtin_constant_p (| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | evaluated 14397023 times by 1 test | | FALSE | evaluated 16763321 times by 1 test |
| 0-16763321 |
| 445 | (unsigned char)sc| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | evaluated 14397023 times by 1 test | | FALSE | evaluated 16763321 times by 1 test |
| 0-16763321 |
| 446 | )| TRUE | never evaluated | | FALSE | never evaluated |
) { int __c = (| TRUE | evaluated 14397023 times by 1 test | | FALSE | evaluated 16763321 times by 1 test |
| 0-16763321 |
| 447 | (unsigned char)sc| TRUE | evaluated 14397023 times by 1 test | | FALSE | evaluated 16763321 times by 1 test |
| 14397023-16763321 |
| 448 | ); __res = __c < -128| TRUE | never evaluated | | FALSE | never evaluated |
|| __c > 255| TRUE | never evaluated | | FALSE | never evaluated |
? __c : (*__ctype_tolower_loc ())[__c]; }never executed: end of block else __res = tolower (never executed: __res = tolower ( (unsigned char)sc ); | TRUE | evaluated 14397023 times by 1 test | | FALSE | evaluated 16763321 times by 1 test |
| 0-16763321 |
| 449 | (unsigned char)sc| TRUE | evaluated 14397023 times by 1 test | | FALSE | evaluated 16763321 times by 1 test |
never executed: __res = tolower ( (unsigned char)sc ); | 0-16763321 |
| 450 | );| TRUE | evaluated 14397023 times by 1 test | | FALSE | evaluated 16763321 times by 1 test |
never executed: __res = tolower ( (unsigned char)sc ); } else __res = (*__ctype_tolower_loc ())[(int) (executed 1 time by 1 test: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)sc )]; | 0-16763321 |
| 451 | (unsigned char)sc| TRUE | evaluated 14397023 times by 1 test | | FALSE | evaluated 16763321 times by 1 test |
executed 1 time by 1 test: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)sc )]; | 1-16763321 |
| 452 | )]; __res; })) | TRUE | evaluated 14397023 times by 1 test | | FALSE | evaluated 16763321 times by 1 test |
| 1-16763321 |
| 453 | : ((unsigned char)sc)) : ((unsigned char)sc))| TRUE | evaluated 14397023 times by 1 test | | FALSE | evaluated 16763321 times by 1 test |
) | 14397023-16763321 |
| 454 | returnexecuted 14397023 times by 1 test: return (1); (1);executed 14397023 times by 1 test: return (1); | 14397023 |
| 455 | }executed 16763321 times by 1 test: end of block | 16763321 |
| 456 | | - |
| 457 | ++n; | - |
| 458 | }executed 100786373 times by 1 test: end of block | 100786373 |
| 459 | | - |
| 460 | if (n == se| TRUE | evaluated 23050972 times by 1 test | | FALSE | evaluated 5231239 times by 1 test |
) | 5231239-23050972 |
| 461 | returnexecuted 23050972 times by 1 test: return (0); (0);executed 23050972 times by 1 test: return (0); | 23050972 |
| 462 | | - |
| 463 | if ((| TRUE | never evaluated | | FALSE | evaluated 5231239 times by 1 test |
flags & (1 << 3))| TRUE | never evaluated | | FALSE | evaluated 5231239 times by 1 test |
&& *| TRUE | never evaluated | | FALSE | never evaluated |
n == '/'| TRUE | never evaluated | | FALSE | never evaluated |
) | 0-5231239 |
| 464 | | - |
| 465 | return never executed: return 0; 0;never executed: return 0; | 0 |
| 466 | | - |
| 467 | returnexecuted 5231239 times by 1 test: return (1); (1);executed 5231239 times by 1 test: return (1); | 5231239 |
| 468 | } | - |
| 469 | | - |
| 470 | | - |
| 471 | | - |
| 472 | | - |
| 473 | static unsigned char * | - |
| 474 | parse_collsym (p, vp) | - |
| 475 | unsigned char *p; | - |
| 476 | int *vp; | - |
| 477 | { | - |
| 478 | register int pc; | - |
| 479 | int val; | - |
| 480 | | - |
| 481 | p++; | - |
| 482 | | - |
| 483 | for (pc = 0; p[pc]| TRUE | evaluated 87 times by 1 test | | FALSE | never evaluated |
; pc++) | 0-87 |
| 484 | if (p[pc] == '.'| TRUE | evaluated 25 times by 1 test | | FALSE | evaluated 62 times by 1 test |
&& p[pc+1] == ']'| TRUE | evaluated 25 times by 1 test | | FALSE | never evaluated |
) | 0-62 |
| 485 | break;executed 25 times by 1 test: break; | 25 |
| 486 | if (p[pc] == 0| TRUE | never evaluated | | FALSE | evaluated 25 times by 1 test |
) | 0-25 |
| 487 | { | - |
| 488 | if (vp| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 489 | * never executed: *vp = -1; vp = -1;never executed: *vp = -1; | 0 |
| 490 | return never executed: return (p + pc); (p + pc);never executed: return (p + pc); | 0 |
| 491 | } | - |
| 492 | val = collsym (p, pc); | - |
| 493 | if (vp| TRUE | evaluated 25 times by 1 test | | FALSE | never evaluated |
) | 0-25 |
| 494 | *executed 25 times by 1 test: *vp = val; vp = val;executed 25 times by 1 test: *vp = val; | 25 |
| 495 | returnexecuted 25 times by 1 test: return (p + pc + 2); (p + pc + 2);executed 25 times by 1 test: return (p + pc + 2); | 25 |
| 496 | } | - |
| 497 | | - |
| 498 | | - |
| 499 | static unsigned char * | - |
| 500 | | - |
| 501 | brackmatch (unsigned char *p, unsigned char test, int flags) | - |
| 502 | | - |
| 503 | | - |
| 504 | | - |
| 505 | | - |
| 506 | | - |
| 507 | | - |
| 508 | { | - |
| 509 | register unsigned char cstart, cend, c; | - |
| 510 | register int not; | - |
| 511 | int brcnt, brchr, forcecoll; | - |
| 512 | int pc; | - |
| 513 | unsigned char *savep; | - |
| 514 | unsigned char orig_test; | - |
| 515 | | - |
| 516 | orig_test = test; | - |
| 517 | test = ((| TRUE | evaluated 48 times by 1 test | | FALSE | evaluated 280276 times by 1 test |
flags & (1 << 4))| TRUE | evaluated 48 times by 1 test | | FALSE | evaluated 280276 times by 1 test |
? ((1 && | 48-280276 |
| 518 | ((*| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 47 times by 1 test |
__ctype_b_loc ())[(int) ((| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 47 times by 1 test |
| 1-47 |
| 519 | (unsigned char)(unsigned char)orig_test| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 47 times by 1 test |
| 1-47 |
| 520 | ))] & (unsigned short int) _ISupper)| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 47 times by 1 test |
| 1-47 |
| 521 | ) ? | - |
| 522 | (__extension__ ({ int __res; if (sizeof (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 523 | (unsigned char)orig_test| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 524 | ) > 1| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
) { if (__builtin_constant_p (| TRUE | never evaluated | | FALSE | never evaluated |
| 0-1 |
| 525 | (unsigned char)orig_test| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 526 | )| TRUE | never evaluated | | FALSE | never evaluated |
) { int __c = ( | 0 |
| 527 | (unsigned char)orig_test | - |
| 528 | ); __res = __c < -128| TRUE | never evaluated | | FALSE | never evaluated |
|| __c > 255| TRUE | never evaluated | | FALSE | never evaluated |
? __c : (*__ctype_tolower_loc ())[__c]; }never executed: end of block else __res = tolower (never executed: __res = tolower ( (unsigned char)orig_test ); | 0 |
| 529 | (unsigned char)orig_test never executed: __res = tolower ( (unsigned char)orig_test ); | 0 |
| 530 | ); never executed: __res = tolower ( (unsigned char)orig_test ); } else __res = (*__ctype_tolower_loc ())[(int) (executed 1 time by 1 test: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)orig_test )]; | 0-1 |
| 531 | (unsigned char)orig_testexecuted 1 time by 1 test: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)orig_test )]; | 1 |
| 532 | )];executed 1 time by 1 test: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)orig_test )]; __res; })) | 1 |
| 533 | : ((unsigned char)orig_test)) : ((unsigned char)orig_test)); | - |
| 534 | | - |
| 535 | savep = p; | - |
| 536 | | - |
| 537 | | - |
| 538 | | - |
| 539 | | - |
| 540 | | - |
| 541 | if (not = (*| TRUE | evaluated 28638 times by 1 test | | FALSE | evaluated 251686 times by 1 test |
p == '!'| TRUE | evaluated 28638 times by 1 test | | FALSE | evaluated 251686 times by 1 test |
|| *| TRUE | evaluated 116838 times by 1 test | | FALSE | evaluated 134848 times by 1 test |
p == '^'| TRUE | evaluated 116838 times by 1 test | | FALSE | evaluated 134848 times by 1 test |
)) | 28638-251686 |
| 542 | ++executed 145476 times by 1 test: ++p; p;executed 145476 times by 1 test: ++p; | 145476 |
| 543 | | - |
| 544 | c = *p++; | - |
| 545 | for (;;) | - |
| 546 | { | - |
| 547 | | - |
| 548 | | - |
| 549 | cstart = cend = c; | - |
| 550 | forcecoll = 0; | - |
| 551 | | - |
| 552 | | - |
| 553 | | - |
| 554 | | - |
| 555 | | - |
| 556 | | - |
| 557 | if (c == '['| TRUE | evaluated 97129 times by 1 test | | FALSE | evaluated 273825 times by 1 test |
&& *| TRUE | evaluated 3 times by 1 test | | FALSE | evaluated 97126 times by 1 test |
p == '='| TRUE | evaluated 3 times by 1 test | | FALSE | evaluated 97126 times by 1 test |
&& p[2] == '='| TRUE | evaluated 3 times by 1 test | | FALSE | never evaluated |
&& p[3] == ']'| TRUE | evaluated 3 times by 1 test | | FALSE | never evaluated |
) | 0-273825 |
| 558 | { | - |
| 559 | pc = ((| TRUE | never evaluated | | FALSE | evaluated 3 times by 1 test |
flags & (1 << 4))| TRUE | never evaluated | | FALSE | evaluated 3 times by 1 test |
? ((1 && | 0-3 |
| 560 | ((*| TRUE | never evaluated | | FALSE | never evaluated |
__ctype_b_loc ())[(int) ((| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 561 | (unsigned char)(unsigned char)p[1]| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 562 | ))] & (unsigned short int) _ISupper)| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 563 | ) ? | - |
| 564 | (__extension__ ({ int __res; if (sizeof (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 565 | (unsigned char)p[1]| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 566 | ) > 1| TRUE | never evaluated | | FALSE | never evaluated |
) { if (__builtin_constant_p (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 567 | (unsigned char)p[1]| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 568 | )| TRUE | never evaluated | | FALSE | never evaluated |
) { int __c = ( | 0 |
| 569 | (unsigned char)p[1] | - |
| 570 | ); __res = __c < -128| TRUE | never evaluated | | FALSE | never evaluated |
|| __c > 255| TRUE | never evaluated | | FALSE | never evaluated |
? __c : (*__ctype_tolower_loc ())[__c]; }never executed: end of block else __res = tolower (never executed: __res = tolower ( (unsigned char)p[1] ); | 0 |
| 571 | (unsigned char)p[1] never executed: __res = tolower ( (unsigned char)p[1] ); | 0 |
| 572 | ); never executed: __res = tolower ( (unsigned char)p[1] ); } else __res = (*__ctype_tolower_loc ())[(int) (never executed: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)p[1] )]; | 0 |
| 573 | (unsigned char)p[1] never executed: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)p[1] )]; | 0 |
| 574 | )]; never executed: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)p[1] )]; __res; })) | 0 |
| 575 | : ((unsigned char)p[1])) : ((unsigned char)p[1])); | - |
| 576 | p += 4; | - |
| 577 | if (collequiv((test), (pc))| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 2 times by 1 test |
) | 1-2 |
| 578 | { | - |
| 579 | | - |
| 580 | | - |
| 581 | p++; | - |
| 582 | gotoexecuted 1 time by 1 test: goto matched; matched;executed 1 time by 1 test: goto matched; | 1 |
| 583 | } | - |
| 584 | else | - |
| 585 | { | - |
| 586 | c = *p++; | - |
| 587 | if (c == '\0'| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 1 time by 1 test |
) | 1 |
| 588 | returnexecuted 1 time by 1 test: return ((test == '[') ? savep : (unsigned char *)0); ((test == '[') ? savep : (unsigned char *)0);executed 1 time by 1 test: return ((test == '[') ? savep : (unsigned char *)0); | 1 |
| 589 | c = ((| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
flags & (1 << 4))| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
? ((1 && | 0-1 |
| 590 | ((*| TRUE | never evaluated | | FALSE | never evaluated |
__ctype_b_loc ())[(int) ((| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 591 | (unsigned char)(unsigned char)c| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 592 | ))] & (unsigned short int) _ISupper)| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 593 | ) ? | - |
| 594 | (__extension__ ({ int __res; if (sizeof (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 595 | (unsigned char)c| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 596 | ) > 1| TRUE | never evaluated | | FALSE | never evaluated |
) { if (__builtin_constant_p (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 597 | (unsigned char)c| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 598 | )| TRUE | never evaluated | | FALSE | never evaluated |
) { int __c = ( | 0 |
| 599 | (unsigned char)c | - |
| 600 | ); __res = __c < -128| TRUE | never evaluated | | FALSE | never evaluated |
|| __c > 255| TRUE | never evaluated | | FALSE | never evaluated |
? __c : (*__ctype_tolower_loc ())[__c]; }never executed: end of block else __res = tolower (never executed: __res = tolower ( (unsigned char)c ); | 0 |
| 601 | (unsigned char)c never executed: __res = tolower ( (unsigned char)c ); | 0 |
| 602 | ); never executed: __res = tolower ( (unsigned char)c ); } else __res = (*__ctype_tolower_loc ())[(int) (never executed: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)c )]; | 0 |
| 603 | (unsigned char)c never executed: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)c )]; | 0 |
| 604 | )]; never executed: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)c )]; __res; })) | 0 |
| 605 | : ((unsigned char)c)) : ((unsigned char)c)); | - |
| 606 | continue;executed 1 time by 1 test: continue; | 1 |
| 607 | } | - |
| 608 | } | - |
| 609 | | - |
| 610 | | - |
| 611 | if (c == '['| TRUE | evaluated 97126 times by 1 test | | FALSE | evaluated 273825 times by 1 test |
&& *| TRUE | evaluated 79317 times by 1 test | | FALSE | evaluated 17809 times by 1 test |
p == ':'| TRUE | evaluated 79317 times by 1 test | | FALSE | evaluated 17809 times by 1 test |
) | 17809-273825 |
| 612 | { | - |
| 613 | unsigned char *close, *ccname; | - |
| 614 | | - |
| 615 | pc = 0; | - |
| 616 | | - |
| 617 | for (close = p + 1; *| TRUE | evaluated 475915 times by 1 test | | FALSE | evaluated 14 times by 1 test |
close != '\0'| TRUE | evaluated 475915 times by 1 test | | FALSE | evaluated 14 times by 1 test |
; close++) | 14-475915 |
| 618 | if (*| TRUE | evaluated 79303 times by 1 test | | FALSE | evaluated 396612 times by 1 test |
close == ':'| TRUE | evaluated 79303 times by 1 test | | FALSE | evaluated 396612 times by 1 test |
&& *(| TRUE | evaluated 79303 times by 1 test | | FALSE | never evaluated |
close+1) == ']'| TRUE | evaluated 79303 times by 1 test | | FALSE | never evaluated |
) | 0-396612 |
| 619 | break;executed 79303 times by 1 test: break; | 79303 |
| 620 | | - |
| 621 | if (*| TRUE | evaluated 79303 times by 1 test | | FALSE | evaluated 14 times by 1 test |
close != '\0'| TRUE | evaluated 79303 times by 1 test | | FALSE | evaluated 14 times by 1 test |
) | 14-79303 |
| 622 | { | - |
| 623 | ccname = (unsigned char *)malloc ((close - p) * sizeof (unsigned char)); | - |
| 624 | if (ccname == 0| TRUE | never evaluated | | FALSE | evaluated 79303 times by 1 test |
) | 0-79303 |
| 625 | pc = 0; never executed: pc = 0; | 0 |
| 626 | else | - |
| 627 | { | - |
| 628 | bcopy (p + 1, ccname, (close - p - 1) * sizeof (unsigned char)); | - |
| 629 | *(ccname + (close - p - 1)) = '\0'; | - |
| 630 | pc = is_cclass((orig_test), ((char *)ccname)); | - |
| 631 | }executed 79303 times by 1 test: end of block | 79303 |
| 632 | if (pc == -1| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 79302 times by 1 test |
) | 1-79302 |
| 633 | pc = 0;executed 1 time by 1 test: pc = 0; | 1 |
| 634 | else | - |
| 635 | p = close + 2;executed 79302 times by 1 test: p = close + 2; | 79302 |
| 636 | | - |
| 637 | sh_xfree((ccname), "sm_loop.c", 465); | - |
| 638 | }executed 79303 times by 1 test: end of block | 79303 |
| 639 | | - |
| 640 | if (pc| TRUE | evaluated 71222 times by 1 test | | FALSE | evaluated 8095 times by 1 test |
) | 8095-71222 |
| 641 | { | - |
| 642 | | - |
| 643 | | - |
| 644 | p++; | - |
| 645 | gotoexecuted 71222 times by 1 test: goto matched; matched;executed 71222 times by 1 test: goto matched; | 71222 |
| 646 | } | - |
| 647 | else | - |
| 648 | { | - |
| 649 | | - |
| 650 | | - |
| 651 | c = *p++; | - |
| 652 | if (c == '\0'| TRUE | never evaluated | | FALSE | evaluated 8095 times by 1 test |
) | 0-8095 |
| 653 | return never executed: return ((test == '[') ? savep : (unsigned char *)0); ((test == '[') ? savep : (unsigned char *)0);never executed: return ((test == '[') ? savep : (unsigned char *)0); | 0 |
| 654 | else if (c == ']'| TRUE | evaluated 4067 times by 1 test | | FALSE | evaluated 4028 times by 1 test |
) | 4028-4067 |
| 655 | break;executed 4067 times by 1 test: break; | 4067 |
| 656 | c = ((| TRUE | never evaluated | | FALSE | evaluated 4028 times by 1 test |
flags & (1 << 4))| TRUE | never evaluated | | FALSE | evaluated 4028 times by 1 test |
? ((1 && | 0-4028 |
| 657 | ((*| TRUE | never evaluated | | FALSE | never evaluated |
__ctype_b_loc ())[(int) ((| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 658 | (unsigned char)(unsigned char)c| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 659 | ))] & (unsigned short int) _ISupper)| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 660 | ) ? | - |
| 661 | (__extension__ ({ int __res; if (sizeof (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 662 | (unsigned char)c| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 663 | ) > 1| TRUE | never evaluated | | FALSE | never evaluated |
) { if (__builtin_constant_p (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 664 | (unsigned char)c| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 665 | )| TRUE | never evaluated | | FALSE | never evaluated |
) { int __c = ( | 0 |
| 666 | (unsigned char)c | - |
| 667 | ); __res = __c < -128| TRUE | never evaluated | | FALSE | never evaluated |
|| __c > 255| TRUE | never evaluated | | FALSE | never evaluated |
? __c : (*__ctype_tolower_loc ())[__c]; }never executed: end of block else __res = tolower (never executed: __res = tolower ( (unsigned char)c ); | 0 |
| 668 | (unsigned char)c never executed: __res = tolower ( (unsigned char)c ); | 0 |
| 669 | ); never executed: __res = tolower ( (unsigned char)c ); } else __res = (*__ctype_tolower_loc ())[(int) (never executed: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)c )]; | 0 |
| 670 | (unsigned char)c never executed: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)c )]; | 0 |
| 671 | )]; never executed: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)c )]; __res; })) | 0 |
| 672 | : ((unsigned char)c)) : ((unsigned char)c)); | - |
| 673 | continue;executed 4028 times by 1 test: continue; | 4028 |
| 674 | } | - |
| 675 | } | - |
| 676 | | - |
| 677 | | - |
| 678 | | - |
| 679 | | - |
| 680 | | - |
| 681 | if (c == '['| TRUE | evaluated 17809 times by 1 test | | FALSE | evaluated 273825 times by 1 test |
&& *| TRUE | evaluated 19 times by 1 test | | FALSE | evaluated 17790 times by 1 test |
p == '.'| TRUE | evaluated 19 times by 1 test | | FALSE | evaluated 17790 times by 1 test |
) | 19-273825 |
| 682 | { | - |
| 683 | p = parse_collsym (p, &pc); | - |
| 684 | | - |
| 685 | | - |
| 686 | | - |
| 687 | cstart = (| TRUE | evaluated 6 times by 1 test | | FALSE | evaluated 13 times by 1 test |
pc == -1)| TRUE | evaluated 6 times by 1 test | | FALSE | evaluated 13 times by 1 test |
? test + 1 : pc; | 6-13 |
| 688 | forcecoll = 1; | - |
| 689 | }executed 19 times by 1 test: end of block | 19 |
| 690 | | - |
| 691 | if (!(flags & (1 << 1))| TRUE | evaluated 291634 times by 1 test | | FALSE | never evaluated |
&& c == '\\'| TRUE | evaluated 343 times by 1 test | | FALSE | evaluated 291291 times by 1 test |
) | 0-291634 |
| 692 | { | - |
| 693 | if (*| TRUE | never evaluated | | FALSE | evaluated 343 times by 1 test |
p == '\0'| TRUE | never evaluated | | FALSE | evaluated 343 times by 1 test |
) | 0-343 |
| 694 | return never executed: return (unsigned char *)0; (unsigned char *)0;never executed: return (unsigned char *)0; | 0 |
| 695 | cstart = cend = *p++; | - |
| 696 | }executed 343 times by 1 test: end of block | 343 |
| 697 | | - |
| 698 | cstart = cend = ((| TRUE | evaluated 68 times by 1 test | | FALSE | evaluated 291566 times by 1 test |
flags & (1 << 4))| TRUE | evaluated 68 times by 1 test | | FALSE | evaluated 291566 times by 1 test |
? ((1 && | 68-291566 |
| 699 | ((*| TRUE | evaluated 14 times by 1 test | | FALSE | evaluated 54 times by 1 test |
__ctype_b_loc ())[(int) ((| TRUE | evaluated 14 times by 1 test | | FALSE | evaluated 54 times by 1 test |
| 14-54 |
| 700 | (unsigned char)(unsigned char)cstart| TRUE | evaluated 14 times by 1 test | | FALSE | evaluated 54 times by 1 test |
| 14-54 |
| 701 | ))] & (unsigned short int) _ISupper)| TRUE | evaluated 14 times by 1 test | | FALSE | evaluated 54 times by 1 test |
| 14-54 |
| 702 | ) ? | - |
| 703 | (__extension__ ({ int __res; if (sizeof (| TRUE | never evaluated | | FALSE | evaluated 14 times by 1 test |
| 0-14 |
| 704 | (unsigned char)cstart| TRUE | never evaluated | | FALSE | evaluated 14 times by 1 test |
| 0-14 |
| 705 | ) > 1| TRUE | never evaluated | | FALSE | evaluated 14 times by 1 test |
) { if (__builtin_constant_p (| TRUE | never evaluated | | FALSE | never evaluated |
| 0-14 |
| 706 | (unsigned char)cstart| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 707 | )| TRUE | never evaluated | | FALSE | never evaluated |
) { int __c = ( | 0 |
| 708 | (unsigned char)cstart | - |
| 709 | ); __res = __c < -128| TRUE | never evaluated | | FALSE | never evaluated |
|| __c > 255| TRUE | never evaluated | | FALSE | never evaluated |
? __c : (*__ctype_tolower_loc ())[__c]; }never executed: end of block else __res = tolower (never executed: __res = tolower ( (unsigned char)cstart ); | 0 |
| 710 | (unsigned char)cstart never executed: __res = tolower ( (unsigned char)cstart ); | 0 |
| 711 | ); never executed: __res = tolower ( (unsigned char)cstart ); } else __res = (*__ctype_tolower_loc ())[(int) (executed 14 times by 1 test: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)cstart )]; | 0-14 |
| 712 | (unsigned char)cstartexecuted 14 times by 1 test: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)cstart )]; | 14 |
| 713 | )];executed 14 times by 1 test: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)cstart )]; __res; })) | 14 |
| 714 | : ((unsigned char)cstart)) : ((unsigned char)cstart)); | - |
| 715 | | - |
| 716 | | - |
| 717 | | - |
| 718 | | - |
| 719 | | - |
| 720 | | - |
| 721 | if (c == '\0'| TRUE | evaluated 2 times by 1 test | | FALSE | evaluated 291632 times by 1 test |
) | 2-291632 |
| 722 | returnexecuted 2 times by 1 test: return ((test == '[') ? savep : (unsigned char *)0); ((test == '[') ? savep : (unsigned char *)0);executed 2 times by 1 test: return ((test == '[') ? savep : (unsigned char *)0); | 2 |
| 723 | | - |
| 724 | c = *p++; | - |
| 725 | c = ((| TRUE | evaluated 68 times by 1 test | | FALSE | evaluated 291564 times by 1 test |
flags & (1 << 4))| TRUE | evaluated 68 times by 1 test | | FALSE | evaluated 291564 times by 1 test |
? ((1 && | 68-291564 |
| 726 | ((*| TRUE | evaluated 28 times by 1 test | | FALSE | evaluated 40 times by 1 test |
__ctype_b_loc ())[(int) ((| TRUE | evaluated 28 times by 1 test | | FALSE | evaluated 40 times by 1 test |
| 28-40 |
| 727 | (unsigned char)(unsigned char)c| TRUE | evaluated 28 times by 1 test | | FALSE | evaluated 40 times by 1 test |
| 28-40 |
| 728 | ))] & (unsigned short int) _ISupper)| TRUE | evaluated 28 times by 1 test | | FALSE | evaluated 40 times by 1 test |
| 28-40 |
| 729 | ) ? | - |
| 730 | (__extension__ ({ int __res; if (sizeof (| TRUE | never evaluated | | FALSE | evaluated 28 times by 1 test |
| 0-28 |
| 731 | (unsigned char)c| TRUE | never evaluated | | FALSE | evaluated 28 times by 1 test |
| 0-28 |
| 732 | ) > 1| TRUE | never evaluated | | FALSE | evaluated 28 times by 1 test |
) { if (__builtin_constant_p (| TRUE | never evaluated | | FALSE | never evaluated |
| 0-28 |
| 733 | (unsigned char)c| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 734 | )| TRUE | never evaluated | | FALSE | never evaluated |
) { int __c = ( | 0 |
| 735 | (unsigned char)c | - |
| 736 | ); __res = __c < -128| TRUE | never evaluated | | FALSE | never evaluated |
|| __c > 255| TRUE | never evaluated | | FALSE | never evaluated |
? __c : (*__ctype_tolower_loc ())[__c]; }never executed: end of block else __res = tolower (never executed: __res = tolower ( (unsigned char)c ); | 0 |
| 737 | (unsigned char)c never executed: __res = tolower ( (unsigned char)c ); | 0 |
| 738 | ); never executed: __res = tolower ( (unsigned char)c ); } else __res = (*__ctype_tolower_loc ())[(int) (executed 28 times by 1 test: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)c )]; | 0-28 |
| 739 | (unsigned char)cexecuted 28 times by 1 test: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)c )]; | 28 |
| 740 | )];executed 28 times by 1 test: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)c )]; __res; })) | 28 |
| 741 | : ((unsigned char)c)) : ((unsigned char)c)); | - |
| 742 | | - |
| 743 | if (c == '\0'| TRUE | evaluated 513 times by 1 test | | FALSE | evaluated 291119 times by 1 test |
) | 513-291119 |
| 744 | returnexecuted 513 times by 1 test: return ((test == '[') ? savep : (unsigned char *)0); ((test == '[') ? savep : (unsigned char *)0);executed 513 times by 1 test: return ((test == '[') ? savep : (unsigned char *)0); | 513 |
| 745 | | - |
| 746 | if ((| TRUE | evaluated 69307 times by 1 test | | FALSE | evaluated 221812 times by 1 test |
flags & (1 << 0))| TRUE | evaluated 69307 times by 1 test | | FALSE | evaluated 221812 times by 1 test |
&& c == '/'| TRUE | never evaluated | | FALSE | evaluated 69307 times by 1 test |
) | 0-221812 |
| 747 | | - |
| 748 | return never executed: return (unsigned char *)0; (unsigned char *)0;never executed: return (unsigned char *)0; | 0 |
| 749 | | - |
| 750 | | - |
| 751 | | - |
| 752 | | - |
| 753 | if (c == '-'| TRUE | evaluated 38281 times by 1 test | | FALSE | evaluated 252838 times by 1 test |
&& *| TRUE | evaluated 38274 times by 1 test | | FALSE | evaluated 7 times by 1 test |
p != ']'| TRUE | evaluated 38274 times by 1 test | | FALSE | evaluated 7 times by 1 test |
) | 7-252838 |
| 754 | { | - |
| 755 | cend = *p++; | - |
| 756 | if (!(flags & (1 << 1))| TRUE | evaluated 38274 times by 1 test | | FALSE | never evaluated |
&& cend == '\\'| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 38273 times by 1 test |
) | 0-38274 |
| 757 | cend = *p++;executed 1 time by 1 test: cend = *p++; | 1 |
| 758 | if (cend == '\0'| TRUE | never evaluated | | FALSE | evaluated 38274 times by 1 test |
) | 0-38274 |
| 759 | return never executed: return (unsigned char *)0; (unsigned char *)0;never executed: return (unsigned char *)0; | 0 |
| 760 | if (cend == '['| TRUE | evaluated 6 times by 1 test | | FALSE | evaluated 38268 times by 1 test |
&& *| TRUE | evaluated 6 times by 1 test | | FALSE | never evaluated |
p == '.'| TRUE | evaluated 6 times by 1 test | | FALSE | never evaluated |
) | 0-38268 |
| 761 | { | - |
| 762 | p = parse_collsym (p, &pc); | - |
| 763 | | - |
| 764 | | - |
| 765 | | - |
| 766 | cend = (| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 5 times by 1 test |
pc == -1)| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 5 times by 1 test |
? test - 1 : pc; | 1-5 |
| 767 | forcecoll = 1; | - |
| 768 | }executed 6 times by 1 test: end of block | 6 |
| 769 | cend = ((| TRUE | never evaluated | | FALSE | evaluated 38274 times by 1 test |
flags & (1 << 4))| TRUE | never evaluated | | FALSE | evaluated 38274 times by 1 test |
? ((1 && | 0-38274 |
| 770 | ((*| TRUE | never evaluated | | FALSE | never evaluated |
__ctype_b_loc ())[(int) ((| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 771 | (unsigned char)(unsigned char)cend| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 772 | ))] & (unsigned short int) _ISupper)| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 773 | ) ? | - |
| 774 | (__extension__ ({ int __res; if (sizeof (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 775 | (unsigned char)cend| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 776 | ) > 1| TRUE | never evaluated | | FALSE | never evaluated |
) { if (__builtin_constant_p (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 777 | (unsigned char)cend| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 778 | )| TRUE | never evaluated | | FALSE | never evaluated |
) { int __c = ( | 0 |
| 779 | (unsigned char)cend | - |
| 780 | ); __res = __c < -128| TRUE | never evaluated | | FALSE | never evaluated |
|| __c > 255| TRUE | never evaluated | | FALSE | never evaluated |
? __c : (*__ctype_tolower_loc ())[__c]; }never executed: end of block else __res = tolower (never executed: __res = tolower ( (unsigned char)cend ); | 0 |
| 781 | (unsigned char)cend never executed: __res = tolower ( (unsigned char)cend ); | 0 |
| 782 | ); never executed: __res = tolower ( (unsigned char)cend ); } else __res = (*__ctype_tolower_loc ())[(int) (never executed: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)cend )]; | 0 |
| 783 | (unsigned char)cend never executed: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)cend )]; | 0 |
| 784 | )]; never executed: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)cend )]; __res; })) | 0 |
| 785 | : ((unsigned char)cend)) : ((unsigned char)cend)); | - |
| 786 | | - |
| 787 | c = *p++; | - |
| 788 | | - |
| 789 | | - |
| 790 | | - |
| 791 | | - |
| 792 | | - |
| 793 | | - |
| 794 | if (rangecmp((cstart), (cend), (forcecoll)) > 0| TRUE | evaluated 2 times by 1 test | | FALSE | evaluated 38272 times by 1 test |
) | 2-38272 |
| 795 | { | - |
| 796 | if (c == ']'| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 1 time by 1 test |
) | 1 |
| 797 | break;executed 1 time by 1 test: break; | 1 |
| 798 | c = ((| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
flags & (1 << 4))| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
? ((1 && | 0-1 |
| 799 | ((*| TRUE | never evaluated | | FALSE | never evaluated |
__ctype_b_loc ())[(int) ((| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 800 | (unsigned char)(unsigned char)c| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 801 | ))] & (unsigned short int) _ISupper)| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 802 | ) ? | - |
| 803 | (__extension__ ({ int __res; if (sizeof (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 804 | (unsigned char)c| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 805 | ) > 1| TRUE | never evaluated | | FALSE | never evaluated |
) { if (__builtin_constant_p (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 806 | (unsigned char)c| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 807 | )| TRUE | never evaluated | | FALSE | never evaluated |
) { int __c = ( | 0 |
| 808 | (unsigned char)c | - |
| 809 | ); __res = __c < -128| TRUE | never evaluated | | FALSE | never evaluated |
|| __c > 255| TRUE | never evaluated | | FALSE | never evaluated |
? __c : (*__ctype_tolower_loc ())[__c]; }never executed: end of block else __res = tolower (never executed: __res = tolower ( (unsigned char)c ); | 0 |
| 810 | (unsigned char)c never executed: __res = tolower ( (unsigned char)c ); | 0 |
| 811 | ); never executed: __res = tolower ( (unsigned char)c ); } else __res = (*__ctype_tolower_loc ())[(int) (never executed: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)c )]; | 0 |
| 812 | (unsigned char)c never executed: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)c )]; | 0 |
| 813 | )]; never executed: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)c )]; __res; })) | 0 |
| 814 | : ((unsigned char)c)) : ((unsigned char)c)); | - |
| 815 | continue;executed 1 time by 1 test: continue; | 1 |
| 816 | } | - |
| 817 | }executed 38272 times by 1 test: end of block | 38272 |
| 818 | | - |
| 819 | if (rangecmp((test), (cstart), (forcecoll)) >= 0| TRUE | evaluated 225541 times by 1 test | | FALSE | evaluated 65576 times by 1 test |
&& rangecmp((test), (cend), (forcecoll)) <= 0| TRUE | evaluated 41569 times by 1 test | | FALSE | evaluated 183972 times by 1 test |
) | 41569-225541 |
| 820 | gotoexecuted 41569 times by 1 test: goto matched; matched;executed 41569 times by 1 test: goto matched; | 41569 |
| 821 | | - |
| 822 | if (c == ']'| TRUE | evaluated 162948 times by 1 test | | FALSE | evaluated 86600 times by 1 test |
) | 86600-162948 |
| 823 | break;executed 162948 times by 1 test: break; | 162948 |
| 824 | }executed 86600 times by 1 test: end of block | 86600 |
| 825 | | - |
| 826 | returnexecuted 167016 times by 1 test: return (!not ? (unsigned char *)0 : p); (!not ? (unsigned char *)0 : p);executed 167016 times by 1 test: return (!not ? (unsigned char *)0 : p); | 167016 |
| 827 | | - |
| 828 | matched: | - |
| 829 | | - |
| 830 | c = *--p; | - |
| 831 | brcnt = 1; | - |
| 832 | brchr = 0; | - |
| 833 | while (brcnt > 0| TRUE | evaluated 303898 times by 1 test | | FALSE | evaluated 112665 times by 1 test |
) | 112665-303898 |
| 834 | { | - |
| 835 | int oc; | - |
| 836 | | - |
| 837 | | - |
| 838 | if (c == '\0'| TRUE | evaluated 127 times by 1 test | | FALSE | evaluated 303771 times by 1 test |
) | 127-303771 |
| 839 | returnexecuted 127 times by 1 test: return ((test == '[') ? savep : (unsigned char *)0); ((test == '[') ? savep : (unsigned char *)0);executed 127 times by 1 test: return ((test == '[') ? savep : (unsigned char *)0); | 127 |
| 840 | | - |
| 841 | oc = c; | - |
| 842 | c = *p++; | - |
| 843 | if (c == '['| TRUE | evaluated 4 times by 1 test | | FALSE | evaluated 303767 times by 1 test |
&& (*| TRUE | never evaluated | | FALSE | evaluated 4 times by 1 test |
p == '='| TRUE | never evaluated | | FALSE | evaluated 4 times by 1 test |
|| *| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 3 times by 1 test |
p == ':'| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 3 times by 1 test |
|| *| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 2 times by 1 test |
p == '.'| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 2 times by 1 test |
)) | 0-303767 |
| 844 | { | - |
| 845 | brcnt++; | - |
| 846 | brchr = *p; | - |
| 847 | }executed 2 times by 1 test: end of block | 2 |
| 848 | | - |
| 849 | else if (c == ']'| TRUE | evaluated 112667 times by 1 test | | FALSE | evaluated 191102 times by 1 test |
&& brcnt > 1| TRUE | evaluated 2 times by 1 test | | FALSE | evaluated 112665 times by 1 test |
&& brchr != 0| TRUE | evaluated 2 times by 1 test | | FALSE | never evaluated |
&& oc == brchr| TRUE | evaluated 2 times by 1 test | | FALSE | never evaluated |
) | 0-191102 |
| 850 | brcnt--;executed 2 times by 1 test: brcnt--; | 2 |
| 851 | else if (c == ']'| TRUE | evaluated 112665 times by 1 test | | FALSE | evaluated 191102 times by 1 test |
&& brcnt == 1| TRUE | evaluated 112665 times by 1 test | | FALSE | never evaluated |
) | 0-191102 |
| 852 | brcnt--;executed 112665 times by 1 test: brcnt--; | 112665 |
| 853 | else if (!(flags & (1 << 1))| TRUE | evaluated 191102 times by 1 test | | FALSE | never evaluated |
&& c == '\\'| TRUE | evaluated 11 times by 1 test | | FALSE | evaluated 191091 times by 1 test |
) | 0-191102 |
| 854 | { | - |
| 855 | if (*| TRUE | never evaluated | | FALSE | evaluated 11 times by 1 test |
p == '\0'| TRUE | never evaluated | | FALSE | evaluated 11 times by 1 test |
) | 0-11 |
| 856 | return never executed: return (unsigned char *)0; (unsigned char *)0;never executed: return (unsigned char *)0; | 0 |
| 857 | | - |
| 858 | ++p; | - |
| 859 | }executed 11 times by 1 test: end of block | 11 |
| 860 | }executed 303771 times by 1 test: end of block | 303771 |
| 861 | returnexecuted 112665 times by 1 test: return (not ? (unsigned char *)0 : p); (not ? (unsigned char *)0 : p);executed 112665 times by 1 test: return (not ? (unsigned char *)0 : p); | 112665 |
| 862 | } | - |
| 863 | unsigned char * | - |
| 864 | glob_patscan (string, end, delim) | - |
| 865 | unsigned char *string, *end; | - |
| 866 | int delim; | - |
| 867 | { | - |
| 868 | int pnest, bnest, skip; | - |
| 869 | int cchar; | - |
| 870 | unsigned char *s, c, *bfirst; | - |
| 871 | | - |
| 872 | pnest = bnest = skip = 0; | - |
| 873 | cchar = 0; | - |
| 874 | bfirst = | - |
| 875 | ((void *)0) | - |
| 876 | ; | - |
| 877 | | - |
| 878 | if (string == end| TRUE | evaluated 69 times by 1 test | | FALSE | evaluated 23102 times by 1 test |
) | 69-23102 |
| 879 | returnexecuted 69 times by 1 test: return ( ((void *)0) ); (executed 69 times by 1 test: return ( ((void *)0) ); | 69 |
| 880 | ((void *)0)executed 69 times by 1 test: return ( ((void *)0) ); | 69 |
| 881 | );executed 69 times by 1 test: return ( ((void *)0) ); | 69 |
| 882 | | - |
| 883 | for (s = string; c = *s| TRUE | evaluated 383270 times by 1 test | | FALSE | evaluated 10 times by 1 test |
; s++) | 10-383270 |
| 884 | { | - |
| 885 | if (s >= end| TRUE | evaluated 2291 times by 1 test | | FALSE | evaluated 380979 times by 1 test |
) | 2291-380979 |
| 886 | returnexecuted 2291 times by 1 test: return (s); (s);executed 2291 times by 1 test: return (s); | 2291 |
| 887 | if (skip| TRUE | never evaluated | | FALSE | evaluated 380979 times by 1 test |
) | 0-380979 |
| 888 | { | - |
| 889 | skip = 0; | - |
| 890 | continue; never executed: continue; | 0 |
| 891 | } | - |
| 892 | switch (c) | - |
| 893 | { | - |
| 894 | case never executed: case '\\': '\\':never executed: case '\\': | 0 |
| 895 | skip = 1; | - |
| 896 | break; never executed: break; | 0 |
| 897 | | - |
| 898 | case never executed: case '\0': '\0':never executed: case '\0': | 0 |
| 899 | return never executed: return ((unsigned char *) ((void *)0) ); ((unsigned char *)never executed: return ((unsigned char *) ((void *)0) ); | 0 |
| 900 | ((void *)0) never executed: return ((unsigned char *) ((void *)0) ); | 0 |
| 901 | ); never executed: return ((unsigned char *) ((void *)0) ); | 0 |
| 902 | | - |
| 903 | | - |
| 904 | | - |
| 905 | | - |
| 906 | caseexecuted 600 times by 1 test: case '[': '[':executed 600 times by 1 test: case '[': | 600 |
| 907 | if (bnest == 0| TRUE | evaluated 417 times by 1 test | | FALSE | evaluated 183 times by 1 test |
) | 183-417 |
| 908 | { | - |
| 909 | bfirst = s + 1; | - |
| 910 | if (*| TRUE | evaluated 17 times by 1 test | | FALSE | evaluated 400 times by 1 test |
bfirst == '!'| TRUE | evaluated 17 times by 1 test | | FALSE | evaluated 400 times by 1 test |
|| *| TRUE | evaluated 84 times by 1 test | | FALSE | evaluated 316 times by 1 test |
bfirst == '^'| TRUE | evaluated 84 times by 1 test | | FALSE | evaluated 316 times by 1 test |
) | 17-400 |
| 911 | bfirst++;executed 101 times by 1 test: bfirst++; | 101 |
| 912 | bnest++; | - |
| 913 | }executed 417 times by 1 test: end of block | 417 |
| 914 | else if (s[1] == ':'| TRUE | evaluated 183 times by 1 test | | FALSE | never evaluated |
|| s[1] == '.'| TRUE | never evaluated | | FALSE | never evaluated |
|| s[1] == '='| TRUE | never evaluated | | FALSE | never evaluated |
) | 0-183 |
| 915 | cchar = s[1];executed 183 times by 1 test: cchar = s[1]; | 183 |
| 916 | break;executed 600 times by 1 test: break; | 600 |
| 917 | | - |
| 918 | | - |
| 919 | | - |
| 920 | | - |
| 921 | caseexecuted 565 times by 1 test: case ']': ']':executed 565 times by 1 test: case ']': | 565 |
| 922 | if (bnest| TRUE | evaluated 565 times by 1 test | | FALSE | never evaluated |
) | 0-565 |
| 923 | { | - |
| 924 | if (cchar| TRUE | evaluated 183 times by 1 test | | FALSE | evaluated 382 times by 1 test |
&& s[-1] == cchar| TRUE | evaluated 183 times by 1 test | | FALSE | never evaluated |
) | 0-382 |
| 925 | cchar = 0;executed 183 times by 1 test: cchar = 0; | 183 |
| 926 | else if (s != bfirst| TRUE | evaluated 382 times by 1 test | | FALSE | never evaluated |
) | 0-382 |
| 927 | { | - |
| 928 | bnest--; | - |
| 929 | bfirst = 0; | - |
| 930 | }executed 382 times by 1 test: end of block | 382 |
| 931 | }executed 565 times by 1 test: end of block | 565 |
| 932 | break;executed 565 times by 1 test: break; | 565 |
| 933 | | - |
| 934 | caseexecuted 16435 times by 1 test: case '(': '(':executed 16435 times by 1 test: case '(': | 16435 |
| 935 | if (bnest == 0| TRUE | evaluated 16435 times by 1 test | | FALSE | never evaluated |
) | 0-16435 |
| 936 | pnest++;executed 16435 times by 1 test: pnest++; | 16435 |
| 937 | break;executed 16435 times by 1 test: break; | 16435 |
| 938 | | - |
| 939 | caseexecuted 33901 times by 1 test: case ')': ')':executed 33901 times by 1 test: case ')': | 33901 |
| 940 | if (bnest == 0| TRUE | evaluated 33866 times by 1 test | | FALSE | evaluated 35 times by 1 test |
&& pnest-- <= 0| TRUE | evaluated 17431 times by 1 test | | FALSE | evaluated 16435 times by 1 test |
) | 35-33866 |
| 941 | returnexecuted 17431 times by 1 test: return ++s; ++s;executed 17431 times by 1 test: return ++s; | 17431 |
| 942 | break;executed 16470 times by 1 test: break; | 16470 |
| 943 | | - |
| 944 | caseexecuted 52602 times by 1 test: case '|': '|':executed 52602 times by 1 test: case '|': | 52602 |
| 945 | if (bnest == 0| TRUE | evaluated 52602 times by 1 test | | FALSE | never evaluated |
&& pnest == 0| TRUE | evaluated 6673 times by 1 test | | FALSE | evaluated 45929 times by 1 test |
&& delim == '|'| TRUE | evaluated 3370 times by 1 test | | FALSE | evaluated 3303 times by 1 test |
) | 0-52602 |
| 946 | returnexecuted 3370 times by 1 test: return ++s; ++s;executed 3370 times by 1 test: return ++s; | 3370 |
| 947 | break;executed 49232 times by 1 test: break; | 49232 |
| 948 | } | - |
| 949 | }executed 360178 times by 1 test: end of block | 360178 |
| 950 | | - |
| 951 | returnexecuted 10 times by 1 test: return ( ((void *)0) ); (executed 10 times by 1 test: return ( ((void *)0) ); | 10 |
| 952 | ((void *)0)executed 10 times by 1 test: return ( ((void *)0) ); | 10 |
| 953 | );executed 10 times by 1 test: return ( ((void *)0) ); | 10 |
| 954 | } | - |
| 955 | | - |
| 956 | | - |
| 957 | static int | - |
| 958 | strcompare (p, pe, s, se) | - |
| 959 | unsigned char *p, *pe, *s, *se; | - |
| 960 | { | - |
| 961 | int ret; | - |
| 962 | unsigned char c1, c2; | - |
| 963 | int l1, l2; | - |
| 964 | | - |
| 965 | l1 = pe - p; | - |
| 966 | l2 = se - s; | - |
| 967 | | - |
| 968 | if (l1 != l2| TRUE | evaluated 9 times by 1 test | | FALSE | evaluated 1 time by 1 test |
) | 1-9 |
| 969 | returnexecuted 9 times by 1 test: return (1); (1);executed 9 times by 1 test: return (1); | 9 |
| 970 | | - |
| 971 | c1 = *pe; | - |
| 972 | c2 = *se; | - |
| 973 | | - |
| 974 | if (c1 != 0| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
| 975 | * never executed: *pe = '\0'; pe = '\0';never executed: *pe = '\0'; | 0 |
| 976 | if (c2 != 0| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
| 977 | * never executed: *se = '\0'; se = '\0';never executed: *se = '\0'; | 0 |
| 978 | | - |
| 979 | | - |
| 980 | ret = strcoll(((char *)p), ((char *)s)); | - |
| 981 | | - |
| 982 | | - |
| 983 | | - |
| 984 | | - |
| 985 | if (c1 != 0| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
| 986 | * never executed: *pe = c1; pe = c1;never executed: *pe = c1; | 0 |
| 987 | if (c2 != 0| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
| 988 | * never executed: *se = c2; se = c2;never executed: *se = c2; | 0 |
| 989 | | - |
| 990 | returnexecuted 1 time by 1 test: return (ret == 0 ? ret : 1); (ret == 0 ? ret : 1);executed 1 time by 1 test: return (ret == 0 ? ret : 1); | 1 |
| 991 | } | - |
| 992 | | - |
| 993 | | - |
| 994 | | - |
| 995 | | - |
| 996 | | - |
| 997 | static int | - |
| 998 | extmatch (xc, s, se, p, pe, flags) | - |
| 999 | int xc; | - |
| 1000 | unsigned char *s, *se; | - |
| 1001 | unsigned char *p, *pe; | - |
| 1002 | int flags; | - |
| 1003 | { | - |
| 1004 | unsigned char *prest; | - |
| 1005 | unsigned char *psub; | - |
| 1006 | unsigned char *pnext; | - |
| 1007 | unsigned char *srest; | - |
| 1008 | int m1, m2, xflags; | - |
| 1009 | prest = glob_patscan (p + (*p == '('), pe, 0); | - |
| 1010 | if (prest == 0| TRUE | evaluated 10 times by 1 test | | FALSE | evaluated 8450 times by 1 test |
) | 10-8450 |
| 1011 | | - |
| 1012 | | - |
| 1013 | returnexecuted 10 times by 1 test: return (strcompare (p - 1, pe, s, se)); (strcompare (p - 1, pe, s, se));executed 10 times by 1 test: return (strcompare (p - 1, pe, s, se)); | 10 |
| 1014 | | - |
| 1015 | switch (xc) | - |
| 1016 | { | - |
| 1017 | caseexecuted 160 times by 1 test: case '+': '+':executed 160 times by 1 test: case '+': | 160 |
| 1018 | caseexecuted 3034 times by 1 test: case '*': '*':executed 3034 times by 1 test: case '*': | 3034 |
| 1019 | | - |
| 1020 | | - |
| 1021 | | - |
| 1022 | if (xc == '*'| TRUE | evaluated 3034 times by 1 test | | FALSE | evaluated 160 times by 1 test |
&& (| TRUE | evaluated 186 times by 1 test | | FALSE | evaluated 2848 times by 1 test |
gmatch (s, se, prest, pe, | TRUE | evaluated 186 times by 1 test | | FALSE | evaluated 2848 times by 1 test |
| 160-3034 |
| 1023 | ((void *)0)| TRUE | evaluated 186 times by 1 test | | FALSE | evaluated 2848 times by 1 test |
| 186-2848 |
| 1024 | , flags) == 0)| TRUE | evaluated 186 times by 1 test | | FALSE | evaluated 2848 times by 1 test |
) | 186-2848 |
| 1025 | returnexecuted 186 times by 1 test: return 0; 0;executed 186 times by 1 test: return 0; | 186 |
| 1026 | | - |
| 1027 | | - |
| 1028 | | - |
| 1029 | | - |
| 1030 | for (psub = p + 1; ; psub = pnext) | - |
| 1031 | { | - |
| 1032 | pnext = glob_patscan (psub, pe, '|'); | - |
| 1033 | for (srest = s; srest <= se| TRUE | evaluated 17751 times by 1 test | | FALSE | evaluated 2592 times by 1 test |
; srest++) | 2592-17751 |
| 1034 | { | - |
| 1035 | | - |
| 1036 | | - |
| 1037 | m1 = gmatch (s, srest, psub, pnext - 1, | - |
| 1038 | ((void *)0) | - |
| 1039 | , flags) == 0; | - |
| 1040 | | - |
| 1041 | | - |
| 1042 | | - |
| 1043 | if (m1| TRUE | evaluated 1805 times by 1 test | | FALSE | evaluated 15946 times by 1 test |
) | 1805-15946 |
| 1044 | { | - |
| 1045 | | - |
| 1046 | xflags = (| TRUE | evaluated 1749 times by 1 test | | FALSE | evaluated 56 times by 1 test |
srest > s)| TRUE | evaluated 1749 times by 1 test | | FALSE | evaluated 56 times by 1 test |
? (flags & ~(1 << 2)) : flags; | 56-1749 |
| 1047 | m2 = (| TRUE | evaluated 239 times by 1 test | | FALSE | evaluated 1566 times by 1 test |
gmatch (srest, se, prest, pe, | TRUE | evaluated 239 times by 1 test | | FALSE | evaluated 1566 times by 1 test |
| 239-1566 |
| 1048 | ((void *)0)| TRUE | evaluated 239 times by 1 test | | FALSE | evaluated 1566 times by 1 test |
| 239-1566 |
| 1049 | , xflags) == 0)| TRUE | evaluated 239 times by 1 test | | FALSE | evaluated 1566 times by 1 test |
|| | 239-1566 |
| 1050 | (s != srest| TRUE | evaluated 1510 times by 1 test | | FALSE | evaluated 56 times by 1 test |
&& gmatch (srest, se, p - 1, pe, | TRUE | evaluated 270 times by 1 test | | FALSE | evaluated 1240 times by 1 test |
| 56-1510 |
| 1051 | ((void *)0)| TRUE | evaluated 270 times by 1 test | | FALSE | evaluated 1240 times by 1 test |
| 270-1240 |
| 1052 | , xflags) == 0| TRUE | evaluated 270 times by 1 test | | FALSE | evaluated 1240 times by 1 test |
); | 270-1240 |
| 1053 | }executed 1805 times by 1 test: end of block | 1805 |
| 1054 | if (m1| TRUE | evaluated 1805 times by 1 test | | FALSE | evaluated 15946 times by 1 test |
&& m2| TRUE | evaluated 509 times by 1 test | | FALSE | evaluated 1296 times by 1 test |
) | 509-15946 |
| 1055 | returnexecuted 509 times by 1 test: return (0); (0);executed 509 times by 1 test: return (0); | 509 |
| 1056 | }executed 17242 times by 1 test: end of block | 17242 |
| 1057 | if (pnext == prest| TRUE | evaluated 2499 times by 1 test | | FALSE | evaluated 93 times by 1 test |
) | 93-2499 |
| 1058 | break;executed 2499 times by 1 test: break; | 2499 |
| 1059 | }executed 93 times by 1 test: end of block | 93 |
| 1060 | returnexecuted 2499 times by 1 test: return (1); (1);executed 2499 times by 1 test: return (1); | 2499 |
| 1061 | | - |
| 1062 | caseexecuted 50 times by 1 test: case '?': '?':executed 50 times by 1 test: case '?': | 50 |
| 1063 | caseexecuted 5060 times by 1 test: case '@': '@':executed 5060 times by 1 test: case '@': | 5060 |
| 1064 | | - |
| 1065 | | - |
| 1066 | | - |
| 1067 | if (xc == '?'| TRUE | evaluated 50 times by 1 test | | FALSE | evaluated 5060 times by 1 test |
&& (| TRUE | evaluated 5 times by 1 test | | FALSE | evaluated 45 times by 1 test |
gmatch (s, se, prest, pe, | TRUE | evaluated 5 times by 1 test | | FALSE | evaluated 45 times by 1 test |
| 5-5060 |
| 1068 | ((void *)0)| TRUE | evaluated 5 times by 1 test | | FALSE | evaluated 45 times by 1 test |
| 5-45 |
| 1069 | , flags) == 0)| TRUE | evaluated 5 times by 1 test | | FALSE | evaluated 45 times by 1 test |
) | 5-45 |
| 1070 | returnexecuted 5 times by 1 test: return 0; 0;executed 5 times by 1 test: return 0; | 5 |
| 1071 | | - |
| 1072 | | - |
| 1073 | | - |
| 1074 | | - |
| 1075 | for (psub = p + 1; ; psub = pnext) | - |
| 1076 | { | - |
| 1077 | pnext = glob_patscan (psub, pe, '|'); | - |
| 1078 | srest = (| TRUE | evaluated 7886 times by 1 test | | FALSE | evaluated 197 times by 1 test |
prest == pe)| TRUE | evaluated 7886 times by 1 test | | FALSE | evaluated 197 times by 1 test |
? se : s; | 197-7886 |
| 1079 | for ( ; srest <= se| TRUE | evaluated 8805 times by 1 test | | FALSE | evaluated 7955 times by 1 test |
; srest++) | 7955-8805 |
| 1080 | { | - |
| 1081 | | - |
| 1082 | xflags = (| TRUE | evaluated 8467 times by 1 test | | FALSE | evaluated 338 times by 1 test |
srest > s)| TRUE | evaluated 8467 times by 1 test | | FALSE | evaluated 338 times by 1 test |
? (flags & ~(1 << 2)) : flags; | 338-8467 |
| 1083 | if (gmatch (s, srest, psub, pnext - 1, | TRUE | evaluated 136 times by 1 test | | FALSE | evaluated 8669 times by 1 test |
| 136-8669 |
| 1084 | ((void *)0)| TRUE | evaluated 136 times by 1 test | | FALSE | evaluated 8669 times by 1 test |
| 136-8669 |
| 1085 | , flags) == 0| TRUE | evaluated 136 times by 1 test | | FALSE | evaluated 8669 times by 1 test |
&& | 136-8669 |
| 1086 | gmatch (srest, se, prest, pe, | TRUE | evaluated 128 times by 1 test | | FALSE | evaluated 8 times by 1 test |
| 8-128 |
| 1087 | ((void *)0)| TRUE | evaluated 128 times by 1 test | | FALSE | evaluated 8 times by 1 test |
| 8-128 |
| 1088 | , xflags) == 0| TRUE | evaluated 128 times by 1 test | | FALSE | evaluated 8 times by 1 test |
) | 8-128 |
| 1089 | returnexecuted 128 times by 1 test: return (0); (0);executed 128 times by 1 test: return (0); | 128 |
| 1090 | }executed 8677 times by 1 test: end of block | 8677 |
| 1091 | if (pnext == prest| TRUE | evaluated 4977 times by 1 test | | FALSE | evaluated 2978 times by 1 test |
) | 2978-4977 |
| 1092 | break;executed 4977 times by 1 test: break; | 4977 |
| 1093 | }executed 2978 times by 1 test: end of block | 2978 |
| 1094 | returnexecuted 4977 times by 1 test: return (1); (1);executed 4977 times by 1 test: return (1); | 4977 |
| 1095 | | - |
| 1096 | caseexecuted 146 times by 1 test: case '!': '!':executed 146 times by 1 test: case '!': | 146 |
| 1097 | for (srest = s; srest <= se| TRUE | evaluated 716 times by 1 test | | FALSE | evaluated 24 times by 1 test |
; srest++) | 24-716 |
| 1098 | { | - |
| 1099 | m1 = 0; | - |
| 1100 | for (psub = p + 1; ; psub = pnext) | - |
| 1101 | { | - |
| 1102 | pnext = glob_patscan (psub, pe, '|'); | - |
| 1103 | | - |
| 1104 | if (m1 = (gmatch (s, srest, psub, pnext - 1, | TRUE | evaluated 61 times by 1 test | | FALSE | evaluated 760 times by 1 test |
| 61-760 |
| 1105 | ((void *)0)| TRUE | evaluated 61 times by 1 test | | FALSE | evaluated 760 times by 1 test |
| 61-760 |
| 1106 | , flags) == 0)| TRUE | evaluated 61 times by 1 test | | FALSE | evaluated 760 times by 1 test |
) | 61-760 |
| 1107 | break;executed 61 times by 1 test: break; | 61 |
| 1108 | if (pnext == prest| TRUE | evaluated 655 times by 1 test | | FALSE | evaluated 105 times by 1 test |
) | 105-655 |
| 1109 | break;executed 655 times by 1 test: break; | 655 |
| 1110 | }executed 105 times by 1 test: end of block | 105 |
| 1111 | | - |
| 1112 | | - |
| 1113 | | - |
| 1114 | | - |
| 1115 | if (m1 == 0| TRUE | evaluated 655 times by 1 test | | FALSE | evaluated 61 times by 1 test |
&& *| TRUE | evaluated 11 times by 1 test | | FALSE | evaluated 644 times by 1 test |
s == '.'| TRUE | evaluated 11 times by 1 test | | FALSE | evaluated 644 times by 1 test |
&& (| TRUE | never evaluated | | FALSE | evaluated 11 times by 1 test |
flags & (1 << 2))| TRUE | never evaluated | | FALSE | evaluated 11 times by 1 test |
) | 0-655 |
| 1116 | return never executed: return (1); (1);never executed: return (1); | 0 |
| 1117 | | - |
| 1118 | | - |
| 1119 | xflags = (| TRUE | evaluated 570 times by 1 test | | FALSE | evaluated 146 times by 1 test |
srest > s)| TRUE | evaluated 570 times by 1 test | | FALSE | evaluated 146 times by 1 test |
? (flags & ~(1 << 2)) : flags; | 146-570 |
| 1120 | if (m1 == 0| TRUE | evaluated 655 times by 1 test | | FALSE | evaluated 61 times by 1 test |
&& gmatch (srest, se, prest, pe, | TRUE | evaluated 122 times by 1 test | | FALSE | evaluated 533 times by 1 test |
| 61-655 |
| 1121 | ((void *)0)| TRUE | evaluated 122 times by 1 test | | FALSE | evaluated 533 times by 1 test |
| 122-533 |
| 1122 | , xflags) == 0| TRUE | evaluated 122 times by 1 test | | FALSE | evaluated 533 times by 1 test |
) | 122-533 |
| 1123 | returnexecuted 122 times by 1 test: return (0); (0);executed 122 times by 1 test: return (0); | 122 |
| 1124 | }executed 594 times by 1 test: end of block | 594 |
| 1125 | returnexecuted 24 times by 1 test: return (1); (1);executed 24 times by 1 test: return (1); | 24 |
| 1126 | } | - |
| 1127 | | - |
| 1128 | return never executed: return (1); (1);never executed: return (1); | 0 |
| 1129 | } | - |
| 1130 | struct wcsmat_struct | - |
| 1131 | { | - |
| 1132 | wchar_t *pattern; | - |
| 1133 | wchar_t *string; | - |
| 1134 | }; | - |
| 1135 | | - |
| 1136 | int internal_wstrmatch (wchar_t *, wchar_t *, int); | - |
| 1137 | | - |
| 1138 | static int gmatch_wc (wchar_t *, wchar_t *, wchar_t *, wchar_t *, struct wcsmat_struct *, int); | - |
| 1139 | static wchar_t *parse_collwcsym (wchar_t *, wint_t *); | - |
| 1140 | static wchar_t *brackmatch_wc (wchar_t *, wint_t, int); | - |
| 1141 | static int extmatch_wc (wint_t, wchar_t *, wchar_t *, wchar_t *, wchar_t *, int); | - |
| 1142 | | - |
| 1143 | wchar_t *glob_patscan_wc (wchar_t *, wchar_t *, wint_t); | - |
| 1144 | | - |
| 1145 | int | - |
| 1146 | internal_wstrmatch (pattern, string, flags) | - |
| 1147 | wchar_t *pattern; | - |
| 1148 | wchar_t *string; | - |
| 1149 | int flags; | - |
| 1150 | { | - |
| 1151 | wchar_t *se, *pe; | - |
| 1152 | | - |
| 1153 | if (string == 0| TRUE | never evaluated | | FALSE | evaluated 9622995 times by 1 test |
|| pattern == 0| TRUE | never evaluated | | FALSE | evaluated 9622995 times by 1 test |
) | 0-9622995 |
| 1154 | return never executed: return 1; 1;never executed: return 1; | 0 |
| 1155 | | - |
| 1156 | se = string + wcslen((wchar_t *)string); | - |
| 1157 | pe = pattern + wcslen((wchar_t *)pattern); | - |
| 1158 | | - |
| 1159 | returnexecuted 9622995 times by 1 test: return (gmatch_wc (string, se, pattern, pe, (struct wcsmat_struct *) ((void *)0) , flags)); (gmatch_wc (string, se, pattern, pe, (struct wcsmat_struct *)executed 9622995 times by 1 test: return (gmatch_wc (string, se, pattern, pe, (struct wcsmat_struct *) ((void *)0) , flags)); | 9622995 |
| 1160 | ((void *)0)executed 9622995 times by 1 test: return (gmatch_wc (string, se, pattern, pe, (struct wcsmat_struct *) ((void *)0) , flags)); | 9622995 |
| 1161 | , flags));executed 9622995 times by 1 test: return (gmatch_wc (string, se, pattern, pe, (struct wcsmat_struct *) ((void *)0) , flags)); | 9622995 |
| 1162 | } | - |
| 1163 | | - |
| 1164 | | - |
| 1165 | | - |
| 1166 | static int | - |
| 1167 | gmatch_wc (string, se, pattern, pe, ends, flags) | - |
| 1168 | wchar_t *string, *se; | - |
| 1169 | wchar_t *pattern, *pe; | - |
| 1170 | struct wcsmat_struct *ends; | - |
| 1171 | int flags; | - |
| 1172 | { | - |
| 1173 | wchar_t *p, *n; | - |
| 1174 | wint_t c; | - |
| 1175 | wint_t sc; | - |
| 1176 | | - |
| 1177 | p = pattern; | - |
| 1178 | n = string; | - |
| 1179 | | - |
| 1180 | if (string == 0| TRUE | never evaluated | | FALSE | evaluated 9624442 times by 1 test |
|| pattern == 0| TRUE | never evaluated | | FALSE | evaluated 9624442 times by 1 test |
) | 0-9624442 |
| 1181 | return never executed: return 1; 1;never executed: return 1; | 0 |
| 1182 | | - |
| 1183 | | - |
| 1184 | | - |
| 1185 | | - |
| 1186 | | - |
| 1187 | | - |
| 1188 | while (p < pe| TRUE | evaluated 9625687 times by 1 test | | FALSE | evaluated 1531062 times by 1 test |
) | 1531062-9625687 |
| 1189 | { | - |
| 1190 | c = *p++; | - |
| 1191 | c = ((| TRUE | never evaluated | | FALSE | evaluated 9625687 times by 1 test |
flags & (1 << 4))| TRUE | never evaluated | | FALSE | evaluated 9625687 times by 1 test |
&& iswupper (c)| TRUE | never evaluated | | FALSE | never evaluated |
? towlower (c) : (c)); | 0-9625687 |
| 1192 | | - |
| 1193 | sc = n < se| TRUE | evaluated 7309168 times by 1 test | | FALSE | evaluated 2316519 times by 1 test |
? *n : '\0'; | 2316519-7309168 |
| 1194 | | - |
| 1195 | | - |
| 1196 | | - |
| 1197 | | - |
| 1198 | if ((| TRUE | evaluated 450 times by 1 test | | FALSE | evaluated 9625237 times by 1 test |
flags & (1 << 5))| TRUE | evaluated 450 times by 1 test | | FALSE | evaluated 9625237 times by 1 test |
&& *| TRUE | evaluated 52 times by 1 test | | FALSE | evaluated 398 times by 1 test |
p == L'('| TRUE | evaluated 52 times by 1 test | | FALSE | evaluated 398 times by 1 test |
&& | 52-9625237 |
| 1199 | (c == L'+'| TRUE | evaluated 19 times by 1 test | | FALSE | evaluated 33 times by 1 test |
|| c == L'*'| TRUE | evaluated 33 times by 1 test | | FALSE | never evaluated |
|| c == L'?'| TRUE | never evaluated | | FALSE | never evaluated |
|| c == L'@'| TRUE | never evaluated | | FALSE | never evaluated |
|| c == L'!'| TRUE | never evaluated | | FALSE | never evaluated |
)) | 0-33 |
| 1200 | { | - |
| 1201 | int lflags; | - |
| 1202 | | - |
| 1203 | | - |
| 1204 | lflags = (| TRUE | evaluated 52 times by 1 test | | FALSE | never evaluated |
n == string)| TRUE | evaluated 52 times by 1 test | | FALSE | never evaluated |
? flags : (flags & ~(1 << 2)); | 0-52 |
| 1205 | returnexecuted 52 times by 1 test: return (extmatch_wc (c, n, se, p, pe, lflags)); (extmatch_wc (c, n, se, p, pe, lflags));executed 52 times by 1 test: return (extmatch_wc (c, n, se, p, pe, lflags)); | 52 |
| 1206 | } | - |
| 1207 | | - |
| 1208 | | - |
| 1209 | switch (c) | - |
| 1210 | { | - |
| 1211 | caseexecuted 1678 times by 1 test: case L'?': L'?':executed 1678 times by 1 test: case L'?': | 1678 |
| 1212 | if (sc == '\0'| TRUE | evaluated 676 times by 1 test | | FALSE | evaluated 1002 times by 1 test |
) | 676-1002 |
| 1213 | returnexecuted 676 times by 1 test: return 1; 1;executed 676 times by 1 test: return 1; | 676 |
| 1214 | else if ((| TRUE | never evaluated | | FALSE | evaluated 1002 times by 1 test |
flags & (1 << 0))| TRUE | never evaluated | | FALSE | evaluated 1002 times by 1 test |
&& sc == L'/'| TRUE | never evaluated | | FALSE | never evaluated |
) | 0-1002 |
| 1215 | | - |
| 1216 | return never executed: return 1; 1;never executed: return 1; | 0 |
| 1217 | else if ((| TRUE | never evaluated | | FALSE | evaluated 1002 times by 1 test |
flags & (1 << 2))| TRUE | never evaluated | | FALSE | evaluated 1002 times by 1 test |
&& sc == L'.'| TRUE | never evaluated | | FALSE | never evaluated |
&& | 0-1002 |
| 1218 | (n == string| TRUE | never evaluated | | FALSE | never evaluated |
|| ((| TRUE | never evaluated | | FALSE | never evaluated |
flags & (1 << 0))| TRUE | never evaluated | | FALSE | never evaluated |
&& n[-1] == L'/'| TRUE | never evaluated | | FALSE | never evaluated |
))) | 0 |
| 1219 | | - |
| 1220 | | - |
| 1221 | | - |
| 1222 | return never executed: return 1; 1;never executed: return 1; | 0 |
| 1223 | break;executed 1002 times by 1 test: break; | 1002 |
| 1224 | | - |
| 1225 | caseexecuted 9619835 times by 1 test: case L'\\': L'\\':executed 9619835 times by 1 test: case L'\\': | 9619835 |
| 1226 | if (p == pe| TRUE | never evaluated | | FALSE | evaluated 9619835 times by 1 test |
&& sc == '\\'| TRUE | never evaluated | | FALSE | never evaluated |
&& (| TRUE | never evaluated | | FALSE | never evaluated |
n+1 == se)| TRUE | never evaluated | | FALSE | never evaluated |
) | 0-9619835 |
| 1227 | break; never executed: break; | 0 |
| 1228 | | - |
| 1229 | if (p == pe| TRUE | never evaluated | | FALSE | evaluated 9619835 times by 1 test |
) | 0-9619835 |
| 1230 | return never executed: return 1; 1;never executed: return 1; | 0 |
| 1231 | | - |
| 1232 | if ((| TRUE | evaluated 9619835 times by 1 test | | FALSE | never evaluated |
flags & (1 << 1)) == 0| TRUE | evaluated 9619835 times by 1 test | | FALSE | never evaluated |
) | 0-9619835 |
| 1233 | { | - |
| 1234 | c = *p++; | - |
| 1235 | | - |
| 1236 | if (p > pe| TRUE | never evaluated | | FALSE | evaluated 9619835 times by 1 test |
) | 0-9619835 |
| 1237 | return never executed: return 1; 1;never executed: return 1; | 0 |
| 1238 | c = ((| TRUE | never evaluated | | FALSE | evaluated 9619835 times by 1 test |
flags & (1 << 4))| TRUE | never evaluated | | FALSE | evaluated 9619835 times by 1 test |
&& iswupper (c)| TRUE | never evaluated | | FALSE | never evaluated |
? towlower (c) : (c)); | 0-9619835 |
| 1239 | }executed 9619835 times by 1 test: end of block | 9619835 |
| 1240 | if (((| TRUE | never evaluated | | FALSE | evaluated 9619835 times by 1 test |
| TRUE | evaluated 8090736 times by 1 test | | FALSE | evaluated 1529099 times by 1 test |
| TRUE | never evaluated | | FALSE | evaluated 9619835 times by 1 test |
flags & (1 << 4))| TRUE | evaluated 8090736 times by 1 test | | FALSE | evaluated 1529099 times by 1 test |
| TRUE | never evaluated | | FALSE | evaluated 9619835 times by 1 test |
&& iswupper (sc)| TRUE | never evaluated | | FALSE | never evaluated |
? towlower (sc) : (sc)) != (wint_t)c| TRUE | evaluated 8090736 times by 1 test | | FALSE | evaluated 1529099 times by 1 test |
) | 0-9619835 |
| 1241 | returnexecuted 8090736 times by 1 test: return 1; 1;executed 8090736 times by 1 test: return 1; | 8090736 |
| 1242 | break;executed 1529099 times by 1 test: break; | 1529099 |
| 1243 | | - |
| 1244 | caseexecuted 1139 times by 1 test: case L'*': L'*':executed 1139 times by 1 test: case L'*': | 1139 |
| 1245 | | - |
| 1246 | | - |
| 1247 | if (ends != | TRUE | evaluated 10 times by 1 test | | FALSE | evaluated 1129 times by 1 test |
| 10-1129 |
| 1248 | ((void *)0)| TRUE | evaluated 10 times by 1 test | | FALSE | evaluated 1129 times by 1 test |
| 10-1129 |
| 1249 | ) | - |
| 1250 | { | - |
| 1251 | ends->pattern = p - 1; | - |
| 1252 | ends->string = n; | - |
| 1253 | returnexecuted 10 times by 1 test: return (0); (0);executed 10 times by 1 test: return (0); | 10 |
| 1254 | } | - |
| 1255 | | - |
| 1256 | if ((| TRUE | never evaluated | | FALSE | evaluated 1129 times by 1 test |
flags & (1 << 2))| TRUE | never evaluated | | FALSE | evaluated 1129 times by 1 test |
&& sc == L'.'| TRUE | never evaluated | | FALSE | never evaluated |
&& | 0-1129 |
| 1257 | (n == string| TRUE | never evaluated | | FALSE | never evaluated |
|| ((| TRUE | never evaluated | | FALSE | never evaluated |
flags & (1 << 0))| TRUE | never evaluated | | FALSE | never evaluated |
&& n[-1] == L'/'| TRUE | never evaluated | | FALSE | never evaluated |
))) | 0 |
| 1258 | | - |
| 1259 | | - |
| 1260 | | - |
| 1261 | return never executed: return 1; 1;never executed: return 1; | 0 |
| 1262 | | - |
| 1263 | if (p == pe| TRUE | evaluated 149 times by 1 test | | FALSE | evaluated 980 times by 1 test |
) | 149-980 |
| 1264 | returnexecuted 149 times by 1 test: return 0; 0;executed 149 times by 1 test: return 0; | 149 |
| 1265 | | - |
| 1266 | | - |
| 1267 | | - |
| 1268 | for (c = *p++; (c == L'?'| TRUE | never evaluated | | FALSE | evaluated 980 times by 1 test |
|| c == L'*'| TRUE | never evaluated | | FALSE | evaluated 980 times by 1 test |
); c = *p++) | 0-980 |
| 1269 | { | - |
| 1270 | if ((| TRUE | never evaluated | | FALSE | never evaluated |
flags & (1 << 0))| TRUE | never evaluated | | FALSE | never evaluated |
&& sc == L'/'| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1271 | | - |
| 1272 | return never executed: return 1; 1;never executed: return 1; | 0 |
| 1273 | | - |
| 1274 | else if ((| TRUE | never evaluated | | FALSE | never evaluated |
flags & (1 << 5))| TRUE | never evaluated | | FALSE | never evaluated |
&& c == L'?'| TRUE | never evaluated | | FALSE | never evaluated |
&& *| TRUE | never evaluated | | FALSE | never evaluated |
p == L'('| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1275 | { | - |
| 1276 | wchar_t *newn; | - |
| 1277 | | - |
| 1278 | | - |
| 1279 | if (extmatch_wc (c, n, se, p, pe, flags) == 0| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1280 | return never executed: return (0); (0);never executed: return (0); | 0 |
| 1281 | | - |
| 1282 | | - |
| 1283 | | - |
| 1284 | | - |
| 1285 | | - |
| 1286 | newn = glob_patscan_wc (p + 1, pe, 0); | - |
| 1287 | | - |
| 1288 | p = newn| TRUE | never evaluated | | FALSE | never evaluated |
? newn : pe; | 0 |
| 1289 | } never executed: end of block | 0 |
| 1290 | | - |
| 1291 | else if (c == L'?'| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1292 | { | - |
| 1293 | if (sc == L'\0'| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1294 | return never executed: return 1; 1;never executed: return 1; | 0 |
| 1295 | | - |
| 1296 | | - |
| 1297 | | - |
| 1298 | n++; | - |
| 1299 | sc = n < se| TRUE | never evaluated | | FALSE | never evaluated |
? *n : '\0'; | 0 |
| 1300 | } never executed: end of block | 0 |
| 1301 | | - |
| 1302 | | - |
| 1303 | | - |
| 1304 | if ((| TRUE | never evaluated | | FALSE | never evaluated |
flags & (1 << 5))| TRUE | never evaluated | | FALSE | never evaluated |
&& c == L'*'| TRUE | never evaluated | | FALSE | never evaluated |
&& *| TRUE | never evaluated | | FALSE | never evaluated |
p == L'('| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1305 | { | - |
| 1306 | wchar_t *newn; | - |
| 1307 | | - |
| 1308 | | - |
| 1309 | | - |
| 1310 | for (newn = n; newn < se| TRUE | never evaluated | | FALSE | never evaluated |
; ++newn) | 0 |
| 1311 | { | - |
| 1312 | if (extmatch_wc (c, newn, se, p, pe, flags) == 0| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1313 | return never executed: return (0); (0);never executed: return (0); | 0 |
| 1314 | } never executed: end of block | 0 |
| 1315 | | - |
| 1316 | | - |
| 1317 | | - |
| 1318 | | - |
| 1319 | newn = glob_patscan_wc (p + 1, pe, 0); | - |
| 1320 | | - |
| 1321 | p = newn| TRUE | never evaluated | | FALSE | never evaluated |
? newn : pe; | 0 |
| 1322 | } never executed: end of block | 0 |
| 1323 | | - |
| 1324 | if (p == pe| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1325 | break; never executed: break; | 0 |
| 1326 | } never executed: end of block | 0 |
| 1327 | | - |
| 1328 | | - |
| 1329 | | - |
| 1330 | | - |
| 1331 | if (c == L'\0'| TRUE | never evaluated | | FALSE | evaluated 980 times by 1 test |
) | 0-980 |
| 1332 | { | - |
| 1333 | int r = (| TRUE | never evaluated | | FALSE | never evaluated |
flags & (1 << 0)) == 0| TRUE | never evaluated | | FALSE | never evaluated |
? 0 : 1; | 0 |
| 1334 | if (flags & (1 << 0)| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1335 | { | - |
| 1336 | if (flags & (1 << 3)| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1337 | r = 0; never executed: r = 0; | 0 |
| 1338 | else if (wmemchr((n), (L'/'), (se - n)) == | TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 1339 | ((void *)0)| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 1340 | ) | - |
| 1341 | r = 0; never executed: r = 0; | 0 |
| 1342 | } never executed: end of block | 0 |
| 1343 | return never executed: return r; r;never executed: return r; | 0 |
| 1344 | } | - |
| 1345 | | - |
| 1346 | | - |
| 1347 | | - |
| 1348 | | - |
| 1349 | if (p == pe| TRUE | evaluated 694 times by 1 test | | FALSE | evaluated 286 times by 1 test |
&& (c == L'?'| TRUE | never evaluated | | FALSE | evaluated 694 times by 1 test |
|| c == L'*'| TRUE | never evaluated | | FALSE | evaluated 694 times by 1 test |
)) | 0-694 |
| 1350 | return never executed: return (0); (0);never executed: return (0); | 0 |
| 1351 | | - |
| 1352 | | - |
| 1353 | | - |
| 1354 | | - |
| 1355 | if (n == se| TRUE | evaluated 76 times by 1 test | | FALSE | evaluated 904 times by 1 test |
&& ((| TRUE | never evaluated | | FALSE | evaluated 76 times by 1 test |
flags & (1 << 5))| TRUE | never evaluated | | FALSE | evaluated 76 times by 1 test |
&& (c == L'!'| TRUE | never evaluated | | FALSE | never evaluated |
|| c == L'?'| TRUE | never evaluated | | FALSE | never evaluated |
) && *| TRUE | never evaluated | | FALSE | never evaluated |
p == L'('| TRUE | never evaluated | | FALSE | never evaluated |
)) | 0-904 |
| 1356 | { | - |
| 1357 | --p; | - |
| 1358 | if (extmatch_wc (c, n, se, p, pe, flags) == 0| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1359 | return never executed: return (c == L'!' ? 1 : 0); (c == L'!' ? 1 : 0);never executed: return (c == L'!' ? 1 : 0); | 0 |
| 1360 | return never executed: return (c == L'!' ? 0 : 1); (c == L'!' ? 0 : 1);never executed: return (c == L'!' ? 0 : 1); | 0 |
| 1361 | } | - |
| 1362 | | - |
| 1363 | | - |
| 1364 | | - |
| 1365 | | - |
| 1366 | | - |
| 1367 | | - |
| 1368 | if (c == L'/'| TRUE | evaluated 685 times by 1 test | | FALSE | evaluated 295 times by 1 test |
&& (| TRUE | never evaluated | | FALSE | evaluated 685 times by 1 test |
flags & (1 << 0))| TRUE | never evaluated | | FALSE | evaluated 685 times by 1 test |
) | 0-685 |
| 1369 | { | - |
| 1370 | while (n < se| TRUE | never evaluated | | FALSE | never evaluated |
&& *| TRUE | never evaluated | | FALSE | never evaluated |
n != L'/'| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1371 | ++ never executed: ++n; n;never executed: ++n; | 0 |
| 1372 | if (n < se| TRUE | never evaluated | | FALSE | never evaluated |
&& *| TRUE | never evaluated | | FALSE | never evaluated |
n == L'/'| TRUE | never evaluated | | FALSE | never evaluated |
&& (| TRUE | never evaluated | | FALSE | never evaluated |
gmatch_wc (n+1, se, p, pe, | TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 1373 | ((void *)0)| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 1374 | , flags) == 0)| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1375 | return never executed: return 0; 0;never executed: return 0; | 0 |
| 1376 | return never executed: return 1; 1;never executed: return 1; | 0 |
| 1377 | } | - |
| 1378 | | - |
| 1379 | | - |
| 1380 | { | - |
| 1381 | wint_t c1; | - |
| 1382 | const wchar_t *endp; | - |
| 1383 | struct wcsmat_struct end; | - |
| 1384 | | - |
| 1385 | end.pattern = | - |
| 1386 | ((void *)0) | - |
| 1387 | ; | - |
| 1388 | endp = wmemchr((n), ((flags & (1 << 0)) ? L'/' : L'\0'), (se - n)); | - |
| 1389 | if (endp == 0| TRUE | evaluated 980 times by 1 test | | FALSE | never evaluated |
) | 0-980 |
| 1390 | endp = se;executed 980 times by 1 test: endp = se; | 980 |
| 1391 | | - |
| 1392 | c1 = ((| TRUE | evaluated 980 times by 1 test | | FALSE | never evaluated |
flags & (1 << 1)) == 0| TRUE | evaluated 980 times by 1 test | | FALSE | never evaluated |
&& c == L'\\'| TRUE | evaluated 180 times by 1 test | | FALSE | evaluated 800 times by 1 test |
) ? *p : c; | 0-980 |
| 1393 | c1 = ((| TRUE | never evaluated | | FALSE | evaluated 980 times by 1 test |
flags & (1 << 4))| TRUE | never evaluated | | FALSE | evaluated 980 times by 1 test |
&& iswupper (c1)| TRUE | never evaluated | | FALSE | never evaluated |
? towlower (c1) : (c1)); | 0-980 |
| 1394 | for (--p; n < endp| TRUE | evaluated 5704 times by 1 test | | FALSE | evaluated 841 times by 1 test |
; ++n) | 841-5704 |
| 1395 | { | - |
| 1396 | | - |
| 1397 | | - |
| 1398 | | - |
| 1399 | if ((| TRUE | evaluated 5704 times by 1 test | | FALSE | never evaluated |
flags & (1 << 5)) == 0| TRUE | evaluated 5704 times by 1 test | | FALSE | never evaluated |
&& c != L'['| TRUE | evaluated 5704 times by 1 test | | FALSE | never evaluated |
&& ((| TRUE | never evaluated | | FALSE | evaluated 5704 times by 1 test |
| TRUE | evaluated 4637 times by 1 test | | FALSE | evaluated 1067 times by 1 test |
| TRUE | never evaluated | | FALSE | evaluated 5704 times by 1 test |
flags & (1 << 4))| TRUE | evaluated 4637 times by 1 test | | FALSE | evaluated 1067 times by 1 test |
| TRUE | never evaluated | | FALSE | evaluated 5704 times by 1 test |
&& iswupper (*n)| TRUE | never evaluated | | FALSE | never evaluated |
? towlower (*n) : (*n)) != c1| TRUE | evaluated 4637 times by 1 test | | FALSE | evaluated 1067 times by 1 test |
) | 0-5704 |
| 1400 | continue;executed 4637 times by 1 test: continue; | 4637 |
| 1401 | | - |
| 1402 | | - |
| 1403 | | - |
| 1404 | | - |
| 1405 | if ((| TRUE | never evaluated | | FALSE | evaluated 1067 times by 1 test |
flags & (1 << 5))| TRUE | never evaluated | | FALSE | evaluated 1067 times by 1 test |
&& p[1] != L'('| TRUE | never evaluated | | FALSE | never evaluated |
&& | 0-1067 |
| 1406 | wcschr((L"?*+@!"), (*p)) == 0| TRUE | never evaluated | | FALSE | never evaluated |
&& c != L'['| TRUE | never evaluated | | FALSE | never evaluated |
&& ((| TRUE | never evaluated | | FALSE | never evaluated |
flags & (1 << 4))| TRUE | never evaluated | | FALSE | never evaluated |
&& iswupper (*n)| TRUE | never evaluated | | FALSE | never evaluated |
? towlower (*n) : (*n)) != c1| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1407 | continue; never executed: continue; | 0 |
| 1408 | | - |
| 1409 | | - |
| 1410 | if (gmatch_wc (n, se, p, pe, &end, flags & ~(1 << 2)) == 0| TRUE | evaluated 139 times by 1 test | | FALSE | evaluated 928 times by 1 test |
) | 139-928 |
| 1411 | { | - |
| 1412 | if (end.pattern == | TRUE | evaluated 129 times by 1 test | | FALSE | evaluated 10 times by 1 test |
| 10-129 |
| 1413 | ((void *)0)| TRUE | evaluated 129 times by 1 test | | FALSE | evaluated 10 times by 1 test |
| 10-129 |
| 1414 | ) | - |
| 1415 | returnexecuted 129 times by 1 test: return (0); (0);executed 129 times by 1 test: return (0); | 129 |
| 1416 | break;executed 10 times by 1 test: break; | 10 |
| 1417 | } | - |
| 1418 | }executed 928 times by 1 test: end of block | 928 |
| 1419 | | - |
| 1420 | | - |
| 1421 | | - |
| 1422 | | - |
| 1423 | if (end.pattern != | TRUE | evaluated 10 times by 1 test | | FALSE | evaluated 841 times by 1 test |
| 10-841 |
| 1424 | ((void *)0)| TRUE | evaluated 10 times by 1 test | | FALSE | evaluated 841 times by 1 test |
| 10-841 |
| 1425 | ) | - |
| 1426 | { | - |
| 1427 | p = end.pattern; | - |
| 1428 | n = end.string; | - |
| 1429 | continue;executed 10 times by 1 test: continue; | 10 |
| 1430 | } | - |
| 1431 | | - |
| 1432 | returnexecuted 841 times by 1 test: return 1; 1;executed 841 times by 1 test: return 1; | 841 |
| 1433 | } | - |
| 1434 | | - |
| 1435 | caseexecuted 144 times by 1 test: case L'[': L'[':executed 144 times by 1 test: case L'[': | 144 |
| 1436 | { | - |
| 1437 | if (sc == L'\0'| TRUE | never evaluated | | FALSE | evaluated 144 times by 1 test |
|| n == se| TRUE | never evaluated | | FALSE | evaluated 144 times by 1 test |
) | 0-144 |
| 1438 | return never executed: return 1; 1;never executed: return 1; | 0 |
| 1439 | | - |
| 1440 | | - |
| 1441 | | - |
| 1442 | | - |
| 1443 | if ((| TRUE | never evaluated | | FALSE | evaluated 144 times by 1 test |
flags & (1 << 2))| TRUE | never evaluated | | FALSE | evaluated 144 times by 1 test |
&& sc == L'.'| TRUE | never evaluated | | FALSE | never evaluated |
&& | 0-144 |
| 1444 | (n == string| TRUE | never evaluated | | FALSE | never evaluated |
|| ((| TRUE | never evaluated | | FALSE | never evaluated |
flags & (1 << 0))| TRUE | never evaluated | | FALSE | never evaluated |
&& n[-1] == L'/'| TRUE | never evaluated | | FALSE | never evaluated |
))) | 0 |
| 1445 | return never executed: return (1); (1);never executed: return (1); | 0 |
| 1446 | | - |
| 1447 | p = brackmatch_wc (p, sc, flags); | - |
| 1448 | if (p == 0| TRUE | evaluated 68 times by 1 test | | FALSE | evaluated 76 times by 1 test |
) | 68-76 |
| 1449 | returnexecuted 68 times by 1 test: return 1; 1;executed 68 times by 1 test: return 1; | 68 |
| 1450 | } | - |
| 1451 | break;executed 76 times by 1 test: break; | 76 |
| 1452 | | - |
| 1453 | defaultexecuted 2839 times by 1 test: default: :executed 2839 times by 1 test: default: | 2839 |
| 1454 | if ((| TRUE | evaluated 719 times by 1 test | | FALSE | evaluated 2120 times by 1 test |
wint_t)c != ((| TRUE | never evaluated | | FALSE | evaluated 2839 times by 1 test |
flags & (1 << 4))| TRUE | never evaluated | | FALSE | evaluated 2839 times by 1 test |
&& iswupper (sc)| TRUE | never evaluated | | FALSE | never evaluated |
? towlower (sc) : (sc))| TRUE | evaluated 719 times by 1 test | | FALSE | evaluated 2120 times by 1 test |
) | 0-2839 |
| 1455 | returnexecuted 719 times by 1 test: return (1); (1);executed 719 times by 1 test: return (1); | 719 |
| 1456 | }executed 2120 times by 1 test: end of block | 2120 |
| 1457 | | - |
| 1458 | ++n; | - |
| 1459 | }executed 1532297 times by 1 test: end of block | 1532297 |
| 1460 | | - |
| 1461 | if (n == se| TRUE | evaluated 863901 times by 1 test | | FALSE | evaluated 667161 times by 1 test |
) | 667161-863901 |
| 1462 | returnexecuted 863901 times by 1 test: return (0); (0);executed 863901 times by 1 test: return (0); | 863901 |
| 1463 | | - |
| 1464 | if ((| TRUE | never evaluated | | FALSE | evaluated 667161 times by 1 test |
flags & (1 << 3))| TRUE | never evaluated | | FALSE | evaluated 667161 times by 1 test |
&& *| TRUE | never evaluated | | FALSE | never evaluated |
n == L'/'| TRUE | never evaluated | | FALSE | never evaluated |
) | 0-667161 |
| 1465 | | - |
| 1466 | return never executed: return 0; 0;never executed: return 0; | 0 |
| 1467 | | - |
| 1468 | returnexecuted 667161 times by 1 test: return (1); (1);executed 667161 times by 1 test: return (1); | 667161 |
| 1469 | } | - |
| 1470 | | - |
| 1471 | | - |
| 1472 | | - |
| 1473 | | - |
| 1474 | static wchar_t * | - |
| 1475 | parse_collwcsym (p, vp) | - |
| 1476 | wchar_t *p; | - |
| 1477 | wint_t *vp; | - |
| 1478 | { | - |
| 1479 | register int pc; | - |
| 1480 | wint_t val; | - |
| 1481 | | - |
| 1482 | p++; | - |
| 1483 | | - |
| 1484 | for (pc = 0; p[pc]| TRUE | never evaluated | | FALSE | never evaluated |
; pc++) | 0 |
| 1485 | if (p[pc] == L'.'| TRUE | never evaluated | | FALSE | never evaluated |
&& p[pc+1] == L']'| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1486 | break; never executed: break; | 0 |
| 1487 | if (p[pc] == 0| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1488 | { | - |
| 1489 | if (vp| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1490 | * never executed: *vp = (0xffffffffu) ; vp = never executed: *vp = (0xffffffffu) ; | 0 |
| 1491 | (0xffffffffu) never executed: *vp = (0xffffffffu) ; | 0 |
| 1492 | ; never executed: *vp = (0xffffffffu) ; | 0 |
| 1493 | return never executed: return (p + pc); (p + pc);never executed: return (p + pc); | 0 |
| 1494 | } | - |
| 1495 | val = collwcsym (p, pc); | - |
| 1496 | if (vp| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1497 | * never executed: *vp = val; vp = val;never executed: *vp = val; | 0 |
| 1498 | return never executed: return (p + pc + 2); (p + pc + 2);never executed: return (p + pc + 2); | 0 |
| 1499 | } | - |
| 1500 | | - |
| 1501 | | - |
| 1502 | static wchar_t * | - |
| 1503 | | - |
| 1504 | brackmatch_wc (wchar_t *p, wint_t test, int flags) | - |
| 1505 | | - |
| 1506 | | - |
| 1507 | | - |
| 1508 | | - |
| 1509 | | - |
| 1510 | | - |
| 1511 | { | - |
| 1512 | register wchar_t cstart, cend, c; | - |
| 1513 | register int not; | - |
| 1514 | int brcnt, brchr, forcecoll; | - |
| 1515 | wint_t pc; | - |
| 1516 | wchar_t *savep; | - |
| 1517 | wint_t orig_test; | - |
| 1518 | | - |
| 1519 | orig_test = test; | - |
| 1520 | test = ((| TRUE | never evaluated | | FALSE | evaluated 144 times by 1 test |
flags & (1 << 4))| TRUE | never evaluated | | FALSE | evaluated 144 times by 1 test |
&& iswupper (orig_test)| TRUE | never evaluated | | FALSE | never evaluated |
? towlower (orig_test) : (orig_test)); | 0-144 |
| 1521 | | - |
| 1522 | savep = p; | - |
| 1523 | | - |
| 1524 | | - |
| 1525 | | - |
| 1526 | | - |
| 1527 | | - |
| 1528 | if (not = (*| TRUE | evaluated 144 times by 1 test | | FALSE | never evaluated |
p == L'!'| TRUE | evaluated 144 times by 1 test | | FALSE | never evaluated |
|| *| TRUE | never evaluated | | FALSE | never evaluated |
p == L'^'| TRUE | never evaluated | | FALSE | never evaluated |
)) | 0-144 |
| 1529 | ++executed 144 times by 1 test: ++p; p;executed 144 times by 1 test: ++p; | 144 |
| 1530 | | - |
| 1531 | c = *p++; | - |
| 1532 | for (;;) | - |
| 1533 | { | - |
| 1534 | | - |
| 1535 | | - |
| 1536 | cstart = cend = c; | - |
| 1537 | forcecoll = 0; | - |
| 1538 | | - |
| 1539 | | - |
| 1540 | | - |
| 1541 | | - |
| 1542 | | - |
| 1543 | | - |
| 1544 | if (c == L'['| TRUE | never evaluated | | FALSE | evaluated 144 times by 1 test |
&& *| TRUE | never evaluated | | FALSE | never evaluated |
p == L'='| TRUE | never evaluated | | FALSE | never evaluated |
&& p[2] == L'='| TRUE | never evaluated | | FALSE | never evaluated |
&& p[3] == L']'| TRUE | never evaluated | | FALSE | never evaluated |
) | 0-144 |
| 1545 | { | - |
| 1546 | pc = ((| TRUE | never evaluated | | FALSE | never evaluated |
flags & (1 << 4))| TRUE | never evaluated | | FALSE | never evaluated |
&& iswupper (p[1])| TRUE | never evaluated | | FALSE | never evaluated |
? towlower (p[1]) : (p[1])); | 0 |
| 1547 | p += 4; | - |
| 1548 | if (collequiv_wc((test), (pc))| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1549 | { | - |
| 1550 | | - |
| 1551 | | - |
| 1552 | p++; | - |
| 1553 | goto never executed: goto matched; matched;never executed: goto matched; | 0 |
| 1554 | } | - |
| 1555 | else | - |
| 1556 | { | - |
| 1557 | c = *p++; | - |
| 1558 | if (c == L'\0'| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1559 | return never executed: return ((test == L'[') ? savep : (wchar_t *)0); ((test == L'[') ? savep : (wchar_t *)0);never executed: return ((test == L'[') ? savep : (wchar_t *)0); | 0 |
| 1560 | c = ((| TRUE | never evaluated | | FALSE | never evaluated |
flags & (1 << 4))| TRUE | never evaluated | | FALSE | never evaluated |
&& iswupper (c)| TRUE | never evaluated | | FALSE | never evaluated |
? towlower (c) : (c)); | 0 |
| 1561 | continue; never executed: continue; | 0 |
| 1562 | } | - |
| 1563 | } | - |
| 1564 | | - |
| 1565 | | - |
| 1566 | if (c == L'['| TRUE | never evaluated | | FALSE | evaluated 144 times by 1 test |
&& *| TRUE | never evaluated | | FALSE | never evaluated |
p == L':'| TRUE | never evaluated | | FALSE | never evaluated |
) | 0-144 |
| 1567 | { | - |
| 1568 | wchar_t *close, *ccname; | - |
| 1569 | | - |
| 1570 | pc = 0; | - |
| 1571 | | - |
| 1572 | for (close = p + 1; *| TRUE | never evaluated | | FALSE | never evaluated |
close != '\0'| TRUE | never evaluated | | FALSE | never evaluated |
; close++) | 0 |
| 1573 | if (*| TRUE | never evaluated | | FALSE | never evaluated |
close == L':'| TRUE | never evaluated | | FALSE | never evaluated |
&& *(| TRUE | never evaluated | | FALSE | never evaluated |
close+1) == L']'| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1574 | break; never executed: break; | 0 |
| 1575 | | - |
| 1576 | if (*| TRUE | never evaluated | | FALSE | never evaluated |
close != L'\0'| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1577 | { | - |
| 1578 | ccname = (wchar_t *)malloc ((close - p) * sizeof (wchar_t)); | - |
| 1579 | if (ccname == 0| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1580 | pc = 0; never executed: pc = 0; | 0 |
| 1581 | else | - |
| 1582 | { | - |
| 1583 | bcopy (p + 1, ccname, (close - p - 1) * sizeof (wchar_t)); | - |
| 1584 | *(ccname + (close - p - 1)) = L'\0'; | - |
| 1585 | pc = is_wcclass((orig_test), ((wchar_t *)ccname)); | - |
| 1586 | } never executed: end of block | 0 |
| 1587 | if (pc == -1| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1588 | pc = 0; never executed: pc = 0; | 0 |
| 1589 | else | - |
| 1590 | p = close + 2; never executed: p = close + 2; | 0 |
| 1591 | | - |
| 1592 | sh_xfree((ccname), "sm_loop.c", 465); | - |
| 1593 | } never executed: end of block | 0 |
| 1594 | | - |
| 1595 | if (pc| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1596 | { | - |
| 1597 | | - |
| 1598 | | - |
| 1599 | p++; | - |
| 1600 | goto never executed: goto matched; matched;never executed: goto matched; | 0 |
| 1601 | } | - |
| 1602 | else | - |
| 1603 | { | - |
| 1604 | | - |
| 1605 | | - |
| 1606 | c = *p++; | - |
| 1607 | if (c == L'\0'| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1608 | return never executed: return ((test == L'[') ? savep : (wchar_t *)0); ((test == L'[') ? savep : (wchar_t *)0);never executed: return ((test == L'[') ? savep : (wchar_t *)0); | 0 |
| 1609 | else if (c == L']'| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1610 | break; never executed: break; | 0 |
| 1611 | c = ((| TRUE | never evaluated | | FALSE | never evaluated |
flags & (1 << 4))| TRUE | never evaluated | | FALSE | never evaluated |
&& iswupper (c)| TRUE | never evaluated | | FALSE | never evaluated |
? towlower (c) : (c)); | 0 |
| 1612 | continue; never executed: continue; | 0 |
| 1613 | } | - |
| 1614 | } | - |
| 1615 | | - |
| 1616 | | - |
| 1617 | | - |
| 1618 | | - |
| 1619 | | - |
| 1620 | if (c == L'['| TRUE | never evaluated | | FALSE | evaluated 144 times by 1 test |
&& *| TRUE | never evaluated | | FALSE | never evaluated |
p == L'.'| TRUE | never evaluated | | FALSE | never evaluated |
) | 0-144 |
| 1621 | { | - |
| 1622 | p = parse_collwcsym (p, &pc); | - |
| 1623 | | - |
| 1624 | | - |
| 1625 | | - |
| 1626 | cstart = (| TRUE | never evaluated | | FALSE | never evaluated |
pc == | TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 1627 | (0xffffffffu)| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 1628 | )| TRUE | never evaluated | | FALSE | never evaluated |
? test + 1 : pc; | 0 |
| 1629 | forcecoll = 1; | - |
| 1630 | } never executed: end of block | 0 |
| 1631 | | - |
| 1632 | if (!(flags & (1 << 1))| TRUE | evaluated 144 times by 1 test | | FALSE | never evaluated |
&& c == L'\\'| TRUE | never evaluated | | FALSE | evaluated 144 times by 1 test |
) | 0-144 |
| 1633 | { | - |
| 1634 | if (*| TRUE | never evaluated | | FALSE | never evaluated |
p == '\0'| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1635 | return never executed: return (wchar_t *)0; (wchar_t *)0;never executed: return (wchar_t *)0; | 0 |
| 1636 | cstart = cend = *p++; | - |
| 1637 | } never executed: end of block | 0 |
| 1638 | | - |
| 1639 | cstart = cend = ((| TRUE | never evaluated | | FALSE | evaluated 144 times by 1 test |
flags & (1 << 4))| TRUE | never evaluated | | FALSE | evaluated 144 times by 1 test |
&& iswupper (cstart)| TRUE | never evaluated | | FALSE | never evaluated |
? towlower (cstart) : (cstart)); | 0-144 |
| 1640 | | - |
| 1641 | | - |
| 1642 | | - |
| 1643 | | - |
| 1644 | | - |
| 1645 | | - |
| 1646 | if (c == L'\0'| TRUE | never evaluated | | FALSE | evaluated 144 times by 1 test |
) | 0-144 |
| 1647 | return never executed: return ((test == L'[') ? savep : (wchar_t *)0); ((test == L'[') ? savep : (wchar_t *)0);never executed: return ((test == L'[') ? savep : (wchar_t *)0); | 0 |
| 1648 | | - |
| 1649 | c = *p++; | - |
| 1650 | c = ((| TRUE | never evaluated | | FALSE | evaluated 144 times by 1 test |
flags & (1 << 4))| TRUE | never evaluated | | FALSE | evaluated 144 times by 1 test |
&& iswupper (c)| TRUE | never evaluated | | FALSE | never evaluated |
? towlower (c) : (c)); | 0-144 |
| 1651 | | - |
| 1652 | if (c == L'\0'| TRUE | never evaluated | | FALSE | evaluated 144 times by 1 test |
) | 0-144 |
| 1653 | return never executed: return ((test == L'[') ? savep : (wchar_t *)0); ((test == L'[') ? savep : (wchar_t *)0);never executed: return ((test == L'[') ? savep : (wchar_t *)0); | 0 |
| 1654 | | - |
| 1655 | if ((| TRUE | never evaluated | | FALSE | evaluated 144 times by 1 test |
flags & (1 << 0))| TRUE | never evaluated | | FALSE | evaluated 144 times by 1 test |
&& c == L'/'| TRUE | never evaluated | | FALSE | never evaluated |
) | 0-144 |
| 1656 | | - |
| 1657 | return never executed: return (wchar_t *)0; (wchar_t *)0;never executed: return (wchar_t *)0; | 0 |
| 1658 | | - |
| 1659 | | - |
| 1660 | | - |
| 1661 | | - |
| 1662 | if (c == L'-'| TRUE | never evaluated | | FALSE | evaluated 144 times by 1 test |
&& *| TRUE | never evaluated | | FALSE | never evaluated |
p != L']'| TRUE | never evaluated | | FALSE | never evaluated |
) | 0-144 |
| 1663 | { | - |
| 1664 | cend = *p++; | - |
| 1665 | if (!(flags & (1 << 1))| TRUE | never evaluated | | FALSE | never evaluated |
&& cend == L'\\'| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1666 | cend = *p++; never executed: cend = *p++; | 0 |
| 1667 | if (cend == L'\0'| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1668 | return never executed: return (wchar_t *)0; (wchar_t *)0;never executed: return (wchar_t *)0; | 0 |
| 1669 | if (cend == L'['| TRUE | never evaluated | | FALSE | never evaluated |
&& *| TRUE | never evaluated | | FALSE | never evaluated |
p == L'.'| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1670 | { | - |
| 1671 | p = parse_collwcsym (p, &pc); | - |
| 1672 | | - |
| 1673 | | - |
| 1674 | | - |
| 1675 | cend = (| TRUE | never evaluated | | FALSE | never evaluated |
pc == | TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 1676 | (0xffffffffu)| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 1677 | )| TRUE | never evaluated | | FALSE | never evaluated |
? test - 1 : pc; | 0 |
| 1678 | forcecoll = 1; | - |
| 1679 | } never executed: end of block | 0 |
| 1680 | cend = ((| TRUE | never evaluated | | FALSE | never evaluated |
flags & (1 << 4))| TRUE | never evaluated | | FALSE | never evaluated |
&& iswupper (cend)| TRUE | never evaluated | | FALSE | never evaluated |
? towlower (cend) : (cend)); | 0 |
| 1681 | | - |
| 1682 | c = *p++; | - |
| 1683 | | - |
| 1684 | | - |
| 1685 | | - |
| 1686 | | - |
| 1687 | | - |
| 1688 | | - |
| 1689 | if (rangecmp_wc((cstart), (cend), (forcecoll)) > 0| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1690 | { | - |
| 1691 | if (c == L']'| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1692 | break; never executed: break; | 0 |
| 1693 | c = ((| TRUE | never evaluated | | FALSE | never evaluated |
flags & (1 << 4))| TRUE | never evaluated | | FALSE | never evaluated |
&& iswupper (c)| TRUE | never evaluated | | FALSE | never evaluated |
? towlower (c) : (c)); | 0 |
| 1694 | continue; never executed: continue; | 0 |
| 1695 | } | - |
| 1696 | } never executed: end of block | 0 |
| 1697 | | - |
| 1698 | if (rangecmp_wc((test), (cstart), (forcecoll)) >= 0| TRUE | evaluated 144 times by 1 test | | FALSE | never evaluated |
&& rangecmp_wc((test), (cend), (forcecoll)) <= 0| TRUE | evaluated 68 times by 1 test | | FALSE | evaluated 76 times by 1 test |
) | 0-144 |
| 1699 | gotoexecuted 68 times by 1 test: goto matched; matched;executed 68 times by 1 test: goto matched; | 68 |
| 1700 | | - |
| 1701 | if (c == L']'| TRUE | evaluated 76 times by 1 test | | FALSE | never evaluated |
) | 0-76 |
| 1702 | break;executed 76 times by 1 test: break; | 76 |
| 1703 | } never executed: end of block | 0 |
| 1704 | | - |
| 1705 | returnexecuted 76 times by 1 test: return (!not ? (wchar_t *)0 : p); (!not ? (wchar_t *)0 : p);executed 76 times by 1 test: return (!not ? (wchar_t *)0 : p); | 76 |
| 1706 | | - |
| 1707 | matched: | - |
| 1708 | | - |
| 1709 | c = *--p; | - |
| 1710 | brcnt = 1; | - |
| 1711 | brchr = 0; | - |
| 1712 | while (brcnt > 0| TRUE | evaluated 68 times by 1 test | | FALSE | evaluated 68 times by 1 test |
) | 68 |
| 1713 | { | - |
| 1714 | int oc; | - |
| 1715 | | - |
| 1716 | | - |
| 1717 | if (c == L'\0'| TRUE | never evaluated | | FALSE | evaluated 68 times by 1 test |
) | 0-68 |
| 1718 | return never executed: return ((test == L'[') ? savep : (wchar_t *)0); ((test == L'[') ? savep : (wchar_t *)0);never executed: return ((test == L'[') ? savep : (wchar_t *)0); | 0 |
| 1719 | | - |
| 1720 | oc = c; | - |
| 1721 | c = *p++; | - |
| 1722 | if (c == L'['| TRUE | never evaluated | | FALSE | evaluated 68 times by 1 test |
&& (*| TRUE | never evaluated | | FALSE | never evaluated |
p == L'='| TRUE | never evaluated | | FALSE | never evaluated |
|| *| TRUE | never evaluated | | FALSE | never evaluated |
p == L':'| TRUE | never evaluated | | FALSE | never evaluated |
|| *| TRUE | never evaluated | | FALSE | never evaluated |
p == L'.'| TRUE | never evaluated | | FALSE | never evaluated |
)) | 0-68 |
| 1723 | { | - |
| 1724 | brcnt++; | - |
| 1725 | brchr = *p; | - |
| 1726 | } never executed: end of block | 0 |
| 1727 | | - |
| 1728 | else if (c == L']'| TRUE | evaluated 68 times by 1 test | | FALSE | never evaluated |
&& brcnt > 1| TRUE | never evaluated | | FALSE | evaluated 68 times by 1 test |
&& brchr != 0| TRUE | never evaluated | | FALSE | never evaluated |
&& oc == brchr| TRUE | never evaluated | | FALSE | never evaluated |
) | 0-68 |
| 1729 | brcnt--; never executed: brcnt--; | 0 |
| 1730 | else if (c == L']'| TRUE | evaluated 68 times by 1 test | | FALSE | never evaluated |
&& brcnt == 1| TRUE | evaluated 68 times by 1 test | | FALSE | never evaluated |
) | 0-68 |
| 1731 | brcnt--;executed 68 times by 1 test: brcnt--; | 68 |
| 1732 | else if (!(flags & (1 << 1))| TRUE | never evaluated | | FALSE | never evaluated |
&& c == L'\\'| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1733 | { | - |
| 1734 | if (*| TRUE | never evaluated | | FALSE | never evaluated |
p == '\0'| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1735 | return never executed: return (wchar_t *)0; (wchar_t *)0;never executed: return (wchar_t *)0; | 0 |
| 1736 | | - |
| 1737 | ++p; | - |
| 1738 | } never executed: end of block | 0 |
| 1739 | }executed 68 times by 1 test: end of block | 68 |
| 1740 | returnexecuted 68 times by 1 test: return (not ? (wchar_t *)0 : p); (not ? (wchar_t *)0 : p);executed 68 times by 1 test: return (not ? (wchar_t *)0 : p); | 68 |
| 1741 | } | - |
| 1742 | wchar_t * | - |
| 1743 | glob_patscan_wc (string, end, delim) | - |
| 1744 | wchar_t *string, *end; | - |
| 1745 | wint_t delim; | - |
| 1746 | { | - |
| 1747 | int pnest, bnest, skip; | - |
| 1748 | wint_t cchar; | - |
| 1749 | wchar_t *s, c, *bfirst; | - |
| 1750 | | - |
| 1751 | pnest = bnest = skip = 0; | - |
| 1752 | cchar = 0; | - |
| 1753 | bfirst = | - |
| 1754 | ((void *)0) | - |
| 1755 | ; | - |
| 1756 | | - |
| 1757 | if (string == end| TRUE | never evaluated | | FALSE | evaluated 152 times by 1 test |
) | 0-152 |
| 1758 | return never executed: return ( ((void *)0) ); (never executed: return ( ((void *)0) ); | 0 |
| 1759 | ((void *)0) never executed: return ( ((void *)0) ); | 0 |
| 1760 | ); never executed: return ( ((void *)0) ); | 0 |
| 1761 | | - |
| 1762 | for (s = string; c = *s| TRUE | evaluated 482 times by 1 test | | FALSE | never evaluated |
; s++) | 0-482 |
| 1763 | { | - |
| 1764 | if (s >= end| TRUE | never evaluated | | FALSE | evaluated 482 times by 1 test |
) | 0-482 |
| 1765 | return never executed: return (s); (s);never executed: return (s); | 0 |
| 1766 | if (skip| TRUE | never evaluated | | FALSE | evaluated 482 times by 1 test |
) | 0-482 |
| 1767 | { | - |
| 1768 | skip = 0; | - |
| 1769 | continue; never executed: continue; | 0 |
| 1770 | } | - |
| 1771 | switch (c) | - |
| 1772 | { | - |
| 1773 | case never executed: case L'\\': L'\\':never executed: case L'\\': | 0 |
| 1774 | skip = 1; | - |
| 1775 | break; never executed: break; | 0 |
| 1776 | | - |
| 1777 | case never executed: case L'\0': L'\0':never executed: case L'\0': | 0 |
| 1778 | return never executed: return ((wchar_t *) ((void *)0) ); ((wchar_t *)never executed: return ((wchar_t *) ((void *)0) ); | 0 |
| 1779 | ((void *)0) never executed: return ((wchar_t *) ((void *)0) ); | 0 |
| 1780 | ); never executed: return ((wchar_t *) ((void *)0) ); | 0 |
| 1781 | | - |
| 1782 | | - |
| 1783 | | - |
| 1784 | | - |
| 1785 | case never executed: case L'[': L'[':never executed: case L'[': | 0 |
| 1786 | if (bnest == 0| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1787 | { | - |
| 1788 | bfirst = s + 1; | - |
| 1789 | if (*| TRUE | never evaluated | | FALSE | never evaluated |
bfirst == L'!'| TRUE | never evaluated | | FALSE | never evaluated |
|| *| TRUE | never evaluated | | FALSE | never evaluated |
bfirst == L'^'| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1790 | bfirst++; never executed: bfirst++; | 0 |
| 1791 | bnest++; | - |
| 1792 | } never executed: end of block | 0 |
| 1793 | else if (s[1] == L':'| TRUE | never evaluated | | FALSE | never evaluated |
|| s[1] == L'.'| TRUE | never evaluated | | FALSE | never evaluated |
|| s[1] == L'='| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1794 | cchar = s[1]; never executed: cchar = s[1]; | 0 |
| 1795 | break; never executed: break; | 0 |
| 1796 | | - |
| 1797 | | - |
| 1798 | | - |
| 1799 | | - |
| 1800 | case never executed: case L']': L']':never executed: case L']': | 0 |
| 1801 | if (bnest| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1802 | { | - |
| 1803 | if (cchar| TRUE | never evaluated | | FALSE | never evaluated |
&& s[-1] == cchar| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1804 | cchar = 0; never executed: cchar = 0; | 0 |
| 1805 | else if (s != bfirst| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1806 | { | - |
| 1807 | bnest--; | - |
| 1808 | bfirst = 0; | - |
| 1809 | } never executed: end of block | 0 |
| 1810 | } never executed: end of block | 0 |
| 1811 | break; never executed: break; | 0 |
| 1812 | | - |
| 1813 | case never executed: case L'(': L'(':never executed: case L'(': | 0 |
| 1814 | if (bnest == 0| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1815 | pnest++; never executed: pnest++; | 0 |
| 1816 | break; never executed: break; | 0 |
| 1817 | | - |
| 1818 | caseexecuted 100 times by 1 test: case L')': L')':executed 100 times by 1 test: case L')': | 100 |
| 1819 | if (bnest == 0| TRUE | evaluated 100 times by 1 test | | FALSE | never evaluated |
&& pnest-- <= 0| TRUE | evaluated 100 times by 1 test | | FALSE | never evaluated |
) | 0-100 |
| 1820 | returnexecuted 100 times by 1 test: return ++s; ++s;executed 100 times by 1 test: return ++s; | 100 |
| 1821 | break; never executed: break; | 0 |
| 1822 | | - |
| 1823 | caseexecuted 104 times by 1 test: case L'|': L'|':executed 104 times by 1 test: case L'|': | 104 |
| 1824 | if (bnest == 0| TRUE | evaluated 104 times by 1 test | | FALSE | never evaluated |
&& pnest == 0| TRUE | evaluated 104 times by 1 test | | FALSE | never evaluated |
&& delim == L'|'| TRUE | evaluated 52 times by 1 test | | FALSE | evaluated 52 times by 1 test |
) | 0-104 |
| 1825 | returnexecuted 52 times by 1 test: return ++s; ++s;executed 52 times by 1 test: return ++s; | 52 |
| 1826 | break;executed 52 times by 1 test: break; | 52 |
| 1827 | } | - |
| 1828 | }executed 330 times by 1 test: end of block | 330 |
| 1829 | | - |
| 1830 | return never executed: return ( ((void *)0) ); (never executed: return ( ((void *)0) ); | 0 |
| 1831 | ((void *)0) never executed: return ( ((void *)0) ); | 0 |
| 1832 | ); never executed: return ( ((void *)0) ); | 0 |
| 1833 | } | - |
| 1834 | | - |
| 1835 | | - |
| 1836 | static int | - |
| 1837 | wscompare (p, pe, s, se) | - |
| 1838 | wchar_t *p, *pe, *s, *se; | - |
| 1839 | { | - |
| 1840 | int ret; | - |
| 1841 | wchar_t c1, c2; | - |
| 1842 | int l1, l2; | - |
| 1843 | | - |
| 1844 | l1 = pe - p; | - |
| 1845 | l2 = se - s; | - |
| 1846 | | - |
| 1847 | if (l1 != l2| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1848 | return never executed: return (1); (1);never executed: return (1); | 0 |
| 1849 | | - |
| 1850 | c1 = *pe; | - |
| 1851 | c2 = *se; | - |
| 1852 | | - |
| 1853 | if (c1 != 0| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1854 | * never executed: *pe = '\0'; pe = '\0';never executed: *pe = '\0'; | 0 |
| 1855 | if (c2 != 0| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1856 | * never executed: *se = '\0'; se = '\0';never executed: *se = '\0'; | 0 |
| 1857 | | - |
| 1858 | | - |
| 1859 | ret = wcscoll(((wchar_t *)p), ((wchar_t *)s)); | - |
| 1860 | | - |
| 1861 | | - |
| 1862 | | - |
| 1863 | | - |
| 1864 | if (c1 != 0| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1865 | * never executed: *pe = c1; pe = c1;never executed: *pe = c1; | 0 |
| 1866 | if (c2 != 0| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1867 | * never executed: *se = c2; se = c2;never executed: *se = c2; | 0 |
| 1868 | | - |
| 1869 | return never executed: return (ret == 0 ? ret : 1); (ret == 0 ? ret : 1);never executed: return (ret == 0 ? ret : 1); | 0 |
| 1870 | } | - |
| 1871 | | - |
| 1872 | | - |
| 1873 | | - |
| 1874 | | - |
| 1875 | | - |
| 1876 | static int | - |
| 1877 | extmatch_wc (xc, s, se, p, pe, flags) | - |
| 1878 | wint_t xc; | - |
| 1879 | wchar_t *s, *se; | - |
| 1880 | wchar_t *p, *pe; | - |
| 1881 | int flags; | - |
| 1882 | { | - |
| 1883 | wchar_t *prest; | - |
| 1884 | wchar_t *psub; | - |
| 1885 | wchar_t *pnext; | - |
| 1886 | wchar_t *srest; | - |
| 1887 | int m1, m2, xflags; | - |
| 1888 | prest = glob_patscan_wc (p + (*p == L'('), pe, 0); | - |
| 1889 | if (prest == 0| TRUE | never evaluated | | FALSE | evaluated 52 times by 1 test |
) | 0-52 |
| 1890 | | - |
| 1891 | | - |
| 1892 | return never executed: return (wscompare (p - 1, pe, s, se)); (wscompare (p - 1, pe, s, se));never executed: return (wscompare (p - 1, pe, s, se)); | 0 |
| 1893 | | - |
| 1894 | switch (xc) | - |
| 1895 | { | - |
| 1896 | caseexecuted 19 times by 1 test: case L'+': L'+':executed 19 times by 1 test: case L'+': | 19 |
| 1897 | caseexecuted 33 times by 1 test: case L'*': L'*':executed 33 times by 1 test: case L'*': | 33 |
| 1898 | | - |
| 1899 | | - |
| 1900 | | - |
| 1901 | if (xc == L'*'| TRUE | evaluated 33 times by 1 test | | FALSE | evaluated 19 times by 1 test |
&& (| TRUE | never evaluated | | FALSE | evaluated 33 times by 1 test |
gmatch_wc (s, se, prest, pe, | TRUE | never evaluated | | FALSE | evaluated 33 times by 1 test |
| 0-33 |
| 1902 | ((void *)0)| TRUE | never evaluated | | FALSE | evaluated 33 times by 1 test |
| 0-33 |
| 1903 | , flags) == 0)| TRUE | never evaluated | | FALSE | evaluated 33 times by 1 test |
) | 0-33 |
| 1904 | return never executed: return 0; 0;never executed: return 0; | 0 |
| 1905 | | - |
| 1906 | | - |
| 1907 | | - |
| 1908 | | - |
| 1909 | for (psub = p + 1; ; psub = pnext) | - |
| 1910 | { | - |
| 1911 | pnext = glob_patscan_wc (psub, pe, L'|'); | - |
| 1912 | for (srest = s; srest <= se| TRUE | evaluated 290 times by 1 test | | FALSE | evaluated 90 times by 1 test |
; srest++) | 90-290 |
| 1913 | { | - |
| 1914 | | - |
| 1915 | | - |
| 1916 | m1 = gmatch_wc (s, srest, psub, pnext - 1, | - |
| 1917 | ((void *)0) | - |
| 1918 | , flags) == 0; | - |
| 1919 | | - |
| 1920 | | - |
| 1921 | | - |
| 1922 | if (m1| TRUE | evaluated 32 times by 1 test | | FALSE | evaluated 258 times by 1 test |
) | 32-258 |
| 1923 | { | - |
| 1924 | | - |
| 1925 | xflags = (| TRUE | evaluated 32 times by 1 test | | FALSE | never evaluated |
srest > s)| TRUE | evaluated 32 times by 1 test | | FALSE | never evaluated |
? (flags & ~(1 << 2)) : flags; | 0-32 |
| 1926 | m2 = (| TRUE | evaluated 7 times by 1 test | | FALSE | evaluated 25 times by 1 test |
gmatch_wc (srest, se, prest, pe, | TRUE | evaluated 7 times by 1 test | | FALSE | evaluated 25 times by 1 test |
| 7-25 |
| 1927 | ((void *)0)| TRUE | evaluated 7 times by 1 test | | FALSE | evaluated 25 times by 1 test |
| 7-25 |
| 1928 | , xflags) == 0)| TRUE | evaluated 7 times by 1 test | | FALSE | evaluated 25 times by 1 test |
|| | 7-25 |
| 1929 | (s != srest| TRUE | evaluated 25 times by 1 test | | FALSE | never evaluated |
&& gmatch_wc (srest, se, p - 1, pe, | TRUE | evaluated 3 times by 1 test | | FALSE | evaluated 22 times by 1 test |
| 0-25 |
| 1930 | ((void *)0)| TRUE | evaluated 3 times by 1 test | | FALSE | evaluated 22 times by 1 test |
| 3-22 |
| 1931 | , xflags) == 0| TRUE | evaluated 3 times by 1 test | | FALSE | evaluated 22 times by 1 test |
); | 3-22 |
| 1932 | }executed 32 times by 1 test: end of block | 32 |
| 1933 | if (m1| TRUE | evaluated 32 times by 1 test | | FALSE | evaluated 258 times by 1 test |
&& m2| TRUE | evaluated 10 times by 1 test | | FALSE | evaluated 22 times by 1 test |
) | 10-258 |
| 1934 | returnexecuted 10 times by 1 test: return (0); (0);executed 10 times by 1 test: return (0); | 10 |
| 1935 | }executed 280 times by 1 test: end of block | 280 |
| 1936 | if (pnext == prest| TRUE | evaluated 42 times by 1 test | | FALSE | evaluated 48 times by 1 test |
) | 42-48 |
| 1937 | break;executed 42 times by 1 test: break; | 42 |
| 1938 | }executed 48 times by 1 test: end of block | 48 |
| 1939 | returnexecuted 42 times by 1 test: return (1); (1);executed 42 times by 1 test: return (1); | 42 |
| 1940 | | - |
| 1941 | case never executed: case L'?': L'?':never executed: case L'?': | 0 |
| 1942 | case never executed: case L'@': L'@':never executed: case L'@': | 0 |
| 1943 | | - |
| 1944 | | - |
| 1945 | | - |
| 1946 | if (xc == L'?'| TRUE | never evaluated | | FALSE | never evaluated |
&& (| TRUE | never evaluated | | FALSE | never evaluated |
gmatch_wc (s, se, prest, pe, | TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 1947 | ((void *)0)| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 1948 | , flags) == 0)| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1949 | return never executed: return 0; 0;never executed: return 0; | 0 |
| 1950 | | - |
| 1951 | | - |
| 1952 | | - |
| 1953 | | - |
| 1954 | for (psub = p + 1; ; psub = pnext) | - |
| 1955 | { | - |
| 1956 | pnext = glob_patscan_wc (psub, pe, L'|'); | - |
| 1957 | srest = (| TRUE | never evaluated | | FALSE | never evaluated |
prest == pe)| TRUE | never evaluated | | FALSE | never evaluated |
? se : s; | 0 |
| 1958 | for ( ; srest <= se| TRUE | never evaluated | | FALSE | never evaluated |
; srest++) | 0 |
| 1959 | { | - |
| 1960 | | - |
| 1961 | xflags = (| TRUE | never evaluated | | FALSE | never evaluated |
srest > s)| TRUE | never evaluated | | FALSE | never evaluated |
? (flags & ~(1 << 2)) : flags; | 0 |
| 1962 | if (gmatch_wc (s, srest, psub, pnext - 1, | TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 1963 | ((void *)0)| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 1964 | , flags) == 0| TRUE | never evaluated | | FALSE | never evaluated |
&& | 0 |
| 1965 | gmatch_wc (srest, se, prest, pe, | TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 1966 | ((void *)0)| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 1967 | , xflags) == 0| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1968 | return never executed: return (0); (0);never executed: return (0); | 0 |
| 1969 | } never executed: end of block | 0 |
| 1970 | if (pnext == prest| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1971 | break; never executed: break; | 0 |
| 1972 | } never executed: end of block | 0 |
| 1973 | return never executed: return (1); (1);never executed: return (1); | 0 |
| 1974 | | - |
| 1975 | case never executed: case '!': '!':never executed: case '!': | 0 |
| 1976 | for (srest = s; srest <= se| TRUE | never evaluated | | FALSE | never evaluated |
; srest++) | 0 |
| 1977 | { | - |
| 1978 | m1 = 0; | - |
| 1979 | for (psub = p + 1; ; psub = pnext) | - |
| 1980 | { | - |
| 1981 | pnext = glob_patscan_wc (psub, pe, L'|'); | - |
| 1982 | | - |
| 1983 | if (m1 = (gmatch_wc (s, srest, psub, pnext - 1, | TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 1984 | ((void *)0)| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 1985 | , flags) == 0)| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1986 | break; never executed: break; | 0 |
| 1987 | if (pnext == prest| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1988 | break; never executed: break; | 0 |
| 1989 | } never executed: end of block | 0 |
| 1990 | | - |
| 1991 | | - |
| 1992 | | - |
| 1993 | | - |
| 1994 | if (m1 == 0| TRUE | never evaluated | | FALSE | never evaluated |
&& *| TRUE | never evaluated | | FALSE | never evaluated |
s == '.'| TRUE | never evaluated | | FALSE | never evaluated |
&& (| TRUE | never evaluated | | FALSE | never evaluated |
flags & (1 << 2))| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1995 | return never executed: return (1); (1);never executed: return (1); | 0 |
| 1996 | | - |
| 1997 | | - |
| 1998 | xflags = (| TRUE | never evaluated | | FALSE | never evaluated |
srest > s)| TRUE | never evaluated | | FALSE | never evaluated |
? (flags & ~(1 << 2)) : flags; | 0 |
| 1999 | if (m1 == 0| TRUE | never evaluated | | FALSE | never evaluated |
&& gmatch_wc (srest, se, prest, pe, | TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 2000 | ((void *)0)| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 2001 | , xflags) == 0| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 2002 | return never executed: return (0); (0);never executed: return (0); | 0 |
| 2003 | } never executed: end of block | 0 |
| 2004 | return never executed: return (1); (1);never executed: return (1); | 0 |
| 2005 | } | - |
| 2006 | | - |
| 2007 | return never executed: return (1); (1);never executed: return (1); | 0 |
| 2008 | } | - |
| | |