mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-23 16:52:18 +01:00
Add colons to const syntax
This commit is contained in:
1 parent
80071730a3
commit
532e18c4a5
16 files changed
+119
-99
No files matched your search
@@ -13,12 +13,12 @@
|
||||
// limitations under the License.
|
||||
|
||||
// CODE_ORDER is defined in the RFC section 3.2.7.
|
||||
pri const CODE_ORDER array[19] base.u8[..= 18] = [
|
||||
pri const CODE_ORDER : array[19] base.u8[..= 18] = [
|
||||
16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15,
|
||||
]
|
||||
|
||||
// REVERSE8 reverses the bits in a byte.
|
||||
pri const REVERSE8 array[256] base.u8 = [
|
||||
pri const REVERSE8 : array[256] base.u8 = [
|
||||
0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0, // 0x00 - 0x07
|
||||
0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0, // 0x08 - 0x0F
|
||||
0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8, // 0x10 - 0x17
|
||||
|
||||
@@ -33,7 +33,7 @@ pri status "#internal error: inconsistent n_bits"
|
||||
|
||||
// TODO: replace the placeholder 1 value with either 0 or (32768 + 512),
|
||||
// depending on whether we'll move decoder.history into the workbuf.
|
||||
pub const DECODER_WORKBUF_LEN_MAX_INCL_WORST_CASE base.u64 = 1
|
||||
pub const DECODER_WORKBUF_LEN_MAX_INCL_WORST_CASE : base.u64 = 1
|
||||
|
||||
// The next two tables were created by script/print-deflate-magic-numbers.go.
|
||||
//
|
||||
@@ -43,14 +43,14 @@ pub const DECODER_WORKBUF_LEN_MAX_INCL_WORST_CASE base.u64 = 1
|
||||
//
|
||||
// Some trailing elements are 0x08000000. Bit 27 indicates an invalid value.
|
||||
|
||||
pri const LCODE_MAGIC_NUMBERS array[32] base.u32 = [
|
||||
pri const LCODE_MAGIC_NUMBERS : array[32] base.u32 = [
|
||||
0x4000_0000, 0x4000_0100, 0x4000_0200, 0x4000_0300, 0x4000_0400, 0x4000_0500, 0x4000_0600, 0x4000_0700,
|
||||
0x4000_0810, 0x4000_0A10, 0x4000_0C10, 0x4000_0E10, 0x4000_1020, 0x4000_1420, 0x4000_1820, 0x4000_1C20,
|
||||
0x4000_2030, 0x4000_2830, 0x4000_3030, 0x4000_3830, 0x4000_4040, 0x4000_5040, 0x4000_6040, 0x4000_7040,
|
||||
0x4000_8050, 0x4000_A050, 0x4000_C050, 0x4000_E050, 0x4000_FF00, 0x0800_0000, 0x0800_0000, 0x0800_0000,
|
||||
]
|
||||
|
||||
pri const DCODE_MAGIC_NUMBERS array[32] base.u32 = [
|
||||
pri const DCODE_MAGIC_NUMBERS : array[32] base.u32 = [
|
||||
0x4000_0000, 0x4000_0100, 0x4000_0200, 0x4000_0300, 0x4000_0410, 0x4000_0610, 0x4000_0820, 0x4000_0C20,
|
||||
0x4000_1030, 0x4000_1830, 0x4000_2040, 0x4000_3040, 0x4000_4050, 0x4000_6050, 0x4000_8060, 0x4000_C060,
|
||||
0x4001_0070, 0x4001_8070, 0x4002_0080, 0x4003_0080, 0x4004_0090, 0x4006_0090, 0x4008_00A0, 0x400C_00A0,
|
||||
@@ -62,8 +62,8 @@ pri const DCODE_MAGIC_NUMBERS array[32] base.u32 = [
|
||||
// script/print-deflate-huff-table-size.go which calculates that, for a 9-bit
|
||||
// primary table, the worst-case size is 852 for the Lit/Len table and 592 for
|
||||
// the Distance table.
|
||||
pri const HUFFS_TABLE_SIZE base.u32 = 1024
|
||||
pri const HUFFS_TABLE_MASK base.u32 = 1023
|
||||
pri const HUFFS_TABLE_SIZE : base.u32 = 1024
|
||||
pri const HUFFS_TABLE_MASK : base.u32 = 1023
|
||||
|
||||
pub struct decoder? implements base.io_transformer(
|
||||
// These fields yield src's bits in Least Significant Bits order.
|
||||
|
||||
Reference in new issue
Block a user