code wiki / _hdl_build / nx_magicnum_preventer.nx
nx_magicnum_preventer.nx
buildroot/runtime/_hdl_build/nx_magicnum_preventer.nx
dependencies 3 imports · 0 importers
imports: nx_gate_gn.nxnx_gate_base.nxnx_syscalls.nx
imported by: nobody (leaf or entry point)
structs
| none |
consts
| 12 | const NX_MAGIC_1048576: i64 = 1048576 |
| 13 | const NX_MAGIC_65536: i64 = 65536 |
| 14 | const NX_MAGIC_1000000: i64 = 1000000 |
| 16 | const NX_MAGICNUM_BUDGET: i64 = 0 // zero-tolerance for NEW code (named, not a magic number) |
| 17 | const NX_MAGICNUM_DET_MASK: i64 = 51 // the team's discovered detector (require>=2, exclude const-line+identifier) |
functions
| 19 | func grow(name: *u8, ok: i64) -> i64 { if ok==1 { gw(" PASS " as *u8) } else { gw(" FAIL " as *u8) } gw(name); gw(" calls 1: gw |
| 21 | func slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 22 | func is_digit(c: u8) -> i64 { if c>=(48 as u8) { if c<=(57 as u8) { return 1 } } return 0 } |
| 23 | func is_alnum_us(c: u8) -> i64 |
| 30 | func match_at(buf: *u8, i: i64, len: i64, lit: *u8) -> i64 |
| 35 | func trit_pass(t: i64, pv: i64) -> i64 { if t==0 { return 1 } if t==1 { if pv==1 { return 1 } return 0 } if pv==0 { return 1 } return 0 } |
| 37 | func scan_count(buf: *u8, len: i64, mask: i64) -> i64 |
| 65 | func preventer_gate(buf: *u8, len: i64) -> i64 |
| 70 | func read_file(path: *u8, lenbox: *i64) -> i64 |
| 77 | func main() -> i64 |