aboutsummaryrefslogtreecommitdiffstats
path: root/code/sys/con_tty.c
diff options
context:
space:
mode:
authortma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2007-11-30 18:32:52 +0000
committertma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2007-11-30 18:32:52 +0000
commit7fccfcafc99fe8a81bee1e2cc32e3e383d238dc2 (patch)
tree7937e9a76c67be3539dd3d156c0504d5a8b14612 /code/sys/con_tty.c
parent9fd7f3aaf029d18a4e596672f8ec899add5e9a58 (diff)
downloadioquake3-aero-7fccfcafc99fe8a81bee1e2cc32e3e383d238dc2.tar.gz
ioquake3-aero-7fccfcafc99fe8a81bee1e2cc32e3e383d238dc2.zip
* Add con_log.c to log all console output
* Add con_passive.c to cut down on #ifdef DEDICATED in sys_main.c * Add Sys_ErrorDialog to report ERR_FATALs to the user + On Windows use a MessageBox and offer to copy the console log to the clipboard + On everything else print to the terminal and save the console log as crashlog.txt git-svn-id: svn://svn.icculus.org/quake3/trunk@1222 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/sys/con_tty.c')
-rw-r--r--code/sys/con_tty.c26
1 files changed, 22 insertions, 4 deletions
diff --git a/code/sys/con_tty.c b/code/sys/con_tty.c
index ee729da..c2e553a 100644
--- a/code/sys/con_tty.c
+++ b/code/sys/con_tty.c
@@ -22,6 +22,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>
@@ -101,7 +102,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 )
{
@@ -131,7 +132,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 )
{
@@ -296,10 +297,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];
@@ -439,3 +440,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( );
+}