aboutsummaryrefslogtreecommitdiffstats
path: root/colorize.c
diff options
context:
space:
mode:
authorGravatar Steven Schubiger <stsc@refcnt.org> 2016-04-07 22:18:12 +0200
committerGravatar Steven Schubiger <stsc@refcnt.org> 2016-04-07 22:18:12 +0200
commit166b606b2504297f425943b855301ae97f689d7c (patch)
treedf90353dacaf65de037bddc33625674c7f924628 /colorize.c
parentb6498b9b02b352dd06b4a9cc96a37c1c17b9c779 (diff)
downloadcolorize-166b606b2504297f425943b855301ae97f689d7c.tar.gz
colorize-166b606b2504297f425943b855301ae97f689d7c.tar.bz2
Use more descriptive enumerator name
Diffstat (limited to 'colorize.c')
-rw-r--r--colorize.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/colorize.c b/colorize.c
index 16094c6..938bdd6 100644
--- a/colorize.c
+++ b/colorize.c
@@ -183,7 +183,7 @@ static const char *formats[] = {
"%s: %s: %s", /* type */
};
-enum { FOREGROUND, BACKGROUND };
+enum { GENERIC, FOREGROUND = 0, BACKGROUND };
static const struct {
struct color const *entries;
@@ -372,9 +372,9 @@ process_opts (int argc, char **argv)
unsigned int i;
exclude = xstrdup (optarg);
STACK_VAR (exclude);
- for (i = 1; i < tables[FOREGROUND].count - 1; i++) /* skip color none and default */
+ for (i = 1; i < tables[GENERIC].count - 1; i++) /* skip color none and default */
{
- const struct color *entry = &tables[FOREGROUND].entries[i];
+ const struct color *entry = &tables[GENERIC].entries[i];
if (streq (exclude, entry->name))
{
valid = true;
@@ -635,9 +635,9 @@ skip_path_colors (const char *color_string, const char *file_string, const struc
{
bool matched = false;
unsigned int i;
- for (i = 0; i < tables[FOREGROUND].count; i++)
+ for (i = 0; i < tables[GENERIC].count; i++)
{
- const struct color *entry = &tables[FOREGROUND].entries[i];
+ const struct color *entry = &tables[GENERIC].entries[i];
if (has_color_name (color, entry->name))
{
color += strlen (entry->name);