papermario icon indicating copy to clipboard operation
papermario copied to clipboard

Lowercase TRUE and FALSE, rename b32 to bool

Open bates64 opened this issue 1 year ago • 2 comments

  • Make every instance of TRUE/FALSE true/false respectively
  • Replace b32 with enum { true, false } bool (i.e. TRUE/FALSE are not macros anymore, they are enum members)
  • Don't define bool, true, false on C23 or above where stdbool.h could be used instead

e.g.

#if __STDC_VERSION__ >= 202311L
#include <stdbool.h>
#else
typedef enum {
    false,
    true
} bool;
#endif

typedef s8 b8;
typedef s16 b16;
// no more b32, TRUE, or FALSE

bates64 avatar Feb 07 '24 01:02 bates64

What's the idea here? I'm not sure porting just lowercase true/false to old gcc is worth it. If we really wanted lowercase t/f we could just make macros for them, but I don't see the motivation

ethteck avatar Feb 07 '24 02:02 ethteck

I meant macros

bates64 avatar Feb 07 '24 02:02 bates64