mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-22 08:47:28 +01:00
Rename crc32.ieee to crc32.ieee_hasher
This commit is contained in:
1 parent
035b138cb1
commit
eecdaba4e8
8 files changed
+68
-67
No files matched your search
+14
-14
@@ -1066,7 +1066,7 @@ const char* wuffs_crc32__status__string(wuffs_crc32__status s);
|
||||
typedef struct {
|
||||
// Do not access the private_impl's fields directly. There is no API/ABI
|
||||
// compatibility or safety guarantee if you do so. Instead, use the
|
||||
// wuffs_crc32__ieee__etc functions.
|
||||
// wuffs_crc32__ieee_hasher__etc functions.
|
||||
//
|
||||
// In C++, these fields would be "private", but C does not support that.
|
||||
//
|
||||
@@ -1078,23 +1078,23 @@ typedef struct {
|
||||
uint32_t f_state;
|
||||
|
||||
} private_impl;
|
||||
} wuffs_crc32__ieee;
|
||||
} wuffs_crc32__ieee_hasher;
|
||||
|
||||
// ---------------- Public Initializer Prototypes
|
||||
|
||||
// wuffs_crc32__ieee__initialize is an initializer function.
|
||||
// wuffs_crc32__ieee_hasher__initialize is an initializer function.
|
||||
//
|
||||
// It should be called before any other wuffs_crc32__ieee__* function.
|
||||
// It should be called before any other wuffs_crc32__ieee_hasher__* function.
|
||||
//
|
||||
// Pass WUFFS_VERSION and 0 for wuffs_version and for_internal_use_only.
|
||||
void wuffs_crc32__ieee__initialize(wuffs_crc32__ieee* self,
|
||||
uint32_t wuffs_version,
|
||||
uint32_t for_internal_use_only);
|
||||
void wuffs_crc32__ieee_hasher__initialize(wuffs_crc32__ieee_hasher* self,
|
||||
uint32_t wuffs_version,
|
||||
uint32_t for_internal_use_only);
|
||||
|
||||
// ---------------- Public Function Prototypes
|
||||
|
||||
uint32_t wuffs_crc32__ieee__update(wuffs_crc32__ieee* self,
|
||||
wuffs_base__slice_u8 a_x);
|
||||
uint32_t wuffs_crc32__ieee_hasher__update(wuffs_crc32__ieee_hasher* self,
|
||||
wuffs_base__slice_u8 a_x);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
@@ -1566,9 +1566,9 @@ static const uint32_t wuffs_crc32__ieee_table[256] = {
|
||||
|
||||
// ---------------- Initializer Implementations
|
||||
|
||||
void wuffs_crc32__ieee__initialize(wuffs_crc32__ieee* self,
|
||||
uint32_t wuffs_version,
|
||||
uint32_t for_internal_use_only) {
|
||||
void wuffs_crc32__ieee_hasher__initialize(wuffs_crc32__ieee_hasher* self,
|
||||
uint32_t wuffs_version,
|
||||
uint32_t for_internal_use_only) {
|
||||
if (!self) {
|
||||
return;
|
||||
}
|
||||
@@ -1584,8 +1584,8 @@ void wuffs_crc32__ieee__initialize(wuffs_crc32__ieee* self,
|
||||
|
||||
// ---------------- Function Implementations
|
||||
|
||||
uint32_t wuffs_crc32__ieee__update(wuffs_crc32__ieee* self,
|
||||
wuffs_base__slice_u8 a_x) {
|
||||
uint32_t wuffs_crc32__ieee_hasher__update(wuffs_crc32__ieee_hasher* self,
|
||||
wuffs_base__slice_u8 a_x) {
|
||||
if (!self) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
+14
-13
@@ -1075,7 +1075,7 @@ const char* wuffs_crc32__status__string(wuffs_crc32__status s);
|
||||
typedef struct {
|
||||
// Do not access the private_impl's fields directly. There is no API/ABI
|
||||
// compatibility or safety guarantee if you do so. Instead, use the
|
||||
// wuffs_crc32__ieee__etc functions.
|
||||
// wuffs_crc32__ieee_hasher__etc functions.
|
||||
//
|
||||
// In C++, these fields would be "private", but C does not support that.
|
||||
//
|
||||
@@ -1087,23 +1087,23 @@ typedef struct {
|
||||
uint32_t f_state;
|
||||
|
||||
} private_impl;
|
||||
} wuffs_crc32__ieee;
|
||||
} wuffs_crc32__ieee_hasher;
|
||||
|
||||
// ---------------- Public Initializer Prototypes
|
||||
|
||||
// wuffs_crc32__ieee__initialize is an initializer function.
|
||||
// wuffs_crc32__ieee_hasher__initialize is an initializer function.
|
||||
//
|
||||
// It should be called before any other wuffs_crc32__ieee__* function.
|
||||
// It should be called before any other wuffs_crc32__ieee_hasher__* function.
|
||||
//
|
||||
// Pass WUFFS_VERSION and 0 for wuffs_version and for_internal_use_only.
|
||||
void wuffs_crc32__ieee__initialize(wuffs_crc32__ieee* self,
|
||||
uint32_t wuffs_version,
|
||||
uint32_t for_internal_use_only);
|
||||
void wuffs_crc32__ieee_hasher__initialize(wuffs_crc32__ieee_hasher* self,
|
||||
uint32_t wuffs_version,
|
||||
uint32_t for_internal_use_only);
|
||||
|
||||
// ---------------- Public Function Prototypes
|
||||
|
||||
uint32_t wuffs_crc32__ieee__update(wuffs_crc32__ieee* self,
|
||||
wuffs_base__slice_u8 a_x);
|
||||
uint32_t wuffs_crc32__ieee_hasher__update(wuffs_crc32__ieee_hasher* self,
|
||||
wuffs_base__slice_u8 a_x);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
@@ -1354,7 +1354,7 @@ typedef struct {
|
||||
uint32_t magic;
|
||||
|
||||
wuffs_deflate__decoder f_flate;
|
||||
wuffs_crc32__ieee f_checksum;
|
||||
wuffs_crc32__ieee_hasher f_checksum;
|
||||
bool f_ignore_checksum;
|
||||
|
||||
struct {
|
||||
@@ -1841,8 +1841,9 @@ void wuffs_gzip__decoder__initialize(wuffs_gzip__decoder* self,
|
||||
self->private_impl.magic = WUFFS_BASE__MAGIC;
|
||||
wuffs_deflate__decoder__initialize(&self->private_impl.f_flate, WUFFS_VERSION,
|
||||
WUFFS_BASE__ALREADY_ZEROED);
|
||||
wuffs_crc32__ieee__initialize(&self->private_impl.f_checksum, WUFFS_VERSION,
|
||||
WUFFS_BASE__ALREADY_ZEROED);
|
||||
wuffs_crc32__ieee_hasher__initialize(&self->private_impl.f_checksum,
|
||||
WUFFS_VERSION,
|
||||
WUFFS_BASE__ALREADY_ZEROED);
|
||||
}
|
||||
|
||||
// ---------------- Function Implementations
|
||||
@@ -2103,7 +2104,7 @@ wuffs_gzip__status wuffs_gzip__decoder__decode(wuffs_gzip__decoder* self,
|
||||
v_z = t_8;
|
||||
}
|
||||
if (!self->private_impl.f_ignore_checksum) {
|
||||
v_checksum_got = wuffs_crc32__ieee__update(
|
||||
v_checksum_got = wuffs_crc32__ieee_hasher__update(
|
||||
&self->private_impl.f_checksum,
|
||||
((wuffs_base__slice_u8){
|
||||
.ptr = a_dst.private_impl.mark,
|
||||
|
||||
+9
-9
@@ -1066,7 +1066,7 @@ const char* wuffs_crc32__status__string(wuffs_crc32__status s);
|
||||
typedef struct {
|
||||
// Do not access the private_impl's fields directly. There is no API/ABI
|
||||
// compatibility or safety guarantee if you do so. Instead, use the
|
||||
// wuffs_crc32__ieee__etc functions.
|
||||
// wuffs_crc32__ieee_hasher__etc functions.
|
||||
//
|
||||
// In C++, these fields would be "private", but C does not support that.
|
||||
//
|
||||
@@ -1078,23 +1078,23 @@ typedef struct {
|
||||
uint32_t f_state;
|
||||
|
||||
} private_impl;
|
||||
} wuffs_crc32__ieee;
|
||||
} wuffs_crc32__ieee_hasher;
|
||||
|
||||
// ---------------- Public Initializer Prototypes
|
||||
|
||||
// wuffs_crc32__ieee__initialize is an initializer function.
|
||||
// wuffs_crc32__ieee_hasher__initialize is an initializer function.
|
||||
//
|
||||
// It should be called before any other wuffs_crc32__ieee__* function.
|
||||
// It should be called before any other wuffs_crc32__ieee_hasher__* function.
|
||||
//
|
||||
// Pass WUFFS_VERSION and 0 for wuffs_version and for_internal_use_only.
|
||||
void wuffs_crc32__ieee__initialize(wuffs_crc32__ieee* self,
|
||||
uint32_t wuffs_version,
|
||||
uint32_t for_internal_use_only);
|
||||
void wuffs_crc32__ieee_hasher__initialize(wuffs_crc32__ieee_hasher* self,
|
||||
uint32_t wuffs_version,
|
||||
uint32_t for_internal_use_only);
|
||||
|
||||
// ---------------- Public Function Prototypes
|
||||
|
||||
uint32_t wuffs_crc32__ieee__update(wuffs_crc32__ieee* self,
|
||||
wuffs_base__slice_u8 a_x);
|
||||
uint32_t wuffs_crc32__ieee_hasher__update(wuffs_crc32__ieee_hasher* self,
|
||||
wuffs_base__slice_u8 a_x);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
|
||||
+10
-10
@@ -1075,7 +1075,7 @@ const char* wuffs_crc32__status__string(wuffs_crc32__status s);
|
||||
typedef struct {
|
||||
// Do not access the private_impl's fields directly. There is no API/ABI
|
||||
// compatibility or safety guarantee if you do so. Instead, use the
|
||||
// wuffs_crc32__ieee__etc functions.
|
||||
// wuffs_crc32__ieee_hasher__etc functions.
|
||||
//
|
||||
// In C++, these fields would be "private", but C does not support that.
|
||||
//
|
||||
@@ -1087,23 +1087,23 @@ typedef struct {
|
||||
uint32_t f_state;
|
||||
|
||||
} private_impl;
|
||||
} wuffs_crc32__ieee;
|
||||
} wuffs_crc32__ieee_hasher;
|
||||
|
||||
// ---------------- Public Initializer Prototypes
|
||||
|
||||
// wuffs_crc32__ieee__initialize is an initializer function.
|
||||
// wuffs_crc32__ieee_hasher__initialize is an initializer function.
|
||||
//
|
||||
// It should be called before any other wuffs_crc32__ieee__* function.
|
||||
// It should be called before any other wuffs_crc32__ieee_hasher__* function.
|
||||
//
|
||||
// Pass WUFFS_VERSION and 0 for wuffs_version and for_internal_use_only.
|
||||
void wuffs_crc32__ieee__initialize(wuffs_crc32__ieee* self,
|
||||
uint32_t wuffs_version,
|
||||
uint32_t for_internal_use_only);
|
||||
void wuffs_crc32__ieee_hasher__initialize(wuffs_crc32__ieee_hasher* self,
|
||||
uint32_t wuffs_version,
|
||||
uint32_t for_internal_use_only);
|
||||
|
||||
// ---------------- Public Function Prototypes
|
||||
|
||||
uint32_t wuffs_crc32__ieee__update(wuffs_crc32__ieee* self,
|
||||
wuffs_base__slice_u8 a_x);
|
||||
uint32_t wuffs_crc32__ieee_hasher__update(wuffs_crc32__ieee_hasher* self,
|
||||
wuffs_base__slice_u8 a_x);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
@@ -1354,7 +1354,7 @@ typedef struct {
|
||||
uint32_t magic;
|
||||
|
||||
wuffs_deflate__decoder f_flate;
|
||||
wuffs_crc32__ieee f_checksum;
|
||||
wuffs_crc32__ieee_hasher f_checksum;
|
||||
bool f_ignore_checksum;
|
||||
|
||||
struct {
|
||||
|
||||
Reference in new issue
Block a user