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

📄 chartype.h

📁 彩信MMS的全部代码
💻 H
字号:
/*
 * Copyright (C) Obigo AB, 2002-2005.
 * All rights reserved.
 *
 * This software is covered by the license agreement between
 * the end user and Obigo AB, and may be 
 * used and copied only in accordance with the terms of the 
 * said agreement.
 *
 * Obigo AB assumes no responsibility or 
 * liability for any errors or inaccuracies in this software, 
 * or any consequential, incidental or indirect damage arising
 * out of the use of the software.
 *
 */











 





#ifndef _CHARTYPE_H
#define _CHARTYPE_H








#define _UC    0x1u            
#define _LC    0x2u            
#define _D     0x4u            
#define _X     0x8u            
#define _M     0x10u           
#define _SRES  0x20u           
#define _ARES  0x40u           
#define _DL    0x80u           
#define _UW    0x100u          
#define _WS    0x200u          
#define _SP    0x400u          
#define _B     0x800u          
#define _C     0x1000u         
#define _T     0x2000u         
#define _ESC   0x4000u         
#define _XWS   0x8000u         








extern const unsigned short int cmnCTypeArray[256];
extern const unsigned char cmnAsciiLc[256];
extern const unsigned char cmnAsciiUc[256];


#define CMN_ISASCII(c)          ((unsigned char)(c) < 0x80)
#define CMN_ISALPHA(c)          (cmnCTypeArray[(unsigned char)(c)] & (_UC | _LC))
#define CMN_ISALPHANUM(c)       (cmnCTypeArray[(unsigned char)(c)] & (_UC | _LC | _D))
#define CMN_ISLOWER(c)          (cmnCTypeArray[(unsigned char)(c)] & _LC)
#define CMN_ISUPPER(c)          (cmnCTypeArray[(unsigned char)(c)] & _UC)
#define CMN_ISDIGIT(c)          (cmnCTypeArray[(unsigned char)(c)] & _D)
#define CMN_ISHEX(c)            (cmnCTypeArray[(unsigned char)(c)] & (_D | _X))
#define CMN_ISHEXLETTER(c)      (cmnCTypeArray[(unsigned char)(c)] & _X)
#define CMN_ISBLANK(c)          (cmnCTypeArray[(unsigned char)(c)] & (_B))
#define CMN_ISWHITESPACE(c)     (cmnCTypeArray[(unsigned char)(c)] & _WS)
#define CMN_ISXMLWHITESPACE(c)  (cmnCTypeArray[(unsigned char)(c)] & _XWS)
#define CMN_ISCTRL(c)           (cmnCTypeArray[(unsigned char)(c)] & _C)

#define CMN_ISESCAPE(c)         (cmnCTypeArray[(unsigned char)(c)] & _ESC)
#define CMN_ISRESERVED(c)       (cmnCTypeArray[(unsigned char)(c)] & (_SRES | _ARES))
#define CMN_ISEXCLUDED(c)       (cmnCTypeArray[(unsigned char)(c)] & (_C | _SP | _DL))
#define CMN_ISDELIMETER(c)      (cmnCTypeArray[(unsigned char)(c)] & _DL)
#define CMN_ISUNWISE(c)         (cmnCTypeArray[(unsigned char)(c)] & _UW)
#define CMN_ISTSPECIAL(c)       (cmnCTypeArray[(unsigned char)(c)] & _T)
#define CMN_ISSPECIAL(c)        (cmnCTypeArray[(unsigned char)(c)] & (_C | _SP | _SRES | _ARES | _UW | _DL))
#define CMN_ISPCHAR(c)          (cmnCTypeArray[(unsigned char)(c)] & (_UC | _LC | _D | _M | _SRES))
#define CMN_ISURIC(c)           (cmnCTypeArray[(unsigned char)(c)] & (_SRES | _ARES | _UC | _LC | _D | _M))

#define CMN_TOUPPER(c)          (cmnAsciiUc[(unsigned char)(c)])
#define CMN_TOLOWER(c)          (cmnAsciiLc[(unsigned char)(c)])



#endif

⌨️ 快捷键说明

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