| Line | Source | Count |
| 1 | | - |
| 2 | | - |
| 3 | | - |
| 4 | | - |
| 5 | | - |
| 6 | | - |
| 7 | | - |
| 8 | | - |
| 9 | | - |
| 10 | | - |
| 11 | | - |
| 12 | | - |
| 13 | | - |
| 14 | | - |
| 15 | | - |
| 16 | static char *bash_special_tilde_expansions (char *); | - |
| 17 | static int unquoted_tilde_word (const char *); | - |
| 18 | static void initialize_group_array (void); | - |
| 19 | | - |
| 20 | | - |
| 21 | const char * const bash_getcwd_errstr = "getcwd: cannot access parent directories"; | - |
| 22 | | - |
| 23 | | - |
| 24 | void | - |
| 25 | posix_initialize (on) | - |
| 26 | int on; | - |
| 27 | { | - |
| 28 | | - |
| 29 | if (on != 0| TRUE | evaluated 162 times by 1 test | | FALSE | evaluated 133 times by 1 test |
) | 133-162 |
| 30 | { | - |
| 31 | interactive_comments = source_uses_path = expand_aliases = 1; | - |
| 32 | inherit_errexit = 1; | - |
| 33 | source_searches_cwd = 0; | - |
| 34 | }executed 162 times by 1 test: end of block | 162 |
| 35 | | - |
| 36 | | - |
| 37 | if (on == 0| TRUE | evaluated 133 times by 1 test | | FALSE | evaluated 162 times by 1 test |
) | 133-162 |
| 38 | { | - |
| 39 | source_searches_cwd = 1; | - |
| 40 | expand_aliases = interactive_shell; | - |
| 41 | }executed 133 times by 1 test: end of block | 133 |
| 42 | }executed 295 times by 1 test: end of block | 295 |
| 43 | rlim_t | - |
| 44 | string_to_rlimtype (s) | - |
| 45 | char *s; | - |
| 46 | { | - |
| 47 | rlim_t ret; | - |
| 48 | int neg; | - |
| 49 | | - |
| 50 | ret = 0; | - |
| 51 | neg = 0; | - |
| 52 | while (s| TRUE | evaluated 241 times by 1 test | | FALSE | never evaluated |
&& *| TRUE | evaluated 241 times by 1 test | | FALSE | never evaluated |
s| TRUE | evaluated 241 times by 1 test | | FALSE | never evaluated |
&& (((*| TRUE | never evaluated | | FALSE | evaluated 241 times by 1 test |
s) == ' ')| TRUE | never evaluated | | FALSE | evaluated 241 times by 1 test |
|| ((*| TRUE | never evaluated | | FALSE | evaluated 241 times by 1 test |
s) == '\t')| TRUE | never evaluated | | FALSE | evaluated 241 times by 1 test |
)) | 0-241 |
| 53 | s++; never executed: s++; | 0 |
| 54 | if (s| TRUE | evaluated 241 times by 1 test | | FALSE | never evaluated |
&& (*| TRUE | never evaluated | | FALSE | evaluated 241 times by 1 test |
s == '-'| TRUE | never evaluated | | FALSE | evaluated 241 times by 1 test |
|| *| TRUE | never evaluated | | FALSE | evaluated 241 times by 1 test |
s == '+'| TRUE | never evaluated | | FALSE | evaluated 241 times by 1 test |
)) | 0-241 |
| 55 | { | - |
| 56 | neg = *s == '-'; | - |
| 57 | s++; | - |
| 58 | } never executed: end of block | 0 |
| 59 | for ( ; s| TRUE | evaluated 942 times by 1 test | | FALSE | never evaluated |
&& *| TRUE | evaluated 701 times by 1 test | | FALSE | evaluated 241 times by 1 test |
s| TRUE | evaluated 701 times by 1 test | | FALSE | evaluated 241 times by 1 test |
&& ((*| TRUE | evaluated 701 times by 1 test | | FALSE | never evaluated |
s) >= '0'| TRUE | evaluated 701 times by 1 test | | FALSE | never evaluated |
&& (*| TRUE | evaluated 701 times by 1 test | | FALSE | never evaluated |
s) <= '9'| TRUE | evaluated 701 times by 1 test | | FALSE | never evaluated |
); s++) | 0-942 |
| 60 | ret = (ret * 10) + ((*s) - '0');executed 701 times by 1 test: ret = (ret * 10) + ((*s) - '0'); | 701 |
| 61 | returnexecuted 241 times by 1 test: return (neg ? -ret : ret); (neg ? -ret : ret);executed 241 times by 1 test: return (neg ? -ret : ret); | 241 |
| 62 | } | - |
| 63 | | - |
| 64 | void | - |
| 65 | print_rlimtype (n, addnl) | - |
| 66 | rlim_t n; | - |
| 67 | int addnl; | - |
| 68 | { | - |
| 69 | char s[((sizeof (rlim_t) * 8 - (! ((rlim_t) 0 < (rlim_t) -1))) * 302 / 1000 + 1 + (! ((rlim_t) 0 < (rlim_t) -1))) + 1], *p; | - |
| 70 | | - |
| 71 | p = s + sizeof(s); | - |
| 72 | *--p = '\0'; | - |
| 73 | | - |
| 74 | if (n < 0| TRUE | never evaluated | | FALSE | evaluated 2 times by 1 test |
) | 0-2 |
| 75 | { | - |
| 76 | do | - |
| 77 | *-- never executed: *--p = '0' - n % 10; p = '0' - n % 10;never executed: *--p = '0' - n % 10; | 0 |
| 78 | while ((| TRUE | never evaluated | | FALSE | never evaluated |
n /= 10) != 0| TRUE | never evaluated | | FALSE | never evaluated |
); | 0 |
| 79 | | - |
| 80 | *--p = '-'; | - |
| 81 | } never executed: end of block | 0 |
| 82 | else | - |
| 83 | { | - |
| 84 | do | - |
| 85 | *--executed 7 times by 1 test: *--p = '0' + n % 10; p = '0' + n % 10;executed 7 times by 1 test: *--p = '0' + n % 10; | 7 |
| 86 | while ((| TRUE | evaluated 5 times by 1 test | | FALSE | evaluated 2 times by 1 test |
n /= 10) != 0| TRUE | evaluated 5 times by 1 test | | FALSE | evaluated 2 times by 1 test |
); | 2-5 |
| 87 | }executed 2 times by 1 test: end of block | 2 |
| 88 | | - |
| 89 | printf ("%s%s", p, addnl ? "\n" : ""); | - |
| 90 | }executed 2 times by 1 test: end of block | 2 |
| 91 | int | - |
| 92 | all_digits (string) | - |
| 93 | const char *string; | - |
| 94 | { | - |
| 95 | register const char *s; | - |
| 96 | | - |
| 97 | for (s = string; *| TRUE | evaluated 2056526 times by 1 test | | FALSE | evaluated 30136 times by 1 test |
s| TRUE | evaluated 2056526 times by 1 test | | FALSE | evaluated 30136 times by 1 test |
; s++) | 30136-2056526 |
| 98 | if (((*| TRUE | evaluated 2056491 times by 1 test | | FALSE | evaluated 35 times by 1 test |
s) >= '0'| TRUE | evaluated 2056491 times by 1 test | | FALSE | evaluated 35 times by 1 test |
&& (*| TRUE | evaluated 30676 times by 1 test | | FALSE | evaluated 2025815 times by 1 test |
s) <= '9'| TRUE | evaluated 30676 times by 1 test | | FALSE | evaluated 2025815 times by 1 test |
) == 0| TRUE | evaluated 2025850 times by 1 test | | FALSE | evaluated 30676 times by 1 test |
) | 35-2056491 |
| 99 | returnexecuted 2025850 times by 1 test: return (0); (0);executed 2025850 times by 1 test: return (0); | 2025850 |
| 100 | | - |
| 101 | returnexecuted 30136 times by 1 test: return (1); (1);executed 30136 times by 1 test: return (1); | 30136 |
| 102 | } | - |
| 103 | | - |
| 104 | | - |
| 105 | | - |
| 106 | | - |
| 107 | int | - |
| 108 | legal_number (string, result) | - |
| 109 | const char *string; | - |
| 110 | intmax_t *result; | - |
| 111 | { | - |
| 112 | intmax_t value; | - |
| 113 | char *ep; | - |
| 114 | | - |
| 115 | if (result| TRUE | evaluated 3727658 times by 1 test | | FALSE | evaluated 34 times by 1 test |
) | 34-3727658 |
| 116 | *executed 3727658 times by 1 test: *result = 0; result = 0;executed 3727658 times by 1 test: *result = 0; | 3727658 |
| 117 | | - |
| 118 | if (string == 0| TRUE | never evaluated | | FALSE | evaluated 3727692 times by 1 test |
) | 0-3727692 |
| 119 | return never executed: return 0; 0;never executed: return 0; | 0 |
| 120 | | - |
| 121 | | - |
| 122 | (*__errno_location ()) | - |
| 123 | = 0; | - |
| 124 | value = strtoimax (string, &ep, 10); | - |
| 125 | if ( | - |
| 126 | (*| TRUE | evaluated 8 times by 1 test | | FALSE | evaluated 3727684 times by 1 test |
__errno_location ())| TRUE | evaluated 8 times by 1 test | | FALSE | evaluated 3727684 times by 1 test |
| 8-3727684 |
| 127 | || ep == string| TRUE | evaluated 2355150 times by 1 test | | FALSE | evaluated 1372534 times by 1 test |
) | 1372534-2355150 |
| 128 | returnexecuted 2355158 times by 1 test: return 0; 0;executed 2355158 times by 1 test: return 0; | 2355158 |
| 129 | | - |
| 130 | | - |
| 131 | while ((((*| TRUE | never evaluated | | FALSE | evaluated 1372534 times by 1 test |
ep) == ' ')| TRUE | never evaluated | | FALSE | evaluated 1372534 times by 1 test |
|| ((*| TRUE | never evaluated | | FALSE | evaluated 1372534 times by 1 test |
ep) == '\t')| TRUE | never evaluated | | FALSE | evaluated 1372534 times by 1 test |
)) | 0-1372534 |
| 132 | ep++; never executed: ep++; | 0 |
| 133 | | - |
| 134 | | - |
| 135 | | - |
| 136 | if (*| TRUE | evaluated 1372534 times by 1 test | | FALSE | never evaluated |
string| TRUE | evaluated 1372534 times by 1 test | | FALSE | never evaluated |
&& *| TRUE | evaluated 1372525 times by 1 test | | FALSE | evaluated 9 times by 1 test |
ep == '\0'| TRUE | evaluated 1372525 times by 1 test | | FALSE | evaluated 9 times by 1 test |
) | 0-1372534 |
| 137 | { | - |
| 138 | if (result| TRUE | evaluated 1372520 times by 1 test | | FALSE | evaluated 5 times by 1 test |
) | 5-1372520 |
| 139 | *executed 1372520 times by 1 test: *result = value; result = value;executed 1372520 times by 1 test: *result = value; | 1372520 |
| 140 | | - |
| 141 | | - |
| 142 | | - |
| 143 | returnexecuted 1372525 times by 1 test: return 1; 1;executed 1372525 times by 1 test: return 1; | 1372525 |
| 144 | } | - |
| 145 | | - |
| 146 | returnexecuted 9 times by 1 test: return (0); (0);executed 9 times by 1 test: return (0); | 9 |
| 147 | } | - |
| 148 | | - |
| 149 | | - |
| 150 | | - |
| 151 | | - |
| 152 | int | - |
| 153 | legal_identifier (name) | - |
| 154 | const char *name; | - |
| 155 | { | - |
| 156 | register const char *s; | - |
| 157 | unsigned char c; | - |
| 158 | | - |
| 159 | if (!name| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 7188194 times by 1 test |
|| !(c = *name)| TRUE | evaluated 2 times by 1 test | | FALSE | evaluated 7188192 times by 1 test |
|| (((| TRUE | evaluated 777 times by 1 test | | FALSE | evaluated 7187415 times by 1 test |
1 && | TRUE | evaluated 777 times by 1 test | | FALSE | evaluated 7187415 times by 1 test |
| 1-7188194 |
| 160 | ((*| TRUE | evaluated 7181802 times by 1 test | | FALSE | evaluated 6390 times by 1 test |
__ctype_b_loc ())[(int) ((| TRUE | evaluated 7181802 times by 1 test | | FALSE | evaluated 6390 times by 1 test |
| TRUE | evaluated 777 times by 1 test | | FALSE | evaluated 7187415 times by 1 test |
| 777-7187415 |
| 161 | (unsigned char)c| TRUE | evaluated 7181802 times by 1 test | | FALSE | evaluated 6390 times by 1 test |
| TRUE | evaluated 777 times by 1 test | | FALSE | evaluated 7187415 times by 1 test |
| 777-7187415 |
| 162 | ))] & (unsigned short int) _ISalpha)| TRUE | evaluated 7181802 times by 1 test | | FALSE | evaluated 6390 times by 1 test |
| TRUE | evaluated 777 times by 1 test | | FALSE | evaluated 7187415 times by 1 test |
| 777-7187415 |
| 163 | ) || (| TRUE | evaluated 5613 times by 1 test | | FALSE | evaluated 777 times by 1 test |
c == '_')| TRUE | evaluated 5613 times by 1 test | | FALSE | evaluated 777 times by 1 test |
) == 0)| TRUE | evaluated 777 times by 1 test | | FALSE | evaluated 7187415 times by 1 test |
) | 777-7187415 |
| 164 | returnexecuted 780 times by 1 test: return (0); (0);executed 780 times by 1 test: return (0); | 780 |
| 165 | | - |
| 166 | for (s = name + 1; (| TRUE | evaluated 4807146 times by 1 test | | FALSE | evaluated 7187241 times by 1 test |
c = *s) != 0| TRUE | evaluated 4807146 times by 1 test | | FALSE | evaluated 7187241 times by 1 test |
; s++) | 4807146-7187241 |
| 167 | { | - |
| 168 | if (((| TRUE | evaluated 174 times by 1 test | | FALSE | evaluated 4806972 times by 1 test |
1 && | TRUE | evaluated 174 times by 1 test | | FALSE | evaluated 4806972 times by 1 test |
| 174-4806972 |
| 169 | ((*| TRUE | evaluated 4726728 times by 1 test | | FALSE | evaluated 80418 times by 1 test |
__ctype_b_loc ())[(int) ((| TRUE | evaluated 4726728 times by 1 test | | FALSE | evaluated 80418 times by 1 test |
| TRUE | evaluated 174 times by 1 test | | FALSE | evaluated 4806972 times by 1 test |
| 174-4806972 |
| 170 | (unsigned char)c| TRUE | evaluated 4726728 times by 1 test | | FALSE | evaluated 80418 times by 1 test |
| TRUE | evaluated 174 times by 1 test | | FALSE | evaluated 4806972 times by 1 test |
| 174-4806972 |
| 171 | ))] & (unsigned short int) _ISalnum)| TRUE | evaluated 4726728 times by 1 test | | FALSE | evaluated 80418 times by 1 test |
| TRUE | evaluated 174 times by 1 test | | FALSE | evaluated 4806972 times by 1 test |
| 174-4806972 |
| 172 | ) || c == '_'| TRUE | evaluated 80244 times by 1 test | | FALSE | evaluated 174 times by 1 test |
) == 0| TRUE | evaluated 174 times by 1 test | | FALSE | evaluated 4806972 times by 1 test |
) | 174-4806972 |
| 173 | returnexecuted 174 times by 1 test: return (0); (0);executed 174 times by 1 test: return (0); | 174 |
| 174 | }executed 4806972 times by 1 test: end of block | 4806972 |
| 175 | returnexecuted 7187241 times by 1 test: return (1); (1);executed 7187241 times by 1 test: return (1); | 7187241 |
| 176 | } | - |
| 177 | | - |
| 178 | | - |
| 179 | | - |
| 180 | | - |
| 181 | | - |
| 182 | | - |
| 183 | int | - |
| 184 | valid_nameref_value (name, flags) | - |
| 185 | const char *name; | - |
| 186 | int flags; | - |
| 187 | { | - |
| 188 | if (name == 0| TRUE | evaluated 8 times by 1 test | | FALSE | evaluated 518 times by 1 test |
|| *| TRUE | evaluated 30 times by 1 test | | FALSE | evaluated 488 times by 1 test |
name == 0| TRUE | evaluated 30 times by 1 test | | FALSE | evaluated 488 times by 1 test |
) | 8-518 |
| 189 | returnexecuted 38 times by 1 test: return 0; 0;executed 38 times by 1 test: return 0; | 38 |
| 190 | | - |
| 191 | | - |
| 192 | | - |
| 193 | if (legal_identifier (name)| TRUE | evaluated 283 times by 1 test | | FALSE | evaluated 205 times by 1 test |
|| (flags != 2| TRUE | evaluated 197 times by 1 test | | FALSE | evaluated 8 times by 1 test |
&& valid_array_reference (name, 0)| TRUE | evaluated 87 times by 1 test | | FALSE | evaluated 110 times by 1 test |
)) | 8-283 |
| 194 | | - |
| 195 | | - |
| 196 | | - |
| 197 | returnexecuted 370 times by 1 test: return 1; 1;executed 370 times by 1 test: return 1; | 370 |
| 198 | | - |
| 199 | returnexecuted 118 times by 1 test: return 0; 0;executed 118 times by 1 test: return 0; | 118 |
| 200 | } | - |
| 201 | | - |
| 202 | int | - |
| 203 | check_selfref (name, value, flags) | - |
| 204 | const char *name; | - |
| 205 | char *value; | - |
| 206 | int flags; | - |
| 207 | { | - |
| 208 | char *t; | - |
| 209 | | - |
| 210 | if (((| TRUE | evaluated 40 times by 1 test | | FALSE | evaluated 506 times by 1 test |
name)[0] == (value)[0]| TRUE | evaluated 40 times by 1 test | | FALSE | evaluated 506 times by 1 test |
&& | 40-506 |
| 211 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 212 | name| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 213 | ) && __builtin_constant_p (| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 214 | value| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 215 | ) && (__s1_len = __builtin_strlen (| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 216 | name| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 217 | ), __s2_len = __builtin_strlen (| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 218 | value| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 219 | ), (!((size_t)(const void *)((| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 220 | name| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 221 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 222 | name| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 223 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 224 | value| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 225 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 226 | value| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 227 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 228 | name| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 229 | , | TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 230 | value| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 231 | ) : (__builtin_constant_p (| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 232 | name| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 233 | ) && ((size_t)(const void *)((| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 234 | name| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 235 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 236 | name| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 237 | ) == 1) && (__s1_len = __builtin_strlen (| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 238 | name| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 239 | ), __s1_len < 4) ? (__builtin_constant_p (| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 240 | value| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 241 | ) && ((size_t)(const void *)((| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 242 | value| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 243 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 244 | value| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 245 | ) == 1) ? __builtin_strcmp (| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 246 | name| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 247 | , | TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 248 | value| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 249 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 250 | value| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 251 | ); int __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 252 | name| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 253 | ))[0] - __s2[0]); if (__s1_len > 0| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 0-24 |
| 254 | name| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 255 | ))[1] - __s2[1]); if (__s1_len > 1| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 0-24 |
| 256 | name| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 257 | ))[2] - __s2[2]); if (__s1_len > 2| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); | TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 0-24 |
| 258 | name| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); | 0-24 |
| 259 | ))[3] - __s2[3]);| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : (__builtin_constant_p (| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 0-24 |
| 260 | value| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 261 | ) && ((size_t)(const void *)((| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 262 | value| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 263 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 264 | value| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 265 | ) == 1) && (__s2_len = __builtin_strlen (| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 266 | value| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 267 | ), __s2_len < 4) ? (__builtin_constant_p (| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 268 | name| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 269 | ) && ((size_t)(const void *)((| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 270 | name| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 271 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 272 | name| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 273 | ) == 1) ? __builtin_strcmp (| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 274 | name| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 275 | , | TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 276 | value| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 277 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 278 | name| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 279 | ); int __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 280 | value| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 281 | ))[0] - __s2[0]); if (__s2_len > 0| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 0-24 |
| 282 | value| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 283 | ))[1] - __s2[1]); if (__s2_len > 1| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 0-24 |
| 284 | value| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 285 | ))[2] - __s2[2]); if (__s2_len > 2| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( value ))[3] - __s2[3]); | TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 0-24 |
| 286 | value| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( value ))[3] - __s2[3]); | 0-24 |
| 287 | ))[3] - __s2[3]);| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( value ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : __builtin_strcmp (| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 0-24 |
| 288 | name| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 289 | , | TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 290 | value| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 291 | )))); }) | TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
| 16-24 |
| 292 | == 0| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 24 times by 1 test |
)) | 16-24 |
| 293 | returnexecuted 16 times by 1 test: return 1; 1;executed 16 times by 1 test: return 1; | 16 |
| 294 | | - |
| 295 | | - |
| 296 | if (valid_array_reference (value, 0)| TRUE | evaluated 85 times by 1 test | | FALSE | evaluated 445 times by 1 test |
) | 85-445 |
| 297 | { | - |
| 298 | t = array_variable_name (value, 0, (char **) | - |
| 299 | ((void *)0) | - |
| 300 | , (int *) | - |
| 301 | ((void *)0) | - |
| 302 | ); | - |
| 303 | if (t| TRUE | evaluated 85 times by 1 test | | FALSE | never evaluated |
&& ((| TRUE | evaluated 4 times by 1 test | | FALSE | evaluated 81 times by 1 test |
name)[0] == (t)[0]| TRUE | evaluated 4 times by 1 test | | FALSE | evaluated 81 times by 1 test |
&& | 0-85 |
| 304 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 305 | name| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 306 | ) && __builtin_constant_p (| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 307 | t| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 308 | ) && (__s1_len = __builtin_strlen (| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 309 | name| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 310 | ), __s2_len = __builtin_strlen (| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 311 | t| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 312 | ), (!((size_t)(const void *)((| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 313 | name| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 314 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 315 | name| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 316 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 317 | t| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 318 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 319 | t| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 320 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 321 | name| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 322 | , | TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 323 | t| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 324 | ) : (__builtin_constant_p (| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 325 | name| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 326 | ) && ((size_t)(const void *)((| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 327 | name| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 328 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 329 | name| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 330 | ) == 1) && (__s1_len = __builtin_strlen (| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 331 | name| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 332 | ), __s1_len < 4) ? (__builtin_constant_p (| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 333 | t| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 334 | ) && ((size_t)(const void *)((| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 335 | t| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 336 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 337 | t| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 338 | ) == 1) ? __builtin_strcmp (| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 339 | name| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 340 | , | TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 341 | t| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 342 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 343 | t| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 344 | ); int __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 345 | name| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 346 | ))[0] - __s2[0]); if (__s1_len > 0| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 347 | name| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 348 | ))[1] - __s2[1]); if (__s1_len > 1| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 349 | name| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 350 | ))[2] - __s2[2]); if (__s1_len > 2| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); | TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 351 | name| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); | 0-4 |
| 352 | ))[3] - __s2[3]);| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : (__builtin_constant_p (| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 353 | t| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 354 | ) && ((size_t)(const void *)((| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 355 | t| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 356 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 357 | t| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 358 | ) == 1) && (__s2_len = __builtin_strlen (| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 359 | t| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 360 | ), __s2_len < 4) ? (__builtin_constant_p (| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 361 | name| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 362 | ) && ((size_t)(const void *)((| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 363 | name| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 364 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 365 | name| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 366 | ) == 1) ? __builtin_strcmp (| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 367 | name| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 368 | , | TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 369 | t| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 370 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 371 | name| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 372 | ); int __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 373 | t| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 374 | ))[0] - __s2[0]); if (__s2_len > 0| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 375 | t| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 376 | ))[1] - __s2[1]); if (__s2_len > 1| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 377 | t| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 378 | ))[2] - __s2[2]); if (__s2_len > 2| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( t ))[3] - __s2[3]); | TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 379 | t| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( t ))[3] - __s2[3]); | 0-4 |
| 380 | ))[3] - __s2[3]);| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( t ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : __builtin_strcmp (| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 381 | name| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 382 | , | TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 383 | t| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 384 | )))); }) | TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
| 0-4 |
| 385 | == 0| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
)) | 0-4 |
| 386 | { | - |
| 387 | sh_xfree((t), "general.c", 272); | - |
| 388 | returnexecuted 4 times by 1 test: return 1; 1;executed 4 times by 1 test: return 1; | 4 |
| 389 | } | - |
| 390 | sh_xfree((t), "general.c", 275); | - |
| 391 | }executed 81 times by 1 test: end of block | 81 |
| 392 | | - |
| 393 | | - |
| 394 | returnexecuted 526 times by 1 test: return 0; 0;executed 526 times by 1 test: return 0; | 526 |
| 395 | } | - |
| 396 | | - |
| 397 | | - |
| 398 | | - |
| 399 | | - |
| 400 | | - |
| 401 | | - |
| 402 | int | - |
| 403 | check_identifier (word, check_word) | - |
| 404 | WORD_DESC *word; | - |
| 405 | int check_word; | - |
| 406 | { | - |
| 407 | if ((| TRUE | never evaluated | | FALSE | evaluated 2025662 times by 1 test |
word->flags & (0x000001|0x000002))| TRUE | never evaluated | | FALSE | evaluated 2025662 times by 1 test |
|| all_digits (word->word)| TRUE | evaluated 5 times by 1 test | | FALSE | evaluated 2025657 times by 1 test |
) | 0-2025662 |
| 408 | { | - |
| 409 | internal_error ( | - |
| 410 | dcgettext (((void *)0), | - |
| 411 | "`%s': not a valid identifier" | - |
| 412 | , 5) | - |
| 413 | , word->word); | - |
| 414 | returnexecuted 5 times by 1 test: return (0); (0);executed 5 times by 1 test: return (0); | 5 |
| 415 | } | - |
| 416 | else if (check_word| TRUE | evaluated 2014501 times by 1 test | | FALSE | evaluated 11156 times by 1 test |
&& legal_identifier (word->word) == 0| TRUE | evaluated 2 times by 1 test | | FALSE | evaluated 2014499 times by 1 test |
) | 2-2014501 |
| 417 | { | - |
| 418 | internal_error ( | - |
| 419 | dcgettext (((void *)0), | - |
| 420 | "`%s': not a valid identifier" | - |
| 421 | , 5) | - |
| 422 | , word->word); | - |
| 423 | returnexecuted 2 times by 1 test: return (0); (0);executed 2 times by 1 test: return (0); | 2 |
| 424 | } | - |
| 425 | else | - |
| 426 | returnexecuted 2025655 times by 1 test: return (1); (1);executed 2025655 times by 1 test: return (1); | 2025655 |
| 427 | } | - |
| 428 | | - |
| 429 | | - |
| 430 | | - |
| 431 | | - |
| 432 | | - |
| 433 | | - |
| 434 | int | - |
| 435 | importable_function_name (string, len) | - |
| 436 | const char *string; | - |
| 437 | size_t len; | - |
| 438 | { | - |
| 439 | if (absolute_program (string)| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 440 | return never executed: return 0; 0;never executed: return 0; | 0 |
| 441 | if (*| TRUE | never evaluated | | FALSE | never evaluated |
string == '\n'| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 442 | return never executed: return 0; 0;never executed: return 0; | 0 |
| 443 | if ((| TRUE | never evaluated | | FALSE | never evaluated |
sh_syntaxtab[(unsigned char)(*string)] & 0x2000)| TRUE | never evaluated | | FALSE | never evaluated |
|| (| TRUE | never evaluated | | FALSE | never evaluated |
sh_syntaxtab[(unsigned char)(string[len-1])] & 0x2000)| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 444 | return never executed: return 0; 0;never executed: return 0; | 0 |
| 445 | return never executed: return (posixly_correct ? legal_identifier (string) : 1); (posixly_correct ? legal_identifier (string) : 1);never executed: return (posixly_correct ? legal_identifier (string) : 1); | 0 |
| 446 | } | - |
| 447 | | - |
| 448 | int | - |
| 449 | exportable_function_name (string) | - |
| 450 | const char *string; | - |
| 451 | { | - |
| 452 | if (absolute_program (string)| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 13 times by 1 test |
) | 1-13 |
| 453 | returnexecuted 1 time by 1 test: return 0; 0;executed 1 time by 1 test: return 0; | 1 |
| 454 | if (mbschr (string, '=') != 0| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 12 times by 1 test |
) | 1-12 |
| 455 | returnexecuted 1 time by 1 test: return 0; 0;executed 1 time by 1 test: return 0; | 1 |
| 456 | returnexecuted 12 times by 1 test: return 1; 1;executed 12 times by 1 test: return 1; | 12 |
| 457 | } | - |
| 458 | | - |
| 459 | | - |
| 460 | | - |
| 461 | | - |
| 462 | int | - |
| 463 | legal_alias_name (string, flags) | - |
| 464 | const char *string; | - |
| 465 | int flags; | - |
| 466 | { | - |
| 467 | register const char *s; | - |
| 468 | | - |
| 469 | for (s = string; *| TRUE | evaluated 343 times by 1 test | | FALSE | evaluated 93 times by 1 test |
s| TRUE | evaluated 343 times by 1 test | | FALSE | evaluated 93 times by 1 test |
; s++) | 93-343 |
| 470 | if ((| TRUE | never evaluated | | FALSE | evaluated 343 times by 1 test |
sh_syntaxtab[(unsigned char)(*s)] & 0x0002)| TRUE | never evaluated | | FALSE | evaluated 343 times by 1 test |
|| (| TRUE | never evaluated | | FALSE | evaluated 343 times by 1 test |
sh_syntaxtab[(unsigned char)(*s)] & 0x0400)| TRUE | never evaluated | | FALSE | evaluated 343 times by 1 test |
|| ((*| TRUE | never evaluated | | FALSE | evaluated 343 times by 1 test |
s) == '$'| TRUE | never evaluated | | FALSE | evaluated 343 times by 1 test |
|| (*| TRUE | never evaluated | | FALSE | evaluated 343 times by 1 test |
s) == '<'| TRUE | never evaluated | | FALSE | evaluated 343 times by 1 test |
|| (*| TRUE | never evaluated | | FALSE | evaluated 343 times by 1 test |
s) == '>'| TRUE | never evaluated | | FALSE | evaluated 343 times by 1 test |
) || (*| TRUE | never evaluated | | FALSE | evaluated 343 times by 1 test |
s == '/')| TRUE | never evaluated | | FALSE | evaluated 343 times by 1 test |
) | 0-343 |
| 471 | return never executed: return 0; 0;never executed: return 0; | 0 |
| 472 | returnexecuted 93 times by 1 test: return 1; 1;executed 93 times by 1 test: return 1; | 93 |
| 473 | } | - |
| 474 | | - |
| 475 | | - |
| 476 | | - |
| 477 | | - |
| 478 | int | - |
| 479 | assignment (string, flags) | - |
| 480 | const char *string; | - |
| 481 | int flags; | - |
| 482 | { | - |
| 483 | register unsigned char c; | - |
| 484 | register int newi, indx; | - |
| 485 | | - |
| 486 | c = string[indx = 0]; | - |
| 487 | | - |
| 488 | | - |
| 489 | if ((((| TRUE | evaluated 624518 times by 1 test | | FALSE | evaluated 38409330 times by 1 test |
1 && | TRUE | evaluated 624518 times by 1 test | | FALSE | evaluated 38409330 times by 1 test |
| 624518-38409330 |
| 490 | ((*| TRUE | evaluated 38380341 times by 1 test | | FALSE | evaluated 653507 times by 1 test |
__ctype_b_loc ())[(int) ((| TRUE | evaluated 38380341 times by 1 test | | FALSE | evaluated 653507 times by 1 test |
| TRUE | evaluated 624518 times by 1 test | | FALSE | evaluated 38409330 times by 1 test |
| 624518-38409330 |
| 491 | (unsigned char)c| TRUE | evaluated 38380341 times by 1 test | | FALSE | evaluated 653507 times by 1 test |
| TRUE | evaluated 624518 times by 1 test | | FALSE | evaluated 38409330 times by 1 test |
| 624518-38409330 |
| 492 | ))] & (unsigned short int) _ISalpha)| TRUE | evaluated 38380341 times by 1 test | | FALSE | evaluated 653507 times by 1 test |
| TRUE | evaluated 624518 times by 1 test | | FALSE | evaluated 38409330 times by 1 test |
| 624518-38409330 |
| 493 | ) || (| TRUE | evaluated 28989 times by 1 test | | FALSE | evaluated 624518 times by 1 test |
c == '_')| TRUE | evaluated 28989 times by 1 test | | FALSE | evaluated 624518 times by 1 test |
) == 0)| TRUE | evaluated 624518 times by 1 test | | FALSE | evaluated 38409330 times by 1 test |
&& ((| TRUE | evaluated 619166 times by 1 test | | FALSE | evaluated 5352 times by 1 test |
flags&1) == 0| TRUE | evaluated 619166 times by 1 test | | FALSE | evaluated 5352 times by 1 test |
|| c != '['| TRUE | evaluated 1144 times by 1 test | | FALSE | evaluated 4208 times by 1 test |
)) | 1144-38409330 |
| 494 | | - |
| 495 | | - |
| 496 | | - |
| 497 | returnexecuted 620310 times by 1 test: return (0); (0);executed 620310 times by 1 test: return (0); | 620310 |
| 498 | | - |
| 499 | while (c = string[indx]| TRUE | evaluated 92103721 times by 1 test | | FALSE | evaluated 1707611 times by 1 test |
) | 1707611-92103721 |
| 500 | { | - |
| 501 | | - |
| 502 | | - |
| 503 | if (c == '='| TRUE | evaluated 36693253 times by 1 test | | FALSE | evaluated 55410468 times by 1 test |
) | 36693253-55410468 |
| 504 | returnexecuted 36693253 times by 1 test: return (indx); (indx);executed 36693253 times by 1 test: return (indx); | 36693253 |
| 505 | | - |
| 506 | | - |
| 507 | if (c == '['| TRUE | evaluated 6145 times by 1 test | | FALSE | evaluated 55404323 times by 1 test |
) | 6145-55404323 |
| 508 | { | - |
| 509 | newi = skipsubscript (string, indx, (flags & 2) ? 1 : 0); | - |
| 510 | | - |
| 511 | | - |
| 512 | if (string[newi++] != ']'| TRUE | evaluated 3 times by 1 test | | FALSE | evaluated 6142 times by 1 test |
) | 3-6142 |
| 513 | returnexecuted 3 times by 1 test: return (0); (0);executed 3 times by 1 test: return (0); | 3 |
| 514 | if (string[newi] == '+'| TRUE | evaluated 30 times by 1 test | | FALSE | evaluated 6112 times by 1 test |
&& string[newi+1] == '='| TRUE | evaluated 30 times by 1 test | | FALSE | never evaluated |
) | 0-6112 |
| 515 | returnexecuted 30 times by 1 test: return (newi + 1); (newi + 1);executed 30 times by 1 test: return (newi + 1); | 30 |
| 516 | returnexecuted 6112 times by 1 test: return ((string[newi] == '=') ? newi : 0); ((string[newi] == '=') ? newi : 0);executed 6112 times by 1 test: return ((string[newi] == '=') ? newi : 0); | 6112 |
| 517 | } | - |
| 518 | | - |
| 519 | | - |
| 520 | | - |
| 521 | if (c == '+'| TRUE | evaluated 3186 times by 1 test | | FALSE | evaluated 55401137 times by 1 test |
&& string[indx+1] == '='| TRUE | evaluated 3163 times by 1 test | | FALSE | evaluated 23 times by 1 test |
) | 23-55401137 |
| 522 | returnexecuted 3163 times by 1 test: return (indx + 1); (indx + 1);executed 3163 times by 1 test: return (indx + 1); | 3163 |
| 523 | | - |
| 524 | | - |
| 525 | | - |
| 526 | if (((| TRUE | evaluated 3366 times by 1 test | | FALSE | evaluated 55397794 times by 1 test |
1 && | TRUE | evaluated 3366 times by 1 test | | FALSE | evaluated 55397794 times by 1 test |
| 3366-55397794 |
| 527 | ((*| TRUE | evaluated 55342190 times by 1 test | | FALSE | evaluated 58970 times by 1 test |
__ctype_b_loc ())[(int) ((| TRUE | evaluated 55342190 times by 1 test | | FALSE | evaluated 58970 times by 1 test |
| TRUE | evaluated 3366 times by 1 test | | FALSE | evaluated 55397794 times by 1 test |
| 3366-55397794 |
| 528 | (unsigned char)c| TRUE | evaluated 55342190 times by 1 test | | FALSE | evaluated 58970 times by 1 test |
| TRUE | evaluated 3366 times by 1 test | | FALSE | evaluated 55397794 times by 1 test |
| 3366-55397794 |
| 529 | ))] & (unsigned short int) _ISalnum)| TRUE | evaluated 55342190 times by 1 test | | FALSE | evaluated 58970 times by 1 test |
| TRUE | evaluated 3366 times by 1 test | | FALSE | evaluated 55397794 times by 1 test |
| 3366-55397794 |
| 530 | ) || c == '_'| TRUE | evaluated 55604 times by 1 test | | FALSE | evaluated 3366 times by 1 test |
) == 0| TRUE | evaluated 3366 times by 1 test | | FALSE | evaluated 55397794 times by 1 test |
) | 3366-55397794 |
| 531 | returnexecuted 3366 times by 1 test: return (0); (0);executed 3366 times by 1 test: return (0); | 3366 |
| 532 | | - |
| 533 | indx++; | - |
| 534 | }executed 55397794 times by 1 test: end of block | 55397794 |
| 535 | returnexecuted 1707611 times by 1 test: return (0); (0);executed 1707611 times by 1 test: return (0); | 1707611 |
| 536 | } | - |
| 537 | | - |
| 538 | int | - |
| 539 | line_isblank (line) | - |
| 540 | const char *line; | - |
| 541 | { | - |
| 542 | register int i; | - |
| 543 | | - |
| 544 | if (line == 0| TRUE | never evaluated | | FALSE | evaluated 2 times by 1 test |
) | 0-2 |
| 545 | return never executed: return 0; 0;never executed: return 0; | 0 |
| 546 | for (i = 0; line[i]| TRUE | evaluated 2 times by 1 test | | FALSE | never evaluated |
; i++) | 0-2 |
| 547 | if ( | - |
| 548 | ((*| TRUE | evaluated 2 times by 1 test | | FALSE | never evaluated |
__ctype_b_loc ())[(int) ((| TRUE | evaluated 2 times by 1 test | | FALSE | never evaluated |
| 0-2 |
| 549 | (unsigned char)line[i]| TRUE | evaluated 2 times by 1 test | | FALSE | never evaluated |
| 0-2 |
| 550 | ))] & (unsigned short int) _ISblank) | TRUE | evaluated 2 times by 1 test | | FALSE | never evaluated |
| 0-2 |
| 551 | == 0| TRUE | evaluated 2 times by 1 test | | FALSE | never evaluated |
) | 0-2 |
| 552 | break;executed 2 times by 1 test: break; | 2 |
| 553 | returnexecuted 2 times by 1 test: return (line[i] == '\0'); (line[i] == '\0');executed 2 times by 1 test: return (line[i] == '\0'); | 2 |
| 554 | } | - |
| 555 | int | - |
| 556 | sh_unset_nodelay_mode (fd) | - |
| 557 | int fd; | - |
| 558 | { | - |
| 559 | int flags, bflags; | - |
| 560 | | - |
| 561 | if ((| TRUE | never evaluated | | FALSE | evaluated 5266 times by 1 test |
flags = fcntl (fd, | TRUE | never evaluated | | FALSE | evaluated 5266 times by 1 test |
| 0-5266 |
| 562 | 3| TRUE | never evaluated | | FALSE | evaluated 5266 times by 1 test |
| 0-5266 |
| 563 | , 0)) < 0| TRUE | never evaluated | | FALSE | evaluated 5266 times by 1 test |
) | 0-5266 |
| 564 | return never executed: return -1; -1;never executed: return -1; | 0 |
| 565 | | - |
| 566 | bflags = 0; | - |
| 567 | | - |
| 568 | | - |
| 569 | | - |
| 570 | | - |
| 571 | bflags |= | - |
| 572 | 04000 | - |
| 573 | ; | - |
| 574 | | - |
| 575 | | - |
| 576 | | - |
| 577 | bflags |= | - |
| 578 | 04000 | - |
| 579 | ; | - |
| 580 | | - |
| 581 | | - |
| 582 | if (flags & bflags| TRUE | never evaluated | | FALSE | evaluated 5266 times by 1 test |
) | 0-5266 |
| 583 | { | - |
| 584 | flags &= ~bflags; | - |
| 585 | return never executed: return (fcntl (fd, 4 , flags)); (fcntl (fd, never executed: return (fcntl (fd, 4 , flags)); | 0 |
| 586 | 4 never executed: return (fcntl (fd, 4 , flags)); | 0 |
| 587 | , flags)); never executed: return (fcntl (fd, 4 , flags)); | 0 |
| 588 | } | - |
| 589 | | - |
| 590 | returnexecuted 5266 times by 1 test: return 0; 0;executed 5266 times by 1 test: return 0; | 5266 |
| 591 | } | - |
| 592 | | - |
| 593 | | - |
| 594 | int | - |
| 595 | sh_setclexec (fd) | - |
| 596 | int fd; | - |
| 597 | { | - |
| 598 | return never executed: return ((fcntl ((fd), 2 , 1 ))); ((fcntl ((fd), never executed: return ((fcntl ((fd), 2 , 1 ))); | 0 |
| 599 | 2 never executed: return ((fcntl ((fd), 2 , 1 ))); | 0 |
| 600 | , never executed: return ((fcntl ((fd), 2 , 1 ))); | 0 |
| 601 | 1 never executed: return ((fcntl ((fd), 2 , 1 ))); | 0 |
| 602 | ))); never executed: return ((fcntl ((fd), 2 , 1 ))); | 0 |
| 603 | } | - |
| 604 | | - |
| 605 | | - |
| 606 | int | - |
| 607 | sh_validfd (fd) | - |
| 608 | int fd; | - |
| 609 | { | - |
| 610 | returnexecuted 1321224 times by 1 test: return (fcntl (fd, 1 , 0) >= 0); (fcntl (fd, executed 1321224 times by 1 test: return (fcntl (fd, 1 , 0) >= 0); | 1321224 |
| 611 | 1executed 1321224 times by 1 test: return (fcntl (fd, 1 , 0) >= 0); | 1321224 |
| 612 | , 0) >= 0);executed 1321224 times by 1 test: return (fcntl (fd, 1 , 0) >= 0); | 1321224 |
| 613 | } | - |
| 614 | | - |
| 615 | int | - |
| 616 | fd_ispipe (fd) | - |
| 617 | int fd; | - |
| 618 | { | - |
| 619 | | - |
| 620 | (*__errno_location ()) | - |
| 621 | = 0; | - |
| 622 | return never executed: return ((lseek (fd, 0L, 1 ) < 0) && ( (*__errno_location ()) == 29 )); ((lseek (fd, 0L, never executed: return ((lseek (fd, 0L, 1 ) < 0) && ( (*__errno_location ()) == 29 )); | 0 |
| 623 | 1 never executed: return ((lseek (fd, 0L, 1 ) < 0) && ( (*__errno_location ()) == 29 )); | 0 |
| 624 | ) < 0) && ( never executed: return ((lseek (fd, 0L, 1 ) < 0) && ( (*__errno_location ()) == 29 )); | 0 |
| 625 | (*__errno_location ()) never executed: return ((lseek (fd, 0L, 1 ) < 0) && ( (*__errno_location ()) == 29 )); | 0 |
| 626 | == never executed: return ((lseek (fd, 0L, 1 ) < 0) && ( (*__errno_location ()) == 29 )); | 0 |
| 627 | 29 never executed: return ((lseek (fd, 0L, 1 ) < 0) && ( (*__errno_location ()) == 29 )); | 0 |
| 628 | )); never executed: return ((lseek (fd, 0L, 1 ) < 0) && ( (*__errno_location ()) == 29 )); | 0 |
| 629 | } | - |
| 630 | void | - |
| 631 | check_dev_tty () | - |
| 632 | { | - |
| 633 | int tty_fd; | - |
| 634 | char *tty; | - |
| 635 | | - |
| 636 | tty_fd = open ("/dev/tty", | - |
| 637 | 02 | - |
| 638 | | | - |
| 639 | 04000 | - |
| 640 | ); | - |
| 641 | | - |
| 642 | if (tty_fd < 0| TRUE | evaluated 5432 times by 1 test | | FALSE | never evaluated |
) | 0-5432 |
| 643 | { | - |
| 644 | tty = (char *)ttyname (fileno ( | - |
| 645 | stdin | - |
| 646 | )); | - |
| 647 | if (tty == 0| TRUE | evaluated 5432 times by 1 test | | FALSE | never evaluated |
) | 0-5432 |
| 648 | return;executed 5432 times by 1 test: return; | 5432 |
| 649 | tty_fd = open (tty, | - |
| 650 | 02 | - |
| 651 | | | - |
| 652 | 04000 | - |
| 653 | ); | - |
| 654 | } never executed: end of block | 0 |
| 655 | if (tty_fd >= 0| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 656 | close (tty_fd); never executed: close (tty_fd); | 0 |
| 657 | } never executed: end of block | 0 |
| 658 | | - |
| 659 | | - |
| 660 | | - |
| 661 | | - |
| 662 | int | - |
| 663 | same_file (path1, path2, stp1, stp2) | - |
| 664 | const char *path1, *path2; | - |
| 665 | struct stat *stp1, *stp2; | - |
| 666 | { | - |
| 667 | struct stat st1, st2; | - |
| 668 | | - |
| 669 | if (stp1 == | TRUE | evaluated 5446 times by 1 test | | FALSE | evaluated 5258 times by 1 test |
| 5258-5446 |
| 670 | ((void *)0)| TRUE | evaluated 5446 times by 1 test | | FALSE | evaluated 5258 times by 1 test |
| 5258-5446 |
| 671 | ) | - |
| 672 | { | - |
| 673 | if (stat (path1, &st1) != 0| TRUE | never evaluated | | FALSE | evaluated 5446 times by 1 test |
) | 0-5446 |
| 674 | return never executed: return (0); (0);never executed: return (0); | 0 |
| 675 | stp1 = &st1; | - |
| 676 | }executed 5446 times by 1 test: end of block | 5446 |
| 677 | | - |
| 678 | if (stp2 == | TRUE | evaluated 10701 times by 1 test | | FALSE | evaluated 3 times by 1 test |
| 3-10701 |
| 679 | ((void *)0)| TRUE | evaluated 10701 times by 1 test | | FALSE | evaluated 3 times by 1 test |
| 3-10701 |
| 680 | ) | - |
| 681 | { | - |
| 682 | if (stat (path2, &st2) != 0| TRUE | never evaluated | | FALSE | evaluated 10701 times by 1 test |
) | 0-10701 |
| 683 | return never executed: return (0); (0);never executed: return (0); | 0 |
| 684 | stp2 = &st2; | - |
| 685 | }executed 10701 times by 1 test: end of block | 10701 |
| 686 | | - |
| 687 | returnexecuted 10704 times by 1 test: return ((stp1->st_dev == stp2->st_dev) && (stp1->st_ino == stp2->st_ino)); ((stp1->st_dev == stp2->st_dev) && (stp1->st_ino == stp2->st_ino));executed 10704 times by 1 test: return ((stp1->st_dev == stp2->st_dev) && (stp1->st_ino == stp2->st_ino)); | 10704 |
| 688 | } | - |
| 689 | int | - |
| 690 | move_to_high_fd (fd, check_new, maxfd) | - |
| 691 | int fd, check_new, maxfd; | - |
| 692 | { | - |
| 693 | int script_fd, nfds, ignore; | - |
| 694 | | - |
| 695 | if (maxfd < 20| TRUE | evaluated 5419 times by 1 test | | FALSE | evaluated 679164 times by 1 test |
) | 5419-679164 |
| 696 | { | - |
| 697 | nfds = getdtablesize (); | - |
| 698 | if (nfds <= 0| TRUE | never evaluated | | FALSE | evaluated 5419 times by 1 test |
) | 0-5419 |
| 699 | nfds = 20; never executed: nfds = 20; | 0 |
| 700 | if (nfds > 256| TRUE | evaluated 5419 times by 1 test | | FALSE | never evaluated |
) | 0-5419 |
| 701 | nfds = 256;executed 5419 times by 1 test: nfds = 256; | 5419 |
| 702 | }executed 5419 times by 1 test: end of block | 5419 |
| 703 | else | - |
| 704 | nfds = maxfd;executed 679164 times by 1 test: nfds = maxfd; | 679164 |
| 705 | | - |
| 706 | for (nfds--; check_new| TRUE | evaluated 687310 times by 1 test | | FALSE | never evaluated |
&& nfds > 3| TRUE | evaluated 687310 times by 1 test | | FALSE | never evaluated |
; nfds--) | 0-687310 |
| 707 | if (fcntl (nfds, | TRUE | evaluated 684583 times by 1 test | | FALSE | evaluated 2727 times by 1 test |
| 2727-684583 |
| 708 | 1| TRUE | evaluated 684583 times by 1 test | | FALSE | evaluated 2727 times by 1 test |
| 2727-684583 |
| 709 | , &ignore) == -1| TRUE | evaluated 684583 times by 1 test | | FALSE | evaluated 2727 times by 1 test |
) | 2727-684583 |
| 710 | break;executed 684583 times by 1 test: break; | 684583 |
| 711 | | - |
| 712 | if (nfds > 3| TRUE | evaluated 684583 times by 1 test | | FALSE | never evaluated |
&& fd != nfds| TRUE | evaluated 684583 times by 1 test | | FALSE | never evaluated |
&& (| TRUE | evaluated 684583 times by 1 test | | FALSE | never evaluated |
script_fd = dup2 (fd, nfds)) != -1| TRUE | evaluated 684583 times by 1 test | | FALSE | never evaluated |
) | 0-684583 |
| 713 | { | - |
| 714 | if (check_new == 0| TRUE | never evaluated | | FALSE | evaluated 684583 times by 1 test |
|| fd != fileno (| TRUE | evaluated 684583 times by 1 test | | FALSE | never evaluated |
| 0-684583 |
| 715 | stderr| TRUE | evaluated 684583 times by 1 test | | FALSE | never evaluated |
| 0-684583 |
| 716 | )| TRUE | evaluated 684583 times by 1 test | | FALSE | never evaluated |
) | 0-684583 |
| 717 | close (fd);executed 684583 times by 1 test: close (fd); | 684583 |
| 718 | returnexecuted 684583 times by 1 test: return (script_fd); (script_fd);executed 684583 times by 1 test: return (script_fd); | 684583 |
| 719 | } | - |
| 720 | | - |
| 721 | | - |
| 722 | | - |
| 723 | return never executed: return (fd); (fd);never executed: return (fd); | 0 |
| 724 | } | - |
| 725 | | - |
| 726 | | - |
| 727 | | - |
| 728 | | - |
| 729 | | - |
| 730 | | - |
| 731 | int | - |
| 732 | check_binary_file (sample, sample_len) | - |
| 733 | const char *sample; | - |
| 734 | int sample_len; | - |
| 735 | { | - |
| 736 | register int i; | - |
| 737 | unsigned char c; | - |
| 738 | | - |
| 739 | for (i = 0; i < sample_len| TRUE | evaluated 183200 times by 1 test | | FALSE | evaluated 5 times by 1 test |
; i++) | 5-183200 |
| 740 | { | - |
| 741 | c = sample[i]; | - |
| 742 | if (c == '\n'| TRUE | evaluated 5271 times by 1 test | | FALSE | evaluated 177929 times by 1 test |
) | 5271-177929 |
| 743 | returnexecuted 5271 times by 1 test: return (0); (0);executed 5271 times by 1 test: return (0); | 5271 |
| 744 | if (c == '\0'| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 177928 times by 1 test |
) | 1-177928 |
| 745 | returnexecuted 1 time by 1 test: return (1); (1);executed 1 time by 1 test: return (1); | 1 |
| 746 | }executed 177928 times by 1 test: end of block | 177928 |
| 747 | | - |
| 748 | returnexecuted 5 times by 1 test: return (0); (0);executed 5 times by 1 test: return (0); | 5 |
| 749 | } | - |
| 750 | | - |
| 751 | | - |
| 752 | | - |
| 753 | | - |
| 754 | | - |
| 755 | | - |
| 756 | | - |
| 757 | int | - |
| 758 | sh_openpipe (pv) | - |
| 759 | int *pv; | - |
| 760 | { | - |
| 761 | int r; | - |
| 762 | | - |
| 763 | if ((| TRUE | never evaluated | | FALSE | evaluated 60 times by 1 test |
r = pipe (pv)) < 0| TRUE | never evaluated | | FALSE | evaluated 60 times by 1 test |
) | 0-60 |
| 764 | return never executed: return r; r;never executed: return r; | 0 |
| 765 | | - |
| 766 | pv[0] = move_to_high_fd (pv[0], 1, 64); | - |
| 767 | pv[1] = move_to_high_fd (pv[1], 1, 64); | - |
| 768 | | - |
| 769 | returnexecuted 60 times by 1 test: return 0; 0;executed 60 times by 1 test: return 0; | 60 |
| 770 | } | - |
| 771 | | - |
| 772 | int | - |
| 773 | sh_closepipe (pv) | - |
| 774 | int *pv; | - |
| 775 | { | - |
| 776 | if (pv[0] >= 0| TRUE | evaluated 55 times by 1 test | | FALSE | evaluated 3988339 times by 1 test |
) | 55-3988339 |
| 777 | close (pv[0]);executed 55 times by 1 test: close (pv[0]); | 55 |
| 778 | | - |
| 779 | if (pv[1] >= 0| TRUE | evaluated 53 times by 1 test | | FALSE | evaluated 3988341 times by 1 test |
) | 53-3988341 |
| 780 | close (pv[1]);executed 53 times by 1 test: close (pv[1]); | 53 |
| 781 | | - |
| 782 | pv[0] = pv[1] = -1; | - |
| 783 | returnexecuted 3988394 times by 1 test: return 0; 0;executed 3988394 times by 1 test: return 0; | 3988394 |
| 784 | } | - |
| 785 | | - |
| 786 | | - |
| 787 | | - |
| 788 | | - |
| 789 | | - |
| 790 | | - |
| 791 | | - |
| 792 | int | - |
| 793 | file_exists (fn) | - |
| 794 | const char *fn; | - |
| 795 | { | - |
| 796 | struct stat sb; | - |
| 797 | | - |
| 798 | returnexecuted 21 times by 1 test: return (stat (fn, &sb) == 0); (stat (fn, &sb) == 0);executed 21 times by 1 test: return (stat (fn, &sb) == 0); | 21 |
| 799 | } | - |
| 800 | | - |
| 801 | int | - |
| 802 | file_isdir (fn) | - |
| 803 | const char *fn; | - |
| 804 | { | - |
| 805 | struct stat sb; | - |
| 806 | | - |
| 807 | returnexecuted 10796 times by 1 test: return ((stat (fn, &sb) == 0) && (((( sb.st_mode )) & 0170000) == (0040000)) ); ((stat (fn, &sb) == 0) && executed 10796 times by 1 test: return ((stat (fn, &sb) == 0) && (((( sb.st_mode )) & 0170000) == (0040000)) ); | 10796 |
| 808 | ((((executed 10796 times by 1 test: return ((stat (fn, &sb) == 0) && (((( sb.st_mode )) & 0170000) == (0040000)) ); | 10796 |
| 809 | sb.st_modeexecuted 10796 times by 1 test: return ((stat (fn, &sb) == 0) && (((( sb.st_mode )) & 0170000) == (0040000)) ); | 10796 |
| 810 | )) & 0170000) == (0040000))executed 10796 times by 1 test: return ((stat (fn, &sb) == 0) && (((( sb.st_mode )) & 0170000) == (0040000)) ); | 10796 |
| 811 | );executed 10796 times by 1 test: return ((stat (fn, &sb) == 0) && (((( sb.st_mode )) & 0170000) == (0040000)) ); | 10796 |
| 812 | } | - |
| 813 | | - |
| 814 | int | - |
| 815 | file_iswdir (fn) | - |
| 816 | const char *fn; | - |
| 817 | { | - |
| 818 | returnexecuted 107 times by 1 test: return (file_isdir (fn) && sh_eaccess (fn, 2 ) == 0); (file_isdir (fn) && sh_eaccess (fn, executed 107 times by 1 test: return (file_isdir (fn) && sh_eaccess (fn, 2 ) == 0); | 107 |
| 819 | 2executed 107 times by 1 test: return (file_isdir (fn) && sh_eaccess (fn, 2 ) == 0); | 107 |
| 820 | ) == 0);executed 107 times by 1 test: return (file_isdir (fn) && sh_eaccess (fn, 2 ) == 0); | 107 |
| 821 | } | - |
| 822 | | - |
| 823 | | - |
| 824 | | - |
| 825 | int | - |
| 826 | path_dot_or_dotdot (string) | - |
| 827 | const char *string; | - |
| 828 | { | - |
| 829 | if (string == 0| TRUE | never evaluated | | FALSE | never evaluated |
|| *| TRUE | never evaluated | | FALSE | never evaluated |
string == '\0'| TRUE | never evaluated | | FALSE | never evaluated |
|| *| TRUE | never evaluated | | FALSE | never evaluated |
string != '.'| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 830 | return never executed: return (0); (0);never executed: return (0); | 0 |
| 831 | | - |
| 832 | | - |
| 833 | if ((((| TRUE | never evaluated | | FALSE | never evaluated |
string[1]) == '/')| TRUE | never evaluated | | FALSE | never evaluated |
|| (| TRUE | never evaluated | | FALSE | never evaluated |
string[1]) == 0| TRUE | never evaluated | | FALSE | never evaluated |
) || (string[1] == '.'| TRUE | never evaluated | | FALSE | never evaluated |
&& (((| TRUE | never evaluated | | FALSE | never evaluated |
string[2]) == '/')| TRUE | never evaluated | | FALSE | never evaluated |
|| (| TRUE | never evaluated | | FALSE | never evaluated |
string[2]) == 0| TRUE | never evaluated | | FALSE | never evaluated |
))) | 0 |
| 834 | return never executed: return (1); (1);never executed: return (1); | 0 |
| 835 | | - |
| 836 | return never executed: return (0); (0);never executed: return (0); | 0 |
| 837 | } | - |
| 838 | | - |
| 839 | | - |
| 840 | | - |
| 841 | int | - |
| 842 | absolute_pathname (string) | - |
| 843 | const char *string; | - |
| 844 | { | - |
| 845 | if (string == 0| TRUE | never evaluated | | FALSE | evaluated 1460 times by 1 test |
|| *| TRUE | never evaluated | | FALSE | evaluated 1460 times by 1 test |
string == '\0'| TRUE | never evaluated | | FALSE | evaluated 1460 times by 1 test |
) | 0-1460 |
| 846 | return never executed: return (0); (0);never executed: return (0); | 0 |
| 847 | | - |
| 848 | if (((| TRUE | evaluated 1329 times by 1 test | | FALSE | evaluated 131 times by 1 test |
string)[0] == '/')| TRUE | evaluated 1329 times by 1 test | | FALSE | evaluated 131 times by 1 test |
) | 131-1329 |
| 849 | returnexecuted 1329 times by 1 test: return (1); (1);executed 1329 times by 1 test: return (1); | 1329 |
| 850 | | - |
| 851 | if (string[0] == '.'| TRUE | evaluated 115 times by 1 test | | FALSE | evaluated 16 times by 1 test |
&& (((| TRUE | evaluated 115 times by 1 test | | FALSE | never evaluated |
string[1]) == '/')| TRUE | evaluated 115 times by 1 test | | FALSE | never evaluated |
|| (| TRUE | never evaluated | | FALSE | never evaluated |
string[1]) == 0| TRUE | never evaluated | | FALSE | never evaluated |
)) | 0-115 |
| 852 | returnexecuted 115 times by 1 test: return (1); (1);executed 115 times by 1 test: return (1); | 115 |
| 853 | | - |
| 854 | if (string[0] == '.'| TRUE | never evaluated | | FALSE | evaluated 16 times by 1 test |
&& string[1] == '.'| TRUE | never evaluated | | FALSE | never evaluated |
&& (((| TRUE | never evaluated | | FALSE | never evaluated |
string[2]) == '/')| TRUE | never evaluated | | FALSE | never evaluated |
|| (| TRUE | never evaluated | | FALSE | never evaluated |
string[2]) == 0| TRUE | never evaluated | | FALSE | never evaluated |
)) | 0-16 |
| 855 | return never executed: return (1); (1);never executed: return (1); | 0 |
| 856 | | - |
| 857 | returnexecuted 16 times by 1 test: return (0); (0);executed 16 times by 1 test: return (0); | 16 |
| 858 | } | - |
| 859 | | - |
| 860 | | - |
| 861 | | - |
| 862 | | - |
| 863 | int | - |
| 864 | absolute_program (string) | - |
| 865 | const char *string; | - |
| 866 | { | - |
| 867 | returnexecuted 39693 times by 1 test: return ((char *)mbschr (string, '/') != (char *) ((void *)0) ); ((char *)mbschr (string, '/') != (char *)executed 39693 times by 1 test: return ((char *)mbschr (string, '/') != (char *) ((void *)0) ); | 39693 |
| 868 | ((void *)0)executed 39693 times by 1 test: return ((char *)mbschr (string, '/') != (char *) ((void *)0) ); | 39693 |
| 869 | );executed 39693 times by 1 test: return ((char *)mbschr (string, '/') != (char *) ((void *)0) ); | 39693 |
| 870 | } | - |
| 871 | char * | - |
| 872 | make_absolute (string, dot_path) | - |
| 873 | const char *string, *dot_path; | - |
| 874 | { | - |
| 875 | char *result; | - |
| 876 | | - |
| 877 | if (dot_path == 0| TRUE | never evaluated | | FALSE | evaluated 72 times by 1 test |
|| ((| TRUE | evaluated 70 times by 1 test | | FALSE | evaluated 2 times by 1 test |
string)[0] == '/')| TRUE | evaluated 70 times by 1 test | | FALSE | evaluated 2 times by 1 test |
) | 0-72 |
| 878 | result = (char *)strcpy (sh_xmalloc((1 + strlen (string)), "general.c", 752), (string));executed 70 times by 1 test: result = (char *)strcpy (sh_xmalloc((1 + strlen (string)), "general.c", 752), (string)); | 70 |
| 879 | | - |
| 880 | else | - |
| 881 | result = sh_makepath (dot_path, string, 0);executed 2 times by 1 test: result = sh_makepath (dot_path, string, 0); | 2 |
| 882 | | - |
| 883 | returnexecuted 72 times by 1 test: return (result); (result);executed 72 times by 1 test: return (result); | 72 |
| 884 | } | - |
| 885 | | - |
| 886 | | - |
| 887 | | - |
| 888 | char * | - |
| 889 | base_pathname (string) | - |
| 890 | char *string; | - |
| 891 | { | - |
| 892 | char *p; | - |
| 893 | | - |
| 894 | | - |
| 895 | | - |
| 896 | | - |
| 897 | | - |
| 898 | | - |
| 899 | if (string[0] == '/'| TRUE | evaluated 21747 times by 1 test | | FALSE | evaluated 31 times by 1 test |
&& string[1] == 0| TRUE | never evaluated | | FALSE | evaluated 21747 times by 1 test |
) | 0-21747 |
| 900 | return never executed: return (string); (string);never executed: return (string); | 0 |
| 901 | | - |
| 902 | p = (char *)strrchr (string, '/'); | - |
| 903 | returnexecuted 21778 times by 1 test: return (p ? ++p : string); (p ? ++p : string);executed 21778 times by 1 test: return (p ? ++p : string); | 21778 |
| 904 | } | - |
| 905 | | - |
| 906 | | - |
| 907 | | - |
| 908 | | - |
| 909 | | - |
| 910 | char * | - |
| 911 | full_pathname (file) | - |
| 912 | char *file; | - |
| 913 | { | - |
| 914 | char *ret; | - |
| 915 | | - |
| 916 | file = (*| TRUE | never evaluated | | FALSE | evaluated 3 times by 1 test |
file == '~')| TRUE | never evaluated | | FALSE | evaluated 3 times by 1 test |
? bash_tilde_expand (file, 0) : (char *)strcpy (sh_xmalloc((1 + strlen (file)), "general.c", 790), (file)); | 0-3 |
| 917 | | - |
| 918 | if (((| TRUE | evaluated 3 times by 1 test | | FALSE | never evaluated |
file)[0] == '/')| TRUE | evaluated 3 times by 1 test | | FALSE | never evaluated |
) | 0-3 |
| 919 | returnexecuted 3 times by 1 test: return (file); (file);executed 3 times by 1 test: return (file); | 3 |
| 920 | | - |
| 921 | ret = sh_makepath ((char *) | - |
| 922 | ((void *)0) | - |
| 923 | , file, (0x02|0x04)); | - |
| 924 | sh_xfree((file), "general.c", 796); | - |
| 925 | | - |
| 926 | return never executed: return (ret); (ret);never executed: return (ret); | 0 |
| 927 | } | - |
| 928 | | - |
| 929 | | - |
| 930 | | - |
| 931 | static char tdir[ | - |
| 932 | 4096 | - |
| 933 | ]; | - |
| 934 | | - |
| 935 | | - |
| 936 | | - |
| 937 | char * | - |
| 938 | polite_directory_format (name) | - |
| 939 | char *name; | - |
| 940 | { | - |
| 941 | char *home; | - |
| 942 | int l; | - |
| 943 | | - |
| 944 | home = get_string_value ("HOME"); | - |
| 945 | l = home| TRUE | evaluated 73 times by 1 test | | FALSE | never evaluated |
? strlen (home) : 0; | 0-73 |
| 946 | if (l > 1| TRUE | evaluated 73 times by 1 test | | FALSE | never evaluated |
&& | 0-73 |
| 947 | (| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
__extension__ (__builtin_constant_p (| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 948 | l| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 949 | )| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
&& ((__builtin_constant_p (| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 950 | home| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 951 | )| TRUE | never evaluated | | FALSE | never evaluated |
&& strlen (| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 952 | home| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 953 | ) < ((size_t) (| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 954 | l| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 955 | ))| TRUE | never evaluated | | FALSE | never evaluated |
) || (__builtin_constant_p (| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 956 | name| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 957 | )| TRUE | never evaluated | | FALSE | never evaluated |
&& strlen (| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 958 | name| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 959 | ) < ((size_t) (| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 960 | l| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 961 | ))| TRUE | never evaluated | | FALSE | never evaluated |
)) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 962 | home| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 963 | ) && __builtin_constant_p (| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 964 | name| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 965 | ) && (__s1_len = __builtin_strlen (| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 966 | home| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 967 | ), __s2_len = __builtin_strlen (| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 968 | name| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 969 | ), (!((size_t)(const void *)((| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 970 | home| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 971 | ) + 1) - (size_t)(const void *)(| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 972 | home| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 973 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 974 | name| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 975 | ) + 1) - (size_t)(const void *)(| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 976 | name| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 977 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 978 | home| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 979 | , | TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 980 | name| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 981 | ) : (__builtin_constant_p (| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 982 | home| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 983 | ) && ((size_t)(const void *)((| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 984 | home| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 985 | ) + 1) - (size_t)(const void *)(| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 986 | home| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 987 | ) == 1) && (__s1_len = __builtin_strlen (| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 988 | home| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 989 | ), __s1_len < 4) ? (__builtin_constant_p (| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 990 | name| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 991 | ) && ((size_t)(const void *)((| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 992 | name| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 993 | ) + 1) - (size_t)(const void *)(| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 994 | name| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 995 | ) == 1) ? __builtin_strcmp (| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 996 | home| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 997 | , | TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 998 | name| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 999 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1000 | name| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1001 | ); int __result = (((const unsigned char *) (const char *) (| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1002 | home| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1003 | ))[0] - __s2[0]); if (__s1_len > 0| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1004 | home| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1005 | ))[1] - __s2[1]); if (__s1_len > 1| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1006 | home| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1007 | ))[2] - __s2[2]); if (__s1_len > 2| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( home ))[3] - __s2[3]); | TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1008 | home| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( home ))[3] - __s2[3]); | 0-73 |
| 1009 | ))[3] - __s2[3]);| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( home ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : (__builtin_constant_p (| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1010 | name| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1011 | ) && ((size_t)(const void *)((| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1012 | name| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1013 | ) + 1) - (size_t)(const void *)(| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1014 | name| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1015 | ) == 1) && (__s2_len = __builtin_strlen (| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1016 | name| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1017 | ), __s2_len < 4) ? (__builtin_constant_p (| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1018 | home| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1019 | ) && ((size_t)(const void *)((| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1020 | home| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1021 | ) + 1) - (size_t)(const void *)(| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1022 | home| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1023 | ) == 1) ? __builtin_strcmp (| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1024 | home| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1025 | , | TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1026 | name| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1027 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1028 | home| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1029 | ); int __result = (((const unsigned char *) (const char *) (| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1030 | name| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1031 | ))[0] - __s2[0]); if (__s2_len > 0| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1032 | name| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1033 | ))[1] - __s2[1]); if (__s2_len > 1| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1034 | name| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1035 | ))[2] - __s2[2]); if (__s2_len > 2| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); | TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1036 | name| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); | 0-73 |
| 1037 | ))[3] - __s2[3]);| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : __builtin_strcmp (| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1038 | home| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1039 | , | TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1040 | name| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1041 | )))); }) : strncmp (| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1042 | home| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1043 | , | TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1044 | name| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1045 | , | TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1046 | l| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1047 | ))) | TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
| 0-73 |
| 1048 | == 0| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
&& (!name[l]| TRUE | never evaluated | | FALSE | never evaluated |
|| name[l] == '/'| TRUE | never evaluated | | FALSE | never evaluated |
)) | 0-73 |
| 1049 | { | - |
| 1050 | | - |
| 1051 | __builtin_strncpy ( | - |
| 1052 | tdir + 1 | - |
| 1053 | , | - |
| 1054 | name + l | - |
| 1055 | , | - |
| 1056 | sizeof(tdir) - 2 | - |
| 1057 | ) | - |
| 1058 | ; | - |
| 1059 | tdir[0] = '~'; | - |
| 1060 | tdir[sizeof(tdir) - 1] = '\0'; | - |
| 1061 | return never executed: return (tdir); (tdir);never executed: return (tdir); | 0 |
| 1062 | } | - |
| 1063 | else | - |
| 1064 | returnexecuted 73 times by 1 test: return (name); (name);executed 73 times by 1 test: return (name); | 73 |
| 1065 | } | - |
| 1066 | | - |
| 1067 | | - |
| 1068 | | - |
| 1069 | | - |
| 1070 | char * | - |
| 1071 | trim_pathname (name, maxlen) | - |
| 1072 | char *name; | - |
| 1073 | int maxlen; | - |
| 1074 | { | - |
| 1075 | int nlen, ndirs; | - |
| 1076 | intmax_t nskip; | - |
| 1077 | char *nbeg, *nend, *ntail, *v; | - |
| 1078 | | - |
| 1079 | if (name == 0| TRUE | never evaluated | | FALSE | never evaluated |
|| (| TRUE | never evaluated | | FALSE | never evaluated |
nlen = strlen (name)) == 0| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1080 | return never executed: return name; name;never executed: return name; | 0 |
| 1081 | nend = name + nlen; | - |
| 1082 | | - |
| 1083 | v = get_string_value ("PROMPT_DIRTRIM"); | - |
| 1084 | if (v == 0| TRUE | never evaluated | | FALSE | never evaluated |
|| *| TRUE | never evaluated | | FALSE | never evaluated |
v == 0| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1085 | return never executed: return name; name;never executed: return name; | 0 |
| 1086 | if (legal_number (v, &nskip) == 0| TRUE | never evaluated | | FALSE | never evaluated |
|| nskip <= 0| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1087 | return never executed: return name; name;never executed: return name; | 0 |
| 1088 | | - |
| 1089 | | - |
| 1090 | nbeg = name; | - |
| 1091 | if (name[0] == '~'| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1092 | for (nbeg = name; *| TRUE | never evaluated | | FALSE | never evaluated |
nbeg| TRUE | never evaluated | | FALSE | never evaluated |
; nbeg++) | 0 |
| 1093 | if (*| TRUE | never evaluated | | FALSE | never evaluated |
nbeg == '/'| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1094 | { | - |
| 1095 | nbeg++; | - |
| 1096 | break; never executed: break; | 0 |
| 1097 | } | - |
| 1098 | if (*| TRUE | never evaluated | | FALSE | never evaluated |
nbeg == 0| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1099 | return never executed: return name; name;never executed: return name; | 0 |
| 1100 | | - |
| 1101 | for (ndirs = 0, ntail = nbeg; *| TRUE | never evaluated | | FALSE | never evaluated |
ntail| TRUE | never evaluated | | FALSE | never evaluated |
; ntail++) | 0 |
| 1102 | if (*| TRUE | never evaluated | | FALSE | never evaluated |
ntail == '/'| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1103 | ndirs++; never executed: ndirs++; | 0 |
| 1104 | if (ndirs < nskip| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1105 | return never executed: return name; name;never executed: return name; | 0 |
| 1106 | | - |
| 1107 | for (ntail = (*nend == '/') ? nend : nend - 1; ntail > nbeg| TRUE | never evaluated | | FALSE | never evaluated |
; ntail--) | 0 |
| 1108 | { | - |
| 1109 | if (*| TRUE | never evaluated | | FALSE | never evaluated |
ntail == '/'| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1110 | nskip--; never executed: nskip--; | 0 |
| 1111 | if (nskip == 0| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1112 | break; never executed: break; | 0 |
| 1113 | } never executed: end of block | 0 |
| 1114 | if (ntail == nbeg| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1115 | return never executed: return name; name;never executed: return name; | 0 |
| 1116 | | - |
| 1117 | | - |
| 1118 | nlen = ntail - nbeg; | - |
| 1119 | if (nlen <= 3| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1120 | return never executed: return name; name;never executed: return name; | 0 |
| 1121 | | - |
| 1122 | *nbeg++ = '.'; | - |
| 1123 | *nbeg++ = '.'; | - |
| 1124 | *nbeg++ = '.'; | - |
| 1125 | | - |
| 1126 | nlen = nend - ntail; | - |
| 1127 | memmove (nbeg, ntail, nlen); | - |
| 1128 | nbeg[nlen] = '\0'; | - |
| 1129 | | - |
| 1130 | return never executed: return name; name;never executed: return name; | 0 |
| 1131 | } | - |
| 1132 | | - |
| 1133 | | - |
| 1134 | | - |
| 1135 | | - |
| 1136 | | - |
| 1137 | char * | - |
| 1138 | printable_filename (fn, flags) | - |
| 1139 | char *fn; | - |
| 1140 | int flags; | - |
| 1141 | { | - |
| 1142 | char *newf; | - |
| 1143 | | - |
| 1144 | if (ansic_shouldquote (fn)| TRUE | evaluated 2 times by 1 test | | FALSE | evaluated 24 times by 1 test |
) | 2-24 |
| 1145 | newf = ansic_quote (fn, 0, executed 2 times by 1 test: newf = ansic_quote (fn, 0, ((void *)0) ); | 2 |
| 1146 | ((void *)0)executed 2 times by 1 test: newf = ansic_quote (fn, 0, ((void *)0) ); | 2 |
| 1147 | );executed 2 times by 1 test: newf = ansic_quote (fn, 0, ((void *)0) ); | 2 |
| 1148 | else if (flags| TRUE | never evaluated | | FALSE | evaluated 24 times by 1 test |
&& sh_contains_shell_metas (fn)| TRUE | never evaluated | | FALSE | never evaluated |
) | 0-24 |
| 1149 | newf = sh_single_quote (fn); never executed: newf = sh_single_quote (fn); | 0 |
| 1150 | else | - |
| 1151 | newf = fn;executed 24 times by 1 test: newf = fn; | 24 |
| 1152 | | - |
| 1153 | returnexecuted 26 times by 1 test: return newf; newf;executed 26 times by 1 test: return newf; | 26 |
| 1154 | } | - |
| 1155 | | - |
| 1156 | | - |
| 1157 | | - |
| 1158 | | - |
| 1159 | char * | - |
| 1160 | extract_colon_unit (string, p_index) | - |
| 1161 | char *string; | - |
| 1162 | int *p_index; | - |
| 1163 | { | - |
| 1164 | int i, start, len; | - |
| 1165 | char *value; | - |
| 1166 | | - |
| 1167 | if (string == 0| TRUE | never evaluated | | FALSE | evaluated 30739 times by 1 test |
) | 0-30739 |
| 1168 | return never executed: return (string); (string);never executed: return (string); | 0 |
| 1169 | | - |
| 1170 | len = strlen (string); | - |
| 1171 | if (*| TRUE | evaluated 7 times by 1 test | | FALSE | evaluated 30732 times by 1 test |
p_index >= len| TRUE | evaluated 7 times by 1 test | | FALSE | evaluated 30732 times by 1 test |
) | 7-30732 |
| 1172 | returnexecuted 7 times by 1 test: return ((char *) ((void *)0) ); ((char *)executed 7 times by 1 test: return ((char *) ((void *)0) ); | 7 |
| 1173 | ((void *)0)executed 7 times by 1 test: return ((char *) ((void *)0) ); | 7 |
| 1174 | );executed 7 times by 1 test: return ((char *) ((void *)0) ); | 7 |
| 1175 | | - |
| 1176 | i = *p_index; | - |
| 1177 | | - |
| 1178 | | - |
| 1179 | | - |
| 1180 | | - |
| 1181 | | - |
| 1182 | | - |
| 1183 | if (i| TRUE | evaluated 25341 times by 1 test | | FALSE | evaluated 5391 times by 1 test |
&& string[i] == ':'| TRUE | evaluated 25341 times by 1 test | | FALSE | never evaluated |
) | 0-25341 |
| 1184 | i++;executed 25341 times by 1 test: i++; | 25341 |
| 1185 | | - |
| 1186 | for (start = i; string[i]| TRUE | evaluated 530203 times by 1 test | | FALSE | evaluated 88 times by 1 test |
&& string[i] != ':'| TRUE | evaluated 499559 times by 1 test | | FALSE | evaluated 30644 times by 1 test |
; i++) | 88-530203 |
| 1187 | ;executed 499559 times by 1 test: ; | 499559 |
| 1188 | | - |
| 1189 | *p_index = i; | - |
| 1190 | | - |
| 1191 | if (i == start| TRUE | evaluated 12 times by 1 test | | FALSE | evaluated 30720 times by 1 test |
) | 12-30720 |
| 1192 | { | - |
| 1193 | if (string[i]| TRUE | never evaluated | | FALSE | evaluated 12 times by 1 test |
) | 0-12 |
| 1194 | (* never executed: (*p_index)++; p_index)++;never executed: (*p_index)++; | 0 |
| 1195 | | - |
| 1196 | value = (char *)sh_xmalloc((1), "general.c", 952); | - |
| 1197 | value[0] = '\0'; | - |
| 1198 | }executed 12 times by 1 test: end of block | 12 |
| 1199 | else | - |
| 1200 | value = substring (string, start, i);executed 30720 times by 1 test: value = substring (string, start, i); | 30720 |
| 1201 | | - |
| 1202 | returnexecuted 30732 times by 1 test: return (value); (value);executed 30732 times by 1 test: return (value); | 30732 |
| 1203 | } | - |
| 1204 | extern char *get_dirstack_from_string (char *); | - |
| 1205 | | - |
| 1206 | | - |
| 1207 | static char **bash_tilde_prefixes; | - |
| 1208 | static char **bash_tilde_prefixes2; | - |
| 1209 | static char **bash_tilde_suffixes; | - |
| 1210 | static char **bash_tilde_suffixes2; | - |
| 1211 | | - |
| 1212 | | - |
| 1213 | | - |
| 1214 | | - |
| 1215 | | - |
| 1216 | | - |
| 1217 | static char * | - |
| 1218 | bash_special_tilde_expansions (text) | - |
| 1219 | char *text; | - |
| 1220 | { | - |
| 1221 | char *result; | - |
| 1222 | | - |
| 1223 | result = (char *) | - |
| 1224 | ((void *)0) | - |
| 1225 | ; | - |
| 1226 | | - |
| 1227 | if (text[0] == '+'| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 9 times by 1 test |
&& text[1] == '\0'| TRUE | evaluated 1 time by 1 test | | FALSE | never evaluated |
) | 0-9 |
| 1228 | result = get_string_value ("PWD");executed 1 time by 1 test: result = get_string_value ("PWD"); | 1 |
| 1229 | else if (text[0] == '-'| TRUE | evaluated 4 times by 1 test | | FALSE | evaluated 5 times by 1 test |
&& text[1] == '\0'| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 3 times by 1 test |
) | 1-5 |
| 1230 | result = get_string_value ("OLDPWD");executed 1 time by 1 test: result = get_string_value ("OLDPWD"); | 1 |
| 1231 | | - |
| 1232 | else if (((*| TRUE | evaluated 4 times by 1 test | | FALSE | evaluated 4 times by 1 test |
text) >= '0'| TRUE | evaluated 4 times by 1 test | | FALSE | evaluated 4 times by 1 test |
&& (*| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
text) <= '9'| TRUE | evaluated 4 times by 1 test | | FALSE | never evaluated |
) || ((*| TRUE | never evaluated | | FALSE | evaluated 4 times by 1 test |
text == '+'| TRUE | never evaluated | | FALSE | evaluated 4 times by 1 test |
|| *| TRUE | evaluated 3 times by 1 test | | FALSE | evaluated 1 time by 1 test |
text == '-'| TRUE | evaluated 3 times by 1 test | | FALSE | evaluated 1 time by 1 test |
) && ((| TRUE | evaluated 3 times by 1 test | | FALSE | never evaluated |
text[1]) >= '0'| TRUE | evaluated 3 times by 1 test | | FALSE | never evaluated |
&& (| TRUE | evaluated 3 times by 1 test | | FALSE | never evaluated |
text[1]) <= '9'| TRUE | evaluated 3 times by 1 test | | FALSE | never evaluated |
))) | 0-4 |
| 1233 | result = get_dirstack_from_string (text);executed 7 times by 1 test: result = get_dirstack_from_string (text); | 7 |
| 1234 | | - |
| 1235 | | - |
| 1236 | returnexecuted 10 times by 1 test: return (result ? (char *)strcpy (sh_xmalloc((1 + strlen (result)), "general.c", 998), (result)) : (char *) ((void *)0) ); (result ? (char *)strcpy (sh_xmalloc((1 + strlen (result)), "general.c", 998), (result)) : (char *)executed 10 times by 1 test: return (result ? (char *)strcpy (sh_xmalloc((1 + strlen (result)), "general.c", 998), (result)) : (char *) ((void *)0) ); | 10 |
| 1237 | ((void *)0)executed 10 times by 1 test: return (result ? (char *)strcpy (sh_xmalloc((1 + strlen (result)), "general.c", 998), (result)) : (char *) ((void *)0) ); | 10 |
| 1238 | );executed 10 times by 1 test: return (result ? (char *)strcpy (sh_xmalloc((1 + strlen (result)), "general.c", 998), (result)) : (char *) ((void *)0) ); | 10 |
| 1239 | } | - |
| 1240 | | - |
| 1241 | | - |
| 1242 | | - |
| 1243 | | - |
| 1244 | void | - |
| 1245 | tilde_initialize () | - |
| 1246 | { | - |
| 1247 | static int times_called = 0; | - |
| 1248 | | - |
| 1249 | | - |
| 1250 | tilde_expansion_preexpansion_hook = bash_special_tilde_expansions; | - |
| 1251 | | - |
| 1252 | | - |
| 1253 | | - |
| 1254 | | - |
| 1255 | if (times_called++ == 0| TRUE | evaluated 5432 times by 1 test | | FALSE | evaluated 15 times by 1 test |
) | 15-5432 |
| 1256 | { | - |
| 1257 | bash_tilde_prefixes = strvec_create (3); | - |
| 1258 | bash_tilde_prefixes[0] = "=~"; | - |
| 1259 | bash_tilde_prefixes[1] = ":~"; | - |
| 1260 | bash_tilde_prefixes[2] = (char *) | - |
| 1261 | ((void *)0) | - |
| 1262 | ; | - |
| 1263 | | - |
| 1264 | bash_tilde_prefixes2 = strvec_create (2); | - |
| 1265 | bash_tilde_prefixes2[0] = ":~"; | - |
| 1266 | bash_tilde_prefixes2[1] = (char *) | - |
| 1267 | ((void *)0) | - |
| 1268 | ; | - |
| 1269 | | - |
| 1270 | tilde_additional_prefixes = bash_tilde_prefixes; | - |
| 1271 | | - |
| 1272 | bash_tilde_suffixes = strvec_create (3); | - |
| 1273 | bash_tilde_suffixes[0] = ":"; | - |
| 1274 | bash_tilde_suffixes[1] = "=~"; | - |
| 1275 | bash_tilde_suffixes[2] = (char *) | - |
| 1276 | ((void *)0) | - |
| 1277 | ; | - |
| 1278 | | - |
| 1279 | tilde_additional_suffixes = bash_tilde_suffixes; | - |
| 1280 | | - |
| 1281 | bash_tilde_suffixes2 = strvec_create (2); | - |
| 1282 | bash_tilde_suffixes2[0] = ":"; | - |
| 1283 | bash_tilde_suffixes2[1] = (char *) | - |
| 1284 | ((void *)0) | - |
| 1285 | ; | - |
| 1286 | }executed 5432 times by 1 test: end of block | 5432 |
| 1287 | }executed 5447 times by 1 test: end of block | 5447 |
| 1288 | static int | - |
| 1289 | unquoted_tilde_word (s) | - |
| 1290 | const char *s; | - |
| 1291 | { | - |
| 1292 | const char *r; | - |
| 1293 | | - |
| 1294 | for (r = s; ((*| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | evaluated 67 times by 1 test | | FALSE | evaluated 50 times by 1 test |
| TRUE | never evaluated | | FALSE | never evaluated |
r) == '\0'| TRUE | evaluated 67 times by 1 test | | FALSE | evaluated 50 times by 1 test |
| TRUE | never evaluated | | FALSE | never evaluated |
|| (*| TRUE | never evaluated | | FALSE | never evaluated |
r) == '/'| TRUE | never evaluated | | FALSE | never evaluated |
|| (*| TRUE | never evaluated | | FALSE | never evaluated |
r) == ':'| TRUE | never evaluated | | FALSE | never evaluated |
) == 0| TRUE | evaluated 67 times by 1 test | | FALSE | evaluated 50 times by 1 test |
; r++) | 0-67 |
| 1295 | { | - |
| 1296 | switch (*r) | - |
| 1297 | { | - |
| 1298 | case never executed: case '\\': '\\':never executed: case '\\': | 0 |
| 1299 | case never executed: case '\'': '\'':never executed: case '\'': | 0 |
| 1300 | case never executed: case '"': '"':never executed: case '"': | 0 |
| 1301 | return never executed: return 0; 0;never executed: return 0; | 0 |
| 1302 | } | - |
| 1303 | }executed 67 times by 1 test: end of block | 67 |
| 1304 | returnexecuted 50 times by 1 test: return 1; 1;executed 50 times by 1 test: return 1; | 50 |
| 1305 | } | - |
| 1306 | | - |
| 1307 | | - |
| 1308 | | - |
| 1309 | | - |
| 1310 | | - |
| 1311 | char * | - |
| 1312 | bash_tilde_find_word (s, flags, lenp) | - |
| 1313 | const char *s; | - |
| 1314 | int flags, *lenp; | - |
| 1315 | { | - |
| 1316 | const char *r; | - |
| 1317 | char *ret; | - |
| 1318 | int l; | - |
| 1319 | | - |
| 1320 | for (r = s; *| TRUE | evaluated 93 times by 1 test | | FALSE | evaluated 28 times by 1 test |
r| TRUE | evaluated 93 times by 1 test | | FALSE | evaluated 28 times by 1 test |
&& *| TRUE | evaluated 75 times by 1 test | | FALSE | evaluated 18 times by 1 test |
r != '/'| TRUE | evaluated 75 times by 1 test | | FALSE | evaluated 18 times by 1 test |
; r++) | 18-93 |
| 1321 | { | - |
| 1322 | | - |
| 1323 | | - |
| 1324 | | - |
| 1325 | | - |
| 1326 | if (*| TRUE | evaluated 2 times by 1 test | | FALSE | evaluated 73 times by 1 test |
r == '\\'| TRUE | evaluated 2 times by 1 test | | FALSE | evaluated 73 times by 1 test |
|| *| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
r == '\''| TRUE | never evaluated | | FALSE | evaluated 73 times by 1 test |
|| *| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 72 times by 1 test |
r == '"'| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 72 times by 1 test |
) | 0-73 |
| 1327 | { | - |
| 1328 | ret = (char *)strcpy (sh_xmalloc((1 + strlen (s)), "general.c", 1090), (s)); | - |
| 1329 | if (lenp| TRUE | evaluated 3 times by 1 test | | FALSE | never evaluated |
) | 0-3 |
| 1330 | *executed 3 times by 1 test: *lenp = 0; lenp = 0;executed 3 times by 1 test: *lenp = 0; | 3 |
| 1331 | returnexecuted 3 times by 1 test: return ret; ret;executed 3 times by 1 test: return ret; | 3 |
| 1332 | } | - |
| 1333 | else if (flags| TRUE | evaluated 18 times by 1 test | | FALSE | evaluated 54 times by 1 test |
&& *| TRUE | never evaluated | | FALSE | evaluated 18 times by 1 test |
r == ':'| TRUE | never evaluated | | FALSE | evaluated 18 times by 1 test |
) | 0-54 |
| 1334 | break; never executed: break; | 0 |
| 1335 | }executed 72 times by 1 test: end of block | 72 |
| 1336 | l = r - s; | - |
| 1337 | ret = sh_xmalloc((l + 1), "general.c", 1099); | - |
| 1338 | | - |
| 1339 | __builtin_strncpy ( | - |
| 1340 | ret | - |
| 1341 | , | - |
| 1342 | s | - |
| 1343 | , | - |
| 1344 | l | - |
| 1345 | ) | - |
| 1346 | ; | - |
| 1347 | ret[l] = '\0'; | - |
| 1348 | if (lenp| TRUE | evaluated 46 times by 1 test | | FALSE | never evaluated |
) | 0-46 |
| 1349 | *executed 46 times by 1 test: *lenp = l; lenp = l;executed 46 times by 1 test: *lenp = l; | 46 |
| 1350 | returnexecuted 46 times by 1 test: return ret; ret;executed 46 times by 1 test: return ret; | 46 |
| 1351 | } | - |
| 1352 | | - |
| 1353 | | - |
| 1354 | | - |
| 1355 | | - |
| 1356 | | - |
| 1357 | | - |
| 1358 | char * | - |
| 1359 | bash_tilde_expand (s, assign_p) | - |
| 1360 | const char *s; | - |
| 1361 | int assign_p; | - |
| 1362 | { | - |
| 1363 | int old_immed, old_term, r; | - |
| 1364 | char *ret; | - |
| 1365 | tilde_additional_prefixes = assign_p == 0| TRUE | evaluated 33 times by 1 test | | FALSE | evaluated 18 times by 1 test |
? (char **)0 | 18-33 |
| 1366 | : (assign_p == 2| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 2 times by 1 test |
? bash_tilde_prefixes2 : bash_tilde_prefixes); | 2-16 |
| 1367 | if (assign_p == 2| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 35 times by 1 test |
) | 16-35 |
| 1368 | tilde_additional_suffixes = bash_tilde_suffixes2;executed 16 times by 1 test: tilde_additional_suffixes = bash_tilde_suffixes2; | 16 |
| 1369 | | - |
| 1370 | r = (*| TRUE | evaluated 50 times by 1 test | | FALSE | evaluated 1 time by 1 test |
s == '~')| TRUE | evaluated 50 times by 1 test | | FALSE | evaluated 1 time by 1 test |
? unquoted_tilde_word (s) : 1; | 1-50 |
| 1371 | ret = r| TRUE | evaluated 51 times by 1 test | | FALSE | never evaluated |
? tilde_expand (s) : (char *)strcpy (sh_xmalloc((1 + strlen (s)), "general.c", 1138), (s)); | 0-51 |
| 1372 | | - |
| 1373 | | - |
| 1374 | | - |
| 1375 | | - |
| 1376 | | - |
| 1377 | | - |
| 1378 | do { if (terminating_signal| TRUE | never evaluated | | FALSE | evaluated 51 times by 1 test |
) termsig_handler (terminating_signal);never executed: termsig_handler (terminating_signal); if (interrupt_state| TRUE | never evaluated | | FALSE | evaluated 51 times by 1 test |
) throw_to_top_level ();never executed: throw_to_top_level (); } while (0); | 0-51 |
| 1379 | | - |
| 1380 | returnexecuted 51 times by 1 test: return (ret); (ret);executed 51 times by 1 test: return (ret); | 51 |
| 1381 | } | - |
| 1382 | | - |
| 1383 | | - |
| 1384 | | - |
| 1385 | | - |
| 1386 | | - |
| 1387 | | - |
| 1388 | | - |
| 1389 | static int ngroups, maxgroups; | - |
| 1390 | | - |
| 1391 | | - |
| 1392 | static gid_t *group_array = (gid_t *) | - |
| 1393 | ((void *)0) | - |
| 1394 | ; | - |
| 1395 | | - |
| 1396 | | - |
| 1397 | | - |
| 1398 | | - |
| 1399 | | - |
| 1400 | static void | - |
| 1401 | initialize_group_array () | - |
| 1402 | { | - |
| 1403 | register int i; | - |
| 1404 | | - |
| 1405 | if (maxgroups == 0| TRUE | evaluated 3 times by 1 test | | FALSE | never evaluated |
) | 0-3 |
| 1406 | maxgroups = getmaxgroups ();executed 3 times by 1 test: maxgroups = getmaxgroups (); | 3 |
| 1407 | | - |
| 1408 | ngroups = 0; | - |
| 1409 | group_array = (gid_t *)sh_xrealloc((group_array), (maxgroups * sizeof (gid_t)), "general.c", 1174); | - |
| 1410 | | - |
| 1411 | | - |
| 1412 | ngroups = getgroups (maxgroups, group_array); | - |
| 1413 | | - |
| 1414 | | - |
| 1415 | | - |
| 1416 | | - |
| 1417 | if (ngroups == 0| TRUE | never evaluated | | FALSE | evaluated 3 times by 1 test |
) | 0-3 |
| 1418 | { | - |
| 1419 | group_array[0] = current_user.gid; | - |
| 1420 | ngroups = 1; | - |
| 1421 | } never executed: end of block | 0 |
| 1422 | | - |
| 1423 | | - |
| 1424 | | - |
| 1425 | for (i = 0; i < ngroups| TRUE | evaluated 33 times by 1 test | | FALSE | never evaluated |
; i++) | 0-33 |
| 1426 | if (current_user.gid == (gid_t)group_array[i]| TRUE | evaluated 3 times by 1 test | | FALSE | evaluated 30 times by 1 test |
) | 3-30 |
| 1427 | break;executed 3 times by 1 test: break; | 3 |
| 1428 | if (i == ngroups| TRUE | never evaluated | | FALSE | evaluated 3 times by 1 test |
&& ngroups < maxgroups| TRUE | never evaluated | | FALSE | never evaluated |
) | 0-3 |
| 1429 | { | - |
| 1430 | for (i = ngroups; i > 0| TRUE | never evaluated | | FALSE | never evaluated |
; i--) | 0 |
| 1431 | group_array[i] = group_array[i - 1]; never executed: group_array[i] = group_array[i - 1]; | 0 |
| 1432 | group_array[0] = current_user.gid; | - |
| 1433 | ngroups++; | - |
| 1434 | } never executed: end of block | 0 |
| 1435 | | - |
| 1436 | | - |
| 1437 | | - |
| 1438 | | - |
| 1439 | if (group_array[0] != current_user.gid| TRUE | evaluated 3 times by 1 test | | FALSE | never evaluated |
) | 0-3 |
| 1440 | { | - |
| 1441 | for (i = 0; i < ngroups| TRUE | evaluated 33 times by 1 test | | FALSE | never evaluated |
; i++) | 0-33 |
| 1442 | if (group_array[i] == current_user.gid| TRUE | evaluated 3 times by 1 test | | FALSE | evaluated 30 times by 1 test |
) | 3-30 |
| 1443 | break;executed 3 times by 1 test: break; | 3 |
| 1444 | if (i < ngroups| TRUE | evaluated 3 times by 1 test | | FALSE | never evaluated |
) | 0-3 |
| 1445 | { | - |
| 1446 | group_array[i] = group_array[0]; | - |
| 1447 | group_array[0] = current_user.gid; | - |
| 1448 | }executed 3 times by 1 test: end of block | 3 |
| 1449 | }executed 3 times by 1 test: end of block | 3 |
| 1450 | }executed 3 times by 1 test: end of block | 3 |
| 1451 | | - |
| 1452 | | - |
| 1453 | int | - |
| 1454 | | - |
| 1455 | group_member (gid_t gid) | - |
| 1456 | | - |
| 1457 | | - |
| 1458 | | - |
| 1459 | | - |
| 1460 | { | - |
| 1461 | | - |
| 1462 | register int i; | - |
| 1463 | | - |
| 1464 | | - |
| 1465 | | - |
| 1466 | if (gid == current_user.gid| TRUE | never evaluated | | FALSE | evaluated 8 times by 1 test |
|| gid == current_user.egid| TRUE | never evaluated | | FALSE | evaluated 8 times by 1 test |
) | 0-8 |
| 1467 | return never executed: return (1); (1);never executed: return (1); | 0 |
| 1468 | | - |
| 1469 | | - |
| 1470 | if (ngroups == 0| TRUE | evaluated 2 times by 1 test | | FALSE | evaluated 6 times by 1 test |
) | 2-6 |
| 1471 | initialize_group_array ();executed 2 times by 1 test: initialize_group_array (); | 2 |
| 1472 | | - |
| 1473 | | - |
| 1474 | if (ngroups <= 0| TRUE | never evaluated | | FALSE | evaluated 8 times by 1 test |
) | 0-8 |
| 1475 | return never executed: return (0); (0);never executed: return (0); | 0 |
| 1476 | | - |
| 1477 | | - |
| 1478 | for (i = 0; i < ngroups| TRUE | evaluated 88 times by 1 test | | FALSE | evaluated 8 times by 1 test |
; i++) | 8-88 |
| 1479 | if (gid == (gid_t)group_array[i]| TRUE | never evaluated | | FALSE | evaluated 88 times by 1 test |
) | 0-88 |
| 1480 | return never executed: return (1); (1);never executed: return (1); | 0 |
| 1481 | | - |
| 1482 | | - |
| 1483 | returnexecuted 8 times by 1 test: return (0); (0);executed 8 times by 1 test: return (0); | 8 |
| 1484 | } | - |
| 1485 | | - |
| 1486 | char ** | - |
| 1487 | get_group_list (ngp) | - |
| 1488 | int *ngp; | - |
| 1489 | { | - |
| 1490 | static char **group_vector = (char **) | - |
| 1491 | ((void *)0) | - |
| 1492 | ; | - |
| 1493 | register int i; | - |
| 1494 | | - |
| 1495 | if (group_vector| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
| 1496 | { | - |
| 1497 | if (ngp| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1498 | * never executed: *ngp = ngroups; ngp = ngroups;never executed: *ngp = ngroups; | 0 |
| 1499 | return never executed: return group_vector; group_vector;never executed: return group_vector; | 0 |
| 1500 | } | - |
| 1501 | | - |
| 1502 | if (ngroups == 0| TRUE | evaluated 1 time by 1 test | | FALSE | never evaluated |
) | 0-1 |
| 1503 | initialize_group_array ();executed 1 time by 1 test: initialize_group_array (); | 1 |
| 1504 | | - |
| 1505 | if (ngroups <= 0| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
| 1506 | { | - |
| 1507 | if (ngp| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1508 | * never executed: *ngp = 0; ngp = 0;never executed: *ngp = 0; | 0 |
| 1509 | return never executed: return (char **) ((void *)0) ; (char **)never executed: return (char **) ((void *)0) ; | 0 |
| 1510 | ((void *)0) never executed: return (char **) ((void *)0) ; | 0 |
| 1511 | ; never executed: return (char **) ((void *)0) ; | 0 |
| 1512 | } | - |
| 1513 | | - |
| 1514 | group_vector = strvec_create (ngroups); | - |
| 1515 | for (i = 0; i < ngroups| TRUE | evaluated 11 times by 1 test | | FALSE | evaluated 1 time by 1 test |
; i++) | 1-11 |
| 1516 | group_vector[i] = itos (group_array[i]);executed 11 times by 1 test: group_vector[i] = itos (group_array[i]); | 11 |
| 1517 | | - |
| 1518 | if (ngp| TRUE | evaluated 1 time by 1 test | | FALSE | never evaluated |
) | 0-1 |
| 1519 | *executed 1 time by 1 test: *ngp = ngroups; ngp = ngroups;executed 1 time by 1 test: *ngp = ngroups; | 1 |
| 1520 | returnexecuted 1 time by 1 test: return group_vector; group_vector;executed 1 time by 1 test: return group_vector; | 1 |
| 1521 | } | - |
| 1522 | | - |
| 1523 | int * | - |
| 1524 | get_group_array (ngp) | - |
| 1525 | int *ngp; | - |
| 1526 | { | - |
| 1527 | int i; | - |
| 1528 | static int *group_iarray = (int *) | - |
| 1529 | ((void *)0) | - |
| 1530 | ; | - |
| 1531 | | - |
| 1532 | if (group_iarray| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1533 | { | - |
| 1534 | if (ngp| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1535 | * never executed: *ngp = ngroups; ngp = ngroups;never executed: *ngp = ngroups; | 0 |
| 1536 | return never executed: return (group_iarray); (group_iarray);never executed: return (group_iarray); | 0 |
| 1537 | } | - |
| 1538 | | - |
| 1539 | if (ngroups == 0| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1540 | initialize_group_array (); never executed: initialize_group_array (); | 0 |
| 1541 | | - |
| 1542 | if (ngroups <= 0| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1543 | { | - |
| 1544 | if (ngp| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1545 | * never executed: *ngp = 0; ngp = 0;never executed: *ngp = 0; | 0 |
| 1546 | return never executed: return (int *) ((void *)0) ; (int *)never executed: return (int *) ((void *)0) ; | 0 |
| 1547 | ((void *)0) never executed: return (int *) ((void *)0) ; | 0 |
| 1548 | ; never executed: return (int *) ((void *)0) ; | 0 |
| 1549 | } | - |
| 1550 | | - |
| 1551 | group_iarray = (int *)sh_xmalloc((ngroups * sizeof (int)), "general.c", 1308); | - |
| 1552 | for (i = 0; i < ngroups| TRUE | never evaluated | | FALSE | never evaluated |
; i++) | 0 |
| 1553 | group_iarray[i] = (int)group_array[i]; never executed: group_iarray[i] = (int)group_array[i]; | 0 |
| 1554 | | - |
| 1555 | if (ngp| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1556 | * never executed: *ngp = ngroups; ngp = ngroups;never executed: *ngp = ngroups; | 0 |
| 1557 | return never executed: return group_iarray; group_iarray;never executed: return group_iarray; | 0 |
| 1558 | } | - |
| 1559 | char * | - |
| 1560 | conf_standard_path () | - |
| 1561 | { | - |
| 1562 | | - |
| 1563 | char *p; | - |
| 1564 | size_t len; | - |
| 1565 | | - |
| 1566 | len = (size_t)confstr ( | - |
| 1567 | _CS_PATH | - |
| 1568 | , (char *) | - |
| 1569 | ((void *)0) | - |
| 1570 | , (size_t)0); | - |
| 1571 | if (len > 0| TRUE | evaluated 27 times by 1 test | | FALSE | never evaluated |
) | 0-27 |
| 1572 | { | - |
| 1573 | p = (char *)sh_xmalloc((len + 2), "general.c", 1336); | - |
| 1574 | *p = '\0'; | - |
| 1575 | confstr ( | - |
| 1576 | _CS_PATH | - |
| 1577 | , p, len); | - |
| 1578 | returnexecuted 27 times by 1 test: return (p); (p);executed 27 times by 1 test: return (p); | 27 |
| 1579 | } | - |
| 1580 | else | - |
| 1581 | return never executed: return ((char *)strcpy (sh_xmalloc((1 + strlen ("/bin:/usr/bin:/sbin:/usr/sbin:/etc:/usr/etc")), "general.c", 1342), ("/bin:/usr/bin:/sbin:/usr/sbin:/etc:/usr/etc"))); ((char *)strcpy (sh_xmalloc((1 + strlen ("/bin:/usr/bin:/sbin:/usr/sbin:/etc:/usr/etc")), "general.c", 1342), ("/bin:/usr/bin:/sbin:/usr/sbin:/etc:/usr/etc")));never executed: return ((char *)strcpy (sh_xmalloc((1 + strlen ("/bin:/usr/bin:/sbin:/usr/sbin:/etc:/usr/etc")), "general.c", 1342), ("/bin:/usr/bin:/sbin:/usr/sbin:/etc:/usr/etc"))); | 0 |
| 1582 | | - |
| 1583 | | - |
| 1584 | | - |
| 1585 | | - |
| 1586 | | - |
| 1587 | | - |
| 1588 | | - |
| 1589 | } | - |
| 1590 | | - |
| 1591 | int | - |
| 1592 | default_columns () | - |
| 1593 | { | - |
| 1594 | char *v; | - |
| 1595 | int c; | - |
| 1596 | | - |
| 1597 | c = -1; | - |
| 1598 | v = get_string_value ("COLUMNS"); | - |
| 1599 | if (v| TRUE | never evaluated | | FALSE | evaluated 7 times by 1 test |
&& *| TRUE | never evaluated | | FALSE | never evaluated |
v| TRUE | never evaluated | | FALSE | never evaluated |
) | 0-7 |
| 1600 | { | - |
| 1601 | c = atoi (v); | - |
| 1602 | if (c > 0| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1603 | return never executed: return c; c;never executed: return c; | 0 |
| 1604 | } never executed: end of block | 0 |
| 1605 | | - |
| 1606 | if (check_window_size| TRUE | never evaluated | | FALSE | evaluated 7 times by 1 test |
) | 0-7 |
| 1607 | get_new_window_size (0, (int *)0, &c); never executed: get_new_window_size (0, (int *)0, &c); | 0 |
| 1608 | | - |
| 1609 | returnexecuted 7 times by 1 test: return (c > 0 ? c : 80); (c > 0 ? c : 80);executed 7 times by 1 test: return (c > 0 ? c : 80); | 7 |
| 1610 | } | - |
| | |