XRogue: fix md_htonl() and md_ntohl().

xcrypt requires them.  The implementations in state.c used htonl() and
ntohl(), which aren't available on Windows.  So the Advanced Rogue 7
versions were copied over.

This implementation could be problematic on other systems where
sizeof(long) == 8.  Maybe someday I can convert everything to C99 and
use stdint.h.
This commit is contained in:
John "Elwin" Edwards 2015-08-13 17:17:40 -04:00
parent b2ebcf72c9
commit 13f4a96d93
2 changed files with 31 additions and 9 deletions

View file

@ -54,6 +54,9 @@
#define _PASSWORD_EFMT1 '_'
unsigned long int md_htonl(unsigned long int x);
unsigned long int md_ntohl(unsigned long int x);
static unsigned char IP[64] = {
58, 50, 42, 34, 26, 18, 10, 2, 60, 52, 44, 36, 28, 20, 12, 4,
62, 54, 46, 38, 30, 22, 14, 6, 64, 56, 48, 40, 32, 24, 16, 8,