关键字重命名(1)

本文详细介绍了在C语言中常见的基本类型定义,包括布尔类型的定义、整型和字符型等基本数据类型的定义方式。此外还提供了针对不同平台的类型定义以确保代码的可移植性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

#ifndef NULL
    #define NULL (0)
#endif


#ifdef EXTERN
#undef EXTERN
#error EXTERN was redefined!
#endif /* undef EXTERN */

#ifdef __cplusplus
#define EXTERN extern "C"
#else
#define EXTERN extern
#endif /* __cplusplus */

/********************* DECLARATIONS ***************************/
/* Constants */
#define FALSE   (0)     /* Boolean constant */
#define TRUE    (1)     /* Boolean constant */
#if !defined(B_CEVA_PLATFORM)
#ifndef __cplusplus
/* C++ language provides a boolean data type; So no need to define
 * one more data type; Make use of it
 * NOTE: The 'C' potions of the VP-API assume C++ "bool" to be of the
 * same size as that of "char". Please make sure this assumption is correct.
 */
typedef unsigned char bool;
#endif /* __cplusplus */
#endif /* B_CEVA_PLATFORM */
/****************** typedefs ***********************************/
/* These are the basic number types used */
/* for uint8, uint16, uint32, int8, int16, int32, bool */
typedef unsigned char   uchar;
typedef unsigned char   uint8;
typedef unsigned short  uint16;
typedef unsigned long   uint32;

typedef signed char    int8;
typedef signed short int int16;
typedef signed long  int32;

typedef   uint8*  uint8p;
typedef   uint16* uint16p;
typedef   uint32* uint32p;

typedef   int8*   int8p;
typedef   int16*  int16p;
typedef   int32*  int32p;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值