Skip to content
  • Rob Swindell's avatar
    The great BOOL->bool conversion in xpdev · 118984e9
    Rob Swindell authored
    Still using BOOL where we need Win32 API compatibility.
    Using JSBool instead of BOOL or bool where it matters.
    Changed most relevant TRUE/FALSE to true/false too (though it's not as critical).
    
    You shouldn't need to #include <stdbool.h> anywhere now - gen_defs.h should do that automatically/correctly based on the language/version/tool. In C23, stdbool.h isn't even needed for bool/true/false definitions (they're keywords), so we don't bother including stdbool.h in that case.
    Microsoft didn't define __STDC_VERSION__ in their older tool chains (even though they were C99 compatible and had stdbool.h), so we use a _MSC_VER check to know that there's a stdbool.h we should use in that case.
    
    For other/old compilers (e.g. Borland C) we #define bool/true/false following the pattern of stdbool.h (doesn't use a typedef).
    
    I didn't convert UIFC yet.
    
    This addresses issue #698
    118984e9