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

📄 27.html

📁 linux 0.11中文版 有注释
💻 HTML
字号:
<html>
<head>
<title>include/ctype.h</title>
<meta name='robots' content='noindex,nofollow'>
<meta name='generator' content='GLOBAL-5.4.1'>
</head>
<body text='#191970' bgcolor='#f5f5dc' vlink='gray'>
<a name='TOP'><h2><a href='../mains.html'>root</a>/<a href='../files/99.html'>include</a>/ctype.h</h2>
<i><font color='green'>/* [&lt;][&gt;][^][v][top]<a href='#BOTTOM'>[bottom]</a><a href='../mains.html'>[index]</a><a href='../help.html'>[help]</a> */</font></i>
<hr>
<h2><a href='../J/27.html' title='Multiple included from 2 places.'>INCLUDED FROM</a></h2>
<hr>
<pre>
<a name='L1'><font color='darkred'>#ifndef</font> <a href='../S/27.html#L2' title='Defined at 2 in include/ctype.h.'>_CTYPE_H</a>
<a name='L2'><font color='darkred'>#define</font> <a href='../S/27.html#L1' title='Refered from 1 in include/ctype.h.'>_CTYPE_H</a>
<a name='L3'>
<a name='L4'><font color='darkred'>#define</font> <a href='../R/361.html' title='Multiple refered from 9 places.'>_U</a> 0x01 <i><font color='green'>/* upper */</font></i>     <i><font color='green'>// 该比特位用于大写字符[A-Z]。</font></i>
<a name='L5'><font color='darkred'>#define</font> <a href='../R/332.html' title='Multiple refered from 9 places.'>_L</a> 0x02 <i><font color='green'>/* lower */</font></i>     <i><font color='green'>// 该比特位用于小写字符[a-z]。</font></i>
<a name='L6'><font color='darkred'>#define</font> <a href='../R/325.html' title='Multiple refered from 7 places.'>_D</a> 0x04 <i><font color='green'>/* digit */</font></i>     <i><font color='green'>// 该比特位用于数字[0-9]。</font></i>
<a name='L7'><font color='darkred'>#define</font> <a href='../R/321.html' title='Multiple refered from 6 places.'>_C</a> 0x08 <i><font color='green'>/* cntrl */</font></i>     <i><font color='green'>// 该比特位用于控制字符。</font></i>
<a name='L8'><font color='darkred'>#define</font> <a href='../R/341.html' title='Multiple refered from 10 places.'>_P</a> 0x10 <i><font color='green'>/* punct */</font></i>     <i><font color='green'>// 该比特位用于标点字符。</font></i>
<a name='L9'><font color='darkred'>#define</font> <a href='../R/343.html' title='Multiple refered from 4 places.'>_S</a> 0x20 <i><font color='green'>/* white space (space/lf/tab) */</font></i>        <i><font color='green'>// 用于空白字符,如空格、\t、\n 等。</font></i>
<a name='L10'><font color='darkred'>#define</font> <a href='../R/364.html' title='Multiple refered from 3 places.'>_X</a> 0x40 <i><font color='green'>/* hex digit */</font></i> <i><font color='green'>// 该比特位用于十六进制数字。</font></i>
<a name='L11'><font color='darkred'>#define</font> <a href='../R/347.html' title='Multiple refered from 2 places.'>_SP</a> 0x80 <i><font color='green'>/* hard space (0x20) */</font></i>        <i><font color='green'>// 该比特位用于空格字符(0x20)。</font></i>
<a name='L12'>
<a name='L13'><b>extern</b> <b>unsigned</b> <b>char</b> _ctype[];  <i><font color='green'>// 字符特性数组(表),定义了各个字符对应上面的属性。</font></i>
<a name='L14'><b>extern</b> <b>char</b> _ctmp;              <i><font color='green'>// 一个临时字符变量(在fs/ctype.c 中定义)。</font></i>
<a name='L15'>
<a name='L16'><i><font color='green'>// 下面是一些确定字符类型的宏。</font></i>
<a name='L17'><font color='darkred'>#define</font> isalnum(c) ((_ctype+1)[c]&amp;(<a href='../S/27.html#L4' title='Defined at 4 in include/ctype.h.'>_U</a>|<a href='../S/27.html#L5' title='Defined at 5 in include/ctype.h.'>_L</a>|<a href='../S/27.html#L6' title='Defined at 6 in include/ctype.h.'>_D</a>))   <i><font color='green'>// 是字符或数字[A-Z]、[a-z]或[0-9]。</font></i>
<a name='L18'><font color='darkred'>#define</font> isalpha(c) ((_ctype+1)[c]&amp;(<a href='../S/27.html#L4' title='Defined at 4 in include/ctype.h.'>_U</a>|<a href='../S/27.html#L5' title='Defined at 5 in include/ctype.h.'>_L</a>))      <i><font color='green'>// 是字符。</font></i>
<a name='L19'><font color='darkred'>#define</font> iscntrl(c) ((_ctype+1)[c]&amp;(<a href='../S/27.html#L7' title='Defined at 7 in include/ctype.h.'>_C</a>)) <i><font color='green'>// 是控制字符。</font></i>
<a name='L20'><font color='darkred'>#define</font> isdigit(c) ((_ctype+1)[c]&amp;(<a href='../S/27.html#L6' title='Defined at 6 in include/ctype.h.'>_D</a>)) <i><font color='green'>// 是数字。</font></i>
<a name='L21'><font color='darkred'>#define</font> isgraph(c) ((_ctype+1)[c]&amp;(<a href='../S/27.html#L8' title='Defined at 8 in include/ctype.h.'>_P</a>|<a href='../S/27.html#L4' title='Defined at 4 in include/ctype.h.'>_U</a>|<a href='../S/27.html#L5' title='Defined at 5 in include/ctype.h.'>_L</a>|<a href='../S/27.html#L6' title='Defined at 6 in include/ctype.h.'>_D</a>))        <i><font color='green'>// 是图形字符。</font></i>
<a name='L22'><font color='darkred'>#define</font> <a href='../S/27.html#L33' title='Refered from 33 in include/ctype.h.'>islower</a>(c) ((_ctype+1)[c]&amp;(<a href='../S/27.html#L5' title='Defined at 5 in include/ctype.h.'>_L</a>)) <i><font color='green'>// 是小写字符。</font></i>
<a name='L23'><font color='darkred'>#define</font> isprint(c) ((_ctype+1)[c]&amp;(<a href='../S/27.html#L8' title='Defined at 8 in include/ctype.h.'>_P</a>|<a href='../S/27.html#L4' title='Defined at 4 in include/ctype.h.'>_U</a>|<a href='../S/27.html#L5' title='Defined at 5 in include/ctype.h.'>_L</a>|<a href='../S/27.html#L6' title='Defined at 6 in include/ctype.h.'>_D</a>|<a href='../S/27.html#L11' title='Defined at 11 in include/ctype.h.'>_SP</a>))    <i><font color='green'>// 是可打印字符。</font></i>
<a name='L24'><font color='darkred'>#define</font> ispunct(c) ((_ctype+1)[c]&amp;(<a href='../S/27.html#L8' title='Defined at 8 in include/ctype.h.'>_P</a>)) <i><font color='green'>// 是标点符号。</font></i>
<a name='L25'><font color='darkred'>#define</font> isspace(c) ((_ctype+1)[c]&amp;(<a href='../D/584.html' title='Multiple defined in 2 places.'>_S</a>)) <i><font color='green'>// 是空白字符如空格,\f,\n,\r,\t,\v。</font></i>
<a name='L26'><font color='darkred'>#define</font> <a href='../S/27.html#L32' title='Refered from 32 in include/ctype.h.'>isupper</a>(c) ((_ctype+1)[c]&amp;(<a href='../S/27.html#L4' title='Defined at 4 in include/ctype.h.'>_U</a>)) <i><font color='green'>// 是大写字符。</font></i>
<a name='L27'><font color='darkred'>#define</font> isxdigit(c) ((_ctype+1)[c]&amp;(<a href='../S/27.html#L6' title='Defined at 6 in include/ctype.h.'>_D</a>|<a href='../S/27.html#L10' title='Defined at 10 in include/ctype.h.'>_X</a>))     <i><font color='green'>// 是十六进制数字。</font></i>
<a name='L28'>
<a name='L29'><font color='darkred'>#define</font> isascii(c) (((<b>unsigned</b>) c)&lt;=0x7f)       <i><font color='green'>// 是ASCII 字符。</font></i>
<a name='L30'><font color='darkred'>#define</font> toascii(c) (((<b>unsigned</b>) c)&amp;0x7f)        <i><font color='green'>// 转换成ASCII 字符。</font></i>
<a name='L31'>
<a name='L32'><font color='darkred'>#define</font> <a href='../S/65.html#L215' title='Refered from 215 in kernel/chr_drv/tty_io.c.'>tolower</a>(c) (_ctmp=c,<a href='../S/27.html#L26' title='Defined at 26 in include/ctype.h.'>isupper</a>(_ctmp)?_ctmp-( 'A'- 'a'):_ctmp)     <i><font color='green'>// 转换成对应小写字符。</font></i>
<a name='L33'><font color='darkred'>#define</font> <a href='../S/65.html#L482' title='Refered from 482 in kernel/chr_drv/tty_io.c.'>toupper</a>(c) (_ctmp=c,<a href='../S/27.html#L22' title='Defined at 22 in include/ctype.h.'>islower</a>(_ctmp)?_ctmp-( 'a'- 'A'):_ctmp)     <i><font color='green'>// 转换成对应大写字符。</font></i>
<a name='L34'>
<a name='L35'><font color='darkred'>#endif</font>
</pre>
<hr>
<a name='BOTTOM'>
<i><font color='green'>/* [&lt;][&gt;][^][v]<a href='#TOP'>[top]</a>[bottom]<a href='../mains.html'>[index]</a><a href='../help.html'>[help]</a> */</font></i>
</body>
</html>

⌨️ 快捷键说明

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