mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 10:40:47 +00:00
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:
parent
81e9761e50
commit
706aec5527
6 changed files with 9 additions and 9 deletions
|
@ -15,7 +15,7 @@ extern uint32_t crc32table[8][256];
|
||||||
extern uint32_t crc32table[4][256];
|
extern uint32_t crc32table[4][256];
|
||||||
#endif
|
#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);
|
extern void initcrc32table(void);
|
||||||
|
|
||||||
#ifdef EXTERNC
|
#ifdef EXTERNC
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#include "crc32.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;
|
const uint32_t* current = (const uint32_t*) data;
|
||||||
uint8_t *currentChar;
|
uint8_t *currentChar;
|
||||||
|
|
|
@ -7938,9 +7938,9 @@ static int32_t loadtables(void)
|
||||||
|
|
||||||
#ifdef B_LITTLE_ENDIAN
|
#ifdef B_LITTLE_ENDIAN
|
||||||
i = 0;
|
i = 0;
|
||||||
if (crc32((uint8_t *)sintable, sizeof(sintable), 0) != 0xee1e7aba)
|
if (Bcrc32((uint8_t *)sintable, sizeof(sintable), 0) != 0xee1e7aba)
|
||||||
i |= 1;
|
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;
|
i |= 2;
|
||||||
|
|
||||||
if (i != 0)
|
if (i != 0)
|
||||||
|
@ -8157,7 +8157,7 @@ static int32_t loadpalette(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// If Duke3D 1.5 GRP or LameDuke, ...
|
// 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;
|
int32_t i;
|
||||||
// ... fix up translucency table so that transluc(255,x)
|
// ... fix up translucency table so that transluc(255,x)
|
||||||
|
|
|
@ -343,7 +343,7 @@ static int32_t _internal_osdfunc_fileinfo(const osdfuncparm_t *parm)
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
j = kread(i,buf,256);
|
j = kread(i,buf,256);
|
||||||
crc = crc32((uint8_t *)buf,j,crc);
|
crc = Bcrc32((uint8_t *)buf,j,crc);
|
||||||
}
|
}
|
||||||
while (j == 256);
|
while (j == 256);
|
||||||
crctime = getticks() - crctime;
|
crctime = getticks() - crctime;
|
||||||
|
|
|
@ -394,7 +394,7 @@ int32_t ScanGroups(void)
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
b = read(fh, buf, BUFFER_SIZE);
|
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);
|
while (b == BUFFER_SIZE);
|
||||||
close(fh);
|
close(fh);
|
||||||
|
|
|
@ -766,7 +766,7 @@ void Net_SendChallenge()
|
||||||
tempnetbuf[0] = PACKET_AUTH;
|
tempnetbuf[0] = PACKET_AUTH;
|
||||||
B_BUF16(&tempnetbuf[1], BYTEVERSION);
|
B_BUF16(&tempnetbuf[1], BYTEVERSION);
|
||||||
B_BUF16(&tempnetbuf[3], NETVERSION);
|
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;
|
tempnetbuf[9] = myconnectindex;
|
||||||
|
|
||||||
enet_peer_send(g_netClientPeer, CHAN_GAMESTATE, enet_packet_create(&tempnetbuf[0], 10, ENET_PACKET_FLAG_RELIABLE));
|
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);
|
initprintf("Bad client protocol: version %u.%u\n", byteVersion, netVersion);
|
||||||
return;
|
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);
|
enet_peer_disconnect_later(event->peer, DISC_BAD_PASSWORD);
|
||||||
initprintf("Bad password from client.\n");
|
initprintf("Bad password from client.\n");
|
||||||
|
|
Loading…
Reference in a new issue