diff --git a/cmd/wuffs-c/internal/cgen/base/base-impl.c b/cmd/wuffs-c/internal/cgen/base/base-impl.c index e8804f69..73527100 100644 --- a/cmd/wuffs-c/internal/cgen/base/base-impl.c +++ b/cmd/wuffs-c/internal/cgen/base/base-impl.c @@ -22,13 +22,7 @@ #if !defined(WUFFS_CONFIG__MODULES) || defined(WUFFS_CONFIG__MODULE__BASE) -// !! INSERT wuffs_base__status__string data. - -const char* // -wuffs_base__status__string(int32_t status_code) { - uint16_t o = wuffs_base__status__string_offsets[(uint8_t)(status_code >> 24)]; - return o ? wuffs_base__status__string_data + o : "unknown status"; -} +// !! INSERT wuffs_base__status strings. #endif // !defined(WUFFS_CONFIG__MODULES) || // defined(WUFFS_CONFIG__MODULE__BASE) diff --git a/cmd/wuffs-c/internal/cgen/base/base-public.h b/cmd/wuffs-c/internal/cgen/base/base-public.h index eba0c2d1..54001b2a 100644 --- a/cmd/wuffs-c/internal/cgen/base/base-public.h +++ b/cmd/wuffs-c/internal/cgen/base/base-public.h @@ -124,9 +124,6 @@ wuffs_base__status__is_suspension(wuffs_base__status z) { return z && (*z == '$'); } -const char* // -wuffs_base__status__string(int32_t status_code); - // -------- // Flicks are a unit of time. One flick (frame-tick) is 1 / 705_600_000 of a diff --git a/cmd/wuffs-c/internal/cgen/cgen.go b/cmd/wuffs-c/internal/cgen/cgen.go index 6b103080..7ef8bbef 100644 --- a/cmd/wuffs-c/internal/cgen/cgen.go +++ b/cmd/wuffs-c/internal/cgen/cgen.go @@ -25,7 +25,6 @@ import ( "math/big" "os" "os/exec" - "path" "path/filepath" "sort" "strings" @@ -33,7 +32,6 @@ import ( "github.com/google/wuffs/lang/builtin" "github.com/google/wuffs/lang/check" "github.com/google/wuffs/lang/generate" - "github.com/google/wuffs/lib/base38" cf "github.com/google/wuffs/cmd/commonflags" @@ -113,18 +111,7 @@ func Do(args []string) error { if err := expandBangBangInsert(&buf, baseBaseImplC, map[string]func(*buffer) error{ "// !! INSERT base-private.h.\n": insertBasePrivateH, "// !! INSERT base-public.h.\n": insertBasePublicH, - "// !! INSERT wuffs_base__status__string data.\n": func(b *buffer) error { - messages := [256]string{} - for _, z := range builtin.StatusList { - if z.Message == "" { - continue - } - messages[uint8(z.Value)] = z.Message[:1] + "base: " + z.Message[1:] - } - if err := genStatusStringData(b, "wuffs_base__", &messages); err != nil { - return err - } - + "// !! INSERT wuffs_base__status strings.\n": func(b *buffer) error { for _, z := range builtin.StatusList { pre := "" switch z.Keyword { @@ -135,8 +122,8 @@ func Do(args []string) error { default: continue } - b.printf("const char* wuffs_base__%s__%s = \"%s\";\n", - pre, cName(z.Message, ""), messages[uint8(z.Value)]) + b.printf("const char* wuffs_base__%s__%s = \"%sbase: %s\";\n", + pre, cName(z.Message, ""), z.Message[:1], z.Message[1:]) } return nil }, @@ -267,12 +254,6 @@ func insertBasePublicH(buf *buffer) error { if err := expandBangBangInsert(buf, baseBasePublicH, map[string]func(*buffer) error{ "// !! INSERT wuffs_base__status names.\n": func(b *buffer) error { - for _, z := range builtin.StatusList { - code := int32(z.Value) << 24 - b.printf("#define %s %d // 0x%08X\n", - strings.ToUpper(cName(z.String(), "WUFFS_BASE__")), code, uint32(code)) - } - b.writes("\n") for _, z := range builtin.StatusList { pre := "" switch z.Keyword { @@ -298,36 +279,6 @@ func insertBasePublicH(buf *buffer) error { return nil } -func genStatusStringData(b *buffer, pkgPrefix string, ss *[256]string) error { - data := []byte{0x00} - offsets := [256]uint16{} - for i, s := range ss { - if s == "" { - continue - } - if len(data) > 0xFFFF { - return errors.New("status string messages are too long") - } - offsets[i] = uint16(len(data)) - data = append(data, s...) - data = append(data, 0x00) - } - - b.printf("static const char %sstatus__string_data[] = {\n", pkgPrefix) - for _, x := range data { - b.printf("0x%02X,", x) - } - b.writes("};\n\n") - - b.printf("static const uint16_t %sstatus__string_offsets[] = {\n", pkgPrefix) - for _, x := range offsets { - b.printf("0x%04X,", x) - } - b.writes("};\n\n") - - return nil -} - type gen struct { pkgPrefix string // e.g. "wuffs_jpeg__" pkgName string // e.g. "jpeg" @@ -410,15 +361,6 @@ func (g *gen) genHeader(b *buffer) error { b.writes("// ---------------- Status Codes\n\n") - pkgID := g.checker.PackageID() - b.printf("#define %spackageid %d // 0x%08X\n\n", g.pkgPrefix, pkgID, pkgID) - - for _, s := range g.statusList { - code := (int32(s.value) << 24) | int32(pkgID) - b.printf("#define %s %d // 0x%08X\n", s.name, code, uint32(code)) - } - b.writes("\n") - for _, s := range g.statusList { if !s.public { continue @@ -427,8 +369,6 @@ func (g *gen) genHeader(b *buffer) error { } b.writes("\n") - b.printf("const char* %sstatus__string(int32_t status_code);\n\n", g.pkgPrefix) - b.writes("// ---------------- Public Consts\n\n") if err := g.forEachConst(b, pubOnly, (*gen).writeConst); err != nil { return err @@ -474,43 +414,15 @@ func (g *gen) genImpl(b *buffer) error { b.writes("// ---------------- Status Codes Implementations\n\n") - messages := [256]string{} - { - for _, s := range g.statusList { - if s.msg == "" { - continue - } - messages[uint8(s.value)] = s.msg[:1] + g.pkgName + ": " + s.msg[1:] + for _, z := range g.statusList { + if z.msg == "" { + continue } - if err := genStatusStringData(b, g.pkgPrefix, &messages); err != nil { - return err - } - } - - for _, s := range g.statusList { - b.printf("const char* %s%s__%s = \"%s\";\n", - g.pkgPrefix, s.cNamePrefix(), s.cName, messages[uint8(s.value)]) + b.printf("const char* %s%s__%s = \"%s%s: %s\";\n", + g.pkgPrefix, z.cNamePrefix(), z.cName, z.msg[:1], g.pkgName, z.msg[1:]) } b.writes("\n") - b.printf("const char* %sstatus__string(int32_t status_code) {\n", g.pkgPrefix) - b.printf("uint16_t o;") - b.printf("switch (status_code & 0x%X) {\n", (1<> 24)];\n", g.pkgPrefix) - b.printf("if (o) { return %sstatus__string_data + o; } break;\n", g.pkgPrefix) - for _, u := range g.usesList { - // TODO: is path.Base always correct? Should we check - // validName(packageName)? - useePkgName := path.Base(u) - b.printf("case wuffs_%s__packageid: return wuffs_%s__status__string(status_code);\n", useePkgName, useePkgName) - } - b.printf("}\n") - b.printf("return \"unknown status\";\n") - - b.writes("}\n\n") - b.writes("// ---------------- Private Consts\n\n") if err := g.forEachConst(b, priOnly, (*gen).writeConst); err != nil { return err diff --git a/cmd/wuffs-c/internal/cgen/data.go b/cmd/wuffs-c/internal/cgen/data.go index 665213bf..6ecceaa6 100644 --- a/cmd/wuffs-c/internal/cgen/data.go +++ b/cmd/wuffs-c/internal/cgen/data.go @@ -22,7 +22,7 @@ const baseBasePublicH = "" + "nt.com/nothings/stb/master/docs/stb_howto.txt\n#ifdef WUFFS_CONFIG__STATIC_FUNCTIONS\n#define WUFFS_BASE__MAYBE_STATIC static\n#else\n#define WUFFS_BASE__MAYBE_STATIC\n#endif\n\n// Clang also defines \"__GNUC__\".\n#if defined(__GNUC__)\n#define WUFFS_BASE__WARN_UNUSED_RESULT __attribute__((warn_unused_result))\n#else\n#define WUFFS_BASE__WARN_UNUSED_RESULT\n#endif\n\n// wuffs_base__empty_struct is used when a Wuffs function returns an empty\n// struct. In C, if a function f returns void, you can't say \"x = f()\", but in\n// Wuffs, if a function g returns empty, you can say \"y = g()\".\ntypedef struct {\n // private_impl is a placeholder field. It isn't explicitly used, except that\n // without it, the sizeof a struct with no fields can differ across C/C++\n // compilers, and it is undefined behavior in C99. For example, gcc says that\n // the sizeof an empty struct is 0, and g++ says that it is 1. This leads to\n // ABI incompatibility if a Wuffs .c file is processed by one compiler and\n // its .h file with another compiler.\n " + "//\n // Instead, we explicitly insert an otherwise unused field, so that the\n // sizeof this struct is always 1.\n uint8_t private_impl;\n} wuffs_base__empty_struct;\n\n// wuffs_base__utility is a placeholder receiver type. It enables what Java\n// calls static methods, as opposed to regular methods.\ntypedef struct {\n // private_impl is a placeholder field. It isn't explicitly used, except that\n // without it, the sizeof a struct with no fields can differ across C/C++\n // compilers, and it is undefined behavior in C99. For example, gcc says that\n // the sizeof an empty struct is 0, and g++ says that it is 1. This leads to\n // ABI incompatibility if a Wuffs .c file is processed by one compiler and\n // its .h file with another compiler.\n //\n // Instead, we explicitly insert an otherwise unused field, so that the\n // sizeof this struct is always 1.\n uint8_t private_impl;\n} wuffs_base__utility;\n\n" + "" + - "// --------\n\n// A status is either NULL (meaning OK or no error) or string message. That\n// message is human-readable, for programmers, but it is not for end users. It\n// is not localized, and does not contain additional contextual information\n// such as a source filename.\n//\n// Status strings are statically allocated and should never be free'd.\ntypedef const char* wuffs_base__status;\n\n// !! INSERT wuffs_base__status names.\n\nstatic inline bool //\nwuffs_base__status__is_error(wuffs_base__status z) {\n return z && (*z != '$');\n}\n\nstatic inline bool //\nwuffs_base__status__is_ok(wuffs_base__status z) {\n return z == NULL;\n}\n\nstatic inline bool //\nwuffs_base__status__is_suspension(wuffs_base__status z) {\n return z && (*z == '$');\n}\n\nconst char* //\nwuffs_base__status__string(int32_t status_code);\n\n" + + "// --------\n\n// A status is either NULL (meaning OK or no error) or string message. That\n// message is human-readable, for programmers, but it is not for end users. It\n// is not localized, and does not contain additional contextual information\n// such as a source filename.\n//\n// Status strings are statically allocated and should never be free'd.\ntypedef const char* wuffs_base__status;\n\n// !! INSERT wuffs_base__status names.\n\nstatic inline bool //\nwuffs_base__status__is_error(wuffs_base__status z) {\n return z && (*z != '$');\n}\n\nstatic inline bool //\nwuffs_base__status__is_ok(wuffs_base__status z) {\n return z == NULL;\n}\n\nstatic inline bool //\nwuffs_base__status__is_suspension(wuffs_base__status z) {\n return z && (*z == '$');\n}\n\n" + "" + "// --------\n\n// Flicks are a unit of time. One flick (frame-tick) is 1 / 705_600_000 of a\n// second. See https://github.com/OculusVR/Flicks\ntypedef int64_t wuffs_base__flicks;\n\n#define WUFFS_BASE__FLICKS_PER_SECOND ((uint64_t)705600000)\n#define WUFFS_BASE__FLICKS_PER_MILLISECOND ((uint64_t)705600)\n\n" + "" + @@ -108,8 +108,7 @@ const baseBasePrivateH = "" + "" const baseBaseImplC = "" + - "// Copyright 2018 The Wuffs Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// https://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// !! INSERT base-public.h.\n\n#ifdef WUFFS_IMPLEMENTATION\n\n// !! INSERT base-private.h.\n\n#if !defined(WUFFS_CONFIG__MODULES) || defined(WUFFS_CONFIG__MODULE__BASE)\n\n// !! INSERT wuffs_base__status__string data.\n\nconst char* //\nwuffs_base__status__string(int32_t status_code) {\n uint16_t o = wuffs_base__status__string_offsets[(uint8_t)(status_code >> 24)];\n return o ? wuffs_base__status__string_data + o : \"unknown status\";\n}" + - "\n\n#endif // !defined(WUFFS_CONFIG__MODULES) ||\n // defined(WUFFS_CONFIG__MODULE__BASE)\n\n#endif // WUFFS_IMPLEMENTATION\n" + + "// Copyright 2018 The Wuffs Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// https://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// !! INSERT base-public.h.\n\n#ifdef WUFFS_IMPLEMENTATION\n\n// !! INSERT base-private.h.\n\n#if !defined(WUFFS_CONFIG__MODULES) || defined(WUFFS_CONFIG__MODULE__BASE)\n\n// !! INSERT wuffs_base__status strings.\n\n#endif // !defined(WUFFS_CONFIG__MODULES) ||\n // defined(WUFFS_CONFIG__MODULE__BASE)\n\n#endif // WUFFS_IMPLEMENTATION\n" + "" const baseImagePublicH = "" + diff --git a/lang/builtin/builtin.go b/lang/builtin/builtin.go index 1a962581..0d087775 100644 --- a/lang/builtin/builtin.go +++ b/lang/builtin/builtin.go @@ -43,7 +43,7 @@ var StatusList = [...]Status{ {t.IDError, -0x02, "?bad sizeof receiver"}, {t.IDError, -0x03, "?bad receiver"}, {t.IDError, -0x04, "?bad argument"}, - {t.IDError, -0x04, "?bad argument (length too short)"}, + {t.IDError, -0x05, "?bad argument (length too short)"}, {t.IDError, -0x10, "?check_wuffs_version missing"}, {t.IDError, -0x11, "?check_wuffs_version called twice"}, diff --git a/release/c/wuffs-unsupported-snapshot.h b/release/c/wuffs-unsupported-snapshot.h index a665f79a..c59a43d1 100644 --- a/release/c/wuffs-unsupported-snapshot.h +++ b/release/c/wuffs-unsupported-snapshot.h @@ -131,21 +131,6 @@ typedef struct { // Status strings are statically allocated and should never be free'd. typedef const char* wuffs_base__status; -#define WUFFS_BASE__STATUS_OK 0 // 0x00000000 -#define WUFFS_BASE__ERROR_BAD_WUFFS_VERSION -16777216 // 0xFF000000 -#define WUFFS_BASE__ERROR_BAD_SIZEOF_RECEIVER -33554432 // 0xFE000000 -#define WUFFS_BASE__ERROR_BAD_RECEIVER -50331648 // 0xFD000000 -#define WUFFS_BASE__ERROR_BAD_ARGUMENT -67108864 // 0xFC000000 -#define WUFFS_BASE__ERROR_BAD_ARGUMENT_LENGTH_TOO_SHORT -67108864 // 0xFC000000 -#define WUFFS_BASE__ERROR_CHECK_WUFFS_VERSION_MISSING -268435456 // 0xF0000000 -#define WUFFS_BASE__ERROR_CHECK_WUFFS_VERSION_CALLED_TWICE \ - -285212672 // 0xEF000000 -#define WUFFS_BASE__ERROR_INVALID_CALL_SEQUENCE -301989888 // 0xEE000000 -#define WUFFS_BASE__ERROR_CANNOT_RETURN_A_SUSPENSION -536870912 // 0xE0000000 -#define WUFFS_BASE__SUSPENSION_END_OF_DATA 16777216 // 0x01000000 -#define WUFFS_BASE__SUSPENSION_SHORT_READ 33554432 // 0x02000000 -#define WUFFS_BASE__SUSPENSION_SHORT_WRITE 50331648 // 0x03000000 - extern const char* wuffs_base__error__bad_wuffs_version; extern const char* wuffs_base__error__bad_sizeof_receiver; extern const char* wuffs_base__error__bad_receiver; @@ -174,9 +159,6 @@ wuffs_base__status__is_suspension(wuffs_base__status z) { return z && (*z == '$'); } -const char* // -wuffs_base__status__string(int32_t status_code); - // -------- // Flicks are a unit of time. One flick (frame-tick) is 1 / 705_600_000 of a @@ -2046,10 +2028,6 @@ extern "C" { // ---------------- Status Codes -#define wuffs_adler32__packageid 681002 // 0x000A642A - -const char* wuffs_adler32__status__string(int32_t status_code); - // ---------------- Public Consts // ---------------- Structs @@ -2129,10 +2107,6 @@ extern "C" { // ---------------- Status Codes -#define wuffs_crc32__packageid 810620 // 0x000C5E7C - -const char* wuffs_crc32__status__string(int32_t status_code); - // ---------------- Public Consts // ---------------- Structs @@ -2211,39 +2185,6 @@ extern "C" { // ---------------- Status Codes -#define wuffs_deflate__packageid 848533 // 0x000CF295 - -#define WUFFS_DEFLATE__ERROR_BAD_HUFFMAN_CODE_OVER_SUBSCRIBED \ - -15928683 // 0xFF0CF295 -#define WUFFS_DEFLATE__ERROR_BAD_HUFFMAN_CODE_UNDER_SUBSCRIBED \ - -32705899 // 0xFE0CF295 -#define WUFFS_DEFLATE__ERROR_BAD_HUFFMAN_CODE_LENGTH_COUNT \ - -49483115 // 0xFD0CF295 -#define WUFFS_DEFLATE__ERROR_BAD_HUFFMAN_CODE_LENGTH_REPETITION \ - -66260331 // 0xFC0CF295 -#define WUFFS_DEFLATE__ERROR_BAD_HUFFMAN_CODE -83037547 // 0xFB0CF295 -#define WUFFS_DEFLATE__ERROR_BAD_HUFFMAN_MINIMUM_CODE_LENGTH \ - -99814763 // 0xFA0CF295 -#define WUFFS_DEFLATE__ERROR_BAD_BLOCK -116591979 // 0xF90CF295 -#define WUFFS_DEFLATE__ERROR_BAD_DISTANCE -133369195 // 0xF80CF295 -#define WUFFS_DEFLATE__ERROR_BAD_DISTANCE_CODE_COUNT -150146411 // 0xF70CF295 -#define WUFFS_DEFLATE__ERROR_BAD_LITERAL_LENGTH_CODE_COUNT \ - -166923627 // 0xF60CF295 -#define WUFFS_DEFLATE__ERROR_INCONSISTENT_STORED_BLOCK_LENGTH \ - -183700843 // 0xF50CF295 -#define WUFFS_DEFLATE__ERROR_MISSING_END_OF_BLOCK_CODE -200478059 // 0xF40CF295 -#define WUFFS_DEFLATE__ERROR_NO_HUFFMAN_CODES -217255275 // 0xF30CF295 -#define WUFFS_DEFLATE__ERROR_INTERNAL_ERROR_INCONSISTENT_HUFFMAN_DECODER_STATE \ - -1072893291 // 0xC00CF295 -#define WUFFS_DEFLATE__ERROR_INTERNAL_ERROR_INCONSISTENT_HUFFMAN_END_OF_BLOCK \ - -1089670507 // 0xBF0CF295 -#define WUFFS_DEFLATE__ERROR_INTERNAL_ERROR_INCONSISTENT_I_O \ - -1106447723 // 0xBE0CF295 -#define WUFFS_DEFLATE__ERROR_INTERNAL_ERROR_INCONSISTENT_DISTANCE \ - -1123224939 // 0xBD0CF295 -#define WUFFS_DEFLATE__ERROR_INTERNAL_ERROR_INCONSISTENT_N_BITS \ - -1140002155 // 0xBC0CF295 - extern const char* wuffs_deflate__error__bad_huffman_code_over_subscribed; extern const char* wuffs_deflate__error__bad_huffman_code_under_subscribed; extern const char* wuffs_deflate__error__bad_huffman_code_length_count; @@ -2259,8 +2200,6 @@ extern const char* wuffs_deflate__error__missing_end_of_block_code; extern const char* wuffs_deflate__error__no_huffman_codes; extern const char* wuffs_deflate__error__internal_error_inconsistent_i_o; -const char* wuffs_deflate__status__string(int32_t status_code); - // ---------------- Public Consts // ---------------- Structs @@ -2407,16 +2346,9 @@ extern "C" { // ---------------- Status Codes -#define wuffs_lzw__packageid 1316776 // 0x001417A8 - -#define WUFFS_LZW__ERROR_BAD_CODE -15460440 // 0xFF1417A8 -#define WUFFS_LZW__ERROR_CYCLICAL_PREFIX_CHAIN -32237656 // 0xFE1417A8 - extern const char* wuffs_lzw__error__bad_code; extern const char* wuffs_lzw__error__cyclical_prefix_chain; -const char* wuffs_lzw__status__string(int32_t status_code); - // ---------------- Public Consts // ---------------- Structs @@ -2523,18 +2455,6 @@ extern "C" { // ---------------- Status Codes -#define wuffs_gif__packageid 1017222 // 0x000F8586 - -#define WUFFS_GIF__ERROR_BAD_BLOCK -15759994 // 0xFF0F8586 -#define WUFFS_GIF__ERROR_BAD_EXTENSION_LABEL -32537210 // 0xFE0F8586 -#define WUFFS_GIF__ERROR_BAD_GRAPHIC_CONTROL -49314426 // 0xFD0F8586 -#define WUFFS_GIF__ERROR_BAD_HEADER -66091642 // 0xFC0F8586 -#define WUFFS_GIF__ERROR_BAD_LITERAL_WIDTH -82868858 // 0xFB0F8586 -#define WUFFS_GIF__ERROR_NOT_ENOUGH_PIXEL_DATA -99646074 // 0xFA0F8586 -#define WUFFS_GIF__ERROR_TOO_MUCH_PIXEL_DATA -116423290 // 0xF90F8586 -#define WUFFS_GIF__ERROR_INTERNAL_ERROR_INCONSISTENT_RI_WI \ - -1072724602 // 0xC00F8586 - extern const char* wuffs_gif__error__bad_block; extern const char* wuffs_gif__error__bad_extension_label; extern const char* wuffs_gif__error__bad_graphic_control; @@ -2543,8 +2463,6 @@ extern const char* wuffs_gif__error__bad_literal_width; extern const char* wuffs_gif__error__not_enough_pixel_data; extern const char* wuffs_gif__error__too_much_pixel_data; -const char* wuffs_gif__status__string(int32_t status_code); - // ---------------- Public Consts // ---------------- Structs @@ -2797,20 +2715,11 @@ extern "C" { // ---------------- Status Codes -#define wuffs_gzip__packageid 1041911 // 0x000FE5F7 - -#define WUFFS_GZIP__ERROR_BAD_CHECKSUM -15735305 // 0xFF0FE5F7 -#define WUFFS_GZIP__ERROR_BAD_COMPRESSION_METHOD -32512521 // 0xFE0FE5F7 -#define WUFFS_GZIP__ERROR_BAD_ENCODING_FLAGS -49289737 // 0xFD0FE5F7 -#define WUFFS_GZIP__ERROR_BAD_HEADER -66066953 // 0xFC0FE5F7 - extern const char* wuffs_gzip__error__bad_checksum; extern const char* wuffs_gzip__error__bad_compression_method; extern const char* wuffs_gzip__error__bad_encoding_flags; extern const char* wuffs_gzip__error__bad_header; -const char* wuffs_gzip__status__string(int32_t status_code); - // ---------------- Public Consts // ---------------- Structs @@ -2923,22 +2832,11 @@ extern "C" { // ---------------- Status Codes -#define wuffs_zlib__packageid 2064249 // 0x001F7F79 - -#define WUFFS_ZLIB__ERROR_BAD_CHECKSUM -14712967 // 0xFF1F7F79 -#define WUFFS_ZLIB__ERROR_BAD_COMPRESSION_METHOD -31490183 // 0xFE1F7F79 -#define WUFFS_ZLIB__ERROR_BAD_COMPRESSION_WINDOW_SIZE -48267399 // 0xFD1F7F79 -#define WUFFS_ZLIB__ERROR_BAD_PARITY_CHECK -65044615 // 0xFC1F7F79 -#define WUFFS_ZLIB__ERROR_TODO_UNSUPPORTED_PRESET_DICTIONARY \ - -1071677575 // 0xC01F7F79 - extern const char* wuffs_zlib__error__bad_checksum; extern const char* wuffs_zlib__error__bad_compression_method; extern const char* wuffs_zlib__error__bad_compression_window_size; extern const char* wuffs_zlib__error__bad_parity_check; -const char* wuffs_zlib__status__string(int32_t status_code); - // ---------------- Public Consts // ---------------- Structs @@ -3761,74 +3659,11 @@ wuffs_base__io_writer__set_mark(wuffs_base__io_writer* o, uint8_t* mark) { #if !defined(WUFFS_CONFIG__MODULES) || defined(WUFFS_CONFIG__MODULE__BASE) -static const char wuffs_base__status__string_data[] = { - 0x00, 0x2B, 0x62, 0x61, 0x73, 0x65, 0x3A, 0x20, 0x6F, 0x6B, 0x00, 0x24, - 0x62, 0x61, 0x73, 0x65, 0x3A, 0x20, 0x65, 0x6E, 0x64, 0x20, 0x6F, 0x66, - 0x20, 0x64, 0x61, 0x74, 0x61, 0x00, 0x24, 0x62, 0x61, 0x73, 0x65, 0x3A, - 0x20, 0x73, 0x68, 0x6F, 0x72, 0x74, 0x20, 0x72, 0x65, 0x61, 0x64, 0x00, - 0x24, 0x62, 0x61, 0x73, 0x65, 0x3A, 0x20, 0x73, 0x68, 0x6F, 0x72, 0x74, - 0x20, 0x77, 0x72, 0x69, 0x74, 0x65, 0x00, 0x3F, 0x62, 0x61, 0x73, 0x65, - 0x3A, 0x20, 0x63, 0x61, 0x6E, 0x6E, 0x6F, 0x74, 0x20, 0x72, 0x65, 0x74, - 0x75, 0x72, 0x6E, 0x20, 0x61, 0x20, 0x73, 0x75, 0x73, 0x70, 0x65, 0x6E, - 0x73, 0x69, 0x6F, 0x6E, 0x00, 0x3F, 0x62, 0x61, 0x73, 0x65, 0x3A, 0x20, - 0x69, 0x6E, 0x76, 0x61, 0x6C, 0x69, 0x64, 0x20, 0x63, 0x61, 0x6C, 0x6C, - 0x20, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6E, 0x63, 0x65, 0x00, 0x3F, 0x62, - 0x61, 0x73, 0x65, 0x3A, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6B, 0x5F, 0x77, - 0x75, 0x66, 0x66, 0x73, 0x5F, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, - 0x20, 0x63, 0x61, 0x6C, 0x6C, 0x65, 0x64, 0x20, 0x74, 0x77, 0x69, 0x63, - 0x65, 0x00, 0x3F, 0x62, 0x61, 0x73, 0x65, 0x3A, 0x20, 0x63, 0x68, 0x65, - 0x63, 0x6B, 0x5F, 0x77, 0x75, 0x66, 0x66, 0x73, 0x5F, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6F, 0x6E, 0x20, 0x6D, 0x69, 0x73, 0x73, 0x69, 0x6E, 0x67, - 0x00, 0x3F, 0x62, 0x61, 0x73, 0x65, 0x3A, 0x20, 0x62, 0x61, 0x64, 0x20, - 0x61, 0x72, 0x67, 0x75, 0x6D, 0x65, 0x6E, 0x74, 0x20, 0x28, 0x6C, 0x65, - 0x6E, 0x67, 0x74, 0x68, 0x20, 0x74, 0x6F, 0x6F, 0x20, 0x73, 0x68, 0x6F, - 0x72, 0x74, 0x29, 0x00, 0x3F, 0x62, 0x61, 0x73, 0x65, 0x3A, 0x20, 0x62, - 0x61, 0x64, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x00, - 0x3F, 0x62, 0x61, 0x73, 0x65, 0x3A, 0x20, 0x62, 0x61, 0x64, 0x20, 0x73, - 0x69, 0x7A, 0x65, 0x6F, 0x66, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, - 0x65, 0x72, 0x00, 0x3F, 0x62, 0x61, 0x73, 0x65, 0x3A, 0x20, 0x62, 0x61, - 0x64, 0x20, 0x77, 0x75, 0x66, 0x66, 0x73, 0x20, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6F, 0x6E, 0x00, -}; - -static const uint16_t wuffs_base__status__string_offsets[] = { - 0x0001, 0x000B, 0x001E, 0x0030, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0043, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0065, 0x0082, 0x00AA, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x00CD, 0x00F4, 0x0108, 0x0123, -}; - const char* wuffs_base__error__bad_wuffs_version = "?base: bad wuffs version"; const char* wuffs_base__error__bad_sizeof_receiver = "?base: bad sizeof receiver"; const char* wuffs_base__error__bad_receiver = "?base: bad receiver"; -const char* wuffs_base__error__bad_argument = - "?base: bad argument (length too short)"; +const char* wuffs_base__error__bad_argument = "?base: bad argument"; const char* wuffs_base__error__bad_argument_length_too_short = "?base: bad argument (length too short)"; const char* wuffs_base__error__check_wuffs_version_missing = @@ -3843,12 +3678,6 @@ const char* wuffs_base__suspension__end_of_data = "$base: end of data"; const char* wuffs_base__suspension__short_read = "$base: short read"; const char* wuffs_base__suspension__short_write = "$base: short write"; -const char* // -wuffs_base__status__string(int32_t status_code) { - uint16_t o = wuffs_base__status__string_offsets[(uint8_t)(status_code >> 24)]; - return o ? wuffs_base__status__string_data + o : "unknown status"; -} - #endif // !defined(WUFFS_CONFIG__MODULES) || // defined(WUFFS_CONFIG__MODULE__BASE) @@ -3856,57 +3685,6 @@ wuffs_base__status__string(int32_t status_code) { // ---------------- Status Codes Implementations -static const char wuffs_adler32__status__string_data[] = { - 0x00, -}; - -static const uint16_t wuffs_adler32__status__string_offsets[] = { - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, -}; - -const char* wuffs_adler32__status__string(int32_t status_code) { - uint16_t o; - switch (status_code & 0x1FFFFF) { - case 0: - return wuffs_base__status__string(status_code); - case wuffs_adler32__packageid: - o = wuffs_adler32__status__string_offsets[(uint8_t)(status_code >> 24)]; - if (o) { - return wuffs_adler32__status__string_data + o; - } - break; - } - return "unknown status"; -} - // ---------------- Private Consts // ---------------- Private Initializer Prototypes @@ -4023,57 +3801,6 @@ wuffs_adler32__hasher__update(wuffs_adler32__hasher* self, // ---------------- Status Codes Implementations -static const char wuffs_crc32__status__string_data[] = { - 0x00, -}; - -static const uint16_t wuffs_crc32__status__string_offsets[] = { - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, -}; - -const char* wuffs_crc32__status__string(int32_t status_code) { - uint16_t o; - switch (status_code & 0x1FFFFF) { - case 0: - return wuffs_base__status__string(status_code); - case wuffs_crc32__packageid: - o = wuffs_crc32__status__string_offsets[(uint8_t)(status_code >> 24)]; - if (o) { - return wuffs_crc32__status__string_data + o; - } - break; - } - return "unknown status"; -} - // ---------------- Private Consts static const uint32_t wuffs_crc32__ieee_table[8][256] = { @@ -4625,102 +4352,6 @@ wuffs_crc32__ieee_hasher__update(wuffs_crc32__ieee_hasher* self, // ---------------- Status Codes Implementations -static const char wuffs_deflate__status__string_data[] = { - 0x00, 0x3F, 0x64, 0x65, 0x66, 0x6C, 0x61, 0x74, 0x65, 0x3A, 0x20, 0x69, - 0x6E, 0x74, 0x65, 0x72, 0x6E, 0x61, 0x6C, 0x20, 0x65, 0x72, 0x72, 0x6F, - 0x72, 0x3A, 0x20, 0x69, 0x6E, 0x63, 0x6F, 0x6E, 0x73, 0x69, 0x73, 0x74, - 0x65, 0x6E, 0x74, 0x20, 0x6E, 0x5F, 0x62, 0x69, 0x74, 0x73, 0x00, 0x3F, - 0x64, 0x65, 0x66, 0x6C, 0x61, 0x74, 0x65, 0x3A, 0x20, 0x69, 0x6E, 0x74, - 0x65, 0x72, 0x6E, 0x61, 0x6C, 0x20, 0x65, 0x72, 0x72, 0x6F, 0x72, 0x3A, - 0x20, 0x69, 0x6E, 0x63, 0x6F, 0x6E, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6E, - 0x74, 0x20, 0x64, 0x69, 0x73, 0x74, 0x61, 0x6E, 0x63, 0x65, 0x00, 0x3F, - 0x64, 0x65, 0x66, 0x6C, 0x61, 0x74, 0x65, 0x3A, 0x20, 0x69, 0x6E, 0x74, - 0x65, 0x72, 0x6E, 0x61, 0x6C, 0x20, 0x65, 0x72, 0x72, 0x6F, 0x72, 0x3A, - 0x20, 0x69, 0x6E, 0x63, 0x6F, 0x6E, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6E, - 0x74, 0x20, 0x49, 0x2F, 0x4F, 0x00, 0x3F, 0x64, 0x65, 0x66, 0x6C, 0x61, - 0x74, 0x65, 0x3A, 0x20, 0x69, 0x6E, 0x74, 0x65, 0x72, 0x6E, 0x61, 0x6C, - 0x20, 0x65, 0x72, 0x72, 0x6F, 0x72, 0x3A, 0x20, 0x69, 0x6E, 0x63, 0x6F, - 0x6E, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6E, 0x74, 0x20, 0x48, 0x75, 0x66, - 0x66, 0x6D, 0x61, 0x6E, 0x20, 0x65, 0x6E, 0x64, 0x5F, 0x6F, 0x66, 0x5F, - 0x62, 0x6C, 0x6F, 0x63, 0x6B, 0x00, 0x3F, 0x64, 0x65, 0x66, 0x6C, 0x61, - 0x74, 0x65, 0x3A, 0x20, 0x69, 0x6E, 0x74, 0x65, 0x72, 0x6E, 0x61, 0x6C, - 0x20, 0x65, 0x72, 0x72, 0x6F, 0x72, 0x3A, 0x20, 0x69, 0x6E, 0x63, 0x6F, - 0x6E, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6E, 0x74, 0x20, 0x48, 0x75, 0x66, - 0x66, 0x6D, 0x61, 0x6E, 0x20, 0x64, 0x65, 0x63, 0x6F, 0x64, 0x65, 0x72, - 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x00, 0x3F, 0x64, 0x65, 0x66, 0x6C, - 0x61, 0x74, 0x65, 0x3A, 0x20, 0x6E, 0x6F, 0x20, 0x48, 0x75, 0x66, 0x66, - 0x6D, 0x61, 0x6E, 0x20, 0x63, 0x6F, 0x64, 0x65, 0x73, 0x00, 0x3F, 0x64, - 0x65, 0x66, 0x6C, 0x61, 0x74, 0x65, 0x3A, 0x20, 0x6D, 0x69, 0x73, 0x73, - 0x69, 0x6E, 0x67, 0x20, 0x65, 0x6E, 0x64, 0x2D, 0x6F, 0x66, 0x2D, 0x62, - 0x6C, 0x6F, 0x63, 0x6B, 0x20, 0x63, 0x6F, 0x64, 0x65, 0x00, 0x3F, 0x64, - 0x65, 0x66, 0x6C, 0x61, 0x74, 0x65, 0x3A, 0x20, 0x69, 0x6E, 0x63, 0x6F, - 0x6E, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6E, 0x74, 0x20, 0x73, 0x74, 0x6F, - 0x72, 0x65, 0x64, 0x20, 0x62, 0x6C, 0x6F, 0x63, 0x6B, 0x20, 0x6C, 0x65, - 0x6E, 0x67, 0x74, 0x68, 0x00, 0x3F, 0x64, 0x65, 0x66, 0x6C, 0x61, 0x74, - 0x65, 0x3A, 0x20, 0x62, 0x61, 0x64, 0x20, 0x6C, 0x69, 0x74, 0x65, 0x72, - 0x61, 0x6C, 0x2F, 0x6C, 0x65, 0x6E, 0x67, 0x74, 0x68, 0x20, 0x63, 0x6F, - 0x64, 0x65, 0x20, 0x63, 0x6F, 0x75, 0x6E, 0x74, 0x00, 0x3F, 0x64, 0x65, - 0x66, 0x6C, 0x61, 0x74, 0x65, 0x3A, 0x20, 0x62, 0x61, 0x64, 0x20, 0x64, - 0x69, 0x73, 0x74, 0x61, 0x6E, 0x63, 0x65, 0x20, 0x63, 0x6F, 0x64, 0x65, - 0x20, 0x63, 0x6F, 0x75, 0x6E, 0x74, 0x00, 0x3F, 0x64, 0x65, 0x66, 0x6C, - 0x61, 0x74, 0x65, 0x3A, 0x20, 0x62, 0x61, 0x64, 0x20, 0x64, 0x69, 0x73, - 0x74, 0x61, 0x6E, 0x63, 0x65, 0x00, 0x3F, 0x64, 0x65, 0x66, 0x6C, 0x61, - 0x74, 0x65, 0x3A, 0x20, 0x62, 0x61, 0x64, 0x20, 0x62, 0x6C, 0x6F, 0x63, - 0x6B, 0x00, 0x3F, 0x64, 0x65, 0x66, 0x6C, 0x61, 0x74, 0x65, 0x3A, 0x20, - 0x62, 0x61, 0x64, 0x20, 0x48, 0x75, 0x66, 0x66, 0x6D, 0x61, 0x6E, 0x20, - 0x6D, 0x69, 0x6E, 0x69, 0x6D, 0x75, 0x6D, 0x20, 0x63, 0x6F, 0x64, 0x65, - 0x20, 0x6C, 0x65, 0x6E, 0x67, 0x74, 0x68, 0x00, 0x3F, 0x64, 0x65, 0x66, - 0x6C, 0x61, 0x74, 0x65, 0x3A, 0x20, 0x62, 0x61, 0x64, 0x20, 0x48, 0x75, - 0x66, 0x66, 0x6D, 0x61, 0x6E, 0x20, 0x63, 0x6F, 0x64, 0x65, 0x00, 0x3F, - 0x64, 0x65, 0x66, 0x6C, 0x61, 0x74, 0x65, 0x3A, 0x20, 0x62, 0x61, 0x64, - 0x20, 0x48, 0x75, 0x66, 0x66, 0x6D, 0x61, 0x6E, 0x20, 0x63, 0x6F, 0x64, - 0x65, 0x20, 0x6C, 0x65, 0x6E, 0x67, 0x74, 0x68, 0x20, 0x72, 0x65, 0x70, - 0x65, 0x74, 0x69, 0x74, 0x69, 0x6F, 0x6E, 0x00, 0x3F, 0x64, 0x65, 0x66, - 0x6C, 0x61, 0x74, 0x65, 0x3A, 0x20, 0x62, 0x61, 0x64, 0x20, 0x48, 0x75, - 0x66, 0x66, 0x6D, 0x61, 0x6E, 0x20, 0x63, 0x6F, 0x64, 0x65, 0x20, 0x6C, - 0x65, 0x6E, 0x67, 0x74, 0x68, 0x20, 0x63, 0x6F, 0x75, 0x6E, 0x74, 0x00, - 0x3F, 0x64, 0x65, 0x66, 0x6C, 0x61, 0x74, 0x65, 0x3A, 0x20, 0x62, 0x61, - 0x64, 0x20, 0x48, 0x75, 0x66, 0x66, 0x6D, 0x61, 0x6E, 0x20, 0x63, 0x6F, - 0x64, 0x65, 0x20, 0x28, 0x75, 0x6E, 0x64, 0x65, 0x72, 0x2D, 0x73, 0x75, - 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x64, 0x29, 0x00, 0x3F, 0x64, - 0x65, 0x66, 0x6C, 0x61, 0x74, 0x65, 0x3A, 0x20, 0x62, 0x61, 0x64, 0x20, - 0x48, 0x75, 0x66, 0x66, 0x6D, 0x61, 0x6E, 0x20, 0x63, 0x6F, 0x64, 0x65, - 0x20, 0x28, 0x6F, 0x76, 0x65, 0x72, 0x2D, 0x73, 0x75, 0x62, 0x73, 0x63, - 0x72, 0x69, 0x62, 0x65, 0x64, 0x29, 0x00, -}; - -static const uint16_t wuffs_deflate__status__string_offsets[] = { - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, - 0x002F, 0x005F, 0x008A, 0x00C6, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0103, 0x011E, 0x0142, 0x016D, 0x0195, 0x01B7, 0x01CE, 0x01E2, 0x020C, - 0x0227, 0x0254, 0x027C, 0x02AA, -}; - const char* wuffs_deflate__error__bad_huffman_code_over_subscribed = "?deflate: bad Huffman code (over-subscribed)"; const char* wuffs_deflate__error__bad_huffman_code_under_subscribed = @@ -4758,21 +4389,6 @@ const char* wuffs_deflate__error__internal_error_inconsistent_distance = const char* wuffs_deflate__error__internal_error_inconsistent_n_bits = "?deflate: internal error: inconsistent n_bits"; -const char* wuffs_deflate__status__string(int32_t status_code) { - uint16_t o; - switch (status_code & 0x1FFFFF) { - case 0: - return wuffs_base__status__string(status_code); - case wuffs_deflate__packageid: - o = wuffs_deflate__status__string_offsets[(uint8_t)(status_code >> 24)]; - if (o) { - return wuffs_deflate__status__string_data + o; - } - break; - } - return "unknown status"; -} - // ---------------- Private Consts static const uint8_t wuffs_deflate__code_order[19] = { @@ -6666,59 +6282,6 @@ exit: // ---------------- Status Codes Implementations -static const char wuffs_gif__status__string_data[] = { - 0x00, 0x3F, 0x67, 0x69, 0x66, 0x3A, 0x20, 0x69, 0x6E, 0x74, 0x65, 0x72, - 0x6E, 0x61, 0x6C, 0x20, 0x65, 0x72, 0x72, 0x6F, 0x72, 0x3A, 0x20, 0x69, - 0x6E, 0x63, 0x6F, 0x6E, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6E, 0x74, 0x20, - 0x72, 0x69, 0x2F, 0x77, 0x69, 0x00, 0x3F, 0x67, 0x69, 0x66, 0x3A, 0x20, - 0x74, 0x6F, 0x6F, 0x20, 0x6D, 0x75, 0x63, 0x68, 0x20, 0x70, 0x69, 0x78, - 0x65, 0x6C, 0x20, 0x64, 0x61, 0x74, 0x61, 0x00, 0x3F, 0x67, 0x69, 0x66, - 0x3A, 0x20, 0x6E, 0x6F, 0x74, 0x20, 0x65, 0x6E, 0x6F, 0x75, 0x67, 0x68, - 0x20, 0x70, 0x69, 0x78, 0x65, 0x6C, 0x20, 0x64, 0x61, 0x74, 0x61, 0x00, - 0x3F, 0x67, 0x69, 0x66, 0x3A, 0x20, 0x62, 0x61, 0x64, 0x20, 0x6C, 0x69, - 0x74, 0x65, 0x72, 0x61, 0x6C, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68, 0x00, - 0x3F, 0x67, 0x69, 0x66, 0x3A, 0x20, 0x62, 0x61, 0x64, 0x20, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x00, 0x3F, 0x67, 0x69, 0x66, 0x3A, 0x20, 0x62, - 0x61, 0x64, 0x20, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x20, 0x63, - 0x6F, 0x6E, 0x74, 0x72, 0x6F, 0x6C, 0x00, 0x3F, 0x67, 0x69, 0x66, 0x3A, - 0x20, 0x62, 0x61, 0x64, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6E, 0x73, 0x69, - 0x6F, 0x6E, 0x20, 0x6C, 0x61, 0x62, 0x65, 0x6C, 0x00, 0x3F, 0x67, 0x69, - 0x66, 0x3A, 0x20, 0x62, 0x61, 0x64, 0x20, 0x62, 0x6C, 0x6F, 0x63, 0x6B, - 0x00, -}; - -static const uint16_t wuffs_gif__status__string_offsets[] = { - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0001, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x002A, 0x0044, 0x0060, - 0x0078, 0x0089, 0x00A3, 0x00BD, -}; - const char* wuffs_gif__error__bad_block = "?gif: bad block"; const char* wuffs_gif__error__bad_extension_label = "?gif: bad extension label"; const char* wuffs_gif__error__bad_graphic_control = "?gif: bad graphic control"; @@ -6730,23 +6293,6 @@ const char* wuffs_gif__error__too_much_pixel_data = "?gif: too much pixel data"; const char* wuffs_gif__error__internal_error_inconsistent_ri_wi = "?gif: internal error: inconsistent ri/wi"; -const char* wuffs_gif__status__string(int32_t status_code) { - uint16_t o; - switch (status_code & 0x1FFFFF) { - case 0: - return wuffs_base__status__string(status_code); - case wuffs_gif__packageid: - o = wuffs_gif__status__string_offsets[(uint8_t)(status_code >> 24)]; - if (o) { - return wuffs_gif__status__string_data + o; - } - break; - case wuffs_lzw__packageid: - return wuffs_lzw__status__string(status_code); - } - return "unknown status"; -} - // ---------------- Private Consts static const uint32_t wuffs_gif__interlace_start[5] = { @@ -8737,74 +8283,12 @@ exit: // ---------------- Status Codes Implementations -static const char wuffs_gzip__status__string_data[] = { - 0x00, 0x3F, 0x67, 0x7A, 0x69, 0x70, 0x3A, 0x20, 0x62, 0x61, 0x64, 0x20, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x00, 0x3F, 0x67, 0x7A, 0x69, 0x70, - 0x3A, 0x20, 0x62, 0x61, 0x64, 0x20, 0x65, 0x6E, 0x63, 0x6F, 0x64, 0x69, - 0x6E, 0x67, 0x20, 0x66, 0x6C, 0x61, 0x67, 0x73, 0x00, 0x3F, 0x67, 0x7A, - 0x69, 0x70, 0x3A, 0x20, 0x62, 0x61, 0x64, 0x20, 0x63, 0x6F, 0x6D, 0x70, - 0x72, 0x65, 0x73, 0x73, 0x69, 0x6F, 0x6E, 0x20, 0x6D, 0x65, 0x74, 0x68, - 0x6F, 0x64, 0x00, 0x3F, 0x67, 0x7A, 0x69, 0x70, 0x3A, 0x20, 0x62, 0x61, - 0x64, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6B, 0x73, 0x75, 0x6D, 0x00, -}; - -static const uint16_t wuffs_gzip__status__string_offsets[] = { - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0001, 0x0013, 0x002D, 0x004B, -}; - const char* wuffs_gzip__error__bad_checksum = "?gzip: bad checksum"; const char* wuffs_gzip__error__bad_compression_method = "?gzip: bad compression method"; const char* wuffs_gzip__error__bad_encoding_flags = "?gzip: bad encoding flags"; const char* wuffs_gzip__error__bad_header = "?gzip: bad header"; -const char* wuffs_gzip__status__string(int32_t status_code) { - uint16_t o; - switch (status_code & 0x1FFFFF) { - case 0: - return wuffs_base__status__string(status_code); - case wuffs_gzip__packageid: - o = wuffs_gzip__status__string_offsets[(uint8_t)(status_code >> 24)]; - if (o) { - return wuffs_gzip__status__string_data + o; - } - break; - case wuffs_crc32__packageid: - return wuffs_crc32__status__string(status_code); - case wuffs_deflate__packageid: - return wuffs_deflate__status__string(status_code); - } - return "unknown status"; -} - // ---------------- Private Consts // ---------------- Private Initializer Prototypes @@ -9244,64 +8728,10 @@ exit: // ---------------- Status Codes Implementations -static const char wuffs_lzw__status__string_data[] = { - 0x00, 0x3F, 0x6C, 0x7A, 0x77, 0x3A, 0x20, 0x63, 0x79, 0x63, 0x6C, - 0x69, 0x63, 0x61, 0x6C, 0x20, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, - 0x20, 0x63, 0x68, 0x61, 0x69, 0x6E, 0x00, 0x3F, 0x6C, 0x7A, 0x77, - 0x3A, 0x20, 0x62, 0x61, 0x64, 0x20, 0x63, 0x6F, 0x64, 0x65, 0x00, -}; - -static const uint16_t wuffs_lzw__status__string_offsets[] = { - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0001, 0x001D, -}; - const char* wuffs_lzw__error__bad_code = "?lzw: bad code"; const char* wuffs_lzw__error__cyclical_prefix_chain = "?lzw: cyclical prefix chain"; -const char* wuffs_lzw__status__string(int32_t status_code) { - uint16_t o; - switch (status_code & 0x1FFFFF) { - case 0: - return wuffs_base__status__string(status_code); - case wuffs_lzw__packageid: - o = wuffs_lzw__status__string_offsets[(uint8_t)(status_code >> 24)]; - if (o) { - return wuffs_lzw__status__string_data + o; - } - break; - } - return "unknown status"; -} - // ---------------- Private Consts // ---------------- Private Initializer Prototypes @@ -9584,54 +9014,6 @@ exit: // ---------------- Status Codes Implementations -static const char wuffs_zlib__status__string_data[] = { - 0x00, 0x3F, 0x7A, 0x6C, 0x69, 0x62, 0x3A, 0x20, 0x54, 0x4F, 0x44, 0x4F, - 0x3A, 0x20, 0x75, 0x6E, 0x73, 0x75, 0x70, 0x70, 0x6F, 0x72, 0x74, 0x65, - 0x64, 0x20, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x20, 0x64, 0x69, 0x63, - 0x74, 0x69, 0x6F, 0x6E, 0x61, 0x72, 0x79, 0x00, 0x3F, 0x7A, 0x6C, 0x69, - 0x62, 0x3A, 0x20, 0x62, 0x61, 0x64, 0x20, 0x70, 0x61, 0x72, 0x69, 0x74, - 0x79, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6B, 0x00, 0x3F, 0x7A, 0x6C, 0x69, - 0x62, 0x3A, 0x20, 0x62, 0x61, 0x64, 0x20, 0x63, 0x6F, 0x6D, 0x70, 0x72, - 0x65, 0x73, 0x73, 0x69, 0x6F, 0x6E, 0x20, 0x77, 0x69, 0x6E, 0x64, 0x6F, - 0x77, 0x20, 0x73, 0x69, 0x7A, 0x65, 0x00, 0x3F, 0x7A, 0x6C, 0x69, 0x62, - 0x3A, 0x20, 0x62, 0x61, 0x64, 0x20, 0x63, 0x6F, 0x6D, 0x70, 0x72, 0x65, - 0x73, 0x73, 0x69, 0x6F, 0x6E, 0x20, 0x6D, 0x65, 0x74, 0x68, 0x6F, 0x64, - 0x00, 0x3F, 0x7A, 0x6C, 0x69, 0x62, 0x3A, 0x20, 0x62, 0x61, 0x64, 0x20, - 0x63, 0x68, 0x65, 0x63, 0x6B, 0x73, 0x75, 0x6D, 0x00, -}; - -static const uint16_t wuffs_zlib__status__string_offsets[] = { - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0001, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x002C, 0x0044, 0x0067, 0x0085, -}; - const char* wuffs_zlib__error__bad_checksum = "?zlib: bad checksum"; const char* wuffs_zlib__error__bad_compression_method = "?zlib: bad compression method"; @@ -9641,25 +9023,6 @@ const char* wuffs_zlib__error__bad_parity_check = "?zlib: bad parity check"; const char* wuffs_zlib__error__todo_unsupported_preset_dictionary = "?zlib: TODO: unsupported preset dictionary"; -const char* wuffs_zlib__status__string(int32_t status_code) { - uint16_t o; - switch (status_code & 0x1FFFFF) { - case 0: - return wuffs_base__status__string(status_code); - case wuffs_zlib__packageid: - o = wuffs_zlib__status__string_offsets[(uint8_t)(status_code >> 24)]; - if (o) { - return wuffs_zlib__status__string_data + o; - } - break; - case wuffs_adler32__packageid: - return wuffs_adler32__status__string(status_code); - case wuffs_deflate__packageid: - return wuffs_deflate__status__string(status_code); - } - return "unknown status"; -} - // ---------------- Private Consts // ---------------- Private Initializer Prototypes