<!--
****************************************************************************
- * Copyright (c) 1998-2016,2017 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2017,2018 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_termcap.3x,v 1.34 2017/11/18 23:47:37 tom Exp @
+ * @Id: curs_termcap.3x,v 1.40 2018/07/28 21:14:06 tom Exp @
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
-<meta name="generator" content="Manpage converted by man2html - see http://invisible-island.net/scripts/readme.html#others_scripts">
+<meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts">
<TITLE>curs_termcap 3x</TITLE>
<link rev=made href="mailto:bug-ncurses@gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<STRONG>extern</STRONG> <STRONG>char</STRONG> <STRONG>*</STRONG> <STRONG>BC;</STRONG>
<STRONG>extern</STRONG> <STRONG>short</STRONG> <STRONG>ospeed;</STRONG>
- <STRONG>int</STRONG> <STRONG>tgetent(char</STRONG> <STRONG>*bp,</STRONG> <STRONG>const</STRONG> <STRONG>char</STRONG> <STRONG>*name);</STRONG>
- <STRONG>int</STRONG> <STRONG>tgetflag(char</STRONG> <STRONG>*id);</STRONG>
- <STRONG>int</STRONG> <STRONG>tgetnum(char</STRONG> <STRONG>*id);</STRONG>
- <STRONG>char</STRONG> <STRONG>*tgetstr(char</STRONG> <STRONG>*id,</STRONG> <STRONG>char</STRONG> <STRONG>**area);</STRONG>
+ <STRONG>int</STRONG> <STRONG>tgetent(const</STRONG> <STRONG>char</STRONG> <STRONG>*bp,</STRONG> <STRONG>const</STRONG> <STRONG>char</STRONG> <STRONG>*name);</STRONG>
+ <STRONG>int</STRONG> <STRONG>tgetflag(const</STRONG> <STRONG>char</STRONG> <STRONG>*id);</STRONG>
+ <STRONG>int</STRONG> <STRONG>tgetnum(const</STRONG> <STRONG>char</STRONG> <STRONG>*id);</STRONG>
+ <STRONG>char</STRONG> <STRONG>*tgetstr(const</STRONG> <STRONG>char</STRONG> <STRONG>*id,</STRONG> <STRONG>char</STRONG> <STRONG>**area);</STRONG>
<STRONG>char</STRONG> <STRONG>*tgoto(const</STRONG> <STRONG>char</STRONG> <STRONG>*cap,</STRONG> <STRONG>int</STRONG> <STRONG>col,</STRONG> <STRONG>int</STRONG> <STRONG>row);</STRONG>
<STRONG>int</STRONG> <STRONG>tputs(const</STRONG> <STRONG>char</STRONG> <STRONG>*str,</STRONG> <STRONG>int</STRONG> <STRONG>affcnt,</STRONG> <STRONG>int</STRONG> <STRONG>(*putc)(int));</STRONG>
<STRONG>o</STRONG> Normally the ncurses library is compiled with terminfo support. In
that case, <STRONG>tgoto</STRONG> uses <STRONG><A HREF="curs_terminfo.3x.html">tparm(3x)</A></STRONG> (a more capable formatter).
- The <STRONG>tputs</STRONG> routine is described on the <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG> manual page.
+ However, <STRONG>tparm</STRONG> is not a <EM>termcap</EM> feature, and portable <EM>termcap</EM> ap-
+ plications should not rely upon its availability.
+
+ The <STRONG>tputs</STRONG> routine is described on the <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG> manual page.
It can retrieve capabilities by either termcap or terminfo name.
</PRE><H3><a name="h3-GLOBAL-VARIABLES">GLOBAL VARIABLES</a></H3><PRE>
- The variables <STRONG>PC</STRONG>, <STRONG>UP</STRONG> and <STRONG>BC</STRONG> are set by <STRONG>tgetent</STRONG> to the terminfo entry's
+ The variables <STRONG>PC</STRONG>, <STRONG>UP</STRONG> and <STRONG>BC</STRONG> are set by <STRONG>tgetent</STRONG> to the terminfo entry's
data for <STRONG>pad_char</STRONG>, <STRONG>cursor_up</STRONG> and <STRONG>backspace_if_not_bs</STRONG>, respectively. <STRONG>UP</STRONG>
- is not used by ncurses. <STRONG>PC</STRONG> is used in the <STRONG>tdelay_output</STRONG> function. <STRONG>BC</STRONG>
- is used in the <STRONG>tgoto</STRONG> emulation. The variable <STRONG>ospeed</STRONG> is set by ncurses
+ is not used by ncurses. <STRONG>PC</STRONG> is used in the <STRONG>tdelay_output</STRONG> function. <STRONG>BC</STRONG>
+ is used in the <STRONG>tgoto</STRONG> emulation. The variable <STRONG>ospeed</STRONG> is set by ncurses
in a system-specific coding to reflect the terminal speed.
</PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE>
- Except where explicitly noted, routines that return an integer return
- <STRONG>ERR</STRONG> upon failure and <STRONG>OK</STRONG> (SVr4 only specifies "an integer value other
+ Except where explicitly noted, routines that return an integer return
+ <STRONG>ERR</STRONG> upon failure and <STRONG>OK</STRONG> (SVr4 only specifies "an integer value other
than <STRONG>ERR</STRONG>") upon successful completion.
Routines that return pointers return <STRONG>NULL</STRONG> on error.
</PRE><H2><a name="h2-BUGS">BUGS</a></H2><PRE>
- If you call <STRONG>tgetstr</STRONG> to fetch <STRONG>ca</STRONG> or any other parameterized string, be
- aware that it will be returned in terminfo notation, not the older and
+ If you call <STRONG>tgetstr</STRONG> to fetch <STRONG>ca</STRONG> or any other parameterized string, be
+ aware that it will be returned in terminfo notation, not the older and
not-quite-compatible termcap notation. This will not cause problems if
- all you do with it is call <STRONG>tgoto</STRONG> or <STRONG>tparm</STRONG>, which both expand terminfo-
- style strings as terminfo. (The <STRONG>tgoto</STRONG> function, if configured to sup-
- port termcap, will check if the string is indeed terminfo-style by
- looking for "%p" parameters or "$<..>" delays, and invoke a termcap-
+ all you do with it is call <STRONG>tgoto</STRONG> or <STRONG>tparm</STRONG>, which both expand terminfo-
+ style strings as terminfo. (The <STRONG>tgoto</STRONG> function, if configured to sup-
+ port termcap, will check if the string is indeed terminfo-style by
+ looking for "%p" parameters or "$<..>" delays, and invoke a termcap-
style parser if the string does not appear to be terminfo).
- Because terminfo conventions for representing padding in string capa-
- bilities differ from termcap's, <STRONG>tputs("50");</STRONG> will put out a literal
+ Because terminfo conventions for representing padding in string capa-
+ bilities differ from termcap's, <STRONG>tputs("50");</STRONG> will put out a literal
"50" rather than busy-waiting for 50 milliseconds. Cope with it.
- Note that termcap has nothing analogous to terminfo's <STRONG>sgr</STRONG> string. One
- consequence of this is that termcap applications assume me (terminfo
- <STRONG>sgr0</STRONG>) does not reset the alternate character set. This implementation
+ Note that termcap has nothing analogous to terminfo's <STRONG>sgr</STRONG> string. One
+ consequence of this is that termcap applications assume me (terminfo
+ <STRONG>sgr0</STRONG>) does not reset the alternate character set. This implementation
checks for, and modifies the data shown to the termcap interface to ac-
commodate termcap's limitation in this respect.
</PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
- The XSI Curses standard, Issue 4 describes these functions. However,
- they are marked TO BE WITHDRAWN and may be removed in future versions.
+ These functions are provided for supporting legacy applications, and
+ should not be used in new programs:
+
+ <STRONG>o</STRONG> The XSI Curses standard, Issue 4 describes these functions. Howev-
+ er, they are marked TO BE WITHDRAWN and may be removed in future
+ versions.
+
+ <STRONG>o</STRONG> X/Open Curses, Issue 5 (December 2007) marked the termcap interface
+ (along with <STRONG>vwprintw</STRONG> and <STRONG>vwscanw</STRONG>) as withdrawn.
Neither the XSI Curses standard nor the SVr4 man pages documented the
return values of <STRONG>tgetent</STRONG> correctly, though all three were in fact re-
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
<STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>, <STRONG><A HREF="term_variables.3x.html">term_variables(3x)</A></STRONG>, <STRONG>putc(3)</STRONG>.
- http://invisible-island.net/ncurses/tctest.html
+ https://invisible-island.net/ncurses/tctest.html