-/** @brief Remove the provided \e val peer value from a variable
- *
- * \arg cfg the config set
- * \arg name the name of the variable
- * \arg peer the peername
- * \arg port the port number
- */
-
-void
-xbt_cfg_rm_peer(xbt_cfg_t cfg, const char *name, const char *peer,
- int port)
-{
- xbt_cfgelm_t variable;
- unsigned int cpt;
- xbt_peer_t seen;
-
- variable = xbt_cfgelm_get(cfg, name, xbt_cfgelm_peer);
-
- if (xbt_dynar_length(variable->content) == variable->min)
- THROWF(mismatch_error, 0,
- "Cannot remove value %s:%d from the config element %s since it's already at its minimal size (=%d)",
- peer, port, name, variable->min);
-
- xbt_dynar_foreach(variable->content, cpt, seen) {
- if (!strcpy(seen->name, peer) && seen->port == port) {
- if (variable->cb_rm)
- (*variable->cb_rm) (name, cpt);
- xbt_dynar_cursor_rm(variable->content, &cpt);
- return;
- }
- }
-
- THROWF(not_found_error, 0,
- "Can't remove the value %s:%d of config element %s: value not found.",
- peer, port, name);
-}
-
-/** @brief Remove the \e pos th value from the provided variable */
-
-void xbt_cfg_rm_at(xbt_cfg_t cfg, const char *name, int pos)
-{
-
- xbt_cfgelm_t variable;
-
- variable = xbt_cfgelm_get(cfg, name, xbt_cfgelm_any);
-
- if (xbt_dynar_length(variable->content) == variable->min)
- THROWF(mismatch_error, 0,
- "Cannot remove %dth value from the config element %s since it's already at its minimal size (=%d)",
- pos, name, variable->min);
-
- if (variable->cb_rm)
- (*variable->cb_rm) (name, pos);
- xbt_dynar_remove_at(variable->content, pos, NULL);