Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add (too?) simple test for privatization.
[simgrid.git] / src / xbt / log.c
index 4b359d9..9e3da3c 100644 (file)
@@ -41,7 +41,9 @@ typedef struct {
   e_xbt_log_priority_t thresh;
   int additivity;
   xbt_log_appender_t appender;
-} s_xbt_log_setting_t, *xbt_log_setting_t;
+} s_xbt_log_setting_t;
+
+typedef s_xbt_log_setting_t* xbt_log_setting_t;
 
 static xbt_dynar_t xbt_log_settings = NULL;
 
@@ -109,7 +111,6 @@ static void xbt_log_connect_categories(void)
   XBT_LOG_CONNECT(xbt_ex);
   XBT_LOG_CONNECT(xbt_backtrace);
   XBT_LOG_CONNECT(xbt_exception);
-  XBT_LOG_CONNECT(xbt_fifo);
   XBT_LOG_CONNECT(xbt_graph);
   XBT_LOG_CONNECT(xbt_heap);
   XBT_LOG_CONNECT(xbt_lib);
@@ -601,13 +602,12 @@ static xbt_log_setting_t _xbt_log_parse_setting(const char *control_string)
 
   control_string += strspn(control_string, " ");
   const char *name = control_string;
-  control_string += strcspn(control_string, ".= ");
+  control_string += strcspn(control_string, ".:= ");
   const char *dot = control_string;
   control_string += strcspn(control_string, ":= ");
   const char *eq = control_string;
 
-  if(*dot != '.' && (*eq == '=' || *eq == ':'))
-    xbt_die ("Invalid control string '%s'", orig_control_string);
+  xbt_assert(*dot == '.' || (*eq != '=' && *eq != ':'), "Invalid control string '%s'", orig_control_string);
 
   if (!strncmp(dot + 1, "threshold", (size_t) (eq - dot - 1))) {
     int i;
@@ -677,7 +677,7 @@ static xbt_log_setting_t _xbt_log_parse_setting(const char *control_string)
   } else {
     char buff[512];
     snprintf(buff, MIN(512, eq - dot), "%s", dot + 1);
-    THROWF(arg_error, 0, "Unknown setting of the log category: '%s'", buff);
+    xbt_die("Unknown setting of the log category: '%s'", buff);
   }
   set->catname = (char *) xbt_malloc(dot - name + 1);