- Timestamp:
- Jan 13, 2017, 3:21:12 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified ncurses/vendor/current/doc/html/man/curs_terminfo.3x.html ¶
r85 r1910 2 2 <!-- 3 3 **************************************************************************** 4 * Copyright (c) 1999-200 7,2008Free Software Foundation, Inc. *4 * Copyright (c) 1999-2008,2010 Free Software Foundation, Inc. * 5 5 * * 6 6 * Permission is hereby granted, free of charge, to any person obtaining a * … … 28 28 * authorization. * 29 29 **************************************************************************** 30 * @Id: curs_terminfo.3x,v 1.3 0 2008/08/16 20:53:27tom Exp @30 * @Id: curs_terminfo.3x,v 1.35 2010/12/04 18:38:55 tom Exp @ 31 31 --> 32 32 <HTML> … … 49 49 <H2>NAME</H2><PRE> 50 50 <STRONG>del_curterm</STRONG>, <STRONG>mvcur</STRONG>, <STRONG>putp</STRONG>, <STRONG>restartterm</STRONG>, <STRONG>set_curterm</STRONG>, 51 <STRONG>setterm</STRONG>, <STRONG>setupterm</STRONG>, <STRONG>tigetflag</STRONG>, <STRONG>tigetnum</STRONG>, <STRONG>tigetstr</STRONG>, <STRONG>t parm</STRONG>,52 <STRONG>tp uts</STRONG>, <STRONG>vid_attr</STRONG>, <STRONG>vid_puts</STRONG>, <STRONG>vidattr</STRONG>, <STRONG>vidputs</STRONG> - <STRONG>curses</STRONG>53 interfaces to terminfo database51 <STRONG>setterm</STRONG>, <STRONG>setupterm</STRONG>, <STRONG>tigetflag</STRONG>, <STRONG>tigetnum</STRONG>, <STRONG>tigetstr</STRONG>, <STRONG>tiparm</STRONG>, 52 <STRONG>tparm</STRONG>, <STRONG>tputs</STRONG>, <STRONG>vid_attr</STRONG>, <STRONG>vid_puts</STRONG>, <STRONG>vidattr</STRONG>, <STRONG>vidputs</STRONG> - 53 <STRONG>curses</STRONG> interfaces to terminfo database 54 54 55 55 … … 75 75 <STRONG>int</STRONG> <STRONG>tigetnum(char</STRONG> <STRONG>*</STRONG><EM>capname</EM><STRONG>);</STRONG> 76 76 <STRONG>char</STRONG> <STRONG>*tigetstr(char</STRONG> <STRONG>*</STRONG><EM>capname</EM><STRONG>);</STRONG> 77 <STRONG>char</STRONG> <STRONG>*tiparm(const</STRONG> <STRONG>char</STRONG> <STRONG>*</STRONG><EM>str</EM><STRONG>,</STRONG> <STRONG>...);</STRONG> 77 78 78 79 … … 181 182 the parameters applied. 182 183 184 <STRONG>tiparm</STRONG> is a newer form of <STRONG>tparm</STRONG> which uses <EM><stdarg.h></EM> 185 rather than a fixed-parameter list. Its numeric parame- 186 ters are integers (int) rather than longs. 187 183 188 The <STRONG>tputs</STRONG> routine applies padding information to the 184 189 string <EM>str</EM> and outputs it. The <EM>str</EM> must be a terminfo … … 254 259 Routines that return pointers always return <STRONG>NULL</STRONG> on error. 255 260 256 X/Open defines no error conditions. In thisimplementa-261 X/Open defines no error conditions. In this implementa- 257 262 tion 258 263 259 264 <STRONG>del_curterm</STRONG> 260 returns an error if its terminal parameteris265 returns an error if its terminal parameter is 261 266 null. 262 267 … … 268 273 269 274 <STRONG>setupterm</STRONG> 270 returns an error if it cannot allocateenough275 returns an error if it cannot allocate enough 271 276 memory, or create the initial windows (stdscr, 272 curscr, newscr). Other error conditionsare277 curscr, newscr). Other error conditions are 273 278 documented above. 274 279 275 280 <STRONG>tputs</STRONG> 276 returns an error if the string parameteris277 null. It does not detect I/O errors:X/Open278 states that <STRONG>tputs</STRONG> ignores the return valueof281 returns an error if the string parameter is 282 null. It does not detect I/O errors: X/Open 283 states that <STRONG>tputs</STRONG> ignores the return value of 279 284 the output function <EM>putc</EM>. 280 285 … … 282 287 </PRE> 283 288 <H2>NOTES</H2><PRE> 284 The <STRONG>setupterm</STRONG> routine should be used in place of<STRONG>setterm</STRONG>.285 It may be useful when you want to test for terminalcapa-286 bilities without committing to the allocation ofstorage289 The <STRONG>setupterm</STRONG> routine should be used in place of <STRONG>setterm</STRONG>. 290 It may be useful when you want to test for terminal capa- 291 bilities without committing to the allocation of storage 287 292 involved in <STRONG>initscr</STRONG>. 288 293 … … 292 297 </PRE> 293 298 <H2>PORTABILITY</H2><PRE> 294 The function <STRONG>setterm</STRONG> is not described by X/Open andmust295 be considered non-portable. All other functions areas299 The function <STRONG>setterm</STRONG> is not described by X/Open and must 300 be considered non-portable. All other functions are as 296 301 described by X/Open. 297 302 298 <STRONG>setupterm</STRONG> copies the terminal name to the array<STRONG>ttytype</STRONG>.299 This is not part of X/Open Curses, but is assumed bysome303 <STRONG>setupterm</STRONG> copies the terminal name to the array <STRONG>ttytype</STRONG>. 304 This is not part of X/Open Curses, but is assumed by some 300 305 applications. 301 306 302 In System V Release 4, <STRONG>set_curterm</STRONG> has an <STRONG>int</STRONG> returntype303 and returns <STRONG>OK</STRONG> or <STRONG>ERR</STRONG>. We have chosen to implementthe307 In System V Release 4, <STRONG>set_curterm</STRONG> has an <STRONG>int</STRONG> return type 308 and returns <STRONG>OK</STRONG> or <STRONG>ERR</STRONG>. We have chosen to implement the 304 309 X/Open Curses semantics. 305 310 … … 308 313 309 314 At least one implementation of X/Open Curses (Solaris) re- 310 turns a value other than OK/ERR from <STRONG>tputs</STRONG>. Thatreturns315 turns a value other than OK/ERR from <STRONG>tputs</STRONG>. That returns 311 316 the length of the string, and does no error-checking. 312 317 313 X/Open Curses prototypes <STRONG>tparm</STRONG> with a fixed number of pa- 314 rameters, rather than a variable argument list. This im- 315 plementation uses a variable argument list. Portable ap- 318 X/Open Curses prototypes <STRONG>tparm</STRONG> with a fixed number of pa- 319 rameters, rather than a variable argument list. This im- 320 plementation uses a variable argument list, but can be 321 configured to use the fixed-parameter list. Portable ap- 316 322 plications should provide 9 parameters after the format; 317 323 zeroes are fine for this purpose. 318 324 319 X/Open notes that after calling <STRONG>mvcur</STRONG>, the curses state 320 may not match the actual terminal state, and that an ap- 321 plication should touch and refresh the window before re- 325 In response to comments by Thomas E. Dickey, X/Open Curses 326 Issue 7 proposed the <STRONG>tiparam</STRONG> function in mid-2009. 327 328 X/Open notes that after calling <STRONG>mvcur</STRONG>, the curses state 329 may not match the actual terminal state, and that an ap- 330 plication should touch and refresh the window before re- 322 331 suming normal curses calls. Both ncurses and System V Re- 323 332 lease 4 curses implement <STRONG>mvcur</STRONG> using the SCREEN data allo- 324 333 cated in either <STRONG>initscr</STRONG> or <STRONG>newterm</STRONG>. So though it is docu- 325 mented as a terminfo function, <STRONG>mvcur</STRONG> is really acurses334 mented as a terminfo function, <STRONG>mvcur</STRONG> is really a curses 326 335 function which is not well specified. 327 336 328 X/Open states that the old location must be givenfor329 <STRONG>mvcur</STRONG>. This implementation allows the caller to use-1's330 for the old ordinates. In that case, the old locationis337 X/Open states that the old location must be given for 338 <STRONG>mvcur</STRONG>. This implementation allows the caller to use -1's 339 for the old ordinates. In that case, the old location is 331 340 unknown. 332 341 333 Extended terminal capability names, e.g., as definedby334 <STRONG>tic</STRONG> <STRONG>-x</STRONG>, are not stored in the arrays described inthis342 Extended terminal capability names, e.g., as defined by 343 <STRONG>tic</STRONG> <STRONG>-x</STRONG>, are not stored in the arrays described in this 335 344 section. 336 345 … … 338 347 </PRE> 339 348 <H2>SEE ALSO</H2><PRE> 340 <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_initscr.3x.html">curs_initscr(3x)</A></STRONG>, <STRONG><A HREF="curs_kernel.3x.html">curs_kernel(3x)</A></STRONG>, <STRONG>curs_term-</STRONG> 341 <STRONG><A HREF="curs_termcap.3x.html">cap(3x)</A></STRONG>, <STRONG><A HREF="putc.3.html">putc(3)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG> 349 <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_initscr.3x.html">curs_initscr(3x)</A></STRONG>, <STRONG><A HREF="curs_kernel.3x.html">curs_kernel(3x)</A></STRONG>, <STRONG>curs_term-</STRONG> 350 <STRONG><A HREF="curs_termcap.3x.html">cap(3x)</A></STRONG>, <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>, <STRONG><A HREF="term_variables.3x.html">term_variables(3x)</A></STRONG>, <STRONG><A HREF="putc.3.html">putc(3)</A></STRONG>, 351 <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG> 342 352 343 353
Note:
See TracChangeset
for help on using the changeset viewer.