summaryrefslogtreecommitdiff
path: root/src/sys/con_tty.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2009-10-03 11:12:39 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:14:44 +0000
commit593953c7deabb08cc77c22c08f5c8859bafbcb79 (patch)
tree8a22c17d66e749656a5665e1379d29ca715e219e /src/sys/con_tty.c
parent3ffe4805cfebd93a60bf59b582303540b2ec0d80 (diff)
* Merge ioq3-r1233
Diffstat (limited to 'src/sys/con_tty.c')
-rw-r--r--src/sys/con_tty.c26
1 files changed, 22 insertions, 4 deletions
diff --git a/src/sys/con_tty.c b/src/sys/con_tty.c
index f128b0d7..687d1dd4 100644
--- a/src/sys/con_tty.c
+++ b/src/sys/con_tty.c
@@ -23,6 +23,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "../qcommon/q_shared.h"
#include "../qcommon/qcommon.h"
+#include "sys_local.h"
#include <unistd.h>
#include <signal.h>
@@ -102,7 +103,7 @@ Clear the display of the line currently edited
bring cursor back to beginning of line
==================
*/
-void CON_Hide( void )
+static void CON_Hide( void )
{
if( ttycon_on )
{
@@ -132,7 +133,7 @@ Show the current line
FIXME need to position the cursor if needed?
==================
*/
-void CON_Show( void )
+static void CON_Show( void )
{
if( ttycon_on )
{
@@ -297,10 +298,10 @@ void CON_Init( void )
/*
==================
-CON_ConsoleInput
+CON_Input
==================
*/
-char *CON_ConsoleInput( void )
+char *CON_Input( void )
{
// we use this when sending back commands
static char text[256];
@@ -440,3 +441,20 @@ char *CON_ConsoleInput( void )
return text;
}
}
+
+/*
+==================
+CON_Print
+==================
+*/
+void CON_Print( const char *msg )
+{
+ CON_Hide( );
+
+ if( com_ansiColor && com_ansiColor->integer )
+ Sys_AnsiColorPrint( msg );
+ else
+ fputs( msg, stderr );
+
+ CON_Show( );
+}