Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Please sonar: use typedefs s_xbt_log_*_t.
[simgrid.git] / include / xbt / log.h
index 5c4c61a..b518d99 100644 (file)
@@ -28,9 +28,9 @@
 #ifndef XBT_LOG_H
 #define XBT_LOG_H
 
-#include "xbt/misc.h"
 #include <stdarg.h>
-#include <stddef.h>             /* NULL */
+#include <stddef.h> /* NULL */
+#include <xbt/misc.h>
 SG_BEGIN_DECL()
 /**\brief Log priorities
  * \ingroup XBT_log
@@ -112,8 +112,7 @@ typedef enum {
     }                                                                                                                  \
   }                                                                                                                    \
   SG_END_DECL()                                                                                                        \
-  XBT_EXPORT_NO_IMPORT(s_xbt_log_category_t)                                                                           \
-  _XBT_LOGV(catName) = {                                                                                               \
+  XBT_EXPORT_NO_IMPORT s_xbt_log_category_t _XBT_LOGV(catName) = {                                                     \
       &_XBT_LOGV(parent),                                                                                              \
       NULL /* firstChild */,                                                                                           \
       NULL /* nextSibling */,                                                                                          \
@@ -222,13 +221,13 @@ XBT_PUBLIC void xbt_log_control_set(const char* cs);
 
 /* Forward declarations */
 typedef struct xbt_log_appender_s  s_xbt_log_appender_t;
-typedef struct xbt_log_appender_s* xbt_log_appender_t;
+typedef s_xbt_log_appender_t* xbt_log_appender_t;
 typedef struct xbt_log_layout_s  s_xbt_log_layout_t;
-typedef struct xbt_log_layout_s* xbt_log_layout_t;
+typedef s_xbt_log_layout_t* xbt_log_layout_t;
 typedef struct xbt_log_event_s  s_xbt_log_event_t;
-typedef struct xbt_log_event_s* xbt_log_event_t;
+typedef s_xbt_log_event_t* xbt_log_event_t;
 typedef struct xbt_log_category_s  s_xbt_log_category_t;
-typedef struct xbt_log_category_s* xbt_log_category_t;
+typedef s_xbt_log_category_t* xbt_log_category_t;
 
 /* Do NOT access any members of this structure directly. FIXME: move to private? */
 
@@ -310,7 +309,7 @@ XBT_PUBLIC void _xbt_log_event_log(xbt_log_event_t ev, const char* fmt, ...) XBT
 XBT_PUBLIC int _xbt_log_cat_init(xbt_log_category_t category, e_xbt_log_priority_t priority);
 
 #ifdef DLL_EXPORT
-XBT_PUBLIC_DATA(s_xbt_log_category_t) _XBT_LOGV(XBT_LOG_ROOT_CAT);
+XBT_PUBLIC_DATA s_xbt_log_category_t _XBT_LOGV(XBT_LOG_ROOT_CAT);
 #else
 // If we `dllexport` the root log category, MinGW does not want us to take its address with the error:
 // > initializer element is not constant