diff options
author | Daniel Caujolle-Bert <f1rmb@users.sourceforge.net> | 2001-12-13 00:52:01 +0000 |
---|---|---|
committer | Daniel Caujolle-Bert <f1rmb@users.sourceforge.net> | 2001-12-13 00:52:01 +0000 |
commit | 3a5d712997bc4b3bae99f7eac07a7e089a72347e (patch) | |
tree | ded905ad6535eb4c8b0c2b90acec9424b4a1fa66 /src | |
parent | 9ccb1ed349176abe85231c2661ed3ac797ebb88d (diff) | |
download | xine-lib-3a5d712997bc4b3bae99f7eac07a7e089a72347e.tar.gz xine-lib-3a5d712997bc4b3bae99f7eac07a7e089a72347e.tar.bz2 |
Add new log related function which return log section names. Check
for buf value before returning xine log[buf].
CVS patchset: 1233
CVS date: 2001/12/13 00:52:01
Diffstat (limited to 'src')
-rw-r--r-- | src/xine-engine/xine.c | 17 | ||||
-rw-r--r-- | src/xine-engine/xine_internal.h | 4 |
2 files changed, 17 insertions, 4 deletions
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index 717adb033..79ea1142f 100644 --- a/src/xine-engine/xine.c +++ b/src/xine-engine/xine.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine.c,v 1.88 2001/12/09 18:03:26 guenter Exp $ + * $Id: xine.c,v 1.89 2001/12/13 00:52:01 f1rmb Exp $ * * top-level xine functions * @@ -803,6 +803,15 @@ osd_renderer_t *xine_get_osd_renderer (xine_t *this) { /* * log functions */ +const char **xine_get_log_names(void) { + static const char *log_sections[XINE_LOG_NUM + 1] = { + "messages", /* XINE_LOG_MSG */ + "codecs", /* XINE_LOG_CODEC */ + NULL + }; + + return log_sections; +} void xine_log (xine_t *this, int buf, const char *format, ...) { @@ -816,9 +825,11 @@ void xine_log (xine_t *this, int buf, const char *format, ...) { } char **xine_get_log (xine_t *this, int buf) { - + + if(buf >= XINE_LOG_NUM) + return NULL; + return this->log_buffers[buf]->get_content (this->log_buffers[buf]); - } int xine_get_error (xine_t *this) { diff --git a/src/xine-engine/xine_internal.h b/src/xine-engine/xine_internal.h index c091cbb61..34f10e16b 100644 --- a/src/xine-engine/xine_internal.h +++ b/src/xine-engine/xine_internal.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_internal.h,v 1.63 2001/12/11 15:30:06 miguelfreitas Exp $ + * $Id: xine_internal.h,v 1.64 2001/12/13 00:52:01 f1rmb Exp $ * */ @@ -589,6 +589,8 @@ osd_renderer_t *xine_get_osd_renderer (xine_t *this); * xine log functions */ +const char **xine_get_log_names(void); + void xine_log (xine_t *this, int buf, const char *format, ...); char **xine_get_log (xine_t *this, int buf); |