From aac14f28dd7cd7917f772380cd297e1a8bec62c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Tue, 25 Aug 2020 18:23:44 +0200 Subject: [PATCH] irc: add comments in functions irc_color_decode and irc_color_encode --- src/plugins/irc/irc-color.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/irc/irc-color.c b/src/plugins/irc/irc-color.c index 3919c0466..c7b4019df 100644 --- a/src/plugins/irc/irc-color.c +++ b/src/plugins/irc/irc-color.c @@ -178,6 +178,7 @@ irc_color_decode (const char *string, int keep_colors) str_bg[0] = '\0'; if (isdigit (ptr_string[0])) { + /* foreground */ str_fg[0] = ptr_string[0]; str_fg[1] = '\0'; ptr_string++; @@ -190,6 +191,7 @@ irc_color_decode (const char *string, int keep_colors) } if ((ptr_string[0] == ',') && (isdigit (ptr_string[1]))) { + /* background */ ptr_string++; str_bg[0] = ptr_string[0]; str_bg[1] = '\0'; @@ -315,6 +317,7 @@ irc_color_encode (const char *string, int keep_colors) ptr_string++; if (isdigit (ptr_string[0])) { + /* foreground */ if (keep_colors) { weechat_string_dyn_concat (out, @@ -336,6 +339,7 @@ irc_color_encode (const char *string, int keep_colors) } if (ptr_string[0] == ',') { + /* background */ if (keep_colors) weechat_string_dyn_concat (out, ",", -1); ptr_string++;