mirror of
https://github.com/simtactics/mysimulation.git
synced 2025-07-07 23:20:27 -04:00
Fixed random garbage produced by iff2html with personglobals.iff due to one of the STR# chunks (animation) not specifying its PairCount.
Also added filesize and md5 statistics and support for CTSS, FAMs, and TTAs chunks.
This commit is contained in:
parent
64fddcf78e
commit
b746dbe407
5 changed files with 370 additions and 11 deletions
54
Tools/iff2html/md5.h
Normal file
54
Tools/iff2html/md5.h
Normal file
|
@ -0,0 +1,54 @@
|
|||
#ifndef MD5_H
|
||||
#define MD5_H
|
||||
|
||||
/* The following tests optimise behaviour on little-endian
|
||||
machines, where there is no need to reverse the byte order
|
||||
of 32 bit words in the MD5 computation. By default,
|
||||
HIGHFIRST is defined, which indicates we're running on a
|
||||
big-endian (most significant byte first) machine, on which
|
||||
the byteReverse function in md5.c must be invoked. However,
|
||||
byteReverse is coded in such a way that it is an identity
|
||||
function when run on a little-endian machine, so calling it
|
||||
on such a platform causes no harm apart from wasting time.
|
||||
If the platform is known to be little-endian, we speed
|
||||
things up by undefining HIGHFIRST, which defines
|
||||
byteReverse as a null macro. Doing things in this manner
|
||||
insures we work on new platforms regardless of their byte
|
||||
order. */
|
||||
|
||||
#define HIGHFIRST
|
||||
|
||||
#ifdef __i386__
|
||||
#undef HIGHFIRST
|
||||
#endif
|
||||
|
||||
/* On machines where "long" is 64 bits, we need to declare
|
||||
uint32 as something guaranteed to be 32 bits. */
|
||||
|
||||
#ifdef __alpha
|
||||
typedef unsigned int uint32;
|
||||
#else
|
||||
typedef unsigned long uint32;
|
||||
#endif
|
||||
|
||||
struct MD5Context {
|
||||
uint32 buf[4];
|
||||
uint32 bits[2];
|
||||
unsigned char in[64];
|
||||
};
|
||||
|
||||
extern void MD5Init();
|
||||
extern void MD5Update();
|
||||
extern void MD5Final();
|
||||
extern void MD5Transform();
|
||||
|
||||
/*
|
||||
* This is needed to make RSAREF happy on some MS-DOS compilers.
|
||||
*/
|
||||
typedef struct MD5Context MD5_CTX;
|
||||
|
||||
/* Define CHECK_HARDWARE_PROPERTIES to have main,c verify
|
||||
byte order and uint32 settings. */
|
||||
#define CHECK_HARDWARE_PROPERTIES
|
||||
|
||||
#endif /* !MD5_H */
|
Loading…
Add table
Add a link
Reference in a new issue