1curs_trace(3X) curs_trace(3X)
2
3
4
6 _tracef, _tracedump, _traceattr, _traceattr2, _nc_tracebits,
7 _tracecchar_t, _tracecchar_t2, _tracechar, _tracechtype, _tracechtype2,
8 _tracemouse, trace - curses debugging routines
9
11 #include <curses.h>
12
13 void _tracef(const char *format, ...);
14 void _tracedump(const char *label, WINDOW *win);
15 char *_traceattr(attr_t attr);
16 char *_traceattr2(int buffer, chtype ch);
17 char *_nc_tracebits(void);
18 char * _tracecchar_t(const cchar_t *string);
19 char * _tracecchar_t2(int buffer, const cchar_t *string);
20 char *_tracechar(int ch);
21 char *_tracechtype(chtype ch);
22 char *_tracechtype2(int buffer, chtype ch);
23 char *_tracemouse(const MEVENT *event);
24 void trace(const unsigned int param);
25
27 The trace routines are used for debugging the ncurses libraries, as
28 well as applications which use the ncurses libraries. These functions
29 are normally available only with the debugging library libncurses_g.a,
30 but may be compiled into any model (shared, static, profile) by defin‐
31 ing the symbol TRACE. Additionally, some functions are only available
32 with the wide-character configuration of the libraries.
33
34 The principal parts of this interface are the trace routine which se‐
35 lectively enables different tracing features, and the _tracef routine
36 which writes formatted data to the trace file.
37
38 Calling trace with a nonzero parameter opens the file trace in the cur‐
39 rent directory for output. The parameter is formed by OR'ing values
40 from the list of TRACE_xxx definitions in <curses.h>. These include:
41
42 TRACE_DISABLE
43 turn off tracing.
44
45 TRACE_TIMES
46 trace user and system times of updates.
47
48 TRACE_TPUTS
49 trace tputs calls.
50
51 TRACE_UPDATE
52 trace update actions, old & new screens.
53
54 TRACE_MOVE
55 trace cursor movement and scrolling.
56
57 TRACE_CHARPUT
58 trace all character outputs.
59
60 TRACE_ORDINARY
61 trace all update actions. The old and new screen contents are
62 written to the trace file for each refresh.
63
64 TRACE_CALLS
65 trace all curses calls. The parameters for each call are traced,
66 as well as return values.
67
68 TRACE_VIRTPUT
69 trace virtual character puts, i.e., calls to addch.
70
71 TRACE_IEVENT
72 trace low-level input processing, including timeouts.
73
74 TRACE_BITS
75 trace state of TTY control bits.
76
77 TRACE_ICALLS
78 trace internal/nested calls.
79
80 TRACE_CCALLS
81 trace per-character calls.
82
83 TRACE_DATABASE
84 trace read/write of terminfo/termcap data.
85
86 TRACE_ATTRS
87 trace changes to video attributes and colors.
88
89 TRACE_MAXIMUM
90 maximum trace level, enables all of the separate trace features.
91
92 Some tracing features are enabled whenever the trace parameter is
93 nonzero. Some features overlap. The specific names are used as a
94 guideline.
95
96 These functions check the NCURSES_TRACE environment variable, to set
97 the tracing feature as if trace was called:
98 filter, initscr, new_prescr, newterm, nofilter, ripoffline, se‐
99 tupterm, slk_init, tgetent
100
101
103 Routines which return a value are designed to be used as parameters to
104 the _tracef routine.
105
107 These functions are not part of the XSI interface. Some other curses
108 implementations are known to have similar, undocumented features, but
109 they are not compatible with ncurses.
110
112 curses(3X).
113
114
115
116 curs_trace(3X)