Rename some #ifndef WUFFS_BASE_HEADER_H guards

This commit is contained in:
Nigel Tao committed 2018-06-10 09:37:30 +10:00
1 parent a1ed77cc35
commit df96e48341
22 files changed
+87 -87

No files matched your search

+3 -3
View File
@@ -1,7 +1,7 @@
// After editing this file, run "go generate" in the parent directory.
#ifndef WUFFS_BASE_HEADER_H
#define WUFFS_BASE_HEADER_H
#ifndef WUFFS_BASE_PUBLIC_H
#define WUFFS_BASE_PUBLIC_H
// Copyright 2017 The Wuffs Authors.
//
@@ -1211,4 +1211,4 @@ static inline wuffs_base__table_u8 wuffs_base__image_buffer__plane(
: ((wuffs_base__table_u8){});
}
#endif // WUFFS_BASE_HEADER_H
#endif // WUFFS_BASE_PUBLIC_H
+9 -9
View File
@@ -351,7 +351,7 @@ func (g *gen) genHeader(b *buffer) error {
}
func (g *gen) genImpl(b *buffer) error {
b.writes("#ifndef WUFFS_BASE_IMPL_H\n#define WUFFS_BASE_IMPL_H\n\n")
b.writes("#ifndef WUFFS_BASE_PRIVATE_H\n#define WUFFS_BASE_PRIVATE_H\n\n")
b.writes(basePrivateH)
b.writes("\n")
b.printf("static const char* wuffs_base__status__strings[%d] = {\n", len(builtin.StatusList))
@@ -359,7 +359,7 @@ func (g *gen) genImpl(b *buffer) error {
b.printf("%q,", z.Message)
}
b.writes("};\n\n")
b.writes("#endif // WUFFS_BASE_IMPL_H\n\n")
b.writes("#endif // WUFFS_BASE_PRIVATE_H\n\n")
b.writes("// ---------------- Status Codes Implementations\n\n")
b.printf("bool %sstatus__is_error(%sstatus s) { return s < 0; }\n\n", g.pkgPrefix, g.pkgPrefix)
@@ -651,8 +651,8 @@ func (g *gen) writeStruct(b *buffer, n *a.Struct) error {
}
var (
wuffsBaseHeaderHStart = []byte("#ifndef WUFFS_BASE_HEADER_H\n")
wuffsBaseHeaderHEnd = []byte("#endif // WUFFS_BASE_HEADER_H\n")
wuffsBasePublicHStart = []byte("#ifndef WUFFS_BASE_PUBLIC_H\n")
wuffsBasePublicHEnd = []byte("#endif // WUFFS_BASE_PUBLIC_H\n")
)
func (g *gen) writeUse(b *buffer, n *a.Use) error {
@@ -686,17 +686,17 @@ func (g *gen) writeUse(b *buffer, n *a.Use) error {
b.printf("// ---------------- BEGIN USE %q\n\n", useDirname)
// Inline the previously generated .h file, stripping out the redundant
// copy of the WUFFS_BASE_HEADER_H code.
if i := bytes.Index(hdr, wuffsBaseHeaderHStart); i < 0 {
// copy of the WUFFS_BASE_PUBLIC_H code.
if i := bytes.Index(hdr, wuffsBasePublicHStart); i < 0 {
return fmt.Errorf("use %q: previously generated header %q could not be inlined", useDirname, hdrFilename)
} else {
b.Write(hdr[:i])
hdr = hdr[i+len(wuffsBaseHeaderHStart):]
hdr = hdr[i+len(wuffsBasePublicHStart):]
}
if i := bytes.Index(hdr, wuffsBaseHeaderHEnd); i < 0 {
if i := bytes.Index(hdr, wuffsBasePublicHEnd); i < 0 {
return fmt.Errorf("use %q: previously generated header %q could not be inlined", useDirname, hdrFilename)
} else {
b.Write(hdr[i+len(wuffsBaseHeaderHEnd):])
b.Write(hdr[i+len(wuffsBasePublicHEnd):])
}
b.writeb('\n')
+2 -2
View File
@@ -17,7 +17,7 @@
package cgen
const basePublicH = "" +
"#ifndef WUFFS_BASE_HEADER_H\n#define WUFFS_BASE_HEADER_H\n\n// Copyright 2017 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#include <stdbool.h>\n#include <stdint.h>\n#include <string.h>\n\n// Wuffs assumes that:\n// - converting a uint32_t to a size_t will never overflow.\n// - converting a size_t to a uint64_t will never overflow.\n#if (__WORDSIZE != 32) && (__WORDSIZE != 64)\n#error \"Wuffs requires a word size of either 32 or 64 bits\"\n#endif\n\n// WUFFS_VERSION is the major.minor.patch version, " +
"#ifndef WUFFS_BASE_PUBLIC_H\n#define WUFFS_BASE_PUBLIC_H\n\n// Copyright 2017 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#include <stdbool.h>\n#include <stdint.h>\n#include <string.h>\n\n// Wuffs assumes that:\n// - converting a uint32_t to a size_t will never overflow.\n// - converting a size_t to a uint64_t will never overflow.\n#if (__WORDSIZE != 32) && (__WORDSIZE != 64)\n#error \"Wuffs requires a word size of either 32 or 64 bits\"\n#endif\n\n// WUFFS_VERSION is the major.minor.patch version, " +
"as per https://semver.org/,\n// as a uint64_t. The major number is the high 32 bits. The minor number is the\n// middle 16 bits. The patch number is the low 16 bits. The version extension\n// (such as \"\", \"beta\" or \"rc.1\") is part of the string representation (such as\n// \"1.2.3-beta\") but not the uint64_t representation.\n//\n// All three of major, minor and patch being zero means that this is a\n// work-in-progress version, not a release version, and has no backwards or\n// forwards compatibility guarantees.\n//\n// !! Some code generation programs can override WUFFS_VERSION.\n#define WUFFS_VERSION ((uint64_t)0)\n#define WUFFS_VERSION_MAJOR ((uint64_t)0)\n#define WUFFS_VERSION_MINOR ((uint64_t)0)\n#define WUFFS_VERSION_PATCH ((uint64_t)0)\n#define WUFFS_VERSION_EXTENSION \"\"\n#define WUFFS_VERSION_STRING \"0.0.0\"\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} wuffs_base__empty_struct;\n\n" +
"" +
@@ -87,7 +87,7 @@ const basePublicH = "" +
"he image bounds.\n dirty_rect.max_exclusive_x = wuffs_base__u32__min(\n dirty_rect.max_exclusive_x, b->private_impl.config.private_impl.width);\n dirty_rect.max_exclusive_y = wuffs_base__u32__min(\n dirty_rect.max_exclusive_y, b->private_impl.config.private_impl.height);\n b->private_impl.dirty_rect = dirty_rect;\n\n b->private_impl.duration = duration;\n b->private_impl.blend = blend;\n b->private_impl.disposal = disposal;\n b->private_impl.palette_changed = palette.ptr && (palette.len == 1024);\n if (b->private_impl.palette_changed) {\n memmove(b->private_impl.palette, palette.ptr, 1024);\n }\n}\n\n// wuffs_base__image_buffer__loop returns whether the image decoder should loop\n// back to the beginning of the animation, assuming that we've reached the end\n// of the encoded stream. If so, it increments b's count of the animation loops\n// played so far.\nstatic inline bool wuffs_base__image_buffer__loop(wuffs_base__image_buffer* b) {\n if (!b) {\n return false;\n }\n uint32_t n = b->private_impl.config." +
"private_impl.num_loops;\n if (n == 0) {\n return true;\n }\n if (b->private_impl.loop_count < n - 1) {\n b->private_impl.loop_count++;\n return true;\n }\n return false;\n}\n\n// wuffs_base__image_config returns the overall configuration for this frame.\nstatic inline wuffs_base__image_config* wuffs_base__image_buffer__image_config(\n wuffs_base__image_buffer* b) {\n return b ? &b->private_impl.config : NULL;\n}\n\n// wuffs_base__image_buffer__dirty_rect returns an upper bound for what part of\n// this frame's pixels differs from the previous frame.\nstatic inline wuffs_base__rect_ie_u32 wuffs_base__image_buffer__dirty_rect(\n wuffs_base__image_buffer* b) {\n return b ? b->private_impl.dirty_rect : ((wuffs_base__rect_ie_u32){0});\n}\n\n// wuffs_base__image_buffer__duration returns the amount of time to display\n// this frame. Zero means to display forever - a still (non-animated) image.\nstatic inline wuffs_base__flicks wuffs_base__image_buffer__duration(\n wuffs_base__image_buffer* b) {\n return b ? b->private" +
"_impl.duration : 0;\n}\n\n// wuffs_base__image_buffer__blend returns, for a transparent image, whether to\n// blend this frame with the existing canvas.\n//\n// In Porter-Duff compositing operator terminology, false means \"src\" and true\n// means \"src over dst\".\nstatic inline bool wuffs_base__image_buffer__blend(\n wuffs_base__image_buffer* b) {\n return b && b->private_impl.blend;\n}\n\n// wuffs_base__image_buffer__disposal returns, for an animated image, how to\n// dispose of this frame after displaying it.\nstatic inline wuffs_base__animation_disposal wuffs_base__image_buffer__disposal(\n wuffs_base__image_buffer* b) {\n return b ? b->private_impl.disposal : 0;\n}\n\n// wuffs_base__image_buffer__palette_changed returns whether this frame's\n// palette differs from the previous frame. It is conservative and may return\n// false positives (but never false negatives).\nstatic inline bool wuffs_base__image_buffer__palette_changed(\n wuffs_base__image_buffer* b) {\n return b && b->private_impl.palette_changed;\n}\n\n// wuffs_" +
"base__image_buffer__palette returns the palette that the pixel data\n// can index. The backing array is inside b and has length 1024.\nstatic inline wuffs_base__slice_u8 wuffs_base__image_buffer__palette(\n wuffs_base__image_buffer* b) {\n return b ? ((wuffs_base__slice_u8){.ptr = b->private_impl.palette,\n .len = 1024})\n : ((wuffs_base__slice_u8){});\n}\n\nstatic inline wuffs_base__table_u8 wuffs_base__image_buffer__plane(\n wuffs_base__image_buffer* b,\n uint32_t p) {\n return (b && (p < WUFFS_BASE__PIXEL_FORMAT__NUM_PLANES_MAX))\n ? b->private_impl.pixbuf.planes[p]\n : ((wuffs_base__table_u8){});\n}\n\n#endif // WUFFS_BASE_HEADER_H\n" +
"base__image_buffer__palette returns the palette that the pixel data\n// can index. The backing array is inside b and has length 1024.\nstatic inline wuffs_base__slice_u8 wuffs_base__image_buffer__palette(\n wuffs_base__image_buffer* b) {\n return b ? ((wuffs_base__slice_u8){.ptr = b->private_impl.palette,\n .len = 1024})\n : ((wuffs_base__slice_u8){});\n}\n\nstatic inline wuffs_base__table_u8 wuffs_base__image_buffer__plane(\n wuffs_base__image_buffer* b,\n uint32_t p) {\n return (b && (p < WUFFS_BASE__PIXEL_FORMAT__NUM_PLANES_MAX))\n ? b->private_impl.pixbuf.planes[p]\n : ((wuffs_base__table_u8){});\n}\n\n#endif // WUFFS_BASE_PUBLIC_H\n" +
""
const basePrivateH = "" +
+1 -1
View File
@@ -16,7 +16,7 @@
#include <stdio.h>
#include <stdlib.h>
#ifndef WUFFS_BASE_HEADER_H
#ifndef WUFFS_BASE_PUBLIC_H
#error "Wuffs' .c or .h files need to be included before this file"
#endif
+3 -3
View File
@@ -14,8 +14,8 @@
// Code generated by wuffs-c. DO NOT EDIT.
#ifndef WUFFS_BASE_HEADER_H
#define WUFFS_BASE_HEADER_H
#ifndef WUFFS_BASE_PUBLIC_H
#define WUFFS_BASE_PUBLIC_H
// Copyright 2017 The Wuffs Authors.
//
@@ -1225,7 +1225,7 @@ static inline wuffs_base__table_u8 wuffs_base__image_buffer__plane(
: ((wuffs_base__table_u8){});
}
#endif // WUFFS_BASE_HEADER_H
#endif // WUFFS_BASE_PUBLIC_H
const char* wuffs_base__status__string(int32_t s) {
return "unknown status";
+6 -6
View File
@@ -3,8 +3,8 @@
// Code generated by wuffs-c. DO NOT EDIT.
#ifndef WUFFS_BASE_HEADER_H
#define WUFFS_BASE_HEADER_H
#ifndef WUFFS_BASE_PUBLIC_H
#define WUFFS_BASE_PUBLIC_H
// Copyright 2017 The Wuffs Authors.
//
@@ -1214,7 +1214,7 @@ static inline wuffs_base__table_u8 wuffs_base__image_buffer__plane(
: ((wuffs_base__table_u8){});
}
#endif // WUFFS_BASE_HEADER_H
#endif // WUFFS_BASE_PUBLIC_H
// ---------------- Use Declarations
@@ -1305,8 +1305,8 @@ uint32_t wuffs_adler32__hasher__update(wuffs_adler32__hasher* self,
// C HEADER ENDS HERE.
#ifndef WUFFS_BASE_IMPL_H
#define WUFFS_BASE_IMPL_H
#ifndef WUFFS_BASE_PRIVATE_H
#define WUFFS_BASE_PRIVATE_H
// Copyright 2017 The Wuffs Authors.
//
@@ -1871,7 +1871,7 @@ static const char* wuffs_base__status__strings[15] = {
"end of data",
};
#endif // WUFFS_BASE_IMPL_H
#endif // WUFFS_BASE_PRIVATE_H
// ---------------- Status Codes Implementations
+6 -6
View File
@@ -3,8 +3,8 @@
// Code generated by wuffs-c. DO NOT EDIT.
#ifndef WUFFS_BASE_HEADER_H
#define WUFFS_BASE_HEADER_H
#ifndef WUFFS_BASE_PUBLIC_H
#define WUFFS_BASE_PUBLIC_H
// Copyright 2017 The Wuffs Authors.
//
@@ -1214,7 +1214,7 @@ static inline wuffs_base__table_u8 wuffs_base__image_buffer__plane(
: ((wuffs_base__table_u8){});
}
#endif // WUFFS_BASE_HEADER_H
#endif // WUFFS_BASE_PUBLIC_H
// ---------------- Use Declarations
@@ -1304,8 +1304,8 @@ uint32_t wuffs_crc32__ieee_hasher__update(wuffs_crc32__ieee_hasher* self,
// C HEADER ENDS HERE.
#ifndef WUFFS_BASE_IMPL_H
#define WUFFS_BASE_IMPL_H
#ifndef WUFFS_BASE_PRIVATE_H
#define WUFFS_BASE_PRIVATE_H
// Copyright 2017 The Wuffs Authors.
//
@@ -1870,7 +1870,7 @@ static const char* wuffs_base__status__strings[15] = {
"end of data",
};
#endif // WUFFS_BASE_IMPL_H
#endif // WUFFS_BASE_PRIVATE_H
// ---------------- Status Codes Implementations
+6 -6
View File
@@ -3,8 +3,8 @@
// Code generated by wuffs-c. DO NOT EDIT.
#ifndef WUFFS_BASE_HEADER_H
#define WUFFS_BASE_HEADER_H
#ifndef WUFFS_BASE_PUBLIC_H
#define WUFFS_BASE_PUBLIC_H
// Copyright 2017 The Wuffs Authors.
//
@@ -1214,7 +1214,7 @@ static inline wuffs_base__table_u8 wuffs_base__image_buffer__plane(
: ((wuffs_base__table_u8){});
}
#endif // WUFFS_BASE_HEADER_H
#endif // WUFFS_BASE_PUBLIC_H
// ---------------- Use Declarations
@@ -1395,8 +1395,8 @@ wuffs_deflate__status wuffs_deflate__decoder__decode(
// C HEADER ENDS HERE.
#ifndef WUFFS_BASE_IMPL_H
#define WUFFS_BASE_IMPL_H
#ifndef WUFFS_BASE_PRIVATE_H
#define WUFFS_BASE_PRIVATE_H
// Copyright 2017 The Wuffs Authors.
//
@@ -1961,7 +1961,7 @@ static const char* wuffs_base__status__strings[15] = {
"end of data",
};
#endif // WUFFS_BASE_IMPL_H
#endif // WUFFS_BASE_PRIVATE_H
// ---------------- Status Codes Implementations
+6 -6
View File
@@ -3,8 +3,8 @@
// Code generated by wuffs-c. DO NOT EDIT.
#ifndef WUFFS_BASE_HEADER_H
#define WUFFS_BASE_HEADER_H
#ifndef WUFFS_BASE_PUBLIC_H
#define WUFFS_BASE_PUBLIC_H
// Copyright 2017 The Wuffs Authors.
//
@@ -1214,7 +1214,7 @@ static inline wuffs_base__table_u8 wuffs_base__image_buffer__plane(
: ((wuffs_base__table_u8){});
}
#endif // WUFFS_BASE_HEADER_H
#endif // WUFFS_BASE_PUBLIC_H
// ---------------- Use Declarations
@@ -1534,8 +1534,8 @@ wuffs_gif__status wuffs_gif__decoder__decode_up_to_id_part1(
// C HEADER ENDS HERE.
#ifndef WUFFS_BASE_IMPL_H
#define WUFFS_BASE_IMPL_H
#ifndef WUFFS_BASE_PRIVATE_H
#define WUFFS_BASE_PRIVATE_H
// Copyright 2017 The Wuffs Authors.
//
@@ -2100,7 +2100,7 @@ static const char* wuffs_base__status__strings[15] = {
"end of data",
};
#endif // WUFFS_BASE_IMPL_H
#endif // WUFFS_BASE_PRIVATE_H
// ---------------- Status Codes Implementations
+6 -6
View File
@@ -3,8 +3,8 @@
// Code generated by wuffs-c. DO NOT EDIT.
#ifndef WUFFS_BASE_HEADER_H
#define WUFFS_BASE_HEADER_H
#ifndef WUFFS_BASE_PUBLIC_H
#define WUFFS_BASE_PUBLIC_H
// Copyright 2017 The Wuffs Authors.
//
@@ -1214,7 +1214,7 @@ static inline wuffs_base__table_u8 wuffs_base__image_buffer__plane(
: ((wuffs_base__table_u8){});
}
#endif // WUFFS_BASE_HEADER_H
#endif // WUFFS_BASE_PUBLIC_H
// ---------------- Use Declarations
@@ -1607,8 +1607,8 @@ wuffs_gzip__status wuffs_gzip__decoder__decode(wuffs_gzip__decoder* self,
// C HEADER ENDS HERE.
#ifndef WUFFS_BASE_IMPL_H
#define WUFFS_BASE_IMPL_H
#ifndef WUFFS_BASE_PRIVATE_H
#define WUFFS_BASE_PRIVATE_H
// Copyright 2017 The Wuffs Authors.
//
@@ -2173,7 +2173,7 @@ static const char* wuffs_base__status__strings[15] = {
"end of data",
};
#endif // WUFFS_BASE_IMPL_H
#endif // WUFFS_BASE_PRIVATE_H
// ---------------- Status Codes Implementations
+6 -6
View File
@@ -3,8 +3,8 @@
// Code generated by wuffs-c. DO NOT EDIT.
#ifndef WUFFS_BASE_HEADER_H
#define WUFFS_BASE_HEADER_H
#ifndef WUFFS_BASE_PUBLIC_H
#define WUFFS_BASE_PUBLIC_H
// Copyright 2017 The Wuffs Authors.
//
@@ -1214,7 +1214,7 @@ static inline wuffs_base__table_u8 wuffs_base__image_buffer__plane(
: ((wuffs_base__table_u8){});
}
#endif // WUFFS_BASE_HEADER_H
#endif // WUFFS_BASE_PUBLIC_H
// ---------------- Use Declarations
@@ -1328,8 +1328,8 @@ wuffs_lzw__status wuffs_lzw__decoder__decode(wuffs_lzw__decoder* self,
// C HEADER ENDS HERE.
#ifndef WUFFS_BASE_IMPL_H
#define WUFFS_BASE_IMPL_H
#ifndef WUFFS_BASE_PRIVATE_H
#define WUFFS_BASE_PRIVATE_H
// Copyright 2017 The Wuffs Authors.
//
@@ -1894,7 +1894,7 @@ static const char* wuffs_base__status__strings[15] = {
"end of data",
};
#endif // WUFFS_BASE_IMPL_H
#endif // WUFFS_BASE_PRIVATE_H
// ---------------- Status Codes Implementations
+6 -6
View File
@@ -3,8 +3,8 @@
// Code generated by wuffs-c. DO NOT EDIT.
#ifndef WUFFS_BASE_HEADER_H
#define WUFFS_BASE_HEADER_H
#ifndef WUFFS_BASE_PUBLIC_H
#define WUFFS_BASE_PUBLIC_H
// Copyright 2017 The Wuffs Authors.
//
@@ -1214,7 +1214,7 @@ static inline wuffs_base__table_u8 wuffs_base__image_buffer__plane(
: ((wuffs_base__table_u8){});
}
#endif // WUFFS_BASE_HEADER_H
#endif // WUFFS_BASE_PUBLIC_H
// ---------------- Use Declarations
@@ -1606,8 +1606,8 @@ wuffs_zlib__status wuffs_zlib__decoder__decode(wuffs_zlib__decoder* self,
// C HEADER ENDS HERE.
#ifndef WUFFS_BASE_IMPL_H
#define WUFFS_BASE_IMPL_H
#ifndef WUFFS_BASE_PRIVATE_H
#define WUFFS_BASE_PRIVATE_H
// Copyright 2017 The Wuffs Authors.
//
@@ -2172,7 +2172,7 @@ static const char* wuffs_base__status__strings[15] = {
"end of data",
};
#endif // WUFFS_BASE_IMPL_H
#endif // WUFFS_BASE_PRIVATE_H
// ---------------- Status Codes Implementations
+3 -3
View File
@@ -3,8 +3,8 @@
// Code generated by wuffs-c. DO NOT EDIT.
#ifndef WUFFS_BASE_HEADER_H
#define WUFFS_BASE_HEADER_H
#ifndef WUFFS_BASE_PUBLIC_H
#define WUFFS_BASE_PUBLIC_H
// Copyright 2017 The Wuffs Authors.
//
@@ -1214,7 +1214,7 @@ static inline wuffs_base__table_u8 wuffs_base__image_buffer__plane(
: ((wuffs_base__table_u8){});
}
#endif // WUFFS_BASE_HEADER_H
#endif // WUFFS_BASE_PUBLIC_H
// ---------------- Use Declarations
+3 -3
View File
@@ -3,8 +3,8 @@
// Code generated by wuffs-c. DO NOT EDIT.
#ifndef WUFFS_BASE_HEADER_H
#define WUFFS_BASE_HEADER_H
#ifndef WUFFS_BASE_PUBLIC_H
#define WUFFS_BASE_PUBLIC_H
// Copyright 2017 The Wuffs Authors.
//
@@ -1214,7 +1214,7 @@ static inline wuffs_base__table_u8 wuffs_base__image_buffer__plane(
: ((wuffs_base__table_u8){});
}
#endif // WUFFS_BASE_HEADER_H
#endif // WUFFS_BASE_PUBLIC_H
// ---------------- Use Declarations
+3 -3
View File
@@ -3,8 +3,8 @@
// Code generated by wuffs-c. DO NOT EDIT.
#ifndef WUFFS_BASE_HEADER_H
#define WUFFS_BASE_HEADER_H
#ifndef WUFFS_BASE_PUBLIC_H
#define WUFFS_BASE_PUBLIC_H
// Copyright 2017 The Wuffs Authors.
//
@@ -1214,7 +1214,7 @@ static inline wuffs_base__table_u8 wuffs_base__image_buffer__plane(
: ((wuffs_base__table_u8){});
}
#endif // WUFFS_BASE_HEADER_H
#endif // WUFFS_BASE_PUBLIC_H
// ---------------- Use Declarations
+3 -3
View File
@@ -3,8 +3,8 @@
// Code generated by wuffs-c. DO NOT EDIT.
#ifndef WUFFS_BASE_HEADER_H
#define WUFFS_BASE_HEADER_H
#ifndef WUFFS_BASE_PUBLIC_H
#define WUFFS_BASE_PUBLIC_H
// Copyright 2017 The Wuffs Authors.
//
@@ -1214,7 +1214,7 @@ static inline wuffs_base__table_u8 wuffs_base__image_buffer__plane(
: ((wuffs_base__table_u8){});
}
#endif // WUFFS_BASE_HEADER_H
#endif // WUFFS_BASE_PUBLIC_H
// ---------------- Use Declarations
+3 -3
View File
@@ -3,8 +3,8 @@
// Code generated by wuffs-c. DO NOT EDIT.
#ifndef WUFFS_BASE_HEADER_H
#define WUFFS_BASE_HEADER_H
#ifndef WUFFS_BASE_PUBLIC_H
#define WUFFS_BASE_PUBLIC_H
// Copyright 2017 The Wuffs Authors.
//
@@ -1214,7 +1214,7 @@ static inline wuffs_base__table_u8 wuffs_base__image_buffer__plane(
: ((wuffs_base__table_u8){});
}
#endif // WUFFS_BASE_HEADER_H
#endif // WUFFS_BASE_PUBLIC_H
// ---------------- Use Declarations
+3 -3
View File
@@ -3,8 +3,8 @@
// Code generated by wuffs-c. DO NOT EDIT.
#ifndef WUFFS_BASE_HEADER_H
#define WUFFS_BASE_HEADER_H
#ifndef WUFFS_BASE_PUBLIC_H
#define WUFFS_BASE_PUBLIC_H
// Copyright 2017 The Wuffs Authors.
//
@@ -1214,7 +1214,7 @@ static inline wuffs_base__table_u8 wuffs_base__image_buffer__plane(
: ((wuffs_base__table_u8){});
}
#endif // WUFFS_BASE_HEADER_H
#endif // WUFFS_BASE_PUBLIC_H
// ---------------- Use Declarations
+3 -3
View File
@@ -3,8 +3,8 @@
// Code generated by wuffs-c. DO NOT EDIT.
#ifndef WUFFS_BASE_HEADER_H
#define WUFFS_BASE_HEADER_H
#ifndef WUFFS_BASE_PUBLIC_H
#define WUFFS_BASE_PUBLIC_H
// Copyright 2017 The Wuffs Authors.
//
@@ -1214,7 +1214,7 @@ static inline wuffs_base__table_u8 wuffs_base__image_buffer__plane(
: ((wuffs_base__table_u8){});
}
#endif // WUFFS_BASE_HEADER_H
#endif // WUFFS_BASE_PUBLIC_H
// ---------------- Use Declarations
+2 -2
View File
@@ -71,8 +71,8 @@ func (q *checker) optimizeNonSuspendible(n *a.Expr) error {
}
// optimizeCopyFromHistory32 checks if the code generator can call the Bounds
// Check Optimized version of CopyFromHistory32. As per cgen/base-impl.h, the
// conditions are:
// Check Optimized version of CopyFromHistory32. As per cgen's base-private.h,
// the conditions are:
// - distance > 0
// - distance <= (*ptr_ptr - start)
// - length <= (end - *ptr_ptr)
+1 -1
View File
@@ -91,7 +91,7 @@ func checkPackageName(s string) string {
s = strings.ToLower(s)
// Blacklist certain package names.
switch s {
case "base", "base_header", "base_impl", "config", "version":
case "base", "base_private_header", "base_public_header", "config", "version":
return ""
}
return s
+3 -3
View File
@@ -288,8 +288,8 @@ int test_main(int argc, char** argv, proc* tests, proc* benches) {
return 0;
}
// WUFFS_BASE_HEADER_H is where wuffs_base__foo_bar are defined.
#ifdef WUFFS_BASE_HEADER_H
// WUFFS_BASE_PUBLIC_H is where wuffs_base__foo_bar are defined.
#ifdef WUFFS_BASE_PUBLIC_H
wuffs_base__rect_ie_u32 make_rect_ie_u32(uint32_t x0,
uint32_t y0,
@@ -609,4 +609,4 @@ bool do_test_io_buffers(const char* (*codec_func)(wuffs_base__io_buffer*,
return proc_io_buffers(codec_func, tc_neither, gt, wlimit, rlimit, 1, false);
}
#endif // WUFFS_BASE_HEADER_H
#endif // WUFFS_BASE_PUBLIC_H