]> git.ipfire.org Git - thirdparty/cups.git/blame - cups/debug.h
Merge changes from CUPS 1.4svn-r7961.
[thirdparty/cups.git] / cups / debug.h
CommitLineData
ef416fc2 1/*
b19ccc9e 2 * "$Id: debug.h 7701 2008-06-27 22:37:23Z 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
4509bb49 45extern int _cups_debug_fd;
ae71f5de
MS
46extern void _cups_debug_printf(const char *format, ...)
47#ifdef __GNUC__
48__attribute__ ((__format__ (__printf__, 1, 2)))
49#endif /* __GNUC__ */
50;
51extern void _cups_debug_puts(const char *s);
52
53
ef416fc2 54#endif /* !_CUPS_DEBUG_H_ */
55
56/*
b19ccc9e 57 * End of "$Id: debug.h 7701 2008-06-27 22:37:23Z mike $".
ef416fc2 58 */