code wiki / _hdl_build / nx_email_retrieve_gate.nx

nx_email_retrieve_gate.nx

buildroot/runtime/_hdl_build/nx_email_retrieve_gate.nx

6360 B130 linesdepth 2pulls 3 transitivereach 0 importersview sourcekind gate/prooftopic email
docsdependenciesstructsconstsfunctions

about

nx_email_retrieve_gate.nx -- GATE for EMAIL R4 (POP3/IMAP, nx_email_retrieve). COMPLETENESS : POP3 +OK/-ERR status, STAT count/octets, command build, multi-line de-dot-stuffing + terminator; IMAP tagged command build, tagged completion status, literal "{n}" size. NEG-CONTROL : a non-status POP3 line -> -1; an IMAP response with only untagged data -> incomplete (0). TAMPER : IMAP status scan SKIPS untagged "* OK [...]" lines and returns the real tagged "A001 OK" (untagged-confusion defense); POP3 de-dot turns "..x" into ".x" and stops exactly at the lone "." terminator. Evidence -> knowledge/status/email_retrieve.log (RETRIEVEGATE authored=organ ... verdict=GREEN) license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_email_retrieve.nx nx_syscalls.nx nx_email_retrieve_gate.nx

imports: nx_email_retrieve.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap nx_pop3_reply_ok slen nx_pop3_parse_stat nx_pop3_reply_ok ↻ nx_pop3_build er_cat er_catn memeq nx_pop3_dedot nx_pop3_multiline_complete nx_imap_build_tagged er_catn ↻ nx_imap_reply_status er_match nx_imap_literal_size ew sys_write epf ew ↻ ewn sys_mmap ↻ sys_write ↻ sys_openat_append sys_close

structs

none

consts

20const RET_LOG: *u8 = "knowledge/status/email_retrieve.log"

functions

22func ew(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 }
called by 2: epfmain calls 1: sys_write
23func ewn(fd: i64, v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
32func epf(fd: i64, label: *u8, pass: i64) -> i64 { ew(fd, label); if pass == 1 { ew(fd, "PASS" as *u8) } else { ew(fd, "FAIL" as *u8) } return 0 }
called by 1: main calls 1: ew
33func slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: main
34func memeq(a: *u8, b: *u8, len: i64) -> i64 { var i: i64 = 0; while i < len { if a[i] != b[i] { return 0 } i = i + 1 } return 1 }
called by 1: main
36func main() -> i64