std: change set_quirk_enabled to set_quirk

This commit is contained in:
Nigel Tao committed 2023-04-14 21:42:15 +10:00
1 parent 176cdf7527
commit 6e84987d33
37 files changed
+644 -490

No files matched your search

+7 -5
View File
@@ -61,13 +61,15 @@ pub struct decoder? implements base.token_decoder(
stack : array[1024 / 32] base.u32,
)
pub func decoder.set_quirk_enabled!(quirk: base.u32, enabled: base.bool) {
if args.quirk >= QUIRKS_BASE {
args.quirk -= QUIRKS_BASE
if args.quirk < QUIRKS_COUNT {
this.quirks[args.quirk] = args.enabled
pub func decoder.set_quirk!(key: base.u32, value: base.u64) base.status {
if args.key >= QUIRKS_BASE {
args.key -= QUIRKS_BASE
if args.key < QUIRKS_COUNT {
this.quirks[args.key] = args.value > 0
return ok
}
}
return base."#unsupported option"
}
pub func decoder.workbuf_len() base.range_ii_u64 {