Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
start converting option names to kebab-case
[simgrid.git] / src / simgrid / sg_config.cpp
index 4b2253d..f188ea5 100644 (file)
@@ -323,9 +323,11 @@ static void _sg_cfg_cb__test_sleep(const char *name){
 /* callback of the inclusion path */
 static void _sg_cfg_cb__surf_path(const char *name)
 {
-  char *path = xbt_strdup(xbt_cfg_get_string(name));
-  if (path[0]) // ignore ""
+  char *path = xbt_cfg_get_string(name);
+  if (path[0]) {// ignore ""
+    path = xbt_strdup(path);
     xbt_dynar_push(surf_path, &path);
+  }
 }
 
 /* callback to decide if we want to use the model-checking */
@@ -430,9 +432,7 @@ static void describe_model(char *result,
             model_description[0].name ? model_description[0].name : "n/a");
   for (int i = 1; model_description[i].name; i++)
     p += sprintf(p, ", %s", model_description[i].name);
-  sprintf(p,
-      ".\n       (use 'help' as a value to see the long description of each %s)",
-          name);
+  sprintf(p, ".\n       (use 'help' as a value to see the long description of each %s)", name);
 }
 
 /* create the config set, register what should be and parse the command line*/
@@ -504,8 +504,7 @@ void sg_config_init(int *argc, char **argv)
         "Specify the amount of steps between checkpoints during stateful model-checking (default: 0 => stateless verification). "
         "If value=1, one checkpoint is saved for each step => faster verification, but huge memory consumption; higher values are good compromises between speed and memory consumption.");
 
-    xbt_cfg_register_boolean("model-check/sparse_checkpoint", "no", _mc_cfg_cb_sparse_checkpoint, "Use sparse per-page snapshots.");
-    xbt_cfg_register_boolean("model-check/soft-dirty", "no", _mc_cfg_cb_soft_dirty, "Use sparse per-page snapshots.");
+    xbt_cfg_register_boolean("model-check/sparse-checkpoint", "no", _mc_cfg_cb_sparse_checkpoint, "Use sparse per-page snapshots.");
     xbt_cfg_register_boolean("model-check/ksm", "no", _mc_cfg_cb_ksm, "Kernel same-page merging");
 
     xbt_cfg_register_string("model-check/property","", _mc_cfg_cb_property,
@@ -539,9 +538,7 @@ void sg_config_init(int *argc, char **argv)
     const char *dflt_ctx_fact = "thread";
     {
       char *p = description +
-        sprintf(description,
-                "Context factory to use in SIMIX. Possible values: %s",
-                dflt_ctx_fact);
+        sprintf(description, "Context factory to use in SIMIX. Possible values: %s", dflt_ctx_fact);
 #if HAVE_UCONTEXT_CONTEXTS
       dflt_ctx_fact = "ucontext";
       p += sprintf(p, ", %s", dflt_ctx_fact);
@@ -671,29 +668,3 @@ void sg_config_finalize(void)
   xbt_cfg_free(&simgrid_config);
   _sg_cfg_init_status = 0;
 }
-
-int sg_cfg_is_default_value(const char *name)
-{
-  return xbt_cfg_is_default_value(name);
-}
-
-int sg_cfg_get_int(const char* name)
-{
-  return xbt_cfg_get_int(name);
-}
-
-double sg_cfg_get_double(const char* name)
-{
-  return xbt_cfg_get_double(name);
-}
-
-char* sg_cfg_get_string(const char* name)
-{
-  return xbt_cfg_get_string(name);
-}
-
-int sg_cfg_get_boolean(const char* name)
-{
-  return xbt_cfg_get_boolean(name);
-}
-