Rename crc32() to Bcrc32() to avoid conflicts with the crc32() function in libpng/libz. DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4642 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2014-10-01 17:09:54 +00:00
parent 81e9761e50
commit 706aec5527
6 changed files with 9 additions and 9 deletions

View file

@ -15,7 +15,7 @@ extern uint32_t crc32table[8][256];
extern uint32_t crc32table[4][256];
#endif
extern uint32_t crc32(const void* data, size_t length, uint32_t crc);
extern uint32_t Bcrc32(const void* data, size_t length, uint32_t crc);
extern void initcrc32table(void);
#ifdef EXTERNC

View file

@ -3,7 +3,7 @@
#include "compat.h"
#include "crc32.h"
uint32_t crc32(const void* data, size_t length, uint32_t crc)
uint32_t Bcrc32(const void* data, size_t length, uint32_t crc)
{
const uint32_t* current = (const uint32_t*) data;
uint8_t *currentChar;

View file

@ -7938,9 +7938,9 @@ static int32_t loadtables(void)
#ifdef B_LITTLE_ENDIAN
i = 0;
if (crc32((uint8_t *)sintable, sizeof(sintable), 0) != 0xee1e7aba)
if (Bcrc32((uint8_t *)sintable, sizeof(sintable), 0) != 0xee1e7aba)
i |= 1;
if (crc32((uint8_t *)radarang, 640*sizeof(radarang[0]), 0) != 0xee893d92)
if (Bcrc32((uint8_t *)radarang, 640*sizeof(radarang[0]), 0) != 0xee893d92)
i |= 2;
if (i != 0)
@ -8157,7 +8157,7 @@ static int32_t loadpalette(void)
#endif
// If Duke3D 1.5 GRP or LameDuke, ...
if (crc32((uint8_t *)transluc, 65536, 0)==0x94a1fac6 || lamedukep)
if (Bcrc32((uint8_t *)transluc, 65536, 0)==0x94a1fac6 || lamedukep)
{
int32_t i;
// ... fix up translucency table so that transluc(255,x)

View file

@ -343,7 +343,7 @@ static int32_t _internal_osdfunc_fileinfo(const osdfuncparm_t *parm)
do
{
j = kread(i,buf,256);
crc = crc32((uint8_t *)buf,j,crc);
crc = Bcrc32((uint8_t *)buf,j,crc);
}
while (j == 256);
crctime = getticks() - crctime;

View file

@ -394,7 +394,7 @@ int32_t ScanGroups(void)
do
{
b = read(fh, buf, BUFFER_SIZE);
if (b > 0) crcval = crc32((uint8_t *)buf, b, crcval);
if (b > 0) crcval = Bcrc32((uint8_t *)buf, b, crcval);
}
while (b == BUFFER_SIZE);
close(fh);

View file

@ -766,7 +766,7 @@ void Net_SendChallenge()
tempnetbuf[0] = PACKET_AUTH;
B_BUF16(&tempnetbuf[1], BYTEVERSION);
B_BUF16(&tempnetbuf[3], NETVERSION);
B_BUF32(&tempnetbuf[5], crc32((uint8_t *)g_netPassword, Bstrlen(g_netPassword), 0));
B_BUF32(&tempnetbuf[5], Bcrc32((uint8_t *)g_netPassword, Bstrlen(g_netPassword), 0));
tempnetbuf[9] = myconnectindex;
enet_peer_send(g_netClientPeer, CHAN_GAMESTATE, enet_packet_create(&tempnetbuf[0], 10, ENET_PACKET_FLAG_RELIABLE));
@ -786,7 +786,7 @@ void Net_ReceiveChallenge(uint8_t *pbuf, int32_t packbufleng, ENetEvent *event)
initprintf("Bad client protocol: version %u.%u\n", byteVersion, netVersion);
return;
}
if (crc != crc32((uint8_t *)g_netPassword, Bstrlen(g_netPassword), 0))
if (crc != Bcrc32((uint8_t *)g_netPassword, Bstrlen(g_netPassword), 0))
{
enet_peer_disconnect_later(event->peer, DISC_BAD_PASSWORD);
initprintf("Bad password from client.\n");