Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
config: kill unused functions
authorMartin Quinson <martin.quinson@loria.fr>
Thu, 7 Apr 2016 06:38:32 +0000 (08:38 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Thu, 7 Apr 2016 06:38:38 +0000 (08:38 +0200)
include/xbt/config.h
src/include/simgrid/sg_config.h
src/simgrid/sg_config.cpp
src/xbt/config.c

index 2d0e359..cd805e2 100644 (file)
@@ -175,12 +175,6 @@ XBT_PUBLIC(int)    xbt_cfg_get_int(const char *name);
 XBT_PUBLIC(double) xbt_cfg_get_double(const char *name);
 XBT_PUBLIC(char *) xbt_cfg_get_string(const char *name);
 XBT_PUBLIC(int)    xbt_cfg_get_boolean(const char *name);
-XBT_PUBLIC(xbt_dynar_t) xbt_cfg_get_dynar(const char *name);
-
-XBT_PUBLIC(int) xbt_cfg_get_int_at(xbt_cfg_t cfg, const char *name, int pos);
-XBT_PUBLIC(double) xbt_cfg_get_double_at(xbt_cfg_t cfg, const char *name, int pos);
-XBT_PUBLIC(char *) xbt_cfg_get_string_at(xbt_cfg_t cfg, const char *name, int pos);
-XBT_PUBLIC(int) xbt_cfg_get_boolean_at(xbt_cfg_t cfg, const char *name, int pos);
 
 /** @} */
 
index 6f61086..70007cc 100644 (file)
@@ -17,7 +17,6 @@ XBT_PUBLIC(int) sg_cfg_get_int(const char* name);
 XBT_PUBLIC(double) sg_cfg_get_double(const char* name);
 XBT_PUBLIC(char*) sg_cfg_get_string(const char* name);
 XBT_PUBLIC(int) sg_cfg_get_boolean(const char* name);
-XBT_PUBLIC(xbt_dynar_t) sg_cfg_get_dynar(const char* name);
 
 XBT_PUBLIC(void) sg_config_init(int *argc, char **argv);
 XBT_PUBLIC(void) sg_config_finalize(void);
index 4bee5be..b69dd5f 100644 (file)
@@ -344,7 +344,7 @@ static void _sg_cfg_cb__test_sleep(const char *name, int pos){
 /* callback of the inclusion path */
 static void _sg_cfg_cb__surf_path(const char *name, int pos)
 {
-  char *path = xbt_strdup(xbt_cfg_get_string_at(simgrid_config, name, pos));
+  char *path = xbt_strdup(xbt_cfg_get_string(name));
   if (path[0]) // ignore ""
     xbt_dynar_push(surf_path, &path);
 }
@@ -734,7 +734,3 @@ int sg_cfg_get_boolean(const char* name)
   return xbt_cfg_get_boolean(name);
 }
 
-xbt_dynar_t sg_cfg_get_dynar(const char* name)
-{
-  return xbt_cfg_get_dynar(name);
-}
index c13411c..488ba63 100644 (file)
@@ -865,61 +865,6 @@ int xbt_cfg_get_boolean(const char *name)
   return xbt_dynar_get_as(variable->content, 0, int);
 }
 
-/** @brief Retrieve the dynar of all the values stored in a variable
- *
- * @param cfg where to search in
- * @param name what to search for
- *
- * Get the data stored in the config set.
- *
- * \warning the returned value is the actual content of the config set
- */
-xbt_dynar_t xbt_cfg_get_dynar(const char *name)
-{
-  xbt_cfgelm_t variable = NULL;
-  xbt_ex_t e;
-
-  TRY {
-    variable = xbt_dict_get((xbt_dict_t) simgrid_config, name);
-  } CATCH(e) {
-    if (e.category == not_found_error) {
-      xbt_ex_free(e);
-      THROWF(not_found_error, 0, "No registered variable %s in this config set", name);
-    }
-    RETHROW;
-  }
-
-  return variable->content;
-}
-
-/** @brief Retrieve one of the integer value of a variable */
-int xbt_cfg_get_int_at(xbt_cfg_t cfg, const char *name, int pos)
-{
-  xbt_cfgelm_t variable = xbt_cfgelm_get(cfg, name, xbt_cfgelm_int);
-  return xbt_dynar_get_as(variable->content, pos, int);
-}
-
-/** @brief Retrieve one of the double value of a variable */
-double xbt_cfg_get_double_at(xbt_cfg_t cfg, const char *name, int pos)
-{
-  xbt_cfgelm_t variable = xbt_cfgelm_get(cfg, name, xbt_cfgelm_double);
-  return xbt_dynar_get_as(variable->content, pos, double);
-}
-
-/** @brief Retrieve one of the string value of a variable */
-char *xbt_cfg_get_string_at(xbt_cfg_t cfg, const char *name, int pos)
-{
-  xbt_cfgelm_t variable = xbt_cfgelm_get(cfg, name, xbt_cfgelm_string);
-  return xbt_dynar_get_as(variable->content, pos, char *);
-}
-
-/** @brief Retrieve one of the boolean value of a variable */
-int xbt_cfg_get_boolean_at(xbt_cfg_t cfg, const char *name, int pos)
-{
-  xbt_cfgelm_t variable = xbt_cfgelm_get(cfg, name, xbt_cfgelm_boolean);
-  return xbt_dynar_get_as(variable->content, pos, int);
-}
-
 #ifdef SIMGRID_TEST
 #include "xbt.h"
 #include "xbt/ex.h"