📄 ctype.h
字号:
/*************************************************************************** Copyright Mentor Graphics Corporation 2002 * All Rights Reserved. * * THIS WORK CONTAINS TRADE SECRET AND PROPRIETARY INFORMATION WHICH IS * THE PROPERTY OF MENTOR GRAPHICS CORPORATION OR ITS LICENSORS AND IS * SUBJECT TO LICENSE TERMS. **************************************************************************//*************************************************************************** FILENAME VERSION** CTYPE.H Nucleus Common Library 1.1** DESCRIPTION** Character type header.** DATA STRUCTURES** none** DEPENDENCIES** ncl.h**************************************************************************/#ifndef __CTYPE#define __CTYPE#define NU_NCL_SOURCE_FILE#include "ncl\inc\ncl.h"#ifdef _INTBITSint NCL_isalnum(int);int NCL_isalpha(int);int NCL_iscntrl(int);int NCL_isdigit(int);int NCL_isgraph(int);int NCL_islower(int);int NCL_isprint(int);int NCL_ispunct(int);int NCL_isspace(int);int NCL_isupper(int);int NCL_isxdigit(int);int NCL_tolower(int);int NCL_toupper(int);int NCL_isascii(int);int NCL_toascii(int);#endif /* _INTBITS */#define NCL_isascii(c) ((unsigned int)(c)<=0x7f)#define NCL_toascii(c) ((c) & 0x7f)#if !_INTBITS || _CHARBITS == 8/******************************************************************** Only implement the macros for small chars because the table must be directly indexable by values EOF,0...UCHAR_MAX. Each character in the array _uctype is represented by a mask of 8 bits as defined here.********************************************************************/extern const char _uctype[];#define _U 0x01 /* upper case letter */#define _L 0x02 /* lower case letter */#define _N 0x04 /* digit [0 - 9] */#define _S 0x08 /* white space */#define _P 0x10 /* all chars that are not control or alphanumeric */#define _C 0x20 /* control character */#define _B 0x40 /* just the space (0x20) character */#define _X 0x80 /* hexadecimal digit */#define NCL_iscntrl(c) ((_uctype+1)[(c)] & _C)#define NCL_isupper(c) ((_uctype+1)[(c)] & _U)#define NCL_islower(c) ((_uctype+1)[(c)] & _L)#define NCL_isdigit(c) ((_uctype+1)[(c)] & _N)#define NCL_isxdigit(c) ((_uctype+1)[(c)] & _X)#define NCL_isspace(c) ((_uctype+1)[(c)] & _S)#define NCL_ispunct(c) ((_uctype+1)[(c)] & _P)#define NCL_isalpha(c) ((_uctype+1)[(c)] & (_U | _L))#define NCL_isalnum(c) ((_uctype+1)[(c)] & (_U | _L | _N))#define NCL_isgraph(c) ((_uctype+1)[(c)] & (_U | _L | _N | _P))#define NCL_isprint(c) ((_uctype+1)[(c)] & (_U | _L | _N | _P | _B))#endif /* !_INTBITS || _CHARBITS == 8 */#undef NU_NCL_SOURCE_FILE#endif /* CTYPE_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -