From 73142b793562158babf717422262bd1011ef17e4 Mon Sep 17 00:00:00 2001 From: Burt P Date: Mon, 6 Jan 2020 00:53:51 -0600 Subject: shell: new flag/funcs for escaping label part in keys Will allow formerly forbidden characters in a label, "#$=" See: https://github.com/lpereira/hardinfo/issues/509 Signed-off-by: Burt P --- includes/hardinfo.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'includes/hardinfo.h') diff --git a/includes/hardinfo.h b/includes/hardinfo.h index 19eb88fb..010af922 100644 --- a/includes/hardinfo.h +++ b/includes/hardinfo.h @@ -213,6 +213,13 @@ gboolean hardinfo_spawn_command_line_sync(const gchar *command_line, /* a marker in text to point out problems, using markup where possible */ const char *problem_marker(); +/* a version of g_strescape() that allows escaping extra characters. + * use with g_strcompress() as normal. */ +gchar * +gg_strescape (const gchar *source, + const gchar *exceptions, + const gchar *extra); + /* hinote helpers */ #define note_max_len 512 #define note_printf(note_buff, fmt, ...) \ -- cgit v1.2.3