case xbt_cfgelm_host:
str = va_arg(pa, char *);
i=va_arg(pa,int);
- TRY(xbt_cfg_set_host(cfg,name,str,i));
+ TRYOLD(xbt_cfg_set_host(cfg,name,str,i));
break;
case xbt_cfgelm_string:
str=va_arg(pa, char *);
- TRY(xbt_cfg_set_string(cfg, name, str));
+ TRYOLD(xbt_cfg_set_string(cfg, name, str));
break;
case xbt_cfgelm_int:
i=va_arg(pa,int);
- TRY(xbt_cfg_set_int(cfg,name,i));
+ TRYOLD(xbt_cfg_set_int(cfg,name,i));
break;
case xbt_cfgelm_double:
d=va_arg(pa,double);
- TRY(xbt_cfg_set_double(cfg,name,d));
+ TRYOLD(xbt_cfg_set_double(cfg,name,d));
break;
default:
xbt_error_t errcode;
VERB2("Configuration setting: %s=%d",name,val);
- TRY (xbt_cfgelm_get(cfg,name,xbt_cfgelm_int,&variable));
+ TRYOLD(xbt_cfgelm_get(cfg,name,xbt_cfgelm_int,&variable));
if (variable->max == 1) {
if (variable->cb_rm && xbt_dynar_length(variable->content))
xbt_error_t errcode;
VERB2("Configuration setting: %s=%f",name,val);
- TRY (xbt_cfgelm_get(cfg,name,xbt_cfgelm_double,&variable));
+ TRYOLD(xbt_cfgelm_get(cfg,name,xbt_cfgelm_double,&variable));
if (variable->max == 1) {
if (variable->cb_rm && xbt_dynar_length(variable->content))
char *newval = xbt_strdup(val);
VERB2("Configuration setting: %s=%s",name,val);
- TRY (xbt_cfgelm_get(cfg,name,xbt_cfgelm_string,&variable));
+ TRYOLD(xbt_cfgelm_get(cfg,name,xbt_cfgelm_string,&variable));
if (variable->max == 1) {
if (variable->cb_rm && xbt_dynar_length(variable->content))
val->name = xbt_strdup(name);
val->port = port;
- TRY (xbt_cfgelm_get(cfg,name,xbt_cfgelm_host,&variable));
+ TRYOLD(xbt_cfgelm_get(cfg,name,xbt_cfgelm_host,&variable));
if (variable->max == 1) {
if (variable->cb_rm && xbt_dynar_length(variable->content))
"Cannot remove value %d from the config element %s since it's already at its minimal size (=%d)",
val,name,variable->min);
- TRY (xbt_cfgelm_get(cfg,name,xbt_cfgelm_int,&variable));
+ TRYOLD(xbt_cfgelm_get(cfg,name,xbt_cfgelm_int,&variable));
xbt_dynar_foreach(variable->content,cpt,seen) {
if (seen == val) {
"Cannot remove value %f from the config element %s since it's already at its minimal size (=%d)",
val,name,variable->min);
- TRY (xbt_cfgelm_get(cfg,name,xbt_cfgelm_double,&variable));
+ TRYOLD(xbt_cfgelm_get(cfg,name,xbt_cfgelm_double,&variable));
xbt_dynar_foreach(variable->content,cpt,seen) {
if (seen == val) {
"Cannot remove value %s from the config element %s since it's already at its minimal size (=%d)",
name,val,variable->min);
- TRY (xbt_cfgelm_get(cfg,name,xbt_cfgelm_string,&variable));
+ TRYOLD(xbt_cfgelm_get(cfg,name,xbt_cfgelm_string,&variable));
xbt_dynar_foreach(variable->content,cpt,seen) {
if (!strcpy(seen,val)) {
"Cannot remove value %s:%d from the config element %s since it's already at its minimal size (=%d)",
host,port,name,variable->min);
- TRY (xbt_cfgelm_get(cfg,name,xbt_cfgelm_host,&variable));
+ TRYOLD(xbt_cfgelm_get(cfg,name,xbt_cfgelm_host,&variable));
xbt_dynar_foreach(variable->content,cpt,seen) {
if (!strcpy(seen->name,host) && seen->port == port) {
"Cannot remove %dth value from the config element %s since it's already at its minimal size (=%d)",
pos,name,variable->min);
- TRY (xbt_cfgelm_get(cfg,name,xbt_cfgelm_any,&variable));
+ TRYOLD(xbt_cfgelm_get(cfg,name,xbt_cfgelm_any,&variable));
if (variable->cb_rm) (*variable->cb_rm)(name, pos);
xbt_dynar_remove_at(variable->content, pos, NULL);
xbt_cfgelm_t variable;
xbt_error_t errcode;
- TRY (xbt_cfgelm_get(cfg,name,xbt_cfgelm_int,&variable));
+ TRYOLD(xbt_cfgelm_get(cfg,name,xbt_cfgelm_int,&variable));
if (xbt_dynar_length(variable->content) > 1) {
WARN2("You asked for the first value of the config element '%s', but there is %lu values",
xbt_cfgelm_t variable;
xbt_error_t errcode;
- TRY (xbt_cfgelm_get(cfg,name,xbt_cfgelm_double,&variable));
+ TRYOLD(xbt_cfgelm_get(cfg,name,xbt_cfgelm_double,&variable));
if (xbt_dynar_length(variable->content) > 1) {
WARN2("You asked for the first value of the config element '%s', but there is %lu values\n",
*val=NULL;
- TRY (xbt_cfgelm_get(cfg,name,xbt_cfgelm_string,&variable));
+ TRYOLD(xbt_cfgelm_get(cfg,name,xbt_cfgelm_string,&variable));
if (xbt_dynar_length(variable->content) > 1) {
WARN2("You asked for the first value of the config element '%s', but there is %lu values\n",
xbt_error_t errcode;
xbt_host_t *val;
- TRY (xbt_cfgelm_get(cfg,name,xbt_cfgelm_host,&variable));
+ TRYOLD(xbt_cfgelm_get(cfg,name,xbt_cfgelm_host,&variable));
if (xbt_dynar_length(variable->content) > 1) {
WARN2("You asked for the first value of the config element '%s', but there is %lu values\n",
xbt_cfgelm_t variable;
xbt_error_t errcode;
- TRY (xbt_cfgelm_get(cfg,name,xbt_cfgelm_int,&variable));
+ TRYOLD(xbt_cfgelm_get(cfg,name,xbt_cfgelm_int,&variable));
*val = xbt_dynar_get_as(variable->content, pos, int);
return no_error;
}
xbt_cfgelm_t variable;
xbt_error_t errcode;
- TRY (xbt_cfgelm_get(cfg,name,xbt_cfgelm_double,&variable));
+ TRYOLD(xbt_cfgelm_get(cfg,name,xbt_cfgelm_double,&variable));
*val = xbt_dynar_get_as(variable->content, pos, double);
return no_error;
}
xbt_cfgelm_t variable;
xbt_error_t errcode;
- TRY (xbt_cfgelm_get(cfg,name,xbt_cfgelm_string,&variable));
+ TRYOLD(xbt_cfgelm_get(cfg,name,xbt_cfgelm_string,&variable));
*val = xbt_dynar_get_as(variable->content, pos, char*);
return no_error;
}
xbt_error_t errcode;
xbt_host_t *val;
- TRY (xbt_cfgelm_get(cfg,name,xbt_cfgelm_int,&variable));
+ TRYOLD(xbt_cfgelm_get(cfg,name,xbt_cfgelm_int,&variable));
val = xbt_dynar_get_ptr(variable->content, pos);
*port = val->port;
*host = val->name;