There's no painless way to do this, but it needs to be done --
the only reason any of the Windows code was in CPP files was because the MS compiler doesn't support C99. Switch to using MinGW, and that problem goes away, so we can rename the files back.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
WORD update_crc16( WORD crc, BYTE c ) {
|
||||
WORD i, v, tcrc = 0;
|
||||
unsigned short update_crc16( unsigned short crc, unsigned char c ) {
|
||||
unsigned short i, v, tcrc = 0;
|
||||
|
||||
v = (crc ^ c) & 0xff;
|
||||
for (i = 0; i < 8; i++) {
|
||||
|
||||
@@ -15,8 +15,8 @@ static unsigned short UpdateCrc14443(unsigned char ch, unsigned short *lpwCrc)
|
||||
return (*lpwCrc);
|
||||
}
|
||||
|
||||
static void ComputeCrc14443(int CrcType, BYTE *Data, int Length,
|
||||
BYTE *TransmitFirst, BYTE *TransmitSecond)
|
||||
static void ComputeCrc14443(int CrcType, unsigned char *Data, int Length,
|
||||
unsigned char *TransmitFirst, unsigned char *TransmitSecond)
|
||||
{
|
||||
unsigned char chBlock;
|
||||
unsigned short wCrc=CrcType;
|
||||
@@ -29,7 +29,7 @@ static void ComputeCrc14443(int CrcType, BYTE *Data, int Length,
|
||||
if (CrcType == CRC_14443_B)
|
||||
wCrc = ~wCrc; /* ISO/IEC 13239 (formerly ISO/IEC 3309) */
|
||||
|
||||
*TransmitFirst = (BYTE) (wCrc & 0xFF);
|
||||
*TransmitSecond = (BYTE) ((wCrc >> 8) & 0xFF);
|
||||
*TransmitFirst = (unsigned char) (wCrc & 0xFF);
|
||||
*TransmitSecond = (unsigned char) ((wCrc >> 8) & 0xFF);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user