code wiki / (root) / nx_obj_import_gate.nx

nx_obj_import_gate.nx

buildroot/runtime/nx_obj_import_gate.nx

4448 B80 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/prooftopic obj
docsdependenciesstructsconstsfunctions

about

nx_obj_import_gate.nx -- liar-killed GATE for the OBJ reader. The load-bearing teeth are the REAL-WORLD forms, not a round-trip of our own exporter. A parser that only reads nx_obj_export's output would pass a round-trip test and still fail on every mesh anyone actually hands us, because external OBJ carries floats, negative indices and n-gons. Tooth total is DERIVED; G_MIN_TEETH is a floor so a deleted tooth trips RED. usage: nx_obj_import_gate exit 0 on all-pass. license_tier: ORIGINAL expect_exit: 0

dependencies 1 imports · 0 importers

nx_obj_import.nx nx_obj_import_gate.nx

imports: nx_obj_import.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main g_write g_slen oi_read sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close oi_ws oi_fx oi_ws ↻ oi_is_digit oi_faceref oi_ws ↻ oi_is_digit ↻ oi_eol sys_munmap ↻ g_eq g_puts g_putn g_puts ↻ g_putn ↻

structs

none

consts

11const G_MIN_TEETH: i64 = 14

functions

13func g_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 2: g_eqmain
14func g_putn(v: i64) -> i64
called by 2: g_eqmain
26func g_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: g_write
27func g_eq(name: *u8, got: i64, want: i64, passp: *i64) -> i64
called by 1: main calls 2: g_putsg_putn
33func g_write(path: *u8, s: *u8) -> i64 { let fd: i64 = sys_openat_wr(path, 420); if fd < 0 { return 0 - 1 } sys_write(fd, s, g_slen(s)); sys_close(fd); return 0 }
called by 1: main calls 1: g_slen
35func main() -> i64