Clang is a bit picky about this.
xbt_dictelm_t current, previous = NULL;
xbt_assert(dict);
- XBT_DEBUG("ADD %.*s hash = %u, size = %d, & = %u", key_len, key, hash_code,
- dict->table_size, hash_code & dict->table_size);
+ XBT_CDEBUG(xbt_dict,
+ "ADD %.*s hash = %u, size = %d, & = %u", key_len, key, hash_code,
+ dict->table_size, hash_code & dict->table_size);
current = dict->table[hash_code & dict->table_size];
while (current != NULL &&
(hash_code != current->hash_code || key_len != current->key_len
previous->next = current;
}
} else {
- XBT_DEBUG("Replace %.*s by %.*s under key %.*s",
- key_len, (char *) current->content,
- key_len, (char *) data, key_len, (char *) key);
+ XBT_CDEBUG(xbt_dict, "Replace %.*s by %.*s under key %.*s",
+ key_len, (char *) current->content,
+ key_len, (char *) data, key_len, (char *) key);
/* there is already an element with the same key: overwrite it */
xbt_dictelm_set_data(dict, current, data, free_ctn);
}
XBT_INLINE void xbt_dict_cursor_first(const xbt_dict_t dict,
xbt_dict_cursor_t * cursor)
{
- XBT_DEBUG("xbt_dict_cursor_first");
+ XBT_CDEBUG(xbt_dict_cursor, "xbt_dict_cursor_first");
if (!*cursor) {
- XBT_DEBUG("Create the cursor on first use");
+ XBT_CDEBUG(xbt_dict_cursor, "Create the cursor on first use");
*cursor = xbt_dict_cursor_new(dict);
} else {
xbt_dict_cursor_rewind(*cursor);
xbt_dictelm_t current;
int line;
- XBT_DEBUG("xbt_dict_cursor_step");
+ XBT_CDEBUG(xbt_dict_cursor, "xbt_dict_cursor_step");
xbt_assert(cursor);
current = cursor->current;
if (cursor->dict != NULL) {
if (current != NULL) {
- XBT_DEBUG("current is not null, take the next element");
+ XBT_CDEBUG(xbt_dict_cursor, "current is not null, take the next element");
current = current->next;
- XBT_DEBUG("next element: %p", current);
+ XBT_CDEBUG(xbt_dict_cursor, "next element: %p", current);
}
while (current == NULL && ++line <= cursor->dict->table_size) {
- XBT_DEBUG("current is NULL, take the next line");
+ XBT_CDEBUG(xbt_dict_cursor, "current is NULL, take the next line");
current = cursor->dict->table[line];
- XBT_DEBUG("element in the next line: %p", current);
+ XBT_CDEBUG(xbt_dict_cursor, "element in the next line: %p", current);
}
- XBT_DEBUG("search finished, current = %p, line = %d", current, line);
+ XBT_CDEBUG(xbt_dict_cursor, "search finished, current = %p, line = %d", current, line);
cursor->current = current;
cursor->line = line;
xbt_dictelm_t current;
- XBT_DEBUG("xbt_dict_get_or_free");
+ XBT_CDEBUG(xbt_dict_cursor, "xbt_dict_get_or_free");
if (!cursor || !(*cursor))
{
_sanity_check_dynar(dynar);
- XBT_DEBUG("Reset the dynar %p", (void *) dynar);
+ XBT_CDEBUG(xbt_dyn, "Reset the dynar %p", (void *) dynar);
if (dynar->free_f) {
xbt_dynar_map(dynar, dynar->free_f);
}
XBT_INLINE void *xbt_dynar_pop_ptr(xbt_dynar_t const dynar)
{
_check_populated_dynar(dynar);
- XBT_DEBUG("Pop %p", (void *) dynar);
+ XBT_CDEBUG(xbt_dyn, "Pop %p", (void *) dynar);
dynar->used--;
return _xbt_dynar_elm(dynar, dynar->used);
}
{
/* sanity checks done by remove_at */
- XBT_DEBUG("Pop %p", (void *) dynar);
+ XBT_CDEBUG(xbt_dyn, "Pop %p", (void *) dynar);
xbt_dynar_remove_at(dynar, dynar->used - 1, dst);
}
*/
XBT_INLINE xbt_fifo_item_t xbt_fifo_newitem(void)
{
- XBT_WARN("This function is deprecated. Use xbt_fifo_new_item.");
+ XBT_CWARN(xbt_fifo, "This function is deprecated. Use xbt_fifo_new_item.");
return xbt_fifo_new_item();
}
*/
XBT_INLINE void xbt_fifo_freeitem(xbt_fifo_item_t b)
{
- XBT_WARN("This function is deprecated. Use xbt_fifo_free_item.");
+ XBT_CWARN(xbt_fifo, "This function is deprecated. Use xbt_fifo_free_item.");
xbt_fifo_free_item(b);
return;
}
*/
XBT_INLINE xbt_fifo_item_t xbt_fifo_getFirstItem(xbt_fifo_t l)
{
- XBT_WARN("This function is deprecated. Use xbt_fifo_get_first_item.");
+ XBT_CWARN(xbt_fifo, "This function is deprecated. Use xbt_fifo_get_first_item.");
return xbt_fifo_get_first_item(l);
}
*/
xbt_fifo_item_t xbt_fifo_getNextItem(xbt_fifo_item_t i)
{
- XBT_WARN("This function is deprecated. Use xbt_fifo_get_next_item.");
+ XBT_CWARN(xbt_fifo, "This function is deprecated. Use xbt_fifo_get_next_item.");
return xbt_fifo_get_next_item(i);
}