1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
/* NVTV error header -- Dirk Thierbach <dthierbach@gmx.de>
*
* This file is part of nvtv, a tool for tv-output on NVidia cards.
*
* nvtv is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* nvtv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
* $Id: error.h,v 1.1 2003/02/05 00:14:03 miguelfreitas Exp $
*
* Contents:
*
* Error handling.
*
*/
#ifndef _ERROR_H
#define _ERROR_H
#include "debug.h"
/*
* This header file must do the following:
*
* 1) Define error macros for standalone usage
* 2) Map error macros to XFree error macros if compiled under X
* 3) Map error macros and XFree macros function names for Borland C++,
* as the compiler does not support macros with a variable number
* of arguments.
*/
#ifdef __BORLANDC__
#include <stdarg.h>
int dprintf (char *format, ...);
int errorf (char *format, ...);
int errorf1 (int arg1, char *format, ...);
int errorf2 (int arg1, int arg2, char *format, ...);
#define ERROR errorf
#define FPRINTF errorf
#define DPRINTF dprintf
#define xf86Msg errorf1
#define xf86DrvMsg errorf2
#else /* __BORLANDC__ */
/* -------- */
#define ERROR(X...) fprintf(stderr, X)
/* Fake output */
#define FPRINTF(X...) fprintf(stderr, X)
#ifdef NVTV_DEBUG
#define DPRINTF(X...) fprintf(stderr, X)
#else
#define DPRINTF(X...) /* */
#endif
/* -------- */
#define xf86Msg(type,format,args...) /* fprintf(stderr,format,args) */
#define xf86DrvMsg(scrnIndex,type,format, args...) /* fprintf(stderr,format,args) */
#endif /* __BORLANDC__ */
#define DEBUG(x) /*x*/
#define ErrorF ERROR
#endif /* _ERROR_H */
|