2006-03-20 17:12:09 +00:00
|
|
|
/* Console */
|
|
|
|
|
|
|
|
#ifndef _CONSOLE_H_
|
2008-04-06 20:23:28 +00:00
|
|
|
#define _CONSOLE_H_
|
2006-03-20 17:12:09 +00:00
|
|
|
|
|
|
|
#include "pstypes.h"
|
|
|
|
|
|
|
|
/* Priority levels */
|
2008-04-06 20:23:28 +00:00
|
|
|
#define CON_CRITICAL -3
|
|
|
|
#define CON_URGENT -2
|
|
|
|
#define CON_HUD -1
|
2006-03-20 17:12:09 +00:00
|
|
|
#define CON_NORMAL 0
|
|
|
|
#define CON_VERBOSE 1
|
|
|
|
#define CON_DEBUG 2
|
|
|
|
|
2008-04-06 20:23:28 +00:00
|
|
|
#define CON_LINES_ONSCREEN 18
|
|
|
|
#define CON_SCROLL_OFFSET (CON_LINES_ONSCREEN - 3)
|
|
|
|
#define CON_LINES_MAX 128
|
|
|
|
#define CON_LINE_LENGTH 512
|
2006-03-20 17:12:09 +00:00
|
|
|
|
2011-01-14 21:56:00 +00:00
|
|
|
#define CON_STATE_OPEN 2
|
|
|
|
#define CON_STATE_OPENING 1
|
|
|
|
#define CON_STATE_CLOSING -1
|
|
|
|
#define CON_STATE_CLOSED -2
|
|
|
|
|
2008-04-06 20:23:28 +00:00
|
|
|
typedef struct console_buffer
|
2006-03-20 17:12:09 +00:00
|
|
|
{
|
2008-04-06 20:23:28 +00:00
|
|
|
char line[CON_LINE_LENGTH];
|
|
|
|
int priority;
|
|
|
|
} __pack__ console_buffer;
|
2006-03-20 17:12:09 +00:00
|
|
|
|
2008-04-06 20:23:28 +00:00
|
|
|
void con_init(void);
|
|
|
|
void con_printf(int level, char *fmt, ...);
|
2011-01-14 21:56:00 +00:00
|
|
|
void con_showup(void);
|
2006-03-20 17:12:09 +00:00
|
|
|
|
|
|
|
#endif /* _CONSOLE_H_ */
|
|
|
|
|