]> git.cameronkatri.com Git - opendircolors.git/commitdiff
common.c: format v1.0
authorCameron Katri <me@cameronkatri.com>
Sun, 30 May 2021 20:00:50 +0000 (16:00 -0400)
committerCameron Katri <me@cameronkatri.com>
Sun, 30 May 2021 20:00:50 +0000 (16:00 -0400)
common.c

index bbabfc99b9373489059f43410b0b445fe8aa7541..56e59d37c16d6f6f96bbf5278a7fb50f23e31f0c 100644 (file)
--- a/common.c
+++ b/common.c
  */
 
 #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)