summaryrefslogtreecommitdiffstats
path: root/diag.h
diff options
context:
space:
mode:
Diffstat (limited to 'diag.h')
-rw-r--r--diag.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/diag.h b/diag.h
index aa5e1c7..39129cc 100644
--- a/diag.h
+++ b/diag.h
@@ -1,6 +1,6 @@
/****************************************************************************
* bfs *
- * Copyright (C) 2019 Tavian Barnes <tavianator@tavianator.com> *
+ * Copyright (C) 2019-2022 Tavian Barnes <tavianator@tavianator.com> *
* *
* Permission to use, copy, modify, and/or distribute this software for any *
* purpose with or without fee is hereby granted. *
@@ -26,6 +26,8 @@
#include <stdarg.h>
#include <stdbool.h>
+struct bfs_expr;
+
/**
* Like perror(), but decorated like bfs_error().
*/
@@ -83,4 +85,24 @@ bool bfs_warning_prefix(const struct bfs_ctx *ctx);
*/
bool bfs_debug_prefix(const struct bfs_ctx *ctx, enum debug_flags flag);
+/**
+ * Highlight parts of the command line in an error message.
+ */
+void bfs_argv_error(const struct bfs_ctx *ctx, const bool *args);
+
+/**
+ * Highlight parts of an expression in an error message.
+ */
+void bfs_expr_error(const struct bfs_ctx *ctx, const struct bfs_expr *expr);
+
+/**
+ * Highlight parts of the command line in a warning message.
+ */
+bool bfs_argv_warning(const struct bfs_ctx *ctx, const bool *args);
+
+/**
+ * Highlight parts of an expression in a warning message.
+ */
+bool bfs_expr_warning(const struct bfs_ctx *ctx, const struct bfs_expr *expr);
+
#endif // BFS_DIAG_H