]> de.git.xonotic.org Git - xonotic/netradiant.git/blob - include/qsysprintf.h
Merge pull request #21 from merlin1991/Q3-gamepack-fix
[xonotic/netradiant.git] / include / qsysprintf.h
1 /*
2    Copyright (C) 1999-2007 id Software, Inc. and contributors.
3    For a list of contributors, see the accompanying CONTRIBUTORS file.
4
5    This file is part of GtkRadiant.
6
7    GtkRadiant is free software; you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation; either version 2 of the License, or
10    (at your option) any later version.
11
12    GtkRadiant is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16
17    You should have received a copy of the GNU General Public License
18    along with GtkRadiant; if not, write to the Free Software
19    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
20  */
21
22 #ifndef __QSYSPRINTF_H__
23 #define __QSYSPRINTF_H__
24
25 /*!
26    this header is provided in libs/ in an attempt to provide a common API
27    for all the diagnostic printing / fatal error situations
28
29    this is oriented at synapse server targets ONLY
30    synapse clients should not include this, as they are supposed to go
31    through the function tables to report print diagnostics
32    (or use Syn_Printf for situations where the func table may not be available)
33
34    each server target implements that in it's own way. Radiant logs to
35    a file and sends to the console, q3map prints to stdout and to the
36    XML network stream, etc.
37  */
38
39 #if defined( __cplusplus )
40 extern "C"
41 {
42 #endif
43
44 // NOTE: might want to switch to bits if needed
45 #define SYS_VRB 0 ///< verbose support (on/off)
46 #define SYS_STD 1 ///< standard print level - this is the default
47 #define SYS_WRN 2 ///< warnings
48 #define SYS_ERR 3 ///< error
49 #define SYS_NOCON 4 ///< no console, only print to the file (useful whenever Sys_Printf and output IS the problem)
50
51 /*!
52    those are the real implementation
53  */
54 void Sys_Printf_VA( const char *text, va_list args ); ///< matches PFN_SYN_PRINTF_VA prototype
55 void Sys_FPrintf_VA( int level, const char *text, va_list args );
56
57 /*!
58    this is easy to call, wrappers around va_list version
59  */
60 void Sys_Printf( const char *text, ... );
61 void Sys_FPrintf( int flag, const char *text, ... );
62
63 #if defined( __cplusplus )
64 };
65 #endif
66
67 #endif