Index: src/libFLAC/include/private/crc.h |
diff --git a/src/libFLAC/include/private/crc.h b/src/libFLAC/include/private/crc.h |
index 7a224b43137133bd4a71d1d673d4e60bfee603c8..29c512cedec680f1e5da92d57e475adcd94f4773 100644 |
--- a/src/libFLAC/include/private/crc.h |
+++ b/src/libFLAC/include/private/crc.h |
@@ -1,5 +1,6 @@ |
/* libFLAC - Free Lossless Audio Codec library |
- * Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson |
+ * Copyright (C) 2000-2009 Josh Coalson |
+ * Copyright (C) 2011-2014 Xiph.Org Foundation |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
@@ -33,7 +34,6 @@ |
#define FLAC__PRIVATE__CRC_H |
#include "FLAC/ordinals.h" |
-#include <stdlib.h> |
/* 8 bit CRC generator, MSB shifted first |
** polynomial = x^8 + x^2 + x^1 + x^0 |
@@ -42,21 +42,21 @@ |
extern FLAC__byte const FLAC__crc8_table[256]; |
#define FLAC__CRC8_UPDATE(data, crc) (crc) = FLAC__crc8_table[(crc) ^ (data)]; |
void FLAC__crc8_update(const FLAC__byte data, FLAC__uint8 *crc); |
-void FLAC__crc8_update_block(const FLAC__byte *data, size_t len, FLAC__uint8 *crc); |
-FLAC__uint8 FLAC__crc8(const FLAC__byte *data, size_t len); |
+void FLAC__crc8_update_block(const FLAC__byte *data, unsigned len, FLAC__uint8 *crc); |
+FLAC__uint8 FLAC__crc8(const FLAC__byte *data, unsigned len); |
/* 16 bit CRC generator, MSB shifted first |
** polynomial = x^16 + x^15 + x^2 + x^0 |
** init = 0 |
*/ |
-extern unsigned FLAC__crc16_table[256]; |
+extern unsigned const FLAC__crc16_table[256]; |
-#define FLAC__CRC16_UPDATE(data, crc) (((((crc)<<8) & 0xffff) ^ FLAC__crc16_table[((crc)>>8) ^ (data)])) |
+#define FLAC__CRC16_UPDATE(data, crc) ((((crc)<<8) & 0xffff) ^ FLAC__crc16_table[((crc)>>8) ^ (data)]) |
/* this alternate may be faster on some systems/compilers */ |
#if 0 |
#define FLAC__CRC16_UPDATE(data, crc) ((((crc)<<8) ^ FLAC__crc16_table[((crc)>>8) ^ (data)]) & 0xffff) |
#endif |
-unsigned FLAC__crc16(const FLAC__byte *data, size_t len); |
+unsigned FLAC__crc16(const FLAC__byte *data, unsigned len); |
#endif |