De-duplicate the gen/c/* files

The gen/c/* files are not checked in, due to the .gitignore file

In Wuffs version 0.1, they were checked in, and programs were expected
to #include them directly. Another goal was for them to be
self-contained, without any #include lines to other Wuffs files, so that
they would be easy to build, without having to configure an -I dir to a
C compiler.

They therefore inlined what would otherwise be an #include. For example,
the generated std/gif.h code would inline the contents of the std/lzw.h
file. The genrelease program would have to de-duplicate these inlines in
order to produce a clean, monolithic release/c/* file.

In Wuffs version 0.2 (the latest version), programs don't #include
gen/c/*. Instead, they #include the monolithic release/c/*. Avoiding the
need to configure an -I directory isn't as important as it used to be.

This change removes that inlining, using the simpler #include line, and
the genrelease program is then simpler because it doesn't need to
de-duplicate.
This commit is contained in:
Nigel Tao committed 2018-10-27 12:50:01 +11:00
1 parent 51a0b347ed
commit 61d03537c2
7 files changed
+222 -289

No files matched your search

-64
View File
@@ -8,22 +8,6 @@
// "foo.h"-like header, #define WUFFS_IMPLEMENTATION before #include'ing or
// compiling it.
// Copyright 2018 The Wuffs Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by wuffs-c. DO NOT EDIT.
// Copyright 2017 The Wuffs Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -2134,10 +2118,6 @@ typedef struct {
} // extern "C"
#endif
// Code generated by wuffs-c. DO NOT EDIT.
// ---------------- Use Declarations
#ifdef __cplusplus
extern "C" {
#endif
@@ -2219,10 +2199,6 @@ struct wuffs_adler32__hasher__struct {
} // extern "C"
#endif
// Code generated by wuffs-c. DO NOT EDIT.
// ---------------- Use Declarations
#ifdef __cplusplus
extern "C" {
#endif
@@ -2303,10 +2279,6 @@ struct wuffs_crc32__ieee_hasher__struct {
} // extern "C"
#endif
// Code generated by wuffs-c. DO NOT EDIT.
// ---------------- Use Declarations
#ifdef __cplusplus
extern "C" {
#endif
@@ -2461,16 +2433,6 @@ struct wuffs_deflate__decoder__struct {
} // extern "C"
#endif
// Code generated by wuffs-c. DO NOT EDIT.
// ---------------- Use Declarations
// ---------------- BEGIN USE "std/lzw"
// Code generated by wuffs-c. DO NOT EDIT.
// ---------------- Use Declarations
#ifdef __cplusplus
extern "C" {
#endif
@@ -2592,8 +2554,6 @@ struct wuffs_lzw__decoder__struct {
} // extern "C"
#endif
// ---------------- END USE "std/lzw"
#ifdef __cplusplus
extern "C" {
#endif
@@ -2854,18 +2814,6 @@ struct wuffs_gif__decoder__struct {
} // extern "C"
#endif
// Code generated by wuffs-c. DO NOT EDIT.
// ---------------- Use Declarations
// ---------------- BEGIN USE "std/crc32"
// ---------------- END USE "std/crc32"
// ---------------- BEGIN USE "std/deflate"
// ---------------- END USE "std/deflate"
#ifdef __cplusplus
extern "C" {
#endif
@@ -2974,18 +2922,6 @@ struct wuffs_gzip__decoder__struct {
} // extern "C"
#endif
// Code generated by wuffs-c. DO NOT EDIT.
// ---------------- Use Declarations
// ---------------- BEGIN USE "std/adler32"
// ---------------- END USE "std/adler32"
// ---------------- BEGIN USE "std/deflate"
// ---------------- END USE "std/deflate"
#ifdef __cplusplus
extern "C" {
#endif