Add FourCC constants

This commit is contained in:
Nigel Tao committed 2019-04-20 11:44:49 +10:00
1 parent 31c6eabfe8
commit 7416111b9e
5 files changed
+36

No files matched your search

+13
View File
@@ -263,6 +263,19 @@ func insertBaseAllPrivateH(buf *buffer) error {
func insertBaseAllPublicH(buf *buffer) error {
if err := expandBangBangInsert(buf, baseCorePublicH, map[string]func(*buffer) error{
"// !! INSERT FourCCs.\n": func(b *buffer) error {
for _, z := range builtin.FourCCs {
b.printf("// %s.\n#define WUFFS_BASE__FOURCC__%s 0x%02X%02X%02X%02X\n\n",
z[1],
strings.ToUpper(strings.TrimSpace(z[0])),
z[0][0],
z[0][1],
z[0][2],
z[0][3],
)
}
return nil
},
"// !! INSERT wuffs_base__status names.\n": func(b *buffer) error {
for _, z := range builtin.Statuses {
msg, _ := t.Unescape(z)