From 89eea17ead1ce1e777f7fc87c4869b3547f86867 Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Mon, 10 Mar 2008 00:48:45 +0000 Subject: added option to log to file --- src/engine/e_system.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/engine/e_system.h') diff --git a/src/engine/e_system.h b/src/engine/e_system.h index d524382b..0f79908d 100644 --- a/src/engine/e_system.h +++ b/src/engine/e_system.h @@ -9,7 +9,6 @@ extern "C" { #endif /* Group: Debug */ - /********** Function: dbg_assert @@ -266,6 +265,18 @@ long int io_length(IOHANDLE io); *****/ int io_close(IOHANDLE io); +/***** + Function: io_flush + Empties all buffers and writes all pending data. + + Parameters: + io - Handle to the file. + + Returns: + Returns 0 on success. +*****/ +int io_flush(IOHANDLE io); + /**** Group: Threads ****/ /***** @@ -529,6 +540,12 @@ void str_format(char *buffer, int buffer_size, const char *format, ...); void str_sanitize_strong(char *str); void str_sanitize(char *str); +typedef void (*DBG_LOGGER)(const char *line); +void dbg_logger(DBG_LOGGER logger); +void dbg_logger_stdout(); +void dbg_logger_debugger(); +void dbg_logger_file(const char *filename); + IOHANDLE io_stdin(); IOHANDLE io_stdout(); IOHANDLE io_stderr(); -- cgit 1.4.1