curs_trace.3x.html 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
  2. <!--
  3. ****************************************************************************
  4. * Copyright (c) 2000-2005,2007 Free Software Foundation, Inc. *
  5. * *
  6. * Permission is hereby granted, free of charge, to any person obtaining a *
  7. * copy of this software and associated documentation files (the *
  8. * "Software"), to deal in the Software without restriction, including *
  9. * without limitation the rights to use, copy, modify, merge, publish, *
  10. * distribute, distribute with modifications, sublicense, and/or sell *
  11. * copies of the Software, and to permit persons to whom the Software is *
  12. * furnished to do so, subject to the following conditions: *
  13. * *
  14. * The above copyright notice and this permission notice shall be included *
  15. * in all copies or substantial portions of the Software. *
  16. * *
  17. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
  18. * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
  19. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
  20. * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
  21. * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
  22. * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
  23. * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
  24. * *
  25. * Except as contained in this notice, the name(s) of the above copyright *
  26. * holders shall not be used in advertising or otherwise to promote the *
  27. * sale, use or other dealings in this Software without prior written *
  28. * authorization. *
  29. ****************************************************************************
  30. * @Id: curs_trace.3x,v 1.8 2007/02/24 17:33:49 tom Exp @
  31. -->
  32. <HTML>
  33. <HEAD>
  34. <TITLE>curs_trace 3x</TITLE>
  35. <link rev=made href="mailto:bug-ncurses@gnu.org">
  36. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  37. </HEAD>
  38. <BODY>
  39. <H1>curs_trace 3x</H1>
  40. <HR>
  41. <PRE>
  42. <!-- Manpage converted by man2html 3.0.1 -->
  43. <STRONG><A HREF="curs_trace.3x.html">curs_trace(3x)</A></STRONG> <STRONG><A HREF="curs_trace.3x.html">curs_trace(3x)</A></STRONG>
  44. </PRE>
  45. <H2>NAME</H2><PRE>
  46. <STRONG>_tracef</STRONG>, <STRONG>_tracedump</STRONG>, <STRONG>_traceattr</STRONG>, <STRONG>_traceattr2</STRONG>,
  47. <STRONG>_nc_tracebits</STRONG>, <STRONG>_tracechar</STRONG>, <STRONG>_tracechtype</STRONG>, <STRONG>_tracechtype2</STRONG>,
  48. <STRONG>_tracemouse</STRONG>, <STRONG>trace</STRONG> - <STRONG>curses</STRONG> debugging routines
  49. </PRE>
  50. <H2>SYNOPSIS</H2><PRE>
  51. <STRONG>#include</STRONG> <STRONG>&lt;curses.h&gt;</STRONG>
  52. <STRONG>void</STRONG> <STRONG>_tracef(const</STRONG> <STRONG>char</STRONG> <STRONG>*format,</STRONG> <STRONG>...);</STRONG>
  53. <STRONG>void</STRONG> <STRONG>_tracedump(const</STRONG> <STRONG>char</STRONG> <STRONG>*label,</STRONG> <STRONG>WINDOW</STRONG> <STRONG>*win);</STRONG>
  54. <STRONG>char</STRONG> <STRONG>*_traceattr(attr_t</STRONG> <STRONG>attr);</STRONG>
  55. <STRONG>char</STRONG> <STRONG>*_traceattr2(int</STRONG> <STRONG>buffer,</STRONG> <STRONG>chtype</STRONG> <STRONG>ch);</STRONG>
  56. <STRONG>char</STRONG> <STRONG>*_nc_tracebits(void);</STRONG>
  57. <STRONG>char</STRONG> <STRONG>*_tracechar(int);</STRONG>
  58. <STRONG>char</STRONG> <STRONG>*_tracechtype(chtype</STRONG> <STRONG>ch);</STRONG>
  59. <STRONG>char</STRONG> <STRONG>*_tracechtype2(int</STRONG> <STRONG>buffer,</STRONG> <STRONG>chtype</STRONG> <STRONG>ch);</STRONG>
  60. <STRONG>char</STRONG> <STRONG>*_tracemouse(const</STRONG> <STRONG>MEVENT</STRONG> <STRONG>*event);</STRONG>
  61. <STRONG>void</STRONG> <STRONG>trace(const</STRONG> <STRONG>unsigned</STRONG> <STRONG>int</STRONG> <STRONG>param);</STRONG>
  62. </PRE>
  63. <H2>DESCRIPTION</H2><PRE>
  64. The <STRONG>trace</STRONG> routines are used for debugging the ncurses li-
  65. braries, as well as applications which use the ncurses li-
  66. braries. These functions are normally available only with
  67. the debugging library <EM>libncurses</EM><STRONG>_</STRONG><EM>g.a</EM>, but may be compiled
  68. into any model (shared, static, profile) by defining the
  69. symbol <STRONG>TRACE</STRONG>.
  70. The principal parts of this interface are the <STRONG>trace</STRONG> rou-
  71. tine which selectively enables different tracing features,
  72. and the <STRONG>_tracef</STRONG> routine which writes formatted data to the
  73. <EM>trace</EM> file.
  74. Calling <STRONG>trace</STRONG> with a nonzero parameter opens the file
  75. <STRONG>trace</STRONG> in the current directory for output. The parameter
  76. is formed by OR'ing values from the list of <STRONG>TRACE_</STRONG><EM>xxx</EM> def-
  77. initions in <STRONG>&lt;curses.h&gt;</STRONG>. These include:
  78. TRACE_DISABLE
  79. turn off tracing.
  80. TRACE_TIMES
  81. trace user and system times of updates.
  82. TRACE_TPUTS
  83. trace tputs calls.
  84. TRACE_UPDATE
  85. trace update actions, old &amp; new screens.
  86. TRACE_MOVE
  87. trace cursor movement and scrolling.
  88. TRACE_CHARPUT
  89. trace all character outputs.
  90. TRACE_ORDINARY
  91. trace all update actions. The old and new screen
  92. contents are written to the trace file for each re-
  93. fresh.
  94. TRACE_CALLS
  95. trace all curses calls. The parameters for each call
  96. are traced, as well as return values.
  97. TRACE_VIRTPUT
  98. trace virtual character puts, i.e., calls to <STRONG>addch</STRONG>.
  99. TRACE_IEVENT
  100. trace low-level input processing, including timeouts.
  101. TRACE_BITS
  102. trace state of TTY control bits.
  103. TRACE_ICALLS
  104. trace internal/nested calls.
  105. TRACE_CCALLS
  106. trace per-character calls.
  107. TRACE_DATABASE
  108. trace read/write of terminfo/termcap data.
  109. TRACE_ATTRS
  110. trace changes to video attributes and colors.
  111. TRACE_MAXIMUM
  112. maximum trace level, enables all of the separate
  113. trace features.
  114. Some tracing features are enabled whenever the <STRONG>trace</STRONG> pa-
  115. rameter is nonzero. Some features overlap. The specific
  116. names are used as a guideline.
  117. </PRE>
  118. <H2>RETURN VALUE</H2><PRE>
  119. Routines which return a value are designed to be used as
  120. parameters to the <STRONG>_tracef</STRONG> routine.
  121. </PRE>
  122. <H2>PORTABILITY</H2><PRE>
  123. These functions are not part of the XSI interface. Some
  124. other curses implementations are known to have similar,
  125. undocumented features, but they are not compatible with
  126. ncurses.
  127. </PRE>
  128. <H2>SEE ALSO</H2><PRE>
  129. <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>.
  130. <STRONG><A HREF="curs_trace.3x.html">curs_trace(3x)</A></STRONG>
  131. </PRE>
  132. <HR>
  133. <ADDRESS>
  134. Man(1) output converted with
  135. <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
  136. </ADDRESS>
  137. </BODY>
  138. </HTML>