Switch to stdbool.h
- Add `#include <stdbool.h> to all files previously using the `TRUE`/`FALSE` macros - Replace all instances of `TRUE`/`FALSE` with `true`/`false`, respectively - Definitions of `TRUE`/`FALSE` macros retained in wiringPi.h for compatibility.
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <poll.h>
|
||||
|
||||
#include <wiringPi.h>
|
||||
@@ -32,11 +33,6 @@
|
||||
|
||||
#define PIGLOW_BASE 533
|
||||
|
||||
#ifndef TRUE
|
||||
# define TRUE (1==1)
|
||||
# define FALSE (!TRUE)
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* keypressed: clearKeypressed:
|
||||
|
||||
@@ -26,11 +26,7 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifndef TRUE
|
||||
# define TRUE (1==1)
|
||||
# define FALSE (!TRUE)
|
||||
#endif
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <wiringPi.h>
|
||||
#include <piGlow.h>
|
||||
@@ -81,7 +77,7 @@ int main (int argc, char *argv [])
|
||||
|
||||
// Initialise the piGlow devLib
|
||||
|
||||
piGlowSetup (FALSE) ;
|
||||
piGlowSetup (false) ;
|
||||
|
||||
if (argc == 1)
|
||||
failUsage () ;
|
||||
|
||||
Reference in New Issue
Block a user