]> git.ipfire.org Git - thirdparty/cups.git/blob - cups/debug.h
Import CUPS 1.4svn-r7464.
[thirdparty/cups.git] / cups / debug.h
1 /*
2 * "$Id: debug.h 6649 2007-07-11 21:46:42Z 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 void _cups_debug_printf(const char *format, ...)
46 #ifdef __GNUC__
47 __attribute__ ((__format__ (__printf__, 1, 2)))
48 #endif /* __GNUC__ */
49 ;
50 extern void _cups_debug_puts(const char *s);
51
52
53 #endif /* !_CUPS_DEBUG_H_ */
54
55 /*
56 * End of "$Id: debug.h 6649 2007-07-11 21:46:42Z mike $".
57 */