Add set_quirk_enabled interface methods

This commit is contained in:
Nigel Tao committed 2020-04-12 20:53:54 +10:00
1 parent 873c6b400a
commit 4bc42db1d3
10 files changed
+422

No files matched your search

+3
View File
@@ -18,6 +18,9 @@ pub struct hasher? implements base.hasher_u32(
started : base.bool,
)
pub func hasher.set_quirk_enabled!(quirk: base.u32, enabled: base.bool) {
}
pub func hasher.update_u32!(x: slice base.u8) base.u32 {
// The Adler-32 checksum's magic 65521 and 5552 numbers are discussed in
// this package's README.md.
+3
View File
@@ -54,6 +54,9 @@ pub struct decoder? implements base.image_decoder(
util : base.utility,
)
pub func decoder.set_quirk_enabled!(quirk: base.u32, enabled: base.bool) {
}
pub func decoder.decode_image_config?(dst: nptr base.image_config, src: base.io_reader) {
var magic : base.u32
var bitmap_info_len : base.u32
+3
View File
@@ -17,6 +17,9 @@ pub struct ieee_hasher? implements base.hasher_u32(
state : base.u32,
)
pub func ieee_hasher.set_quirk_enabled!(quirk: base.u32, enabled: base.bool) {
}
// TODO: should it be ? instead of ! because it's public, and might need a way
// to signal "initializer not called"? Should the return type, in the generated
// C code, be "struct{ uint32_t checksum; wuffs_crc32__status status }"?
+3
View File
@@ -190,6 +190,9 @@ pub func decoder.add_history!(hist: slice base.u8) {
this.history[0x8000 ..].copy_from_slice!(s: this.history[..])
}
pub func decoder.set_quirk_enabled!(quirk: base.u32, enabled: base.bool) {
}
pub func decoder.workbuf_len() base.range_ii_u64 {
return this.util.make_range_ii_u64(
min_incl: decoder_workbuf_len_max_incl_worst_case,
+3
View File
@@ -36,6 +36,9 @@ pub func decoder.set_ignore_checksum!(ic: base.bool) {
this.ignore_checksum = args.ic
}
pub func decoder.set_quirk_enabled!(quirk: base.u32, enabled: base.bool) {
}
pub func decoder.workbuf_len() base.range_ii_u64 {
return this.util.make_range_ii_u64(
min_incl: decoder_workbuf_len_max_incl_worst_case,
+3
View File
@@ -69,6 +69,9 @@ pub struct decoder? implements base.io_transformer(
output : array[8192 + 7] base.u8,
)
pub func decoder.set_quirk_enabled!(quirk: base.u32, enabled: base.bool) {
}
pub func decoder.set_literal_width!(lw: base.u32[..= 8]) {
this.set_literal_width_arg = args.lw + 1
}
+3
View File
@@ -28,6 +28,9 @@ pub struct decoder? implements base.image_decoder(
util : base.utility,
)
pub func decoder.set_quirk_enabled!(quirk: base.u32, enabled: base.bool) {
}
pub func decoder.decode_image_config?(dst: nptr base.image_config, src: base.io_reader) {
var c : base.u8
var i : base.u32
+3
View File
@@ -63,6 +63,9 @@ pub func decoder.set_ignore_checksum!(ic: base.bool) {
this.ignore_checksum = args.ic
}
pub func decoder.set_quirk_enabled!(quirk: base.u32, enabled: base.bool) {
}
pub func decoder.workbuf_len() base.range_ii_u64 {
return this.util.make_range_ii_u64(
min_incl: decoder_workbuf_len_max_incl_worst_case,