code wiki / _hdl_build / nx_xlsx_gate.nx

nx_xlsx_gate.nx

buildroot/runtime/_hdl_build/nx_xlsx_gate.nx

8370 B96 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind gate/prooftopic xlsx
docsdependenciesstructsconstsfunctions

about

nx_xlsx_gate.nx -- proves sovereign .xlsx (SpreadsheetML) interop by driving the REAL /tmp/nx_xlsx.sov.elf fully within the Nishi ecosystem (the gate authors the TSV itself via syscalls): ROUND-TRIP : a tab grid -> .xlsx -> read back -> the grid is recovered (string cells incl '&', numeric cells) TYPING : a number is stored as a NUMERIC <v> cell (so Excel can sum it), not text STRUCTURE : the file is a valid ZIP (PK\x03\x04) carrying the 5 SpreadsheetML OPC parts GREEN iff 8/8. Requires /tmp/nx_xlsx.sov.elf. Durable knowledge/status/xlsx_gate.log. license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_xlsx_gate.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

structs

none

consts

none

functions

9func 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 }
10func g_num(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=(48 as u8);k=1}; while m>0{t[k]=((48+(m%10)) as u8);m=m/10;k=k+1}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(1,bb,k); return 0 }
11func g_w(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 }
12func g_wn(fd: i64, v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(fd,"-" as *u8,1)}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=(48 as u8);k=1}; while m>0{t[k]=((48+(m%10)) as u8);m=m/10;k=k+1}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(fd,bb,k); return 0 }
13func g_strlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
14func g_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){ dst[off+i]=s[i]; i=i+1 } return off+i }
15func g_read(path: *u8, buf: *u8, cap: i64) -> i64
21func g_contains(hay: *u8, n: i64, needle: *u8) -> i64
27func g_run(elf: *u8, args: *i64, nargs: i64, out_path: *u8) -> i64
40func g_write_tsv(path: *u8) -> i64
50func main() -> i64