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