/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "dict_private.h"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_dict_multi, xbt_dict,
#include "dict_private.h"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_dict_multi, xbt_dict,
- DEBUG2("xbt_multidict_set(%p,%d)", mdict, keys_len);
+ XBT_DEBUG("xbt_multidict_set(%p,%d)", mdict, keys_len);
- for (i = 0, thislevel = mdict; i < keys_len - 1; i++, thislevel = nextlevel) {
+ for (i = 0, thislevel = mdict; i < keys_len - 1;
+ i++, thislevel = nextlevel) {
xbt_dynar_get_cpy(keys, i, &thiskey);
xbt_dynar_get_cpy(lens, i, &thislen);
xbt_dynar_get_cpy(keys, i, &thiskey);
xbt_dynar_get_cpy(lens, i, &thislen);
- DEBUG5("multi_set: at level %d, len=%ld, key=%p |%*s|", i, thislen,
+ XBT_DEBUG("multi_set: at level %d, len=%ld, key=%p |%*s|", i, thislen,
thiskey, (int) thislen, thiskey);
/* search the dict of next level */
thiskey, (int) thislen, thiskey);
/* search the dict of next level */
- VERB1("Create a dict (%p)", nextlevel);
- xbt_dict_set_ext(thislevel, thiskey, thislen, nextlevel, &_free_dict);
+ XBT_VERB("Create a dict (%p)", nextlevel);
+ xbt_dict_set_ext(thislevel, thiskey, thislen, nextlevel,
+ &_free_dict);
for (i = 0; i < xbt_dynar_length(keys); i++) {
char *thiskey = xbt_dynar_get_as(keys, i, char *);
unsigned long int thislen = (unsigned long int) strlen(thiskey);
for (i = 0; i < xbt_dynar_length(keys); i++) {
char *thiskey = xbt_dynar_get_as(keys, i, char *);
unsigned long int thislen = (unsigned long int) strlen(thiskey);
xbt_dynar_push(lens, &thislen);
}
TRY {
xbt_multidict_set_ext(mdict, keys, lens, data, free_ctn);
xbt_dynar_push(lens, &thislen);
}
TRY {
xbt_multidict_set_ext(mdict, keys, lens, data, free_ctn);
- DEBUG2("xbt_multidict_get(%p, %ld)", mdict, xbt_dynar_length(keys));
+ XBT_DEBUG("xbt_multidict_get(%p, %ld)", mdict, xbt_dynar_length(keys));
- for (i = 0, thislevel = mdict; i < keys_len - 1; i++, thislevel = nextlevel) {
+ for (i = 0, thislevel = mdict; i < keys_len - 1;
+ i++, thislevel = nextlevel) {
xbt_dynar_get_cpy(keys, i, &thiskey);
xbt_dynar_get_cpy(lens, i, &thislen);
xbt_dynar_get_cpy(keys, i, &thiskey);
xbt_dynar_get_cpy(lens, i, &thislen);
- DEBUG6("multi_get: at level %d (%p), len=%ld, key=%p |%*s|",
+ XBT_DEBUG("multi_get: at level %d (%p), len=%ld, key=%p |%*s|",
i, thislevel, thislen, thiskey, (int) thislen, thiskey);
/* search the dict of next level: let mismatch raise if not found */
i, thislevel, thislen, thiskey, (int) thislen, thiskey);
/* search the dict of next level: let mismatch raise if not found */
- for (i = 0, thislevel = mdict; i < keys_len - 1; i++, thislevel = nextlevel) {
+ for (i = 0, thislevel = mdict; i < keys_len - 1;
+ i++, thislevel = nextlevel) {
xbt_dynar_get_cpy(keys, i, &thiskey);
xbt_dynar_get_cpy(lens, i, &thislen);
xbt_dynar_get_cpy(keys, i, &thiskey);
xbt_dynar_get_cpy(lens, i, &thislen);