Repository navigation
Expand file tree
/
Copy pathflows.html
More file actions
368 lines (365 loc) · 107 KB
/
Copy pathflows.html
File metadata and controls
368 lines (365 loc) · 107 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>miniOS: architecture and execution flows</title>
<style>
:root{--bg:#0b0f17;--panel:#111827;--panel2:#0f172a;--line:#1f2937;--text:#e5e7eb;--muted:#94a3b8;--accent:#22d3ee;--accent2:#38bdf8;--bad:#f87171;--good:#34d399;--chip:#1e293b;--fv-box:#111c2e;--fv-entry:#0b3a4a;--fv-ext:#1d1838;--fv-cycle:#2a1630;--fv-dec:#1e1b4b;--fv-stop:#3f1d1d;--fv-hub:#0b3b2e;--fv-purple:#a78bfa;--fv-pink:#f472b6}
:root[data-theme="light"]{--bg:#f8fafc;--panel:#ffffff;--panel2:#f1f5f9;--line:#e2e8f0;--text:#0f172a;--muted:#475569;--accent:#0891b2;--accent2:#0284c7;--bad:#b91c1c;--good:#047857;--chip:#e2e8f0;--fv-box:#eef6ff;--fv-entry:#cffafe;--fv-ext:#f3e8ff;--fv-cycle:#fce7f3;--fv-dec:#ede9fe;--fv-stop:#fee2e2;--fv-hub:#d1fae5;--fv-purple:#7c3aed;--fv-pink:#db2777}
@media (prefers-color-scheme: light){:root:not([data-theme="dark"]){--bg:#f8fafc;--panel:#ffffff;--panel2:#f1f5f9;--line:#e2e8f0;--text:#0f172a;--muted:#475569;--accent:#0891b2;--accent2:#0284c7;--bad:#b91c1c;--good:#047857;--chip:#e2e8f0;--fv-box:#eef6ff;--fv-entry:#cffafe;--fv-ext:#f3e8ff;--fv-cycle:#fce7f3;--fv-dec:#ede9fe;--fv-stop:#fee2e2;--fv-hub:#d1fae5;--fv-purple:#7c3aed;--fv-pink:#db2777}}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:15px/1.55 system-ui,-apple-system,Segoe UI,Roboto,sans-serif}
a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}code{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:13px}
header{display:flex;gap:14px;align-items:center;padding:12px 20px;border-bottom:1px solid var(--line);background:var(--panel);position:sticky;top:0;z-index:5}
header h1{font-size:17px;margin:0}header .sp{margin-left:auto}header button{background:var(--chip);color:var(--text);border:1px solid var(--line);border-radius:8px;padding:5px 10px;cursor:pointer}
main{padding:12px 24px 60px;max-width:1500px;margin:0 auto}
.fv-card{background:var(--panel);border:1px solid var(--line);border-radius:12px;margin:18px 0;overflow:hidden}
.fv-head{padding:14px 16px 6px}
.fv-head h3{margin:0 0 4px;font-size:17px}
.fv-meta{color:var(--muted);font-size:13px;margin:2px 0}
.fv-cap{color:var(--muted);font-size:13.5px;margin:6px 0 0;max-width:980px}
.fv-bar{display:flex;flex-wrap:wrap;gap:6px;padding:8px 16px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);background:var(--panel2);align-items:center}
.fv-bar button{background:var(--chip);color:var(--text);border:1px solid var(--line);border-radius:7px;padding:4px 10px;cursor:pointer;font-size:13px}
.fv-bar button:hover{border-color:var(--accent)}
.fv-bar .fv-hint{color:var(--muted);font-size:12px;margin-left:auto}
.fv-stage{position:relative;overflow:hidden;cursor:grab;background:var(--bg);touch-action:none}
.fv-stage.drag{cursor:grabbing}
.fv-stage svg{position:absolute;left:0;top:0;transform-origin:0 0;user-select:none}
.fv-card.full{position:fixed;inset:0;z-index:50;margin:0;border-radius:0;display:flex;flex-direction:column}
.fv-card.full .fv-stage{flex:1;height:auto!important}
.fv-panel{position:absolute;right:10px;top:10px;width:min(380px,calc(100% - 20px));max-height:calc(100% - 20px);overflow:auto;background:var(--panel);border:1px solid var(--accent);border-radius:10px;padding:12px 14px;box-shadow:0 14px 40px rgba(0,0,0,.45);display:none;font-size:13.5px;cursor:auto}
.fv-panel.open{display:block}
.fv-panel h4{margin:0 0 6px;font-size:15px;word-break:break-word}
.fv-panel pre{white-space:pre-wrap;margin:6px 0}
.fv-panel table{width:100%;border-collapse:collapse;font-size:12.5px}
.fv-panel td{border-top:1px solid var(--line);padding:4px 4px;vertical-align:top}
.fv-panel .x{float:right;cursor:pointer;color:var(--muted);border:0;background:none;font-size:16px}
.fv-svg-text{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.fv-node{cursor:pointer}
.fv-node:hover .fv-shape{stroke-width:2.6}
.fv-dim .fv-edge,.fv-dim .fv-node{opacity:.18}
.fv-dim .fv-on{opacity:1}
.fv-toc{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}
.fv-toc a{background:var(--chip);border-radius:999px;padding:3px 11px;font-size:13px}
#rm-cfg-scrim{position:fixed;inset:0;z-index:90;background:rgba(2,6,23,.6);opacity:0;pointer-events:none;transition:opacity .2s}
#rm-cfg-scrim.open{opacity:1;pointer-events:auto}
#rm-cfg-modal{position:fixed;z-index:91;top:50%;left:50%;transform:translate(-50%,-50%) scale(.98);width:min(560px,calc(100vw - 32px));max-height:min(82vh,760px);overflow:auto;background:var(--mask,var(--panel,#0b1224));color:var(--ink,var(--text,#f8fafc));border:1px solid var(--accent,#22d3ee);border-radius:14px;padding:18px 20px;box-shadow:0 24px 70px rgba(0,0,0,.5);display:none}
#rm-cfg-modal.open{display:block;transform:translate(-50%,-50%) scale(1)}
#rm-cfg-modal h2{margin:0 0 4px;font-size:16px}
#rm-cfg-modal .rm-cfg-sub{color:var(--muted,#94a3b8);font-size:12px;margin:0 0 12px;line-height:1.6}
#rm-cfg-modal .rm-cfg-row{display:grid;grid-template-columns:150px minmax(0,1fr);gap:10px;align-items:center;padding:7px 0;border-top:1px solid var(--border,var(--line,#1e293b))}
#rm-cfg-modal label{font-size:12px;font-weight:600}
#rm-cfg-modal .rm-cfg-help{font-size:11px;color:var(--muted,#94a3b8);grid-column:1/-1;margin:-4px 0 0}
#rm-cfg-modal input[type="number"],#rm-cfg-modal input[type="text"],#rm-cfg-modal select,#rm-cfg-modal textarea{width:100%;background:var(--canvas,var(--bg,#020617));border:1px solid var(--border,var(--line,#1e293b));border-radius:8px;color:var(--ink,var(--text,#f8fafc));padding:6px 8px;font:inherit;font-size:12px}
#rm-cfg-modal textarea{resize:vertical;min-height:56px;line-height:1.5}
#rm-cfg-modal .rm-cfg-sec{margin:14px 0 2px;font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--muted,#94a3b8)}
.rm-home-icon{width:12px;height:12px;flex:none;vertical-align:-1px}
a.home .rm-home-icon{margin-right:5px}
#rm-cfg-modal input[type="checkbox"]{width:18px;height:18px;accent-color:var(--accent,#22d3ee)}
#rm-cfg-modal .rm-cfg-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
#rm-cfg-modal .rm-cfg-actions button{font-size:12px;border-radius:9px;padding:7px 12px;cursor:pointer}
#rm-cfg-status{font-size:11.5px;color:var(--muted,#94a3b8);margin-top:10px;min-height:18px}
@media (prefers-reduced-motion:reduce){#rm-cfg-scrim,#rm-cfg-modal{transition:none}}
:root{--accent:#22d3ee;--accent2:#f472b6}header a.home{border:1px solid var(--line);border-radius:8px;padding:5px 10px;font-size:13px}header a.home svg{width:12px;height:12px;vertical-align:-1px}</style>
</head>
<body>
<header><h1>miniOS: architecture and execution flows</h1><span class="sp"></span><button id="fv-theme" title="Toggle dark and light theme">Theme</button><button type="button" data-rm-config title="Viewer config (no reload)">Config</button></header>
<main><p class="fv-cap">Every diagram is computed from the source with zero tokens and laid out offline: tiers come from a feedback-arc-set ordering of the component graph, flows from the resolved call graph and the Python syntax tree. Click any box for its signature, docs, and files.</p><div id="fv-host"></div></main>
<script type="application/json" id="fv-data">{"graphs":[{"id":"architecture","title":"Tiered architecture","kind":"architecture","caption":"Each box is a component (a community of files). Arrows go from the dependent to the dependency, so the top tier orchestrates and the bottom tier is the foundation. Arrow labels count imports; thick arrows are the heaviest quarter. Red dashed arrows point upward: they are the smallest set of imports that creates every cycle and breaks the layering. Click a component to list its files.","w":1077.6,"h":932.0,"meta":{"lane_titles":{"0":"Tier 1 - entry / orchestration","1":"Tier 2","2":"Tier 3","3":"Tier 4 - foundation"},"stats":{"components":17,"edges":17,"reduced":4,"cycles":[["headers: kernel","progs/doomgeneric: d_englsh","progs/src","progs/doomgeneric: p_spec","tools: tls_crypto","headers: vga_fb","progs/doomgeneric: net_defs"]],"tiers":4,"entry_components":[]},"upward":[["headers: kernel","tools: tls_crypto",2],["headers: kernel","headers: vga_fb",2],["progs/src","headers: kernel",1],["progs/src","progs/doomgeneric: d_englsh",3],["progs/src","progs/doomgeneric: p_spec",1],["progs/doomgeneric: p_spec","progs/doomgeneric: d_englsh",63],["tools: tls_crypto","progs/doomgeneric: d_englsh",2],["progs/doomgeneric: net_defs","progs/doomgeneric: d_englsh",12],["progs/doomgeneric: net_defs","progs/doomgeneric: p_spec",2]]},"lanes":[{"t":"Tier 1 - entry / orchestration","y":18.0,"h":401.0},{"t":"Tier 2","y":455.0,"h":131.0},{"t":"Tier 3","y":622.0,"h":131.0},{"t":"Tier 4 - foundation","y":789.0,"h":131.0}],"nodes":[{"id":"c1","t":"progs/doomgeneric: d_englsh","l":["98 files, 2045 symbols","Core / utility","key: doomtype.h, z_zone.h, i_system.h"],"s":"component","o":"cycle","d":{"kind":"component","summary":"98 files, 2045 symbols; imports out 104, imported 80 times; part of an import cycle","layers":[["utility",92],["infrastructure",6]],"files":[{"f":"progs/doomgeneric/doomtype.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":50,"n":14},{"f":"progs/doomgeneric/z_zone.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":40,"n":13},{"f":"progs/doomgeneric/i_system.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":38,"n":12},{"f":"progs/doomgeneric/w_wad.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":27,"n":17},{"f":"progs/doomgeneric/m_misc.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":25,"n":14},{"f":"progs/doomgeneric/m_argv.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":24,"n":7},{"f":"progs/doomgeneric/deh_main.h","p":"Copyright(C) 2005-2014 Simon Howard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.","i":19,"n":12},{"f":"progs/doomgeneric/i_video.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":18,"n":41},{"f":"progs/doomgeneric/doomkeys.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":17,"n":59},{"f":"progs/doomgeneric/v_video.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":15,"n":27},{"f":"progs/doomgeneric/i_swap.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":14,"n":8},{"f":"progs/doomgeneric/d_event.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":13,"n":4},{"f":"progs/doomgeneric/g_game.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":11,"n":22},{"f":"progs/doomgeneric/config.h","p":"config.hin.","i":11,"n":16},{"f":"progs/doomgeneric/doomgeneric.h","p":"","i":11,"n":10},{"f":"progs/doomgeneric/dstrings.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":11,"n":5},{"f":"progs/doomgeneric/doomfeatures.h","p":"Copyright(C) 2005-2014 Simon Howard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.","i":11,"n":2},{"f":"progs/doomgeneric/i_timer.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":9,"n":7},{"f":"progs/doomgeneric/m_config.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":7,"n":12},{"f":"progs/doomgeneric/deh_str.h","p":"Copyright(C) 2005-2014 Simon Howard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.","i":7,"n":11},{"f":"progs/doomgeneric/st_stuff.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":6,"n":19},{"f":"progs/doomgeneric/hu_stuff.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":6,"n":17},{"f":"progs/doomgeneric/d_main.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":6,"n":8},{"f":"progs/doomgeneric/m_controls.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":5,"n":119},{"f":"progs/doomgeneric/i_sound.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":5,"n":30},{"f":"progs/doomgeneric/am_map.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":5,"n":8},{"f":"progs/doomgeneric/m_cheat.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":5,"n":7},{"f":"progs/doomgeneric/m_menu.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":5,"n":7},{"f":"progs/doomgeneric/i_joystick.h","p":"Copyright(C) 2005-2014 Simon Howard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.","i":4,"n":18},{"f":"progs/doomgeneric/p_saveg.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":4,"n":16},{"f":"progs/doomgeneric/d_iwad.h","p":"Copyright(C) 2005-2014 Simon Howard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.","i":4,"n":14},{"f":"progs/doomgeneric/w_file.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":3,"n":7},{"f":"progs/doomgeneric/wi_stuff.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":3,"n":5},{"f":"progs/doomgeneric/statdump.h","p":"","i":3,"n":3},{"f":"progs/doomgeneric/st_lib.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":2,"n":14},{"f":"progs/doomgeneric/f_finale.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":2,"n":4},{"f":"progs/doomgeneric/f_wipe.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":2,"n":4},{"f":"progs/doomgeneric/p_setup.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":2,"n":3},{"f":"progs/doomgeneric/w_checksum.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":2,"n":2},{"f":"progs/doomgeneric/w_main.h","p":"Copyright(C) 2005-2014 Simon Howard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.","i":2,"n":1}]},"x":158.1,"y":96.5,"w":268.2,"h":81.0},{"id":"c4","t":"tools: tls_crypto","l":["30 files, 583 symbols","Core / utility","key: time.c, tls.h, tls_port.h"],"s":"component","o":"cycle","d":{"kind":"component","summary":"30 files, 583 symbols; imports out 11, imported 2 times; part of an import cycle","layers":[["utility",28],["infrastructure",2]],"files":[{"f":"kernel/time.c","p":"================================================================","i":33,"n":4},{"f":"headers/tls.h","p":"========== TLS 1.2 client (RFC 5246) ==========","i":6,"n":73},{"f":"headers/tls_port.h","p":"Portability shim between the MiniOS kernel and the host-side test","i":5,"n":49},{"f":"progs/lua/minios.c","p":"","i":4,"n":17},{"f":"headers/ktime.h","p":"ktime.h -- pure time-conversion helpers shared by the kernel clock","i":3,"n":3},{"f":"mcp/minios_addons.py","p":"MiniOS addon marketplace (lazyaddons-style).","i":1,"n":16},{"f":"progs/micropython/variants/minios/lib/mip.py","p":"mip.py -- MiniOS package installer (frozen module).","i":1,"n":15},{"f":"headers/tls_roots.h","p":"tls_roots.h - embedded CA roots (DER), generated by mkroots.sh.","i":1,"n":0},{"f":"net/tls_crypto.c","p":"tls_crypto.c - the crypto behind the kernel TLS 1.2 client.","i":0,"n":78},{"f":"progs/src/lxabi.c","p":"lxabi.c - Linux process, thread and descriptor ABI probe (FreeDom","i":0,"n":61},{"f":"mcp/minios_mcp.py","p":"MiniOS MCP bridge.","i":0,"n":51},{"f":"tools/minios_hyper.py","p":"minios_hyper.py -- host-side ring-minus-one debugger for MiniOS.","i":0,"n":51},{"f":"net/tls.c","p":"tls.c - TLS 1.2 client sessions for MiniOS.","i":0,"n":27},{"f":"net/tls_x509.c","p":"tls_x509.c - minimal X.509 DER parsing and chain verification.","i":0,"n":23},{"f":"progs/tls_u/tls_u_port.c","p":"tls_u_port.c - ring-3 transport for the shared TLS stack (TLS_RING3).","i":0,"n":15},{"f":"tools/boot_wl.py","p":"boot_wl.py - boot the miniOS Wayland-mini desktop in one step.","i":0,"n":15},{"f":"progs/src/lxsel.c","p":"lxsel.c -- select(2)/pselect6(2) ABI probe (docs/spec/python.md).","i":0,"n":11},{"f":"tools/repro_gui.py","p":"repro_gui.py — reproduce the VGA/mouse state bug after ring-3 programs.","i":0,"n":10},{"f":"progs/doomgeneric/doomgeneric_xlib.c","p":"","i":0,"n":9},{"f":"tools/minios_gui.py","p":"minios_gui.py — inject VGA-mode input and capture the framebuffer.","i":0,"n":9},{"f":"mcp/mcp_dbg_driver.py","p":"Debug driver: boot MiniOS through the MCP bridge and run freedom.","i":0,"n":6},{"f":"mcp/mcp_dogfood.py","p":"Dogfood: drive minios_mcp.py over stdio JSON-RPC and install the freedom addon from a git repo, then browse with the installed binary.","i":0,"n":6},{"f":"tools/minios_cli.py","p":"minios_cli.py — drive MiniOS through the MCP bridge, not by hand.","i":0,"n":6},{"f":"tools/probe_compute_vga.py","p":"Docstring: VGA liveness probe during CPU-bound ring-3 compute.","i":0,"n":6},{"f":"tools/probe_minicraft.py","p":"probe_minicraft.py -- numeric minicraft probe without any PNG.","i":0,"n":6},{"f":"progs/tls_u/tls_u_main.c","p":"tlsget - minimal HTTPS GET over the ring-3 TLS stack.","i":0,"n":5},{"f":"tools/gdb_repro.py","p":"gdb_repro.py — drive a graphics-program sequence under the GDB stub.","i":0,"n":4},{"f":"tools/qga_client.py","p":"Minimal QEMU guest agent client for MiniOS.","i":0,"n":4},{"f":"progs/src/shell.py","p":"shell.py -- pybash: a Python shell layer on top of MiniOS's C shell.","i":0,"n":3},{"f":"progs/micropython/variants/minios/lib/hello.py","p":"hello.py -- frozen demo: runs at import time as a smoke test.","i":0,"n":0}]},"x":437.2,"y":96.5,"w":222.0,"h":81.0},{"id":"c5","t":"headers: vga_fb","l":["20 files, 516 symbols","Core / utility","key: wm_window.h, wm_events.h,..."],"s":"component","o":"cycle","d":{"kind":"component","summary":"20 files, 516 symbols; imports out 8, imported 2 times; part of an import cycle","layers":[["utility",16],["presentation",2],["data_access",1],["infrastructure",1]],"files":[{"f":"headers/wm_window.h","p":"Docstring: Unified window contract for the MiniOS desktop.","i":4,"n":10},{"f":"headers/wm_events.h","p":"Docstring: Window event contract for the MiniOS desktop.","i":3,"n":39},{"f":"headers/vga_fx.h","p":"Docstring: DOOM-melt desktop effect contract for MiniOS.","i":3,"n":25},{"f":"headers/wm_layout.h","p":"Docstring: Unified layout contract for the MiniOS desktop.","i":3,"n":16},{"f":"headers/wm_geom.h","p":"Docstring: Window geometry contract for the MiniOS desktop.","i":3,"n":11},{"f":"headers/wm_chrome.h","p":"Docstring: Window chrome pixel math for the MiniOS desktop.","i":2,"n":15},{"f":"headers/wm_gfxview.h","p":"Docstring: Graphics-window view contract for the MiniOS desktop.","i":2,"n":15},{"f":"headers/wm_jelly.h","p":"Docstring: Wobbly-window spring mesh contract for the MiniOS desktop.","i":2,"n":14},{"f":"headers/wm_dock.h","p":"Docstring: Dock magnification math for the MiniOS desktop.","i":2,"n":13},{"f":"headers/wm_blur.h","p":"Docstring: Frosted-glass box blur for the MiniOS desktop.","i":2,"n":12},{"f":"headers/kernel/vga_cursor.h","p":"Docstring: vga_cursor.h -- boundary of the pointer sprite layer","i":2,"n":9},{"f":"headers/wm_focus.h","p":"Docstring: Focus manager contract for the MiniOS desktop.","i":2,"n":5},{"f":"headers/wm_render.h","p":"Docstring: Render pipeline contract for the MiniOS desktop.","i":2,"n":5},{"f":"headers/wm_tiling.h","p":"Docstring: Tiling layout contract for the MiniOS desktop.","i":2,"n":3},{"f":"headers/desktop_shortcuts.h","p":"desktop_shortcuts.h -- configurable desktop icon shortcuts.","i":1,"n":27},{"f":"headers/desktop_icons.h","p":"desktop_icons.h -- embedded icon pixel data for desktop shortcuts.","i":1,"n":3},{"f":"headers/avatar_data.h","p":"Docstring: Desktop profile avatar, generated by tools/gen_avatar.py.","i":1,"n":2},{"f":"kernel/vga_fb.c","p":"","i":0,"n":270},{"f":"kernel/vga_cursor.c","p":"Docstring: Hardware pointer sprite layer (kernel/vga_cursor.c).","i":0,"n":13},{"f":"kernel/vga_fx.c","p":"DOOM-melt desktop effects (see headers/vga_fx.h for the contract).","i":0,"n":9}]},"x":703.1,"y":96.5,"w":241.8,"h":81.0},{"id":"c0","t":"headers: kernel","l":["113 files, 4068 symbols","Core / utility","key: sched.h, vga_fb.h, minifs.h"],"s":"component","o":"cycle","d":{"kind":"component","summary":"113 files, 4068 symbols; imports out 15, imported 12 times; part of an import cycle","layers":[["utility",86],["infrastructure",27]],"files":[{"f":"headers/sched.h","p":"Forward: full view lives in kernel.h (needs KFILE first); the PCB","i":28,"n":158},{"f":"headers/vga_fb.h","p":"Framebuffer geometry.","i":19,"n":159},{"f":"headers/minifs.h","p":"MiniFS: a minimal Unix-like filesystem for MiniOS.","i":15,"n":77},{"f":"headers/arch/x86/boot/bootdefs.h","p":"bootdefs.h - centralized configuration for the MiniOS two-stage boot path.","i":14,"n":157},{"f":"headers/driver.h","p":"driver.h -- Strategy pattern for hardware drivers (thesis correction 2).","i":10,"n":16},{"f":"headers/net.h","p":"========== Fixed slirp configuration (QEMU -nic user) ==========","i":9,"n":103},{"f":"headers/spinlock.h","p":"spinlock.h -- Lightweight spinlock for MiniOS kernel.","i":9,"n":19},{"f":"headers/pcache.h","p":"Docstring: pcache.h -- page cache for MiniFS, slice 1 (store only).","i":9,"n":17},{"f":"headers/arch/x86/hal_io.h","p":"Docstring: x86 port I/O hardware abstraction contract.","i":8,"n":69},{"f":"headers/drivers/xhci.h","p":"Docstring: drivers/xhci.h -- boundary of the xHCI host controller driver.","i":8,"n":51},{"f":"headers/vma.h","p":"","i":8,"n":26},{"f":"headers/sync.h","p":"sync.h -- Blocking synchronization primitives (roadmap Phase 3.1).","i":7,"n":38},{"f":"headers/drivers/kbd.h","p":"Keyboard layout: US qwerty (default) or Spanish (Spain) qwerty.","i":7,"n":24},{"f":"headers/block.h","p":"Block device abstraction for MiniFS.","i":7,"n":14},{"f":"headers/arch/x86/msr.h","p":"Model-Specific Register access for x86-64.","i":7,"n":9},{"f":"headers/drivers/pci.h","p":"Docstring: drivers/pci.h -- PCI configuration-space access.","i":6,"n":54},{"f":"headers/ide.h","p":"IDE/ATA PIO driver for MiniOS.","i":6,"n":35},{"f":"headers/sb16.h","p":"Sound Blaster 16 DMA audio driver contract.","i":6,"n":28},{"f":"headers/proc_sec.h","p":"Docstring: proc_sec.h -- per-process security state behind the Linux","i":6,"n":12},{"f":"headers/tlb.h","p":"tlb.h - cross-CPU TLB shootdown (docs/spec/smp-sched.md, \"TLB shootdown\").","i":6,"n":7},{"f":"headers/rtc.h","p":"","i":6,"n":6},{"f":"headers/ldso.h","p":"Docstring: headers/ldso.h -- minimal dynamic-linking (T8 ld.so) contract.","i":5,"n":45},{"f":"headers/drivers/usbhid.h","p":"Docstring: drivers/usbhid.h -- boundary of the USB HID boot-protocol driver.","i":5,"n":33},{"f":"headers/pcm2.h","p":"pcm2.h -- low-latency PCM audio path over SB16 single-cycle DMA.","i":5,"n":21},{"f":"headers/percpu_rq.h","p":"Docstring: percpu_rq.h -- Per-CPU runqueues with work stealing.","i":5,"n":14},{"f":"headers/drivers/usbblk.h","p":"Docstring: drivers/usbblk.h -- boundary of the USB mass-storage driver.","i":5,"n":13},{"f":"headers/smp.h","p":"SMP bring-up: wake the application processors (APs) via the LAPIC INIT/SIPI","i":5,"n":12},{"f":"headers/fsimg.h","p":"fsimg.h -- One image backend for read-only filesystem drivers.","i":5,"n":6},{"f":"headers/kernel.h","p":"The user-window memory layout (load base, stack, brk cap, graphics","i":4,"n":412},{"f":"headers/futex.h","p":"Docstring: futex.h -- Fast userspace mutex sleep/wake contract.","i":4,"n":28},{"f":"headers/rcu.h","p":"Docstring: rcu.h -- Read-copy-update, lite epoch edition.","i":4,"n":17},{"f":"headers/fat32.h","p":"fat32.h -- Read-only FAT32 loopback driver over ramdisk/MiniFS images.","i":4,"n":16},{"f":"headers/ext4.h","p":"ext4.h -- Read-only ext4 loopback/device driver.","i":4,"n":15},{"f":"headers/drivers/modifiers.h","p":"Docstring: Unified modifier tracking for cooked and raw paths.","i":4,"n":11},{"f":"headers/spawn.h","p":"Docstring: Scalar shared-window view saved across a child run.","i":4,"n":9},{"f":"headers/wm_notify.h","p":"Docstring: Focus event bus for the MiniOS desktop.","i":4,"n":9},{"f":"headers/drivers/virtio_blk.h","p":"Docstring: drivers/virtio_blk.h -- virtio-blk boundary.","i":4,"n":7},{"f":"headers/sanitize.h","p":"Docstring: sanitize.h -- Single choke point for syscall argument checks.","i":4,"n":5},{"f":"headers/lz4_kernel.h","p":"","i":4,"n":4},{"f":"drivers/xhci.c","p":"xhci.c -- xHCI host controller driver, polled event ring.","i":3,"n":209}]},"x":570.1,"y":533.5,"w":235.2,"h":81.0},{"id":"c3","t":"progs/doomgeneric: p_spec","l":["67 files, 1027 symbols","Core / utility","key: doomdef.h, doomstat.h, p_local.h"],"s":"component","o":"cycle","d":{"kind":"component","summary":"67 files, 1027 symbols; imports out 71, imported 80 times; part of an import cycle","layers":[["utility",64],["data_access",2],["infrastructure",1]],"files":[{"f":"progs/doomgeneric/doomdef.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":41,"n":9},{"f":"progs/doomgeneric/doomstat.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":34,"n":68},{"f":"progs/doomgeneric/p_local.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":24,"n":91},{"f":"progs/doomgeneric/sounds.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":23,"n":3},{"f":"progs/doomgeneric/s_sound.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":22,"n":15},{"f":"progs/doomgeneric/r_state.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":17,"n":45},{"f":"progs/doomgeneric/r_local.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":15,"n":1},{"f":"progs/doomgeneric/m_random.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":13,"n":4},{"f":"progs/doomgeneric/m_fixed.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":9,"n":6},{"f":"progs/doomgeneric/r_data.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":7,"n":7},{"f":"progs/doomgeneric/m_bbox.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":7,"n":3},{"f":"progs/doomgeneric/tables.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":6,"n":21},{"f":"progs/doomgeneric/r_sky.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":6,"n":6},{"f":"progs/doomgeneric/d_mode.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":6,"n":3},{"f":"progs/doomgeneric/deh_misc.h","p":"Copyright(C) 2005-2014 Simon Howard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.","i":5,"n":49},{"f":"progs/doomgeneric/d_loop.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":4,"n":10},{"f":"progs/doomgeneric/info.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":4,"n":6},{"f":"progs/doomgeneric/d_player.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":4,"n":5},{"f":"progs/doomgeneric/p_mobj.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":4,"n":3},{"f":"progs/doomgeneric/r_defs.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":3,"n":25},{"f":"progs/doomgeneric/d_think.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":3,"n":4},{"f":"progs/doomgeneric/r_main.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":2,"n":36},{"f":"progs/doomgeneric/r_draw.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":2,"n":32},{"f":"progs/doomgeneric/hu_lib.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":2,"n":24},{"f":"progs/doomgeneric/r_things.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":2,"n":22},{"f":"progs/doomgeneric/r_plane.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":2,"n":15},{"f":"progs/doomgeneric/doomdata.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":2,"n":11},{"f":"progs/doomgeneric/p_pspr.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":2,"n":4},{"f":"progs/doomgeneric/d_items.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":2,"n":3},{"f":"progs/doomgeneric/v_patch.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":2,"n":2},{"f":"progs/doomgeneric/p_inter.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":2,"n":1},{"f":"progs/doomgeneric/r_bsp.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":1,"n":20},{"f":"progs/doomgeneric/r_segs.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":1,"n":2},{"f":"progs/doomgeneric/info.c","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":0,"n":74},{"f":"progs/doomgeneric/p_enemy.c","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":0,"n":68},{"f":"progs/doomgeneric/p_pspr.c","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":0,"n":35},{"f":"progs/quake2generic/q2generic_minios.c","p":"q2generic_minios.c - MiniOS platform layer for quake2generic.","i":0,"n":34},{"f":"progs/doomgeneric/p_map.c","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":0,"n":24},{"f":"progs/doomgeneric/hu_lib.c","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":0,"n":22},{"f":"progs/doomgeneric/p_mobj.c","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":0,"n":21}]},"x":158.1,"y":533.5,"w":268.2,"h":81.0},{"id":"c6","t":"progs/doomgeneric: net_defs","l":["13 files, 140 symbols","Core / utility","key: net_defs.h, d_ticcmd.h, sha1.h"],"s":"component","o":"cycle","d":{"kind":"component","summary":"13 files, 140 symbols; imports out 16, imported 10 times; part of an import cycle","layers":[["utility",11],["infrastructure",1],["data_access",1]],"files":[{"f":"progs/doomgeneric/net_defs.h","p":"Copyright(C) 2005-2014 Simon Howard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.","i":9,"n":28},{"f":"progs/doomgeneric/d_ticcmd.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":6,"n":2},{"f":"progs/doomgeneric/sha1.h","p":"Copyright(C) 2005-2014 Simon Howard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.","i":5,"n":9},{"f":"progs/doomgeneric/net_client.h","p":"Copyright(C) 2005-2014 Simon Howard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.","i":2,"n":21},{"f":"progs/doomgeneric/net_query.h","p":"Copyright(C) 2005-2014 Simon Howard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.","i":2,"n":12},{"f":"progs/doomgeneric/net_io.h","p":"Copyright(C) 2005-2014 Simon Howard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.","i":1,"n":9},{"f":"progs/doomgeneric/net_server.h","p":"Copyright(C) 2005-2014 Simon Howard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.","i":1,"n":6},{"f":"progs/doomgeneric/net_loop.h","p":"Copyright(C) 2005-2014 Simon Howard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.","i":1,"n":3},{"f":"progs/doomgeneric/net_gui.h","p":"Copyright(C) 2005-2014 Simon Howard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.","i":1,"n":2},{"f":"progs/doomgeneric/net_sdl.h","p":"Copyright(C) 2005-2014 Simon Howard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.","i":1,"n":2},{"f":"progs/doomgeneric/sha1.c","p":"sha1.c - SHA1 hash function","i":0,"n":19},{"f":"progs/doomgeneric/d_loop.c","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":0,"n":18},{"f":"progs/doomgeneric/net_packet.h","p":"Copyright(C) 2005-2014 Simon Howard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.","i":0,"n":9}]},"x":158.1,"y":700.5,"w":255.0,"h":81.0},{"id":"c2","t":"progs/src","l":["67 files, 2555 symbols","Core / utility","key: string.c, minios_abi.h,..."],"s":"component","o":"cycle","d":{"kind":"component","summary":"67 files, 2555 symbols; imports out 5, imported 42 times; part of an import cycle","layers":[["utility",65],["presentation",1],["infrastructure",1]],"files":[{"f":"kernel/string.c","p":"string.c -- Kernel string and memory functions.","i":91,"n":18},{"f":"progs/minios_abi.h","p":"minios_abi.h -- Single source of truth for the MiniOS user-kernel ABI.","i":32,"n":156},{"f":"progs/nuklear/nuklear_minios.h","p":"nuklear_minios.h — MiniOS platform layer for Nuklear.","i":8,"n":29},{"f":"progs/nuklear/nuklear_theme.h","p":"Docstring: shared Nuklear theme contract for every MiniOS NK app.","i":8,"n":13},{"f":"progs/nk_palette.h","p":"nk_palette.h - one shared hybrid palette for every NK-window app.","i":5,"n":9},{"f":"progs/wl/wl_mini.h","p":"wl_mini.h - Wayland-mini subset contract (header-only, ADR-0024).","i":4,"n":111},{"f":"progs/wl/wl_mbox.h","p":"wl_mbox.h - Mailbox file transport for Wayland-mini (ADR-0026).","i":4,"n":26},{"f":"headers/seccomp_bpf.h","p":"Docstring: seccomp_bpf.h -- classic BPF checker and interpreter for","i":3,"n":58},{"f":"headers/leakcheck.h","p":"Docstring: allocation tracker for MiniOS, STB leakcheck lineage.","i":3,"n":24},{"f":"progs/minios_png.h","p":"Docstring: shared ring-3 PNG helpers for MiniOS apps (progs/minios_png.h).","i":3,"n":21},{"f":"progs/src/mthreads.h","p":"mthreads.h -- Minimal pthread-like threads for MiniOS ELFs (roadmap","i":3,"n":20},{"f":"progs/file/file_assoc.h","p":"Docstring: dynamic association table for the MiniOS file browser.","i":3,"n":17},{"f":"headers/sign.h","p":"Docstring: sign.h -- MiniOS binary signing contract.","i":3,"n":14},{"f":"progs/freedomui/ps2_keymap.h","p":"ps2_keymap.h - pure PS/2 set 1 scancode to keysym translator (US layout).","i":3,"n":13},{"f":"headers/abi.h","p":"Docstring: abi.h -- Boot-time ABI manifest gate contract.","i":3,"n":10},{"f":"progs/wl/wl_pixbuf.h","p":"Docstring: heap pixel store for the Wayland-mini server.","i":2,"n":18},{"f":"headers/select_map.h","p":"Docstring: select_map.h -- fd_set \u003c-\u003e pollfd translation for select(2).","i":2,"n":16},{"f":"headers/arena.h","p":"Docstring: bump arena for MiniOS, kernel and ring-3 alike.","i":2,"n":15},{"f":"headers/httpd.h","p":"Docstring: httpd.h -- Minimal static HTTP/1.0 server contract.","i":2,"n":10},{"f":"headers/pcm_ring.h","p":"pcm_ring.h -- single-producer/single-consumer byte ring for PCM audio.","i":2,"n":7},{"f":"progs/nuklear/cvm_emit.h","p":"cvm_emit.h — node-graph compiler for CVM (cvm2 module format v2).","i":2,"n":6},{"f":"progs/wl/wl_client.h","p":"wl_client.h - Thin mailbox client for Wayland-mini (ADR-0026).","i":2,"n":5},{"f":"progs/src/freedom_wl.c","p":"freedom_wl - Wayland to MiniOS intermediate layer for FreeDom.","i":1,"n":62},{"f":"progs/freedomui/freedomui_minios.c","p":"freedomui_minios - Real FreeDom browser on MiniOS, DOOM/Q2G pattern.","i":1,"n":44},{"f":"headers/audio.h","p":"Unified audio API for MiniOS.","i":1,"n":18},{"f":"progs/src/opl3.c","p":"","i":1,"n":18},{"f":"progs/doomgeneric/memio.h","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":1,"n":10},{"f":"progs/vedit/vedit.c","p":"vedit IDE build and run contract.","i":0,"n":245},{"f":"progs/minicraft/minicraft.c","p":"minicraft.c - Minecraft-like voxel walker for MiniOS (ring 3, static ELF).","i":0,"n":237},{"f":"progs/topogpt3/topogpt3.c","p":"","i":0,"n":128},{"f":"progs/pokemon/platform_minios.c","p":"","i":0,"n":111},{"f":"progs/doomedit/doomedit.c","p":"doomedit.c - tile map editor that builds playable Doom PWADs.","i":0,"n":108},{"f":"progs/lisp/lisp.c","p":"","i":0,"n":105},{"f":"progs/freedomui/ps2_keymap.c","p":"ps2_keymap.c - pure PS/2 set 1 scancode to keysym translator (US layout).","i":0,"n":82},{"f":"progs/file/file.c","p":"Docstring: MiniOS file browser (Nuklear ring-3 app, MiniFS: file/file.elf).","i":0,"n":65},{"f":"progs/piano/piano.c","p":"piano.c — a Nuklear piano that plays FM sound through the SB16 driver.","i":0,"n":65},{"f":"progs/src/freedom.c","p":"freedom - a headless text browser for MiniOS.","i":0,"n":61},{"f":"progs/nuklear/cvm_emit.c","p":"cvm_emit.c — node-graph to CVM bytecode compiler.","i":0,"n":56},{"f":"progs/paint/paint.c","p":"Docstring: MiniOS paint program (Nuklear ring-3 app, MiniFS: paint/paint.elf).","i":0,"n":53},{"f":"progs/nuklear/nuklear_minios.c","p":"nuklear_minios.c — MiniOS platform layer for Nuklear.","i":0,"n":52}]},"x":364.1,"y":867.5,"w":228.6,"h":81.0},{"id":"d:tools","t":"tools","l":["36 files, 254 symbols","Core / utility","key: update_sources.py,..."],"s":"component","o":"default","d":{"kind":"component","summary":"36 files, 254 symbols; imports out 0, imported 0 times","layers":[["utility",34],["data_access",1],["presentation",1]],"files":[{"f":"tools/update_sources.py","p":"Update the sibling source checkouts MiniOS builds against.","i":0,"n":33},{"f":"tools/mkfs.minifs.py","p":"mkfs.minifs.py - Create a MiniFS filesystem image for MiniOS.","i":0,"n":23},{"f":"tools/sign_elf.py","p":"Sign MiniOS user binaries with Ed25519 (development key).","i":0,"n":23},{"f":"tools/minifs_saves.py","p":"minifs_saves.py - preserve the guest's saves/ dir across image rebuilds.","i":0,"n":21},{"f":"tools/gen_avatar.py","p":"Generate the desktop profile avatar as a C header.","i":0,"n":19},{"f":"tools/minifs_fsck.py","p":"minifs_fsck.py - Check MiniFS filesystem consistency.","i":0,"n":19},{"f":"tools/wm_layout_sync.py","p":"Docstring: Synchronize the WM layout manifest from source truth.","i":0,"n":17},{"f":"tools/minifs_dump.py","p":"minifs_dump.py - Dump/inspect a MiniFS filesystem image.","i":0,"n":12},{"f":"tools/check_syscall_sanitize.py","p":"Scoped audit gate for syscall user-pointer sanitization.","i":0,"n":8},{"f":"tools/kernel_feature_survey.py","p":"kernel_feature_survey.py - verify which C features the MiniOS kernel needs.","i":0,"n":8},{"f":"tools/check_mutant_anchors.py","p":"Verify every mutate.sh mutant anchor matches its target file.","i":0,"n":6},{"f":"tools/check_abi_numbers.py","p":"check_abi_numbers.py -- MiniOS syscall numbers vs Linux x86-64 truth.","i":0,"n":5},{"f":"tools/check_surprising.py","p":"check_surprising.py -- Detect surprising architectural connections.","i":0,"n":5},{"f":"tools/clip_bridge.py","p":"Host to MiniOS clipboard bridge plan builder.","i":0,"n":5},{"f":"tools/lisp_scoped.sh","p":"Docstring: Scoped Lisp validation for the MiniOS interpreter contract.","i":0,"n":5},{"f":"tools/mutate.sh","p":"Mutation testing for MiniOS.","i":0,"n":5},{"f":"tools/check_cohesion.py","p":"check_cohesion.py -- Architectural cohesion gate for MiniOS CI.","i":0,"n":4},{"f":"tools/check_spin_discipline.py","p":"Check spinlock call-site discipline across kernel C sources.","i":0,"n":4},{"f":"tools/gen_desktop_pngs.py","p":"gen_desktop_pngs.py -- build MiniOS desktop art from user-supplied PNGs.","i":0,"n":4},{"f":"tools/wl_scoped.sh","p":"Docstring: Scoped Wayland-mini validation for the tiled ring-3 compositor.","i":0,"n":4},{"f":"tools/check_complexity.py","p":"check_complexity.py -- Kernel complexity gate for MiniOS CI.","i":0,"n":3},{"f":"tools/gen_icons.py","p":"gen_icons.py -- generate 32x32 RGBA PNG icon files for the MiniOS desktop.","i":0,"n":3},{"f":"tools/mkramdisk.py","p":"Build a MiniOS ramdisk image from files in a directory tree.","i":0,"n":3},{"f":"tools/check_addons.py","p":"check_addons.py -- validate the MiniOS addon marketplace index.","i":0,"n":2},{"f":"tools/check_kb_sync.py","p":"check_kb_sync.py -- Verify KNOWLEDGE_BASE.md is in sync with code.","i":0,"n":2},{"f":"tools/gen_zip_fixtures.py","p":"gen_zip_fixtures.py -- generate the zip test fixtures shipped on the ramdisk.","i":0,"n":2},{"f":"tools/make_usb.sh","p":"Build the MiniOS bootable USB image and optionally write it to a device.","i":0,"n":2},{"f":"tools/mkcpyzip.py","p":"mkcpyzip.py -- pack a CPython Lib tree into a zipimport stdlib.","i":0,"n":2},{"f":"tools/mkvocab.py","p":"Build progs/topogpt3/vocab.bin from the GPT-2 encoder.json.","i":0,"n":2},{"f":"tools/wm_scoped.sh","p":"Docstring: Scoped WM validation for Alt-Tab and tile across all windows.","i":0,"n":2},{"f":"tools/mkpak1.py","p":"Build baseq2/pak1.pak carrying the player model.","i":0,"n":1},{"f":"tools/boot_run.sh","p":"boot_run.sh -- boot the MiniOS image in QEMU and drive the shell over the serial console with a list of commands, capturing the full transcript.","i":0,"n":0},{"f":"tools/extract_shell.py","p":"tools/extract_shell.py -- Plan for Phase 6.1 shell extraction.","i":0,"n":0},{"f":"tools/gen_minifs.py","p":"Generate minifs.c for MiniOS.","i":0,"n":0},{"f":"tools/install.sh","p":"","i":0,"n":0},{"f":"tools/mkroots.sh","p":"mkroots.sh - regenerate tls_roots.h from the DER files in tls_roots_src/.","i":0,"n":0}]},"x":955.8,"y":96.5,"w":195.6,"h":81.0},{"id":"d:progs","t":"progs","l":["50 files, 813 symbols","Core / utility","key: freedom.s, sign.s, sign.c"],"s":"component","o":"default","d":{"kind":"component","summary":"50 files, 813 symbols; imports out 0, imported 0 times","layers":[["utility",48],["presentation",2]],"files":[{"f":"progs/asm/freedom.s","p":"","i":0,"n":92},{"f":"progs/asm/sign.s","p":"","i":0,"n":85},{"f":"progs/src/sign.c","p":"sign.c - in-OS Ed25519 code signer for MiniOS secure boot.","i":0,"n":83},{"f":"progs/src/aes.c","p":"aes.c - command path AES-256-CTR encryption tools: aes and unaes.","i":0,"n":54},{"f":"progs/src/lzss.c","p":"lzss.c - command path LZSS (de)compression tools: lzss and unlzss.","i":0,"n":48},{"f":"progs/micropython/variants/minios/mpconfigvariant.h","p":"","i":0,"n":46},{"f":"progs/src/json.c","p":"json.c - command path JSON tool: validate, pretty-print and query.","i":0,"n":41},{"f":"progs/src/mtop.c","p":"mtop.c - ASCII real-time system monitor for MiniOS.","i":0,"n":39},{"f":"progs/asm/mtop.s","p":"","i":0,"n":36},{"f":"progs/asm/json.s","p":"","i":0,"n":32},{"f":"progs/asm/aes.s","p":"","i":0,"n":30},{"f":"progs/asm/lzss.s","p":"","i":0,"n":30},{"f":"progs/src/lz4.c","p":"lz4.c - command path LZ4 (de)compression tools: lz4 and unlz4.","i":0,"n":26},{"f":"progs/src/spin.c","p":"","i":0,"n":19},{"f":"progs/src/forktest.c","p":"","i":0,"n":14},{"f":"progs/src/http.c","p":"Minimal HTTP/1.0 GET through the Linux socket syscalls.","i":0,"n":13},{"f":"progs/src/aslr.c","p":"aslr -- userspace ASLR probe (self-exec chain).","i":0,"n":10},{"f":"progs/src/ftest.c","p":"Exercises the kernel libc surface used by loaded .o programs:","i":0,"n":9},{"f":"progs/src/cp.c","p":"","i":0,"n":8},{"f":"progs/src/pcmap.c","p":"pcmap probe: file-backed MAP_PRIVATE mmap shares text.","i":0,"n":8},{"f":"progs/asm/lz4.s","p":"","i":0,"n":7},{"f":"progs/src/burn.c","p":"burn -- SMP mixed-workload probe: brk plus mmap plus CPU burn with","i":0,"n":7},{"f":"progs/src/lxhello.c","p":"","i":0,"n":7},{"f":"progs/src/execho.c","p":"execho -- fork(57) + execve(59) + wait4(61) probe.","i":0,"n":6},{"f":"progs/src/pollready.c","p":"","i":0,"n":6},{"f":"progs/src/mmreuse.c","p":"mmap/munmap reclaim stress test.","i":0,"n":5},{"f":"progs/src/mprot.c","p":"mprotect probe.","i":0,"n":5},{"f":"progs/src/mvrn.c","p":"mvrn -- rename(82) syscall probe.","i":0,"n":5},{"f":"progs/asm/cvmfmt.s","p":"","i":0,"n":4},{"f":"progs/src/execthr.c","p":"execthr -- execve kills sibling threads (Linux semantics).","i":0,"n":4},{"f":"progs/asm/fib.s","p":"","i":0,"n":3},{"f":"progs/asm/http.s","p":"","i":0,"n":3},{"f":"progs/doomgeneric/m_random.c","p":"Copyright(C) 1993-1996 Id Software, Inc.","i":0,"n":3},{"f":"progs/src/cpl.c","p":"Ring-3 privilege probe.","i":0,"n":3},{"f":"progs/src/kmem.c","p":"Kernel-pointer rejection probe.","i":0,"n":3},{"f":"progs/src/nx.c","p":"NX probe.","i":0,"n":3},{"f":"progs/asm/cp.s","p":"","i":0,"n":2},{"f":"progs/asm/ldhello.s","p":"","i":0,"n":2},{"f":"progs/asm/w1.s","p":"","i":0,"n":2},{"f":"progs/doomgeneric/doom.h","p":"","i":0,"n":2}]},"x":184.5,"y":231.5,"w":222.0,"h":81.0},{"id":"d:mcp","t":"mcp","l":["2 files, 1 symbols","Core / utility","key: mutate_mcp.sh, __init__.py"],"s":"component","o":"default","d":{"kind":"component","summary":"2 files, 1 symbols; imports out 0, imported 0 times","layers":[["utility",2]],"files":[{"f":"mcp/mutate_mcp.sh","p":"Mutation testing for the MiniOS MCP bridge.","i":0,"n":1},{"f":"mcp/__init__.py","p":"","i":0,"n":0}]},"x":443.8,"y":231.5,"w":228.6,"h":81.0},{"id":"d:kernel","t":"kernel","l":["7 files, 83 symbols","Core / utility","key: cvm_host.c, printf.c,..."],"s":"component","o":"default","d":{"kind":"component","summary":"7 files, 83 symbols; imports out 0, imported 0 times","layers":[["utility",7]],"files":[{"f":"kernel/cvm_host.c","p":"","i":0,"n":45},{"f":"kernel/printf.c","p":"================================================================","i":0,"n":10},{"f":"kernel/scrollback.c","p":"scrollback.c - Console scrollback ring buffer.","i":0,"n":8},{"f":"kernel/symtab.c","p":"================================================================","i":0,"n":7},{"f":"kernel/klog.c","p":"klog.c - Structured kernel logging with levels and subsystems.","i":0,"n":6},{"f":"kernel/clip.c","p":"Docstring: kernel/clip.c -- Shared text clipboard.","i":0,"n":4},{"f":"kernel/redirect.c","p":"================================================================","i":0,"n":3}]},"x":699.8,"y":231.5,"w":215.4,"h":81.0},{"id":"d:fs","t":"fs","l":["2 files, 35 symbols","Core / utility","key: ramdisk.c, zip.c"],"s":"component","o":"default","d":{"kind":"component","summary":"2 files, 35 symbols; imports out 0, imported 0 times","layers":[["utility",2]],"files":[{"f":"fs/ramdisk.c","p":"================================================================","i":0,"n":25},{"f":"fs/zip.c","p":"zip.c — the unzip/zip shell builtins over the miniz zip library.","i":0,"n":10}]},"x":922.8,"y":231.5,"w":162.6,"h":81.0},{"id":"d:arch","t":"arch","l":["2 files, 10 symbols","Core / utility","key: ctx_sw.S, tlb_nmi.S"],"s":"component","o":"default","d":{"kind":"component","summary":"2 files, 10 symbols; imports out 0, imported 0 times","layers":[["utility",2]],"files":[{"f":"arch/x86/ctx_sw.S","p":"","i":0,"n":9},{"f":"arch/x86/tlb_nmi.S","p":"","i":0,"n":1}]},"x":358.7,"y":366.5,"w":182.4,"h":81.0},{"id":"d:(root)","t":"(root)","l":["1 files, 2 symbols","Core / utility","key: bootloader.c"],"s":"component","o":"default","d":{"kind":"component","summary":"1 files, 2 symbols; imports out 0, imported 0 times","layers":[["utility",1]],"files":[{"f":"bootloader.c","p":"","i":0,"n":2}]},"x":555.3,"y":366.5,"w":142.8,"h":81.0},{"id":"c9","t":"tools: doom_pwad","l":["1 files, 25 symbols","Core / utility","key: doom_pwad.py"],"s":"component","o":"default","d":{"kind":"component","summary":"1 files, 25 symbols; imports out 0, imported 0 times","layers":[["utility",1]],"files":[{"f":"tools/doom_pwad.py","p":"doom_pwad.py - grid map to vanilla Doom PWAD writer and checker.","i":3,"n":25}]},"x":735.4,"y":366.5,"w":149.4,"h":81.0},{"id":"c8","t":"headers: tick","l":["2 files, 27 symbols","Core / utility","key: tick.h, tick.c"],"s":"component","o":"default","d":{"kind":"component","summary":"2 files, 27 symbols; imports out 0, imported 1 times","layers":[["utility",2]],"files":[{"f":"headers/tick.h","p":"Docstring: Tick listener bus contract.","i":3,"n":16},{"f":"kernel/tick.c","p":"Docstring: Tick listener bus implementation.","i":0,"n":11}]},"x":570.1,"y":700.5,"w":149.4,"h":81.0},{"id":"c7","t":"headers: batch","l":["2 files, 13 symbols","Core / utility","key: batch.h, batch.c"],"s":"component","o":"default","d":{"kind":"component","summary":"2 files, 13 symbols; imports out 0, imported 1 times","layers":[["utility",2]],"files":[{"f":"headers/batch.h","p":"Docstring: batch.h -- Batched synchronous syscall submission.","i":3,"n":12},{"f":"kernel/batch.c","p":"Docstring: kernel/batch.c -- Ordered batch executor.","i":0,"n":1}]},"x":760.2,"y":700.5,"w":162.6,"h":81.0}],"edges":[{"s":"c0","t":"c2","l":"9","y":"heavy","p":[[570.1,574.0],[570.1,700.5],[364.1,700.5],[364.1,827.0]]},{"s":"c0","t":"c7","l":"1","y":"solid","p":[[570.1,574.0],[570.1,617.0],[760.2,617.0],[760.2,660.0]]},{"s":"c0","t":"c8","l":"1","y":"solid","p":[[570.1,574.0],[570.1,617.0],[570.1,617.0],[570.1,660.0]]},{"s":"c1","t":"c3","l":"77","y":"heavy","p":[[158.1,137.0],[158.1,315.0],[158.1,315.0],[158.1,493.0]]},{"s":"c3","t":"c6","l":"4","y":"solid","p":[[158.1,574.0],[158.1,617.0],[158.1,617.0],[158.1,660.0]]},{"s":"c4","t":"c0","l":"3","y":"solid","p":[[437.2,137.0],[437.2,315.0],[570.1,315.0],[570.1,493.0]]},{"s":"c5","t":"c0","l":"8","y":"heavy","p":[[703.1,137.0],[703.1,315.0],[570.1,315.0],[570.1,493.0]]},{"s":"c6","t":"c2","l":"2","y":"solid","p":[[158.1,741.0],[158.1,784.0],[364.1,784.0],[364.1,827.0]]},{"s":"c0","t":"c4","l":"2 upward","y":"upward","p":[[687.8,533.5],[727.8,533.5],[727.8,96.5],[548.2,96.5]]},{"s":"c0","t":"c5","l":"2 upward","y":"upward","p":[[687.8,533.5],[890.0,533.5],[890.0,96.5],[824.0,96.5]]},{"s":"c2","t":"c0","l":"1 upward","y":"upward","p":[[478.4,867.5],[779.8,867.5],[779.8,533.5],[687.8,533.5]]},{"s":"c2","t":"c1","l":"3 upward","y":"upward","p":[[478.4,867.5],[596.4,867.5],[596.4,96.5],[292.2,96.5]]},{"s":"c2","t":"c3","l":"1 upward","y":"upward","p":[[478.4,867.5],[622.4,867.5],[622.4,533.5],[292.2,533.5]]},{"s":"c3","t":"c1","l":"63 upward","y":"upward","p":[[292.2,533.5],[462.2,533.5],[462.2,96.5],[292.2,96.5]]},{"s":"c4","t":"c1","l":"2 upward","y":"upward","p":[[548.2,96.5],[744.2,96.5],[744.2,96.5],[292.2,96.5]]},{"s":"c6","t":"c1","l":"12 upward","y":"upward","p":[[285.6,700.5],[514.2,700.5],[514.2,96.5],[292.2,96.5]]},{"s":"c6","t":"c3","l":"2 upward","y":"upward","p":[[285.6,700.5],[332.2,700.5],[332.2,533.5],[292.2,533.5]]}],"participants":[],"messages":[]},{"id":"calltree:bootloader.c::main","title":"Call tree of bootloader.main","kind":"calltree","caption":"Read left to right: every arrow is a call, numbered in the order it happens inside the caller. Dashed arrows reach a function already expanded elsewhere; red arrows are recursion. Same-file functions are blue, other files purple. Click a box for its signature and docs.","w":186.0,"h":139.0,"meta":{"entry":"bootloader.main","file":"bootloader.c","line":21,"score":11,"reasons":["`main` in a compiled-language file","entry-style name `main`"]},"lanes":[],"nodes":[{"id":"bootloader.c::main","t":"bootloader.main","l":["bootloader.c:21"],"s":"box","o":"entry","d":{"kind":"function","file":"bootloader.c","line":21,"qual":"main","sig":"void main(void)","doc":""},"x":93.0,"y":49.5,"w":138.0,"h":51.0}],"edges":[{"s":"bootloader.c::main","t":"bootloader.c::main","l":"recursion","y":"back","p":[[93.0,75.0],[93.0,115.0],[93.0,115.0],[93.0,75.0]]}],"participants":[],"messages":[]},{"id":"calltree:progs/doomedit/doomedit.c::main","title":"Call tree of doomedit.main","kind":"calltree","caption":"Read left to right: every arrow is a call, numbered in the order it happens inside the caller. Dashed arrows reach a function already expanded elsewhere; red arrows are recursion. Same-file functions are blue, other files purple. Click a box for its signature and docs.","w":2100.2,"h":1181.0,"meta":{"entry":"doomedit.main","file":"progs/doomedit/doomedit.c","line":2246,"score":11,"reasons":["`main` in a compiled-language file","entry-style name `main`"]},"lanes":[],"nodes":[{"id":"progs/doomedit/doomedit.c::main","t":"doomedit.main","l":["doomedit.c:2246"],"s":"box","o":"entry","d":{"kind":"function","file":"progs/doomedit/doomedit.c","line":2246,"qual":"main","sig":"int main(int argc, char **argv)","doc":""},"x":85.5,"y":64.5,"w":123.0,"h":51.0},{"id":"progs/doomedit/doomedit.c::dmap_selftest","t":"doomedit.dmap_selftest","l":["/** Headless demo room shared by","--demo and the selftest build check.","doomedit.c:2122"],"s":"box","o":"default","d":{"kind":"function","file":"progs/doomedit/doomedit.c","line":2122,"qual":"dmap_selftest","sig":"static int dmap_selftest(void)","doc":"/** Headless demo room shared by --demo and the selftest build check."},"x":331.8,"y":64.5,"w":261.6,"h":81.0},{"id":"progs/nuklear/nuklear_minios.h::nk_minios_font","t":"nuklear_minios.nk_minios_font","l":["Hybrid palette: indices 0-14 are the","desktop colors (kept so the desktop *","behind the window never recolors);..."],"s":"box","o":"external","d":{"kind":"function","file":"progs/nuklear/nuklear_minios.h","line":63,"qual":"nk_minios_font","sig":"struct nk_user_font nk_minios_font(void);","doc":"Hybrid palette: indices 0-14 are the desktop colors (kept so the desktop * behind the window never recolors); 15-255 are the UI ramp."},"x":654.0,"y":64.5,"w":268.2,"h":81.0},{"id":"progs/nuklear/nuklear_minios.h::nk_sys_vga_mode","t":"nuklear_minios.nk_sys_vga_mode","l":["nuklear_minios.h:45"],"s":"box","o":"external","d":{"kind":"function","file":"progs/nuklear/nuklear_minios.h","line":45,"qual":"nk_sys_vga_mode","sig":"long nk_sys_vga_mode(int on);","doc":""},"x":654.0,"y":279.5,"w":252.0,"h":51.0},{"id":"progs/nuklear/nuklear_minios.h::nk_sys_kbd_raw","t":"nuklear_minios.nk_sys_kbd_raw","l":["nuklear_minios.h:44"],"s":"box","o":"external","d":{"kind":"function","file":"progs/nuklear/nuklear_minios.h","line":44,"qual":"nk_sys_kbd_raw","sig":"long nk_sys_kbd_raw(int on);","doc":""},"x":654.0,"y":479.5,"w":244.4,"h":51.0},{"id":"progs/nuklear/nuklear_minios.h::nk_build_palette","t":"nuklear_minios.nk_build_palette","l":["Hybrid palette: indices 0-14 are the","desktop colors (kept so the desktop *","behind the window never recolors);..."],"s":"box","o":"external","d":{"kind":"function","file":"progs/nuklear/nuklear_minios.h","line":57,"qual":"nk_build_palette","sig":"void nk_build_palette(unsigned char *pal768);","doc":"Hybrid palette: indices 0-14 are the desktop colors (kept so the desktop * behind the window never recolors); 15-255 are the UI ramp."},"x":654.0,"y":579.5,"w":268.2,"h":81.0},{"id":"progs/nuklear/nuklear_minios.h::nk_sys_palette","t":"nuklear_minios.nk_sys_palette","l":["nuklear_minios.h:43"],"s":"box","o":"external","d":{"kind":"function","file":"progs/nuklear/nuklear_minios.h","line":43,"qual":"nk_sys_palette","sig":"long nk_sys_palette(const unsigned char *pal768);","doc":""},"x":654.0,"y":679.5,"w":244.4,"h":51.0},{"id":"progs/doomedit/doomedit.c::dmap_new","t":"doomedit.dmap_new","l":["case DMAP_RSUIT: case DMAP_CMAP: case","DMAP_LAMP: return nk_rgb(200, 90,","200); case DMAP_KEYB: case DMAP_KEY..."],"s":"box","o":"default","d":{"kind":"function","file":"progs/doomedit/doomedit.c","line":639,"qual":"dmap_new","sig":"static void dmap_new(void)","doc":"case DMAP_RSUIT: case DMAP_CMAP: case DMAP_LAMP: return nk_rgb(200, 90, 200); case DMAP_KEYB: case DMAP_KEYR: case DMAP_KEYY: return nk_rgb(240, 240, 240); case DMAP_DOOR: return nk_rgb(220, 140, 40); case DMAP_DARK: return nk_rgb(40, 40, 56); case DMAP_NUKE: return nk_rgb(60, 160, 60); default: return nk_rgb(64, 64, 64); } } /** Fill the grid with floor and a solid border."},"x":1281.2,"y":122.0,"w":274.8,"h":81.0},{"id":"progs/doomedit/doomedit.c::dmap_push_history","t":"doomedit.dmap_push_history","l":["doomedit.c:272"],"s":"box","o":"default","d":{"kind":"function","file":"progs/doomedit/doomedit.c","line":272,"qual":"dmap_push_history","sig":"static void dmap_push_history(void)","doc":""},"x":1610.0,"y":122.0,"w":221.6,"h":51.0},{"id":"kernel/string.c::memcpy","t":"string.memcpy","l":["Docstring: ISO C entry points the","compiler itself emits calls to for","struct copies and large initializer..."],"s":"box","o":"external","d":{"kind":"function","file":"kernel/string.c","line":104,"qual":"memcpy","sig":"void *memcpy(void *dst, const void *src, unsigned long n)","doc":"Docstring: ISO C entry points the compiler itself emits calls to for struct copies and large initializers, even under -ffreestanding."},"x":1938.8,"y":122.0,"w":274.8,"h":81.0},{"id":"progs/nuklear/nuklear_minios.h::nk_rasterize","t":"nuklear_minios.nk_rasterize","l":["Hybrid palette: indices 0-14 are the","desktop colors (kept so the desktop *","behind the window never recolors);..."],"s":"box","o":"external","d":{"kind":"function","file":"progs/nuklear/nuklear_minios.h","line":66,"qual":"nk_rasterize","sig":"void nk_rasterize(struct nk_context *ctx);","doc":"Hybrid palette: indices 0-14 are the desktop colors (kept so the desktop * behind the window never recolors); 15-255 are the UI ramp."},"x":654.0,"y":779.5,"w":268.2,"h":81.0},{"id":"progs/nuklear/nuklear_minios.h::nk_rgb_available","t":"nuklear_minios.nk_rgb_available","l":["RGB companion buffer (R,G,B byte","order, NK_W x NK_H).","nuklear_minios.h:33"],"s":"box","o":"external","d":{"kind":"function","file":"progs/nuklear/nuklear_minios.h","line":33,"qual":"nk_rgb_available","sig":"int nk_rgb_available(void);","doc":"RGB companion buffer (R,G,B byte order, NK_W x NK_H)."},"x":654.0,"y":894.5,"w":259.6,"h":81.0},{"id":"progs/nuklear/nuklear_minios.h::nk_sys_nk_frame","t":"nuklear_minios.nk_sys_nk_frame","l":["nuklear_minios.h:52"],"s":"box","o":"external","d":{"kind":"function","file":"progs/nuklear/nuklear_minios.h","line":52,"qual":"nk_sys_nk_frame","sig":"long nk_sys_nk_frame(int *origin);","doc":""},"x":654.0,"y":994.5,"w":252.0,"h":51.0},{"id":"progs/nuklear/nuklear_minios.h::nk_sys_fb_info","t":"nuklear_minios.nk_sys_fb_info","l":["nuklear_minios.h:46"],"s":"box","o":"external","d":{"kind":"function","file":"progs/nuklear/nuklear_minios.h","line":46,"qual":"nk_sys_fb_info","sig":"long nk_sys_fb_info(int *w, int *h, int *pitch);","doc":""},"x":967.6,"y":64.5,"w":244.4,"h":51.0},{"id":"progs/doomedit/doomedit.c::dmap_demo_room","t":"doomedit.dmap_demo_room","l":["nk_set_window_origin(origin[0],","origin[1]); nk_clear(\u0026ctx); { unsigned","t0 = (unsigned)nk_sys_time_ms(); wh..."],"s":"box","o":"default","d":{"kind":"function","file":"progs/doomedit/doomedit.c","line":2110,"qual":"dmap_demo_room","sig":"static void dmap_demo_room(void)","doc":"nk_set_window_origin(origin[0], origin[1]); nk_clear(\u0026ctx); { unsigned t0 = (unsigned)nk_sys_time_ms(); while ((unsigned)nk_sys_time_ms() - t0 \u003c DMAP_FRAME_MS) __asm__ volatile(\"pause\"); } } nk_free(\u0026ctx); nk_sys_kbd_raw(0); nk_sys_vga_mode(0); } /** Headless demo room shared by --demo and the selftest build check."},"x":654.0,"y":179.5,"w":274.8,"h":81.0},{"id":"progs/doomedit/doomedit.c::dmap_build_wad","t":"doomedit.dmap_build_wad","l":["Compile the grid into a vanilla multi-","sector E1M1 PWAD image.","doomedit.c:1343"],"s":"box","o":"default","d":{"kind":"function","file":"progs/doomedit/doomedit.c","line":1343,"qual":"dmap_build_wad","sig":"static int dmap_build_wad(int *size_out)","doc":"Compile the grid into a vanilla multi-sector E1M1 PWAD image."},"x":654.0,"y":379.5,"w":274.8,"h":81.0},{"id":"progs/doomedit/doomedit.c::dmap_validate","t":"doomedit.dmap_validate","l":["dmap_sec_floor[nsec] = DMAP_FLOOR_H;","dmap_sec_ceil[nsec] = DMAP_CEIL_H;","dmap_sec_flat[nsec] = DMAP_FLOOR_FL..."],"s":"box","o":"default","d":{"kind":"function","file":"progs/doomedit/doomedit.c","line":1244,"qual":"dmap_validate","sig":"static int dmap_validate(char *msg, int max)","doc":"dmap_sec_floor[nsec] = DMAP_FLOOR_H; dmap_sec_ceil[nsec] = DMAP_CEIL_H; dmap_sec_flat[nsec] = DMAP_FLOOR_FLAT; dmap_sec_light[nsec] = DMAP_LIGHT; dmap_sec_special[nsec] = 0; dmap_sec_skin[nsec] = DMAP_WALL_MID; } nsec++; } dmap_nsectors = nsec; return 0; } /** Validate the map, reporting the first problem for the status line."},"x":1281.2,"y":379.5,"w":274.8,"h":81.0},{"id":"progs/doomedit/doomedit.c::dmap_walkable","t":"doomedit.dmap_walkable","l":["__asm__ volatile(\"syscall\" : \"=a\"(ret)",": \"a\"(MINIOS_SYS_VGA_MODE),","\"D\"((long)on) : \"rcx\", \"r11\",..."],"s":"box","o":"default","d":{"kind":"function","file":"progs/doomedit/doomedit.c","line":577,"qual":"dmap_walkable","sig":"static int dmap_walkable(int cell)","doc":"__asm__ volatile(\"syscall\" : \"=a\"(ret) : \"a\"(MINIOS_SYS_VGA_MODE), \"D\"((long)on) : \"rcx\", \"r11\", \"memory\"); return ret; } /** True for solid cells; out of bounds counts as wall to stay closed."},"x":1610.0,"y":494.5,"w":274.8,"h":81.0},{"id":"progs/doomedit/doomedit.c::dmap_is_wall","t":"doomedit.dmap_is_wall","l":[": \"rcx\", \"r11\", \"memory\"); return ret;","} /** Release or reclaim the display","around a spawned child...."],"s":"box","o":"default","d":{"kind":"function","file":"progs/doomedit/doomedit.c","line":570,"qual":"dmap_is_wall","sig":"static int dmap_is_wall(int row, int col)","doc":": \"rcx\", \"r11\", \"memory\"); return ret; } /** Release or reclaim the display around a spawned child."},"x":1610.0,"y":609.5,"w":274.8,"h":81.0},{"id":"progs/doomedit/doomedit.c::dmap_label_regions","t":"doomedit.dmap_label_regions","l":["Sector table backing the multi-sector","exporter.","doomedit.c:1163"],"s":"box","o":"default","d":{"kind":"function","file":"progs/doomedit/doomedit.c","line":1163,"qual":"dmap_label_regions","sig":"static int dmap_label_regions(void)","doc":"Sector table backing the multi-sector exporter."},"x":1610.0,"y":379.5,"w":268.2,"h":81.0},{"id":"progs/doomedit/doomedit.c::dmap_thing_type","t":"doomedit.dmap_thing_type","l":["Thing type ids from the engine","mobjinfo table, each with its sprite *","verified present in the shareware..."],"s":"box","o":"default","d":{"kind":"function","file":"progs/doomedit/doomedit.c","line":165,"qual":"dmap_thing_type","sig":"static int dmap_thing_type(int cell)","doc":"Thing type ids from the engine mobjinfo table, each with its sprite * verified present in the shareware IWAD."},"x":1938.8,"y":437.0,"w":274.8,"h":81.0},{"id":"progs/doomedit/doomedit.c::dmap_w16","t":"doomedit.dmap_w16","l":["doomedit.c:1318"],"s":"box","o":"default","d":{"kind":"function","file":"progs/doomedit/doomedit.c","line":1318,"qual":"dmap_w16","sig":"static void dmap_w16(int v)","doc":""},"x":1281.2,"y":479.5,"w":153.2,"h":51.0},{"id":"progs/doomedit/doomedit.c::dmap_wtex","t":"doomedit.dmap_wtex","l":["doomedit.c:1326"],"s":"box","o":"default","d":{"kind":"function","file":"progs/doomedit/doomedit.c","line":1326,"qual":"dmap_wtex","sig":"static void dmap_wtex(const char *name)","doc":""},"x":1281.2,"y":564.5,"w":160.8,"h":51.0},{"id":"progs/doomedit/doomedit.c::dmap_w8","t":"doomedit.dmap_w8","l":["doomedit.c:1317"],"s":"box","o":"default","d":{"kind":"function","file":"progs/doomedit/doomedit.c","line":1317,"qual":"dmap_w8","sig":"static void dmap_w8(unsigned v)","doc":""},"x":1610.0,"y":709.5,"w":145.6,"h":51.0},{"id":"progs/doomedit/doomedit.c::dmap_seg_angle","t":"doomedit.dmap_seg_angle","l":["dmap_wp++ = (unsigned char)(v \u0026 0xFF);","dmap_wp++ = (unsigned char)((v \u003e\u003e 8) \u0026","0xFF); } static void dmap_w32(int v..."],"s":"box","o":"default","d":{"kind":"function","file":"progs/doomedit/doomedit.c","line":1333,"qual":"dmap_seg_angle","sig":"static int dmap_seg_angle(int dx, int dy)","doc":"dmap_wp++ = (unsigned char)(v \u0026 0xFF); dmap_wp++ = (unsigned char)((v \u003e\u003e 8) \u0026 0xFF); } static void dmap_w32(int v) { dmap_w16(v \u0026 0xFFFF); dmap_w16((v \u003e\u003e 16) \u0026 0xFFFF); } static void dmap_wtex(const char *name) { int k; for (k = 0; k \u003c 8; k++) dmap_w8(name[k] ?"},"x":1281.2,"y":664.5,"w":274.8,"h":81.0},{"id":"progs/doomedit/doomedit.c::dmap_w32","t":"doomedit.dmap_w32","l":["doomedit.c:1322"],"s":"box","o":"default","d":{"kind":"function","file":"progs/doomedit/doomedit.c","line":1322,"qual":"dmap_w32","sig":"static void dmap_w32(int v)","doc":""},"x":1281.2,"y":764.5,"w":153.2,"h":51.0}],"edges":[{"s":"progs/doomedit/doomedit.c::main","t":"progs/doomedit/doomedit.c::main","l":"recursion","y":"back","p":[[85.5,90.0],[85.5,130.0],[85.5,130.0],[85.5,90.0]]},{"s":"progs/doomedit/doomedit.c::main","t":"progs/doomedit/doomedit.c::dmap_selftest","l":"1","y":"solid","p":[[147.0,64.5],[174.0,64.5],[174.0,64.5],[201.0,64.5]]},{"s":"progs/doomedit/doomedit.c::dmap_selftest","t":"progs/nuklear/nuklear_minios.h::nk_minios_font","l":"1","y":"solid","p":[[462.6,64.5],[491.2,64.5],[491.2,64.5],[519.9,64.5]]},{"s":"progs/nuklear/nuklear_minios.h::nk_minios_font","t":"progs/nuklear/nuklear_minios.h::nk_minios_font","l":"recursion","y":"back","p":[[654.0,105.0],[654.0,145.0],[654.0,145.0],[654.0,105.0]]},{"s":"progs/doomedit/doomedit.c::dmap_selftest","t":"progs/nuklear/nuklear_minios.h::nk_sys_vga_mode","l":"2","y":"solid","p":[[462.6,64.5],[495.3,64.5],[495.3,279.5],[528.0,279.5]]},{"s":"progs/nuklear/nuklear_minios.h::nk_sys_vga_mode","t":"progs/nuklear/nuklear_minios.h::nk_sys_vga_mode","l":"recursion","y":"back","p":[[654.0,305.0],[654.0,345.0],[654.0,345.0],[654.0,305.0]]},{"s":"progs/doomedit/doomedit.c::dmap_selftest","t":"progs/nuklear/nuklear_minios.h::nk_sys_kbd_raw","l":"3","y":"solid","p":[[462.6,64.5],[497.2,64.5],[497.2,479.5],[531.8,479.5]]},{"s":"progs/nuklear/nuklear_minios.h::nk_sys_kbd_raw","t":"progs/nuklear/nuklear_minios.h::nk_sys_kbd_raw","l":"recursion","y":"back","p":[[654.0,505.0],[654.0,545.0],[654.0,545.0],[654.0,505.0]]},{"s":"progs/doomedit/doomedit.c::dmap_selftest","t":"progs/nuklear/nuklear_minios.h::nk_build_palette","l":"4","y":"solid","p":[[462.6,64.5],[491.2,64.5],[491.2,579.5],[519.9,579.5]]},{"s":"progs/nuklear/nuklear_minios.h::nk_build_palette","t":"progs/nuklear/nuklear_minios.h::nk_build_palette","l":"recursion","y":"back","p":[[654.0,620.0],[654.0,660.0],[654.0,660.0],[654.0,620.0]]},{"s":"progs/doomedit/doomedit.c::dmap_selftest","t":"progs/nuklear/nuklear_minios.h::nk_sys_palette","l":"5","y":"solid","p":[[462.6,64.5],[497.2,64.5],[497.2,679.5],[531.8,679.5]]},{"s":"progs/nuklear/nuklear_minios.h::nk_sys_palette","t":"progs/nuklear/nuklear_minios.h::nk_sys_palette","l":"recursion","y":"back","p":[[654.0,705.0],[654.0,745.0],[654.0,745.0],[654.0,705.0]]},{"s":"progs/doomedit/doomedit.c::dmap_selftest","t":"progs/doomedit/doomedit.c::dmap_new","l":"6","y":"solid","p":[[462.6,64.5],[803.2,64.5],[803.2,122.0],[1143.8,122.0]]},{"s":"progs/doomedit/doomedit.c::dmap_new","t":"progs/doomedit/doomedit.c::dmap_push_history","l":"1","y":"solid","p":[[1418.6,122.0],[1458.9,122.0],[1458.9,122.0],[1499.2,122.0]]},{"s":"progs/doomedit/doomedit.c::dmap_push_history","t":"kernel/string.c::memcpy","l":"1","y":"solid","p":[[1720.8,122.0],[1761.1,122.0],[1761.1,122.0],[1801.4,122.0]]},{"s":"progs/doomedit/doomedit.c::dmap_selftest","t":"progs/nuklear/nuklear_minios.h::nk_rasterize","l":"7","y":"solid","p":[[462.6,64.5],[491.2,64.5],[491.2,779.5],[519.9,779.5]]},{"s":"progs/nuklear/nuklear_minios.h::nk_rasterize","t":"progs/nuklear/nuklear_minios.h::nk_rasterize","l":"recursion","y":"back","p":[[654.0,820.0],[654.0,860.0],[654.0,860.0],[654.0,820.0]]},{"s":"progs/doomedit/doomedit.c::dmap_selftest","t":"progs/nuklear/nuklear_minios.h::nk_rgb_available","l":"8","y":"solid","p":[[462.6,64.5],[493.4,64.5],[493.4,894.5],[524.2,894.5]]},{"s":"progs/nuklear/nuklear_minios.h::nk_rgb_available","t":"progs/nuklear/nuklear_minios.h::nk_rgb_available","l":"recursion","y":"back","p":[[654.0,935.0],[654.0,975.0],[654.0,975.0],[654.0,935.0]]},{"s":"progs/doomedit/doomedit.c::dmap_selftest","t":"progs/nuklear/nuklear_minios.h::nk_sys_nk_frame","l":"9","y":"solid","p":[[462.6,64.5],[495.3,64.5],[495.3,994.5],[528.0,994.5]]},{"s":"progs/nuklear/nuklear_minios.h::nk_sys_nk_frame","t":"progs/nuklear/nuklear_minios.h::nk_sys_nk_frame","l":"recursion","y":"back","p":[[654.0,1020.0],[654.0,1060.0],[654.0,1060.0],[654.0,1020.0]]},{"s":"progs/doomedit/doomedit.c::dmap_selftest","t":"progs/nuklear/nuklear_minios.h::nk_sys_fb_info","l":"10","y":"solid","p":[[462.6,64.5],[654.0,64.5],[654.0,64.5],[845.4,64.5]]},{"s":"progs/nuklear/nuklear_minios.h::nk_sys_fb_info","t":"progs/nuklear/nuklear_minios.h::nk_sys_fb_info","l":"recursion","y":"back","p":[[967.6,90.0],[967.6,130.0],[967.6,130.0],[967.6,90.0]]},{"s":"progs/doomedit/doomedit.c::dmap_selftest","t":"progs/doomedit/doomedit.c::dmap_demo_room","l":"11","y":"solid","p":[[462.6,64.5],[489.6,64.5],[489.6,179.5],[516.6,179.5]]},{"s":"progs/doomedit/doomedit.c::dmap_demo_room","t":"progs/doomedit/doomedit.c::dmap_new","l":"","y":"dashed","p":[[791.4,179.5],[967.6,179.5],[967.6,122.0],[1143.8,122.0]]},{"s":"progs/doomedit/doomedit.c::dmap_selftest","t":"progs/doomedit/doomedit.c::dmap_build_wad","l":"12","y":"solid","p":[[462.6,64.5],[489.6,64.5],[489.6,379.5],[516.6,379.5]]},{"s":"progs/doomedit/doomedit.c::dmap_build_wad","t":"progs/doomedit/doomedit.c::dmap_validate","l":"1","y":"solid","p":[[791.4,379.5],[967.6,379.5],[967.6,379.5],[1143.8,379.5]]},{"s":"progs/doomedit/doomedit.c::dmap_validate","t":"progs/doomedit/doomedit.c::dmap_walkable","l":"1","y":"solid","p":[[1418.6,379.5],[1445.6,379.5],[1445.6,494.5],[1472.6,494.5]]},{"s":"progs/doomedit/doomedit.c::dmap_validate","t":"progs/doomedit/doomedit.c::dmap_is_wall","l":"2","y":"solid","p":[[1418.6,379.5],[1445.6,379.5],[1445.6,609.5],[1472.6,609.5]]},{"s":"progs/doomedit/doomedit.c::dmap_validate","t":"progs/doomedit/doomedit.c::dmap_label_regions","l":"3","y":"solid","p":[[1418.6,379.5],[1447.2,379.5],[1447.2,379.5],[1475.9,379.5]]},{"s":"progs/doomedit/doomedit.c::dmap_build_wad","t":"progs/doomedit/doomedit.c::dmap_thing_type","l":"2","y":"solid","p":[[791.4,379.5],[1296.4,379.5],[1296.4,437.0],[1801.4,437.0]]},{"s":"progs/doomedit/doomedit.c::dmap_build_wad","t":"progs/doomedit/doomedit.c::dmap_is_wall","l":"3","y":"solid","p":[[791.4,379.5],[1132.0,379.5],[1132.0,609.5],[1472.6,609.5]]},{"s":"progs/doomedit/doomedit.c::dmap_build_wad","t":"progs/doomedit/doomedit.c::dmap_walkable","l":"4","y":"solid","p":[[791.4,379.5],[1132.0,379.5],[1132.0,494.5],[1472.6,494.5]]},{"s":"progs/doomedit/doomedit.c::dmap_walkable","t":"progs/doomedit/doomedit.c::dmap_thing_type","l":"","y":"dashed","p":[[1747.4,494.5],[1774.4,494.5],[1774.4,437.0],[1801.4,437.0]]},{"s":"progs/doomedit/doomedit.c::dmap_build_wad","t":"progs/doomedit/doomedit.c::dmap_w16","l":"5","y":"solid","p":[[791.4,379.5],[998.0,379.5],[998.0,479.5],[1204.6,479.5]]},{"s":"progs/doomedit/doomedit.c::dmap_build_wad","t":"progs/doomedit/doomedit.c::dmap_wtex","l":"6","y":"solid","p":[[791.4,379.5],[996.1,379.5],[996.1,564.5],[1200.8,564.5]]},{"s":"progs/doomedit/doomedit.c::dmap_wtex","t":"progs/doomedit/doomedit.c::dmap_w8","l":"1","y":"solid","p":[[1361.6,564.5],[1449.4,564.5],[1449.4,709.5],[1537.2,709.5]]},{"s":"progs/doomedit/doomedit.c::dmap_build_wad","t":"progs/doomedit/doomedit.c::dmap_seg_angle","l":"7","y":"solid","p":[[791.4,379.5],[967.6,379.5],[967.6,664.5],[1143.8,664.5]]},{"s":"progs/doomedit/doomedit.c::dmap_build_wad","t":"progs/doomedit/doomedit.c::dmap_w8","l":"8","y":"solid","p":[[791.4,379.5],[1164.3,379.5],[1164.3,709.5],[1537.2,709.5]]},{"s":"progs/doomedit/doomedit.c::dmap_build_wad","t":"progs/doomedit/doomedit.c::dmap_w32","l":"9","y":"solid","p":[[791.4,379.5],[998.0,379.5],[998.0,764.5],[1204.6,764.5]]}],"participants":[],"messages":[]},{"id":"sequence:progs/doomedit/doomedit.c::main","title":"Cross-file sequence of doomedit.main","kind":"sequence","caption":"Columns are files, arrows are calls that cross a file boundary, numbered in execution order.","w":561.6,"h":460.0,"meta":{"entry":"doomedit.main","file":"progs/doomedit/doomedit.c","line":2246,"score":11,"reasons":["`main` in a compiled-language file","entry-style name `main`"]},"lanes":[],"nodes":[],"edges":[],"participants":[{"id":"progs/doomedit/doomedit.c","t":"doomedit.c","f":"progs/doomedit/doomedit.c","w":116.0,"x":82.0},{"id":"progs/nuklear/nuklear_minios.h","t":"nuklear_minios.h","f":"progs/nuklear/nuklear_minios.h","w":145.6,"x":280.8},{"id":"kernel/string.c","t":"string.c","f":"kernel/string.c","w":116.0,"x":479.6}],"messages":[{"s":"progs/doomedit/doomedit.c","t":"progs/nuklear/nuklear_minios.h","l":"nk_minios_font()","d":{"kind":"function","file":"progs/nuklear/nuklear_minios.h","line":63,"qual":"nk_minios_font","sig":"struct nk_user_font nk_minios_font(void);","doc":"Hybrid palette: indices 0-14 are the desktop colors (kept so the desktop * behind the window never recolors); 15-255 are the UI ramp."},"n":1,"y":76.0,"x1":82.0,"x2":280.8},{"s":"progs/doomedit/doomedit.c","t":"progs/nuklear/nuklear_minios.h","l":"nk_sys_vga_mode()","d":{"kind":"function","file":"progs/nuklear/nuklear_minios.h","line":45,"qual":"nk_sys_vga_mode","sig":"long nk_sys_vga_mode(int on);","doc":""},"n":2,"y":112.0,"x1":82.0,"x2":280.8},{"s":"progs/doomedit/doomedit.c","t":"progs/nuklear/nuklear_minios.h","l":"nk_sys_kbd_raw()","d":{"kind":"function","file":"progs/nuklear/nuklear_minios.h","line":44,"qual":"nk_sys_kbd_raw","sig":"long nk_sys_kbd_raw(int on);","doc":""},"n":3,"y":148.0,"x1":82.0,"x2":280.8},{"s":"progs/doomedit/doomedit.c","t":"progs/nuklear/nuklear_minios.h","l":"nk_build_palette()","d":{"kind":"function","file":"progs/nuklear/nuklear_minios.h","line":57,"qual":"nk_build_palette","sig":"void nk_build_palette(unsigned char *pal768);","doc":"Hybrid palette: indices 0-14 are the desktop colors (kept so the desktop * behind the window never recolors); 15-255 are the UI ramp."},"n":4,"y":184.0,"x1":82.0,"x2":280.8},{"s":"progs/doomedit/doomedit.c","t":"progs/nuklear/nuklear_minios.h","l":"nk_sys_palette()","d":{"kind":"function","file":"progs/nuklear/nuklear_minios.h","line":43,"qual":"nk_sys_palette","sig":"long nk_sys_palette(const unsigned char *pal768);","doc":""},"n":5,"y":220.0,"x1":82.0,"x2":280.8},{"s":"progs/doomedit/doomedit.c","t":"kernel/string.c","l":"memcpy()","d":{"kind":"function","file":"kernel/string.c","line":104,"qual":"memcpy","sig":"void *memcpy(void *dst, const void *src, unsigned long n)","doc":"Docstring: ISO C entry points the compiler itself emits calls to for struct copies and large initializers, even under -ffreestanding."},"n":6,"y":256.0,"x1":82.0,"x2":479.6},{"s":"progs/doomedit/doomedit.c","t":"progs/nuklear/nuklear_minios.h","l":"nk_rasterize()","d":{"kind":"function","file":"progs/nuklear/nuklear_minios.h","line":66,"qual":"nk_rasterize","sig":"void nk_rasterize(struct nk_context *ctx);","doc":"Hybrid palette: indices 0-14 are the desktop colors (kept so the desktop * behind the window never recolors); 15-255 are the UI ramp."},"n":7,"y":292.0,"x1":82.0,"x2":280.8},{"s":"progs/doomedit/doomedit.c","t":"progs/nuklear/nuklear_minios.h","l":"nk_rgb_available()","d":{"kind":"function","file":"progs/nuklear/nuklear_minios.h","line":33,"qual":"nk_rgb_available","sig":"int nk_rgb_available(void);","doc":"RGB companion buffer (R,G,B byte order, NK_W x NK_H)."},"n":8,"y":328.0,"x1":82.0,"x2":280.8},{"s":"progs/doomedit/doomedit.c","t":"progs/nuklear/nuklear_minios.h","l":"nk_sys_nk_frame()","d":{"kind":"function","file":"progs/nuklear/nuklear_minios.h","line":52,"qual":"nk_sys_nk_frame","sig":"long nk_sys_nk_frame(int *origin);","doc":""},"n":9,"y":364.0,"x1":82.0,"x2":280.8},{"s":"progs/doomedit/doomedit.c","t":"progs/nuklear/nuklear_minios.h","l":"nk_sys_fb_info()","d":{"kind":"function","file":"progs/nuklear/nuklear_minios.h","line":46,"qual":"nk_sys_fb_info","sig":"long nk_sys_fb_info(int *w, int *h, int *pitch);","doc":""},"n":10,"y":400.0,"x1":82.0,"x2":280.8}]},{"id":"calltree:progs/doomgeneric/i_main.c::main","title":"Call tree of i_main.main","kind":"calltree","caption":"Read left to right: every arrow is a call, numbered in the order it happens inside the caller. Dashed arrows reach a function already expanded elsewhere; red arrows are recursion. Same-file functions are blue, other files purple. Click a box for its signature and docs.","w":423.6,"h":387.0,"meta":{"entry":"i_main.main","file":"progs/doomgeneric/i_main.c","line":40,"score":11,"reasons":["`main` in a compiled-language file","entry-style name `main`"]},"lanes":[],"nodes":[{"id":"progs/doomgeneric/i_main.c::main","t":"i_main.main","l":["i_main.c:40"],"s":"box","o":"entry","d":{"kind":"function","file":"progs/doomgeneric/i_main.c","line":40,"qual":"main","sig":"int main(int argc, char **argv)","doc":""},"x":77.8,"y":49.5,"w":107.6,"h":51.0},{"id":"progs/doomgeneric/i_main.c::M_FindResponseFile","t":"i_main.M_FindResponseFile","l":["i_main.c:35"],"s":"box","o":"default","d":{"kind":"function","file":"progs/doomgeneric/i_main.c","line":35,"qual":"M_FindResponseFile","sig":"void M_FindResponseFile(void);","doc":""},"x":292.6,"y":49.5,"w":214.0,"h":51.0},{"id":"progs/doomgeneric/i_main.c::dg_Create","t":"i_main.dg_Create","l":["i_main.c:37"],"s":"box","o":"default","d":{"kind":"function","file":"progs/doomgeneric/i_main.c","line":37,"qual":"dg_Create","sig":"void dg_Create();","doc":""},"x":292.6,"y":134.5,"w":145.6,"h":51.0},{"id":"progs/doomgeneric/i_main.c::D_DoomMain","t":"i_main.D_DoomMain","l":["i_main.c:33"],"s":"box","o":"default","d":{"kind":"function","file":"progs/doomgeneric/i_main.c","line":33,"qual":"D_DoomMain","sig":"void D_DoomMain (void);","doc":""},"x":292.6,"y":219.5,"w":153.2,"h":51.0}],"edges":[{"s":"progs/doomgeneric/i_main.c::main","t":"progs/doomgeneric/i_main.c::main","l":"recursion","y":"back","p":[[77.8,75.0],[77.8,115.0],[77.8,115.0],[77.8,75.0]]},{"s":"progs/doomgeneric/i_main.c::main","t":"progs/doomgeneric/i_main.c::M_FindResponseFile","l":"1","y":"solid","p":[[131.6,49.5],[158.6,49.5],[158.6,49.5],[185.6,49.5]]},{"s":"progs/doomgeneric/i_main.c::M_FindResponseFile","t":"progs/doomgeneric/i_main.c::M_FindResponseFile","l":"recursion","y":"back","p":[[292.6,75.0],[292.6,115.0],[292.6,115.0],[292.6,75.0]]},{"s":"progs/doomgeneric/i_main.c::main","t":"progs/doomgeneric/i_main.c::dg_Create","l":"2","y":"solid","p":[[131.6,49.5],[175.7,49.5],[175.7,134.5],[219.8,134.5]]},{"s":"progs/doomgeneric/i_main.c::dg_Create","t":"progs/doomgeneric/i_main.c::dg_Create","l":"recursion","y":"back","p":[[292.6,160.0],[292.6,200.0],[292.6,200.0],[292.6,160.0]]},{"s":"progs/doomgeneric/i_main.c::main","t":"progs/doomgeneric/i_main.c::D_DoomMain","l":"3","y":"solid","p":[[131.6,49.5],[173.8,49.5],[173.8,219.5],[216.0,219.5]]},{"s":"progs/doomgeneric/i_main.c::D_DoomMain","t":"progs/doomgeneric/i_main.c::D_DoomMain","l":"recursion","y":"back","p":[[292.6,245.0],[292.6,285.0],[292.6,285.0],[292.6,245.0]]}],"participants":[],"messages":[]}],"api":""}</script>
<div id="rm-cfg-scrim"></div><div id="rm-cfg-modal" role="dialog" aria-modal="true" aria-labelledby="rm-cfg-title" aria-hidden="true"><h2 id="rm-cfg-title">Viewer config</h2><p class="rm-cfg-sub">Project view options from readmenator.toml ([viewer], [branding], [maps], [messages]). Apply re-renders only the affected segment, no full reload. Copy TOML persists the choice for the next rebuild.</p><div id="rm-cfg-form"></div><div class="rm-cfg-actions"><button type="button" id="rm-cfg-apply" title="Apply without reloading">Apply</button><button type="button" id="rm-cfg-copy" title="Copy TOML sections to clipboard">Copy TOML</button><button type="button" id="rm-cfg-reset" title="Clear local overrides">Reset</button><button type="button" id="rm-cfg-close" title="Close ( Esc )">Close</button></div><div id="rm-cfg-status" role="status" aria-live="polite"></div></div>
<script>
(function(){
"use strict";
var NS="http://www.w3.org/2000/svg";
var TONE={default:["--fv-box","--accent2"],entry:["--fv-entry","--accent"],external:["--fv-ext","--fv-purple"],cycle:["--fv-cycle","--fv-pink"],decision:["--fv-dec","--fv-purple"],stop:["--fv-stop","--bad"],muted:["--panel2","--line"],hub:["--fv-hub","--good"]};
function el(tag,attrs,parent){var e=document.createElementNS(NS,tag);for(var k in attrs)e.setAttribute(k,attrs[k]);if(parent)parent.appendChild(e);return e;}
function h(tag,cls,text){var e=document.createElement(tag);if(cls)e.className=cls;if(text!=null)e.textContent=text;return e;}
function cssv(name){return getComputedStyle(document.documentElement).getPropertyValue(name).trim()||"#888";}
function shapePath(n){var x=n.x-n.w/2,y=n.y-n.h/2,w=n.w,hh=n.h,r;
if(n.s==="decision")return "M"+n.x+" "+y+" L"+(x+w)+" "+n.y+" L"+n.x+" "+(y+hh)+" L"+x+" "+n.y+" Z";
if(n.s==="loop"){var c=16;return "M"+(x+c)+" "+y+" L"+(x+w-c)+" "+y+" L"+(x+w)+" "+n.y+" L"+(x+w-c)+" "+(y+hh)+" L"+(x+c)+" "+(y+hh)+" L"+x+" "+n.y+" Z";}
if(n.s==="io"){var k=12;return "M"+(x+k)+" "+y+" L"+(x+w)+" "+y+" L"+(x+w-k)+" "+(y+hh)+" L"+x+" "+(y+hh)+" Z";}
r=(n.s==="terminal"||n.s==="stop")?hh/2:(n.s==="component"?10:7);
return "M"+(x+r)+" "+y+" H"+(x+w-r)+" A"+r+" "+r+" 0 0 1 "+(x+w)+" "+(y+r)+" V"+(y+hh-r)+" A"+r+" "+r+" 0 0 1 "+(x+w-r)+" "+(y+hh)+" H"+(x+r)+" A"+r+" "+r+" 0 0 1 "+x+" "+(y+hh-r)+" V"+(y+r)+" A"+r+" "+r+" 0 0 1 "+(x+r)+" "+y+" Z";}
function bez(p,t){var u=1-t;return [u*u*u*p[0][0]+3*u*u*t*p[1][0]+3*u*t*t*p[2][0]+t*t*t*p[3][0],u*u*u*p[0][1]+3*u*u*t*p[1][1]+3*u*t*t*p[2][1]+t*t*t*p[3][1]];}
function drawGraph(G,svg,onPick){
var defs=el("defs",{},svg);
["n","r","m"].forEach(function(k){var mk=el("marker",{id:"fv-arrow-"+k+"-"+G.uid,viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"7",markerHeight:"7",orient:"auto-start-reverse"},defs);
el("path",{d:"M0 0 L10 5 L0 10 z",fill:k==="r"?cssv("--bad"):(k==="m"?cssv("--muted"):cssv("--accent2"))},mk);});
el("rect",{x:0,y:0,width:G.w,height:G.h,fill:cssv("--bg")},svg);
(G.lanes||[]).forEach(function(l,i){el("rect",{x:6,y:l.y,width:G.w-12,height:l.h,rx:12,fill:cssv(i%2?"--panel2":"--panel"),stroke:cssv("--line")},svg);
var t=el("text",{x:18,y:l.y+18,"class":"fv-svg-text","font-size":"12","font-weight":"700",fill:cssv("--muted")},svg);t.textContent=l.t.toUpperCase();});
var byId={},edgesOf={},gEdges=el("g",{},svg),gNodes=el("g",{},svg);
G.nodes.forEach(function(n){byId[n.id]=n;edgesOf[n.id]=[];});
G.edges.forEach(function(e,i){if(!e.p||e.p.length<4)return;var p=e.p;
var red=e.y==="back"||e.y==="upward",kind=red?"r":(e.y==="dashed"?"m":"n");
var g=el("g",{"class":"fv-edge"},gEdges);
var d="M"+p[0][0]+" "+p[0][1]+" C"+p[1][0]+" "+p[1][1]+" "+p[2][0]+" "+p[2][1]+" "+p[3][0]+" "+p[3][1];
var path=el("path",{d:d,fill:"none",stroke:red?cssv("--bad"):(e.y==="dashed"?cssv("--muted"):cssv("--accent2")),"stroke-width":e.y==="heavy"?3.4:1.6,"stroke-opacity":e.y==="dashed"?0.7:0.9},g);
if(e.y==="dashed"||red)path.setAttribute("stroke-dasharray","6 5");
if(e.y==="upward")path.setAttribute("marker-start","url(#fv-arrow-"+kind+"-"+G.uid+")");else path.setAttribute("marker-end","url(#fv-arrow-"+kind+"-"+G.uid+")");
if(e.l){var m=bez(p,0.5),tw=e.l.length*6.6+10;el("rect",{x:m[0]-tw/2,y:m[1]-9,width:tw,height:18,rx:5,fill:cssv("--panel"),stroke:red?cssv("--bad"):cssv("--line")},g);
var tx=el("text",{x:m[0],y:m[1]+4,"text-anchor":"middle","class":"fv-svg-text","font-size":"11",fill:red?cssv("--bad"):cssv("--text")},g);tx.textContent=e.l;}
edgesOf[e.s]&&edgesOf[e.s].push(g);edgesOf[e.t]&&edgesOf[e.t].push(g);g.__ends=[e.s,e.t];});
G.nodes.forEach(function(n){var tone=TONE[n.o]||TONE.default;
var g=el("g",{"class":"fv-node",tabindex:"0"},gNodes);
el("path",{d:shapePath(n),fill:cssv(tone[0]),stroke:cssv(tone[1]),"stroke-width":n.s==="component"?2:1.5,"class":"fv-shape"},g);
if(n.s==="note")g.lastChild.setAttribute("stroke-dasharray","5 4");
if(n.s==="component")el("rect",{x:n.x-n.w/2+1,y:n.y-n.h/2+1,width:n.w-2,height:5,rx:3,fill:cssv(tone[1])},g);
var lines=[n.t].concat(n.l||[]),total=18+(lines.length-1)*15,y0=n.y-total/2+13;
lines.forEach(function(line,i){var t=el("text",{x:n.x,y:y0+(i===0?0:3+i*15),"text-anchor":"middle","class":"fv-svg-text","font-size":i===0?"13":"11.5","font-weight":i===0?"700":"400",fill:i===0?cssv("--text"):cssv("--muted")},g);t.textContent=line;});
var tip=el("title",{},g);tip.textContent=n.t+(n.d&&n.d.doc?"\n"+n.d.doc:"");
g.addEventListener("mouseenter",function(){svg.classList.add("fv-dim");g.classList.add("fv-on");(edgesOf[n.id]||[]).forEach(function(x){x.classList.add("fv-on");});});
g.addEventListener("mouseleave",function(){svg.classList.remove("fv-dim");g.classList.remove("fv-on");(edgesOf[n.id]||[]).forEach(function(x){x.classList.remove("fv-on");});});
g.addEventListener("click",function(ev){ev.stopPropagation();onPick(n);});});
}
function drawSequence(G,svg,onPick){
var defs=el("defs",{},svg),mk=el("marker",{id:"fv-arrow-s-"+G.uid,viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"7",markerHeight:"7",orient:"auto"},defs);
el("path",{d:"M0 0 L10 5 L0 10 z",fill:cssv("--accent2")},mk);
el("rect",{x:0,y:0,width:G.w,height:G.h,fill:cssv("--bg")},svg);
(G.participants||[]).forEach(function(p,i){el("line",{x1:p.x,y1:58,x2:p.x,y2:G.h-12,stroke:cssv("--line"),"stroke-dasharray":"4 5"},svg);
el("rect",{x:p.x-p.w/2,y:14,width:p.w,height:40,rx:9,fill:cssv(i?"--fv-ext":"--fv-entry"),stroke:cssv(i?"--fv-purple":"--accent")},svg);
var t=el("text",{x:p.x,y:39,"text-anchor":"middle","class":"fv-svg-text","font-size":"13","font-weight":"700",fill:cssv("--text")},svg);t.textContent=p.t;});
(G.messages||[]).forEach(function(m){var g=el("g",{"class":"fv-node"},svg),dir=m.x2>m.x1?1:-1;
el("line",{x1:m.x1,y1:m.y,x2:m.x2-dir*4,y2:m.y,stroke:cssv("--accent2"),"stroke-width":1.6,"marker-end":"url(#fv-arrow-s-"+G.uid+")"},g);
var t=el("text",{x:(m.x1+m.x2)/2,y:m.y-6,"text-anchor":"middle","class":"fv-svg-text","font-size":"11.5",fill:cssv("--text")},g);t.textContent=m.n+". "+m.l;
var tip=el("title",{},g);tip.textContent=m.l+(m.d&&m.d.doc?"\n"+m.d.doc:"");
g.addEventListener("click",function(ev){ev.stopPropagation();onPick({t:m.l,d:m.d||{}});});});
}
function panelHtml(n,apiHref){var d=n.d||{},out=[];
function esc(s){return String(s==null?"":s).replace(/[&<>"']/g,function(c){return {"&":"&","<":"<",">":">",'"':""","'":"'"}[c];});}
out.push("<button class='x' title='Close'>×</button><h4>"+esc(n.t)+"</h4>");
if(d.kind)out.push("<div class='fv-meta'>"+esc(d.kind)+(d.file?" · <code>"+esc(d.file)+(d.line?":"+esc(d.line):"")+"</code>":"")+"</div>");
if(d.summary)out.push("<p>"+esc(d.summary)+"</p>");
if(d.sig)out.push("<pre><code>"+esc(d.sig)+"</code></pre>");
if(d.doc)out.push("<p>"+esc(d.doc)+"</p>");
if(d.stmt&&d.stmt!==n.t)out.push("<pre><code>"+esc(d.stmt)+"</code></pre>");
if(d.calls&&d.calls.length)out.push("<p><b>Calls</b></p><table>"+d.calls.map(function(c){return "<tr><td><code>"+esc(c.n)+"()</code></td><td>"+esc(c.d||"")+"</td></tr>";}).join("")+"</table>");
if(d.layers&&d.layers.length)out.push("<p class='fv-meta'>Layers: "+d.layers.map(function(l){return esc(l[0])+" "+l[1];}).join(", ")+"</p>");
if(d.files&&d.files.length)out.push("<p><b>Files</b> (most imported first)</p><table>"+d.files.map(function(f){return "<tr><td><code>"+esc(f.f)+"</code><br><span class='fv-meta'>"+f.i+" importers, "+f.n+" symbols</span></td><td>"+esc(f.p||"")+"</td></tr>";}).join("")+"</table>");
if(apiHref&&d.file&&d.qual)out.push("<p><a href='"+esc(apiHref+"#/m/"+encodeURIComponent(d.file)+"/"+encodeURIComponent(d.qual))+"'>Open in the API reference</a></p>");
else if(apiHref&&d.file)out.push("<p><a href='"+esc(apiHref+"#/m/"+encodeURIComponent(d.file))+"'>Open the module in the API reference</a></p>");
return out.join("");}
function mount(host,graphs,opts){
opts=opts||{};host.innerHTML="";
if(!graphs||!graphs.length){host.appendChild(h("p","fv-meta","No architecture or execution-flow diagrams for this project."));return;}
var toc=h("div","fv-toc");host.appendChild(toc);
graphs.forEach(function(G,gi){G.uid="g"+gi;
var card=h("section","fv-card");card.id="fv-"+gi;host.appendChild(card);
var a=h("a",null,G.title);a.href="javascript:void(0)";a.addEventListener("click",function(){card.scrollIntoView({behavior:"smooth"});});toc.appendChild(a);
var head=h("div","fv-head");card.appendChild(head);head.appendChild(h("h3",null,G.title));
var m=G.meta||{};
if(m.entry)head.appendChild(h("div","fv-meta","Entry point "+m.entry+" at "+m.file+":"+m.line+" (score "+m.score+": "+(m.reasons||[]).join("; ")+")"));
if(m.stats)head.appendChild(h("div","fv-meta",m.stats.components+" components, "+m.stats.tiers+" tiers, "+m.stats.edges+" dependencies shown, "+m.stats.reduced+" implied edges removed"));
if(m.upward&&m.upward.length)head.appendChild(h("div","fv-meta","Fix first (upward): "+m.upward.map(function(u){return u[0]+" -> "+u[1]+" ("+u[2]+")";}).join("; ")));
head.appendChild(h("p","fv-cap",G.caption||""));
var bar=h("div","fv-bar");card.appendChild(bar);
var stage=h("div","fv-stage");card.appendChild(stage);
var panel=h("div","fv-panel");stage.appendChild(panel);
var svg=el("svg",{width:G.w,height:G.h,viewBox:"0 0 "+G.w+" "+G.h,role:"img","aria-label":G.title});stage.insertBefore(svg,panel);
function pick(n){panel.innerHTML=panelHtml(n,opts.apiHref||"");panel.classList.add("open");var x=panel.querySelector(".x");if(x)x.addEventListener("click",function(){panel.classList.remove("open");});}
if(G.kind==="sequence")drawSequence(G,svg,pick);else drawGraph(G,svg,pick);
var S={k:1,x:0,y:0};
function apply(){svg.style.transform="translate("+S.x+"px,"+S.y+"px) scale("+S.k+")";}
function clampPan(){var W=stage.clientWidth,H=stage.clientHeight,cw=G.w*S.k,ch=G.h*S.k;
S.x=cw<=W?(W-cw)/2:Math.min(0,Math.max(W-cw,S.x));S.y=ch<=H?Math.max(0,Math.min((H-ch)/2,12)):Math.min(0,Math.max(H-ch,S.y));}
function fit(){var W=Math.max(320,stage.clientWidth||host.clientWidth||900);S.k=Math.max(opts.minScale||0.8,Math.min(1.15,(W-16)/G.w));
var want=G.h*S.k+24,max=card.classList.contains("full")?99999:Math.round(window.innerHeight*0.8);
if(!card.classList.contains("full"))stage.style.height=Math.max(260,Math.min(want,max))+"px";S.x=0;S.y=0;clampPan();apply();}
function zoom(f,cx,cy){var nk=Math.max(0.25,Math.min(3,S.k*f));cx=cx==null?stage.clientWidth/2:cx;cy=cy==null?stage.clientHeight/2:cy;
S.x=cx-(cx-S.x)*nk/S.k;S.y=cy-(cy-S.y)*nk/S.k;S.k=nk;clampPan();apply();}
function btn(label,title,fn){var b=h("button",null,label);b.title=title;b.addEventListener("click",fn);bar.appendChild(b);}
btn("Fit width","Scale the diagram to the card width",fit);
btn("100%","Actual size",function(){S.k=1;clampPan();apply();});
btn("+","Zoom in",function(){zoom(1.25);});btn("-","Zoom out",function(){zoom(0.8);});
btn("Fullscreen","Toggle fullscreen (Esc leaves)",function(){card.classList.toggle("full");setTimeout(fit,30);});
btn("SVG","Download this diagram as SVG",function(){var c=svg.cloneNode(true);c.removeAttribute("style");c.setAttribute("xmlns",NS);
var blob=new Blob([new XMLSerializer().serializeToString(c)],{type:"image/svg+xml"}),u=URL.createObjectURL(blob),a2=document.createElement("a");a2.href=u;a2.download=(G.id||"diagram").replace(/[^a-z0-9]+/gi,"_")+".svg";a2.click();setTimeout(function(){URL.revokeObjectURL(u);},500);});
bar.appendChild(h("span","fv-hint",G.nodes.length?G.nodes.length+" nodes, "+G.edges.length+" arrows | drag to pan, Ctrl+wheel to zoom, click a node":((G.messages||[]).length+" calls | drag to pan, click a call")));
var drag=null;
stage.addEventListener("pointerdown",function(ev){if(ev.target.closest&&ev.target.closest(".fv-panel"))return;drag={x:ev.clientX,y:ev.clientY,sx:S.x,sy:S.y,moved:false};stage.classList.add("drag");});
window.addEventListener("pointermove",function(ev){if(!drag)return;var dx=ev.clientX-drag.x,dy=ev.clientY-drag.y;if(Math.abs(dx)+Math.abs(dy)>3)drag.moved=true;S.x=drag.sx+dx;S.y=drag.sy+dy;clampPan();apply();});
window.addEventListener("pointerup",function(){drag=null;stage.classList.remove("drag");});
stage.addEventListener("click",function(ev){if(!ev.target.closest(".fv-panel")&&!ev.target.closest(".fv-node"))panel.classList.remove("open");});
stage.addEventListener("wheel",function(ev){var r=stage.getBoundingClientRect();
if(ev.ctrlKey||ev.metaKey){ev.preventDefault();zoom(ev.deltaY<0?1.12:0.89,ev.clientX-r.left,ev.clientY-r.top);return;}
var ch=G.h*S.k,H=stage.clientHeight;if(ch<=H)return;var before=S.y;S.y-=ev.deltaY;clampPan();if(S.y!==before){ev.preventDefault();apply();}},{passive:false});
document.addEventListener("keydown",function(ev){if(ev.key==="Escape"&&card.classList.contains("full")){card.classList.remove("full");setTimeout(fit,30);}});
window.addEventListener("resize",fit);
requestAnimationFrame(fit);
});
}
window.ReadmenatorFlows={mount:mount};
})();
</script>
<script>function readmenatorPayload(id,fallback){
var el=document.getElementById(id),text=el?el.textContent:"";
if(!text||!text.trim())return Promise.resolve(fallback===undefined?null:fallback);
if(el.getAttribute("data-encoding")!=="gzip+base64")return Promise.resolve(JSON.parse(text));
if(typeof DecompressionStream==="undefined")return Promise.reject(new Error("This browser cannot decompress the embedded data (DecompressionStream missing). Open the page in a current Chrome, Edge, Firefox or Safari."));
var bin=atob(text.replace(/\s+/g,"")),bytes=new Uint8Array(bin.length);
for(var i=0;i<bin.length;i++)bytes[i]=bin.charCodeAt(i);
return new Response(new Blob([bytes]).stream().pipeThrough(new DecompressionStream("gzip"))).text().then(JSON.parse);
}
function readmenatorPayloads(specs){
return Promise.all(specs.map(function(spec){return readmenatorPayload(spec[0],spec[1]);}));
}
function readmenatorPayloadError(err){
var box=document.createElement("pre");box.setAttribute("role","alert");
box.style.cssText="position:relative;z-index:9999;margin:24px;padding:16px;border:1px solid #f87171;border-radius:8px;background:#1f1115;color:#fecaca;white-space:pre-wrap";
box.textContent="Could not load the embedded data: "+(err&&err.message?err.message:String(err));
document.body.insertBefore(box,document.body.firstChild);
}</script>
<script>
(function(){var root=document.documentElement;try{var t=localStorage.getItem("readmenator-theme");if(t)root.setAttribute("data-theme",t);}catch(e){}
window.ReadmenatorViewerApply=function(patch){patch=patch||{};var handled=[];["theme","html_style","accent","accent2"].forEach(function(k){if(k in patch&&handled.indexOf(k)<0)handled.push(k);});if(!handled.length)return handled;try{if(typeof window.__rmFlowsDraw__==="function")window.__rmFlowsDraw__();}catch(e){}return handled;};
readmenatorPayload("fv-data",{graphs:[],api:""}).then(function(data){
function draw(){window.ReadmenatorFlows.mount(document.getElementById("fv-host"),data.graphs,{apiHref:data.api});}
window.__rmFlowsDraw__=draw;
document.getElementById("fv-theme").addEventListener("click",function(){var cur=root.getAttribute("data-theme")||(matchMedia("(prefers-color-scheme: light)").matches?"light":"dark");var n=cur==="light"?"dark":"light";root.setAttribute("data-theme",n);try{localStorage.setItem("readmenator-theme",n);}catch(e){}draw();});
draw();},readmenatorPayloadError);})();
</script>
<script>window.__RM_VIEWER__={"accent": "#22d3ee", "accent2": "#f472b6", "agent_extra": "", "agent_heading": "", "agent_intro": "", "author": "", "bundle_beta": 0.85, "charge": -300, "description": "", "folder_notice": "", "github_url": "", "home_url": "", "html_style": "dark", "hulls_enabled": true, "label_top_n": 30, "label_zoom": 1.6, "link_distance": 120, "link_strength": 0.3, "logo_url": "", "mode": "2d", "motion_enabled": true, "name": "", "pages_url": "", "particles": 4, "preset": "classic", "readme_agents_line": "", "readme_developers_line": "", "readme_heading": "", "readme_intro": "", "readme_regen_command": "", "sourceview_max_files": 2500, "sourceview_max_total_chars": 20000000, "theme": "dark"};
(function(){
"use strict";
var LS_KEY="readmenator.viewer.v1";
var SCHEMA=[{"key": "theme", "label": "Theme", "type": "select", "section": "viewer", "options": ["dark", "light"], "help": "Page color scheme. Applies instantly."}, {"key": "preset", "label": "Map preset", "type": "select", "section": "viewer", "options": ["classic", "flow", "blueprint", "editorial"], "help": "Gallery map style. Needs rebuild for system maps."}, {"key": "motion_enabled", "label": "Motion", "type": "bool", "section": "viewer", "help": "Finite animations. Honors prefers-reduced-motion."}, {"key": "mode", "label": "Default view", "type": "select", "section": "viewer", "options": ["2d", "3d"], "help": "Explorer view used on first load."}, {"key": "label_top_n", "label": "Labels (top N)", "type": "int", "section": "viewer", "min": 0, "max": 200, "help": "How many top-ranked files always show names."}, {"key": "label_zoom", "label": "Label zoom", "type": "number", "section": "viewer", "min": 0.5, "max": 4.0, "step": 0.1, "help": "Zoom level from which all labels appear."}, {"key": "charge", "label": "Repulsion", "type": "int", "section": "viewer", "min": -1000, "max": 0, "help": "Force-graph node repulsion. Reheats physics live."}, {"key": "link_distance", "label": "Link distance", "type": "int", "section": "viewer", "min": 20, "max": 400, "help": "Target edge length. Reheats physics live."}, {"key": "link_strength", "label": "Link strength", "type": "number", "section": "viewer", "min": 0.0, "max": 1.0, "step": 0.05, "help": "Edge stiffness. Reheats physics live."}, {"key": "hulls_enabled", "label": "Group halos", "type": "bool", "section": "viewer", "help": "Community halo overlays around file groups."}, {"key": "particles", "label": "Flow particles", "type": "int", "section": "viewer", "min": 0, "max": 12, "help": "Particles on highlighted edges."}, {"key": "bundle_beta", "label": "Bundle strength", "type": "number", "section": "viewer", "min": 0.0, "max": 1.0, "step": 0.05, "help": "Edge bundling pull toward the hierarchy (bundles page)."}, {"key": "html_style", "label": "HTML style", "type": "select", "section": "viewer", "options": ["dark", "light"], "help": "Default style for freshly generated pages."}, {"key": "name", "label": "Project name", "type": "text", "section": "branding", "help": "Page titles and hero. Needs rebuild."}, {"key": "author", "label": "Author", "type": "text", "section": "branding", "help": "Credited in the hero and footer. Needs rebuild."}, {"key": "description", "label": "Description", "type": "text", "section": "branding", "help": "One-line project summary in the hero. Needs rebuild."}, {"key": "github_url", "label": "GitHub URL", "type": "text", "section": "branding", "help": "Absolute http(s) link. Footer icon. Needs rebuild."}, {"key": "pages_url", "label": "Pages URL", "type": "text", "section": "branding", "help": "Absolute http(s) link to the published site. Footer icon. Needs rebuild."}, {"key": "home_url", "label": "Home URL", "type": "text", "section": "branding", "help": "Where the maps home icon points. Footer icon. Needs rebuild."}, {"key": "logo_url", "label": "Logo URL", "type": "text", "section": "branding", "help": "Absolute http(s) brand image shown in the hero. Needs rebuild."}, {"key": "accent", "label": "Accent color", "type": "color", "section": "branding", "help": "Primary highlight color (#rrggbb). Applies instantly."}, {"key": "accent2", "label": "Accent 2", "type": "color", "section": "branding", "help": "Secondary highlight color (#rrggbb). Applies instantly."}, {"key": "sourceview_max_files", "label": "View sources (files)", "type": "int", "section": "maps", "min": 0, "max": 100000, "help": "Files embedding source for the View button. Needs rebuild."}, {"key": "sourceview_max_total_chars", "label": "View sources (chars)", "type": "int", "section": "maps", "min": 0, "max": 1000000000, "help": "Total char budget across embedded sources. Needs rebuild."}, {"key": "readme_heading", "label": "README heading", "type": "text", "section": "messages", "help": "README injection heading. Empty = built-in. Needs rebuild."}, {"key": "readme_intro", "label": "README intro", "type": "textarea", "section": "messages", "help": "Opening paragraph of the README section. Needs rebuild."}, {"key": "readme_agents_line", "label": "README agents line", "type": "text", "section": "messages", "help": "Closing 'AI agents' guidance line. Needs rebuild."}, {"key": "readme_developers_line", "label": "README developers line", "type": "text", "section": "messages", "help": "Closing 'Developers' guidance line. Needs rebuild."}, {"key": "readme_regen_command", "label": "Regen command", "type": "text", "section": "messages", "help": "Rebuild command shown in injections. Needs rebuild."}, {"key": "agent_heading", "label": "Agent heading", "type": "text", "section": "messages", "help": "Agent files injection heading. Needs rebuild."}, {"key": "agent_intro", "label": "Agent intro", "type": "textarea", "section": "messages", "help": "Opening paragraph of agent injections. Needs rebuild."}, {"key": "agent_extra", "label": "Agent extra", "type": "textarea", "section": "messages", "help": "Extra project instructions appended to agent files. Needs rebuild."}, {"key": "folder_notice", "label": "Folder notice", "type": "textarea", "section": "messages", "help": "Notice paragraph in generated folder READMEs. Needs rebuild."}];
function defaults(){var d={};try{d=window.__RM_VIEWER__||{};}catch(e){}return d;}
function stored(){try{var raw=localStorage.getItem(LS_KEY);if(raw)return JSON.parse(raw);}catch(e){}return {};}
function save(patch){try{var cur=stored();for(var k in patch)cur[k]=patch[k];localStorage.setItem(LS_KEY,JSON.stringify(cur));}catch(e){}}
function clear(){try{localStorage.removeItem(LS_KEY);}catch(e){}}
function current(){var d=defaults(),s=stored(),out={};for(var i=0;i<SCHEMA.length;i++){var k=SCHEMA[i].key;out[k]=(k in s)?s[k]:d[k];}return out;}
function setTheme(t){try{document.documentElement.setAttribute("data-theme",t);localStorage.setItem("readmenator-theme",t);}catch(e){try{document.documentElement.setAttribute("data-theme",t);}catch(_){}}}
function setAccent(which,val){
if(!/^#[0-9a-fA-F]{3}([0-9a-fA-F]{3}([0-9a-fA-F]{2})?)?$/.test(String(val||"")))return false;
try{document.documentElement.style.setProperty(which,val);}catch(e){return false;}
return true;
}
function num(v,f){var n=parseFloat(v);return isFinite(n)?n:f;}
function applyLive(patch){
patch=patch||{};var live=[];
if("theme" in patch||"html_style" in patch){setTheme(patch.theme||patch.html_style||"dark");live.push("theme");}
if("accent" in patch&&setAccent("--accent",patch.accent))live.push("accent");
if("accent2" in patch&&setAccent("--accent2",patch.accent2))live.push("accent2");
try{
if(typeof window.ReadmenatorViewerApply==="function"){
var r=window.ReadmenatorViewerApply(patch);
if(r===true){if(live.indexOf("view")<0)live.push("view");}
else if(r&&r.length)for(var i=0;i<r.length;i++)if(live.indexOf(r[i])<0)live.push(r[i]);
}
}catch(e){if(window.console)console.warn("viewer apply failed",e);}
return live;
}
function fieldRow(spec,val){
var row=document.createElement("div");row.className="rm-cfg-row";
var lab=document.createElement("label");lab.textContent=spec.label;lab.setAttribute("for","rm-cfg-"+spec.key);row.appendChild(lab);
var input;
if(spec.type==="bool"){input=document.createElement("input");input.type="checkbox";input.checked=!!val;}
else if(spec.type==="select"){input=document.createElement("select");(spec.options||[]).forEach(function(o){var op=document.createElement("option");op.value=o;op.textContent=o;if(String(o)===String(val))op.selected=true;input.appendChild(op);});}
else if(spec.type==="color"){input=document.createElement("input");input.type="color";try{input.value=/^#[0-9a-fA-F]{6}$/.test(String(val||""))?val:"#22d3ee";}catch(e){input.value="#22d3ee";}}
else if(spec.type==="text"){input=document.createElement("input");input.type="text";input.value=(val==null?"":String(val));if(spec.key.indexOf("_url")>=0)input.placeholder="https:"+"//your-site.example/…";}
else if(spec.type==="textarea"){input=document.createElement("textarea");input.rows=3;input.value=(val==null?"":String(val));}
else{input=document.createElement("input");input.type="number";input.value=val;if(spec.min!=null)input.min=spec.min;if(spec.max!=null)input.max=spec.max;if(spec.step)input.step=spec.step;}
input.id="rm-cfg-"+spec.key;input.dataset.key=spec.key;row.appendChild(input);
if(spec.help){var h=document.createElement("p");h.className="rm-cfg-help";h.textContent=spec.help;row.appendChild(h);}
return row;
}
function renderForm(){
var form=document.getElementById("rm-cfg-form");
if(!form)return {};
while(form.firstChild)form.removeChild(form.firstChild);
var cur=current(),lastSec="";
SCHEMA.forEach(function(spec){
var sec=spec.section||"viewer";
if(sec!==lastSec){lastSec=sec;var hd=document.createElement("h3");hd.className="rm-cfg-sec";hd.textContent=sec.charAt(0).toUpperCase()+sec.slice(1);form.appendChild(hd);}
form.appendChild(fieldRow(spec,cur[spec.key]));
});
window.__rmCfgBase__=cur;
return cur;
}
function openModal(){
var scrim=document.getElementById("rm-cfg-scrim"),modal=document.getElementById("rm-cfg-modal");
if(!scrim||!modal)return;
renderForm();
scrim.classList.add("open");modal.classList.add("open");modal.setAttribute("aria-hidden","false");
var first=document.getElementById("rm-cfg-form").querySelector("select,input,textarea");if(first)first.focus();
}
function closeModal(){var scrim=document.getElementById("rm-cfg-scrim"),modal=document.getElementById("rm-cfg-modal");if(scrim)scrim.classList.remove("open");if(modal){modal.classList.remove("open");modal.setAttribute("aria-hidden","true");}}
function readForm(){
var patch={},form=document.getElementById("rm-cfg-form");
var els=form.querySelectorAll("[data-key]");
for(var i=0;i<els.length;i++){var el=els[i],k=el.dataset.key,spec=null;
for(var j=0;j<SCHEMA.length;j++)if(SCHEMA[j].key===k)spec=SCHEMA[j];
if(!spec)continue;
if(spec.type==="bool")patch[k]=!!el.checked;
else if(spec.type==="int")patch[k]=Math.round(num(el.value,0));
else if(spec.type==="number")patch[k]=num(el.value,0);
else patch[k]=el.value;
}
return patch;
}
function toToml(patch){
var sections={},order=[];
SCHEMA.forEach(function(spec){
if(!(spec.key in patch))return;
var sec=spec.section||"viewer";
if(!(sec in sections)){sections[sec]=[];order.push(sec);}
var v=patch[spec.key],lit;
if(typeof v==="boolean")lit=v?"true":"false";
else if(typeof v==="number")lit=String(v);
else lit='"'+String(v).replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")+'"';
sections[sec].push(spec.key+" = "+lit);
});
var lines=[];
order.forEach(function(sec){lines.push("["+sec+"]");lines.push(sections[sec].join("\n"));lines.push("");});
return lines.join("\n").replace(/\n$/,"");
}
function status(msg){var s=document.getElementById("rm-cfg-status");if(s)s.textContent=msg;}
function boot(){
document.querySelectorAll("[data-rm-config]").forEach(function(btn){
if(btn.__rmBound)return;btn.__rmBound=true;
btn.addEventListener("click",openModal);
});
var scrim=document.getElementById("rm-cfg-scrim");
if(scrim)scrim.addEventListener("click",closeModal);
var close=document.getElementById("rm-cfg-close");
if(close)close.addEventListener("click",closeModal);
document.addEventListener("keydown",function(e){if(e.key==="Escape")closeModal();});
var apply=document.getElementById("rm-cfg-apply");
if(apply)apply.addEventListener("click",function(){
var patch=readForm(),base=window.__rmCfgBase__||{},dirty={};
for(var k in patch)if(patch[k]!==base[k])dirty[k]=patch[k];
save(patch);
var live=applyLive(dirty);
var pending=Object.keys(dirty).filter(function(k){return live.indexOf(k)<0;});
var msg="";
if(live.length)msg+="Live: "+live.join(", ")+". ";
if(pending.length)msg+="Needs rebuild: "+pending.join(", ")+".";
status(msg||"No changes.");
window.__rmCfgBase__=patch;
});
var reset=document.getElementById("rm-cfg-reset");
if(reset)reset.addEventListener("click",function(){
if(!window.confirm("Clear local Config overrides and restore last-rebuild defaults?"))return;
clear();
renderForm();
applyLive(current());
status("Local overrides cleared. Last-rebuild defaults restored.");
});
var copy=document.getElementById("rm-cfg-copy");
if(copy)copy.addEventListener("click",function(){
var toml=toToml(readForm());
function done(){status("Copied TOML sections. Paste them into readmenator.toml and rebuild to persist.");}
try{
if(navigator.clipboard&&navigator.clipboard.writeText)navigator.clipboard.writeText(toml).then(done,function(){status(toml);});
else status(toml);
}catch(e){status(toml);}
});
var init=stored();
if(init&&Object.keys(init).length)applyLive(init);
}
if(document.readyState==="loading")document.addEventListener("DOMContentLoaded",boot);else boot();
})();
</script>
</body>
</html>