commit ade65753559da61270fbb6aca863af43c534ce79
Author: Raniconduh <clagv.randomgames@gmail.com>
Date: Mon Apr 04 11:45:25 2022 +0000
diff --git a/include/opts.h b/include/opts.h
index 52de815..89526cc 100644
--- a/include/opts.h
+++ b/include/opts.h
@@ -377 +377 @@ extern int32_t media_color;
#define ARCHIVE_COLOR_VAR "archive_color"
extern int32_t archive_color;
-extern int32_t custom_colors[10];
+extern int32_t custom_colors[11];
bool check_config(void);
void create_config(void);
diff --git a/src/opts.c b/src/opts.c
index f4af8d8..c7b50d0 100644
--- a/src/opts.c
+++ b/src/opts.c
@@ -86 +87 @@
#include "opts.h"
#include "var.h"
+#include "io.h"
#define CFG_FNAME "config"
@@ -177 +187 @@ bool show_dot_files = false;
bool color = true;
bool p_long = false;
-int32_t custom_colors[10];
+int32_t custom_colors[11];
int32_t dir_color = -1;
int32_t link_color = -1;
@@ -15914 +16014 @@ void terminate_opts(void) {
void generate_colors(void) {
- custom_colors[0] = dir_color;
- custom_colors[1] = link_color;
- custom_colors[2] = exec_color;
- custom_colors[3] = sock_color;
- custom_colors[4] = fifo_color;
- custom_colors[5] = unknown_color;
- custom_colors[6] = reg_color;
- custom_colors[7] = blk_color;
- custom_colors[8] = media_color;
- custom_colors[9] = archive_color;
+ custom_colors[COLOR_DIR] = dir_color;
+ custom_colors[COLOR_LINK] = link_color;
+ custom_colors[COLOR_EXEC] = exec_color;
+ custom_colors[COLOR_SOCK] = sock_color;
+ custom_colors[COLOR_FIFO] = fifo_color;
+ custom_colors[COLOR_UNKNOWN] = unknown_color;
+ custom_colors[COLOR_FILE] = reg_color;
+ custom_colors[COLOR_BLOCK] = blk_color;
+ custom_colors[COLOR_MEDIA] = media_color;
+ custom_colors[COLOR_ARCHIVE] = archive_color;
}