code wiki / (root) / nx_modesty_profile.nx

nx_modesty_profile.nx source

↩ module page · 468 lines · 18625 B

1// nx_modesty_profile.nx -- sealed-enum catalog of modesty standards. 2// 3// CAPABILITY_COMPLETENESS: FULL (for the 16 starter profiles; 4// additional cultural standards register via the catalog 5// extension path documented in NISHI_OCCLUSION_AND_MODESTY_ 6// ENGINEERING.md) 7// 8// User direction 2026-05-16: 9// "i want to take advantage of nsfw flagging by using it as 10// engineering so we can make sure occlusion isnt happening and 11// other things so she is how she wants to be in situations like 12// how ancient people had different modesty standards etc" 13// 14// The substrate's distinctive offer over existing NSFW classifiers: 15// - Per-anatomical-region required-coverage thresholds in Q10 16// - Sealed-enum catalog of culturally-specific profiles 17// - Subject-chosen profile (not platform-imposed) 18// - Composes with nx_occlusion_grade (queued) -> nx_modesty_match 19// to produce a sealed match verdict per profile 20// 21// genealogy_id: substrate_modesty_engineering_2026_05_16 22// lineage_id: nx_modesty_profile_v1 23 24import "nx_syscalls.nx" 25import "nx_runtime.nx" 26import "nx_tier.nx" 27const NX_MAGIC_1024: i64 = 1024 28 29const NX_MP_Q10: nx_int = 1024 30 31// ===== sealed-enum: anatomical region IDs ======================== 32// 33// Inspired by the NudeNet 18-class taxonomy + extensions for 34// cross-cultural modesty profiles (hair / face_lower / ankles etc. 35// which NudeNet doesn't model). 36 37const NX_REGION_HAIR: nx_int = 0 38const NX_REGION_FACE_UPPER: nx_int = 1 // forehead, eyes, nose, cheeks 39const NX_REGION_FACE_LOWER: nx_int = 2 // mouth, chin (covered by niqab) 40const NX_REGION_NECK: nx_int = 3 41const NX_REGION_SHOULDERS: nx_int = 4 42const NX_REGION_CHEST_FULL: nx_int = 5 // entire chest area 43const NX_REGION_NIPPLE_F: nx_int = 6 // female nipple specifically 44const NX_REGION_NIPPLE_M: nx_int = 7 // male nipple 45const NX_REGION_MIDRIFF: nx_int = 8 // abdomen / belly 46const NX_REGION_BACK_UPPER: nx_int = 9 47const NX_REGION_BACK_LOWER: nx_int = 10 48const NX_REGION_BUTTOCKS: nx_int = 11 49const NX_REGION_GROIN: nx_int = 12 // pubic / pelvic 50const NX_REGION_GENITALIA: nx_int = 13 // genitals proper 51const NX_REGION_ARMPITS: nx_int = 14 52const NX_REGION_UPPER_ARMS: nx_int = 15 53const NX_REGION_FOREARMS: nx_int = 16 54const NX_REGION_HANDS: nx_int = 17 55const NX_REGION_THIGHS: nx_int = 18 56const NX_REGION_KNEES: nx_int = 19 57const NX_REGION_CALVES: nx_int = 20 58const NX_REGION_ANKLES: nx_int = 21 59const NX_REGION_FEET: nx_int = 22 60const NX_REGION_N_KINDS: nx_int = 23 61 62func nx_region_is_valid(r: nx_int) -> nx_int { 63 if r < 0 { return 0 } 64 if r >= NX_REGION_N_KINDS { return 0 } 65 return 1 66} 67 68// ===== sealed-enum: modesty profile IDs ========================== 69 70const NX_MODESTY_MODERN_WESTERN_CASUAL: nx_int = 0 71const NX_MODESTY_MODERN_WESTERN_FORMAL: nx_int = 1 72const NX_MODESTY_MODERN_WESTERN_BEACH: nx_int = 2 73const NX_MODESTY_MODERN_LINGERIE: nx_int = 3 74const NX_MODESTY_VICTORIAN: nx_int = 4 75const NX_MODESTY_ANCIENT_GREEK_ATHLETIC_M: nx_int = 5 76const NX_MODESTY_ANCIENT_GREEK_ATHLETIC_F: nx_int = 6 77const NX_MODESTY_ANCIENT_ROMAN_PUBLIC: nx_int = 7 78const NX_MODESTY_RENAISSANCE_NOBILITY: nx_int = 8 79const NX_MODESTY_HEIAN_COURT: nx_int = 9 80const NX_MODESTY_ISLAMIC_HIJAB: nx_int = 10 81const NX_MODESTY_ISLAMIC_NIQAB: nx_int = 11 82const NX_MODESTY_HINDU_SARI: nx_int = 12 83const NX_MODESTY_MEDICAL_PROFESSIONAL: nx_int = 13 84const NX_MODESTY_ARTISTIC_NUDE_RENAISSANCE: nx_int = 14 85const NX_MODESTY_ATHLETIC_DANCE: nx_int = 15 86const NX_MODESTY_N_PROFILES: nx_int = 16 87 88func nx_modesty_profile_is_valid(p: nx_int) -> nx_int { 89 if p < 0 { return 0 } 90 if p >= NX_MODESTY_N_PROFILES { return 0 } 91 return 1 92} 93 94// ===== profile struct ============================================ 95// 96// Per-region required coverage in Q10. Default = 0 (no requirement) 97// for regions not explicitly listed by the profile. 98 99struct NxModestyProfile { 100 profile_id: nx_int, 101 n_regions_listed: nx_int, 102 required_q10: *nx_int, // length NX_REGION_N_KINDS; index = region_id 103} 104 105const NX_MP_PROFILE_BYTES: nx_size = 24 106 107// ===== required-coverage lookup helpers ========================= 108// 109// Each helper builds the per-region required_q10 array for one 110// profile. Default-initialized to 0; explicit entries override. 111 112func _mp_alloc_required() -> *nx_int { 113 let bytes: nx_size = (NX_REGION_N_KINDS as nx_size) * 8 114 let arr: *nx_int = (sys_mmap(bytes)) as *nx_int 115 var i: nx_int = 0 116 while i < NX_REGION_N_KINDS { 117 arr[i] = 0 118 i = i + 1 119 } 120 return arr 121} 122 123func _mp_build_western_casual() -> *nx_int { 124 let req: *nx_int = _mp_alloc_required() 125 req[NX_REGION_NIPPLE_F] = NX_MAGIC_1024 126 req[NX_REGION_GROIN] = NX_MAGIC_1024 127 req[NX_REGION_GENITALIA] = NX_MAGIC_1024 128 req[NX_REGION_BUTTOCKS] = NX_MAGIC_1024 129 return req 130} 131 132func _mp_build_western_formal() -> *nx_int { 133 let req: *nx_int = _mp_alloc_required() 134 req[NX_REGION_NIPPLE_F] = NX_MAGIC_1024 135 req[NX_REGION_GROIN] = NX_MAGIC_1024 136 req[NX_REGION_GENITALIA] = NX_MAGIC_1024 137 req[NX_REGION_BUTTOCKS] = NX_MAGIC_1024 138 req[NX_REGION_MIDRIFF] = 512 139 return req 140} 141 142func _mp_build_western_beach() -> *nx_int { 143 let req: *nx_int = _mp_alloc_required() 144 req[NX_REGION_NIPPLE_F] = NX_MAGIC_1024 145 req[NX_REGION_GROIN] = NX_MAGIC_1024 146 req[NX_REGION_GENITALIA] = NX_MAGIC_1024 147 return req 148} 149 150func _mp_build_modern_lingerie() -> *nx_int { 151 let req: *nx_int = _mp_alloc_required() 152 req[NX_REGION_NIPPLE_F] = NX_MAGIC_1024 153 req[NX_REGION_GROIN] = NX_MAGIC_1024 154 req[NX_REGION_GENITALIA] = NX_MAGIC_1024 155 return req 156} 157 158func _mp_build_victorian() -> *nx_int { 159 let req: *nx_int = _mp_alloc_required() 160 req[NX_REGION_SHOULDERS] = NX_MAGIC_1024 161 req[NX_REGION_CHEST_FULL] = NX_MAGIC_1024 162 req[NX_REGION_NIPPLE_F] = NX_MAGIC_1024 163 req[NX_REGION_MIDRIFF] = NX_MAGIC_1024 164 req[NX_REGION_GROIN] = NX_MAGIC_1024 165 req[NX_REGION_GENITALIA] = NX_MAGIC_1024 166 req[NX_REGION_BUTTOCKS] = NX_MAGIC_1024 167 req[NX_REGION_UPPER_ARMS] = NX_MAGIC_1024 168 req[NX_REGION_FOREARMS] = NX_MAGIC_1024 169 req[NX_REGION_THIGHS] = NX_MAGIC_1024 170 req[NX_REGION_KNEES] = 820 171 req[NX_REGION_ANKLES] = 820 172 req[NX_REGION_CALVES] = NX_MAGIC_1024 173 req[NX_REGION_BACK_UPPER] = NX_MAGIC_1024 174 req[NX_REGION_BACK_LOWER] = NX_MAGIC_1024 175 return req 176} 177 178func _mp_build_greek_male_athletic() -> *nx_int { 179 // Gymnos: male athletic nudity normalized; NO coverage required. 180 return _mp_alloc_required() 181} 182 183func _mp_build_greek_female_athletic() -> *nx_int { 184 let req: *nx_int = _mp_alloc_required() 185 req[NX_REGION_CHEST_FULL] = NX_MAGIC_1024 186 req[NX_REGION_NIPPLE_F] = NX_MAGIC_1024 187 req[NX_REGION_GROIN] = NX_MAGIC_1024 188 req[NX_REGION_GENITALIA] = NX_MAGIC_1024 189 req[NX_REGION_BUTTOCKS] = NX_MAGIC_1024 190 return req 191} 192 193func _mp_build_roman_public() -> *nx_int { 194 let req: *nx_int = _mp_alloc_required() 195 req[NX_REGION_SHOULDERS] = 512 196 req[NX_REGION_CHEST_FULL] = 820 197 req[NX_REGION_NIPPLE_F] = NX_MAGIC_1024 198 req[NX_REGION_MIDRIFF] = 820 199 req[NX_REGION_GROIN] = NX_MAGIC_1024 200 req[NX_REGION_GENITALIA] = NX_MAGIC_1024 201 req[NX_REGION_BUTTOCKS] = NX_MAGIC_1024 202 req[NX_REGION_THIGHS] = 820 203 return req 204} 205 206func _mp_build_renaissance_nobility() -> *nx_int { 207 let req: *nx_int = _mp_alloc_required() 208 req[NX_REGION_NIPPLE_F] = 820 209 req[NX_REGION_MIDRIFF] = NX_MAGIC_1024 210 req[NX_REGION_GROIN] = NX_MAGIC_1024 211 req[NX_REGION_GENITALIA] = NX_MAGIC_1024 212 req[NX_REGION_BUTTOCKS] = NX_MAGIC_1024 213 req[NX_REGION_THIGHS] = NX_MAGIC_1024 214 return req 215} 216 217func _mp_build_heian_court() -> *nx_int { 218 let req: *nx_int = _mp_alloc_required() 219 req[NX_REGION_NECK] = NX_MAGIC_1024 220 req[NX_REGION_SHOULDERS] = NX_MAGIC_1024 221 req[NX_REGION_CHEST_FULL] = NX_MAGIC_1024 222 req[NX_REGION_NIPPLE_F] = NX_MAGIC_1024 223 req[NX_REGION_MIDRIFF] = NX_MAGIC_1024 224 req[NX_REGION_BACK_UPPER] = NX_MAGIC_1024 225 req[NX_REGION_BACK_LOWER] = NX_MAGIC_1024 226 req[NX_REGION_GROIN] = NX_MAGIC_1024 227 req[NX_REGION_GENITALIA] = NX_MAGIC_1024 228 req[NX_REGION_BUTTOCKS] = NX_MAGIC_1024 229 req[NX_REGION_UPPER_ARMS] = NX_MAGIC_1024 230 req[NX_REGION_FOREARMS] = NX_MAGIC_1024 231 req[NX_REGION_HANDS] = 720 232 req[NX_REGION_THIGHS] = NX_MAGIC_1024 233 req[NX_REGION_KNEES] = NX_MAGIC_1024 234 req[NX_REGION_CALVES] = NX_MAGIC_1024 235 req[NX_REGION_FACE_LOWER] = 820 236 return req 237} 238 239func _mp_build_islamic_hijab() -> *nx_int { 240 let req: *nx_int = _mp_alloc_required() 241 req[NX_REGION_HAIR] = NX_MAGIC_1024 242 req[NX_REGION_NECK] = 820 243 req[NX_REGION_SHOULDERS] = NX_MAGIC_1024 244 req[NX_REGION_CHEST_FULL] = NX_MAGIC_1024 245 req[NX_REGION_NIPPLE_F] = NX_MAGIC_1024 246 req[NX_REGION_MIDRIFF] = NX_MAGIC_1024 247 req[NX_REGION_BACK_UPPER] = NX_MAGIC_1024 248 req[NX_REGION_BACK_LOWER] = NX_MAGIC_1024 249 req[NX_REGION_GROIN] = NX_MAGIC_1024 250 req[NX_REGION_GENITALIA] = NX_MAGIC_1024 251 req[NX_REGION_BUTTOCKS] = NX_MAGIC_1024 252 req[NX_REGION_UPPER_ARMS] = NX_MAGIC_1024 253 req[NX_REGION_FOREARMS] = NX_MAGIC_1024 254 req[NX_REGION_THIGHS] = NX_MAGIC_1024 255 req[NX_REGION_KNEES] = NX_MAGIC_1024 256 req[NX_REGION_CALVES] = NX_MAGIC_1024 257 return req 258} 259 260func _mp_build_islamic_niqab() -> *nx_int { 261 let req: *nx_int = _mp_build_islamic_hijab() 262 req[NX_REGION_FACE_LOWER] = NX_MAGIC_1024 263 return req 264} 265 266func _mp_build_hindu_sari() -> *nx_int { 267 let req: *nx_int = _mp_alloc_required() 268 req[NX_REGION_CHEST_FULL] = 820 269 req[NX_REGION_NIPPLE_F] = NX_MAGIC_1024 270 req[NX_REGION_GROIN] = NX_MAGIC_1024 271 req[NX_REGION_GENITALIA] = NX_MAGIC_1024 272 req[NX_REGION_BUTTOCKS] = NX_MAGIC_1024 273 req[NX_REGION_THIGHS] = 820 274 return req 275} 276 277func _mp_build_medical_professional() -> *nx_int { 278 let req: *nx_int = _mp_alloc_required() 279 req[NX_REGION_CHEST_FULL] = NX_MAGIC_1024 280 req[NX_REGION_NIPPLE_F] = NX_MAGIC_1024 281 req[NX_REGION_NIPPLE_M] = 720 282 req[NX_REGION_MIDRIFF] = 820 283 req[NX_REGION_GROIN] = NX_MAGIC_1024 284 req[NX_REGION_GENITALIA] = NX_MAGIC_1024 285 req[NX_REGION_BUTTOCKS] = NX_MAGIC_1024 286 return req 287} 288 289func _mp_build_artistic_renaissance() -> *nx_int { 290 // Renaissance artistic nude: no coverage; pose + lighting 291 // convention enforced by a separate primitive (queued). 292 return _mp_alloc_required() 293} 294 295func _mp_build_athletic_dance() -> *nx_int { 296 let req: *nx_int = _mp_alloc_required() 297 req[NX_REGION_NIPPLE_F] = NX_MAGIC_1024 298 req[NX_REGION_CHEST_FULL] = 820 299 req[NX_REGION_GROIN] = NX_MAGIC_1024 300 req[NX_REGION_GENITALIA] = NX_MAGIC_1024 301 req[NX_REGION_BUTTOCKS] = NX_MAGIC_1024 302 return req 303} 304 305// ===== profile factory =========================================== 306 307func nx_modesty_profile_get(profile_id: nx_int) -> *NxModestyProfile { 308 if nx_modesty_profile_is_valid(profile_id) == 0 { 309 return 0 as *NxModestyProfile 310 } 311 let p: *u8 = sys_mmap(NX_MP_PROFILE_BYTES) 312 let prof: *NxModestyProfile = p as *NxModestyProfile 313 prof.profile_id = profile_id 314 315 var req: *nx_int = 0 as *nx_int 316 if profile_id == NX_MODESTY_MODERN_WESTERN_CASUAL { 317 req = _mp_build_western_casual() 318 } 319 if profile_id == NX_MODESTY_MODERN_WESTERN_FORMAL { 320 req = _mp_build_western_formal() 321 } 322 if profile_id == NX_MODESTY_MODERN_WESTERN_BEACH { 323 req = _mp_build_western_beach() 324 } 325 if profile_id == NX_MODESTY_MODERN_LINGERIE { 326 req = _mp_build_modern_lingerie() 327 } 328 if profile_id == NX_MODESTY_VICTORIAN { 329 req = _mp_build_victorian() 330 } 331 if profile_id == NX_MODESTY_ANCIENT_GREEK_ATHLETIC_M { 332 req = _mp_build_greek_male_athletic() 333 } 334 if profile_id == NX_MODESTY_ANCIENT_GREEK_ATHLETIC_F { 335 req = _mp_build_greek_female_athletic() 336 } 337 if profile_id == NX_MODESTY_ANCIENT_ROMAN_PUBLIC { 338 req = _mp_build_roman_public() 339 } 340 if profile_id == NX_MODESTY_RENAISSANCE_NOBILITY { 341 req = _mp_build_renaissance_nobility() 342 } 343 if profile_id == NX_MODESTY_HEIAN_COURT { 344 req = _mp_build_heian_court() 345 } 346 if profile_id == NX_MODESTY_ISLAMIC_HIJAB { 347 req = _mp_build_islamic_hijab() 348 } 349 if profile_id == NX_MODESTY_ISLAMIC_NIQAB { 350 req = _mp_build_islamic_niqab() 351 } 352 if profile_id == NX_MODESTY_HINDU_SARI { 353 req = _mp_build_hindu_sari() 354 } 355 if profile_id == NX_MODESTY_MEDICAL_PROFESSIONAL { 356 req = _mp_build_medical_professional() 357 } 358 if profile_id == NX_MODESTY_ARTISTIC_NUDE_RENAISSANCE { 359 req = _mp_build_artistic_renaissance() 360 } 361 if profile_id == NX_MODESTY_ATHLETIC_DANCE { 362 req = _mp_build_athletic_dance() 363 } 364 365 // Count regions listed (required > 0). 366 var n_listed: nx_int = 0 367 var i: nx_int = 0 368 while i < NX_REGION_N_KINDS { 369 if req[i] > 0 { n_listed = n_listed + 1 } 370 i = i + 1 371 } 372 prof.n_regions_listed = n_listed 373 prof.required_q10 = req 374 return prof 375} 376 377// ===== required-coverage lookup ================================== 378// 379// Returns required Q10 coverage for (profile, region). Returns 0 380// for regions not listed (no requirement). 381 382func nx_modesty_required_coverage(profile: *NxModestyProfile, 383 region_id: nx_int) -> nx_int { 384 if nx_region_is_valid(region_id) == 0 { return -1 } 385 return profile.required_q10[region_id] 386} 387 388// ===== self-test ================================================= 389 390func main() -> nx_int { 391 // ---- Western casual: groin + nipple_f + genitalia + buttocks ---- 392 let p_wc: *NxModestyProfile = nx_modesty_profile_get( 393 NX_MODESTY_MODERN_WESTERN_CASUAL) 394 if p_wc == (0 as *NxModestyProfile) { return 1 } 395 if nx_modesty_required_coverage(p_wc, NX_REGION_GROIN) != NX_MAGIC_1024 { return 2 } 396 if nx_modesty_required_coverage(p_wc, NX_REGION_NIPPLE_F) != NX_MAGIC_1024 { return 3 } 397 if nx_modesty_required_coverage(p_wc, NX_REGION_GENITALIA) != NX_MAGIC_1024 { return 4 } 398 if nx_modesty_required_coverage(p_wc, NX_REGION_BUTTOCKS) != NX_MAGIC_1024 { return 5 } 399 // Western casual does NOT require midriff coverage. 400 if nx_modesty_required_coverage(p_wc, NX_REGION_MIDRIFF) != 0 { return 6 } 401 if nx_modesty_required_coverage(p_wc, NX_REGION_SHOULDERS) != 0 { return 7 } 402 // 4 regions listed. 403 if p_wc.n_regions_listed != 4 { return 8 } 404 405 // ---- Victorian: many regions including knees + ankles + forearms ---- 406 let p_vict: *NxModestyProfile = nx_modesty_profile_get(NX_MODESTY_VICTORIAN) 407 if nx_modesty_required_coverage(p_vict, NX_REGION_SHOULDERS) != NX_MAGIC_1024 { return 10 } 408 if nx_modesty_required_coverage(p_vict, NX_REGION_KNEES) != 820 { return 11 } 409 if nx_modesty_required_coverage(p_vict, NX_REGION_ANKLES) != 820 { return 12 } 410 if nx_modesty_required_coverage(p_vict, NX_REGION_UPPER_ARMS) != NX_MAGIC_1024 { return 13 } 411 if p_vict.n_regions_listed < 13 { return 14 } 412 413 // ---- Greek athletic male: ZERO regions listed ---- 414 let p_gam: *NxModestyProfile = nx_modesty_profile_get( 415 NX_MODESTY_ANCIENT_GREEK_ATHLETIC_M) 416 if p_gam.n_regions_listed != 0 { return 20 } 417 if nx_modesty_required_coverage(p_gam, NX_REGION_GROIN) != 0 { return 21 } 418 419 // ---- Greek athletic female: chest + groin + buttocks etc ---- 420 let p_gaf: *NxModestyProfile = nx_modesty_profile_get( 421 NX_MODESTY_ANCIENT_GREEK_ATHLETIC_F) 422 if nx_modesty_required_coverage(p_gaf, NX_REGION_GROIN) != NX_MAGIC_1024 { return 30 } 423 if nx_modesty_required_coverage(p_gaf, NX_REGION_NIPPLE_F) != NX_MAGIC_1024 { return 31 } 424 425 // ---- Islamic hijab: hair + neck covered + many body regions ---- 426 let p_hij: *NxModestyProfile = nx_modesty_profile_get(NX_MODESTY_ISLAMIC_HIJAB) 427 if nx_modesty_required_coverage(p_hij, NX_REGION_HAIR) != NX_MAGIC_1024 { return 40 } 428 if nx_modesty_required_coverage(p_hij, NX_REGION_NECK) != 820 { return 41 } 429 if nx_modesty_required_coverage(p_hij, NX_REGION_FACE_LOWER) != 0 { return 42 } 430 if p_hij.n_regions_listed >= NX_REGION_N_KINDS { return 43 } // sanity 431 432 // ---- Islamic niqab: hijab + face_lower covered ---- 433 let p_niq: *NxModestyProfile = nx_modesty_profile_get(NX_MODESTY_ISLAMIC_NIQAB) 434 if nx_modesty_required_coverage(p_niq, NX_REGION_FACE_LOWER) != NX_MAGIC_1024 { return 50 } 435 if nx_modesty_required_coverage(p_niq, NX_REGION_HAIR) != NX_MAGIC_1024 { return 51 } 436 437 // ---- Heian court: hair NOT covered (visible OK), but face_lower 438 // partial + many body regions ---- 439 let p_heian: *NxModestyProfile = nx_modesty_profile_get(NX_MODESTY_HEIAN_COURT) 440 if nx_modesty_required_coverage(p_heian, NX_REGION_HAIR) != 0 { return 60 } 441 if nx_modesty_required_coverage(p_heian, NX_REGION_FACE_LOWER) != 820 { return 61 } 442 if nx_modesty_required_coverage(p_heian, NX_REGION_HANDS) != 720 { return 62 } 443 444 // ---- Hindu sari: midriff NOT required, chest partial, groin full ---- 445 let p_sari: *NxModestyProfile = nx_modesty_profile_get(NX_MODESTY_HINDU_SARI) 446 if nx_modesty_required_coverage(p_sari, NX_REGION_MIDRIFF) != 0 { return 70 } 447 if nx_modesty_required_coverage(p_sari, NX_REGION_CHEST_FULL) != 820 { return 71 } 448 if nx_modesty_required_coverage(p_sari, NX_REGION_GROIN) != NX_MAGIC_1024 { return 72 } 449 450 // ---- Renaissance nudity (artistic): no requirements ---- 451 let p_art: *NxModestyProfile = nx_modesty_profile_get( 452 NX_MODESTY_ARTISTIC_NUDE_RENAISSANCE) 453 if p_art.n_regions_listed != 0 { return 80 } 454 455 // ---- region validation refuses out-of-range ---- 456 if nx_region_is_valid(NX_REGION_N_KINDS) != 0 { return 90 } 457 if nx_region_is_valid(-1) != 0 { return 91 } 458 // Caller looking up an invalid region id gets -1. 459 if nx_modesty_required_coverage(p_wc, -1) != -1 { return 92 } 460 if nx_modesty_required_coverage(p_wc, NX_REGION_N_KINDS) != -1 { return 93 } 461 462 // ---- profile validation ---- 463 if nx_modesty_profile_is_valid(NX_MODESTY_N_PROFILES) != 0 { return 100 } 464 let p_bad: *NxModestyProfile = nx_modesty_profile_get(NX_MODESTY_N_PROFILES) 465 if p_bad != (0 as *NxModestyProfile) { return 101 } 466 467 return 0 468}