| Line | Source | Count |
| 1 | | - |
| 2 | | - |
| 3 | | - |
| 4 | enum Shell_syntax | - |
| 5 | { | - |
| 6 | SHELL_SYNTAX_BOURNE, | - |
| 7 | SHELL_SYNTAX_C, | - |
| 8 | SHELL_SYNTAX_UNKNOWN | - |
| 9 | }; | - |
| 10 | static struct obstack lsc_obstack; | - |
| 11 | | - |
| 12 | static const char *const slack_codes[] = | - |
| 13 | { | - |
| 14 | "NORMAL", "NORM", "FILE", "RESET", "DIR", "LNK", "LINK", | - |
| 15 | "SYMLINK", "ORPHAN", "MISSING", "FIFO", "PIPE", "SOCK", "BLK", "BLOCK", | - |
| 16 | "CHR", "CHAR", "DOOR", "EXEC", "LEFT", "LEFTCODE", "RIGHT", "RIGHTCODE", | - |
| 17 | "END", "ENDCODE", "SUID", "SETUID", "SGID", "SETGID", "STICKY", | - |
| 18 | "OTHER_WRITABLE", "OWR", "STICKY_OTHER_WRITABLE", "OWT", "CAPABILITY", | - |
| 19 | "MULTIHARDLINK", "CLRTOEOL", | - |
| 20 | ((void *)0) | - |
| 21 | | - |
| 22 | }; | - |
| 23 | | - |
| 24 | static const char *const ls_codes[] = | - |
| 25 | { | - |
| 26 | "no", "no", "fi", "rs", "di", "ln", "ln", "ln", "or", "mi", "pi", "pi", | - |
| 27 | "so", "bd", "bd", "cd", "cd", "do", "ex", "lc", "lc", "rc", "rc", "ec", "ec", | - |
| 28 | "su", "su", "sg", "sg", "st", "ow", "ow", "tw", "tw", "ca", "mh", "cl", | - |
| 29 | ((void *)0) | - |
| 30 | | - |
| 31 | }; | - |
| 32 | _Static_assert ((sizeof (slack_codes) / sizeof *(slack_codes)) == (sizeof (ls_codes) / sizeof *(ls_codes)), "verify (" "ARRAY_CARDINALITY (slack_codes) == ARRAY_CARDINALITY (ls_codes)" ")"); | - |
| 33 | | - |
| 34 | static struct option const long_options[] = | - |
| 35 | { | - |
| 36 | {"bourne-shell", | - |
| 37 | 0 | - |
| 38 | , | - |
| 39 | ((void *)0) | - |
| 40 | , 'b'}, | - |
| 41 | {"sh", | - |
| 42 | 0 | - |
| 43 | , | - |
| 44 | ((void *)0) | - |
| 45 | , 'b'}, | - |
| 46 | {"csh", | - |
| 47 | 0 | - |
| 48 | , | - |
| 49 | ((void *)0) | - |
| 50 | , 'c'}, | - |
| 51 | {"c-shell", | - |
| 52 | 0 | - |
| 53 | , | - |
| 54 | ((void *)0) | - |
| 55 | , 'c'}, | - |
| 56 | {"print-database", | - |
| 57 | 0 | - |
| 58 | , | - |
| 59 | ((void *)0) | - |
| 60 | , 'p'}, | - |
| 61 | {"help", | - |
| 62 | 0 | - |
| 63 | , | - |
| 64 | ((void *)0) | - |
| 65 | , GETOPT_HELP_CHAR}, | - |
| 66 | {"version", | - |
| 67 | 0 | - |
| 68 | , | - |
| 69 | ((void *)0) | - |
| 70 | , GETOPT_VERSION_CHAR}, | - |
| 71 | { | - |
| 72 | ((void *)0) | - |
| 73 | , 0, | - |
| 74 | ((void *)0) | - |
| 75 | , 0} | - |
| 76 | }; | - |
| 77 | | - |
| 78 | void | - |
| 79 | usage (int status) | - |
| 80 | { | - |
| 81 | if (status != | TRUE | evaluated 3 times by 1 test | | FALSE | evaluated 11 times by 1 test |
| 3-11 |
| 82 | 0| TRUE | evaluated 3 times by 1 test | | FALSE | evaluated 11 times by 1 test |
| 3-11 |
| 83 | ) | - |
| 84 | do { fprintf ( | - |
| 85 | stderr | - |
| 86 | , | - |
| 87 | dcgettext (((void *)0), | - |
| 88 | "Try '%s --help' for more information.\n" | - |
| 89 | , 5) | - |
| 90 | , program_name); }executed 3 times by 1 test: end of block while (0); | 3 |
| 91 | else | - |
| 92 | { | - |
| 93 | printf ( | - |
| 94 | dcgettext (((void *)0), | - |
| 95 | "Usage: %s [OPTION]... [FILE]\n" | - |
| 96 | , 5) | - |
| 97 | , program_name); | - |
| 98 | fputs_unlocked ( | - |
| 99 | dcgettext (((void *)0), | - |
| 100 | "Output commands to set the LS_COLORS environment variable.\n\nDetermine format of output:\n -b, --sh, --bourne-shell output Bourne shell code to set LS_COLORS\n -c, --csh, --c-shell output C shell code to set LS_COLORS\n -p, --print-database output defaults\n" | - |
| 101 | , 5) | - |
| 102 | , | - |
| 103 | stdout | - |
| 104 | ) | - |
| 105 | | - |
| 106 | | - |
| 107 | | - |
| 108 | | - |
| 109 | | - |
| 110 | | - |
| 111 | ; | - |
| 112 | fputs_unlocked ( | - |
| 113 | dcgettext (((void *)0), | - |
| 114 | " --help display this help and exit\n" | - |
| 115 | , 5) | - |
| 116 | , | - |
| 117 | stdout | - |
| 118 | ); | - |
| 119 | fputs_unlocked ( | - |
| 120 | dcgettext (((void *)0), | - |
| 121 | " --version output version information and exit\n" | - |
| 122 | , 5) | - |
| 123 | , | - |
| 124 | stdout | - |
| 125 | ); | - |
| 126 | fputs_unlocked ( | - |
| 127 | dcgettext (((void *)0), | - |
| 128 | "\nIf FILE is specified, read it to determine which colors to use for which\nfile types and extensions. Otherwise, a precompiled database is used.\nFor details on the format of these files, run 'dircolors --print-database'.\n" | - |
| 129 | , 5) | - |
| 130 | , | - |
| 131 | stdout | - |
| 132 | ) | - |
| 133 | | - |
| 134 | | - |
| 135 | | - |
| 136 | | - |
| 137 | ; | - |
| 138 | emit_ancillary_info ("dircolors"); | - |
| 139 | }executed 11 times by 1 test: end of block | 11 |
| 140 | | - |
| 141 | exit (status);executed 14 times by 1 test: exit (status); | 14 |
| 142 | } | - |
| 143 | | - |
| 144 | | - |
| 145 | | - |
| 146 | | - |
| 147 | static enum Shell_syntax | - |
| 148 | guess_shell_syntax (void) | - |
| 149 | { | - |
| 150 | char *shell; | - |
| 151 | | - |
| 152 | shell = getenv ("SHELL"); | - |
| 153 | if (shell == | TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 154 | ((void *)0)| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 155 | || *| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
shell == '\0'| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
| 156 | return never executed: return SHELL_SYNTAX_UNKNOWN; SHELL_SYNTAX_UNKNOWN;never executed: return SHELL_SYNTAX_UNKNOWN; | 0 |
| 157 | | - |
| 158 | shell = last_component (shell); | - |
| 159 | | - |
| 160 | if ((| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 161 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 162 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 163 | ) && __builtin_constant_p (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 164 | "csh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 165 | ) && (__s1_len = __builtin_strlen (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 166 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 167 | ), __s2_len = __builtin_strlen (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 168 | "csh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 169 | ), (!((size_t)(const void *)((| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 170 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 171 | ) + 1) - (size_t)(const void *)(| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 172 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 173 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 174 | "csh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 175 | ) + 1) - (size_t)(const void *)(| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 176 | "csh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 177 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 178 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 179 | , | TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 180 | "csh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 181 | ) : (__builtin_constant_p (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 182 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 183 | ) && ((size_t)(const void *)((| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 184 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 185 | ) + 1) - (size_t)(const void *)(| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 186 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 187 | ) == 1) && (__s1_len = __builtin_strlen (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 188 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 189 | ), __s1_len < 4) ? (__builtin_constant_p (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 190 | "csh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 191 | ) && ((size_t)(const void *)((| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 192 | "csh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 193 | ) + 1) - (size_t)(const void *)(| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 194 | "csh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 195 | ) == 1) ? __builtin_strcmp (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 196 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 197 | , | TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 198 | "csh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 199 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 200 | "csh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 201 | ); int __result = (((const unsigned char *) (const char *) (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 202 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 203 | ))[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 1 time by 1 test |
| 0-1 |
| 204 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 205 | ))[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 1 time by 1 test |
| 0-1 |
| 206 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 207 | ))[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 *) ( shell ))[3] - __s2[3]); | TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 208 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( shell ))[3] - __s2[3]); | 0-1 |
| 209 | ))[3] - __s2[3]);| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( shell ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : (__builtin_constant_p (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 210 | "csh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 211 | ) && ((size_t)(const void *)((| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 212 | "csh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 213 | ) + 1) - (size_t)(const void *)(| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 214 | "csh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 215 | ) == 1) && (__s2_len = __builtin_strlen (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 216 | "csh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 217 | ), __s2_len < 4) ? (__builtin_constant_p (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 218 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 219 | ) && ((size_t)(const void *)((| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 220 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 221 | ) + 1) - (size_t)(const void *)(| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 222 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 223 | ) == 1) ? __builtin_strcmp (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 224 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 225 | , | TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 226 | "csh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 227 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 228 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 229 | ); int __result = (((const unsigned char *) (const char *) (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 230 | "csh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 231 | ))[0] - __s2[0]); if (__s2_len > 0| TRUE | evaluated 1 time by 1 test | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
) { __result = (((const unsigned char *) (const char *) (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 232 | "csh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 233 | ))[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 1 time by 1 test |
| 0-1 |
| 234 | "csh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 235 | ))[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 *) ( "csh" ))[3] - __s2[3]); | TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 236 | "csh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( "csh" ))[3] - __s2[3]); | 0-1 |
| 237 | ))[3] - __s2[3]);| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( "csh" ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : __builtin_strcmp (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 238 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 239 | , | TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 240 | "csh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 241 | )))); }) | TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 242 | == 0)| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
|| (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 243 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 244 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 245 | ) && __builtin_constant_p (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 246 | "tcsh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 247 | ) && (__s1_len = __builtin_strlen (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 248 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 249 | ), __s2_len = __builtin_strlen (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 250 | "tcsh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 251 | ), (!((size_t)(const void *)((| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 252 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 253 | ) + 1) - (size_t)(const void *)(| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 254 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 255 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 256 | "tcsh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 257 | ) + 1) - (size_t)(const void *)(| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 258 | "tcsh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 259 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 260 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 261 | , | TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 262 | "tcsh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 263 | ) : (__builtin_constant_p (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 264 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 265 | ) && ((size_t)(const void *)((| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 266 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 267 | ) + 1) - (size_t)(const void *)(| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 268 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 269 | ) == 1) && (__s1_len = __builtin_strlen (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 270 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 271 | ), __s1_len < 4) ? (__builtin_constant_p (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 272 | "tcsh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 273 | ) && ((size_t)(const void *)((| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 274 | "tcsh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 275 | ) + 1) - (size_t)(const void *)(| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 276 | "tcsh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 277 | ) == 1) ? __builtin_strcmp (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 278 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 279 | , | TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 280 | "tcsh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 281 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 282 | "tcsh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 283 | ); int __result = (((const unsigned char *) (const char *) (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 284 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 285 | ))[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 1 time by 1 test |
| 0-1 |
| 286 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 287 | ))[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 1 time by 1 test |
| 0-1 |
| 288 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 289 | ))[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 *) ( shell ))[3] - __s2[3]); | TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 290 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( shell ))[3] - __s2[3]); | 0-1 |
| 291 | ))[3] - __s2[3]);| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( shell ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : (__builtin_constant_p (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 292 | "tcsh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 293 | ) && ((size_t)(const void *)((| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 294 | "tcsh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 295 | ) + 1) - (size_t)(const void *)(| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 296 | "tcsh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 297 | ) == 1) && (__s2_len = __builtin_strlen (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 298 | "tcsh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 299 | ), __s2_len < 4) ? (__builtin_constant_p (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 300 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 301 | ) && ((size_t)(const void *)((| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 302 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 303 | ) + 1) - (size_t)(const void *)(| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 304 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 305 | ) == 1) ? __builtin_strcmp (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 306 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 307 | , | TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 308 | "tcsh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 309 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 310 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 311 | ); int __result = (((const unsigned char *) (const char *) (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 312 | "tcsh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 313 | ))[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 1 time by 1 test |
| 0-1 |
| 314 | "tcsh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 315 | ))[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 1 time by 1 test |
| 0-1 |
| 316 | "tcsh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 317 | ))[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 *) ( "tcsh" ))[3] - __s2[3]); | TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 318 | "tcsh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( "tcsh" ))[3] - __s2[3]); | 0-1 |
| 319 | ))[3] - __s2[3]);| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( "tcsh" ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : __builtin_strcmp (| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 320 | shell| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 321 | , | TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 322 | "tcsh"| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 323 | )))); }) | TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 324 | == 0)| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
| 325 | return never executed: return SHELL_SYNTAX_C; SHELL_SYNTAX_C;never executed: return SHELL_SYNTAX_C; | 0 |
| 326 | | - |
| 327 | returnexecuted 1 time by 1 test: return SHELL_SYNTAX_BOURNE; SHELL_SYNTAX_BOURNE;executed 1 time by 1 test: return SHELL_SYNTAX_BOURNE; | 1 |
| 328 | } | - |
| 329 | | - |
| 330 | static void | - |
| 331 | parse_line (char const *line, char **keyword, char **arg) | - |
| 332 | { | - |
| 333 | char const *p; | - |
| 334 | char const *keyword_start; | - |
| 335 | char const *arg_start; | - |
| 336 | | - |
| 337 | *keyword = | - |
| 338 | ((void *)0) | - |
| 339 | ; | - |
| 340 | *arg = | - |
| 341 | ((void *)0) | - |
| 342 | ; | - |
| 343 | | - |
| 344 | for (p = line; | - |
| 345 | ((*| TRUE | evaluated 4 times by 1 test | | FALSE | evaluated 414 times by 1 test |
__ctype_b_loc ())[(int) ((| TRUE | evaluated 4 times by 1 test | | FALSE | evaluated 414 times by 1 test |
| 4-414 |
| 346 | to_uchar (*p)| TRUE | evaluated 4 times by 1 test | | FALSE | evaluated 414 times by 1 test |
| 4-414 |
| 347 | ))] & (unsigned short int) _ISspace)| TRUE | evaluated 4 times by 1 test | | FALSE | evaluated 414 times by 1 test |
| 4-414 |
| 348 | ; ++p) | - |
| 349 | continue;executed 4 times by 1 test: continue; | 4 |
| 350 | | - |
| 351 | | - |
| 352 | if (*| TRUE | never evaluated | | FALSE | evaluated 414 times by 1 test |
p == '\0'| TRUE | never evaluated | | FALSE | evaluated 414 times by 1 test |
|| *| TRUE | evaluated 78 times by 1 test | | FALSE | evaluated 336 times by 1 test |
p == '#'| TRUE | evaluated 78 times by 1 test | | FALSE | evaluated 336 times by 1 test |
) | 0-414 |
| 353 | return;executed 78 times by 1 test: return; | 78 |
| 354 | | - |
| 355 | keyword_start = p; | - |
| 356 | | - |
| 357 | while (!| TRUE | evaluated 1489 times by 1 test | | FALSE | evaluated 336 times by 1 test |
| 336-1489 |
| 358 | ((*__ctype_b_loc ())[(int) ((| TRUE | evaluated 1489 times by 1 test | | FALSE | evaluated 336 times by 1 test |
| 336-1489 |
| 359 | to_uchar (*p)| TRUE | evaluated 1489 times by 1 test | | FALSE | evaluated 336 times by 1 test |
| 336-1489 |
| 360 | ))] & (unsigned short int) _ISspace)| TRUE | evaluated 1489 times by 1 test | | FALSE | evaluated 336 times by 1 test |
| 336-1489 |
| 361 | && *| TRUE | evaluated 1489 times by 1 test | | FALSE | never evaluated |
p != '\0'| TRUE | evaluated 1489 times by 1 test | | FALSE | never evaluated |
) | 0-1489 |
| 362 | { | - |
| 363 | ++p; | - |
| 364 | }executed 1489 times by 1 test: end of block | 1489 |
| 365 | | - |
| 366 | *keyword = xstrndup (keyword_start, p - keyword_start); | - |
| 367 | if (*| TRUE | never evaluated | | FALSE | evaluated 336 times by 1 test |
p == '\0'| TRUE | never evaluated | | FALSE | evaluated 336 times by 1 test |
) | 0-336 |
| 368 | return; never executed: return; | 0 |
| 369 | | - |
| 370 | do | - |
| 371 | { | - |
| 372 | ++p; | - |
| 373 | }executed 336 times by 1 test: end of block | 336 |
| 374 | while ( | - |
| 375 | ((*| TRUE | never evaluated | | FALSE | evaluated 336 times by 1 test |
__ctype_b_loc ())[(int) ((| TRUE | never evaluated | | FALSE | evaluated 336 times by 1 test |
| 0-336 |
| 376 | to_uchar (*p)| TRUE | never evaluated | | FALSE | evaluated 336 times by 1 test |
| 0-336 |
| 377 | ))] & (unsigned short int) _ISspace)| TRUE | never evaluated | | FALSE | evaluated 336 times by 1 test |
| 0-336 |
| 378 | ); | - |
| 379 | | - |
| 380 | if (*| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 335 times by 1 test |
p == '\0'| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 335 times by 1 test |
|| *| TRUE | never evaluated | | FALSE | evaluated 335 times by 1 test |
p == '#'| TRUE | never evaluated | | FALSE | evaluated 335 times by 1 test |
) | 0-335 |
| 381 | return;executed 1 time by 1 test: return; | 1 |
| 382 | | - |
| 383 | arg_start = p; | - |
| 384 | | - |
| 385 | while (*| TRUE | evaluated 1810 times by 1 test | | FALSE | evaluated 301 times by 1 test |
p != '\0'| TRUE | evaluated 1810 times by 1 test | | FALSE | evaluated 301 times by 1 test |
&& *| TRUE | evaluated 1776 times by 1 test | | FALSE | evaluated 34 times by 1 test |
p != '#'| TRUE | evaluated 1776 times by 1 test | | FALSE | evaluated 34 times by 1 test |
) | 34-1810 |
| 386 | ++executed 1776 times by 1 test: ++p; p;executed 1776 times by 1 test: ++p; | 1776 |
| 387 | | - |
| 388 | for (--p; | - |
| 389 | ((*| TRUE | evaluated 61 times by 1 test | | FALSE | evaluated 335 times by 1 test |
__ctype_b_loc ())[(int) ((| TRUE | evaluated 61 times by 1 test | | FALSE | evaluated 335 times by 1 test |
| 61-335 |
| 390 | to_uchar (*p)| TRUE | evaluated 61 times by 1 test | | FALSE | evaluated 335 times by 1 test |
| 61-335 |
| 391 | ))] & (unsigned short int) _ISspace)| TRUE | evaluated 61 times by 1 test | | FALSE | evaluated 335 times by 1 test |
| 61-335 |
| 392 | ; --p) | - |
| 393 | continue;executed 61 times by 1 test: continue; | 61 |
| 394 | ++p; | - |
| 395 | | - |
| 396 | *arg = xstrndup (arg_start, p - arg_start); | - |
| 397 | }executed 335 times by 1 test: end of block | 335 |
| 398 | | - |
| 399 | | - |
| 400 | | - |
| 401 | | - |
| 402 | static void | - |
| 403 | append_quoted (const char *str) | - |
| 404 | { | - |
| 405 | | - |
| 406 | _Bool | - |
| 407 | need_backslash = | - |
| 408 | 1 | - |
| 409 | ; | - |
| 410 | | - |
| 411 | while (*| TRUE | evaluated 89 times by 1 test | | FALSE | evaluated 21 times by 1 test |
str != '\0'| TRUE | evaluated 89 times by 1 test | | FALSE | evaluated 21 times by 1 test |
) | 21-89 |
| 412 | { | - |
| 413 | switch (*str) | - |
| 414 | { | - |
| 415 | caseexecuted 2 times by 1 test: case '\'': '\'':executed 2 times by 1 test: case '\'': | 2 |
| 416 | __extension__ ({ struct obstack *__o = (&lsc_obstack); if (__extension__ ({ struct obstack const *__o1 = (__o); (size_t) (__o1->chunk_limit - __o1->next_free); }) < 1| TRUE | never evaluated | | FALSE | evaluated 2 times by 1 test |
) _obstack_newchunk (__o, 1);never executed: _obstack_newchunk (__o, 1); ((void) (*((__o)->next_free)++ = ('\''))); }); | 0-2 |
| 417 | __extension__ ({ struct obstack *__o = (&lsc_obstack); if (__extension__ ({ struct obstack const *__o1 = (__o); (size_t) (__o1->chunk_limit - __o1->next_free); }) < 1| TRUE | never evaluated | | FALSE | evaluated 2 times by 1 test |
) _obstack_newchunk (__o, 1);never executed: _obstack_newchunk (__o, 1); ((void) (*((__o)->next_free)++ = ('\\'))); }); | 0-2 |
| 418 | __extension__ ({ struct obstack *__o = (&lsc_obstack); if (__extension__ ({ struct obstack const *__o1 = (__o); (size_t) (__o1->chunk_limit - __o1->next_free); }) < 1| TRUE | never evaluated | | FALSE | evaluated 2 times by 1 test |
) _obstack_newchunk (__o, 1);never executed: _obstack_newchunk (__o, 1); ((void) (*((__o)->next_free)++ = ('\''))); }); | 0-2 |
| 419 | need_backslash = | - |
| 420 | 1 | - |
| 421 | ; | - |
| 422 | break;executed 2 times by 1 test: break; | 2 |
| 423 | | - |
| 424 | case never executed: case '\\': '\\':never executed: case '\\': | 0 |
| 425 | case never executed: case '^': '^':never executed: case '^': | 0 |
| 426 | need_backslash = !need_backslash; | - |
| 427 | break; never executed: break; | 0 |
| 428 | | - |
| 429 | caseexecuted 1 time by 1 test: case ':': ':':executed 1 time by 1 test: case ':': | 1 |
| 430 | case never executed: case '=': '=':never executed: case '=': | 0 |
| 431 | if (need_backslash| TRUE | evaluated 1 time by 1 test | | FALSE | never evaluated |
) | 0-1 |
| 432 | __extension__ ({ struct obstack *__o = (&lsc_obstack); if (__extension__ ({ struct obstack const *__o1 = (__o); (size_t) (__o1->chunk_limit - __o1->next_free); }) < 1| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
) _obstack_newchunk (__o, 1);never executed: _obstack_newchunk (__o, 1); ((void) (*((__o)->next_free)++ = ('\\'))); });executed 1 time by 1 test: __extension__ ({ struct obstack *__o = (&lsc_obstack); if (__extension__ ({ struct obstack const *__o1 = (__o); (size_t) (__o1->chunk_limit - __o1->next_free); }) < 1) _obstack_newchunk (__o, 1); ((void) (*((__o)->next_free)++ = ('\\'))); }); | 0-1 |
| 433 | ((void) 0); | - |
| 434 | | - |
| 435 | defaultexecuted 86 times by 1 test: default: :executed 86 times by 1 test: default: code before this statement executed 1 time by 1 test: default: | 1-86 |
| 436 | need_backslash = | - |
| 437 | 1 | - |
| 438 | ; | - |
| 439 | break;executed 87 times by 1 test: break; | 87 |
| 440 | } | - |
| 441 | | - |
| 442 | __extension__ ({ struct obstack *__o = (&lsc_obstack); if (__extension__ ({ struct obstack const *__o1 = (__o); (size_t) (__o1->chunk_limit - __o1->next_free); }) < 1| TRUE | never evaluated | | FALSE | evaluated 89 times by 1 test |
) _obstack_newchunk (__o, 1);never executed: _obstack_newchunk (__o, 1); ((void) (*((__o)->next_free)++ = (*str))); }); | 0-89 |
| 443 | ++str; | - |
| 444 | }executed 89 times by 1 test: end of block | 89 |
| 445 | }executed 21 times by 1 test: end of block | 21 |
| 446 | static | - |
| 447 | _Bool | - |
| 448 | | - |
| 449 | dc_parse_stream (FILE *fp, const char *filename) | - |
| 450 | { | - |
| 451 | size_t line_number = 0; | - |
| 452 | char const *next_G_line = G_line; | - |
| 453 | char *input_line = | - |
| 454 | ((void *)0) | - |
| 455 | ; | - |
| 456 | size_t input_line_size = 0; | - |
| 457 | char const *line; | - |
| 458 | char const *term; | - |
| 459 | | - |
| 460 | _Bool | - |
| 461 | ok = | - |
| 462 | 1 | - |
| 463 | ; | - |
| 464 | | - |
| 465 | | - |
| 466 | enum { ST_TERMNO, ST_TERMYES, ST_TERMSURE, ST_GLOBAL } state = ST_GLOBAL; | - |
| 467 | | - |
| 468 | | - |
| 469 | term = getenv ("TERM"); | - |
| 470 | if (term == | TRUE | evaluated 10 times by 1 test | | FALSE | never evaluated |
| 0-10 |
| 471 | ((void *)0)| TRUE | evaluated 10 times by 1 test | | FALSE | never evaluated |
| 0-10 |
| 472 | || *| TRUE | never evaluated | | FALSE | never evaluated |
term == '\0'| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 473 | term = "none";executed 10 times by 1 test: term = "none"; | 10 |
| 474 | | - |
| 475 | while (1) | - |
| 476 | { | - |
| 477 | char *keywd, *arg; | - |
| 478 | | - |
| 479 | _Bool | - |
| 480 | unrecognized; | - |
| 481 | | - |
| 482 | ++line_number; | - |
| 483 | | - |
| 484 | if (fp| TRUE | evaluated 36 times by 1 test | | FALSE | evaluated 388 times by 1 test |
) | 36-388 |
| 485 | { | - |
| 486 | if (getline (&input_line, &input_line_size, fp) <= 0| TRUE | evaluated 8 times by 1 test | | FALSE | evaluated 28 times by 1 test |
) | 8-28 |
| 487 | { | - |
| 488 | free (input_line); | - |
| 489 | break;executed 8 times by 1 test: break; | 8 |
| 490 | } | - |
| 491 | line = input_line; | - |
| 492 | }executed 28 times by 1 test: end of block | 28 |
| 493 | else | - |
| 494 | { | - |
| 495 | if (next_G_line == G_line + sizeof G_line| TRUE | evaluated 2 times by 1 test | | FALSE | evaluated 386 times by 1 test |
) | 2-386 |
| 496 | break;executed 2 times by 1 test: break; | 2 |
| 497 | line = next_G_line; | - |
| 498 | next_G_line += strlen (next_G_line) + 1; | - |
| 499 | }executed 386 times by 1 test: end of block | 386 |
| 500 | | - |
| 501 | parse_line (line, &keywd, &arg); | - |
| 502 | | - |
| 503 | if (keywd == | TRUE | evaluated 78 times by 1 test | | FALSE | evaluated 336 times by 1 test |
| 78-336 |
| 504 | ((void *)0)| TRUE | evaluated 78 times by 1 test | | FALSE | evaluated 336 times by 1 test |
| 78-336 |
| 505 | ) | - |
| 506 | continue;executed 78 times by 1 test: continue; | 78 |
| 507 | | - |
| 508 | if (arg == | TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 335 times by 1 test |
| 1-335 |
| 509 | ((void *)0)| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 335 times by 1 test |
| 1-335 |
| 510 | ) | - |
| 511 | { | - |
| 512 | error (0, 0, | - |
| 513 | dcgettext (((void *)0), | - |
| 514 | "%s:%lu: invalid line; missing second token" | - |
| 515 | , 5) | - |
| 516 | , | - |
| 517 | quotearg_n_style_colon (0, shell_escape_quoting_style, filename), (unsigned long int) line_number); | - |
| 518 | ok = | - |
| 519 | 0 | - |
| 520 | ; | - |
| 521 | free (keywd); | - |
| 522 | continue;executed 1 time by 1 test: continue; | 1 |
| 523 | } | - |
| 524 | | - |
| 525 | unrecognized = | - |
| 526 | 0 | - |
| 527 | ; | - |
| 528 | if (c_strcasecmp (keywd, "TERM") == 0| TRUE | evaluated 52 times by 1 test | | FALSE | evaluated 283 times by 1 test |
) | 52-283 |
| 529 | { | - |
| 530 | if (fnmatch (arg, term, 0) == 0| TRUE | evaluated 2 times by 1 test | | FALSE | evaluated 50 times by 1 test |
) | 2-50 |
| 531 | state = ST_TERMSURE;executed 2 times by 1 test: state = ST_TERMSURE; | 2 |
| 532 | else if (state != ST_TERMSURE| TRUE | evaluated 50 times by 1 test | | FALSE | never evaluated |
) | 0-50 |
| 533 | state = ST_TERMNO;executed 50 times by 1 test: state = ST_TERMNO; | 50 |
| 534 | }executed 52 times by 1 test: end of block | 52 |
| 535 | else | - |
| 536 | { | - |
| 537 | if (state == ST_TERMSURE| TRUE | evaluated 2 times by 1 test | | FALSE | evaluated 281 times by 1 test |
) | 2-281 |
| 538 | state = ST_TERMYES;executed 2 times by 1 test: state = ST_TERMYES; | 2 |
| 539 | | - |
| 540 | if (state != ST_TERMNO| TRUE | evaluated 21 times by 1 test | | FALSE | evaluated 262 times by 1 test |
) | 21-262 |
| 541 | { | - |
| 542 | if (keywd[0] == '.'| TRUE | never evaluated | | FALSE | evaluated 21 times by 1 test |
) | 0-21 |
| 543 | { | - |
| 544 | __extension__ ({ struct obstack *__o = (&lsc_obstack); if (__extension__ ({ struct obstack const *__o1 = (__o); (size_t) (__o1->chunk_limit - __o1->next_free); }) < 1| TRUE | never evaluated | | FALSE | never evaluated |
) _obstack_newchunk (__o, 1);never executed: _obstack_newchunk (__o, 1); ((void) (*((__o)->next_free)++ = ('*'))); }); | 0 |
| 545 | append_quoted (keywd); | - |
| 546 | __extension__ ({ struct obstack *__o = (&lsc_obstack); if (__extension__ ({ struct obstack const *__o1 = (__o); (size_t) (__o1->chunk_limit - __o1->next_free); }) < 1| TRUE | never evaluated | | FALSE | never evaluated |
) _obstack_newchunk (__o, 1);never executed: _obstack_newchunk (__o, 1); ((void) (*((__o)->next_free)++ = ('='))); }); | 0 |
| 547 | append_quoted (arg); | - |
| 548 | __extension__ ({ struct obstack *__o = (&lsc_obstack); if (__extension__ ({ struct obstack const *__o1 = (__o); (size_t) (__o1->chunk_limit - __o1->next_free); }) < 1| TRUE | never evaluated | | FALSE | never evaluated |
) _obstack_newchunk (__o, 1);never executed: _obstack_newchunk (__o, 1); ((void) (*((__o)->next_free)++ = (':'))); }); | 0 |
| 549 | } never executed: end of block | 0 |
| 550 | else if (keywd[0] == '*'| TRUE | never evaluated | | FALSE | evaluated 21 times by 1 test |
) | 0-21 |
| 551 | { | - |
| 552 | append_quoted (keywd); | - |
| 553 | __extension__ ({ struct obstack *__o = (&lsc_obstack); if (__extension__ ({ struct obstack const *__o1 = (__o); (size_t) (__o1->chunk_limit - __o1->next_free); }) < 1| TRUE | never evaluated | | FALSE | never evaluated |
) _obstack_newchunk (__o, 1);never executed: _obstack_newchunk (__o, 1); ((void) (*((__o)->next_free)++ = ('='))); }); | 0 |
| 554 | append_quoted (arg); | - |
| 555 | __extension__ ({ struct obstack *__o = (&lsc_obstack); if (__extension__ ({ struct obstack const *__o1 = (__o); (size_t) (__o1->chunk_limit - __o1->next_free); }) < 1| TRUE | never evaluated | | FALSE | never evaluated |
) _obstack_newchunk (__o, 1);never executed: _obstack_newchunk (__o, 1); ((void) (*((__o)->next_free)++ = (':'))); }); | 0 |
| 556 | } never executed: end of block | 0 |
| 557 | else if (c_strcasecmp (keywd, "OPTIONS") == 0| TRUE | never evaluated | | FALSE | evaluated 21 times by 1 test |
| 0-21 |
| 558 | || c_strcasecmp (keywd, "COLOR") == 0| TRUE | never evaluated | | FALSE | evaluated 21 times by 1 test |
| 0-21 |
| 559 | || c_strcasecmp (keywd, "EIGHTBIT") == 0| TRUE | never evaluated | | FALSE | evaluated 21 times by 1 test |
) | 0-21 |
| 560 | { | - |
| 561 | | - |
| 562 | } never executed: end of block | 0 |
| 563 | else | - |
| 564 | { | - |
| 565 | int i; | - |
| 566 | | - |
| 567 | for (i = 0; slack_codes[i] != | TRUE | evaluated 458 times by 1 test | | FALSE | never evaluated |
| 0-458 |
| 568 | ((void *)0)| TRUE | evaluated 458 times by 1 test | | FALSE | never evaluated |
| 0-458 |
| 569 | ; ++i) | - |
| 570 | if (c_strcasecmp (keywd, slack_codes[i]) == 0| TRUE | evaluated 21 times by 1 test | | FALSE | evaluated 437 times by 1 test |
) | 21-437 |
| 571 | break;executed 21 times by 1 test: break; | 21 |
| 572 | | - |
| 573 | if (slack_codes[i] != | TRUE | evaluated 21 times by 1 test | | FALSE | never evaluated |
| 0-21 |
| 574 | ((void *)0)| TRUE | evaluated 21 times by 1 test | | FALSE | never evaluated |
| 0-21 |
| 575 | ) | - |
| 576 | { | - |
| 577 | do { __extension__ ({ struct obstack *__o = (&lsc_obstack); if (__extension__ ({ struct obstack const *__o1 = (__o); (size_t) (__o1->chunk_limit - __o1->next_free); }) < 1| TRUE | never evaluated | | FALSE | evaluated 21 times by 1 test |
) _obstack_newchunk (__o, 1);never executed: _obstack_newchunk (__o, 1); ((void) (*((__o)->next_free)++ = (ls_codes[i][0]))); }); __extension__ ({ struct obstack *__o = (&lsc_obstack); if (__extension__ ({ struct obstack const *__o1 = (__o); (size_t) (__o1->chunk_limit - __o1->next_free); }) < 1| TRUE | never evaluated | | FALSE | evaluated 21 times by 1 test |
) _obstack_newchunk (__o, 1);never executed: _obstack_newchunk (__o, 1); ((void) (*((__o)->next_free)++ = (ls_codes[i][1]))); }); } while (0); | 0-21 |
| 578 | __extension__ ({ struct obstack *__o = (&lsc_obstack); if (__extension__ ({ struct obstack const *__o1 = (__o); (size_t) (__o1->chunk_limit - __o1->next_free); }) < 1| TRUE | never evaluated | | FALSE | evaluated 21 times by 1 test |
) _obstack_newchunk (__o, 1);never executed: _obstack_newchunk (__o, 1); ((void) (*((__o)->next_free)++ = ('='))); }); | 0-21 |
| 579 | append_quoted (arg); | - |
| 580 | __extension__ ({ struct obstack *__o = (&lsc_obstack); if (__extension__ ({ struct obstack const *__o1 = (__o); (size_t) (__o1->chunk_limit - __o1->next_free); }) < 1| TRUE | never evaluated | | FALSE | evaluated 21 times by 1 test |
) _obstack_newchunk (__o, 1);never executed: _obstack_newchunk (__o, 1); ((void) (*((__o)->next_free)++ = (':'))); }); | 0-21 |
| 581 | }executed 21 times by 1 test: end of block | 21 |
| 582 | else | - |
| 583 | { | - |
| 584 | unrecognized = | - |
| 585 | 1 | - |
| 586 | ; | - |
| 587 | } never executed: end of block | 0 |
| 588 | } | - |
| 589 | } | - |
| 590 | else | - |
| 591 | { | - |
| 592 | unrecognized = | - |
| 593 | 1 | - |
| 594 | ; | - |
| 595 | }executed 262 times by 1 test: end of block | 262 |
| 596 | } | - |
| 597 | | - |
| 598 | if (unrecognized| TRUE | evaluated 262 times by 1 test | | FALSE | evaluated 73 times by 1 test |
&& (state == ST_TERMSURE| TRUE | never evaluated | | FALSE | evaluated 262 times by 1 test |
|| state == ST_TERMYES| TRUE | never evaluated | | FALSE | evaluated 262 times by 1 test |
)) | 0-262 |
| 599 | { | - |
| 600 | error (0, 0, | - |
| 601 | dcgettext (((void *)0), | - |
| 602 | "%s:%lu: unrecognized keyword %s" | - |
| 603 | , 5) | - |
| 604 | , | - |
| 605 | (filename ? quotearg_n_style_colon (0, shell_escape_quoting_style, filename) : | - |
| 606 | dcgettext (((void *)0), | - |
| 607 | "<internal>" | - |
| 608 | , 5) | - |
| 609 | ), | - |
| 610 | (unsigned long int) line_number, keywd); | - |
| 611 | ok = | - |
| 612 | 0 | - |
| 613 | ; | - |
| 614 | } never executed: end of block | 0 |
| 615 | | - |
| 616 | free (keywd); | - |
| 617 | free (arg); | - |
| 618 | }executed 335 times by 1 test: end of block | 335 |
| 619 | | - |
| 620 | returnexecuted 10 times by 1 test: return ok; ok;executed 10 times by 1 test: return ok; | 10 |
| 621 | } | - |
| 622 | | - |
| 623 | static | - |
| 624 | _Bool | - |
| 625 | | - |
| 626 | dc_parse_file (const char *filename) | - |
| 627 | { | - |
| 628 | | - |
| 629 | _Bool | - |
| 630 | ok; | - |
| 631 | | - |
| 632 | if (! (| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 633 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 634 | filename| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 635 | ) && __builtin_constant_p (| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 636 | "-"| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 637 | ) && (__s1_len = __builtin_strlen (| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 638 | filename| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 639 | ), __s2_len = __builtin_strlen (| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 640 | "-"| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 641 | ), (!((size_t)(const void *)((| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 642 | filename| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 643 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 644 | filename| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 645 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 646 | "-"| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 647 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 648 | "-"| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 649 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 650 | filename| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 651 | , | TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 652 | "-"| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 653 | ) : (__builtin_constant_p (| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 654 | filename| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 655 | ) && ((size_t)(const void *)((| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 656 | filename| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 657 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 658 | filename| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 659 | ) == 1) && (__s1_len = __builtin_strlen (| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 660 | filename| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 661 | ), __s1_len < 4) ? (__builtin_constant_p (| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 662 | "-"| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 663 | ) && ((size_t)(const void *)((| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 664 | "-"| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 665 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 666 | "-"| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 667 | ) == 1) ? __builtin_strcmp (| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 668 | filename| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 669 | , | TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 670 | "-"| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 671 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 672 | "-"| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 673 | ); int __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 674 | filename| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 675 | ))[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 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 676 | filename| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 677 | ))[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 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 678 | filename| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 679 | ))[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 *) ( filename ))[3] - __s2[3]); | TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 680 | filename| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( filename ))[3] - __s2[3]); | 0-8 |
| 681 | ))[3] - __s2[3]);| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( filename ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : (__builtin_constant_p (| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 682 | "-"| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 683 | ) && ((size_t)(const void *)((| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 684 | "-"| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 685 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 686 | "-"| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 687 | ) == 1) && (__s2_len = __builtin_strlen (| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 688 | "-"| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 689 | ), __s2_len < 4) ? (__builtin_constant_p (| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 690 | filename| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 691 | ) && ((size_t)(const void *)((| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 692 | filename| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 693 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 694 | filename| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 695 | ) == 1) ? __builtin_strcmp (| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 696 | filename| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 697 | , | TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 698 | "-"| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 699 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 700 | filename| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 701 | ); int __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 702 | "-"| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 703 | ))[0] - __s2[0]); if (__s2_len > 0| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | evaluated 8 times by 1 test |
) { __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 704 | "-"| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 705 | ))[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 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 706 | "-"| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 707 | ))[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 *) ( "-" ))[3] - __s2[3]); | TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 708 | "-"| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( "-" ))[3] - __s2[3]); | 0-8 |
| 709 | ))[3] - __s2[3]);| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( "-" ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : __builtin_strcmp (| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 710 | filename| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 711 | , | TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 712 | "-"| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 713 | )))); }) | TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
| 0-8 |
| 714 | == 0)| TRUE | evaluated 8 times by 1 test | | FALSE | never evaluated |
&& freopen_safer (filename, "r", | TRUE | never evaluated | | FALSE | evaluated 8 times by 1 test |
| 0-8 |
| 715 | stdin| TRUE | never evaluated | | FALSE | evaluated 8 times by 1 test |
| 0-8 |
| 716 | ) == | TRUE | never evaluated | | FALSE | evaluated 8 times by 1 test |
| 0-8 |
| 717 | ((void *)0)| TRUE | never evaluated | | FALSE | evaluated 8 times by 1 test |
| 0-8 |
| 718 | ) | - |
| 719 | { | - |
| 720 | error (0, | - |
| 721 | (*__errno_location ()) | - |
| 722 | , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)); | - |
| 723 | return never executed: return 0 ; never executed: return 0 ; | 0 |
| 724 | 0 never executed: return 0 ; | 0 |
| 725 | ; never executed: return 0 ; | 0 |
| 726 | } | - |
| 727 | | - |
| 728 | ok = dc_parse_stream ( | - |
| 729 | stdin | - |
| 730 | , filename); | - |
| 731 | | - |
| 732 | if ( | - |
| 733 | rpl_fclose | TRUE | never evaluated | | FALSE | evaluated 8 times by 1 test |
| 0-8 |
| 734 | (| TRUE | never evaluated | | FALSE | evaluated 8 times by 1 test |
| 0-8 |
| 735 | stdin| TRUE | never evaluated | | FALSE | evaluated 8 times by 1 test |
| 0-8 |
| 736 | ) != 0| TRUE | never evaluated | | FALSE | evaluated 8 times by 1 test |
) | 0-8 |
| 737 | { | - |
| 738 | error (0, | - |
| 739 | (*__errno_location ()) | - |
| 740 | , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)); | - |
| 741 | return never executed: return 0 ; never executed: return 0 ; | 0 |
| 742 | 0 never executed: return 0 ; | 0 |
| 743 | ; never executed: return 0 ; | 0 |
| 744 | } | - |
| 745 | | - |
| 746 | returnexecuted 8 times by 1 test: return ok; ok;executed 8 times by 1 test: return ok; | 8 |
| 747 | } | - |
| 748 | | - |
| 749 | int | - |
| 750 | main (int argc, char **argv) | - |
| 751 | { | - |
| 752 | | - |
| 753 | _Bool | - |
| 754 | ok = | - |
| 755 | 1 | - |
| 756 | ; | - |
| 757 | int optc; | - |
| 758 | enum Shell_syntax syntax = SHELL_SYNTAX_UNKNOWN; | - |
| 759 | | - |
| 760 | _Bool | - |
| 761 | print_database = | - |
| 762 | 0 | - |
| 763 | ; | - |
| 764 | | - |
| 765 | ; | - |
| 766 | set_program_name (argv[0]); | - |
| 767 | setlocale ( | - |
| 768 | 6 | - |
| 769 | , ""); | - |
| 770 | bindtextdomain ("coreutils", "/usr/local/share/locale"); | - |
| 771 | textdomain ("coreutils"); | - |
| 772 | | - |
| 773 | atexit (close_stdout); | - |
| 774 | | - |
| 775 | while ((| TRUE | evaluated 35 times by 1 test | | FALSE | evaluated 10 times by 1 test |
optc = getopt_long (argc, argv, "bcp", long_options, | TRUE | evaluated 35 times by 1 test | | FALSE | evaluated 10 times by 1 test |
| 10-35 |
| 776 | ((void *)0)| TRUE | evaluated 35 times by 1 test | | FALSE | evaluated 10 times by 1 test |
| 10-35 |
| 777 | )) != -1| TRUE | evaluated 35 times by 1 test | | FALSE | evaluated 10 times by 1 test |
) | 10-35 |
| 778 | switch (optc) | - |
| 779 | { | - |
| 780 | caseexecuted 12 times by 1 test: case 'b': 'b':executed 12 times by 1 test: case 'b': | 12 |
| 781 | syntax = SHELL_SYNTAX_BOURNE; | - |
| 782 | break;executed 12 times by 1 test: break; | 12 |
| 783 | | - |
| 784 | caseexecuted 3 times by 1 test: case 'c': 'c':executed 3 times by 1 test: case 'c': | 3 |
| 785 | syntax = SHELL_SYNTAX_C; | - |
| 786 | break;executed 3 times by 1 test: break; | 3 |
| 787 | | - |
| 788 | caseexecuted 2 times by 1 test: case 'p': 'p':executed 2 times by 1 test: case 'p': | 2 |
| 789 | print_database = | - |
| 790 | 1 | - |
| 791 | ; | - |
| 792 | break;executed 2 times by 1 test: break; | 2 |
| 793 | | - |
| 794 | caseexecuted 11 times by 1 test: case GETOPT_HELP_CHAR: GETOPT_HELP_CHAR:executed 11 times by 1 test: case GETOPT_HELP_CHAR: usage ( | 11 |
| 795 | 0 | - |
| 796 | ); break; never executed: break; ; | 0 |
| 797 | | - |
| 798 | caseexecuted 4 times by 1 test: case GETOPT_VERSION_CHAR: GETOPT_VERSION_CHAR:executed 4 times by 1 test: case GETOPT_VERSION_CHAR: version_etc ( | 4 |
| 799 | stdout | - |
| 800 | , "dircolors", "GNU coreutils", Version, ("H. Peter Anvin"), (char *) | - |
| 801 | ((void *)0) | - |
| 802 | ); exit (executed 4 times by 1 test: exit ( 0 ); | 4 |
| 803 | 0executed 4 times by 1 test: exit ( 0 ); | 4 |
| 804 | );executed 4 times by 1 test: exit ( 0 ); break;never executed: break; ; | 0-4 |
| 805 | | - |
| 806 | defaultexecuted 3 times by 1 test: default: :executed 3 times by 1 test: default: | 3 |
| 807 | usage ( | - |
| 808 | 1 | - |
| 809 | ); | - |
| 810 | } never executed: end of block | 0 |
| 811 | | - |
| 812 | argc -= optind; | - |
| 813 | argv += optind; | - |
| 814 | | - |
| 815 | | - |
| 816 | | - |
| 817 | if (print_database| TRUE | never evaluated | | FALSE | evaluated 10 times by 1 test |
&& syntax != SHELL_SYNTAX_UNKNOWN| TRUE | never evaluated | | FALSE | never evaluated |
) | 0-10 |
| 818 | { | - |
| 819 | error (0, 0, | - |
| 820 | | - |
| 821 | dcgettext (((void *)0), | - |
| 822 | "the options to output dircolors' internal database and\n" "to select a shell syntax are mutually exclusive" | - |
| 823 | , 5) | - |
| 824 | | - |
| 825 | ); | - |
| 826 | usage ( | - |
| 827 | 1 | - |
| 828 | ); | - |
| 829 | } never executed: end of block | 0 |
| 830 | | - |
| 831 | if ((| TRUE | never evaluated | | FALSE | evaluated 10 times by 1 test |
!print_database) < argc| TRUE | never evaluated | | FALSE | evaluated 10 times by 1 test |
) | 0-10 |
| 832 | { | - |
| 833 | error (0, 0, | - |
| 834 | dcgettext (((void *)0), | - |
| 835 | "extra operand %s" | - |
| 836 | , 5) | - |
| 837 | , quote (argv[!print_database])); | - |
| 838 | if (print_database| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 839 | fprintf ( never executed: fprintf ( stderr , "%s\n", dcgettext (((void *)0), "file operands cannot be combined with " "--print-database (-p)" , 5) ); | 0 |
| 840 | stderr never executed: fprintf ( stderr , "%s\n", dcgettext (((void *)0), "file operands cannot be combined with " "--print-database (-p)" , 5) ); | 0 |
| 841 | , "%s\n", never executed: fprintf ( stderr , "%s\n", dcgettext (((void *)0), "file operands cannot be combined with " "--print-database (-p)" , 5) ); | 0 |
| 842 | never executed: fprintf ( stderr , "%s\n", dcgettext (((void *)0), "file operands cannot be combined with " "--print-database (-p)" , 5) ); | 0 |
| 843 | dcgettext (((void *)0), never executed: fprintf ( stderr , "%s\n", dcgettext (((void *)0), "file operands cannot be combined with " "--print-database (-p)" , 5) ); | 0 |
| 844 | "file operands cannot be combined with " "--print-database (-p)" never executed: fprintf ( stderr , "%s\n", dcgettext (((void *)0), "file operands cannot be combined with " "--print-database (-p)" , 5) ); | 0 |
| 845 | , 5) never executed: fprintf ( stderr , "%s\n", dcgettext (((void *)0), "file operands cannot be combined with " "--print-database (-p)" , 5) ); | 0 |
| 846 | never executed: fprintf ( stderr , "%s\n", dcgettext (((void *)0), "file operands cannot be combined with " "--print-database (-p)" , 5) ); | 0 |
| 847 | ); never executed: fprintf ( stderr , "%s\n", dcgettext (((void *)0), "file operands cannot be combined with " "--print-database (-p)" , 5) ); | 0 |
| 848 | usage ( | - |
| 849 | 1 | - |
| 850 | ); | - |
| 851 | } never executed: end of block | 0 |
| 852 | | - |
| 853 | if (print_database| TRUE | never evaluated | | FALSE | evaluated 10 times by 1 test |
) | 0-10 |
| 854 | { | - |
| 855 | char const *p = G_line; | - |
| 856 | while (p - G_line < sizeof G_line| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 857 | { | - |
| 858 | puts (p); | - |
| 859 | p += strlen (p) + 1; | - |
| 860 | } never executed: end of block | 0 |
| 861 | } never executed: end of block | 0 |
| 862 | else | - |
| 863 | { | - |
| 864 | | - |
| 865 | if (syntax == SHELL_SYNTAX_UNKNOWN| TRUE | evaluated 1 time by 1 test | | FALSE | evaluated 9 times by 1 test |
) | 1-9 |
| 866 | { | - |
| 867 | syntax = guess_shell_syntax (); | - |
| 868 | if (syntax == SHELL_SYNTAX_UNKNOWN| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
| 869 | { | - |
| 870 | ((!!sizeof (struct { _Static_assert ( | - |
| 871 | 1 | - |
| 872 | , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"no SHELL environment variable, and no shell type option given\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( | - |
| 873 | 1 | - |
| 874 | , 0, | - |
| 875 | dcgettext (((void *)0), | - |
| 876 | "no SHELL environment variable, and no shell type option given" | - |
| 877 | , 5) | - |
| 878 | ), (( | - |
| 879 | 0 | - |
| 880 | ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( | - |
| 881 | 1 | - |
| 882 | , 0, | - |
| 883 | dcgettext (((void *)0), | - |
| 884 | "no SHELL environment variable, and no shell type option given" | - |
| 885 | , 5) | - |
| 886 | ), (( | - |
| 887 | 0 | - |
| 888 | ) ? (void) 0 : __builtin_unreachable ())))) | - |
| 889 | ; | - |
| 890 | } never executed: end of block | 0 |
| 891 | }executed 1 time by 1 test: end of block | 1 |
| 892 | | - |
| 893 | _obstack_begin ((&lsc_obstack), 0, 0, (malloc), (free)); | - |
| 894 | if (argc == 0| TRUE | evaluated 2 times by 1 test | | FALSE | evaluated 8 times by 1 test |
) | 2-8 |
| 895 | ok = dc_parse_stream (executed 2 times by 1 test: ok = dc_parse_stream ( ((void *)0) , ((void *)0) ); | 2 |
| 896 | ((void *)0)executed 2 times by 1 test: ok = dc_parse_stream ( ((void *)0) , ((void *)0) ); | 2 |
| 897 | , executed 2 times by 1 test: ok = dc_parse_stream ( ((void *)0) , ((void *)0) ); | 2 |
| 898 | ((void *)0)executed 2 times by 1 test: ok = dc_parse_stream ( ((void *)0) , ((void *)0) ); | 2 |
| 899 | );executed 2 times by 1 test: ok = dc_parse_stream ( ((void *)0) , ((void *)0) ); | 2 |
| 900 | else | - |
| 901 | ok = dc_parse_file (argv[0]);executed 8 times by 1 test: ok = dc_parse_file (argv[0]); | 8 |
| 902 | | - |
| 903 | if (ok| TRUE | evaluated 9 times by 1 test | | FALSE | evaluated 1 time by 1 test |
) | 1-9 |
| 904 | { | - |
| 905 | size_t len = __extension__ ({ struct obstack const *__o = (&lsc_obstack); (size_t) (__o->next_free - __o->object_base); }); | - |
| 906 | char *s = __extension__ ({ struct obstack *__o1 = (&lsc_obstack); void *__value = (void *) __o1->object_base; if (__o1->next_free == __value| TRUE | evaluated 4 times by 1 test | | FALSE | evaluated 5 times by 1 test |
) __o1->maybe_empty_object = 1;executed 4 times by 1 test: __o1->maybe_empty_object = 1; __o1->next_free = ((sizeof (ptrdiff_t) < sizeof (void *)| TRUE | never evaluated | | FALSE | evaluated 9 times by 1 test |
? (__o1->object_base) : (char *) 0) + (((__o1->next_free) - (sizeof (ptrdiff_t) < sizeof (void *)| TRUE | never evaluated | | FALSE | evaluated 9 times by 1 test |
? (__o1->object_base) : (char *) 0) + (__o1->alignment_mask)) & ~(__o1->alignment_mask))); if ((| TRUE | never evaluated | | FALSE | evaluated 9 times by 1 test |
size_t) (__o1->next_free - (char *) __o1->chunk) > (size_t) (__o1->chunk_limit - (char *) __o1->chunk)| TRUE | never evaluated | | FALSE | evaluated 9 times by 1 test |
) __o1->next_free = __o1->chunk_limit;never executed: __o1->next_free = __o1->chunk_limit; __o1->object_base = __o1->next_free; __value; }); | 0-9 |
| 907 | const char *prefix; | - |
| 908 | const char *suffix; | - |
| 909 | | - |
| 910 | if (syntax == SHELL_SYNTAX_BOURNE| TRUE | evaluated 9 times by 1 test | | FALSE | never evaluated |
) | 0-9 |
| 911 | { | - |
| 912 | prefix = "LS_COLORS='"; | - |
| 913 | suffix = "';\nexport LS_COLORS\n"; | - |
| 914 | }executed 9 times by 1 test: end of block | 9 |
| 915 | else | - |
| 916 | { | - |
| 917 | prefix = "setenv LS_COLORS '"; | - |
| 918 | suffix = "'\n"; | - |
| 919 | } never executed: end of block | 0 |
| 920 | fputs_unlocked (prefix, | - |
| 921 | stdout | - |
| 922 | ); | - |
| 923 | | - |
| 924 | (__extension__ ((__builtin_constant_p ( | - |
| 925 | 1 | - |
| 926 | ) && __builtin_constant_p ( | - |
| 927 | len | - |
| 928 | ) && (size_t) ( | - |
| 929 | 1 | - |
| 930 | ) * (size_t) ( | - |
| 931 | len | - |
| 932 | ) <= 8 && (size_t) ( | - |
| 933 | 1 | - |
| 934 | ) != 0) ? ({ const char *__ptr = (const char *) ( | - |
| 935 | s | - |
| 936 | ); FILE *__stream = (stdout); size_t __cnt; for (__cnt = (size_t) ( | - |
| 937 | 1 | - |
| 938 | ) * (size_t) ( | - |
| 939 | len | - |
| 940 | ); __cnt > 0| TRUE | never evaluated | | FALSE | never evaluated |
; --__cnt) if ((| TRUE | never evaluated | | FALSE | never evaluated |
__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0)| TRUE | never evaluated | | FALSE | never evaluated |
? __overflow (__stream, (unsigned char) (*__ptr++)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (*__ptr++))) == (-1)| TRUE | never evaluated | | FALSE | never evaluated |
) break;never executed: break; ((size_t) ( | 0 |
| 941 | 1 | - |
| 942 | ) * (size_t) ( | - |
| 943 | len | - |
| 944 | ) - __cnt) / (size_t) ( | - |
| 945 | 1 | - |
| 946 | ); }) : (((__builtin_constant_p ( | - |
| 947 | 1 | - |
| 948 | ) && (size_t) ( | - |
| 949 | 1 | - |
| 950 | ) == 0) || (__builtin_constant_p ( | - |
| 951 | len | - |
| 952 | ) && (size_t) ( | - |
| 953 | len | - |
| 954 | ) == 0)) ? ((void) ( | - |
| 955 | s | - |
| 956 | ), (void) (stdout), (void) ( | - |
| 957 | 1 | - |
| 958 | ), (void) ( | - |
| 959 | len | - |
| 960 | ), (size_t) 0) : fwrite_unlocked ( | - |
| 961 | s | - |
| 962 | , | - |
| 963 | 1 | - |
| 964 | , | - |
| 965 | len | - |
| 966 | , stdout)))) | - |
| 967 | ; | - |
| 968 | fputs_unlocked (suffix, | - |
| 969 | stdout | - |
| 970 | ); | - |
| 971 | }executed 9 times by 1 test: end of block | 9 |
| 972 | }executed 10 times by 1 test: end of block | 10 |
| 973 | | - |
| 974 | returnexecuted 10 times by 1 test: return ok ? 0 : 1 ; ok ? executed 10 times by 1 test: return ok ? 0 : 1 ; | 10 |
| 975 | 0 executed 10 times by 1 test: return ok ? 0 : 1 ; | 10 |
| 976 | : executed 10 times by 1 test: return ok ? 0 : 1 ; | 10 |
| 977 | 1executed 10 times by 1 test: return ok ? 0 : 1 ; | 10 |
| 978 | ;executed 10 times by 1 test: return ok ? 0 : 1 ; | 10 |
| 979 | } | - |
| | |