OpenCoverage

glob_loop.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/bash/src/lib/glob/glob_loop.c
Switch to Source codePreprocessed file
LineSourceCount
1static int internal_glob_pattern_p (const unsigned char *);-
2-
3-
4-
5static int-
6internal_glob_pattern_p (pattern)-
7 const unsigned char *pattern;-
8{-
9 register const unsigned char *p;-
10 register unsigned char c;-
11 int bopen;-
12-
13 p = pattern;-
14 bopen = 0;-
15-
16 while ((
(c = *p++) != '\0'Description
TRUEevaluated 2766 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 274 times by 1 test
Evaluated by:
  • Self test
c = *p++) != '\0'
(c = *p++) != '\0'Description
TRUEevaluated 2766 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 274 times by 1 test
Evaluated by:
  • Self test
)
274-2766
17 switch (c)-
18 {-
19 case
never executed: case '?':
'?':
never executed: case '?':
0
20 case
executed 883 times by 1 test: case '*':
Executed by:
  • Self test
'*':
executed 883 times by 1 test: case '*':
Executed by:
  • Self test
883
21 return
executed 883 times by 1 test: return 1;
Executed by:
  • Self test
1;
executed 883 times by 1 test: return 1;
Executed by:
  • Self test
883
22-
23 case
executed 16 times by 1 test: case '[':
Executed by:
  • Self test
'[':
executed 16 times by 1 test: case '[':
Executed by:
  • Self test
16
24 bopen++;-
25 continue;
executed 16 times by 1 test: continue;
Executed by:
  • Self test
16
26 case
executed 16 times by 1 test: case ']':
Executed by:
  • Self test
']':
executed 16 times by 1 test: case ']':
Executed by:
  • Self test
16
27 if (bopen
bopenDescription
TRUEevaluated 16 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
)
0-16
28 return
executed 16 times by 1 test: return 1;
Executed by:
  • Self test
1;
executed 16 times by 1 test: return 1;
Executed by:
  • Self test
16
29 continue;
never executed: continue;
0
30-
31 case
never executed: case '+':
'+':
never executed: case '+':
0
32 case
executed 7 times by 1 test: case '@':
Executed by:
  • Self test
'@':
executed 7 times by 1 test: case '@':
Executed by:
  • Self test
7
33 case
executed 18 times by 1 test: case '!':
Executed by:
  • Self test
'!':
executed 18 times by 1 test: case '!':
Executed by:
  • Self test
18
34 if (*
*p == '('Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 13 times by 1 test
Evaluated by:
  • Self test
p == '('
*p == '('Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 13 times by 1 test
Evaluated by:
  • Self test
)
12-13
35 return
executed 12 times by 1 test: return 1;
Executed by:
  • Self test
1;
executed 12 times by 1 test: return 1;
Executed by:
  • Self test
12
36 continue;
executed 13 times by 1 test: continue;
Executed by:
  • Self test
13
37-
38 case
executed 6 times by 1 test: case '\\':
Executed by:
  • Self test
'\\':
executed 6 times by 1 test: case '\\':
Executed by:
  • Self test
6
39 if (*
*p++ == '\0'Description
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • Self test
p++ == '\0'
*p++ == '\0'Description
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • Self test
)
0-6
40 return
never executed: return 0;
0;
never executed: return 0;
0
41 }
executed 6 times by 1 test: end of block
Executed by:
  • Self test
6
42-
43 return
executed 274 times by 1 test: return 0;
Executed by:
  • Self test
0;
executed 274 times by 1 test: return 0;
Executed by:
  • Self test
274
44}-
45static int internal_glob_wpattern_p (const wchar_t *);-
46-
47-
48-
49static int-
50internal_glob_wpattern_p (pattern)-
51 const wchar_t *pattern;-
52{-
53 register const wchar_t *p;-
54 register wchar_t c;-
55 int bopen;-
56-
57 p = pattern;-
58 bopen = 0;-
59-
60 while ((
(c = *p++) != L'\0'Description
TRUEevaluated 6829 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 159 times by 1 test
Evaluated by:
  • Self test
c = *p++) != L'\0'
(c = *p++) != L'\0'Description
TRUEevaluated 6829 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 159 times by 1 test
Evaluated by:
  • Self test
)
159-6829
61 switch (c)-
62 {-
63 case
executed 14 times by 1 test: case L'?':
Executed by:
  • Self test
L'?':
executed 14 times by 1 test: case L'?':
Executed by:
  • Self test
14
64 case
executed 197 times by 1 test: case L'*':
Executed by:
  • Self test
L'*':
executed 197 times by 1 test: case L'*':
Executed by:
  • Self test
197
65 return
executed 211 times by 1 test: return 1;
Executed by:
  • Self test
1;
executed 211 times by 1 test: return 1;
Executed by:
  • Self test
211
66-
67 case
executed 728 times by 1 test: case L'[':
Executed by:
  • Self test
L'[':
executed 728 times by 1 test: case L'[':
Executed by:
  • Self test
728
68 bopen++;-
69 continue;
executed 728 times by 1 test: continue;
Executed by:
  • Self test
728
70 case
executed 700 times by 1 test: case L']':
Executed by:
  • Self test
L']':
executed 700 times by 1 test: case L']':
Executed by:
  • Self test
700
71 if (bopen
bopenDescription
TRUEevaluated 700 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
)
0-700
72 return
executed 700 times by 1 test: return 1;
Executed by:
  • Self test
1;
executed 700 times by 1 test: return 1;
Executed by:
  • Self test
700
73 continue;
never executed: continue;
0
74-
75 case
executed 11 times by 1 test: case L'+':
Executed by:
  • Self test
L'+':
executed 11 times by 1 test: case L'+':
Executed by:
  • Self test
11
76 case
executed 19 times by 1 test: case L'@':
Executed by:
  • Self test
L'@':
executed 19 times by 1 test: case L'@':
Executed by:
  • Self test
19
77 case
executed 8 times by 1 test: case L'!':
Executed by:
  • Self test
L'!':
executed 8 times by 1 test: case L'!':
Executed by:
  • Self test
8
78 if (*
*p == L'('Description
TRUEevaluated 25 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 13 times by 1 test
Evaluated by:
  • Self test
p == L'('
*p == L'('Description
TRUEevaluated 25 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 13 times by 1 test
Evaluated by:
  • Self test
)
13-25
79 return
executed 25 times by 1 test: return 1;
Executed by:
  • Self test
1;
executed 25 times by 1 test: return 1;
Executed by:
  • Self test
25
80 continue;
executed 13 times by 1 test: continue;
Executed by:
  • Self test
13
81-
82 case
executed 34 times by 1 test: case L'\\':
Executed by:
  • Self test
L'\\':
executed 34 times by 1 test: case L'\\':
Executed by:
  • Self test
34
83 if (*
*p++ == L'\0'Description
TRUEnever evaluated
FALSEevaluated 34 times by 1 test
Evaluated by:
  • Self test
p++ == L'\0'
*p++ == L'\0'Description
TRUEnever evaluated
FALSEevaluated 34 times by 1 test
Evaluated by:
  • Self test
)
0-34
84 return
never executed: return 0;
0;
never executed: return 0;
0
85 }
executed 34 times by 1 test: end of block
Executed by:
  • Self test
34
86-
87 return
executed 159 times by 1 test: return 0;
Executed by:
  • Self test
0;
executed 159 times by 1 test: return 0;
Executed by:
  • Self test
159
88}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.1.2