X-Git-Url: https://git.cameronkatri.com/opendircolors.git/blobdiff_plain/bba67091ac18bfcf886dc1221dea218aa119618e..253429e84ebe40dc6a959dc0c60b2f89ec49b55d:/common.c diff --git a/common.c b/common.c index bbabfc9..fb96d36 100644 --- a/common.c +++ b/common.c @@ -27,10 +27,10 @@ */ #include +#include #include #include #include -#include #include "common.h" @@ -39,7 +39,6 @@ parseansi(char *ansi, struct color *color) { long long num; char *token; - const char *errstr; bool bold = false, underline = false; color->fg = 'x'; @@ -48,17 +47,17 @@ parseansi(char *ansi, struct color *color) while ((token = strsep(&ansi, ";")) != NULL) { num = strtonum(token, 0, 47, NULL); switch (num) { - case 1: - bold = true; - break; - case 4: - underline = true; - break; - default: - if (num <= 37) - color->fg = (char)((num - 30) + 97); - else if (num <= 47) - color->bg = (char)((num - 40) + 97); + case 1: + bold = true; + break; + case 4: + underline = true; + break; + default: + if (num <= 37) + color->fg = (char)((num - 30) + 97); + else if (num <= 47) + color->bg = (char)((num - 40) + 97); } } if (bold)