aboutsummaryrefslogtreecommitdiffstats
path: root/common.c
diff options
context:
space:
mode:
authorCameron Katri <me@cameronkatri.com>2021-05-30 16:00:50 -0400
committerCameron Katri <me@cameronkatri.com>2021-05-30 16:00:50 -0400
commita2c8c10de3e13efa996d3b294bdfe15c52379c7f (patch)
treebd3702d037c59d85fcb296ee12e89ced78be2ced /common.c
parentbba67091ac18bfcf886dc1221dea218aa119618e (diff)
downloadopendircolors-a2c8c10de3e13efa996d3b294bdfe15c52379c7f.tar.gz
opendircolors-a2c8c10de3e13efa996d3b294bdfe15c52379c7f.tar.zst
opendircolors-a2c8c10de3e13efa996d3b294bdfe15c52379c7f.zip
common.c: formatv1.0
Diffstat (limited to 'common.c')
-rw-r--r--common.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/common.c b/common.c
index bbabfc9..56e59d3 100644
--- a/common.c
+++ b/common.c
@@ -27,10 +27,10 @@
*/
#include <ctype.h>
+#include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <err.h>
#include "common.h"
@@ -48,17 +48,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)