Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/coreutils/src/lib/nstrftime.c |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
2 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
3 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
4 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
5 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
6 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
7 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
8 | static char *memcpy_lowcase (char *dest, const char *src, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
9 | size_t len ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
10 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
11 | static char * | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
12 | memcpy_lowcase (char *dest, const char *src, size_t len ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
13 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
14 | while (len-- > 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
15 | dest[len] = never executed: dest[len] = (__extension__ ({ int __res; if (sizeof ( (unsigned char) src[len] ) > 1) { if (__builtin_constant_p ( (unsigned char) src[len] )) { int __c = ( (unsigned char) src[len] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char) src[len] ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char) src[len] )]; __res; })) ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
16 | (__extension__ ({ int __res; if (sizeof (
never executed: dest[len] = (__extension__ ({ int __res; if (sizeof ( (unsigned char) src[len] ) > 1) { if (__builtin_constant_p ( (unsigned char) src[len] )) { int __c = ( (unsigned char) src[len] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char) src[len] ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char) src[len] )]; __res; })) ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
17 | (unsigned char) src[len]
never executed: dest[len] = (__extension__ ({ int __res; if (sizeof ( (unsigned char) src[len] ) > 1) { if (__builtin_constant_p ( (unsigned char) src[len] )) { int __c = ( (unsigned char) src[len] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char) src[len] ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char) src[len] )]; __res; })) ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
18 | ) > 1
never executed: dest[len] = (__extension__ ({ int __res; if (sizeof ( (unsigned char) src[len] ) > 1) { if (__builtin_constant_p ( (unsigned char) src[len] )) { int __c = ( (unsigned char) src[len] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char) src[len] ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char) src[len] )]; __res; })) ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
19 | (unsigned char) src[len]
never executed: dest[len] = (__extension__ ({ int __res; if (sizeof ( (unsigned char) src[len] ) > 1) { if (__builtin_constant_p ( (unsigned char) src[len] )) { int __c = ( (unsigned char) src[len] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char) src[len] ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char) src[len] )]; __res; })) ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
20 | )
never executed: dest[len] = (__extension__ ({ int __res; if (sizeof ( (unsigned char) src[len] ) > 1) { if (__builtin_constant_p ( (unsigned char) src[len] )) { int __c = ( (unsigned char) src[len] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char) src[len] ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char) src[len] )]; __res; })) ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
21 | (unsigned char) src[len] never executed: dest[len] = (__extension__ ({ int __res; if (sizeof ( (unsigned char) src[len] ) > 1) { if (__builtin_constant_p ( (unsigned char) src[len] )) { int __c = ( (unsigned char) src[len] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char) src[len] ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char) src[len] )]; __res; })) ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
22 | ); __res = __c < -128
never executed: else __res = tolower (end of block never executed: __res = tolower ( (unsigned char) src[len] ); never executed: dest[len] = (__extension__ ({ int __res; if (sizeof ( (unsigned char) src[len] ) > 1) { if (__builtin_constant_p ( (unsigned char) src[len] )) { int __c = ( (unsigned char) src[len] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char) src[len] ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char) src[len] )]; __res; })) ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
23 | (unsigned char) src[len] never executed: __res = tolower ( (unsigned char) src[len] ); never executed: dest[len] = (__extension__ ({ int __res; if (sizeof ( (unsigned char) src[len] ) > 1) { if (__builtin_constant_p ( (unsigned char) src[len] )) { int __c = ( (unsigned char) src[len] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char) src[len] ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char) src[len] )]; __res; })) ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
24 | ); never executed: } else __res = (*__ctype_tolower_loc ())[(int) (__res = tolower ( (unsigned char) src[len] ); never executed: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char) src[len] )]; never executed: dest[len] = (__extension__ ({ int __res; if (sizeof ( (unsigned char) src[len] ) > 1) { if (__builtin_constant_p ( (unsigned char) src[len] )) { int __c = ( (unsigned char) src[len] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char) src[len] ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char) src[len] )]; __res; })) ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
25 | (unsigned char) src[len] never executed: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char) src[len] )]; never executed: dest[len] = (__extension__ ({ int __res; if (sizeof ( (unsigned char) src[len] ) > 1) { if (__builtin_constant_p ( (unsigned char) src[len] )) { int __c = ( (unsigned char) src[len] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char) src[len] ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char) src[len] )]; __res; })) ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
26 | )]; never executed: __res; }))__res = (*__ctype_tolower_loc ())[(int) ( (unsigned char) src[len] )]; never executed: dest[len] = (__extension__ ({ int __res; if (sizeof ( (unsigned char) src[len] ) > 1) { if (__builtin_constant_p ( (unsigned char) src[len] )) { int __c = ( (unsigned char) src[len] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char) src[len] ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char) src[len] )]; __res; })) ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
27 | ; never executed: dest[len] = (__extension__ ({ int __res; if (sizeof ( (unsigned char) src[len] ) > 1) { if (__builtin_constant_p ( (unsigned char) src[len] )) { int __c = ( (unsigned char) src[len] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char) src[len] ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char) src[len] )]; __res; })) ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
28 | return never executed: dest;return dest; never executed: return dest; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
29 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
30 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
31 | static char *memcpy_uppcase (char *dest, const char *src, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
32 | size_t len ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
33 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
34 | static char * | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
35 | memcpy_uppcase (char *dest, const char *src, size_t len ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
36 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
37 | while (len-- > 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
38 | dest[len] = never executed: dest[len] = (__extension__ ({ int __res; if (sizeof ( (unsigned char) src[len] ) > 1) { if (__builtin_constant_p ( (unsigned char) src[len] )) { int __c = ( (unsigned char) src[len] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( (unsigned char) src[len] ); } else __res = (*__ctype_toupper_loc ())[(int) ( (unsigned char) src[len] )]; __res; })) ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
39 | (__extension__ ({ int __res; if (sizeof (
never executed: dest[len] = (__extension__ ({ int __res; if (sizeof ( (unsigned char) src[len] ) > 1) { if (__builtin_constant_p ( (unsigned char) src[len] )) { int __c = ( (unsigned char) src[len] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( (unsigned char) src[len] ); } else __res = (*__ctype_toupper_loc ())[(int) ( (unsigned char) src[len] )]; __res; })) ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
40 | (unsigned char) src[len]
never executed: dest[len] = (__extension__ ({ int __res; if (sizeof ( (unsigned char) src[len] ) > 1) { if (__builtin_constant_p ( (unsigned char) src[len] )) { int __c = ( (unsigned char) src[len] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( (unsigned char) src[len] ); } else __res = (*__ctype_toupper_loc ())[(int) ( (unsigned char) src[len] )]; __res; })) ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
41 | ) > 1
never executed: dest[len] = (__extension__ ({ int __res; if (sizeof ( (unsigned char) src[len] ) > 1) { if (__builtin_constant_p ( (unsigned char) src[len] )) { int __c = ( (unsigned char) src[len] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( (unsigned char) src[len] ); } else __res = (*__ctype_toupper_loc ())[(int) ( (unsigned char) src[len] )]; __res; })) ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
42 | (unsigned char) src[len]
never executed: dest[len] = (__extension__ ({ int __res; if (sizeof ( (unsigned char) src[len] ) > 1) { if (__builtin_constant_p ( (unsigned char) src[len] )) { int __c = ( (unsigned char) src[len] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( (unsigned char) src[len] ); } else __res = (*__ctype_toupper_loc ())[(int) ( (unsigned char) src[len] )]; __res; })) ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
43 | )
never executed: dest[len] = (__extension__ ({ int __res; if (sizeof ( (unsigned char) src[len] ) > 1) { if (__builtin_constant_p ( (unsigned char) src[len] )) { int __c = ( (unsigned char) src[len] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( (unsigned char) src[len] ); } else __res = (*__ctype_toupper_loc ())[(int) ( (unsigned char) src[len] )]; __res; })) ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
44 | (unsigned char) src[len] never executed: dest[len] = (__extension__ ({ int __res; if (sizeof ( (unsigned char) src[len] ) > 1) { if (__builtin_constant_p ( (unsigned char) src[len] )) { int __c = ( (unsigned char) src[len] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( (unsigned char) src[len] ); } else __res = (*__ctype_toupper_loc ())[(int) ( (unsigned char) src[len] )]; __res; })) ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
45 | ); __res = __c < -128
never executed: else __res = toupper (end of block never executed: __res = toupper ( (unsigned char) src[len] ); never executed: dest[len] = (__extension__ ({ int __res; if (sizeof ( (unsigned char) src[len] ) > 1) { if (__builtin_constant_p ( (unsigned char) src[len] )) { int __c = ( (unsigned char) src[len] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( (unsigned char) src[len] ); } else __res = (*__ctype_toupper_loc ())[(int) ( (unsigned char) src[len] )]; __res; })) ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
46 | (unsigned char) src[len] never executed: __res = toupper ( (unsigned char) src[len] ); never executed: dest[len] = (__extension__ ({ int __res; if (sizeof ( (unsigned char) src[len] ) > 1) { if (__builtin_constant_p ( (unsigned char) src[len] )) { int __c = ( (unsigned char) src[len] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( (unsigned char) src[len] ); } else __res = (*__ctype_toupper_loc ())[(int) ( (unsigned char) src[len] )]; __res; })) ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
47 | ); never executed: } else __res = (*__ctype_toupper_loc ())[(int) (__res = toupper ( (unsigned char) src[len] ); never executed: __res = (*__ctype_toupper_loc ())[(int) ( (unsigned char) src[len] )]; never executed: dest[len] = (__extension__ ({ int __res; if (sizeof ( (unsigned char) src[len] ) > 1) { if (__builtin_constant_p ( (unsigned char) src[len] )) { int __c = ( (unsigned char) src[len] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( (unsigned char) src[len] ); } else __res = (*__ctype_toupper_loc ())[(int) ( (unsigned char) src[len] )]; __res; })) ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
48 | (unsigned char) src[len] never executed: __res = (*__ctype_toupper_loc ())[(int) ( (unsigned char) src[len] )]; never executed: dest[len] = (__extension__ ({ int __res; if (sizeof ( (unsigned char) src[len] ) > 1) { if (__builtin_constant_p ( (unsigned char) src[len] )) { int __c = ( (unsigned char) src[len] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( (unsigned char) src[len] ); } else __res = (*__ctype_toupper_loc ())[(int) ( (unsigned char) src[len] )]; __res; })) ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
49 | )]; never executed: __res; }))__res = (*__ctype_toupper_loc ())[(int) ( (unsigned char) src[len] )]; never executed: dest[len] = (__extension__ ({ int __res; if (sizeof ( (unsigned char) src[len] ) > 1) { if (__builtin_constant_p ( (unsigned char) src[len] )) { int __c = ( (unsigned char) src[len] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( (unsigned char) src[len] ); } else __res = (*__ctype_toupper_loc ())[(int) ( (unsigned char) src[len] )]; __res; })) ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
50 | ; never executed: dest[len] = (__extension__ ({ int __res; if (sizeof ( (unsigned char) src[len] ) > 1) { if (__builtin_constant_p ( (unsigned char) src[len] )) { int __c = ( (unsigned char) src[len] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ( (unsigned char) src[len] ); } else __res = (*__ctype_toupper_loc ())[(int) ( (unsigned char) src[len] )]; __res; })) ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
51 | return never executed: dest;return dest; never executed: return dest; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
52 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
53 | static int iso_week_days (int, int); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
54 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
55 | __inline__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
56 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
57 | static int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
58 | iso_week_days (int yday, int wday) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
59 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
60 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
61 | int big_enough_multiple_of_7 = (-(-366) / 7 + 2) * 7; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
62 | return executed 16 times by 1 test: (ydayreturn (yday - (yday - wday + 4 + big_enough_multiple_of_7) % 7 + 4 - 1); Executed by:
executed 16 times by 1 test: return (yday - (yday - wday + 4 + big_enough_multiple_of_7) % 7 + 4 - 1); Executed by:
| 16 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
63 | - (yday - wday + 4 + big_enough_multiple_of_7) % 7 executed 16 times by 1 test: return (yday - (yday - wday + 4 + big_enough_multiple_of_7) % 7 + 4 - 1); Executed by:
| 16 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
64 | + 4 - 1); executed 16 times by 1 test: return (yday - (yday - wday + 4 + big_enough_multiple_of_7) % 7 + 4 - 1); Executed by:
| 16 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
65 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
66 | static size_t __strftime_internal (char *, size_t, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
67 | const char *, const struct tm *, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
68 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
69 | _Bool | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
70 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
71 | _Bool | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
72 | * | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
73 | , timezone_t tz, int ns ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
74 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
75 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
76 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
77 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
78 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
79 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
80 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
81 | size_t | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
82 | nstrftime (char *s, size_t maxsize, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
83 | const char *format, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
84 | const struct tm *tp , timezone_t tz, int ns ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
85 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
86 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
87 | _Bool | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
88 | tzset_called = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
89 | 0 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
90 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
91 | return executed 4796 times by 6 tests: __strftime_internal (s, maxsize, format, tp,return __strftime_internal (s, maxsize, format, tp, 0 , &tzset_called , tz, ns ); Executed by:
executed 4796 times by 6 tests: return __strftime_internal (s, maxsize, format, tp, 0 , &tzset_called , tz, ns ); Executed by:
| 4796 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
92 | executed 4796 times by 6 tests: return __strftime_internal (s, maxsize, format, tp, 0 , &tzset_called , tz, ns ); Executed by:
| 4796 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
93 | 0 executed 4796 times by 6 tests: return __strftime_internal (s, maxsize, format, tp, 0 , &tzset_called , tz, ns ); Executed by:
| 4796 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
94 | , &tzset_called , tz, ns ); executed 4796 times by 6 tests: return __strftime_internal (s, maxsize, format, tp, 0 , &tzset_called , tz, ns ); Executed by:
| 4796 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
95 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
96 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
97 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
98 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
99 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
100 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
101 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
102 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
103 | static size_t | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
104 | __strftime_internal (char *s, size_t maxsize, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
105 | const char *format, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
106 | const struct tm *tp, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
107 | _Bool | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
108 | upcase, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
109 | _Bool | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
110 | *tzset_called | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
111 | , timezone_t tz, int ns ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
112 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
113 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
114 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
115 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
116 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
117 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
118 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
119 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
120 | int hour12 = tp->tm_hour; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
121 | const char *zone; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
122 | size_t i = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
123 | char *p = s; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
124 | const char *f; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
125 | zone = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
126 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
127 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
128 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
129 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
130 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
131 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
132 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
133 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
134 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
135 | zone = (const char *) tp->tm_zone; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
136 | if (! zone
| 0-4964 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
137 | zone = ""; never executed: zone = ""; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
138 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
139 | if (hour12 > 12
| 2029-2935 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
140 | hour12 -= 12; executed 2029 times by 6 tests: hour12 -= 12; Executed by:
| 2029 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
141 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
142 | if (hour12 == 0
| 455-2480 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
143 | hour12 = 12; executed 2480 times by 2 tests: hour12 = 12; Executed by:
| 2480 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
144 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
145 | for (f = format; *
| 4964-68232 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
146 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
147 | int pad = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
148 | int modifier; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
149 | int digits = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
150 | int number_value; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
151 | unsigned int u_number_value; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
152 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
153 | _Bool | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
154 | negative_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
155 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
156 | _Bool | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
157 | always_output_a_sign; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
158 | int tz_colon_mask; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
159 | const char *subfmt; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
160 | char sign_char; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
161 | char *bufp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
162 | char buf[1 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
163 | + 2 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
164 | + (sizeof (int) < sizeof (time_t) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
165 | ? ((sizeof (time_t) * 8 - 1) * 146 / 485 + 2) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
166 | : ((sizeof (int) * 8 - 1) * 146 / 485 + 2))]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
167 | int width = -1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
168 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
169 | _Bool | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
170 | to_lowcase = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
171 | 0 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
172 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
173 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
174 | _Bool | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
175 | to_uppcase = upcase; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
176 | size_t colons; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
177 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
178 | _Bool | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
179 | change_case = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
180 | 0 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
181 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
182 | int format_char; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
183 | if (*
| 16006-52226 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
184 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
185 | do { size_t _n = (1); size_t _w = (width < 0
never executed: 0;return 0; never executed: if (preturn 0;
never executed: memset (p, '0', _delta), (p) += (_delta));(memset (p, '0', _delta), (p) += (_delta)); never executed: else ((memset (p, '0', _delta), (p) += (_delta)); never executed: memset (p, ' ', _delta), (p) += (_delta));(memset (p, ' ', _delta), (p) += (_delta)); never executed: } *p = *f; ((p) += (_n)); }(memset (p, ' ', _delta), (p) += (_delta)); executed 40570 times by 5 tests: i += _incr; } while (0);end of block Executed by:
| 0-52226 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
186 | continue; executed 52226 times by 6 tests: continue; Executed by:
| 52226 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
187 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
188 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
189 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
190 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
191 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
192 | while (1) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
193 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
194 | switch (*++f) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
195 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
196 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
197 | case executed 4 times by 1 test: '_':case '_': Executed by:
executed 4 times by 1 test: case '_': Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
198 | case never executed: '-':case '-': never executed: case '-': | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
199 | case executed 4 times by 1 test: '0':case '0': Executed by:
executed 4 times by 1 test: case '0': Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
200 | pad = *f; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
201 | continue; executed 8 times by 1 test: continue; Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
202 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
203 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
204 | case executed 2 times by 1 test: '^':case '^': Executed by:
executed 2 times by 1 test: case '^': Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
205 | to_uppcase = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
206 | 1 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
207 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
208 | continue; executed 2 times by 1 test: continue; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
209 | case never executed: '#':case '#': never executed: case '#': | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
210 | change_case = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
211 | 1 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
212 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
213 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
214 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
215 | default executed 16006 times by 6 tests: :default: Executed by:
executed 16006 times by 6 tests: default: Executed by:
| 16006 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
216 | break; executed 16006 times by 6 tests: break; Executed by:
| 16006 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
217 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
218 | break; executed 16006 times by 6 tests: break; Executed by:
| 16006 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
219 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
220 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
221 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
222 | if (((
| 12-15994 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
223 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
224 | width = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
225 | do | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
226 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
227 | if (width > 0x7fffffff / 10
| 0-18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
228 | || (width == 0x7fffffff / 10
| 0-18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
229 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
230 | width = 0x7fffffff; never executed: width = 0x7fffffff; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
231 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
232 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
233 | width *= 10; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
234 | width += *f - '0'; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
235 | } executed 18 times by 1 test: end of block Executed by:
| 18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
236 | ++f; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
237 | } executed 18 times by 1 test: end of block Executed by:
| 18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
238 | while (((
| 6-12 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
239 | } executed 12 times by 1 test: end of block Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
240 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
241 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
242 | switch (*f) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
243 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
244 | case never executed: 'E':case 'E': never executed: case 'E': | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
245 | case never executed: 'O':case 'O': never executed: case 'O': | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
246 | modifier = *f++; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
247 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
248 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
249 | default executed 16006 times by 6 tests: :default: Executed by:
executed 16006 times by 6 tests: default: Executed by:
| 16006 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
250 | modifier = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
251 | break; executed 16006 times by 6 tests: break; Executed by:
| 16006 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
252 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
253 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
254 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
255 | format_char = *f; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
256 | switch (format_char) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
257 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
258 | case executed 26 times by 3 tests: '%':case '%': Executed by:
executed 26 times by 3 tests: case '%': Executed by:
| 26 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
259 | if (modifier != 0
| 0-26 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
260 | goto never executed: bad_format;goto bad_format; never executed: goto bad_format; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
261 | do { size_t _n = (1); size_t _w = (width < 0
never executed: 0;return 0; never executed: if (preturn 0;
never executed: memset (p, '0', _delta), (p) += (_delta));(memset (p, '0', _delta), (p) += (_delta)); never executed: else ((memset (p, '0', _delta), (p) += (_delta)); never executed: memset (p, ' ', _delta), (p) += (_delta));(memset (p, ' ', _delta), (p) += (_delta)); never executed: } *p = *f; ((p) += (_n)); }(memset (p, ' ', _delta), (p) += (_delta)); executed 8 times by 1 test: i += _incr; } while (0);end of block Executed by:
| 0-26 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
262 | break; executed 26 times by 3 tests: break; Executed by:
| 26 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
263 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
264 | case executed 15 times by 1 test: 'a':case 'a': Executed by:
executed 15 times by 1 test: case 'a': Executed by:
| 15 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
265 | if (modifier != 0
| 0-15 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
266 | goto never executed: bad_format;goto bad_format; never executed: goto bad_format; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
267 | if (change_case
| 0-15 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
268 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
269 | to_uppcase = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
270 | 1 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
271 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
272 | to_lowcase = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
273 | 0 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
274 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
275 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
276 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
277 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
278 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
279 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
280 | goto executed 15 times by 1 test: underlying_strftime;goto underlying_strftime; Executed by:
executed 15 times by 1 test: goto underlying_strftime; Executed by:
| 15 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
281 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
282 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
283 | case executed 2 times by 1 test: 'A':case 'A': Executed by:
executed 2 times by 1 test: case 'A': Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
284 | if (modifier != 0
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
285 | goto never executed: bad_format;goto bad_format; never executed: goto bad_format; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
286 | if (change_case
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
287 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
288 | to_uppcase = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
289 | 1 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
290 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
291 | to_lowcase = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
292 | 0 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
293 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
294 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
295 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
296 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
297 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
298 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
299 | goto executed 2 times by 1 test: underlying_strftime;goto underlying_strftime; Executed by:
executed 2 times by 1 test: goto underlying_strftime; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
300 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
301 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
302 | case executed 38 times by 3 tests: 'b':case 'b': Executed by:
executed 38 times by 3 tests: case 'b': Executed by:
| 38 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
303 | case executed 4 times by 1 test: 'h':case 'h': Executed by:
executed 4 times by 1 test: case 'h': Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
304 | if (change_case
| 0-42 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
305 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
306 | to_uppcase = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
307 | 1 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
308 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
309 | to_lowcase = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
310 | 0 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
311 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
312 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
313 | if (modifier == 'E'
| 0-42 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
314 | goto never executed: bad_format;goto bad_format; never executed: goto bad_format; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
315 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
316 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
317 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
318 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
319 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
320 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
321 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
322 | goto executed 42 times by 3 tests: underlying_strftime;goto underlying_strftime; Executed by:
executed 42 times by 3 tests: goto underlying_strftime; Executed by:
| 42 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
323 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
324 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
325 | case executed 2 times by 1 test: 'B':case 'B': Executed by:
executed 2 times by 1 test: case 'B': Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
326 | if (modifier == 'E'
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
327 | goto never executed: bad_format;goto bad_format; never executed: goto bad_format; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
328 | if (change_case
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
329 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
330 | to_uppcase = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
331 | 1 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
332 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
333 | to_lowcase = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
334 | 0 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
335 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
336 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
337 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
338 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
339 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
340 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
341 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
342 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
343 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
344 | goto executed 2 times by 1 test: underlying_strftime;goto underlying_strftime; Executed by:
executed 2 times by 1 test: goto underlying_strftime; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
345 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
346 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
347 | case executed 2 times by 1 test: 'c':case 'c': Executed by:
executed 2 times by 1 test: case 'c': Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
348 | if (modifier == 'O'
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
349 | goto never executed: bad_format;goto bad_format; never executed: goto bad_format; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
350 | goto executed 2 times by 1 test: underlying_strftime;goto underlying_strftime; Executed by:
executed 2 times by 1 test: goto underlying_strftime; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
351 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
352 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
353 | subformat: | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
354 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
355 | size_t len = __strftime_internal ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
356 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
357 | , (size_t) -1, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
358 | subfmt, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
359 | tp, to_uppcase, tzset_called | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
360 | , tz, ns ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
361 | do { size_t _n = (len); size_t _w = (width < 0
never executed: 0;return 0; never executed: if (preturn 0;
never executed: memset (p, '0', _delta), (p) += (_delta));(memset (p, '0', _delta), (p) += (_delta)); never executed: else ((memset (p, '0', _delta), (p) += (_delta)); never executed: memset (p, ' ', _delta), (p) += (_delta));(memset (p, ' ', _delta), (p) += (_delta)); never executed: } __strftime_internal (p, maxsize - i, subfmt, tp, to_uppcase, tzset_called , tz, ns ); ((p) += (_n)); }(memset (p, ' ', _delta), (p) += (_delta)); never executed: i += _incr; } while (0)end of block | 0-84 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
362 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
363 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
364 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
365 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
366 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
367 | break; executed 84 times by 1 test: break; Executed by:
| 84 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
368 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
369 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
370 | underlying_strftime: | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
371 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
372 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
373 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
374 | char ufmt[5]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
375 | char *u = ufmt; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
376 | char ubuf[1024]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
377 | size_t len; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
378 | *u++ = ' '; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
379 | *u++ = '%'; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
380 | if (modifier != 0
| 0-71 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
381 | * never executed: u++ = modifier;*u++ = modifier; never executed: *u++ = modifier; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
382 | *u++ = format_char; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
383 | *u = '\0'; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
384 | len = strftime (ubuf, sizeof ubuf, ufmt, tp); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
385 | if (len != 0
| 0-71 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
386 | do { size_t _n = ((len - 1)); size_t _w = (width < 0
never executed: 0;return 0; never executed: if (preturn 0;
never executed: memset (p, '0', _delta), (p) += (_delta));(memset (p, '0', _delta), (p) += (_delta)); never executed: else ((memset (p, '0', _delta), (p) += (_delta)); never executed: memset (p, ' ', _delta), (p) += (_delta));(memset (p, ' ', _delta), (p) += (_delta)); never executed: } if (to_lowcase(memset (p, ' ', _delta), (p) += (_delta));
never executed: else if (to_uppcasememcpy_lowcase (p, (ubuf + 1), _n );
never executed: else memcpy ((void *) p, (void const *) (ubuf + 1), _n);memcpy_uppcase (p, (ubuf + 1), _n ); executed 8 times by 1 test: ((p) += (_n)); }memcpy ((void *) p, (void const *) (ubuf + 1), _n); Executed by:
executed 10 times by 2 tests: i += _incr; }end of block Executed by:
executed 69 times by 3 tests: while (0);end of block Executed by:
| 0-71 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
387 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
388 | break; executed 71 times by 3 tests: break; Executed by:
| 71 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
389 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
390 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
391 | case never executed: 'C':case 'C': never executed: case 'C': | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
392 | if (modifier == 'E'
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
393 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
394 | goto never executed: underlying_strftime;goto underlying_strftime; never executed: goto underlying_strftime; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
395 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
396 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
397 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
398 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
399 | int century = tp->tm_year / 100 + 1900 / 100; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
400 | century -= tp->tm_year % 100 < 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
401 | do { digits = 2; negative_number = tp->tm_year < - 1900; u_number_value = century; goto never executed: do_signed_number;goto do_signed_number; never executed: } while (0);goto do_signed_number; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
402 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
403 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
404 | case executed 2 times by 1 test: 'x':case 'x': Executed by:
executed 2 times by 1 test: case 'x': Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
405 | if (modifier == 'O'
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
406 | goto never executed: bad_format;goto bad_format; never executed: goto bad_format; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
407 | goto executed 2 times by 1 test: underlying_strftime;goto underlying_strftime; Executed by:
executed 2 times by 1 test: goto underlying_strftime; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
408 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
409 | case executed 8 times by 1 test: 'D':case 'D': Executed by:
executed 8 times by 1 test: case 'D': Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
410 | if (modifier != 0
| 0-8 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
411 | goto never executed: bad_format;goto bad_format; never executed: goto bad_format; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
412 | subfmt = "%m/%d/%y"; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
413 | goto executed 8 times by 1 test: subformat;goto subformat; Executed by:
executed 8 times by 1 test: goto subformat; Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
414 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
415 | case executed 2389 times by 5 tests: 'd':case 'd': Executed by:
executed 2389 times by 5 tests: case 'd': Executed by:
| 2389 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
416 | if (modifier == 'E'
| 0-2389 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
417 | goto never executed: bad_format;goto bad_format; never executed: goto bad_format; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
418 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
419 | do { digits = 2; number_value = tp->tm_mday; goto executed 2389 times by 5 tests: do_number;goto do_number; Executed by:
executed 2389 times by 5 tests: } while (0);goto do_number; Executed by:
| 2389 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
420 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
421 | case executed 164 times by 3 tests: 'e':case 'e': Executed by:
executed 164 times by 3 tests: case 'e': Executed by:
| 164 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
422 | if (modifier == 'E'
| 0-164 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
423 | goto never executed: bad_format;goto bad_format; never executed: goto bad_format; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
424 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
425 | do { digits = 2; number_value = tp->tm_mday; goto executed 164 times by 3 tests: do_number_spacepad;goto do_number_spacepad; Executed by:
executed 164 times by 3 tests: } while (0);goto do_number_spacepad; Executed by:
| 164 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
426 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
427 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
428 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
429 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
430 | do_tz_offset: | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
431 | always_output_a_sign = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
432 | 1 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
433 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
434 | goto executed 67 times by 5 tests: do_number_body;goto do_number_body; Executed by:
executed 67 times by 5 tests: goto do_number_body; Executed by:
| 67 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
435 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
436 | do_number_spacepad: | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
437 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
438 | if (pad != '0'
| 0-168 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
439 | pad = '_'; executed 168 times by 3 tests: pad = '_'; Executed by:
| 168 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
440 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
441 | do_number: code before this statement executed 168 times by 3 tests: do_number: Executed by:
| 168 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
442 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
443 | negative_number = number_value < 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
444 | u_number_value = number_value; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
445 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
446 | do_signed_number: code before this statement executed 10207 times by 6 tests: do_signed_number: Executed by:
| 10207 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
447 | always_output_a_sign = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
448 | 0 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
449 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
450 | tz_colon_mask = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
451 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
452 | do_number_body: code before this statement executed 15712 times by 6 tests: do_number_body: Executed by:
| 15712 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
453 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
454 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
455 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
456 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
457 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
458 | if (modifier == 'O'
| 0-15779 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
459 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
460 | goto never executed: underlying_strftime;goto underlying_strftime; never executed: goto underlying_strftime; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
461 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
462 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
463 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
464 | bufp = buf + sizeof (buf) / sizeof (buf[0]); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
465 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
466 | if (negative_number
| 17-15762 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
467 | u_number_value = - u_number_value; executed 17 times by 3 tests: u_number_value = - u_number_value; Executed by:
| 17 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
468 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
469 | do | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
470 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
471 | if (tz_colon_mask & 1
| 32-28707 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
472 | *-- executed 32 times by 1 test: bufp = ':';*--bufp = ':'; Executed by:
executed 32 times by 1 test: *--bufp = ':'; Executed by:
| 32 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
473 | tz_colon_mask >>= 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
474 | *--bufp = u_number_value % 10 + '0'; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
475 | u_number_value /= 10; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
476 | } executed 28739 times by 6 tests: end of block Executed by:
| 28739 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
477 | while (u_number_value != 0
| 40-15819 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
478 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
479 | do_number_sign_and_padding: code before this statement executed 15779 times by 6 tests: do_number_sign_and_padding: Executed by:
| 15779 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
480 | if (digits < width
| 12-15782 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
481 | digits = width; executed 12 times by 1 test: digits = width; Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
482 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
483 | sign_char = (negative_number
| 21-15773 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
484 | : always_output_a_sign
| 50-15723 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
485 | : 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
486 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
487 | if (pad == '-'
| 0-15794 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
488 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
489 | if (sign_char
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
490 | do { size_t _n = (1); size_t _w = (width < 0
never executed: 0;return 0; never executed: if (preturn 0;
never executed: memset (p, '0', _delta), (p) += (_delta));(memset (p, '0', _delta), (p) += (_delta)); never executed: else ((memset (p, '0', _delta), (p) += (_delta)); never executed: memset (p, ' ', _delta), (p) += (_delta));(memset (p, ' ', _delta), (p) += (_delta)); never executed: } *p = sign_char; ((p) += (_n)); }(memset (p, ' ', _delta), (p) += (_delta)); never executed: i += _incr; }end of block never executed: while (0);end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
491 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
492 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
493 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
494 | int padding = digits - (buf + (sizeof (buf) / sizeof (buf[0])) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
495 | - bufp) - !!sign_char; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
496 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
497 | if (padding > 0
| 6515-9279 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
498 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
499 | if (pad == '_'
| 10-9269 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
500 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
501 | if ((
| 0-10 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
502 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
503 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
504 | if (p
| 0-10 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
505 | ( executed 14 times by 1 test: memset (p, ' ', padding), (p) += (padding));(memset (p, ' ', padding), (p) += (padding)); Executed by:
executed 14 times by 1 test: (memset (p, ' ', padding), (p) += (padding)); Executed by:
| 14 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
506 | i += padding; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
507 | width = width > padding
| 4-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
508 | if (sign_char
| 2-8 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
509 | do { size_t _n = (1); size_t _w = (width < 0
never executed: 0;return 0; never executed: if (preturn 0;
never executed: memset (p, '0', _delta), (p) += (_delta));(memset (p, '0', _delta), (p) += (_delta)); never executed: else ((memset (p, '0', _delta), (p) += (_delta)); never executed: memset (p, ' ', _delta), (p) += (_delta));(memset (p, ' ', _delta), (p) += (_delta)); never executed: } *p = sign_char; ((p) += (_n)); }(memset (p, ' ', _delta), (p) += (_delta)); never executed: i += _incr; }end of block never executed: while (0);end of block | 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
510 | } executed 10 times by 1 test: end of block Executed by:
| 10 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
511 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
512 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
513 | if ((
| 0-9269 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
514 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
515 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
516 | if (sign_char
| 59-9210 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
517 | do { size_t _n = (1); size_t _w = (width < 0
never executed: 0;return 0; never executed: if (preturn 0;
never executed: memset (p, '0', _delta), (p) += (_delta));(memset (p, '0', _delta), (p) += (_delta)); never executed: else ((memset (p, '0', _delta), (p) += (_delta)); never executed: memset (p, ' ', _delta), (p) += (_delta));(memset (p, ' ', _delta), (p) += (_delta)); never executed: } *p = sign_char; ((p) += (_n)); }(memset (p, ' ', _delta), (p) += (_delta)); executed 18 times by 3 tests: i += _incr; }end of block Executed by:
executed 21 times by 3 tests: while (0);end of block Executed by:
| 0-59 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
518 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
519 | if (p
| 127-9142 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
520 | ( executed 15214 times by 6 tests: memset (p, '0', padding), (p) += (padding));(memset (p, '0', padding), (p) += (padding)); Executed by:
executed 15214 times by 6 tests: (memset (p, '0', padding), (p) += (padding)); Executed by:
| 15214 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
521 | i += padding; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
522 | width = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
523 | } executed 9269 times by 6 tests: end of block Executed by:
| 9269 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
524 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
525 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
526 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
527 | if (sign_char
| 10-6505 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
528 | do { size_t _n = (1); size_t _w = (width < 0
never executed: 0;return 0; never executed: if (preturn 0;
never executed: memset (p, '0', _delta), (p) += (_delta));(memset (p, '0', _delta), (p) += (_delta)); never executed: else ((memset (p, '0', _delta), (p) += (_delta)); never executed: memset (p, ' ', _delta), (p) += (_delta));(memset (p, ' ', _delta), (p) += (_delta)); never executed: } *p = sign_char; ((p) += (_n)); }(memset (p, ' ', _delta), (p) += (_delta)); executed 1 time by 1 test: i += _incr; }end of block Executed by:
executed 2 times by 1 test: while (0);end of block Executed by:
| 0-10 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
529 | } executed 6515 times by 6 tests: end of block Executed by:
| 6515 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
530 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
531 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
532 | do { size_t _n = ((buf + sizeof (buf) / sizeof (buf[0]) - bufp)); size_t _w = (width < 0
never executed: 0;return 0; never executed: if (preturn 0;
never executed: memset (p, '0', _delta), (p) += (_delta));(memset (p, '0', _delta), (p) += (_delta)); never executed: else ((memset (p, '0', _delta), (p) += (_delta)); never executed: memset (p, ' ', _delta), (p) += (_delta));(memset (p, ' ', _delta), (p) += (_delta)); never executed: } if (to_lowcase(memset (p, ' ', _delta), (p) += (_delta));
never executed: else if (to_uppcasememcpy_lowcase (p, (bufp), _n );
never executed: else memcpy ((void *) p, (void const *) (bufp), _n);memcpy_uppcase (p, (bufp), _n ); executed 13891 times by 5 tests: ((p) += (_n)); }memcpy ((void *) p, (void const *) (bufp), _n); Executed by:
executed 13891 times by 5 tests: i += _incr; } while (0);end of block Executed by:
| 0-15794 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
533 | break; executed 15794 times by 6 tests: break; Executed by:
| 15794 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
534 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
535 | case executed 6 times by 1 test: 'F':case 'F': Executed by:
executed 6 times by 1 test: case 'F': Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
536 | if (modifier != 0
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
537 | goto never executed: bad_format;goto bad_format; never executed: goto bad_format; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
538 | subfmt = "%Y-%m-%d"; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
539 | goto executed 6 times by 1 test: subformat;goto subformat; Executed by:
executed 6 times by 1 test: goto subformat; Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
540 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
541 | case executed 2578 times by 6 tests: 'H':case 'H': Executed by:
executed 2578 times by 6 tests: case 'H': Executed by:
| 2578 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
542 | if (modifier == 'E'
| 0-2578 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
543 | goto never executed: bad_format;goto bad_format; never executed: goto bad_format; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
544 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
545 | do { digits = 2; number_value = tp->tm_hour; goto executed 2578 times by 6 tests: do_number;goto do_number; Executed by:
executed 2578 times by 6 tests: } while (0);goto do_number; Executed by:
| 2578 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
546 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
547 | case executed 2 times by 1 test: 'I':case 'I': Executed by:
executed 2 times by 1 test: case 'I': Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
548 | if (modifier == 'E'
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
549 | goto never executed: bad_format;goto bad_format; never executed: goto bad_format; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
550 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
551 | do { digits = 2; number_value = hour12; goto executed 2 times by 1 test: do_number;goto do_number; Executed by:
executed 2 times by 1 test: } while (0);goto do_number; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
552 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
553 | case executed 2 times by 1 test: 'k':case 'k': Executed by:
executed 2 times by 1 test: case 'k': Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
554 | if (modifier == 'E'
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
555 | goto never executed: bad_format;goto bad_format; never executed: goto bad_format; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
556 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
557 | do { digits = 2; number_value = tp->tm_hour; goto executed 2 times by 1 test: do_number_spacepad;goto do_number_spacepad; Executed by:
executed 2 times by 1 test: } while (0);goto do_number_spacepad; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
558 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
559 | case executed 2 times by 1 test: 'l':case 'l': Executed by:
executed 2 times by 1 test: case 'l': Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
560 | if (modifier == 'E'
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
561 | goto never executed: bad_format;goto bad_format; never executed: goto bad_format; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
562 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
563 | do { digits = 2; number_value = hour12; goto executed 2 times by 1 test: do_number_spacepad;goto do_number_spacepad; Executed by:
executed 2 times by 1 test: } while (0);goto do_number_spacepad; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
564 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
565 | case executed 2 times by 1 test: 'j':case 'j': Executed by:
executed 2 times by 1 test: case 'j': Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
566 | if (modifier == 'E'
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
567 | goto never executed: bad_format;goto bad_format; never executed: goto bad_format; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
568 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
569 | do { digits = 3; negative_number = tp->tm_yday < -1; u_number_value = tp->tm_yday + 1U; goto executed 2 times by 1 test: do_signed_number;goto do_signed_number; Executed by:
executed 2 times by 1 test: } while (0);goto do_signed_number; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
570 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
571 | case executed 2576 times by 6 tests: 'M':case 'M': Executed by:
executed 2576 times by 6 tests: case 'M': Executed by:
| 2576 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
572 | if (modifier == 'E'
| 0-2576 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
573 | goto never executed: bad_format;goto bad_format; never executed: goto bad_format; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
574 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
575 | do { digits = 2; number_value = tp->tm_min; goto executed 2576 times by 6 tests: do_number;goto do_number; Executed by:
executed 2576 times by 6 tests: } while (0);goto do_number; Executed by:
| 2576 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
576 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
577 | case executed 2382 times by 5 tests: 'm':case 'm': Executed by:
executed 2382 times by 5 tests: case 'm': Executed by:
| 2382 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
578 | if (modifier == 'E'
| 0-2382 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
579 | goto never executed: bad_format;goto bad_format; never executed: goto bad_format; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
580 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
581 | do { digits = 2; negative_number = tp->tm_mon < -1; u_number_value = tp->tm_mon + 1U; goto executed 2382 times by 5 tests: do_signed_number;goto do_signed_number; Executed by:
executed 2382 times by 5 tests: } while (0);goto do_signed_number; Executed by:
| 2382 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
582 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
583 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
584 | case executed 31 times by 4 tests: 'N':case 'N': Executed by:
executed 31 times by 4 tests: case 'N': Executed by:
| 31 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
585 | if (modifier == 'E'
| 0-31 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
586 | goto never executed: bad_format;goto bad_format; never executed: goto bad_format; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
587 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
588 | number_value = ns; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
589 | if (width == -1
| 0-31 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
590 | width = 9; executed 31 times by 4 tests: width = 9; Executed by:
| 31 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
591 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
592 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
593 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
594 | int j; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
595 | for (j = width; j < 9
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
596 | number_value /= 10; never executed: number_value /= 10; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
597 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
598 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
599 | do { digits = width; number_value = number_value; goto executed 31 times by 4 tests: do_number;goto do_number; Executed by:
executed 31 times by 4 tests: } while (0);goto do_number; Executed by:
| 31 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
600 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
601 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
602 | case executed 2 times by 1 test: 'n':case 'n': Executed by:
executed 2 times by 1 test: case 'n': Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
603 | do { size_t _n = (1); size_t _w = (width < 0
never executed: 0;return 0; never executed: if (preturn 0;
never executed: memset (p, '0', _delta), (p) += (_delta));(memset (p, '0', _delta), (p) += (_delta)); never executed: else ((memset (p, '0', _delta), (p) += (_delta)); never executed: memset (p, ' ', _delta), (p) += (_delta));(memset (p, ' ', _delta), (p) += (_delta)); never executed: } *p = '\n'; ((p) += (_n)); }(memset (p, ' ', _delta), (p) += (_delta)); never executed: i += _incr; } while (0);end of block | 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
604 | break; executed 2 times by 1 test: break; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
605 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
606 | case never executed: 'P':case 'P': never executed: case 'P': | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
607 | to_lowcase = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
608 | 1 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
609 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
610 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
611 | format_char = 'p'; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
612 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
613 | ((void) 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
614 | case executed 2 times by 1 test: case 'p': Executed by:
code before this statement never executed: case 'p': executed 2 times by 1 test: 'p':case 'p': Executed by:
code before this statement never executed: case 'p': executed 2 times by 1 test: case 'p': Executed by:
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
615 | if (change_case
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
616 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
617 | to_uppcase = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
618 | 0 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
619 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
620 | to_lowcase = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
621 | 1 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
622 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
623 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
624 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
625 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
626 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
627 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
628 | goto executed 2 times by 1 test: underlying_strftime;goto underlying_strftime; Executed by:
executed 2 times by 1 test: goto underlying_strftime; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
629 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
630 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
631 | case executed 8 times by 1 test: 'q':case 'q': Executed by:
executed 8 times by 1 test: case 'q': Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
632 | do { digits = 1; negative_number = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
633 | 0 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
634 | ; u_number_value = ((tp->tm_mon * 11) >> 5) + 1; goto executed 8 times by 1 test: do_signed_number;goto do_signed_number; Executed by:
executed 8 times by 1 test: } while (0);goto do_signed_number; Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
635 | break; dead code: break; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
636 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
637 | case never executed: 'R':case 'R': never executed: case 'R': | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
638 | subfmt = "%H:%M"; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
639 | goto never executed: subformat;goto subformat; never executed: goto subformat; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
640 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
641 | case executed 2 times by 1 test: 'r':case 'r': Executed by:
executed 2 times by 1 test: case 'r': Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
642 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
643 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
644 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
645 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
646 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
647 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
648 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
649 | goto executed 2 times by 1 test: underlying_strftime;goto underlying_strftime; Executed by:
executed 2 times by 1 test: goto underlying_strftime; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
650 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
651 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
652 | case executed 2413 times by 5 tests: 'S':case 'S': Executed by:
executed 2413 times by 5 tests: case 'S': Executed by:
| 2413 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
653 | if (modifier == 'E'
| 0-2413 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
654 | goto never executed: bad_format;goto bad_format; never executed: goto bad_format; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
655 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
656 | do { digits = 2; number_value = tp->tm_sec; goto executed 2413 times by 5 tests: do_number;goto do_number; Executed by:
executed 2413 times by 5 tests: } while (0);goto do_number; Executed by:
| 2413 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
657 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
658 | case executed 15 times by 1 test: 's':case 's': Executed by:
executed 15 times by 1 test: case 's': Executed by:
| 15 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
659 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
660 | struct tm ltm; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
661 | time_t t; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
662 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
663 | ltm = *tp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
664 | t = mktime_z (tz, <m); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
665 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
666 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
667 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
668 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
669 | bufp = buf + sizeof (buf) / sizeof (buf[0]); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
670 | negative_number = t < 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
671 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
672 | do | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
673 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
674 | int d = t % 10; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
675 | t /= 10; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
676 | *--bufp = (negative_number
| 8-82 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
677 | } executed 90 times by 1 test: end of block Executed by:
| 90 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
678 | while (t != 0
| 15-75 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
679 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
680 | digits = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
681 | always_output_a_sign = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
682 | 0 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
683 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
684 | goto executed 15 times by 1 test: do_number_sign_and_padding;goto do_number_sign_and_padding; Executed by:
executed 15 times by 1 test: goto do_number_sign_and_padding; Executed by:
| 15 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
685 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
686 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
687 | case executed 2 times by 1 test: 'X':case 'X': Executed by:
executed 2 times by 1 test: case 'X': Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
688 | if (modifier == 'O'
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
689 | goto never executed: bad_format;goto bad_format; never executed: goto bad_format; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
690 | goto executed 2 times by 1 test: underlying_strftime;goto underlying_strftime; Executed by:
executed 2 times by 1 test: goto underlying_strftime; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
691 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
692 | case executed 70 times by 1 test: 'T':case 'T': Executed by:
executed 70 times by 1 test: case 'T': Executed by:
| 70 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
693 | subfmt = "%H:%M:%S"; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
694 | goto executed 70 times by 1 test: subformat;goto subformat; Executed by:
executed 70 times by 1 test: goto subformat; Executed by:
| 70 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
695 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
696 | case executed 2 times by 1 test: 't':case 't': Executed by:
executed 2 times by 1 test: case 't': Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
697 | do { size_t _n = (1); size_t _w = (width < 0
never executed: 0;return 0; never executed: if (preturn 0;
never executed: memset (p, '0', _delta), (p) += (_delta));(memset (p, '0', _delta), (p) += (_delta)); never executed: else ((memset (p, '0', _delta), (p) += (_delta)); never executed: memset (p, ' ', _delta), (p) += (_delta));(memset (p, ' ', _delta), (p) += (_delta)); never executed: } *p = '\t'; ((p) += (_n)); }(memset (p, ' ', _delta), (p) += (_delta)); never executed: i += _incr; } while (0);end of block | 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
698 | break; executed 2 times by 1 test: break; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
699 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
700 | case never executed: 'u':case 'u': never executed: case 'u': | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
701 | do { digits = 1; number_value = (tp->tm_wday - 1 + 7) % 7 + 1; goto never executed: do_number;goto do_number; never executed: } while (0);goto do_number; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
702 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
703 | case executed 14 times by 1 test: 'U':case 'U': Executed by:
executed 14 times by 1 test: case 'U': Executed by:
| 14 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
704 | if (modifier == 'E'
| 0-14 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
705 | goto never executed: bad_format;goto bad_format; never executed: goto bad_format; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
706 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
707 | do { digits = 2; number_value = (tp->tm_yday - tp->tm_wday + 7) / 7; goto executed 14 times by 1 test: do_number;goto do_number; Executed by:
executed 14 times by 1 test: } while (0);goto do_number; Executed by:
| 14 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
708 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
709 | case executed 8 times by 1 test: 'V':case 'V': Executed by:
executed 8 times by 1 test: case 'V': Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
710 | case never executed: 'g':case 'g': never executed: case 'g': | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
711 | case never executed: 'G':case 'G': never executed: case 'G': | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
712 | if (modifier == 'E'
| 0-8 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
713 | goto never executed: bad_format;goto bad_format; never executed: goto bad_format; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
714 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
715 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
716 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
717 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
718 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
719 | int year = (tp->tm_year | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
720 | + (tp->tm_year < 0
| 0-8 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
721 | ? 1900 % 400 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
722 | : 1900 % 400 - 400)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
723 | int year_adjust = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
724 | int days = iso_week_days (tp->tm_yday, tp->tm_wday); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
725 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
726 | if (days < 0
| 0-8 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
727 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
728 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
729 | year_adjust = -1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
730 | days = iso_week_days (tp->tm_yday + (365 + | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
731 | (( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
732 | year - 1 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
733 | ) % 4 == 0 && (( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
734 | year - 1 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
735 | ) % 100 != 0 || ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
736 | year - 1 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
737 | ) % 400 == 0)) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
738 | ), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
739 | tp->tm_wday); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
740 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
741 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
742 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
743 | int d = iso_week_days (tp->tm_yday - (365 + | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
744 | (( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
745 | year | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
746 | ) % 4 == 0 && (( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
747 | year | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
748 | ) % 100 != 0 || ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
749 | year | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
750 | ) % 400 == 0)) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
751 | ), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
752 | tp->tm_wday); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
753 | if (0 <= d
| 0-8 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
754 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
755 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
756 | year_adjust = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
757 | days = d; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
758 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
759 | } executed 8 times by 1 test: end of block Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
760 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
761 | switch (*f) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
762 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
763 | case never executed: 'g':case 'g': never executed: case 'g': | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
764 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
765 | int yy = (tp->tm_year % 100 + year_adjust) % 100; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
766 | do { digits = 2; number_value = (0 <= yy
never executed: do_number;goto do_number; never executed: } while (0)goto do_number; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
767 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
768 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
769 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
770 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
771 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
772 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
773 | case never executed: 'G':case 'G': never executed: case 'G': | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
774 | do { digits = 4; negative_number = tp->tm_year < -1900 - year_adjust; u_number_value = (tp->tm_year + (unsigned int) 1900 + year_adjust); goto never executed: do_signed_number;goto do_signed_number; never executed: } while (0)goto do_signed_number; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
775 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
776 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
777 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
778 | default executed 8 times by 1 test: :default: Executed by:
executed 8 times by 1 test: default: Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
779 | do { digits = 2; number_value = days / 7 + 1; goto executed 8 times by 1 test: do_number;goto do_number; Executed by:
executed 8 times by 1 test: } while (0);goto do_number; Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
780 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
781 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
782 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
783 | case executed 8 times by 1 test: case 'W': Executed by:
code before this statement never executed: case 'W': executed 8 times by 1 test: 'W':case 'W': Executed by:
code before this statement never executed: case 'W': executed 8 times by 1 test: case 'W': Executed by:
| 0-8 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
784 | if (modifier == 'E'
| 0-8 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
785 | goto never executed: bad_format;goto bad_format; never executed: goto bad_format; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
786 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
787 | do { digits = 2; number_value = (tp->tm_yday - (tp->tm_wday - 1 + 7) % 7 + 7) / 7; goto executed 8 times by 1 test: do_number;goto do_number; Executed by:
executed 8 times by 1 test: } while (0);goto do_number; Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
788 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
789 | case executed 2 times by 1 test: 'w':case 'w': Executed by:
executed 2 times by 1 test: case 'w': Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
790 | if (modifier == 'E'
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
791 | goto never executed: bad_format;goto bad_format; never executed: goto bad_format; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
792 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
793 | do { digits = 1; number_value = tp->tm_wday; goto executed 2 times by 1 test: do_number;goto do_number; Executed by:
executed 2 times by 1 test: } while (0);goto do_number; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
794 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
795 | case executed 3113 times by 5 tests: 'Y':case 'Y': Executed by:
executed 3113 times by 5 tests: case 'Y': Executed by:
| 3113 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
796 | if (modifier == 'E'
| 0-3113 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
797 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
798 | goto never executed: underlying_strftime;goto underlying_strftime; never executed: goto underlying_strftime; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
799 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
800 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
801 | if (modifier == 'O'
| 0-3113 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
802 | goto never executed: bad_format;goto bad_format; never executed: goto bad_format; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
803 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
804 | do { digits = 4; negative_number = tp->tm_year < -1900; u_number_value = tp->tm_year + (unsigned int) 1900; goto executed 3113 times by 5 tests: do_signed_number;goto do_signed_number; Executed by:
executed 3113 times by 5 tests: } while (0)goto do_signed_number; Executed by:
| 3113 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
805 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
806 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
807 | case executed 18 times by 1 test: 'y':case 'y': Executed by:
executed 18 times by 1 test: case 'y': Executed by:
| 18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
808 | if (modifier == 'E'
| 0-18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
809 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
810 | goto never executed: underlying_strftime;goto underlying_strftime; never executed: goto underlying_strftime; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
811 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
812 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
813 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
814 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
815 | int yy = tp->tm_year % 100; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
816 | if (yy < 0
| 0-18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
817 | yy = tp->tm_year < - 1900
never executed: yy = tp->tm_year < - 1900 ? -yy : yy + 100; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
818 | do { digits = 2; number_value = yy; goto executed 18 times by 1 test: do_number;goto do_number; Executed by:
executed 18 times by 1 test: } while (0);goto do_number; Executed by:
| 18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
819 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
820 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
821 | case executed 25 times by 3 tests: 'Z':case 'Z': Executed by:
executed 25 times by 3 tests: case 'Z': Executed by:
| 25 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
822 | if (change_case
| 0-25 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
823 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
824 | to_uppcase = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
825 | 0 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
826 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
827 | to_lowcase = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
828 | 1 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
829 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
830 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
831 | do { size_t _n = ((strlen (zone))); size_t _w = (width < 0
never executed: 0;return 0; never executed: if (preturn 0;
never executed: memset (p, '0', _delta), (p) += (_delta));(memset (p, '0', _delta), (p) += (_delta)); never executed: else ((memset (p, '0', _delta), (p) += (_delta)); never executed: memset (p, ' ', _delta), (p) += (_delta));(memset (p, ' ', _delta), (p) += (_delta)); never executed: } if (to_lowcase(memset (p, ' ', _delta), (p) += (_delta));
never executed: else if (to_uppcasememcpy_lowcase (p, (zone), _n );
never executed: else memcpy ((void *) p, (void const *) (zone), _n);memcpy_uppcase (p, (zone), _n ); executed 4 times by 1 test: ((p) += (_n)); }memcpy ((void *) p, (void const *) (zone), _n); Executed by:
executed 4 times by 1 test: i += _incr; } while (0);end of block Executed by:
| 0-25 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
832 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
833 | break; executed 25 times by 3 tests: break; Executed by:
| 25 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
834 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
835 | case executed 30 times by 1 test: ':':case ':': Executed by:
executed 30 times by 1 test: case ':': Executed by:
| 30 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
836 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
837 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
838 | for (colons = 1; f[colons] == ':'
| 14-30 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
839 | continue; executed 14 times by 1 test: continue; Executed by:
| 14 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
840 | if (f[colons] != 'z'
| 2-28 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
841 | goto executed 2 times by 1 test: bad_format;goto bad_format; Executed by:
executed 2 times by 1 test: goto bad_format; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
842 | f += colons; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
843 | goto executed 28 times by 1 test: do_z_conversion;goto do_z_conversion; Executed by:
executed 28 times by 1 test: goto do_z_conversion; Executed by:
| 28 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
844 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
845 | case executed 39 times by 5 tests: 'z':case 'z': Executed by:
executed 39 times by 5 tests: case 'z': Executed by:
| 39 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
846 | colons = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
847 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
848 | do_z_conversion: code before this statement executed 39 times by 5 tests: do_z_conversion: Executed by:
| 39 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
849 | if (tp->tm_isdst < 0
| 0-67 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
850 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
851 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
852 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
853 | int diff; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
854 | int hour_diff; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
855 | int min_diff; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
856 | int sec_diff; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
857 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
858 | diff = tp->tm_gmtoff; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
859 | negative_number = diff < 0
| 0-50 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
860 | hour_diff = diff / 60 / 60; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
861 | min_diff = diff / 60 % 60; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
862 | sec_diff = diff % 60; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
863 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
864 | switch (colons) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
865 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
866 | case executed 39 times by 5 tests: 0:case 0: Executed by:
executed 39 times by 5 tests: case 0: Executed by:
| 39 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
867 | do { digits = 5; tz_colon_mask = 0; u_number_value = hour_diff * 100 + min_diff; goto executed 39 times by 5 tests: do_tz_offset;goto do_tz_offset; Executed by:
executed 39 times by 5 tests: } while (0);goto do_tz_offset; Executed by:
| 39 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
868 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
869 | case executed 20 times by 1 test: 1:case 1: Executed by:
executed 20 times by 1 test: tz_hh_mm:case 1: Executed by:
| 20 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
870 | do { digits = 6; tz_colon_mask = 04; u_number_value = hour_diff * 100 + min_diff; goto executed 20 times by 1 test: do_tz_offset;goto do_tz_offset; Executed by:
executed 20 times by 1 test: } while (0);goto do_tz_offset; Executed by:
| 20 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
871 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
872 | case executed 2 times by 1 test: 2:case 2: Executed by:
executed 2 times by 1 test: tz_hh_mm_ss:case 2: Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
873 | do { digits = 9; tz_colon_mask = 024; u_number_value = hour_diff * 10000 + min_diff * 100 + sec_diff; goto executed 6 times by 1 test: do_tz_offset;goto do_tz_offset; Executed by:
executed 6 times by 1 test: } while (0)goto do_tz_offset; Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
874 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
875 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
876 | case executed 6 times by 1 test: 3:case 3: Executed by:
executed 6 times by 1 test: case 3: Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
877 | if (sec_diff != 0
| 2-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
878 | goto executed 4 times by 1 test: tz_hh_mm_ss;goto tz_hh_mm_ss; Executed by:
executed 4 times by 1 test: goto tz_hh_mm_ss; Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
879 | if (min_diff != 0
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
880 | goto never executed: tz_hh_mm;goto tz_hh_mm; never executed: goto tz_hh_mm; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
881 | do { digits = 3; tz_colon_mask = 0; u_number_value = hour_diff; goto executed 2 times by 1 test: do_tz_offset;goto do_tz_offset; Executed by:
executed 2 times by 1 test: } while (0);goto do_tz_offset; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
882 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
883 | default never executed: :default: never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
884 | goto never executed: bad_format;goto bad_format; never executed: goto bad_format; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
885 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
886 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
887 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
888 | case never executed: '\0':case '\0': never executed: case '\0': code before this statement never executed: case '\0': | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
889 | --f; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
890 | ((void) 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
891 | default never executed: :default: never executed: default: code before this statement never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
892 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
893 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
894 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
895 | bad_format: | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
896 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
897 | int flen; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
898 | for (flen = 1; f[1 - flen] != '%'
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
899 | continue; executed 2 times by 1 test: continue; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
900 | do { size_t _n = ((flen)); size_t _w = (width < 0
never executed: 0;return 0; never executed: if (preturn 0;
never executed: memset (p, '0', _delta), (p) += (_delta));(memset (p, '0', _delta), (p) += (_delta)); never executed: else ((memset (p, '0', _delta), (p) += (_delta)); never executed: memset (p, ' ', _delta), (p) += (_delta));(memset (p, ' ', _delta), (p) += (_delta)); never executed: } if (to_lowcase(memset (p, ' ', _delta), (p) += (_delta));
never executed: else if (to_uppcasememcpy_lowcase (p, (&f[1 - flen]), _n );
never executed: else memcpy ((void *) p, (void const *) (&f[1 - flen]), _n);memcpy_uppcase (p, (&f[1 - flen]), _n ); never executed: ((p) += (_n)); }memcpy ((void *) p, (void const *) (&f[1 - flen]), _n); never executed: i += _incr; } while (0);end of block | 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
901 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
902 | break; executed 2 times by 1 test: break; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
903 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
904 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
905 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
906 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
907 | if (p
| 0-3110 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
908 | * executed 3110 times by 5 tests: p = '\0';*p = '\0'; Executed by:
executed 3110 times by 5 tests: *p = '\0'; Executed by:
| 3110 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
909 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
910 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
911 | return executed 4964 times by 6 tests: i;return i; Executed by:
executed 4964 times by 6 tests: return i; Executed by:
| 4964 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
912 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
Switch to Source code | Preprocessed file |