mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-25 08:55:11 +01:00
Add WUFFS_CONFIG__MODULES macro
This commit is contained in:
1 parent
a09e63320d
commit
e05b564656
8 files changed
+38
No files matched your search
@@ -369,6 +369,10 @@ func (g *gen) genImpl(b *buffer) error {
|
|||||||
b.writes(basePrivateH)
|
b.writes(basePrivateH)
|
||||||
b.writeb('\n')
|
b.writeb('\n')
|
||||||
|
|
||||||
|
module := "!defined(WUFFS_CONFIG__MODULES) || defined(WUFFS_CONFIG__MODULE__" +
|
||||||
|
strings.ToUpper(g.pkgName) + ")"
|
||||||
|
b.printf("#if %s\n\n", module)
|
||||||
|
|
||||||
b.writes("// ---------------- Status Codes Implementations\n\n")
|
b.writes("// ---------------- Status Codes Implementations\n\n")
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -430,6 +434,7 @@ func (g *gen) genImpl(b *buffer) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
b.printf("#endif // %s\n\n", module)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1858,6 +1858,8 @@ static inline wuffs_base__empty_struct wuffs_base__io_writer__set_mark(
|
|||||||
|
|
||||||
#endif // WUFFS_BASE_PRIVATE_H
|
#endif // WUFFS_BASE_PRIVATE_H
|
||||||
|
|
||||||
|
#if !defined(WUFFS_CONFIG__MODULES) || defined(WUFFS_CONFIG__MODULE__ADLER32)
|
||||||
|
|
||||||
// ---------------- Status Codes Implementations
|
// ---------------- Status Codes Implementations
|
||||||
|
|
||||||
static const char wuffs_adler32__status__string_data[] = {
|
static const char wuffs_adler32__status__string_data[] = {
|
||||||
@@ -2021,3 +2023,6 @@ uint32_t wuffs_adler32__hasher__update(wuffs_adler32__hasher* self,
|
|||||||
self->private_impl.f_state = (((v_s2 & 65535) << 16) | (v_s1 & 65535));
|
self->private_impl.f_state = (((v_s2 & 65535) << 16) | (v_s1 & 65535));
|
||||||
return self->private_impl.f_state;
|
return self->private_impl.f_state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // !defined(WUFFS_CONFIG__MODULES) ||
|
||||||
|
// defined(WUFFS_CONFIG__MODULE__ADLER32)
|
||||||
@@ -1858,6 +1858,8 @@ static inline wuffs_base__empty_struct wuffs_base__io_writer__set_mark(
|
|||||||
|
|
||||||
#endif // WUFFS_BASE_PRIVATE_H
|
#endif // WUFFS_BASE_PRIVATE_H
|
||||||
|
|
||||||
|
#if !defined(WUFFS_CONFIG__MODULES) || defined(WUFFS_CONFIG__MODULE__CRC32)
|
||||||
|
|
||||||
// ---------------- Status Codes Implementations
|
// ---------------- Status Codes Implementations
|
||||||
|
|
||||||
static const char wuffs_crc32__status__string_data[] = {
|
static const char wuffs_crc32__status__string_data[] = {
|
||||||
@@ -2457,3 +2459,6 @@ uint32_t wuffs_crc32__ieee_hasher__update(wuffs_crc32__ieee_hasher* self,
|
|||||||
self->private_impl.f_state = (4294967295 ^ v_s);
|
self->private_impl.f_state = (4294967295 ^ v_s);
|
||||||
return self->private_impl.f_state;
|
return self->private_impl.f_state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // !defined(WUFFS_CONFIG__MODULES) ||
|
||||||
|
// defined(WUFFS_CONFIG__MODULE__CRC32)
|
||||||
@@ -1946,6 +1946,8 @@ static inline wuffs_base__empty_struct wuffs_base__io_writer__set_mark(
|
|||||||
|
|
||||||
#endif // WUFFS_BASE_PRIVATE_H
|
#endif // WUFFS_BASE_PRIVATE_H
|
||||||
|
|
||||||
|
#if !defined(WUFFS_CONFIG__MODULES) || defined(WUFFS_CONFIG__MODULE__DEFLATE)
|
||||||
|
|
||||||
// ---------------- Status Codes Implementations
|
// ---------------- Status Codes Implementations
|
||||||
|
|
||||||
static const char wuffs_deflate__status__string_data[] = {
|
static const char wuffs_deflate__status__string_data[] = {
|
||||||
@@ -3984,3 +3986,6 @@ short_read_src:
|
|||||||
status = WUFFS_BASE__SUSPENSION_SHORT_READ;
|
status = WUFFS_BASE__SUSPENSION_SHORT_READ;
|
||||||
goto suspend;
|
goto suspend;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // !defined(WUFFS_CONFIG__MODULES) ||
|
||||||
|
// defined(WUFFS_CONFIG__MODULE__DEFLATE)
|
||||||
@@ -2063,6 +2063,8 @@ static inline wuffs_base__empty_struct wuffs_base__io_writer__set_mark(
|
|||||||
|
|
||||||
#endif // WUFFS_BASE_PRIVATE_H
|
#endif // WUFFS_BASE_PRIVATE_H
|
||||||
|
|
||||||
|
#if !defined(WUFFS_CONFIG__MODULES) || defined(WUFFS_CONFIG__MODULE__GIF)
|
||||||
|
|
||||||
// ---------------- Status Codes Implementations
|
// ---------------- Status Codes Implementations
|
||||||
|
|
||||||
static const char wuffs_gif__status__string_data[] = {
|
static const char wuffs_gif__status__string_data[] = {
|
||||||
@@ -3926,3 +3928,5 @@ label_0_break:;
|
|||||||
exit:
|
exit:
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // !defined(WUFFS_CONFIG__MODULES) || defined(WUFFS_CONFIG__MODULE__GIF)
|
||||||
@@ -2098,6 +2098,8 @@ static inline wuffs_base__empty_struct wuffs_base__io_writer__set_mark(
|
|||||||
|
|
||||||
#endif // WUFFS_BASE_PRIVATE_H
|
#endif // WUFFS_BASE_PRIVATE_H
|
||||||
|
|
||||||
|
#if !defined(WUFFS_CONFIG__MODULES) || defined(WUFFS_CONFIG__MODULE__GZIP)
|
||||||
|
|
||||||
// ---------------- Status Codes Implementations
|
// ---------------- Status Codes Implementations
|
||||||
|
|
||||||
static const char wuffs_gzip__status__string_data[] = {
|
static const char wuffs_gzip__status__string_data[] = {
|
||||||
@@ -2571,3 +2573,6 @@ short_read_src:
|
|||||||
status = WUFFS_BASE__SUSPENSION_SHORT_READ;
|
status = WUFFS_BASE__SUSPENSION_SHORT_READ;
|
||||||
goto suspend;
|
goto suspend;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // !defined(WUFFS_CONFIG__MODULES) ||
|
||||||
|
// defined(WUFFS_CONFIG__MODULE__GZIP)
|
||||||
@@ -1882,6 +1882,8 @@ static inline wuffs_base__empty_struct wuffs_base__io_writer__set_mark(
|
|||||||
|
|
||||||
#endif // WUFFS_BASE_PRIVATE_H
|
#endif // WUFFS_BASE_PRIVATE_H
|
||||||
|
|
||||||
|
#if !defined(WUFFS_CONFIG__MODULES) || defined(WUFFS_CONFIG__MODULE__LZW)
|
||||||
|
|
||||||
// ---------------- Status Codes Implementations
|
// ---------------- Status Codes Implementations
|
||||||
|
|
||||||
static const char wuffs_lzw__status__string_data[] = {
|
static const char wuffs_lzw__status__string_data[] = {
|
||||||
@@ -2221,3 +2223,5 @@ short_read_src:
|
|||||||
status = WUFFS_BASE__SUSPENSION_SHORT_READ;
|
status = WUFFS_BASE__SUSPENSION_SHORT_READ;
|
||||||
goto suspend;
|
goto suspend;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // !defined(WUFFS_CONFIG__MODULES) || defined(WUFFS_CONFIG__MODULE__LZW)
|
||||||
@@ -2096,6 +2096,8 @@ static inline wuffs_base__empty_struct wuffs_base__io_writer__set_mark(
|
|||||||
|
|
||||||
#endif // WUFFS_BASE_PRIVATE_H
|
#endif // WUFFS_BASE_PRIVATE_H
|
||||||
|
|
||||||
|
#if !defined(WUFFS_CONFIG__MODULES) || defined(WUFFS_CONFIG__MODULE__ZLIB)
|
||||||
|
|
||||||
// ---------------- Status Codes Implementations
|
// ---------------- Status Codes Implementations
|
||||||
|
|
||||||
static const char wuffs_zlib__status__string_data[] = {
|
static const char wuffs_zlib__status__string_data[] = {
|
||||||
@@ -2436,3 +2438,6 @@ short_read_src:
|
|||||||
status = WUFFS_BASE__SUSPENSION_SHORT_READ;
|
status = WUFFS_BASE__SUSPENSION_SHORT_READ;
|
||||||
goto suspend;
|
goto suspend;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // !defined(WUFFS_CONFIG__MODULES) ||
|
||||||
|
// defined(WUFFS_CONFIG__MODULE__ZLIB)
|
||||||
Reference in new issue
Block a user