replace BOOL type and TRUE/FALSE macros by bool type and true/false macros respectively whenever possible for better portability
BOOL/TRUE/FALSE are used for Windows API only
bool/true/false are used for internal processing