summaryrefslogtreecommitdiffstats
path: root/color.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2015-07-25 20:14:34 -0400
committerTavian Barnes <tavianator@tavianator.com>2015-07-25 20:14:34 -0400
commit781f5902b7bbb91811f1f810f8a419607ed36294 (patch)
tree8ff1acf48ba81b2f35190a4f3d811ad1b6bf68f7 /color.h
parente674297be6be114a530cd06d2ca773baff1ce7cc (diff)
downloadbfs-781f5902b7bbb91811f1f810f8a419607ed36294.tar.xz
Recover from errors in diropen().
Fixes #4.
Diffstat (limited to 'color.h')
-rw-r--r--color.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/color.h b/color.h
index 9bc5b5a..1432072 100644
--- a/color.h
+++ b/color.h
@@ -9,6 +9,10 @@
* the COPYING file or http://www.wtfpl.net/ for more details. *
*********************************************************************/
+#ifndef BFS_COLOR_H
+#define BFS_COLOR_H
+
+#include "bftw.h"
#include <sys/stat.h>
/**
@@ -38,9 +42,23 @@ color_table *parse_colors(char *ls_colors);
void pretty_print(const color_table *colors, const char *fpath, const struct stat *sb);
/**
+ * Pretty-print an error.
+ *
+ * @param colors
+ * The color table to use.
+ * @param fpath
+ * The file path in error.
+ * @param ftwbuf
+ * The bftw() data for fpath.
+ */
+void print_error(const color_table *colors, const char *fpath, const struct BFTW *ftwbuf);
+
+/**
* Free a color table.
*
* @param colors
* The color table to free.
*/
void free_colors(color_table *colors);
+
+#endif // BFS_COLOR_H