⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ctype.h

📁 一个简单的编译器
💻 H
字号:
/*
 * Character classification macros for MICRO-C
 *
 * These macros classify the passed character based on a table
 * lookup. The accepted range of character values which may be
 * tested is (0 to 127, and EOF).
 *
 * NOTE: Since these are "parameterized" macros, they MUST be
 *       processed by the external pre-processor (MCP). If you
 *       are using the internal processor do not include this
 *       file, and library functions will be used instead.
 *
 * Copyright 1990 Dave Dunfield
 * All rights reserved.
 */

/* Type bits in _chartype_ */
#define IS_CTL	0x01		/* Control code */
#define IS_SPC	0x02		/* Space character */
#define IS_DIG	0x04		/* Numeric digit */
#define IS_UPP	0x08		/* Upper-case alphabetic */
#define IS_LOW	0x10		/* Lower-case alphabetic */
#define IS_HEX	0x20		/* Valid hex-alphabetic character */
#define IS_PUN	0x40		/* Non-graphic printable character */

	extern char _chartype_[];

/* Character classification macros */
#define	iscntrl(c)	(_chartype_[(c)+1] & IS_CTL)
#define	isspace(c)	(_chartype_[(c)+1] & IS_SPC)
#define	isdigit(c)	(_chartype_[(c)+1] & IS_DIG)
#define	isupper(c)	(_chartype_[(c)+1] & IS_UPP)
#define	islower(c)	(_chartype_[(c)+1] & IS_LOW)
#define	ispunct(c)	(_chartype_[(c)+1] & IS_PUN)
#define	isalpha(c)	(_chartype_[(c)+1] & (IS_UPP | IS_LOW))
#define	isxdigit(c)	(_chartype_[(c)+1] & (IS_DIG | IS_HEX))
#define	isalnum(c)	(_chartype_[(c)+1] & (IS_DIG | IS_UPP | IS_LOW))
#define	isgraph(c)	(_chartype_[(c)+1] & (IS_PUN | IS_DIG | IS_UPP | IS_LOW))

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -