📄 ctype.h
字号:
/* * OSV * Copyright (C) 2002 Ciprian DOSOFTEI <rocksoul@mail.com> * All rights reserved. * * http://backster.free.fr/osv * * This file is part of the OSV project. OSV is free software, also known as * "open source"; you can redistribute it and/or modify it under the terms * of the GNU General Public License (GPL), version 2, as published by the Free * Software Foundation (FSF). To explore alternate licensing terms, contact * the author at rocksoul@mail.com or +40740649907. * * OSV is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GPL for more details. You should have * received a copy of the GPL along with OSV; see the file COPYING. If * not, write to the FSF, 59 Temple Place #330, Boston, MA 02111-1307, USA. */#ifndef INCCTYPE#define INCCTYPE#include <types.h>#define _U 0x01 /* upper */#define _L 0x02 /* lower */#define _D 0x04 /* digit */#define _C 0x08 /* cntrl */#define _P 0x10 /* punct */#define _S 0x20 /* white space (space/lf/tab) */#define _X 0x40 /* hex digit */#define _SP 0x80 /* hard space (0x20) */extern unsigned char _ctype[];extern char _ctmp;#define isalnum(c) ((_ctype+1)[c]&(_U|_L|_D))#define isalpha(c) ((_ctype+1)[c]&(_U|_L))#define iscntrl(c) ((_ctype+1)[c]&(_C))#define isdigit(c) ((_ctype+1)[c]&(_D))#define isgraph(c) ((_ctype+1)[c]&(_P|_U|_L|_D))#define islower(c) ((_ctype+1)[c]&(_L))#define isprint(c) ((_ctype+1)[c]&(_P|_U|_L|_D|_SP))#define ispunct(c) ((_ctype+1)[c]&(_P))#define isspace(c) ((_ctype+1)[c]&(_S))#define isupper(c) ((_ctype+1)[c]&(_U))#define isxdigit(c) ((_ctype+1)[c]&(_D|_X))#define isascii(c) (((unsigned) c)<=0x7f)#define toascii(c) (((unsigned) c)&0x7f)#define tolower(c) (_ctmp=c,isupper(_ctmp)?_ctmp+('a'+'A'):_ctmp)#define toupper(c) (_ctmp=c,islower(_ctmp)?_ctmp+('A'-'a'):_ctmp)#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -