Update ncurses to version 5.4.
[dragonfly.git] / lib / libncurses / man / curs_trace.3
1 .\"***************************************************************************
2 .\" Copyright (c) 2000,2002 Free Software Foundation, Inc.                   *
3 .\"                                                                          *
4 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
5 .\" copy of this software and associated documentation files (the            *
6 .\" "Software"), to deal in the Software without restriction, including      *
7 .\" without limitation the rights to use, copy, modify, merge, publish,      *
8 .\" distribute, distribute with modifications, sublicense, and/or sell       *
9 .\" copies of the Software, and to permit persons to whom the Software is    *
10 .\" furnished to do so, subject to the following conditions:                 *
11 .\"                                                                          *
12 .\" The above copyright notice and this permission notice shall be included  *
13 .\" in all copies or substantial portions of the Software.                   *
14 .\"                                                                          *
15 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
16 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
17 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
18 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
19 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
20 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
21 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
22 .\"                                                                          *
23 .\" Except as contained in this notice, the name(s) of the above copyright   *
24 .\" holders shall not be used in advertising or otherwise to promote the     *
25 .\" sale, use or other dealings in this Software without prior written       *
26 .\" authorization.                                                           *
27 .\"***************************************************************************
28 .\"
29 .\" $Id: curs_trace.3x,v 1.5 2002/02/16 22:39:52 tom Exp $
30 .\" $DragonFly: src/lib/libncurses/man/curs_trace.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $
31 .TH curs_trace 3X ""
32 .SH NAME
33 \fB_tracef\fR,
34 \fB_tracedump\fR,
35 \fB_traceattr\fR,
36 \fB_traceattr2\fR,
37 \fB_nc_tracebits\fR,
38 \fB_tracechar\fR,
39 \fB_tracechtype\fR,
40 \fB_tracechtype2\fR,
41 \fB_tracemouse\fR,
42 \fBtrace\fR - \fBcurses\fR debugging routines
43 .SH SYNOPSIS
44 \fB#include <curses.h>\fR
45 .br
46 \fBvoid _tracef(const char *format, ...);\fR
47 .br
48 \fBvoid _tracedump(const char *label, WINDOW *win);\fR
49 .br
50 \fBchar *_traceattr(attr_t attr);\fR
51 .br
52 \fBchar *_traceattr2(int buffer, chtype ch);\fR
53 .br
54 \fBchar *_nc_tracebits(void);\fR
55 .br
56 \fBchar *_tracechar(const unsigned char ch);\fR
57 .br
58 \fBchar *_tracechtype(chtype ch);\fR
59 .br
60 \fBchar *_tracechtype2(int buffer, chtype ch);\fR
61 .br
62 \fBchar *_tracemouse(const MEVENT *event);\fR
63 .br
64 \fBvoid trace(const unsigned int param);\fR
65 .SH DESCRIPTION
66 The \fBtrace\fR routines are used for debugging the ncurses libraries,
67 as well as applications which use the ncurses libraries.
68 These functions are normally available only with the debugging library
69 \fIlibncurses_g.a\fR, but may be compiled into any model (shared, static,
70 profile) by defining the symbol \fBTRACE\fR.
71
72 The principal parts of this interface are the \fBtrace\fR routine which
73 selectively enables different tracing features, and the \fB_tracef\fR
74 routine which writes formatted data to the \fItrace\fR file.
75
76 Calling \fBtrace\fR with a nonzero parameter opens the file \fBtrace\fR
77 in the current directory for output.  The parameter is formed by OR'ing
78 values from the list of \fBTRACE_\fP\fIxxx\fR definitions in \fB<curses.h>\fR.
79 These include:
80 .TP 5
81 TRACE_DISABLE
82 turn off tracing.
83 .TP 5
84 TRACE_TIMES
85 trace user and system times of updates.
86 .TP 5
87 TRACE_TPUTS
88 trace tputs calls.
89 .TP 5
90 TRACE_UPDATE
91 trace update actions, old & new screens.
92 .TP 5
93 TRACE_MOVE
94 trace cursor movement and scrolling.
95 .TP 5
96 TRACE_CHARPUT
97 trace all character outputs.
98 .TP 5
99 TRACE_ORDINARY
100 trace all update actions.
101 The old and new screen contents are written to the trace file
102 for each refresh.
103 .TP 5
104 TRACE_CALLS
105 trace all curses calls.
106 The parameters for each call are traced, as well as return values.
107 .TP 5
108 TRACE_VIRTPUT
109 trace virtual character puts, i.e., calls to \fBaddch\fR.
110 .TP 5
111 TRACE_IEVENT
112 trace low-level input processing, including timeouts.
113 .TP 5
114 TRACE_BITS
115 trace state of TTY control bits.
116 .TP 5
117 TRACE_ICALLS
118 trace internal/nested calls.
119 .TP 5
120 TRACE_CCALLS
121 trace per-character calls.
122 .TP 5
123 TRACE_DATABASE
124 trace read/write of terminfo/termcap data.
125 .TP 5
126 TRACE_ATTRS
127 trace changes to video attributes and colors.
128 .TP 5
129 TRACE_MAXIMUM
130 maximum trace level, enables all of the separate trace features.
131
132 Some tracing features are enabled whenever the \fBtrace\fR parameter
133 is nonzero.  Some features overlap.
134 The specific names are used as a guideline.
135 .SH RETURN VALUE
136 Routines which return a value are designed to be used as parameters
137 to the \fB_tracef\fR routine.
138 .SH PORTABILITY
139 These functions are not part of the XSI interface.
140 Some other curses implementations are known to
141 have similar, undocumented features,
142 but they are not compatible with ncurses.
143 .SH SEE ALSO
144 \fBcurses\fR(3X).
145 .\"#
146 .\"# The following sets edit modes for GNU EMACS
147 .\"# Local Variables:
148 .\"# mode:nroff
149 .\"# fill-column:79
150 .\"# End: