#ifndef EIGHT_BIT
#define THIRTYTWO_BIT // default 32 bit
#endif
#ifdef THIRTYTWO_BIT
#define WORD unsigned long
#define WORDLENGTH 4
#if defined(WIN32) && !defined(__GNUC__)
#define WORD64 unsigned __int64
#else
#define WORD64 unsigned long long
#endif
// THIRTYTWO_BIT
#endif
#ifdef EIGHT_BIT
#define WORD unsigned short
#define WORDLENGTH 4
// EIGHT_BIT
#endif
It's just a definition of constants (aka defines) depending on the #define EIGHT_BIT.
If EIGHT_BIT is defined, WORD means unsigned short and WORDLENGTH is 4. Otherwise, WORD is unsigned long and WORDLENGTH is also 4. Additionally, WORD64 will be defined as unsigned long long unless you are on a WIN32 system and not using GCC.
All the "code" does it setup pre-processor symbols for any "live" code that you do have. If a symbol called EIGHT_BIT is defined before this code is pre-processed, it sets up WORD and WORDLENGTH accordingly (though WORDLENGTH's value is suspect), and it will set up the values differently if EIGHT_BIT is not already defined.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With