Export the get_channel_flags function avoid warnings when passing a

NULL format to wine_dbg_log.
Removed a few no longer used functions.
This commit is contained in:
Alexandre Julliard 2005-09-29 11:16:52 +00:00
parent 0560ea618e
commit 784c94516b
4 changed files with 8 additions and 44 deletions

View File

@ -73,7 +73,7 @@ struct __wine_debug_channel
#define __WINE_GET_DEBUGGING(dbcl,dbch) __WINE_GET_DEBUGGING##dbcl(dbch)
#define __WINE_IS_DEBUG_ON(dbcl,dbch) \
(__WINE_GET_DEBUGGING##dbcl(dbch) && wine_dbg_log(__WINE_DBCL##dbcl, (dbch), 0, 0) != -1)
(__WINE_GET_DEBUGGING##dbcl(dbch) && (__wine_dbg_get_channel_flags(dbch) & (1 << __WINE_DBCL##dbcl)))
#ifdef __GNUC__
@ -148,6 +148,7 @@ struct __wine_debug_functions
const char *function, const char *format, va_list args );
};
extern unsigned char __wine_dbg_get_channel_flags( struct __wine_debug_channel *channel );
extern void __wine_dbg_set_functions( const struct __wine_debug_functions *new_funcs,
struct __wine_debug_functions *old_funcs, size_t size );
@ -166,12 +167,12 @@ extern int wine_dbg_printf( const char *format, ... ) __WINE_PRINTF_ATTR(1,2);
extern int wine_dbg_log( enum __wine_debug_class cls, struct __wine_debug_channel *ch, const char *func,
const char *format, ... ) __WINE_PRINTF_ATTR(4,5);
extern inline const char *wine_dbgstr_a( const char *s )
static inline const char *wine_dbgstr_a( const char *s )
{
return wine_dbgstr_an( s, -1 );
}
extern inline const char *wine_dbgstr_w( const WCHAR *s )
static inline const char *wine_dbgstr_w( const WCHAR *s )
{
return wine_dbgstr_wn( s, -1 );
}

View File

@ -49,7 +49,7 @@ static int cmp_name( const void *p1, const void *p2 )
}
/* get the flags to use for a given channel, possibly setting them too in case of lazy init */
static inline unsigned char get_channel_flags( struct __wine_debug_channel *channel )
unsigned char __wine_dbg_get_channel_flags( struct __wine_debug_channel *channel )
{
if (nb_debug_options)
{
@ -62,26 +62,6 @@ static inline unsigned char get_channel_flags( struct __wine_debug_channel *chan
return default_flags;
}
/* register a new set of channels for a dll */
void *__wine_dbg_register( struct __wine_debug_channel * const *channels, int nb )
{
int i;
for (i = 0; i < nb; i++)
{
channels[i]->flags = ~0;
get_channel_flags( channels[i] );
}
return NULL;
}
/* unregister a set of channels; must pass the pointer obtained from wine_dbg_register */
void __wine_dbg_unregister( void *channel )
{
}
/* add a new debug option at the end of the option list */
static void add_option( const char *name, unsigned char set, unsigned char clear )
{
@ -229,8 +209,7 @@ int wine_dbg_log( enum __wine_debug_class cls, struct __wine_debug_channel *chan
int ret;
va_list valist;
if (!(get_channel_flags( channel ) & (1 << cls))) return -1;
if (!format) return 0;
if (!(__wine_dbg_get_channel_flags( channel ) & (1 << cls))) return -1;
va_start(valist, format);
ret = funcs.dbg_vlog( cls, channel, func, format, valist );
@ -400,16 +379,6 @@ const char *wine_dbgstr_wn( const WCHAR *s, int n )
return funcs.dbgstr_wn(s, n);
}
const char *wine_dbgstr_a( const char *s )
{
return funcs.dbgstr_an( s, -1 );
}
const char *wine_dbgstr_w( const WCHAR *s )
{
return funcs.dbgstr_wn( s, -1 );
}
void __wine_dbg_set_functions( const struct __wine_debug_functions *new_funcs,
struct __wine_debug_functions *old_funcs, size_t size )
{

View File

@ -1,9 +1,8 @@
LIBRARY libwine.dll
EXPORTS
__wine_dbg_register
__wine_dbg_get_channel_flags
__wine_dbg_set_functions
__wine_dbg_unregister
__wine_dll_register
__wine_main_argc
__wine_main_argv
@ -13,9 +12,7 @@ EXPORTS
wine_dbg_log
wine_dbg_printf
wine_dbg_sprintf
wine_dbgstr_a
wine_dbgstr_an
wine_dbgstr_w
wine_dbgstr_wn
wine_dlclose
wine_dll_get_owner

View File

@ -1,9 +1,8 @@
WINE_1.0
{
global:
__wine_dbg_register;
__wine_dbg_get_channel_flags;
__wine_dbg_set_functions;
__wine_dbg_unregister;
__wine_dll_register;
__wine_main_argc;
__wine_main_argv;
@ -13,9 +12,7 @@ WINE_1.0
wine_dbg_log;
wine_dbg_printf;
wine_dbg_sprintf;
wine_dbgstr_a;
wine_dbgstr_an;
wine_dbgstr_w;
wine_dbgstr_wn;
wine_dlclose;
wine_dll_get_owner;