mvwinstr.html
来自「unix 下的C开发手册,还用详细的例程。」· HTML 代码 · 共 112 行
HTML
112 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>innstr</title></head><body bgcolor=white><center><font size=2>The Single UNIX ® Specification, Version 2<br>Copyright © 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_002_001_560"> </a>NAME</h4><blockquote>innstr, instr, mvinnstr, mvinstr, mvwinnstr, mvwinstr, winnstr, winstr- input a multi-byte character string from a window</blockquote><h4><a name = "tag_002_001_561"> </a>SYNOPSIS</h4><blockquote><pre><code>#include <<a href="curses.h.html">curses.h</a>>int innstr(char *<i>str</i>, int <i>n</i>);int instr(char *<i>str</i>);int mvinnstr(int <i>y</i>, int <i>x</i>, char *<i>str</i>, int <i>n</i>);int mvinstr(int <i>y</i>, int <i>x</i>, char *<i>str</i>);int mvwinnstr(WINDOW *<i>win</i>, int <i>y</i>, int <i>x</i>, char *<i>str</i>, int <i>n</i>);int mvwinstr(WINDOW *<i>win</i>, int <i>y</i>, int <i>x</i>, char *<i>str</i>);int winnstr(WINDOW *<i>win</i>, char *<i>str</i>, int <i>n</i>);int winstr(WINDOW *<i>win</i>, char *<i>str</i>);</code></pre></blockquote><h4><a name = "tag_002_001_562"> </a>DESCRIPTION</h4><blockquote>These functions place a string of characters from the current or specifiedwindow into the array pointed to by <i>str</i>, starting at the current orspecified position and ending at the end of the line.<p>The<i>innstr()</i>,<i>mvinnstr()</i>,<i>mvwinnstr()</i>and<i>winnstr()</i>functions store at most <i>n</i> bytes in the string pointed to by <i>str</i>.<p>The<i>innstr()</i>,<i>mvinnstr()</i>,<i>mvwinnstr()</i>and<i>winnstr()</i>functions will only store the entire multi-byte sequence associatedwith a character. If the array is large enough to contain at least onecharacter the array is filled with complete characters. If the arrayis not large enough to contain any complete characters, the function fails.</blockquote><h4><a name = "tag_002_001_563"> </a>RETURN VALUE</h4><blockquote>Upon successful completion,<i><a href="instr.html">instr()</a></i>,<i>mvinstr()</i>,<i>mvwinstr()</i>and<i>winstr()</i>return OK.<p>Upon successful completion,<i>innstr()</i>,<i>mvinnstr()</i>,<i>mvwinnstr()</i>and<i>winnstr()</i>return the number of characters actually read into the string.<p>Otherwise, all these functions return ERR.</blockquote><h4><a name = "tag_002_001_564"> </a>ERRORS</h4><blockquote>No errors are defined.</blockquote><h4><a name = "tag_002_001_565"> </a>APPLICATION USAGE</h4><blockquote>Since multi-byte characters may be processed, there might not be a one-to-onecorrespondence between the number of column positions on the screen andthe number of bytes returned.<p>These functions do not return rendition information.<p>Reading a line that overflows the array pointed to by <i>str</i> with<i><a href="instr.html">instr()</a></i>,<i>mvinstr()</i>,<i>mvwinstr()</i>or<i>winstr()</i>causes undefined results. The use of<i>innstr()</i>,<i>mvinnstr()</i>,<i>mvwinnstr()</i>or<i>winnstr()</i>,respectively, is recommended.</blockquote><h4><a name = "tag_002_001_566"> </a>SEE ALSO</h4><blockquote><i><a href="curses.h.html"><curses.h></a></i>.</blockquote><hr size=2 noshade><center><font size=2>UNIX ® is a registered Trademark of The Open Group.<br>Copyright © 1997 The Open Group<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]</font></center><hr size=2 noshade></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?