dxx-rebirth/common/include/console.h
Kp 9de54cfa74 Switch to C++ linkage
import fileinput
guard = 0
cxxguard = '#ifdef __cplusplus\n'
for line in fileinput.input(inplace=True):
	if line == cxxguard:
		guard = 1
		continue
	if guard:
		if line == 'extern "C" {\n':
			guard = 2
			continue
		if line == '}\n':
			guard = 0
			continue
		if guard == 2:
			assert(line == '#endif\n')
			guard = 0
			print cxxguard,
			continue
	print line,
2013-12-06 03:35:32 +00:00

43 lines
809 B
C

/* Console */
#ifndef _CONSOLE_H_
#define _CONSOLE_H_
#include "pstypes.h"
#include "dxxsconf.h"
#ifdef __cplusplus
/* Priority levels */
#define CON_CRITICAL -3
#define CON_URGENT -2
#define CON_HUD -1
#define CON_NORMAL 0
#define CON_VERBOSE 1
#define CON_DEBUG 2
#define CON_LINES_ONSCREEN 18
#define CON_SCROLL_OFFSET (CON_LINES_ONSCREEN - 3)
#define CON_LINES_MAX 128
#define CON_LINE_LENGTH 2048
#define CON_STATE_OPEN 2
#define CON_STATE_OPENING 1
#define CON_STATE_CLOSING -1
#define CON_STATE_CLOSED -2
typedef struct console_buffer
{
char line[CON_LINE_LENGTH];
int priority;
} __pack__ console_buffer;
void con_init(void);
void con_printf(int level, const char *fmt, ...) __attribute_format_printf(2, 3);
void con_showup(void);
#endif
#endif /* _CONSOLE_H_ */