From 970174b0897d40b804808632784ffa1544d9da93 Mon Sep 17 00:00:00 2001 From: Burt P Date: Sun, 21 Oct 2018 13:03:06 -0500 Subject: don't use html in text-only output Fixes https://github.com/lpereira/hardinfo/issues/266 This is also needed so that vendor urls can be links where appropriate. Signed-off-by: Burt P --- modules/network.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'modules/network.c') diff --git a/modules/network.c b/modules/network.c index f27a159a..fa61ddca 100644 --- a/modules/network.c +++ b/modules/network.c @@ -106,8 +106,13 @@ void scan_statistics(gboolean reload) gchar *tmp = buffer; while (*tmp && isspace(*tmp)) tmp++; - - __statistics = h_strdup_cprintf(" #%d=%s\n", + /* the bolded-space/dot used here is a hardinfo shell hack */ + if (params.html_ok) + __statistics = h_strdup_cprintf(" #%d=%s\n", + __statistics, + line++, tmp); + else + __statistics = h_strdup_cprintf(">#%d=%s\n", __statistics, line++, tmp); } -- cgit v1.2.3