mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 00:32:11 +01:00
Add WUFFS_BASE__QUIRK_IGNORE_CHECKSUM
This commit is contained in:
1 parent
cf4aff9ef0
commit
b2fe296a43
5 files changed
+33
No files matched your search
@@ -347,6 +347,12 @@ typedef struct wuffs_base__transform__output__struct {
|
||||
|
||||
// --------
|
||||
|
||||
// Quirks.
|
||||
|
||||
// !! INSERT Quirks.
|
||||
|
||||
// --------
|
||||
|
||||
// Flicks are a unit of time. One flick (frame-tick) is 1 / 705_600_000 of a
|
||||
// second. See https://github.com/OculusVR/Flicks
|
||||
typedef int64_t wuffs_base__flicks;
|
||||
|
||||
@@ -302,6 +302,21 @@ func insertBaseAllPublicH(buf *buffer) error {
|
||||
}
|
||||
return nil
|
||||
},
|
||||
"// !! INSERT Quirks.\n": func(b *buffer) error {
|
||||
first := true
|
||||
for _, z := range builtin.Consts {
|
||||
if (z.Name == "") || (z.Name[0] != 'Q') || !strings.HasPrefix(z.Name, "QUIRK_") {
|
||||
continue
|
||||
}
|
||||
if first {
|
||||
first = false
|
||||
} else {
|
||||
b.writeb('\n')
|
||||
}
|
||||
b.printf("#define WUFFS_BASE__%s %s\n", z.Name, z.Value)
|
||||
}
|
||||
return nil
|
||||
},
|
||||
"// !! INSERT wuffs_base__status names.\n": func(b *buffer) error {
|
||||
for _, z := range builtin.Statuses {
|
||||
msg, _ := t.Unescape(z)
|
||||
|
||||
@@ -78,6 +78,8 @@ const BaseFundamentalPublicH = "" +
|
||||
"" +
|
||||
"// --------\n\n// FourCC constants.\n\n// !! INSERT FourCCs.\n\n" +
|
||||
"" +
|
||||
"// --------\n\n// Quirks.\n\n// !! INSERT Quirks.\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" +
|
||||
"" +
|
||||
"// ---------------- Numeric Types\n\n// The helpers below are functions, instead of macros, because their arguments\n// can be an expression that we shouldn't evaluate more than once.\n//\n// They are static, so that linking multiple wuffs .o files won't complain about\n// duplicate function definitions.\n//\n// They are explicitly marked inline, even if modern compilers don't use the\n// inline attribute to guide optimizations such as inlining, to avoid the\n// -Wunused-function warning, and we like to compile with -Wall -Werror.\n\nstatic inline int8_t //\nwuffs_base__i8__min(int8_t x, int8_t y) {\n return x < y ? x : y;\n}\n\nstatic inline int8_t //\nwuffs_base__i8__max(int8_t x, int8_t y) {\n return x > y ? x : y;\n}\n\nstatic inline int16_t //\nwuffs_base__i16__min(int16_t x, int16_t y) {\n return x < y ? x : y;\n}\n\nstatic inline int16_t //\nwuffs_base__i16__max(int16_t x, int16_t y) {\n return x > y ? x : y;\n}\n\nstatic inline int32_t //\nwuffs_base__i32__min(int32_t x, int32_t y) {\n return x < y ? x : y;\n}\n\nstatic inline " +
|
||||
|
||||
@@ -79,6 +79,10 @@ var Consts = [...]struct {
|
||||
|
||||
// ----
|
||||
|
||||
{t.IDU32, "1", "QUIRK_IGNORE_CHECKSUM"},
|
||||
|
||||
// ----
|
||||
|
||||
{t.IDU32, "46", "TOKEN__VALUE_EXTENSION__NUM_BITS"},
|
||||
|
||||
// ----
|
||||
|
||||
@@ -421,6 +421,12 @@ typedef struct wuffs_base__transform__output__struct {
|
||||
|
||||
// --------
|
||||
|
||||
// Quirks.
|
||||
|
||||
#define WUFFS_BASE__QUIRK_IGNORE_CHECKSUM 1
|
||||
|
||||
// --------
|
||||
|
||||
// Flicks are a unit of time. One flick (frame-tick) is 1 / 705_600_000 of a
|
||||
// second. See https://github.com/OculusVR/Flicks
|
||||
typedef int64_t wuffs_base__flicks;
|
||||
|
||||
Reference in new issue
Block a user