summaryrefslogtreecommitdiff
path: root/src/runtime_config.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime_config.zig')
-rw-r--r--src/runtime_config.zig23
1 files changed, 4 insertions, 19 deletions
diff --git a/src/runtime_config.zig b/src/runtime_config.zig
index bd1ba00b..69d2cdfe 100644
--- a/src/runtime_config.zig
+++ b/src/runtime_config.zig
@@ -4,22 +4,7 @@
//! data it mutates and the Config report reads. Neither contains callbacks.
const std = @import("std");
const panel_animation = @import("panel_animation.zig");
-
-/// HOW LONG A HOST-SUPPLIED ABSOLUTE PATH MAY BE, and the only reason this
-/// record was ever kilobytes: the shell a native host resolved, the font file
-/// a native picker returned, and (in pardes.zig) the one watched theme file.
-/// All three name something on a FILESYSTEM, and all three are retained
-/// inline because the core has no allocator at the point they arrive.
-///
-/// Fixed at 4095 wherever a filesystem exists — deliberately NOT derived from
-/// std.fs PATH_MAX, which web has no answer for, and 4095 rather than 4096 so
-/// the macOS C bridge's NUL fits without a second, subtly different limit at
-/// that boundary. Zero on the P4 firmware, which has no filesystem, no
-/// processes to spawn a shell for and no font picker: `Text(0)` is a
-/// zero-sized field whose `set` refuses every non-empty path, so the three
-/// producers report failure instead of storing 12 KiB nothing can fill.
-pub const host_path_cap: usize =
- if (@import("pardes_config").platform == .p4) 0 else 4095;
+const limits = @import("limits.zig");
/// Tagline glyphs retain body-cell geometry, so allowing a face larger than
/// the body would clip into neighbouring cells. Zero would make the role
@@ -64,15 +49,15 @@ pub const State = struct {
shell: struct {
requested: Text(255) = .{},
// One data schema across native, browser and freestanding builds; only
- // its one absolute-path field follows `host_path_cap`.
- effective: Text(host_path_cap) = .{},
+ // its one absolute-path field follows `limits.host_path_cap`.
+ effective: Text(limits.host_path_cap) = .{},
pending: bool = true,
} = .{},
/// The shell acknowledges a font before `effective` changes. A rejected
/// request therefore remains queryable without claiming it is on screen.
font: struct {
- requested_path: Text(host_path_cap) = .{},
+ requested_path: Text(limits.host_path_cap) = .{},
requested_name: Text(255) = .{},
effective_name: Text(255) = .{},
pending: bool = false,