2014-04-06 11:43:13 -04:00
|
|
|
/**
|
2015-04-28 13:45:35 -04:00
|
|
|
* @file
|
|
|
|
* @brief Boolean type and constansts. WG14/N843 C99 Standard, Section 7.16
|
2014-04-06 11:43:13 -04:00
|
|
|
*
|
2015-04-28 13:45:35 -04:00
|
|
|
* @description
|
2014-04-06 11:43:13 -04:00
|
|
|
* This header is part of the ANSI C99 standard library to define the
|
|
|
|
* standard Boolean type as well as the 'true' and 'false' constansts.
|
|
|
|
*/
|
2019-10-27 11:57:33 -04:00
|
|
|
#ifndef STDBOOL_H
|
|
|
|
#define STDBOOL_H
|
2014-04-06 11:43:13 -04:00
|
|
|
|
2019-12-31 15:55:08 -05:00
|
|
|
/*lint -save */
|
|
|
|
/*lint -e9071 M3-R21.1(r), defined macro is reserved to the compiler */
|
|
|
|
/*lint -e9093 the name is reserved to the compiler */
|
2020-04-02 21:21:11 -04:00
|
|
|
/*lint -emacro(506, true) constant value used in Boolean context (operand to ! operator) */
|
2014-04-06 11:43:13 -04:00
|
|
|
|
|
|
|
#ifndef __cplusplus
|
|
|
|
|
2019-12-31 15:55:08 -05:00
|
|
|
typedef _Bool bool; /*!< standard Boolean data type */
|
2014-04-06 11:43:13 -04:00
|
|
|
|
2020-04-02 21:21:11 -04:00
|
|
|
/*! standard 'false' constant */
|
2019-12-31 15:55:08 -05:00
|
|
|
#define false ((bool)0)
|
2014-04-06 11:43:13 -04:00
|
|
|
|
2020-04-02 21:21:11 -04:00
|
|
|
/*! standard 'true' constant */
|
|
|
|
#define true ((bool)!false)
|
|
|
|
|
2019-12-31 15:55:08 -05:00
|
|
|
#endif /* !__cplusplus */
|
2014-04-06 11:43:13 -04:00
|
|
|
|
|
|
|
/*lint -restore */
|
|
|
|
|
2019-10-27 11:57:33 -04:00
|
|
|
#endif /* STDBOOL_H */
|
2014-04-06 11:43:13 -04:00
|
|
|
|