📄 ctype.c
字号:
/** Snixos Project version 1.0, 2003.6* (C) Copyright 2003,2004,2005 Jockeyson,KeqiangGao <Snallie@tom.com>* All Rights Reserved.* Distributed under the terms of the GNU General Public License.** This program is a free and open source software and you can redistribute * it and/or modify it under the terms of the GNU General Public License as* published by the Free Software Foundation. As no any liability is assumed * for any incidental or consequential damages in connection with the * information or program fragments contained herein,so any exception arised* is at your own risk. It is ABSOLUTELY WITHOUT ANY WARRANTY.* Bug report please send to Snallie@tom.com .*//* ctype.c: implementation of ctype.c for snixos Author : snallie@tom.com Time: 2003.6*/ /* isalnum -- true return argument is valid ASCII alphabetic or digit */ int isalnum(char c) { return ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9'));}/* isalpha -- true return argument is valid ASCII alphabetic */ int isalpha(char c) { return ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'));}/* isascii -- true return argument is valid ASCII character */ int isascii(char c) { return (((unsigned) c) <= 127);} int isblank(char c) { return (c == '\t' || c == ' ');}/* iscntrl -- true return argument is valid ASCII control character */ int iscntrl(char c) { return (c < ' ' || c == 127);}/* isdigit -- true return argument is valid ASCII digit */ int isdigit(char c) { return (c >= '0' && c <= '9');}/* isgraph return true for all printable char except space (0x20h) and 0x7f */ int isgraph(char c) { return (c > 0x20 && c < 0x7f);}/* islower -- true return argument is valid ASCII lower case alphabetic */ int islower(char c) { return (c >= 'a' && c <= 'z');}/* isprint -- true return argument is valid ASCII graphic */ int isprint(char c) { return (c >= ' ' && c <= 126);}/* ispunct -- true return argument is neither ASCII control or alphabetic */ /*!(21) "(22) #(23) $(24) %(25) &(26) '(27) ((28) )(29) *(2a) +(2b) ,(2c) -(2d) .(2e) /(2f) :(3a) ;(3b) <(3c) =(3d) >(3e) ?(3f) @(40) [(5b) \(5c) ](5d) ^(5e) _(5f) `(60) {(7b) |(7c) }(7d) ~(7e)*/ int ispunct(char c) { return (c >= 0x21 && c <= 0x2f || c >= 0x3a && c <= 0x40 || c >= 0x5b && c <= 0x60 || c >= 0x7b && c <= 0x7e);}/* isspace -- true return argument is ASCII space, tab, carriage return, newline (line feed), or form feed (ie, "white space") */ int isspace(char c) { return (c == ' ' || c == '\t' || c == '\r' || c == '\n' || c == '\f' || c == '\v');}/* isupper -- true return argument is valid ASCII upper case alphabetic */ int isupper(char c) { return (c >= 'A' && c <= 'Z');}/* isxdigit return true if c is a hex digit */ int isxdigit(char c) { return (isdigit(c) || c >= 'a' && c <= 'f' || c >= 'A' && c <= 'F');}/* toascii: convert char to ascii ranaged:0~127 */ int toascii(char c) { return (((unsigned) c) & 0x7f);} /* tolower: convert uppercase to lowercase for letter 'A'~'Z' */ int tolower(char c) { return (isupper(c) ? c | 0x20 : c);}/* toupper: convert lowercase to uppercase for letter 'a'~'z' */ int toupper(char c) { return (islower(c) ? c & 0xdf : c);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -