commit e534224
uint
·
2026-07-14 12:55:12 +0000 UTC
parent 75b0dec
move config.h to ./
3 files changed,
+10,
-10
R source/config.h =>
config.h
+4,
-5
1@@ -5,18 +5,18 @@
2 #include <stdint.h>
3 #include <stdlib.h>
4
5-static const char* font_path = "/home/seiko/programming/c/cterm/Xanh.bdf";
6+static const char font_path[] = "/home/seiko/programming/c/cterm/Xanh.bdf";
7
8 static const int win_width = 80; /* in columns */
9 static const int win_height = 24; /* in rows */
10-static const char* win_title = "cterm";
11+static const char win_title[] = "cterm";
12 static const int win_fps = 60;
13
14 static const int pad_x = 8;
15 static const int pad_y = 8;
16
17-static const char* shell = NULL; /* NULL uses $SHELL */
18-static const char* term_name = "vt100";
19+static const char* const shell = NULL; /* NULL uses $SHELL */
20+static const char term_name[] = "vt100";
21
22 /* AARRGGBB */
23 static const uint32_t default_fg = 0xffffffff;
24@@ -45,4 +45,3 @@ static const uint32_t color_table[16] = {
25 };
26
27 #endif /* CONFIG_H */
28-
+5,
-4
1@@ -16,7 +16,7 @@
2
3 #include <maus.h>
4
5-#include "config.h"
6+#include "../config.h"
7 #include "draw.h"
8 #include "font.h"
9 #include "term.h"
10@@ -140,10 +140,11 @@ static void init(void)
11 setenv("TERM", term_name, 1);
12
13 /* shell */
14- if (shell == NULL)
15- shell = getenv("SHELL");
16+ const char* sh = shell;
17+ if (sh == NULL)
18+ sh = getenv("SHELL");
19
20- execl(shell, shell, "-i", (char *)NULL);
21+ execl(sh, sh, "-i", (char *)NULL);
22
23 _exit(127);
24 }
+1,
-1
1@@ -5,7 +5,7 @@
2
3 #include <grapheme.h>
4
5-#include "config.h"
6+#include "../config.h"
7 #include "term.h"
8 #include "utils.h"
9