From 99ee43b33bec75bb43b4c02060776a67246bacca Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 16 Jan 2014 21:24:39 +0100 Subject: msg: move special declarations to msg_control.h While almost everything uses msg.h, the moved definitions are rarely needed by anything. --- common/encode_lavc.c | 1 + common/msg.c | 3 ++- common/msg.h | 12 ------------ common/msg_control.h | 18 ++++++++++++++++++ 4 files changed, 21 insertions(+), 13 deletions(-) create mode 100644 common/msg_control.h (limited to 'common') diff --git a/common/encode_lavc.c b/common/encode_lavc.c index 2cf549e538..39787430bf 100644 --- a/common/encode_lavc.c +++ b/common/encode_lavc.c @@ -25,6 +25,7 @@ #include "encode_lavc.h" #include "common/global.h" #include "common/msg.h" +#include "common/msg_control.h" #include "video/vfcap.h" #include "options/options.h" #include "osdep/timer.h" diff --git a/common/msg.c b/common/msg.c index 32bbe8e89e..7a4b78b266 100644 --- a/common/msg.c +++ b/common/msg.c @@ -34,7 +34,8 @@ #include "osdep/terminal.h" #include "osdep/io.h" -#include "common/msg.h" +#include "msg.h" +#include "msg_control.h" /* maximum message length of mp_msg */ #define MSGSIZE_MAX 6144 diff --git a/common/msg.h b/common/msg.h index 50420c9044..0ca449cb49 100644 --- a/common/msg.h +++ b/common/msg.h @@ -76,16 +76,4 @@ bool mp_msg_test(struct mp_log *log, int lev); #define MP_TRACE(obj, ...) MP_MSG(obj, MSGL_TRACE, __VA_ARGS__) #define MP_SMODE(obj, ...) MP_MSG(obj, MSGL_SMODE, __VA_ARGS__) -struct mpv_global; -void mp_msg_init(struct mpv_global *global); -void mp_msg_uninit(struct mpv_global *global); -void mp_msg_update_msglevels(struct mpv_global *global); -void mp_msg_mute(struct mpv_global *global, bool mute); -void mp_msg_force_stderr(struct mpv_global *global, bool force_stderr); -void mp_msg_flush_status_line(struct mpv_global *global); -bool mp_msg_has_status_line(struct mpv_global *global); - -struct bstr; -int mp_msg_split_msglevel(struct bstr *s, struct bstr *out_mod, int *out_level); - #endif /* MPLAYER_MP_MSG_H */ diff --git a/common/msg_control.h b/common/msg_control.h new file mode 100644 index 0000000000..3ff53971b7 --- /dev/null +++ b/common/msg_control.h @@ -0,0 +1,18 @@ +#ifndef MP_MSG_CONTROL_H +#define MP_MSG_CONTROL_H + +#include + +struct mpv_global; +void mp_msg_init(struct mpv_global *global); +void mp_msg_uninit(struct mpv_global *global); +void mp_msg_update_msglevels(struct mpv_global *global); +void mp_msg_mute(struct mpv_global *global, bool mute); +void mp_msg_force_stderr(struct mpv_global *global, bool force_stderr); +void mp_msg_flush_status_line(struct mpv_global *global); +bool mp_msg_has_status_line(struct mpv_global *global); + +struct bstr; +int mp_msg_split_msglevel(struct bstr *s, struct bstr *out_mod, int *out_level); + +#endif -- cgit v1.2.3