OpenCoverage

ptx.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/coreutils/src/src/ptx.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3enum Format-
4{-
5 UNKNOWN_FORMAT,-
6 DUMB_FORMAT,-
7 ROFF_FORMAT,-
8 TEX_FORMAT-
9};-
10-
11static -
12 _Bool -
13 gnu_extensions = -
14 1-
15 ;-
16static -
17 _Bool -
18 auto_reference = -
19 0-
20 ;-
21static -
22 _Bool -
23 input_reference = -
24 0-
25 ;-
26static -
27 _Bool -
28 right_reference = -
29 0-
30 ;-
31static ptrdiff_t line_width = 72;-
32static ptrdiff_t gap_size = 3;-
33static const char *truncation_string = "/";-
34-
35static const char *macro_name = "xx";-
36static enum Format output_format = UNKNOWN_FORMAT;-
37-
38-
39static -
40 _Bool -
41 ignore_case = -
42 0-
43 ;-
44static const char *break_file = -
45 ((void *)0)-
46 ;-
47static const char *only_file = -
48 ((void *)0)-
49 ;-
50static const char *ignore_file = -
51 ((void *)0)-
52 ;-
53-
54-
55struct regex_data-
56{-
57-
58 char const *string;-
59-
60-
61 struct re_pattern_buffer pattern;-
62 char fastmap[-
63 (0x7f * 2 + 1) -
64 + 1];-
65};-
66-
67static struct regex_data context_regex;-
68static struct regex_data word_regex;-
69-
70-
71-
72-
73-
74typedef struct-
75 {-
76 char *start;-
77 char *end;-
78 }-
79BLOCK;-
80-
81typedef struct-
82 {-
83 char *start;-
84 ptrdiff_t size;-
85 }-
86WORD;-
87-
88typedef struct-
89 {-
90 WORD *start;-
91 size_t alloc;-
92 ptrdiff_t length;-
93 }-
94WORD_TABLE;-
95-
96-
97-
98-
99static unsigned char folded_chars[256];-
100-
101-
102static struct re_registers context_regs;-
103-
104-
105static struct re_registers word_regs;-
106-
107-
108-
109-
110-
111-
112static char word_fastmap[256];-
113-
114-
115static ptrdiff_t maximum_word_length;-
116-
117-
118static ptrdiff_t reference_max_width;-
119-
120-
121-
122static WORD_TABLE ignore_table;-
123static WORD_TABLE only_table;-
124-
125-
126-
127static int number_input_files;-
128static intmax_t total_line_count;-
129static const char **input_file_name;-
130static intmax_t *file_line_count;-
131-
132static BLOCK *text_buffers;-
133typedef struct-
134 {-
135 WORD key;-
136 ptrdiff_t left;-
137 ptrdiff_t right;-
138 intmax_t reference;-
139 int file_index;-
140 }-
141OCCURS;-
142-
143-
144-
145-
146static OCCURS *occurs_table[1];-
147static size_t occurs_alloc[1];-
148static ptrdiff_t number_of_occurs[1];-
149-
150-
151-
152-
153-
154static char edited_flag[256];-
155-
156-
157static ptrdiff_t half_line_width;-
158-
159-
160static ptrdiff_t before_max_width;-
161-
162-
163static ptrdiff_t keyafter_max_width;-
164-
165-
166static ptrdiff_t truncation_string_length;-
167-
168-
169-
170-
171-
172-
173-
174static BLOCK tail;-
175static -
176 _Bool -
177 tail_truncation;-
178-
179static BLOCK before;-
180static -
181 _Bool -
182 before_truncation;-
183-
184static BLOCK keyafter;-
185static -
186 _Bool -
187 keyafter_truncation;-
188-
189static BLOCK head;-
190static -
191 _Bool -
192 head_truncation;-
193-
194static BLOCK reference;-
195-
196-
197-
198-
199-
200static void __attribute__ ((__noreturn__))-
201matcher_error (void)-
202{-
203 ((!!sizeof (struct { _Static_assert (-
204 1-
205 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"error in regular expression matcher\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error (-
206 1-
207 , -
208 (*__errno_location ())-
209 , -
210 dcgettext (((void *)0), -
211 "error in regular expression matcher"-
212 , 5)-
213 ), ((-
214 0-
215 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (-
216 1-
217 , -
218 (*__errno_location ())-
219 , -
220 dcgettext (((void *)0), -
221 "error in regular expression matcher"-
222 , 5)-
223 ), ((-
224 0-
225 ) ? (void) 0 : __builtin_unreachable ()))));-
226}
never executed: end of block
0
227-
228-
229-
230-
231-
232-
233-
234static char *-
235copy_unescaped_string (const char *string)-
236{-
237 char *result;-
238 char *cursor;-
239 int value;-
240 int length;-
241-
242 result = xmalloc (strlen (string) + 1);-
243 cursor = result;-
244-
245 while (*
*stringDescription
TRUEevaluated 49 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 12 times by 1 test
Evaluated by:
  • ptx
string
*stringDescription
TRUEevaluated 49 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 12 times by 1 test
Evaluated by:
  • ptx
)
12-49
246 {-
247 if (*
*string == '\\'Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 45 times by 1 test
Evaluated by:
  • ptx
string == '\\'
*string == '\\'Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 45 times by 1 test
Evaluated by:
  • ptx
)
4-45
248 {-
249 string++;-
250 switch (*string)-
251 {-
252 case
never executed: case 'x':
'x':
never executed: case 'x':
0
253 value = 0;-
254 for (length = 0, string++;-
255 length < 3
length < 3Description
TRUEnever evaluated
FALSEnever evaluated
&&
0
256 ((*
((*__ctype_b_l...nt) _ISxdigit)Description
TRUEnever evaluated
FALSEnever evaluated
__ctype_b_loc ())[(int) ((
((*__ctype_b_l...nt) _ISxdigit)Description
TRUEnever evaluated
FALSEnever evaluated
0
257 to_uchar (*string)
((*__ctype_b_l...nt) _ISxdigit)Description
TRUEnever evaluated
FALSEnever evaluated
0
258 ))] & (unsigned short int) _ISxdigit)
((*__ctype_b_l...nt) _ISxdigit)Description
TRUEnever evaluated
FALSEnever evaluated
0
259 ;-
260 length++, string++)-
261 value = value * 16 + ((*
(*string) >= 'a'Description
TRUEnever evaluated
FALSEnever evaluated
string) >= 'a'
(*string) >= 'a'Description
TRUEnever evaluated
FALSEnever evaluated
&& (*
(*string) <= 'f'Description
TRUEnever evaluated
FALSEnever evaluated
string) <= 'f'
(*string) <= 'f'Description
TRUEnever evaluated
FALSEnever evaluated
? (*string)-'a'+10 : (*
(*string) >= 'A'Description
TRUEnever evaluated
FALSEnever evaluated
string) >= 'A'
(*string) >= 'A'Description
TRUEnever evaluated
FALSEnever evaluated
&& (*
(*string) <= 'F'Description
TRUEnever evaluated
FALSEnever evaluated
string) <= 'F'
(*string) <= 'F'Description
TRUEnever evaluated
FALSEnever evaluated
? (*string)-'A'+10 : (*string)-'0');
never executed: value = value * 16 + ((*string) >= 'a' && (*string) <= 'f' ? (*string)-'a'+10 : (*string) >= 'A' && (*string) <= 'F' ? (*string)-'A'+10 : (*string)-'0');
0
262 if (length == 0
length == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
263 {-
264 *cursor++ = '\\';-
265 *cursor++ = 'x';-
266 }
never executed: end of block
0
267 else-
268 *
never executed: *cursor++ = value;
cursor++ = value;
never executed: *cursor++ = value;
0
269 break;
never executed: break;
0
270-
271 case
never executed: case '0':
'0':
never executed: case '0':
0
272 value = 0;-
273 for (length = 0, string++;-
274 length < 3
length < 3Description
TRUEnever evaluated
FALSEnever evaluated
&& ((*
(*string) >= '0'Description
TRUEnever evaluated
FALSEnever evaluated
string) >= '0'
(*string) >= '0'Description
TRUEnever evaluated
FALSEnever evaluated
&& (*
(*string) <= '7'Description
TRUEnever evaluated
FALSEnever evaluated
string) <= '7'
(*string) <= '7'Description
TRUEnever evaluated
FALSEnever evaluated
);
0
275 length++, string++)-
276 value = value * 8 + ((*string) - '0');
never executed: value = value * 8 + ((*string) - '0');
0
277 *cursor++ = value;-
278 break;
never executed: break;
0
279-
280 case
never executed: case 'a':
'a':
never executed: case 'a':
0
281-
282 *cursor++ = '\a';-
283-
284-
285-
286 string++;-
287 break;
never executed: break;
0
288-
289 case
never executed: case 'b':
'b':
never executed: case 'b':
0
290 *cursor++ = '\b';-
291 string++;-
292 break;
never executed: break;
0
293-
294 case
never executed: case 'c':
'c':
never executed: case 'c':
0
295 while (*
*stringDescription
TRUEnever evaluated
FALSEnever evaluated
string
*stringDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
296 string++;
never executed: string++;
0
297 break;
never executed: break;
0
298-
299 case
never executed: case 'f':
'f':
never executed: case 'f':
0
300 *cursor++ = '\f';-
301 string++;-
302 break;
never executed: break;
0
303-
304 case
never executed: case 'n':
'n':
never executed: case 'n':
0
305 *cursor++ = '\n';-
306 string++;-
307 break;
never executed: break;
0
308-
309 case
never executed: case 'r':
'r':
never executed: case 'r':
0
310 *cursor++ = '\r';-
311 string++;-
312 break;
never executed: break;
0
313-
314 case
never executed: case 't':
't':
never executed: case 't':
0
315 *cursor++ = '\t';-
316 string++;-
317 break;
never executed: break;
0
318-
319 case
never executed: case 'v':
'v':
never executed: case 'v':
0
320-
321 *cursor++ = '\v';-
322-
323-
324-
325 string++;-
326 break;
never executed: break;
0
327-
328 case
executed 3 times by 1 test: case '\0':
Executed by:
  • ptx
'\0':
executed 3 times by 1 test: case '\0':
Executed by:
  • ptx
3
329-
330 break;
executed 3 times by 1 test: break;
Executed by:
  • ptx
3
331-
332 default
executed 1 time by 1 test: default:
Executed by:
  • ptx
:
executed 1 time by 1 test: default:
Executed by:
  • ptx
1
333 *cursor++ = '\\';-
334 *cursor++ = *string++;-
335 break;
executed 1 time by 1 test: break;
Executed by:
  • ptx
1
336 }-
337 }-
338 else-
339 *
executed 45 times by 1 test: *cursor++ = *string++;
Executed by:
  • ptx
cursor++ = *string++;
executed 45 times by 1 test: *cursor++ = *string++;
Executed by:
  • ptx
45
340 }-
341-
342 *cursor = '\0';-
343 return
executed 12 times by 1 test: return result;
Executed by:
  • ptx
result;
executed 12 times by 1 test: return result;
Executed by:
  • ptx
12
344}-
345-
346-
347-
348-
349-
350static void-
351compile_regex (struct regex_data *regex)-
352{-
353 struct re_pattern_buffer *pattern = &regex->pattern;-
354 char const *string = regex->string;-
355 char const *message;-
356-
357 pattern->buffer = -
358 ((void *)0)-
359 ;-
360 pattern->allocated = 0;-
361 pattern->fastmap = regex->fastmap;-
362 pattern->translate = ignore_case
ignore_caseDescription
TRUEnever evaluated
FALSEevaluated 30 times by 1 test
Evaluated by:
  • ptx
? folded_chars :
0-30
363 ((void *)0)-
364 ;-
365-
366 message = re_compile_pattern (string, strlen (string), pattern);-
367 if (message
messageDescription
TRUEnever evaluated
FALSEevaluated 30 times by 1 test
Evaluated by:
  • ptx
)
0-30
368 ((
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"%s (for regexp %s)\", 5), message, quote (string)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
!!sizeof (struct { _Static_assert (
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"%s (for regexp %s)\", 5), message, quote (string)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
369 1
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"%s (for regexp %s)\", 5), message, quote (string)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
370 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"%s (for regexp %s)\", 5), message, quote (string)), assume (false))" ")"); int _gl_dummy; })) ? ((error (
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"%s (for regexp %s)\", 5), message, quote (string)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
371 1
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"%s (for regexp %s)\", 5), message, quote (string)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
372 , 0,
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"%s (for regexp %s)\", 5), message, quote (string)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
373 dcgettext (((void *)0),
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"%s (for regexp %s)\", 5), message, quote (string)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
374 "%s (for regexp %s)"
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"%s (for regexp %s)\", 5), message, quote (string)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
375 , 5)
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"%s (for regexp %s)\", 5), message, quote (string)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
376 , message, quote (string)), ((
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"%s (for regexp %s)\", 5), message, quote (string)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
377 0
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"%s (for regexp %s)\", 5), message, quote (string)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
378 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"%s (for regexp %s)\", 5), message, quote (string)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
379 1
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"%s (for regexp %s)\", 5), message, quote (string)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
380 , 0,
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"%s (for regexp %s)\", 5), message, quote (string)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
381 dcgettext (((void *)0),
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"%s (for regexp %s)\", 5), message, quote (string)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
382 "%s (for regexp %s)"
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"%s (for regexp %s)\", 5), message, quote (string)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
383 , 5)
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"%s (for regexp %s)\", 5), message, quote (string)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
384 , message, quote (string)), ((
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"%s (for regexp %s)\", 5), message, quote (string)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
385 0
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"%s (for regexp %s)\", 5), message, quote (string)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
386 ) ? (void) 0 : __builtin_unreachable ()))));
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"%s (for regexp %s)\", 5), message, quote (string)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "%s (for regexp %s)" , 5) , message, quote (string)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
387-
388-
389-
390-
391-
392 re_compile_fastmap (pattern);-
393}
executed 30 times by 1 test: end of block
Executed by:
  • ptx
30
394-
395-
396-
397-
398-
399-
400static void-
401initialize_regex (void)-
402{-
403 int character;-
404-
405-
406-
407 if (ignore_case
ignore_caseDescription
TRUEnever evaluated
FALSEevaluated 29 times by 1 test
Evaluated by:
  • ptx
)
0-29
408 for (character = 0; character < 256
character < 256Description
TRUEnever evaluated
FALSEnever evaluated
; character++)
0
409 folded_chars[character] =
never executed: folded_chars[character] = (__extension__ ({ int __res; if (sizeof ( character ) > 1) { if (__builtin_constant_p ( character )) { int __c = ( character ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( character ); } else __res = (*__ctype_toupper_loc ())[(int) ( character )]; __res; })) ;
0
410 (__extension__ ({ int __res; if (sizeof (
sizeof ( character ) > 1Description
TRUEnever evaluated
FALSEnever evaluated
never executed: folded_chars[character] = (__extension__ ({ int __res; if (sizeof ( character ) > 1) { if (__builtin_constant_p ( character )) { int __c = ( character ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( character ); } else __res = (*__ctype_toupper_loc ())[(int) ( character )]; __res; })) ;
0
411 character
sizeof ( character ) > 1Description
TRUEnever evaluated
FALSEnever evaluated
never executed: folded_chars[character] = (__extension__ ({ int __res; if (sizeof ( character ) > 1) { if (__builtin_constant_p ( character )) { int __c = ( character ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( character ); } else __res = (*__ctype_toupper_loc ())[(int) ( character )]; __res; })) ;
0
412 ) > 1
sizeof ( character ) > 1Description
TRUEnever evaluated
FALSEnever evaluated
) { if (__builtin_constant_p (
__builtin_cons... ( character )Description
TRUEnever evaluated
FALSEnever evaluated
never executed: folded_chars[character] = (__extension__ ({ int __res; if (sizeof ( character ) > 1) { if (__builtin_constant_p ( character )) { int __c = ( character ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( character ); } else __res = (*__ctype_toupper_loc ())[(int) ( character )]; __res; })) ;
0
413 character
__builtin_cons... ( character )Description
TRUEnever evaluated
FALSEnever evaluated
never executed: folded_chars[character] = (__extension__ ({ int __res; if (sizeof ( character ) > 1) { if (__builtin_constant_p ( character )) { int __c = ( character ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( character ); } else __res = (*__ctype_toupper_loc ())[(int) ( character )]; __res; })) ;
0
414 )
__builtin_cons... ( character )Description
TRUEnever evaluated
FALSEnever evaluated
) { int __c = (
never executed: folded_chars[character] = (__extension__ ({ int __res; if (sizeof ( character ) > 1) { if (__builtin_constant_p ( character )) { int __c = ( character ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( character ); } else __res = (*__ctype_toupper_loc ())[(int) ( character )]; __res; })) ;
0
415 character
never executed: folded_chars[character] = (__extension__ ({ int __res; if (sizeof ( character ) > 1) { if (__builtin_constant_p ( character )) { int __c = ( character ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( character ); } else __res = (*__ctype_toupper_loc ())[(int) ( character )]; __res; })) ;
0
416 ); __res = __c < -128
__c < -128Description
TRUEnever evaluated
FALSEnever evaluated
|| __c > 255
__c > 255Description
TRUEnever evaluated
FALSEnever evaluated
? __c : (*__ctype_toupper_loc ())[__c]; }
never executed: end of block
else __res = toupper (
never executed: __res = toupper ( character );
never executed: folded_chars[character] = (__extension__ ({ int __res; if (sizeof ( character ) > 1) { if (__builtin_constant_p ( character )) { int __c = ( character ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( character ); } else __res = (*__ctype_toupper_loc ())[(int) ( character )]; __res; })) ;
0
417 character
never executed: __res = toupper ( character );
never executed: folded_chars[character] = (__extension__ ({ int __res; if (sizeof ( character ) > 1) { if (__builtin_constant_p ( character )) { int __c = ( character ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( character ); } else __res = (*__ctype_toupper_loc ())[(int) ( character )]; __res; })) ;
0
418 );
never executed: __res = toupper ( character );
} else __res = (*__ctype_toupper_loc ())[(int) (
never executed: __res = (*__ctype_toupper_loc ())[(int) ( character )];
never executed: folded_chars[character] = (__extension__ ({ int __res; if (sizeof ( character ) > 1) { if (__builtin_constant_p ( character )) { int __c = ( character ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( character ); } else __res = (*__ctype_toupper_loc ())[(int) ( character )]; __res; })) ;
0
419 character
never executed: __res = (*__ctype_toupper_loc ())[(int) ( character )];
never executed: folded_chars[character] = (__extension__ ({ int __res; if (sizeof ( character ) > 1) { if (__builtin_constant_p ( character )) { int __c = ( character ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( character ); } else __res = (*__ctype_toupper_loc ())[(int) ( character )]; __res; })) ;
0
420 )];
never executed: __res = (*__ctype_toupper_loc ())[(int) ( character )];
__res; }))
never executed: folded_chars[character] = (__extension__ ({ int __res; if (sizeof ( character ) > 1) { if (__builtin_constant_p ( character )) { int __c = ( character ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( character ); } else __res = (*__ctype_toupper_loc ())[(int) ( character )]; __res; })) ;
0
421 ;
never executed: folded_chars[character] = (__extension__ ({ int __res; if (sizeof ( character ) > 1) { if (__builtin_constant_p ( character )) { int __c = ( character ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( character ); } else __res = (*__ctype_toupper_loc ())[(int) ( character )]; __res; })) ;
0
422 if (context_regex.string
context_regex.stringDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 25 times by 1 test
Evaluated by:
  • ptx
)
4-25
423 {-
424 if (!*context_regex.string
!*context_regex.stringDescription
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • ptx
)
0-4
425 context_regex.string =
never executed: context_regex.string = ((void *)0) ;
0
426 ((void *)0)
never executed: context_regex.string = ((void *)0) ;
0
427 ;
never executed: context_regex.string = ((void *)0) ;
0
428 }
executed 4 times by 1 test: end of block
Executed by:
  • ptx
4
429 else if (gnu_extensions
gnu_extensionsDescription
TRUEevaluated 25 times by 1 test
Evaluated by:
  • ptx
FALSEnever evaluated
&& !input_reference
!input_referenceDescription
TRUEevaluated 25 times by 1 test
Evaluated by:
  • ptx
FALSEnever evaluated
)
0-25
430 context_regex.string = "[.?!][]\"')}]*\\($\\|\t\\| \\)[ \t\n]*";
executed 25 times by 1 test: context_regex.string = "[.?!][]\"')}]*\\($\\|\t\\| \\)[ \t\n]*";
Executed by:
  • ptx
25
431 else-
432 context_regex.string = "\n";
never executed: context_regex.string = "\n";
0
433-
434 if (context_regex.string
context_regex.stringDescription
TRUEevaluated 29 times by 1 test
Evaluated by:
  • ptx
FALSEnever evaluated
)
0-29
435 compile_regex (&context_regex);
executed 29 times by 1 test: compile_regex (&context_regex);
Executed by:
  • ptx
29
436 if (word_regex.string
word_regex.stringDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • ptx
FALSEevaluated 28 times by 1 test
Evaluated by:
  • ptx
)
1-28
437 compile_regex (&word_regex);
executed 1 time by 1 test: compile_regex (&word_regex);
Executed by:
  • ptx
1
438 else if (!break_file
!break_fileDescription
TRUEevaluated 28 times by 1 test
Evaluated by:
  • ptx
FALSEnever evaluated
)
0-28
439 {-
440 if (gnu_extensions
gnu_extensionsDescription
TRUEevaluated 28 times by 1 test
Evaluated by:
  • ptx
FALSEnever evaluated
)
0-28
441 {-
442-
443-
444-
445 for (character = 0; character < 256
character < 256Description
TRUEevaluated 7168 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 28 times by 1 test
Evaluated by:
  • ptx
; character++)
28-7168
446 word_fastmap[character] = !!
executed 7168 times by 1 test: word_fastmap[character] = !! ((*__ctype_b_loc ())[(int) (( character ))] & (unsigned short int) _ISalpha) ;
Executed by:
  • ptx
7168
447 ((*__ctype_b_loc ())[(int) ((
executed 7168 times by 1 test: word_fastmap[character] = !! ((*__ctype_b_loc ())[(int) (( character ))] & (unsigned short int) _ISalpha) ;
Executed by:
  • ptx
7168
448 character
executed 7168 times by 1 test: word_fastmap[character] = !! ((*__ctype_b_loc ())[(int) (( character ))] & (unsigned short int) _ISalpha) ;
Executed by:
  • ptx
7168
449 ))] & (unsigned short int) _ISalpha)
executed 7168 times by 1 test: word_fastmap[character] = !! ((*__ctype_b_loc ())[(int) (( character ))] & (unsigned short int) _ISalpha) ;
Executed by:
  • ptx
7168
450 ;
executed 7168 times by 1 test: word_fastmap[character] = !! ((*__ctype_b_loc ())[(int) (( character ))] & (unsigned short int) _ISalpha) ;
Executed by:
  • ptx
7168
451 }
executed 28 times by 1 test: end of block
Executed by:
  • ptx
28
452 else-
453 {-
454-
455-
456-
457 memset (word_fastmap, 1, 256);-
458 word_fastmap[' '] = 0;-
459 word_fastmap['\t'] = 0;-
460 word_fastmap['\n'] = 0;-
461 }
never executed: end of block
0
462 }-
463}
executed 29 times by 1 test: end of block
Executed by:
  • ptx
29
464static void-
465swallow_file_in_memory (const char *file_name, BLOCK *block)-
466{-
467 size_t used_length;-
468-
469-
470-
471-
472 -
473 _Bool -
474 using_stdin = !file_name
!file_nameDescription
TRUEevaluated 16 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
|| !*file_name
!*file_nameDescription
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
|| (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-16
475 __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
476 file_name
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
477 ) && __builtin_constant_p (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
478 "-"
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
479 ) && (__s1_len = __builtin_strlen (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
480 file_name
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
481 ), __s2_len = __builtin_strlen (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
482 "-"
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
483 ), (!((size_t)(const void *)((
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
484 file_name
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
485 ) + 1) - (size_t)(const void *)(
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
486 file_name
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
487 ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
488 "-"
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
489 ) + 1) - (size_t)(const void *)(
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
490 "-"
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
491 ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
492 file_name
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
493 ,
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
494 "-"
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
495 ) : (__builtin_constant_p (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
496 file_name
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
497 ) && ((size_t)(const void *)((
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
498 file_name
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
499 ) + 1) - (size_t)(const void *)(
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
500 file_name
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
501 ) == 1) && (__s1_len = __builtin_strlen (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
502 file_name
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
503 ), __s1_len < 4) ? (__builtin_constant_p (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
504 "-"
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
505 ) && ((size_t)(const void *)((
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
506 "-"
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
507 ) + 1) - (size_t)(const void *)(
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
508 "-"
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
509 ) == 1) ? __builtin_strcmp (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
510 file_name
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
511 ,
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
512 "-"
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
513 ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
514 "-"
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
515 ); int __result = (((const unsigned char *) (const char *) (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
516 file_name
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
517 ))[0] - __s2[0]); if (__s1_len > 0
__s1_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
518 file_name
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
519 ))[1] - __s2[1]); if (__s1_len > 1
__s1_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
520 file_name
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
521 ))[2] - __s2[2]); if (__s1_len > 2
__s1_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) __result = (((const unsigned char *) (const char *) (
never executed: __result = (((const unsigned char *) (const char *) ( file_name ))[3] - __s2[3]);
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
522 file_name
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
never executed: __result = (((const unsigned char *) (const char *) ( file_name ))[3] - __s2[3]);
0-15
523 ))[3] - __s2[3]);
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
never executed: __result = (((const unsigned char *) (const char *) ( file_name ))[3] - __s2[3]);
}
never executed: end of block
}
never executed: end of block
__result; }))) : (__builtin_constant_p (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
524 "-"
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
525 ) && ((size_t)(const void *)((
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
526 "-"
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
527 ) + 1) - (size_t)(const void *)(
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
528 "-"
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
529 ) == 1) && (__s2_len = __builtin_strlen (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
530 "-"
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
531 ), __s2_len < 4) ? (__builtin_constant_p (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
532 file_name
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
533 ) && ((size_t)(const void *)((
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
534 file_name
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
535 ) + 1) - (size_t)(const void *)(
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
536 file_name
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
537 ) == 1) ? __builtin_strcmp (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
538 file_name
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
539 ,
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
540 "-"
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
541 ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
542 file_name
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
543 ); int __result = (((const unsigned char *) (const char *) (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
544 "-"
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
545 ))[0] - __s2[0]); if (__s2_len > 0
__s2_len > 0Description
TRUEevaluated 15 times by 1 test
Evaluated by:
  • ptx
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
) { __result = (((const unsigned char *) (const char *) (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
546 "-"
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
547 ))[1] - __s2[1]); if (__s2_len > 1
__s2_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
548 "-"
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
549 ))[2] - __s2[2]); if (__s2_len > 2
__s2_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) __result = (((const unsigned char *) (const char *) (
never executed: __result = (((const unsigned char *) (const char *) ( "-" ))[3] - __s2[3]);
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
550 "-"
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
never executed: __result = (((const unsigned char *) (const char *) ( "-" ))[3] - __s2[3]);
0-15
551 ))[3] - __s2[3]);
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
never executed: __result = (((const unsigned char *) (const char *) ( "-" ))[3] - __s2[3]);
}
never executed: end of block
}
never executed: end of block
__result; }))) : __builtin_strcmp (
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
552 file_name
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
553 ,
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
554 "-"
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
555 )))); })
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
0-15
556 == 0)
( __extension_...)))); }) == 0)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
;
0-15
557 if (using_stdin
using_stdinDescription
TRUEevaluated 16 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 15 times by 1 test
Evaluated by:
  • ptx
)
15-16
558 block->start = fread_file (
executed 16 times by 1 test: block->start = fread_file ( stdin , &used_length);
Executed by:
  • ptx
16
559 stdin
executed 16 times by 1 test: block->start = fread_file ( stdin , &used_length);
Executed by:
  • ptx
16
560 , &used_length);
executed 16 times by 1 test: block->start = fread_file ( stdin , &used_length);
Executed by:
  • ptx
16
561 else-
562 block->start = read_file (file_name, &used_length);
executed 15 times by 1 test: block->start = read_file (file_name, &used_length);
Executed by:
  • ptx
15
563-
564 if (!block->start
!block->startDescription
TRUEnever evaluated
FALSEevaluated 31 times by 1 test
Evaluated by:
  • ptx
)
0-31
565 ((
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, using_stdin ? \"-\" : file_name)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( ...n ? "-" : file_name)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, using_stdin ? "-" : file_name)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
!!sizeof (struct { _Static_assert (
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, using_stdin ? \"-\" : file_name)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( ...n ? "-" : file_name)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, using_stdin ? "-" : file_name)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
566 1
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, using_stdin ? \"-\" : file_name)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( ...n ? "-" : file_name)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, using_stdin ? "-" : file_name)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
567 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, using_stdin ? \"-\" : file_name)), assume (false))" ")"); int _gl_dummy; })) ? ((error (
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, using_stdin ? \"-\" : file_name)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( ...n ? "-" : file_name)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, using_stdin ? "-" : file_name)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
568 1
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, using_stdin ? \"-\" : file_name)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( ...n ? "-" : file_name)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, using_stdin ? "-" : file_name)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
569 ,
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, using_stdin ? \"-\" : file_name)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( ...n ? "-" : file_name)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, using_stdin ? "-" : file_name)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
570 (*__errno_location ())
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, using_stdin ? \"-\" : file_name)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( ...n ? "-" : file_name)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, using_stdin ? "-" : file_name)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
571 , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, using_stdin ? "-" : file_name)), ((
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, using_stdin ? \"-\" : file_name)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( ...n ? "-" : file_name)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, using_stdin ? "-" : file_name)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
572 0
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, using_stdin ? \"-\" : file_name)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( ...n ? "-" : file_name)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, using_stdin ? "-" : file_name)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
573 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, using_stdin ? \"-\" : file_name)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( ...n ? "-" : file_name)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, using_stdin ? "-" : file_name)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
574 1
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, using_stdin ? \"-\" : file_name)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( ...n ? "-" : file_name)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, using_stdin ? "-" : file_name)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
575 ,
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, using_stdin ? \"-\" : file_name)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( ...n ? "-" : file_name)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, using_stdin ? "-" : file_name)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
576 (*__errno_location ())
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, using_stdin ? \"-\" : file_name)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( ...n ? "-" : file_name)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, using_stdin ? "-" : file_name)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
577 , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, using_stdin ? "-" : file_name)), ((
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, using_stdin ? \"-\" : file_name)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( ...n ? "-" : file_name)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, using_stdin ? "-" : file_name)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
578 0
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, using_stdin ? \"-\" : file_name)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( ...n ? "-" : file_name)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, using_stdin ? "-" : file_name)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
579 ) ? (void) 0 : __builtin_unreachable ()))));
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, using_stdin ? \"-\" : file_name)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( ...n ? "-" : file_name)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, using_stdin ? "-" : file_name)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
580-
581 block->end = block->start + used_length;-
582}
executed 31 times by 1 test: end of block
Executed by:
  • ptx
31
583static int-
584compare_words (const void *void_first, const void *void_second)-
585{-
586-
587-
588 ptrdiff_t length;-
589 ptrdiff_t counter;-
590 int value;-
591-
592 length = ((const
((const WORD *..._second)->sizeDescription
TRUEevaluated 19 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 21 times by 1 test
Evaluated by:
  • ptx
WORD *) void_first)->size < ((const WORD *) void_second)->size
((const WORD *..._second)->sizeDescription
TRUEevaluated 19 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 21 times by 1 test
Evaluated by:
  • ptx
? ((const WORD *) void_first)->size : ((const WORD *) void_second)->size;
19-21
593-
594 if (ignore_case
ignore_caseDescription
TRUEnever evaluated
FALSEevaluated 40 times by 1 test
Evaluated by:
  • ptx
)
0-40
595 {-
596 for (counter = 0; counter < length
counter < lengthDescription
TRUEnever evaluated
FALSEnever evaluated
; counter++)
0
597 {-
598 value = (folded_chars [to_uchar (((const WORD *) void_first)->start[counter])]-
599 - folded_chars [to_uchar (((const WORD *) void_second)->start[counter])]);-
600 if (value != 0
value != 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
601 return
never executed: return value;
value;
never executed: return value;
0
602 }
never executed: end of block
0
603 }
never executed: end of block
0
604 else-
605 {-
606 for (counter = 0; counter < length
counter < lengthDescription
TRUEevaluated 68 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 7 times by 1 test
Evaluated by:
  • ptx
; counter++)
7-68
607 {-
608 value = (to_uchar (((const WORD *) void_first)->start[counter])-
609 - to_uchar (((const WORD *) void_second)->start[counter]));-
610 if (value != 0
value != 0Description
TRUEevaluated 33 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 35 times by 1 test
Evaluated by:
  • ptx
)
33-35
611 return
executed 33 times by 1 test: return value;
Executed by:
  • ptx
value;
executed 33 times by 1 test: return value;
Executed by:
  • ptx
33
612 }
executed 35 times by 1 test: end of block
Executed by:
  • ptx
35
613 }
executed 7 times by 1 test: end of block
Executed by:
  • ptx
7
614-
615 return
executed 7 times by 1 test: return ((const WORD *) void_first)->size < ((const WORD *) void_second)->size ? -1 : ((const WORD *) void_first)->size > ((const WORD *) void_second)->size;
Executed by:
  • ptx
((const WORD *) void_first)->size < ((const WORD *) void_second)->size ? -1 : ((const WORD *) void_first)->size > ((const WORD *) void_second)->size;
executed 7 times by 1 test: return ((const WORD *) void_first)->size < ((const WORD *) void_second)->size ? -1 : ((const WORD *) void_first)->size > ((const WORD *) void_second)->size;
Executed by:
  • ptx
7
616-
617-
618}-
619-
620-
621-
622-
623-
624-
625-
626static int-
627compare_occurs (const void *void_first, const void *void_second)-
628{-
629-
630-
631 int value;-
632-
633 value = compare_words (&((const OCCURS *) void_first)->key, &((const OCCURS *) void_second)->key);-
634 return
executed 40 times by 1 test: return (value ? value : ((const OCCURS *) void_first)->key.start < ((const OCCURS *) void_second)->key.start ? -1 : ((const OCCURS *) void_first)->key.start > ((const OCCURS *) void_second)->key.start);
Executed by:
  • ptx
(value ? value
executed 40 times by 1 test: return (value ? value : ((const OCCURS *) void_first)->key.start < ((const OCCURS *) void_second)->key.start ? -1 : ((const OCCURS *) void_first)->key.start > ((const OCCURS *) void_second)->key.start);
Executed by:
  • ptx
40
635 : ((const OCCURS *) void_first)->key.start < ((const OCCURS *) void_second)->key.start ? -1
executed 40 times by 1 test: return (value ? value : ((const OCCURS *) void_first)->key.start < ((const OCCURS *) void_second)->key.start ? -1 : ((const OCCURS *) void_first)->key.start > ((const OCCURS *) void_second)->key.start);
Executed by:
  • ptx
40
636 : ((const OCCURS *) void_first)->key.start > ((const OCCURS *) void_second)->key.start);
executed 40 times by 1 test: return (value ? value : ((const OCCURS *) void_first)->key.start < ((const OCCURS *) void_second)->key.start ? -1 : ((const OCCURS *) void_first)->key.start > ((const OCCURS *) void_second)->key.start);
Executed by:
  • ptx
40
637-
638-
639}-
640-
641-
642-
643static -
644 _Bool -
645 __attribute__ ((__pure__))-
646search_table (WORD *word, WORD_TABLE *table)-
647{-
648 ptrdiff_t lowest;-
649 ptrdiff_t highest;-
650 ptrdiff_t middle;-
651 int value;-
652-
653 lowest = 0;-
654 highest = table->length - 1;-
655 while (lowest <= highest
lowest <= highestDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
656 {-
657 middle = (lowest + highest) / 2;-
658 value = compare_words (word, table->start + middle);-
659 if (value < 0
value < 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
660 highest = middle - 1;
never executed: highest = middle - 1;
0
661 else if (value > 0
value > 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
662 lowest = middle + 1;
never executed: lowest = middle + 1;
0
663 else-
664 return
never executed: return 1 ;
never executed: return 1 ;
0
665 1
never executed: return 1 ;
0
666 ;
never executed: return 1 ;
0
667 }-
668 return
never executed: return 0 ;
never executed: return 0 ;
0
669 0
never executed: return 0 ;
0
670 ;
never executed: return 0 ;
0
671}-
672-
673-
674-
675-
676-
677-
678-
679static void-
680sort_found_occurs (void)-
681{-
682-
683-
684 if (number_of_occurs[0]
number_of_occurs[0]Description
TRUEevaluated 22 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 4 times by 1 test
Evaluated by:
  • ptx
)
4-22
685 qsort (occurs_table[0], number_of_occurs[0], sizeof **occurs_table,
executed 22 times by 1 test: qsort (occurs_table[0], number_of_occurs[0], sizeof **occurs_table, compare_occurs);
Executed by:
  • ptx
22
686 compare_occurs);
executed 22 times by 1 test: qsort (occurs_table[0], number_of_occurs[0], sizeof **occurs_table, compare_occurs);
Executed by:
  • ptx
22
687}
executed 26 times by 1 test: end of block
Executed by:
  • ptx
26
688static void-
689digest_break_file (const char *file_name)-
690{-
691 BLOCK file_contents;-
692 char *cursor;-
693-
694 swallow_file_in_memory (file_name, &file_contents);-
695-
696-
697-
698 memset (word_fastmap, 1, 256);-
699 for (cursor = file_contents.start; cursor < file_contents.end
cursor < file_contents.endDescription
TRUEnever evaluated
FALSEnever evaluated
; cursor++)
0
700 word_fastmap[to_uchar (*cursor)] = 0;
never executed: word_fastmap[to_uchar (*cursor)] = 0;
0
701-
702 if (!gnu_extensions
!gnu_extensionsDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
703 {-
704-
705-
706-
707-
708-
709-
710-
711 word_fastmap[' '] = 0;-
712 word_fastmap['\t'] = 0;-
713 word_fastmap['\n'] = 0;-
714 }
never executed: end of block
0
715-
716-
717-
718 free (file_contents.start);-
719}
never executed: end of block
0
720static void-
721digest_word_file (const char *file_name, WORD_TABLE *table)-
722{-
723 BLOCK file_contents;-
724 char *cursor;-
725 char *word_start;-
726-
727 swallow_file_in_memory (file_name, &file_contents);-
728-
729 table->start = -
730 ((void *)0)-
731 ;-
732 table->alloc = 0;-
733 table->length = 0;-
734-
735-
736-
737 cursor = file_contents.start;-
738 while (cursor < file_contents.end
cursor < file_contents.endDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
739 {-
740-
741-
742-
743 word_start = cursor;-
744 while (cursor < file_contents.end
cursor < file_contents.endDescription
TRUEnever evaluated
FALSEnever evaluated
&& *
*cursor != '\n'Description
TRUEnever evaluated
FALSEnever evaluated
cursor != '\n'
*cursor != '\n'Description
TRUEnever evaluated
FALSEnever evaluated
)
0
745 cursor++;
never executed: cursor++;
0
746-
747-
748-
749 if (cursor > word_start
cursor > word_startDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
750 {-
751 if (table->length == table->alloc
table->length == table->allocDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
752 table->start = x2nrealloc (table->start, &table->alloc,
never executed: table->start = x2nrealloc (table->start, &table->alloc, sizeof *table->start);
0
753 sizeof *table->start);
never executed: table->start = x2nrealloc (table->start, &table->alloc, sizeof *table->start);
0
754 table->start[table->length].start = word_start;-
755 table->start[table->length].size = cursor - word_start;-
756 table->length++;-
757 }
never executed: end of block
0
758-
759-
760-
761 if (cursor < file_contents.end
cursor < file_contents.endDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
762 cursor++;
never executed: cursor++;
0
763 }
never executed: end of block
0
764-
765-
766-
767 qsort (table->start, table->length, sizeof table->start[0], compare_words);-
768}
never executed: end of block
0
769-
770-
771-
772-
773-
774-
775-
776static void-
777find_occurs_in_text (int file_index)-
778{-
779 char *cursor;-
780 char *scan;-
781 char *line_start;-
782 char *line_scan;-
783 ptrdiff_t reference_length;-
784 WORD possible_key;-
785 OCCURS *occurs_cursor;-
786-
787 char *context_start;-
788 char *context_end;-
789 char *word_start;-
790 char *word_end;-
791 char *next_context_start;-
792-
793 const BLOCK *text_buffer = &text_buffers[file_index];-
794-
795-
796-
797-
798-
799 reference_length = 0;-
800 line_start = text_buffer->start;-
801 line_scan = line_start;-
802 if (input_reference
input_referenceDescription
TRUEnever evaluated
FALSEevaluated 31 times by 1 test
Evaluated by:
  • ptx
)
0-31
803 {-
804 while (line_scan < text_buffer->end
line_scan < text_buffer->endDescription
TRUEnever evaluated
FALSEnever evaluated
&& !
! ((*__ctype_b...int) _ISspace)Description
TRUEnever evaluated
FALSEnever evaluated
0
805 ((*__ctype_b_loc ())[(int) ((
! ((*__ctype_b...int) _ISspace)Description
TRUEnever evaluated
FALSEnever evaluated
0
806 to_uchar (*line_scan)
! ((*__ctype_b...int) _ISspace)Description
TRUEnever evaluated
FALSEnever evaluated
0
807 ))] & (unsigned short int) _ISspace)
! ((*__ctype_b...int) _ISspace)Description
TRUEnever evaluated
FALSEnever evaluated
0
808 ) line_scan++;
never executed: line_scan++;
0
809 reference_length = line_scan - line_start;-
810 while (line_scan < text_buffer->end
line_scan < text_buffer->endDescription
TRUEnever evaluated
FALSEnever evaluated
&&
0
811 ((*
((*__ctype_b_l...int) _ISspace)Description
TRUEnever evaluated
FALSEnever evaluated
__ctype_b_loc ())[(int) ((
((*__ctype_b_l...int) _ISspace)Description
TRUEnever evaluated
FALSEnever evaluated
0
812 to_uchar (*line_scan)
((*__ctype_b_l...int) _ISspace)Description
TRUEnever evaluated
FALSEnever evaluated
0
813 ))] & (unsigned short int) _ISspace)
((*__ctype_b_l...int) _ISspace)Description
TRUEnever evaluated
FALSEnever evaluated
0
814 ) line_scan++;
never executed: line_scan++;
0
815 }
never executed: end of block
0
816-
817-
818-
819 for (cursor = text_buffer->start;-
820 cursor < text_buffer->end
cursor < text_buffer->endDescription
TRUEevaluated 28 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 28 times by 1 test
Evaluated by:
  • ptx
;
28
821 cursor = next_context_start)-
822 {-
823-
824-
825-
826-
827-
828 context_start = cursor;-
829 next_context_start = text_buffer->end;-
830 if (context_regex.string
context_regex.stringDescription
TRUEevaluated 28 times by 1 test
Evaluated by:
  • ptx
FALSEnever evaluated
)
0-28
831 switch (re_search (&context_regex.pattern, cursor,-
832 text_buffer->end - cursor,-
833 0, text_buffer->end - cursor, &context_regs))-
834 {-
835 case
never executed: case -2:
-2:
never executed: case -2:
0
836 matcher_error ();-
837-
838 case
executed 25 times by 1 test: case -1:
Executed by:
  • ptx
code before this statement never executed: case -1:
executed 25 times by 1 test: case -1:
Executed by:
  • ptx
-1:
code before this statement never executed: case -1:
executed 25 times by 1 test: case -1:
Executed by:
  • ptx
0-25
839 break;
executed 25 times by 1 test: break;
Executed by:
  • ptx
25
840-
841 case
executed 3 times by 1 test: case 0:
Executed by:
  • ptx
0:
executed 3 times by 1 test: case 0:
Executed by:
  • ptx
3
842 ((!!sizeof (struct { _Static_assert (-
843 1-
844 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"error: regular expression has a match of length zero: %s\", 5), quote (context_regex.string)), assume (false))" ")"); int _gl_dummy; })) ? ((error (-
845 1-
846 , 0, -
847 dcgettext (((void *)0), -
848 "error: regular expression has a match of length zero: %s"-
849 , 5)-
850 , quote (context_regex.string)), ((-
851 0-
852 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (-
853 1-
854 , 0, -
855 dcgettext (((void *)0), -
856 "error: regular expression has a match of length zero: %s"-
857 , 5)-
858 , quote (context_regex.string)), ((-
859 0-
860 ) ? (void) 0 : __builtin_unreachable ()))))-
861-
862 ;-
863-
864 default
never executed: default:
:
never executed: default:
code before this statement never executed: default:
0
865 next_context_start = cursor + context_regs.end[0];-
866 break;
never executed: break;
0
867 }-
868-
869-
870-
871-
872-
873 context_end = next_context_start;-
874 while (context_end > context_start
context_end > context_startDescription
TRUEevaluated 48 times by 1 test
Evaluated by:
  • ptx
FALSEnever evaluated
&&
0-48
875 ((*
((*__ctype_b_l...int) _ISspace)Description
TRUEevaluated 23 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 25 times by 1 test
Evaluated by:
  • ptx
__ctype_b_loc ())[(int) ((
((*__ctype_b_l...int) _ISspace)Description
TRUEevaluated 23 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 25 times by 1 test
Evaluated by:
  • ptx
23-25
876 to_uchar (context_end[-1])
((*__ctype_b_l...int) _ISspace)Description
TRUEevaluated 23 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 25 times by 1 test
Evaluated by:
  • ptx
23-25
877 ))] & (unsigned short int) _ISspace)
((*__ctype_b_l...int) _ISspace)Description
TRUEevaluated 23 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 25 times by 1 test
Evaluated by:
  • ptx
23-25
878 ) context_end--;
executed 23 times by 1 test: context_end--;
Executed by:
  • ptx
23
879-
880-
881-
882-
883 while (1)-
884 {-
885 if (word_regex.string
word_regex.stringDescription
TRUEnever evaluated
FALSEevaluated 65 times by 1 test
Evaluated by:
  • ptx
)
0-65
886-
887-
888-
889-
890-
891 {-
892 regoff_t r = re_search (&word_regex.pattern, cursor,-
893 context_end - cursor,-
894 0, context_end - cursor, &word_regs);-
895 if (r == -2
r == -2Description
TRUEnever evaluated
FALSEnever evaluated
)
0
896 matcher_error ();
never executed: matcher_error ();
0
897 if (r == -1
r == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
898 break;
never executed: break;
0
899 word_start = cursor + word_regs.start[0];-
900 word_end = cursor + word_regs.end[0];-
901 }
never executed: end of block
0
902 else-
903-
904-
905-
906-
907-
908 {-
909 scan = cursor;-
910 while (scan < context_end
scan < context_endDescription
TRUEevaluated 68 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 25 times by 1 test
Evaluated by:
  • ptx
25-68
911 && !word_fastmap[to_uchar (*scan)]
!word_fastmap[...uchar (*scan)]Description
TRUEevaluated 28 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 40 times by 1 test
Evaluated by:
  • ptx
)
28-40
912 scan++;
executed 28 times by 1 test: scan++;
Executed by:
  • ptx
28
913-
914 if (scan == context_end
scan == context_endDescription
TRUEevaluated 25 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 40 times by 1 test
Evaluated by:
  • ptx
)
25-40
915 break;
executed 25 times by 1 test: break;
Executed by:
  • ptx
25
916-
917 word_start = scan;-
918-
919 while (scan < context_end
scan < context_endDescription
TRUEevaluated 145 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 24 times by 1 test
Evaluated by:
  • ptx
24-145
920 && word_fastmap[to_uchar (*scan)]
word_fastmap[to_uchar (*scan)]Description
TRUEevaluated 129 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 16 times by 1 test
Evaluated by:
  • ptx
)
16-129
921 scan++;
executed 129 times by 1 test: scan++;
Executed by:
  • ptx
129
922-
923 word_end = scan;-
924 }
executed 40 times by 1 test: end of block
Executed by:
  • ptx
40
925-
926-
927-
928 cursor = word_start;-
929-
930-
931-
932-
933 if (word_end == word_start
word_end == word_startDescription
TRUEnever evaluated
FALSEevaluated 40 times by 1 test
Evaluated by:
  • ptx
)
0-40
934 {-
935 cursor++;-
936 continue;
never executed: continue;
0
937 }-
938 possible_key.start = cursor;-
939 possible_key.size = word_end - word_start;-
940 cursor += possible_key.size;-
941-
942 if (possible_key.size > maximum_word_length
possible_key.s...um_word_lengthDescription
TRUEevaluated 23 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 17 times by 1 test
Evaluated by:
  • ptx
)
17-23
943 maximum_word_length = possible_key.size;
executed 23 times by 1 test: maximum_word_length = possible_key.size;
Executed by:
  • ptx
23
944-
945-
946-
947-
948-
949-
950 if (input_reference
input_referenceDescription
TRUEnever evaluated
FALSEevaluated 40 times by 1 test
Evaluated by:
  • ptx
)
0-40
951 {-
952 while (line_scan < possible_key.start
line_scan < possible_key.startDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
953 if (*
*line_scan == '\n'Description
TRUEnever evaluated
FALSEnever evaluated
line_scan == '\n'
*line_scan == '\n'Description
TRUEnever evaluated
FALSEnever evaluated
)
0
954 {-
955 total_line_count++;-
956 line_scan++;-
957 line_start = line_scan;-
958 while (line_scan < text_buffer->end
line_scan < text_buffer->endDescription
TRUEnever evaluated
FALSEnever evaluated
&& !
! ((*__ctype_b...int) _ISspace)Description
TRUEnever evaluated
FALSEnever evaluated
0
959 ((*__ctype_b_loc ())[(int) ((
! ((*__ctype_b...int) _ISspace)Description
TRUEnever evaluated
FALSEnever evaluated
0
960 to_uchar (*line_scan)
! ((*__ctype_b...int) _ISspace)Description
TRUEnever evaluated
FALSEnever evaluated
0
961 ))] & (unsigned short int) _ISspace)
! ((*__ctype_b...int) _ISspace)Description
TRUEnever evaluated
FALSEnever evaluated
0
962 ) line_scan++;
never executed: line_scan++;
0
963 reference_length = line_scan - line_start;-
964 }
never executed: end of block
0
965 else-
966 line_scan++;
never executed: line_scan++;
0
967 if (line_scan > possible_key.start
line_scan > possible_key.startDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
968 continue;
never executed: continue;
0
969 }
never executed: end of block
0
970 if (ignore_file
ignore_fileDescription
TRUEnever evaluated
FALSEevaluated 40 times by 1 test
Evaluated by:
  • ptx
&& search_table (&possible_key, &ignore_table)
search_table (...&ignore_table)Description
TRUEnever evaluated
FALSEnever evaluated
)
0-40
971 continue;
never executed: continue;
0
972 if (only_file
only_fileDescription
TRUEnever evaluated
FALSEevaluated 40 times by 1 test
Evaluated by:
  • ptx
&& !search_table (&possible_key, &only_table)
!search_table ..., &only_table)Description
TRUEnever evaluated
FALSEnever evaluated
)
0-40
973 continue;
never executed: continue;
0
974-
975-
976-
977-
978-
979 if (number_of_occurs[0] == occurs_alloc[0]
number_of_occu...ccurs_alloc[0]Description
TRUEevaluated 26 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 14 times by 1 test
Evaluated by:
  • ptx
)
14-26
980 occurs_table[0] = x2nrealloc (occurs_table[0],
executed 26 times by 1 test: occurs_table[0] = x2nrealloc (occurs_table[0], &occurs_alloc[0], sizeof *occurs_table[0]);
Executed by:
  • ptx
26
981 &occurs_alloc[0],
executed 26 times by 1 test: occurs_table[0] = x2nrealloc (occurs_table[0], &occurs_alloc[0], sizeof *occurs_table[0]);
Executed by:
  • ptx
26
982 sizeof *occurs_table[0]);
executed 26 times by 1 test: occurs_table[0] = x2nrealloc (occurs_table[0], &occurs_alloc[0], sizeof *occurs_table[0]);
Executed by:
  • ptx
26
983 occurs_cursor = occurs_table[0] + number_of_occurs[0];-
984-
985-
986-
987 if (auto_reference
auto_referenceDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • ptx
FALSEevaluated 39 times by 1 test
Evaluated by:
  • ptx
)
1-39
988 {-
989-
990-
991-
992-
993-
994-
995-
996 while (line_scan < possible_key.start
line_scan < possible_key.startDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • ptx
)
0-1
997 if (*
*line_scan == '\n'Description
TRUEnever evaluated
FALSEnever evaluated
line_scan == '\n'
*line_scan == '\n'Description
TRUEnever evaluated
FALSEnever evaluated
)
0
998 {-
999 total_line_count++;-
1000 line_scan++;-
1001 line_start = line_scan;-
1002 while (line_scan < text_buffer->end
line_scan < text_buffer->endDescription
TRUEnever evaluated
FALSEnever evaluated
&& !
! ((*__ctype_b...int) _ISspace)Description
TRUEnever evaluated
FALSEnever evaluated
0
1003 ((*__ctype_b_loc ())[(int) ((
! ((*__ctype_b...int) _ISspace)Description
TRUEnever evaluated
FALSEnever evaluated
0
1004 to_uchar (*line_scan)
! ((*__ctype_b...int) _ISspace)Description
TRUEnever evaluated
FALSEnever evaluated
0
1005 ))] & (unsigned short int) _ISspace)
! ((*__ctype_b...int) _ISspace)Description
TRUEnever evaluated
FALSEnever evaluated
0
1006 ) line_scan++;
never executed: line_scan++;
0
1007 }
never executed: end of block
0
1008 else-
1009 line_scan++;
never executed: line_scan++;
0
1010-
1011 occurs_cursor->reference = total_line_count;-
1012 }
executed 1 time by 1 test: end of block
Executed by:
  • ptx
1
1013 else if (input_reference
input_referenceDescription
TRUEnever evaluated
FALSEevaluated 39 times by 1 test
Evaluated by:
  • ptx
)
0-39
1014 {-
1015-
1016-
1017-
1018-
1019-
1020-
1021 occurs_cursor->reference = line_start - possible_key.start;-
1022 if (reference_length > reference_max_width
reference_leng...ence_max_widthDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1023 reference_max_width = reference_length;
never executed: reference_max_width = reference_length;
0
1024 }
never executed: end of block
0
1025-
1026-
1027-
1028 if (input_reference
input_referenceDescription
TRUEnever evaluated
FALSEevaluated 40 times by 1 test
Evaluated by:
  • ptx
&& line_start == context_start
line_start == context_startDescription
TRUEnever evaluated
FALSEnever evaluated
)
0-40
1029 {-
1030 while (context_start < context_end
context_start < context_endDescription
TRUEnever evaluated
FALSEnever evaluated
&& !
! ((*__ctype_b...int) _ISspace)Description
TRUEnever evaluated
FALSEnever evaluated
0
1031 ((*__ctype_b_loc ())[(int) ((
! ((*__ctype_b...int) _ISspace)Description
TRUEnever evaluated
FALSEnever evaluated
0
1032 to_uchar (*context_start)
! ((*__ctype_b...int) _ISspace)Description
TRUEnever evaluated
FALSEnever evaluated
0
1033 ))] & (unsigned short int) _ISspace)
! ((*__ctype_b...int) _ISspace)Description
TRUEnever evaluated
FALSEnever evaluated
0
1034 ) context_start++;
never executed: context_start++;
0
1035 while (context_start < context_end
context_start < context_endDescription
TRUEnever evaluated
FALSEnever evaluated
&&
0
1036 ((*
((*__ctype_b_l...int) _ISspace)Description
TRUEnever evaluated
FALSEnever evaluated
__ctype_b_loc ())[(int) ((
((*__ctype_b_l...int) _ISspace)Description
TRUEnever evaluated
FALSEnever evaluated
0
1037 to_uchar (*context_start)
((*__ctype_b_l...int) _ISspace)Description
TRUEnever evaluated
FALSEnever evaluated
0
1038 ))] & (unsigned short int) _ISspace)
((*__ctype_b_l...int) _ISspace)Description
TRUEnever evaluated
FALSEnever evaluated
0
1039 ) context_start++;
never executed: context_start++;
0
1040 }
never executed: end of block
0
1041-
1042-
1043-
1044 occurs_cursor->key = possible_key;-
1045 occurs_cursor->left = context_start - possible_key.start;-
1046 occurs_cursor->right = context_end - possible_key.start;-
1047 occurs_cursor->file_index = file_index;-
1048-
1049 number_of_occurs[0]++;-
1050 }
executed 40 times by 1 test: end of block
Executed by:
  • ptx
40
1051 }
executed 25 times by 1 test: end of block
Executed by:
  • ptx
25
1052}
executed 28 times by 1 test: end of block
Executed by:
  • ptx
28
1053-
1054-
1055-
1056-
1057-
1058-
1059-
1060static void-
1061print_spaces (ptrdiff_t number)-
1062{-
1063 for (ptrdiff_t counter = number; counter > 0
counter > 0Description
TRUEevaluated 606 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 104 times by 1 test
Evaluated by:
  • ptx
; counter--)
104-606
1064 putchar_unlocked (' ');
executed 606 times by 1 test: putchar_unlocked (' ');
Executed by:
  • ptx
606
1065}
executed 104 times by 1 test: end of block
Executed by:
  • ptx
104
1066-
1067-
1068-
1069-
1070-
1071static void-
1072print_field (BLOCK field)-
1073{-
1074 char *cursor;-
1075 int base;-
1076 int diacritic;-
1077-
1078-
1079-
1080-
1081 for (cursor = field.start; cursor < field.end
cursor < field.endDescription
TRUEevaluated 670 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 133 times by 1 test
Evaluated by:
  • ptx
; cursor++)
133-670
1082 {-
1083 unsigned char character = *cursor;-
1084 if (edited_flag[character]
edited_flag[character]Description
TRUEevaluated 69 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 601 times by 1 test
Evaluated by:
  • ptx
)
69-601
1085 {-
1086-
1087-
1088-
1089-
1090-
1091-
1092 diacritic = (diacrit_diac[(unsigned char) (character)]);-
1093 if (diacritic != 0
diacritic != 0Description
TRUEnever evaluated
FALSEevaluated 69 times by 1 test
Evaluated by:
  • ptx
&& output_format == TEX_FORMAT
output_format == TEX_FORMATDescription
TRUEnever evaluated
FALSEnever evaluated
)
0-69
1094 {-
1095 base = (diacrit_base[(unsigned char) (character)]);-
1096 switch (diacritic)-
1097 {-
1098-
1099 case
never executed: case 1:
1:
never executed: case 1:
0
1100 switch (base)-
1101 {-
1102 case
never executed: case 'o':
'o':
never executed: case 'o':
0
1103 fputs_unlocked ("\\oe{}",-
1104 stdout-
1105 );-
1106 break;
never executed: break;
0
1107-
1108 case
never executed: case 'O':
'O':
never executed: case 'O':
0
1109 fputs_unlocked ("\\OE{}",-
1110 stdout-
1111 );-
1112 break;
never executed: break;
0
1113-
1114 case
never executed: case 'a':
'a':
never executed: case 'a':
0
1115 fputs_unlocked ("\\ae{}",-
1116 stdout-
1117 );-
1118 break;
never executed: break;
0
1119-
1120 case
never executed: case 'A':
'A':
never executed: case 'A':
0
1121 fputs_unlocked ("\\AE{}",-
1122 stdout-
1123 );-
1124 break;
never executed: break;
0
1125-
1126 default
never executed: default:
:
never executed: default:
0
1127 putchar_unlocked (' ');-
1128 }
never executed: end of block
0
1129 break;
never executed: break;
0
1130-
1131 case
never executed: case 2:
2:
never executed: case 2:
0
1132 printf ("\\'%s%c", (base == 'i' ? "\\" : ""), base);-
1133 break;
never executed: break;
0
1134-
1135 case
never executed: case 3:
3:
never executed: case 3:
0
1136 printf ("\\'%s%c", (base == 'i' ? "\\" : ""), base);-
1137 break;
never executed: break;
0
1138-
1139 case
never executed: case 4:
4:
never executed: case 4:
0
1140 printf ("\\^%s%c", (base == 'i' ? "\\" : ""), base);-
1141 break;
never executed: break;
0
1142-
1143 case
never executed: case 5:
5:
never executed: case 5:
0
1144 printf ("\\\"%s%c", (base == 'i' ? "\\" : ""), base);-
1145 break;
never executed: break;
0
1146-
1147 case
never executed: case 6:
6:
never executed: case 6:
0
1148 printf ("\\~%s%c", (base == 'i' ? "\\" : ""), base);-
1149 break;
never executed: break;
0
1150-
1151 case
never executed: case 7:
7:
never executed: case 7:
0
1152 printf ("\\c{%c}", base);-
1153 break;
never executed: break;
0
1154-
1155 case
never executed: case 8:
8:
never executed: case 8:
0
1156 switch (base)-
1157 {-
1158 case
never executed: case 'a':
'a':
never executed: case 'a':
0
1159 fputs_unlocked ("\\aa{}",-
1160 stdout-
1161 );-
1162 break;
never executed: break;
0
1163-
1164 case
never executed: case 'A':
'A':
never executed: case 'A':
0
1165 fputs_unlocked ("\\AA{}",-
1166 stdout-
1167 );-
1168 break;
never executed: break;
0
1169-
1170 default
never executed: default:
:
never executed: default:
0
1171 putchar_unlocked (' ');-
1172 }
never executed: end of block
0
1173 break;
never executed: break;
0
1174-
1175 case
never executed: case 9:
9:
never executed: case 9:
0
1176 switch (base)-
1177 {-
1178 case
never executed: case 'o':
'o':
never executed: case 'o':
0
1179 fputs_unlocked ("\\o{}",-
1180 stdout-
1181 );-
1182 break;
never executed: break;
0
1183-
1184 case
never executed: case 'O':
'O':
never executed: case 'O':
0
1185 fputs_unlocked ("\\O{}",-
1186 stdout-
1187 );-
1188 break;
never executed: break;
0
1189-
1190 default
never executed: default:
:
never executed: default:
0
1191 putchar_unlocked (' ');-
1192 }
never executed: end of block
0
1193 break;
never executed: break;
0
1194 }-
1195 }
never executed: end of block
0
1196 else-
1197-
1198-
1199-
1200-
1201-
1202 switch (character)-
1203 {-
1204 case
never executed: case '"':
'"':
never executed: case '"':
0
1205-
1206 putchar_unlocked ('"');-
1207 putchar_unlocked ('"');-
1208 break;
never executed: break;
0
1209-
1210 case
never executed: case '$':
'$':
never executed: case '$':
0
1211 case
never executed: case '%':
'%':
never executed: case '%':
0
1212 case
never executed: case '&':
'&':
never executed: case '&':
0
1213 case
never executed: case '#':
'#':
never executed: case '#':
0
1214 case
never executed: case '_':
'_':
never executed: case '_':
0
1215-
1216 putchar_unlocked ('\\');-
1217 putchar_unlocked (character);-
1218 break;
never executed: break;
0
1219-
1220 case
never executed: case '{':
'{':
never executed: case '{':
0
1221 case
never executed: case '}':
'}':
never executed: case '}':
0
1222-
1223-
1224 printf ("$\\%c$", character);-
1225 break;
never executed: break;
0
1226-
1227 case
never executed: case '\\':
'\\':
never executed: case '\\':
0
1228-
1229 fputs_unlocked ("\\backslash{}",-
1230 stdout-
1231 );-
1232 break;
never executed: break;
0
1233-
1234 default
executed 69 times by 1 test: default:
Executed by:
  • ptx
:
executed 69 times by 1 test: default:
Executed by:
  • ptx
69
1235-
1236 putchar_unlocked (' ');-
1237 }
executed 69 times by 1 test: end of block
Executed by:
  • ptx
69
1238 }-
1239 else-
1240 putchar_unlocked (*cursor);
executed 601 times by 1 test: putchar_unlocked (*cursor);
Executed by:
  • ptx
601
1241 }-
1242}
executed 133 times by 1 test: end of block
Executed by:
  • ptx
133
1243static void-
1244fix_output_parameters (void)-
1245{-
1246 size_t file_index;-
1247 intmax_t line_ordinal;-
1248 ptrdiff_t reference_width;-
1249 int character;-
1250 const char *cursor;-
1251-
1252-
1253-
1254-
1255-
1256 if (auto_reference
auto_referenceDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • ptx
FALSEevaluated 25 times by 1 test
Evaluated by:
  • ptx
)
1-25
1257 {-
1258 reference_max_width = 0;-
1259 for (file_index = 0; file_index < number_input_files
file_index < n...er_input_filesDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • ptx
FALSEevaluated 1 time by 1 test
Evaluated by:
  • ptx
; file_index++)
1
1260 {-
1261 line_ordinal = file_line_count[file_index] + 1;-
1262 if (file_index > 0
file_index > 0Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • ptx
)
0-1
1263 line_ordinal -= file_line_count[file_index - 1];
never executed: line_ordinal -= file_line_count[file_index - 1];
0
1264 char ordinal_string[((((((sizeof (intmax_t) * 8) - (! ((__typeof__ (intmax_t)) 0 < (__typeof__ (intmax_t)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (intmax_t)) 0 < (__typeof__ (intmax_t)) -1))) + 1)];-
1265 reference_width = sprintf (ordinal_string, "%"-
1266 "l" "d"-
1267 , line_ordinal);-
1268 if (input_file_name[file_index]
input_file_name[file_index]Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • ptx
FALSEnever evaluated
)
0-1
1269 reference_width += strlen (input_file_name[file_index]);
executed 1 time by 1 test: reference_width += strlen (input_file_name[file_index]);
Executed by:
  • ptx
1
1270 if (reference_width > reference_max_width
reference_widt...ence_max_widthDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • ptx
FALSEnever evaluated
)
0-1
1271 reference_max_width = reference_width;
executed 1 time by 1 test: reference_max_width = reference_width;
Executed by:
  • ptx
1
1272 }
executed 1 time by 1 test: end of block
Executed by:
  • ptx
1
1273 reference_max_width++;-
1274 reference.start = xmalloc (reference_max_width + 1);-
1275 }
executed 1 time by 1 test: end of block
Executed by:
  • ptx
1
1276-
1277-
1278-
1279-
1280 if ((auto_reference
auto_referenceDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • ptx
FALSEevaluated 25 times by 1 test
Evaluated by:
  • ptx
|| input_reference
input_referenceDescription
TRUEnever evaluated
FALSEevaluated 25 times by 1 test
Evaluated by:
  • ptx
) && !right_reference
!right_referenceDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • ptx
FALSEnever evaluated
)
0-25
1281 line_width -= reference_max_width + gap_size;
executed 1 time by 1 test: line_width -= reference_max_width + gap_size;
Executed by:
  • ptx
1
1282 if (line_width < 0
line_width < 0Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • ptx
FALSEevaluated 25 times by 1 test
Evaluated by:
  • ptx
)
1-25
1283 line_width = 0;
executed 1 time by 1 test: line_width = 0;
Executed by:
  • ptx
1
1284 half_line_width = line_width / 2;-
1285 before_max_width = half_line_width - gap_size;-
1286 keyafter_max_width = half_line_width;-
1287-
1288-
1289-
1290-
1291-
1292 if (truncation_string
truncation_stringDescription
TRUEevaluated 26 times by 1 test
Evaluated by:
  • ptx
FALSEnever evaluated
&& *
*truncation_stringDescription
TRUEevaluated 25 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 1 time by 1 test
Evaluated by:
  • ptx
truncation_string
*truncation_stringDescription
TRUEevaluated 25 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 1 time by 1 test
Evaluated by:
  • ptx
)
0-26
1293 truncation_string_length = strlen (truncation_string);
executed 25 times by 1 test: truncation_string_length = strlen (truncation_string);
Executed by:
  • ptx
25
1294 else-
1295 truncation_string =
executed 1 time by 1 test: truncation_string = ((void *)0) ;
Executed by:
  • ptx
1
1296 ((void *)0)
executed 1 time by 1 test: truncation_string = ((void *)0) ;
Executed by:
  • ptx
1
1297 ;
executed 1 time by 1 test: truncation_string = ((void *)0) ;
Executed by:
  • ptx
1
1298-
1299 if (gnu_extensions
gnu_extensionsDescription
TRUEevaluated 26 times by 1 test
Evaluated by:
  • ptx
FALSEnever evaluated
)
0-26
1300 {-
1301 before_max_width -= 2 * truncation_string_length;-
1302 if (before_max_width < 0
before_max_width < 0Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 18 times by 1 test
Evaluated by:
  • ptx
)
8-18
1303 before_max_width = 0;
executed 8 times by 1 test: before_max_width = 0;
Executed by:
  • ptx
8
1304 keyafter_max_width -= 2 * truncation_string_length;-
1305 }
executed 26 times by 1 test: end of block
Executed by:
  • ptx
26
1306 else-
1307 {-
1308-
1309-
1310-
1311-
1312-
1313-
1314-
1315 keyafter_max_width -= 2 * truncation_string_length + 1;-
1316 }
never executed: end of block
0
1317-
1318-
1319-
1320-
1321-
1322 for (character = 0; character < 256
character < 256Description
TRUEevaluated 6656 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 26 times by 1 test
Evaluated by:
  • ptx
; character++)
26-6656
1323 edited_flag[character] = !!
executed 6656 times by 1 test: edited_flag[character] = !! ((*__ctype_b_loc ())[(int) (( character ))] & (unsigned short int) _ISspace) ;
Executed by:
  • ptx
6656
1324 ((*__ctype_b_loc ())[(int) ((
executed 6656 times by 1 test: edited_flag[character] = !! ((*__ctype_b_loc ())[(int) (( character ))] & (unsigned short int) _ISspace) ;
Executed by:
  • ptx
6656
1325 character
executed 6656 times by 1 test: edited_flag[character] = !! ((*__ctype_b_loc ())[(int) (( character ))] & (unsigned short int) _ISspace) ;
Executed by:
  • ptx
6656
1326 ))] & (unsigned short int) _ISspace)
executed 6656 times by 1 test: edited_flag[character] = !! ((*__ctype_b_loc ())[(int) (( character ))] & (unsigned short int) _ISspace) ;
Executed by:
  • ptx
6656
1327 ;
executed 6656 times by 1 test: edited_flag[character] = !! ((*__ctype_b_loc ())[(int) (( character ))] & (unsigned short int) _ISspace) ;
Executed by:
  • ptx
6656
1328 edited_flag['\f'] = 1;-
1329-
1330-
1331-
1332-
1333 switch (output_format)-
1334 {-
1335 case
never executed: case UNKNOWN_FORMAT:
UNKNOWN_FORMAT:
never executed: case UNKNOWN_FORMAT:
0
1336-
1337-
1338 case
executed 20 times by 1 test: case DUMB_FORMAT:
Executed by:
  • ptx
DUMB_FORMAT:
executed 20 times by 1 test: case DUMB_FORMAT:
Executed by:
  • ptx
20
1339 break;
executed 20 times by 1 test: break;
Executed by:
  • ptx
20
1340-
1341 case
executed 3 times by 1 test: case ROFF_FORMAT:
Executed by:
  • ptx
ROFF_FORMAT:
executed 3 times by 1 test: case ROFF_FORMAT:
Executed by:
  • ptx
3
1342-
1343-
1344-
1345 edited_flag['"'] = 1;-
1346 break;
executed 3 times by 1 test: break;
Executed by:
  • ptx
3
1347-
1348 case
executed 3 times by 1 test: case TEX_FORMAT:
Executed by:
  • ptx
TEX_FORMAT:
executed 3 times by 1 test: case TEX_FORMAT:
Executed by:
  • ptx
3
1349-
1350-
1351-
1352 for (cursor = "$%&#_{}\\"; *
*cursorDescription
TRUEevaluated 24 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 3 times by 1 test
Evaluated by:
  • ptx
cursor
*cursorDescription
TRUEevaluated 24 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 3 times by 1 test
Evaluated by:
  • ptx
; cursor++)
3-24
1353 edited_flag[to_uchar (*cursor)] = 1;
executed 24 times by 1 test: edited_flag[to_uchar (*cursor)] = 1;
Executed by:
  • ptx
24
1354-
1355-
1356-
1357-
1358 for (character = 0200; character < 256
character < 256Description
TRUEevaluated 384 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 3 times by 1 test
Evaluated by:
  • ptx
; character++)
3-384
1359 edited_flag[character] = (diacrit_diac[(unsigned char) (character)]) != 0;
executed 384 times by 1 test: edited_flag[character] = (diacrit_diac[(unsigned char) (character)]) != 0;
Executed by:
  • ptx
384
1360 break;
executed 3 times by 1 test: break;
Executed by:
  • ptx
3
1361 }-
1362}
executed 26 times by 1 test: end of block
Executed by:
  • ptx
26
1363-
1364-
1365-
1366-
1367-
1368-
1369static void-
1370define_all_fields (OCCURS *occurs)-
1371{-
1372 ptrdiff_t tail_max_width;-
1373 ptrdiff_t head_max_width;-
1374 char *cursor;-
1375 char *left_context_start;-
1376 char *right_context_end;-
1377 char *left_field_start;-
1378 const char *file_name;-
1379 intmax_t line_ordinal;-
1380 const char *buffer_start;-
1381 const char *buffer_end;-
1382-
1383-
1384-
1385-
1386-
1387-
1388-
1389 keyafter.start = occurs->key.start;-
1390 keyafter.end = keyafter.start + occurs->key.size;-
1391 left_context_start = keyafter.start + occurs->left;-
1392 right_context_end = keyafter.start + occurs->right;-
1393-
1394 buffer_start = text_buffers[occurs->file_index].start;-
1395 buffer_end = text_buffers[occurs->file_index].end;-
1396-
1397 cursor = keyafter.end;-
1398 while (cursor < right_context_end
cursor < right_context_endDescription
TRUEevaluated 92 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 37 times by 1 test
Evaluated by:
  • ptx
37-92
1399 && cursor <= keyafter.start + keyafter_max_width
cursor <= keya...fter_max_widthDescription
TRUEevaluated 89 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 3 times by 1 test
Evaluated by:
  • ptx
)
3-89
1400 {-
1401 keyafter.end = cursor;-
1402 if (word_regex.string
word_regex.stringDescription
TRUEnever evaluated
FALSEevaluated 89 times by 1 test
Evaluated by:
  • ptx
) { regoff_t count; count = re_match (&word_regex.pattern, cursor, right_context_end - cursor, 0,
0-89
1403 ((void *)0)-
1404 ); if (count == -2
count == -2Description
TRUEnever evaluated
FALSEnever evaluated
) matcher_error ();
never executed: matcher_error ();
cursor += count == -1
count == -1Description
TRUEnever evaluated
FALSEnever evaluated
? 1 : count; }
never executed: end of block
else if (word_fastmap[to_uchar (*cursor)]
word_fastmap[t...har (*cursor)]Description
TRUEevaluated 43 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 46 times by 1 test
Evaluated by:
  • ptx
) while (cursor < right_context_end
cursor < right_context_endDescription
TRUEevaluated 265 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 13 times by 1 test
Evaluated by:
  • ptx
&& word_fastmap[to_uchar (*cursor)]
word_fastmap[t...har (*cursor)]Description
TRUEevaluated 235 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 30 times by 1 test
Evaluated by:
  • ptx
) cursor++;
executed 235 times by 1 test: cursor++;
Executed by:
  • ptx
else cursor++;
executed 46 times by 1 test: cursor++;
Executed by:
  • ptx
0-265
1405 }
executed 89 times by 1 test: end of block
Executed by:
  • ptx
89
1406 if (cursor <= keyafter.start + keyafter_max_width
cursor <= keya...fter_max_widthDescription
TRUEevaluated 26 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 14 times by 1 test
Evaluated by:
  • ptx
)
14-26
1407 keyafter.end = cursor;
executed 26 times by 1 test: keyafter.end = cursor;
Executed by:
  • ptx
26
1408-
1409 keyafter_truncation = truncation_string
truncation_stringDescription
TRUEevaluated 40 times by 1 test
Evaluated by:
  • ptx
FALSEnever evaluated
&& keyafter.end < right_context_end
keyafter.end <...ht_context_endDescription
TRUEevaluated 5 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 35 times by 1 test
Evaluated by:
  • ptx
;
0-40
1410-
1411 while (keyafter.end > keyafter.start
keyafter.end > keyafter.startDescription
TRUEevaluated 42 times by 1 test
Evaluated by:
  • ptx
FALSEnever evaluated
&&
0-42
1412 ((*
((*__ctype_b_l...int) _ISspace)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 40 times by 1 test
Evaluated by:
  • ptx
__ctype_b_loc ())[(int) ((
((*__ctype_b_l...int) _ISspace)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 40 times by 1 test
Evaluated by:
  • ptx
2-40
1413 to_uchar (keyafter.end[-1])
((*__ctype_b_l...int) _ISspace)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 40 times by 1 test
Evaluated by:
  • ptx
2-40
1414 ))] & (unsigned short int) _ISspace)
((*__ctype_b_l...int) _ISspace)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 40 times by 1 test
Evaluated by:
  • ptx
2-40
1415 ) keyafter.end--;
executed 2 times by 1 test: keyafter.end--;
Executed by:
  • ptx
2
1416 if (-
-occurs->left ...um_word_lengthDescription
TRUEnever evaluated
FALSEevaluated 40 times by 1 test
Evaluated by:
  • ptx
occurs->left > half_line_width + maximum_word_length
-occurs->left ...um_word_lengthDescription
TRUEnever evaluated
FALSEevaluated 40 times by 1 test
Evaluated by:
  • ptx
)
0-40
1417 {-
1418 left_field_start-
1419 = keyafter.start - (half_line_width + maximum_word_length);-
1420 if (word_regex.string
word_regex.stringDescription
TRUEnever evaluated
FALSEnever evaluated
) { regoff_t count; count = re_match (&word_regex.pattern, left_field_start, keyafter.start - left_field_start, 0,
0
1421 ((void *)0)-
1422 ); if (count == -2
count == -2Description
TRUEnever evaluated
FALSEnever evaluated
) matcher_error ();
never executed: matcher_error ();
left_field_start += count == -1
count == -1Description
TRUEnever evaluated
FALSEnever evaluated
? 1 : count; }
never executed: end of block
else if (word_fastmap[to_uchar (*left_field_start)]
word_fastmap[t..._field_start)]Description
TRUEnever evaluated
FALSEnever evaluated
) while (left_field_start < keyafter.start
left_field_sta...keyafter.startDescription
TRUEnever evaluated
FALSEnever evaluated
&& word_fastmap[to_uchar (*left_field_start)]
word_fastmap[t..._field_start)]Description
TRUEnever evaluated
FALSEnever evaluated
) left_field_start++;
never executed: left_field_start++;
else left_field_start++;
never executed: left_field_start++;
0
1423 }
never executed: end of block
0
1424 else-
1425 left_field_start = keyafter.start + occurs->left;
executed 40 times by 1 test: left_field_start = keyafter.start + occurs->left;
Executed by:
  • ptx
40
1426-
1427-
1428-
1429-
1430-
1431-
1432-
1433 before.start = left_field_start;-
1434 before.end = keyafter.start;-
1435 while (before.end > before.start
before.end > before.startDescription
TRUEevaluated 32 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 24 times by 1 test
Evaluated by:
  • ptx
&&
24-32
1436 ((*
((*__ctype_b_l...int) _ISspace)Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 16 times by 1 test
Evaluated by:
  • ptx
__ctype_b_loc ())[(int) ((
((*__ctype_b_l...int) _ISspace)Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 16 times by 1 test
Evaluated by:
  • ptx
16
1437 to_uchar (before.end[-1])
((*__ctype_b_l...int) _ISspace)Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 16 times by 1 test
Evaluated by:
  • ptx
16
1438 ))] & (unsigned short int) _ISspace)
((*__ctype_b_l...int) _ISspace)Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 16 times by 1 test
Evaluated by:
  • ptx
16
1439 ) before.end--;
executed 16 times by 1 test: before.end--;
Executed by:
  • ptx
16
1440-
1441 while (before.start + before_max_width < before.end
before.start +...h < before.endDescription
TRUEevaluated 5 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 40 times by 1 test
Evaluated by:
  • ptx
)
5-40
1442 if (word_regex.string
word_regex.stringDescription
TRUEnever evaluated
FALSEevaluated 5 times by 1 test
Evaluated by:
  • ptx
) { regoff_t count; count = re_match (&word_regex.pattern, before.start, before.end - before.start, 0,
0-5
1443 ((void *)0)-
1444 ); if (count == -2
count == -2Description
TRUEnever evaluated
FALSEnever evaluated
) matcher_error ();
never executed: matcher_error ();
before.start += count == -1
count == -1Description
TRUEnever evaluated
FALSEnever evaluated
? 1 : count; }
never executed: end of block
else if (word_fastmap[to_uchar (*before.start)]
word_fastmap[t...before.start)]Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • ptx
FALSEnever evaluated
) while (before.start < before.end
before.start < before.endDescription
TRUEevaluated 19 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 3 times by 1 test
Evaluated by:
  • ptx
&& word_fastmap[to_uchar (*before.start)]
word_fastmap[t...before.start)]Description
TRUEevaluated 17 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 2 times by 1 test
Evaluated by:
  • ptx
) before.start++;
executed 17 times by 1 test: before.start++;
Executed by:
  • ptx
else before.start++;
never executed: before.start++;
0-19
1445-
1446 if (truncation_string
truncation_stringDescription
TRUEevaluated 40 times by 1 test
Evaluated by:
  • ptx
FALSEnever evaluated
)
0-40
1447 {-
1448 cursor = before.start;-
1449 while (cursor > buffer_start
cursor > buffer_startDescription
TRUEevaluated 5 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 35 times by 1 test
Evaluated by:
  • ptx
&&
5-35
1450 ((*
((*__ctype_b_l...int) _ISspace)Description
TRUEnever evaluated
FALSEevaluated 5 times by 1 test
Evaluated by:
  • ptx
__ctype_b_loc ())[(int) ((
((*__ctype_b_l...int) _ISspace)Description
TRUEnever evaluated
FALSEevaluated 5 times by 1 test
Evaluated by:
  • ptx
0-5
1451 to_uchar (cursor[-1])
((*__ctype_b_l...int) _ISspace)Description
TRUEnever evaluated
FALSEevaluated 5 times by 1 test
Evaluated by:
  • ptx
0-5
1452 ))] & (unsigned short int) _ISspace)
((*__ctype_b_l...int) _ISspace)Description
TRUEnever evaluated
FALSEevaluated 5 times by 1 test
Evaluated by:
  • ptx
0-5
1453 ) cursor--;
never executed: cursor--;
0
1454 before_truncation = cursor > left_context_start;-
1455 }
executed 40 times by 1 test: end of block
Executed by:
  • ptx
40
1456 else-
1457 before_truncation =
never executed: before_truncation = 0 ;
0
1458 0
never executed: before_truncation = 0 ;
0
1459 ;
never executed: before_truncation = 0 ;
0
1460-
1461 while (before.start < buffer_end
before.start < buffer_endDescription
TRUEevaluated 45 times by 1 test
Evaluated by:
  • ptx
FALSEnever evaluated
&&
0-45
1462 ((*
((*__ctype_b_l...int) _ISspace)Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 40 times by 1 test
Evaluated by:
  • ptx
__ctype_b_loc ())[(int) ((
((*__ctype_b_l...int) _ISspace)Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 40 times by 1 test
Evaluated by:
  • ptx
5-40
1463 to_uchar (*before.start)
((*__ctype_b_l...int) _ISspace)Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 40 times by 1 test
Evaluated by:
  • ptx
5-40
1464 ))] & (unsigned short int) _ISspace)
((*__ctype_b_l...int) _ISspace)Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 40 times by 1 test
Evaluated by:
  • ptx
5-40
1465 ) before.start++;
executed 5 times by 1 test: before.start++;
Executed by:
  • ptx
5
1466 tail_max_width-
1467 = before_max_width - (before.end - before.start) - gap_size;-
1468-
1469 if (tail_max_width > 0
tail_max_width > 0Description
TRUEevaluated 20 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 20 times by 1 test
Evaluated by:
  • ptx
)
20
1470 {-
1471 tail.start = keyafter.end;-
1472 while (tail.start < buffer_end
tail.start < buffer_endDescription
TRUEevaluated 22 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 18 times by 1 test
Evaluated by:
  • ptx
&&
18-22
1473 ((*
((*__ctype_b_l...int) _ISspace)Description
TRUEevaluated 20 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 2 times by 1 test
Evaluated by:
  • ptx
__ctype_b_loc ())[(int) ((
((*__ctype_b_l...int) _ISspace)Description
TRUEevaluated 20 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 2 times by 1 test
Evaluated by:
  • ptx
2-20
1474 to_uchar (*tail.start)
((*__ctype_b_l...int) _ISspace)Description
TRUEevaluated 20 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 2 times by 1 test
Evaluated by:
  • ptx
2-20
1475 ))] & (unsigned short int) _ISspace)
((*__ctype_b_l...int) _ISspace)Description
TRUEevaluated 20 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 2 times by 1 test
Evaluated by:
  • ptx
2-20
1476 ) tail.start++;
executed 20 times by 1 test: tail.start++;
Executed by:
  • ptx
20
1477-
1478 tail.end = tail.start;-
1479 cursor = tail.end;-
1480 while (cursor < right_context_end
cursor < right_context_endDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 20 times by 1 test
Evaluated by:
  • ptx
2-20
1481 && cursor < tail.start + tail_max_width
cursor < tail....tail_max_widthDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • ptx
FALSEnever evaluated
)
0-2
1482 {-
1483 tail.end = cursor;-
1484 if (word_regex.string
word_regex.stringDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • ptx
) { regoff_t count; count = re_match (&word_regex.pattern, cursor, right_context_end - cursor, 0,
0-2
1485 ((void *)0)-
1486 ); if (count == -2
count == -2Description
TRUEnever evaluated
FALSEnever evaluated
) matcher_error ();
never executed: matcher_error ();
cursor += count == -1
count == -1Description
TRUEnever evaluated
FALSEnever evaluated
? 1 : count; }
never executed: end of block
else if (word_fastmap[to_uchar (*cursor)]
word_fastmap[t...har (*cursor)]Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • ptx
FALSEnever evaluated
) while (cursor < right_context_end
cursor < right_context_endDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 2 times by 1 test
Evaluated by:
  • ptx
&& word_fastmap[to_uchar (*cursor)]
word_fastmap[t...har (*cursor)]Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • ptx
FALSEnever evaluated
) cursor++;
executed 8 times by 1 test: cursor++;
Executed by:
  • ptx
else cursor++;
never executed: cursor++;
0-8
1487 }
executed 2 times by 1 test: end of block
Executed by:
  • ptx
2
1488-
1489 if (cursor < tail.start + tail_max_width
cursor < tail....tail_max_widthDescription
TRUEevaluated 20 times by 1 test
Evaluated by:
  • ptx
FALSEnever evaluated
)
0-20
1490 tail.end = cursor;
executed 20 times by 1 test: tail.end = cursor;
Executed by:
  • ptx
20
1491-
1492 if (tail.end > tail.start
tail.end > tail.startDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 18 times by 1 test
Evaluated by:
  • ptx
)
2-18
1493 {-
1494 keyafter_truncation = -
1495 0-
1496 ;-
1497 tail_truncation = truncation_string
truncation_stringDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • ptx
FALSEnever evaluated
&& tail.end < right_context_end
tail.end < right_context_endDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • ptx
;
0-2
1498 }
executed 2 times by 1 test: end of block
Executed by:
  • ptx
2
1499 else-
1500 tail_truncation =
executed 18 times by 1 test: tail_truncation = 0 ;
Executed by:
  • ptx
18
1501 0
executed 18 times by 1 test: tail_truncation = 0 ;
Executed by:
  • ptx
18
1502 ;
executed 18 times by 1 test: tail_truncation = 0 ;
Executed by:
  • ptx
18
1503-
1504 while (tail.end > tail.start
tail.end > tail.startDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 18 times by 1 test
Evaluated by:
  • ptx
&&
2-18
1505 ((*
((*__ctype_b_l...int) _ISspace)Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • ptx
__ctype_b_loc ())[(int) ((
((*__ctype_b_l...int) _ISspace)Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • ptx
0-2
1506 to_uchar (tail.end[-1])
((*__ctype_b_l...int) _ISspace)Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • ptx
0-2
1507 ))] & (unsigned short int) _ISspace)
((*__ctype_b_l...int) _ISspace)Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • ptx
0-2
1508 ) tail.end--;
never executed: tail.end--;
0
1509 }
executed 20 times by 1 test: end of block
Executed by:
  • ptx
20
1510 else-
1511 {-
1512-
1513-
1514-
1515 tail.start = -
1516 ((void *)0)-
1517 ;-
1518 tail.end = -
1519 ((void *)0)-
1520 ;-
1521 tail_truncation = -
1522 0-
1523 ;-
1524 }
executed 20 times by 1 test: end of block
Executed by:
  • ptx
20
1525-
1526-
1527-
1528-
1529-
1530-
1531-
1532 head_max_width-
1533 = keyafter_max_width - (keyafter.end - keyafter.start) - gap_size;-
1534-
1535 if (head_max_width > 0
head_max_width > 0Description
TRUEevaluated 18 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 22 times by 1 test
Evaluated by:
  • ptx
)
18-22
1536 {-
1537 head.end = before.start;-
1538 while (head.end > buffer_start
head.end > buffer_startDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 16 times by 1 test
Evaluated by:
  • ptx
&&
4-16
1539 ((*
((*__ctype_b_l...int) _ISspace)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 2 times by 1 test
Evaluated by:
  • ptx
__ctype_b_loc ())[(int) ((
((*__ctype_b_l...int) _ISspace)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 2 times by 1 test
Evaluated by:
  • ptx
2
1540 to_uchar (head.end[-1])
((*__ctype_b_l...int) _ISspace)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 2 times by 1 test
Evaluated by:
  • ptx
2
1541 ))] & (unsigned short int) _ISspace)
((*__ctype_b_l...int) _ISspace)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 2 times by 1 test
Evaluated by:
  • ptx
2
1542 ) head.end--;
executed 2 times by 1 test: head.end--;
Executed by:
  • ptx
2
1543-
1544 head.start = left_field_start;-
1545 while (head.start + head_max_width < head.end
head.start + h...dth < head.endDescription
TRUEnever evaluated
FALSEevaluated 18 times by 1 test
Evaluated by:
  • ptx
)
0-18
1546 if (word_regex.string
word_regex.stringDescription
TRUEnever evaluated
FALSEnever evaluated
) { regoff_t count; count = re_match (&word_regex.pattern, head.start, head.end - head.start, 0,
0
1547 ((void *)0)-
1548 ); if (count == -2
count == -2Description
TRUEnever evaluated
FALSEnever evaluated
) matcher_error ();
never executed: matcher_error ();
head.start += count == -1
count == -1Description
TRUEnever evaluated
FALSEnever evaluated
? 1 : count; }
never executed: end of block
else if (word_fastmap[to_uchar (*head.start)]
word_fastmap[t...(*head.start)]Description
TRUEnever evaluated
FALSEnever evaluated
) while (head.start < head.end
head.start < head.endDescription
TRUEnever evaluated
FALSEnever evaluated
&& word_fastmap[to_uchar (*head.start)]
word_fastmap[t...(*head.start)]Description
TRUEnever evaluated
FALSEnever evaluated
) head.start++;
never executed: head.start++;
else head.start++;
never executed: head.start++;
0
1549-
1550 if (head.end > head.start
head.end > head.startDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 16 times by 1 test
Evaluated by:
  • ptx
)
2-16
1551 {-
1552 before_truncation = -
1553 0-
1554 ;-
1555 head_truncation = (truncation_string
truncation_stringDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • ptx
FALSEnever evaluated
0-2
1556 && head.start > left_context_start
head.start > l..._context_startDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • ptx
);
0-2
1557 }
executed 2 times by 1 test: end of block
Executed by:
  • ptx
2
1558 else-
1559 head_truncation =
executed 16 times by 1 test: head_truncation = 0 ;
Executed by:
  • ptx
16
1560 0
executed 16 times by 1 test: head_truncation = 0 ;
Executed by:
  • ptx
16
1561 ;
executed 16 times by 1 test: head_truncation = 0 ;
Executed by:
  • ptx
16
1562-
1563 while (head.start < head.end
head.start < head.endDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • ptx
FALSEevaluated 16 times by 1 test
Evaluated by:
  • ptx
&&
2-16
1564 ((*
((*__ctype_b_l...int) _ISspace)Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • ptx
__ctype_b_loc ())[(int) ((
((*__ctype_b_l...int) _ISspace)Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • ptx
0-2
1565 to_uchar (*head.start)
((*__ctype_b_l...int) _ISspace)Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • ptx
0-2
1566 ))] & (unsigned short int) _ISspace)
((*__ctype_b_l...int) _ISspace)Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • ptx
0-2
1567 ) head.start++;
never executed: head.start++;
0
1568 }
executed 18 times by 1 test: end of block
Executed by:
  • ptx
18
1569 else-
1570 {-
1571-
1572-
1573-
1574 head.start = -
1575 ((void *)0)-
1576 ;-
1577 head.end = -
1578 ((void *)0)-
1579 ;-
1580 head_truncation = -
1581 0-
1582 ;-
1583 }
executed 22 times by 1 test: end of block
Executed by:
  • ptx
22
1584-
1585 if (auto_reference
auto_referenceDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • ptx
FALSEevaluated 39 times by 1 test
Evaluated by:
  • ptx
)
1-39
1586 {-
1587-
1588-
1589-
1590-
1591-
1592 file_name = input_file_name[occurs->file_index];-
1593 if (!file_name
!file_nameDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • ptx
)
0-1
1594 file_name = "";
never executed: file_name = "";
0
1595-
1596 line_ordinal = occurs->reference + 1;-
1597 if (occurs->file_index > 0
occurs->file_index > 0Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • ptx
)
0-1
1598 line_ordinal -= file_line_count[occurs->file_index - 1];
never executed: line_ordinal -= file_line_count[occurs->file_index - 1];
0
1599-
1600 char *file_end = stpcpy (reference.start, file_name);-
1601 reference.end = file_end + sprintf (file_end, ":%"-
1602 "l" "d"-
1603 , line_ordinal);-
1604 }
executed 1 time by 1 test: end of block
Executed by:
  • ptx
1
1605 else if (input_reference
input_referenceDescription
TRUEnever evaluated
FALSEevaluated 39 times by 1 test
Evaluated by:
  • ptx
)
0-39
1606 {-
1607-
1608-
1609-
1610-
1611 reference.start = keyafter.start + occurs->reference;-
1612 reference.end = reference.start;-
1613 while (reference.end < right_context_end
reference.end ...ht_context_endDescription
TRUEnever evaluated
FALSEnever evaluated
&& !
! ((*__ctype_b...int) _ISspace)Description
TRUEnever evaluated
FALSEnever evaluated
0
1614 ((*__ctype_b_loc ())[(int) ((
! ((*__ctype_b...int) _ISspace)Description
TRUEnever evaluated
FALSEnever evaluated
0
1615 to_uchar (*reference.end)
! ((*__ctype_b...int) _ISspace)Description
TRUEnever evaluated
FALSEnever evaluated
0
1616 ))] & (unsigned short int) _ISspace)
! ((*__ctype_b...int) _ISspace)Description
TRUEnever evaluated
FALSEnever evaluated
0
1617 ) reference.end++;
never executed: reference.end++;
0
1618 }
never executed: end of block
0
1619}
executed 40 times by 1 test: end of block
Executed by:
  • ptx
40
1620-
1621-
1622-
1623-
1624-
1625-
1626-
1627static void-
1628output_one_roff_line (void)-
1629{-
1630-
1631-
1632 printf (".%s \"", macro_name);-
1633 print_field (tail);-
1634 if (tail_truncation
tail_truncationDescription
TRUEnever evaluated
FALSEevaluated 3 times by 1 test
Evaluated by:
  • ptx
)
0-3
1635 fputs_unlocked (truncation_string,
never executed: fputs_unlocked (truncation_string, stdout );
0
1636 stdout
never executed: fputs_unlocked (truncation_string, stdout );
0
1637 );
never executed: fputs_unlocked (truncation_string, stdout );
0
1638 putchar_unlocked ('"');-
1639-
1640-
1641-
1642 fputs_unlocked (" \"",-
1643 stdout-
1644 );-
1645 if (before_truncation
before_truncationDescription
TRUEnever evaluated
FALSEevaluated 3 times by 1 test
Evaluated by:
  • ptx
)
0-3
1646 fputs_unlocked (truncation_string,
never executed: fputs_unlocked (truncation_string, stdout );
0
1647 stdout
never executed: fputs_unlocked (truncation_string, stdout );
0
1648 );
never executed: fputs_unlocked (truncation_string, stdout );
0
1649 print_field (before);-
1650 putchar_unlocked ('"');-
1651-
1652-
1653-
1654 fputs_unlocked (" \"",-
1655 stdout-
1656 );-
1657 print_field (keyafter);-
1658 if (keyafter_truncation
keyafter_truncationDescription
TRUEnever evaluated
FALSEevaluated 3 times by 1 test
Evaluated by:
  • ptx
)
0-3
1659 fputs_unlocked (truncation_string,
never executed: fputs_unlocked (truncation_string, stdout );
0
1660 stdout
never executed: fputs_unlocked (truncation_string, stdout );
0
1661 );
never executed: fputs_unlocked (truncation_string, stdout );
0
1662 putchar_unlocked ('"');-
1663-
1664-
1665-
1666 fputs_unlocked (" \"",-
1667 stdout-
1668 );-
1669 if (head_truncation
head_truncationDescription
TRUEnever evaluated
FALSEevaluated 3 times by 1 test
Evaluated by:
  • ptx
)
0-3
1670 fputs_unlocked (truncation_string,
never executed: fputs_unlocked (truncation_string, stdout );
0
1671 stdout
never executed: fputs_unlocked (truncation_string, stdout );
0
1672 );
never executed: fputs_unlocked (truncation_string, stdout );
0
1673 print_field (head);-
1674 putchar_unlocked ('"');-
1675-
1676-
1677-
1678 if (auto_reference
auto_referenceDescription
TRUEnever evaluated
FALSEevaluated 3 times by 1 test
Evaluated by:
  • ptx
|| input_reference
input_referenceDescription
TRUEnever evaluated
FALSEevaluated 3 times by 1 test
Evaluated by:
  • ptx
)
0-3
1679 {-
1680 fputs_unlocked (" \"",-
1681 stdout-
1682 );-
1683 print_field (reference);-
1684 putchar_unlocked ('"');-
1685 }
never executed: end of block
0
1686-
1687 putchar_unlocked ('\n');-
1688}
executed 3 times by 1 test: end of block
Executed by:
  • ptx
3
1689-
1690-