]> git.ipfire.org Git - thirdparty/cups.git/blob - cups/debug.h
Merge changes from CUPS 1.4svn-r7961.
[thirdparty/cups.git] / cups / debug.h
1 /*
2 * "$Id: debug.h 7701 2008-06-27 22:37:23Z mike $"
3 *
4 * Debugging macros for the Common UNIX Printing System (CUPS).
5 *
6 * Copyright 2007-2008 by Apple Inc.
7 * Copyright 1997-2005 by Easy Software Products.
8 *
9 * These coded instructions, statements, and computer programs are the
10 * property of Apple Inc. and are protected by Federal copyright
11 * law. Distribution and use rights are outlined in the file "LICENSE.txt"
12 * which should have been included with this file. If this file is
13 * file is missing or damaged, see the license at "http://www.cups.org/".
14 *
15 * This file is subject to the Apple OS-Developed Software exception.
16 */
17
18 #ifndef _CUPS_DEBUG_H_
19 # define _CUPS_DEBUG_H_
20
21 /*
22 * The debug macros are used if you compile with DEBUG defined.
23 *
24 * Usage:
25 *
26 * DEBUG_puts("string")
27 * DEBUG_printf(("format string", arg, arg, ...));
28 *
29 * Note the extra parenthesis around the DEBUG_printf macro...
30 */
31
32 # ifdef DEBUG
33 # define DEBUG_puts(x) _cups_debug_puts(x)
34 # define DEBUG_printf(x) _cups_debug_printf x
35 # else
36 # define DEBUG_puts(x)
37 # define DEBUG_printf(x)
38 # endif /* DEBUG */
39
40
41 /*
42 * Prototypes...
43 */
44
45 extern int _cups_debug_fd;
46 extern void _cups_debug_printf(const char *format, ...)
47 #ifdef __GNUC__
48 __attribute__ ((__format__ (__printf__, 1, 2)))
49 #endif /* __GNUC__ */
50 ;
51 extern void _cups_debug_puts(const char *s);
52
53
54 #endif /* !_CUPS_DEBUG_H_ */
55
56 /*
57 * End of "$Id: debug.h 7701 2008-06-27 22:37:23Z mike $".
58 */