diff options
author | Luis Ontanon <luis.ontanon@gmail.com> | 2013-06-27 19:00:01 +0000 |
---|---|---|
committer | Luis Ontanon <luis.ontanon@gmail.com> | 2013-06-27 19:00:01 +0000 |
commit | 99013aefa81f2d3e14d3e063574e6dea4045d0b1 (patch) | |
tree | 2a1e516d3c86aca5690a8725f5f51e276c0f46ac /echld/common.c | |
parent | 16fc2c5998031c086d05cf5706ab5b5e9e2abaf2 (diff) |
MS: list interfaces!
svn path=/trunk/; revision=50195
Diffstat (limited to 'echld/common.c')
-rw-r--r-- | echld/common.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/echld/common.c b/echld/common.c index 2071fc6bd0..548fd8127b 100644 --- a/echld/common.c +++ b/echld/common.c @@ -30,6 +30,7 @@ static int dbg_level = DEBUG_BASE; static FILE* dbg_fp; +static const char* dbg_prefix; static void common_dbg(int level, const char* fmt, ...) { va_list ap; @@ -42,21 +43,22 @@ static void common_dbg(int level, const char* fmt, ...) { va_end(ap); if (dbg_fp) { - fprintf(dbg_fp,"Common: level=%d msg='%s'\n",level,str); + fprintf(dbg_fp,"%s: level=%d msg='%s'\n",dbg_prefix,level,str); fflush(dbg_fp); } } +extern void echld_common_set_dbg(int level, FILE* fp, const char* prefix) { + dbg_prefix = prefix; + dbg_level = level; + dbg_fp = fp; +} #define DBG(attrs) ( common_dbg attrs ) #else #define DBG(attrs) #endif -extern void echld_common_set_dbg(int level, FILE* fp) { - dbg_level = level; - dbg_fp = fp; -} /** @@ -404,6 +406,7 @@ static enc_msg_t* x3str_enc(const char* s1, const char* s2, const char* s3) { static echld_parent_encoder_t parent_encoder = { int_str_enc, + str_enc, x2str_enc, int_enc, str_enc, |