From 405848deebcb2709865c9f57b8f1b85da217e86d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Sun, 20 Sep 2020 13:24:02 +0200 Subject: [PATCH] degesch: remove unnecessary quotes from macro defs The behaviour is defined by the standard. --- degesch.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/degesch.c b/degesch.c index d25a240..ed1fb34 100644 --- a/degesch.c +++ b/degesch.c @@ -17,20 +17,20 @@ */ // A table of all attributes we use for output -#define ATTR_TABLE(XX) \ - XX( PROMPT, "prompt", "Terminal attrs for the prompt" ) \ - XX( RESET, "reset", "String to reset terminal attributes" ) \ - XX( DATE_CHANGE, "date_change", "Terminal attrs for date change" ) \ - XX( READ_MARKER, "read_marker", "Terminal attrs for the read marker" ) \ - XX( WARNING, "warning", "Terminal attrs for warnings" ) \ - XX( ERROR, "error", "Terminal attrs for errors" ) \ - XX( EXTERNAL, "external", "Terminal attrs for external lines" ) \ - XX( TIMESTAMP, "timestamp", "Terminal attrs for timestamps" ) \ - XX( HIGHLIGHT, "highlight", "Terminal attrs for highlights" ) \ - XX( ACTION, "action", "Terminal attrs for user actions" ) \ - XX( USERHOST, "userhost", "Terminal attrs for user@host" ) \ - XX( JOIN, "join", "Terminal attrs for joins" ) \ - XX( PART, "part", "Terminal attrs for parts" ) +#define ATTR_TABLE(XX) \ + XX( PROMPT, prompt, Terminal attrs for the prompt ) \ + XX( RESET, reset, String to reset terminal attributes ) \ + XX( DATE_CHANGE, date_change, Terminal attrs for date change ) \ + XX( READ_MARKER, read_marker, Terminal attrs for the read marker ) \ + XX( WARNING, warning, Terminal attrs for warnings ) \ + XX( ERROR, error, Terminal attrs for errors ) \ + XX( EXTERNAL, external, Terminal attrs for external lines ) \ + XX( TIMESTAMP, timestamp, Terminal attrs for timestamps ) \ + XX( HIGHLIGHT, highlight, Terminal attrs for highlights ) \ + XX( ACTION, action, Terminal attrs for user actions ) \ + XX( USERHOST, userhost, Terminal attrs for user@host ) \ + XX( JOIN, join, Terminal attrs for joins ) \ + XX( PART, part, Terminal attrs for parts ) enum { @@ -2480,7 +2480,7 @@ static struct config_schema g_config_behaviour[] = static struct config_schema g_config_attributes[] = { -#define XX(x, y, z) { .name = y, .comment = z, .type = CONFIG_ITEM_STRING, \ +#define XX(x, y, z) { .name = #y, .comment = #z, .type = CONFIG_ITEM_STRING, \ .on_change = on_config_attribute_change }, ATTR_TABLE (XX) #undef XX @@ -2675,7 +2675,7 @@ attr_by_name (const char *name) { static const char *table[ATTR_COUNT] = { -#define XX(x, y, z) [ATTR_ ## x] = y, +#define XX(x, y, z) [ATTR_ ## x] = #y, ATTR_TABLE (XX) #undef XX };