Merged silc_1_0_branch to trunk.
[silc.git] / lib / silcutil / silclog.h
index eeaee1edf9283fab06005477da91c21f625835a3..624120356e8dbd9a35752e7559832ac19d199aa6 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Giovanni Giacobbi <giovanni@giacobbi.net>
 
-  Copyright (C) 1997 - 2002 Pekka Riikonen
+  Copyright (C) 1997 - 2005 Pekka Riikonen
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -379,8 +379,8 @@ extern DLLAPI bool silc_debug_hexdump;
 #define SILC_NOT_IMPLEMENTED(string) \
   SILC_LOG_INFO(("*********** %s: NOT IMPLEMENTED YET", string));
 #else
-#define SILC_LOG_DEBUG(fmt)
-#define SILC_NOT_IMPLEMENTED(string)
+#define SILC_LOG_DEBUG(fmt) do { } while(0)
+#define SILC_NOT_IMPLEMENTED(string) do { } while(0)
 #endif /* SILC_DEBUG */
 /***/
 
@@ -413,12 +413,12 @@ extern DLLAPI bool silc_debug_hexdump;
  */
 #if defined(SILC_DEBUG)
 #define SILC_LOG_HEXDUMP(fmt, data, len) silc_log_output_hexdump(__FILE__, \
-                               __FUNCTION__, \
-                               __LINE__, \
-                               (data), (len), \
+                               __FUNCTION__,                              \
+                               __LINE__,                                  \
+                               (void *)(data), (len),                     \
                                silc_format fmt)
 #else
-#define SILC_LOG_HEXDUMP(fmt, data, len)
+#define SILC_LOG_HEXDUMP(fmt, data, len) do { } while(0)
 #endif /* SILC_DEBUG */
 /***/
 
@@ -472,7 +472,7 @@ char *silc_log_get_file(SilcLogType type);
  *
  * SYNOPSIS
  *
- *    bool silc_log_set_file(SilcLogType type, char *filename, 
+ *    bool silc_log_set_file(SilcLogType type, char *filename,
  *                           SilcUInt32 maxsize,
  *                           SilcSchedule scheduler);
  *
@@ -484,8 +484,8 @@ char *silc_log_get_file(SilcLogType type);
  *    logging settings are not changed.
  *
  *    You can disable logging for a channel by specifying NULL filename, the
- *    maxsize in this case is not important.  The `scheduler' parameter is 
- *    needed by the internal logging to allow buffered output and thus to 
+ *    maxsize in this case is not important.  The `scheduler' parameter is
+ *    needed by the internal logging to allow buffered output and thus to
  *    save HD activity.
  *
  ***/
@@ -508,7 +508,7 @@ bool silc_log_set_file(SilcLogType type, char *filename, SilcUInt32 maxsize,
  *    handler.
  *
  *    You can disable/remove a callback by setting it to NULL or calling the
- *    function silc_log_reset_callbacks.  If set, the callback function 
+ *    function silc_log_reset_callbacks.  If set, the callback function
  *    must be in the form described by SilcLogCb.
  *
  * SEE ALSO
@@ -569,7 +569,7 @@ void silc_log_reset_all();
  *
  * SYNOPSIS
  *
- *    void silc_log_output_debug(char *file, char *function,
+ *    void silc_log_output_debug(char *file, const char *function,
  *                               int line, char *string);
  *
  * DESCRIPTION
@@ -581,7 +581,7 @@ void silc_log_reset_all();
  *    dynamic allocated (null-terminated) buffer.
  *
  ***/
-void silc_log_output_debug(char *file, char *function,
+void silc_log_output_debug(char *file, const char *function,
                           int line, char *string);
 
 /****f* silcutil/SilcLogAPI/silc_log_output_hexdump
@@ -602,7 +602,7 @@ void silc_log_output_debug(char *file, char *function,
  *    `string' must be a dynamic allocated (null-terminated) buffer.
  *
  ***/
-void silc_log_output_hexdump(char *file, char *function,
+void silc_log_output_hexdump(char *file, const char *function,
                             int line, void *data_in,
                             SilcUInt32 len, char *string);