mirror of
https://github.com/weechat/weechat.git
synced 2026-06-29 22:36:38 +02:00
irc: add comments in functions irc_color_decode and irc_color_encode
This commit is contained in:
@@ -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++;
|
||||
|
||||
Reference in New Issue
Block a user