]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | /* |
75bd9771 | 2 | * "$Id: debug.h 7460 2008-04-16 02:19:54Z mike $" |
ef416fc2 | 3 | * |
4 | * Debugging macros for the Common UNIX Printing System (CUPS). | |
5 | * | |
ae71f5de | 6 | * Copyright 2007-2008 by Apple Inc. |
ef416fc2 | 7 | * Copyright 1997-2005 by Easy Software Products. |
8 | * | |
9 | * These coded instructions, statements, and computer programs are the | |
bc44d920 | 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/". | |
ef416fc2 | 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 | ||
ef416fc2 | 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 | |
ae71f5de MS |
33 | # define DEBUG_puts(x) _cups_debug_puts(x) |
34 | # define DEBUG_printf(x) _cups_debug_printf x | |
ef416fc2 | 35 | # else |
36 | # define DEBUG_puts(x) | |
37 | # define DEBUG_printf(x) | |
38 | # endif /* DEBUG */ | |
39 | ||
ae71f5de MS |
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 | ||
ef416fc2 | 53 | #endif /* !_CUPS_DEBUG_H_ */ |
54 | ||
55 | /* | |
75bd9771 | 56 | * End of "$Id: debug.h 7460 2008-04-16 02:19:54Z mike $". |
ef416fc2 | 57 | */ |