commit 1c839f6

shrub  ·  2026-04-20 18:32:25 +0000 UTC
parent 4f51eb3
format
4 files changed,  +18, -20
+8, -8
 1@@ -15,14 +15,14 @@ struct Style {
 2 };
 3 
 4 static const struct Style styles[] = {
 5-	{ "#0F766E", "#CCFBF1", "#F0FDFA" },
 6-	{ "#2563EB", "#DBEAFE", "#EFF6FF" },
 7-	{ "#CA8A04", "#FEF3C7", "#FFFBEB" },
 8-	{ "#C2410C", "#FED7AA", "#FFF7ED" },
 9-	{ "#9333EA", "#E9D5FF", "#FAF5FF" },
10-	{ "#BE185D", "#FBCFE8", "#FDF2F8" },
11-	{ "#4F46E5", "#C7D2FE", "#EEF2FF" },
12-	{ "#059669", "#D1FAE5", "#ECFDF5" },
13+    {"#0F766E", "#CCFBF1", "#F0FDFA"},
14+    {"#2563EB", "#DBEAFE", "#EFF6FF"},
15+    {"#CA8A04", "#FEF3C7", "#FFFBEB"},
16+    {"#C2410C", "#FED7AA", "#FFF7ED"},
17+    {"#9333EA", "#E9D5FF", "#FAF5FF"},
18+    {"#BE185D", "#FBCFE8", "#FDF2F8"},
19+    {"#4F46E5", "#C7D2FE", "#EEF2FF"},
20+    {"#059669", "#D1FAE5", "#ECFDF5"},
21 };
22 
23 static size_t styleorder[sizeof(styles) / sizeof(styles[0])];
+2, -3
 1@@ -71,7 +71,6 @@ targetmatches(const char *pat, const char *name)
 2 	return patmatches(pat, name);
 3 }
 4 
 5-
 6 /* we apply target assignments from the graphstate (gs.tas) to those specific
 7  * targets, for some target like
 8  *
 9@@ -309,7 +308,7 @@ expandgraph(struct Graph *graph)
10 				struct Recipe *nr;
11 
12 				new_recipes.v = xrealloc(new_recipes.v,
13-				    (new_recipes.n + 1) * sizeof(new_recipes.v[0]));
14+				                         (new_recipes.n + 1) * sizeof(new_recipes.v[0]));
15 				nr = &new_recipes.v[new_recipes.n++];
16 				memset(nr, 0, sizeof(*nr));
17 				nr->body = xstrdup(side_effects.v[j]);
18@@ -320,7 +319,7 @@ expandgraph(struct Graph *graph)
19 				struct Recipe *nr;
20 
21 				new_recipes.v = xrealloc(new_recipes.v,
22-				    (new_recipes.n + 1) * sizeof(new_recipes.v[0]));
23+				                         (new_recipes.n + 1) * sizeof(new_recipes.v[0]));
24 				nr = &new_recipes.v[new_recipes.n++];
25 				*nr = *r;
26 				nr->body = exp;
+8, -8
 1@@ -383,14 +383,14 @@ preprocfile(const char *path, const char *src_override, struct Pre *pre, struct
 2 				int rc;
 3 				size_t kwlen;
 4 
 5-					opt = haskw(trim, "-include") || haskw(trim, "sinclude");
 6-					kwlen = haskw(trim, "-include") || haskw(trim, "sinclude") ? 8 : 7;
 7-					incarg = trimdup(trim + kwlen, strlen(trim + kwlen));
 8-					if (isplainpath(incarg)) {
 9-						full = joinpath(dir, incarg);
10-						free(line.path);
11-						free(line.text);
12-						free(trim);
13+				opt = haskw(trim, "-include") || haskw(trim, "sinclude");
14+				kwlen = haskw(trim, "-include") || haskw(trim, "sinclude") ? 8 : 7;
15+				incarg = trimdup(trim + kwlen, strlen(trim + kwlen));
16+				if (isplainpath(incarg)) {
17+					full = joinpath(dir, incarg);
18+					free(line.path);
19+					free(line.text);
20+					free(trim);
21 					free(incarg);
22 					rc = preprocfile(full, 0, pre, inc);
23 					free(full);
+0, -1
1@@ -138,7 +138,6 @@ matchsuf(const char *suf, const char *name, char **stem)
2 	return 1;
3 }
4 
5-
6 /*
7  * expand automatic variables like so:
8  *   $@  target