{"help", no_argument, &show_help, 1},
{"version", no_argument, &show_version, 1},
{"color", optional_argument, 0, 13},
- {"colour", optional_argument, 0, 13},
{NULL, 0, NULL, 0}
};
else
state = ST_ERROR;
break;
+
+ default:
+ abort();
}
}
parse_ls_color (void)
{
const char *p; /* Pointer to character being parsed */
- char *whichvar; /* LS_COLORS or LS_COLOURS? */
char *buf; /* color_buf buffer pointer */
int state; /* State of parser */
int ind_no; /* Indicator number */
struct col_ext_type *ext2; /* Extra pointer */
strcpy (label, "??");
- if (((p = getenv (whichvar = "LS_COLORS")) != NULL && *p != '\0')
- || ((p = getenv (whichvar = "LS_COLOURS")) != NULL && *p != '\0'))
+ if (((p = getenv ("LS_COLORS")) != NULL && *p != '\0'))
{
buf = color_buf = xstrdup (p);
/* This is an overly conservative estimate, but any possible
if (state < 0)
{
- error (0, 0, _("unparsable %s variable"), whichvar);
+ struct col_ext_type *e;
+
+ error (0, 0,
+ _("unparsable value for LS_COLORS environment variable"));
free (color_buf);
- for (ext = col_ext_list; ext != NULL ; )
+ for (e = col_ext_list; e != NULL ; /* empty */)
{
- ext2 = ext;
- ext = ext->next;
+ ext2 = e;
+ e = e->next;
free (ext2);
}
print_with_color = 0;
-C list entries by columns\n\
-c sort by change time; with -l: show ctime\n\
--color[=WORD] colorize entries according to WORD\n\
- --colour[=WORD] yes, no, or tty (if output is terminal)\n\
+ yes, no, or tty (if output is terminal)\n\
-D, --dired generate output well suited to Emacs' dired mode\n\
-d, --directory list directory entries instead of contents\n\
-F, --classify append a character for typing each entry\n\