trace.h revision d522f475
1d522f475Smrg/* $XTermId: trace.h,v 1.42 2007/12/31 20:58:23 tom Exp $ */ 2d522f475Smrg 3d522f475Smrg/************************************************************ 4d522f475Smrg 5d522f475SmrgCopyright 1997-2006,2007 by Thomas E. Dickey 6d522f475Smrg 7d522f475Smrg All Rights Reserved 8d522f475Smrg 9d522f475SmrgPermission to use, copy, modify, and distribute this software and its 10d522f475Smrgdocumentation for any purpose and without fee is hereby granted, 11d522f475Smrgprovided that the above copyright notice appear in all copies and that 12d522f475Smrgboth that copyright notice and this permission notice appear in 13d522f475Smrgsupporting documentation, and that the name of the above listed 14d522f475Smrgcopyright holder(s) not be used in advertising or publicity pertaining 15d522f475Smrgto distribution of the software without specific, written prior 16d522f475Smrgpermission. 17d522f475Smrg 18d522f475SmrgTHE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD 19d522f475SmrgTO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 20d522f475SmrgAND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE 21d522f475SmrgLIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 22d522f475SmrgWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 23d522f475SmrgACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 24d522f475SmrgOR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 25d522f475Smrg 26d522f475Smrg********************************************************/ 27d522f475Smrg 28d522f475Smrg/* 29d522f475Smrg * Common/useful definitions for XTERM application 30d522f475Smrg */ 31d522f475Smrg#ifndef included_trace_h 32d522f475Smrg#define included_trace_h 33d522f475Smrg 34d522f475Smrg#include <xterm.h> 35d522f475Smrg 36d522f475Smrg#if OPT_TRACE 37d522f475Smrg 38d522f475Smrgextern void Trace ( const char *, ... ) 39d522f475Smrg#ifdef GCC_PRINTF 40d522f475Smrg __attribute__ ((format(printf,1,2))) 41d522f475Smrg#endif 42d522f475Smrg ; 43d522f475Smrg#define TRACE(p) Trace p 44d522f475Smrg 45d522f475Smrg#if OPT_TRACE > 1 46d522f475Smrg#define TRACE2(p) Trace p 47d522f475Smrg#endif 48d522f475Smrg 49d522f475Smrgextern const char * visibleChrsetName(int /* chrset */); 50d522f475Smrgextern char * visibleChars (PAIRED_CHARS(Char * /* buf */, Char * /* buf2 */), unsigned /* len */); 51d522f475Smrgextern char * visibleIChar (IChar *, unsigned); 52d522f475Smrgextern const char * visibleEventType (int); 53d522f475Smrgextern const char * visibleXError (int /* code */); 54d522f475Smrg 55d522f475Smrgextern void TraceArgv(const char * /* tag */, char ** /* argv */); 56d522f475Smrg#define TRACE_ARGV(tag,argv) TraceArgv(tag,argv) 57d522f475Smrg 58d522f475Smrgextern char *trace_who; 59d522f475Smrg#define TRACE_CHILD int tracing_child = (trace_who = "child") != 0; (void) tracing_child; 60d522f475Smrg 61d522f475Smrgextern void TraceSizeHints(XSizeHints *); 62d522f475Smrg#define TRACE_HINTS(hints) TraceSizeHints(hints) 63d522f475Smrg 64d522f475Smrgextern void TraceIds(const char *fname, int lnum); 65d522f475Smrg#define TRACE_IDS TraceIds(__FILE__, __LINE__) 66d522f475Smrg 67d522f475Smrgextern void TraceOptions(OptionHelp *options, XrmOptionDescRec *resources, Cardinal count); 68d522f475Smrg#define TRACE_OPTS(opts,ress,lens) TraceOptions(opts,ress,lens) 69d522f475Smrg 70d522f475Smrgextern void TraceTranslations(const char *, Widget); 71d522f475Smrg#define TRACE_TRANS(name,w) TraceTranslations(name,w) 72d522f475Smrg 73d522f475Smrgextern void TraceWMSizeHints(XtermWidget); 74d522f475Smrg#define TRACE_WM_HINTS(w) TraceWMSizeHints(w) 75d522f475Smrg 76d522f475Smrgextern void TraceXtermResources(void); 77d522f475Smrg#define TRACE_XRES() TraceXtermResources() 78d522f475Smrg 79d522f475Smrg#endif 80d522f475Smrg 81d522f475Smrg#endif /* included_trace_h */ 82