mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-26 21:36:26 +00:00
(zlib) Update adler32
This commit is contained in:
parent
0369fd6578
commit
6d49ccf978
4
deps/zlib/adler32.c
vendored
4
deps/zlib/adler32.c
vendored
@ -8,7 +8,6 @@
|
||||
#define ZLIB_INTERNAL
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <compat/zutil.h>
|
||||
|
||||
#define BASE 65521UL /* largest prime smaller than 65536 */
|
||||
#define NMAX 5552
|
||||
@ -46,7 +45,7 @@
|
||||
#endif
|
||||
|
||||
/* ========================================================================= */
|
||||
uLong adler32(uLong adler, const Bytef *buf, uInt len)
|
||||
uint32_t adler32(uint32_t adler, const uint8_t *buf, size_t len)
|
||||
{
|
||||
uint32_t s1 = adler & 0xffff;
|
||||
uint32_t s2 = (adler >> 16) & 0xffff;
|
||||
@ -72,4 +71,3 @@ uLong adler32(uLong adler, const Bytef *buf, uInt len)
|
||||
}
|
||||
return (s2 << 16) | s1;
|
||||
}
|
||||
|
||||
|
@ -40,6 +40,7 @@
|
||||
#ifndef ZLIB_H
|
||||
#define ZLIB_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "zconf.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -1575,7 +1576,7 @@ ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
|
||||
library.
|
||||
*/
|
||||
|
||||
ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
|
||||
uint32_t adler32 (uint32_t adler, const uint8_t *buf, size_t len);
|
||||
/*
|
||||
Update a running Adler-32 checksum with the bytes buf[0..len-1] and
|
||||
return the updated checksum. If buf is Z_NULL, this function returns the
|
||||
|
Loading…
x
Reference in New Issue
Block a user