mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-17 16:32:11 +01:00
Add public max_incl_workbuf_len constants
This commit is contained in:
1 parent
c9830ceb9a
commit
be2d96bb27
8 files changed
+35
-2
No files matched your search
+2
-1
@@ -264,7 +264,8 @@ func (h *genHelper) genWuffs(dirname string, qualifiedFilenames []string) error
|
||||
if !n.Public() {
|
||||
continue
|
||||
}
|
||||
return fmt.Errorf("TODO: genWuffs for consts")
|
||||
fmt.Fprintf(out, "pub const %s %s = %v\n",
|
||||
n.QID().Str(&h.tm), n.XType().Str(&h.tm), n.Value().Str(&h.tm))
|
||||
|
||||
case a.KFunc:
|
||||
n := n.AsFunc()
|
||||
|
||||
+3
-1
@@ -220,7 +220,9 @@ func (c *Checker) checkUse(node *a.Node) error {
|
||||
|
||||
switch n.Kind() {
|
||||
case a.KConst:
|
||||
return fmt.Errorf("TODO: type-check a used-package const")
|
||||
if err := c.checkConst(n); err != nil {
|
||||
return err
|
||||
}
|
||||
case a.KFunc:
|
||||
if err := c.checkFuncSignature(n); err != nil {
|
||||
return err
|
||||
|
||||
@@ -2647,6 +2647,9 @@ extern const char* wuffs_deflate__error__no_huffman_codes;
|
||||
|
||||
// ---------------- Public Consts
|
||||
|
||||
WUFFS_BASE__MAYBE_STATIC const uint64_t wuffs_deflate__max_incl_workbuf_len
|
||||
WUFFS_BASE__POTENTIALLY_UNUSED = 33280;
|
||||
|
||||
// ---------------- Struct Declarations
|
||||
|
||||
typedef struct wuffs_deflate__decoder__struct wuffs_deflate__decoder;
|
||||
@@ -2814,6 +2817,9 @@ extern const char* wuffs_lzw__error__bad_code;
|
||||
|
||||
// ---------------- Public Consts
|
||||
|
||||
WUFFS_BASE__MAYBE_STATIC const uint64_t wuffs_lzw__max_incl_workbuf_len
|
||||
WUFFS_BASE__POTENTIALLY_UNUSED = 0;
|
||||
|
||||
// ---------------- Struct Declarations
|
||||
|
||||
typedef struct wuffs_lzw__decoder__struct wuffs_lzw__decoder;
|
||||
@@ -2974,6 +2980,9 @@ extern const char* wuffs_gif__error__too_much_pixel_data;
|
||||
|
||||
// ---------------- Public Consts
|
||||
|
||||
WUFFS_BASE__MAYBE_STATIC const uint64_t wuffs_gif__max_incl_workbuf_len
|
||||
WUFFS_BASE__POTENTIALLY_UNUSED = 65535;
|
||||
|
||||
// ---------------- Struct Declarations
|
||||
|
||||
typedef struct wuffs_gif__decoder__struct wuffs_gif__decoder;
|
||||
@@ -3264,6 +3273,9 @@ extern const char* wuffs_gzip__error__bad_header;
|
||||
|
||||
// ---------------- Public Consts
|
||||
|
||||
WUFFS_BASE__MAYBE_STATIC const uint64_t wuffs_gzip__max_incl_workbuf_len
|
||||
WUFFS_BASE__POTENTIALLY_UNUSED = 33280;
|
||||
|
||||
// ---------------- Struct Declarations
|
||||
|
||||
typedef struct wuffs_gzip__decoder__struct wuffs_gzip__decoder;
|
||||
@@ -3402,6 +3414,9 @@ extern const char* wuffs_zlib__error__bad_parity_check;
|
||||
|
||||
// ---------------- Public Consts
|
||||
|
||||
WUFFS_BASE__MAYBE_STATIC const uint64_t wuffs_zlib__max_incl_workbuf_len
|
||||
WUFFS_BASE__POTENTIALLY_UNUSED = 33280;
|
||||
|
||||
// ---------------- Struct Declarations
|
||||
|
||||
typedef struct wuffs_zlib__decoder__struct wuffs_zlib__decoder;
|
||||
|
||||
@@ -31,6 +31,8 @@ pri status "?internal error: inconsistent I/O"
|
||||
pri status "?internal error: inconsistent distance"
|
||||
pri status "?internal error: inconsistent n_bits"
|
||||
|
||||
pub const max_incl_workbuf_len base.u64 = 32768 + 512
|
||||
|
||||
// The next two tables were created by script/print-deflate-magic-numbers.go.
|
||||
//
|
||||
// The u32 values' meanings are the same as the decoder.huffs u32 values. In
|
||||
|
||||
@@ -24,6 +24,9 @@ pub status "?too much pixel data"
|
||||
|
||||
pri status "?internal error: inconsistent ri/wi"
|
||||
|
||||
// TODO: reference lzw.max_incl_workbuf_len.
|
||||
pub const max_incl_workbuf_len base.u64 = 0xFFFF
|
||||
|
||||
// See the spec appendix E "Interlaced Images" on page 29. The first element
|
||||
// represents either that the frame was non-interlaced, or that all interlace
|
||||
// stages are complete. Otherwise, the four interlace stages are elements 4, 3,
|
||||
|
||||
@@ -20,6 +20,9 @@ pub status "?bad compression method"
|
||||
pub status "?bad encoding flags"
|
||||
pub status "?bad header"
|
||||
|
||||
// TODO: reference deflate.max_incl_workbuf_len.
|
||||
pub const max_incl_workbuf_len base.u64 = 32768 + 512
|
||||
|
||||
pub struct decoder?(
|
||||
flate deflate.decoder,
|
||||
checksum crc32.ieee_hasher,
|
||||
|
||||
@@ -16,6 +16,10 @@ pub status "?bad code"
|
||||
|
||||
pri status "?internal error: inconsistent I/O"
|
||||
|
||||
// TODO: move bulk data buffers like decoder.suffixes or decoder.output into
|
||||
// the workbuf?
|
||||
pub const max_incl_workbuf_len base.u64 = 0
|
||||
|
||||
pub struct decoder?(
|
||||
// The value passed to set_literal_width. This lw field is copied to the
|
||||
// literal_width field at the start of the decode method. During that
|
||||
|
||||
@@ -22,6 +22,9 @@ pub status "?bad parity check"
|
||||
|
||||
pri status "?TODO: unsupported preset dictionary"
|
||||
|
||||
// TODO: reference deflate.max_incl_workbuf_len.
|
||||
pub const max_incl_workbuf_len base.u64 = 32768 + 512
|
||||
|
||||
pub struct decoder?(
|
||||
flate deflate.decoder,
|
||||
checksum adler32.hasher,
|
||||
|
||||
Reference in new issue
Block a user