📄 putp.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>putp</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_001_009_746"> </a>NAME</h4><blockquote>putp, tputs - output commands to the terminal</blockquote><h4><a name = "tag_001_009_747"> </a>SYNOPSIS</h4><blockquote><pre><code>#include <<a href="term.h.html">term.h</a>>int putp(const char *<i>str</i>);int tputs(const char *<i>str</i>, int <i>affcnt</i>, int (*<i>putfunc</i>)(int));</code></pre></blockquote><h4><a name = "tag_001_009_748"> </a>DESCRIPTION</h4><blockquote>These functions output commands contained in the <b>terminfo</b> databaseto the terminal.<p>The<i>putp()</i>function is equivalent to <i>tputs</i>(<i>str</i>, 1, <i>putchar</i>).The output of<i>putp()</i>always goes to <b>stdout</b>, not to the <i>fildes</i> specified in<i><a href="setupterm.html">setupterm()</a></i>.<p>The<i><a href="tputs.html">tputs()</a></i>function outputs <i>str</i> to the terminal. The <i>str</i> argument must bea <b>terminfo</b> string variable or the return value from<i><a href="tgetstr.html">tgetstr()</a></i>,<i><a href="tgoto.html">tgoto()</a></i>,<i><a href="tigetstr.html">tigetstr()</a></i>or<i><a href="tparm.html">tparm()</a></i>.The <i>affcnt</i> argument is the number of lines affected, or 1 if notapplicable.If the <b>terminfo</b> database indicates that the terminal in use requirespadding after any command in the generated string,<i><a href="tputs.html">tputs()</a></i>inserts pad characters into the string that is sent to theterminal, at positions indicated by the <b>terminfo</b> database. The<i><a href="tputs.html">tputs()</a></i>function outputs each character of the generated string by calling theuser-supplied function<i>putfunc</i>(see below).<p>The user-supplied function<i>putfunc</i>(specified as an argument to<i><a href="tputs.html">tputs()</a></i>)is either<i><a href="../xsh/putchar.html">putchar()</a></i>or some other function with the same prototype. The<i><a href="tputs.html">tputs()</a></i>function ignores the return value of<i>putfunc</i>.</blockquote><h4><a name = "tag_001_009_749"> </a>RETURN VALUE</h4><blockquote>Upon successful completion, these functions return OK.Otherwise, they return ERR.</blockquote><h4><a name = "tag_001_009_750"> </a>ERRORS</h4><blockquote>No errors are defined.</blockquote><h4><a name = "tag_001_009_751"> </a>APPLICATION USAGE</h4><blockquote>Changing the terminal attributes using these functions may cause the renditions of characterswithin a curses window to be altered on some terminals. <p>After use of any of these functions, the model Cursesmaintains of the state of the terminal might not match the actual state of theterminal. The application should touch and refresh the window before resumingconventional use of Curses.<p></blockquote><h4><a name = "tag_001_009_752"> </a>SEE ALSO</h4><blockquote><i><a href="doupdate.html">doupdate()</a></i>,<i><a href="is_linetouched.html">is_linetouched()</a></i>,<i><a href="../xsh/putchar.html">putchar()</a></i>(in the <b>XSH</b> specification),<i><a href="tgetent.html">tgetent()</a></i>,<i><a href="tigetflag.html">tigetflag()</a></i>,<i><a href="term.h.html"><term.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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -