X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2ad573f350bbd776b75a73e9ed5877316d123677..5b951901da126d9e91ac4a8685f69043baf9ff8a:/src/xbt/dict.c diff --git a/src/xbt/dict.c b/src/xbt/dict.c index 9533beb564..649091bb68 100644 --- a/src/xbt/dict.c +++ b/src/xbt/dict.c @@ -490,11 +490,17 @@ int xbt_dict_length(xbt_dict_t dict) { return dict->count; } +/** @brief function to be used in xbt_dict_dump as long as the stored values are strings */ +void xbt_dict_dump_output_string(void *s) { + fputs(s,stdout); +} + + /** * \brief Outputs the content of the structure (debugging purpose) * * \param dict the exibitionist - * \param output a function to dump each data in the tree + * \param output a function to dump each data in the tree (check @ref xbt_dict_dump_output_string) * * Outputs the content of the structure. (for debugging purpose). \a output is a * function to output the data. If NULL, data won't be displayed. @@ -511,11 +517,11 @@ void xbt_dict_dump(xbt_dict_t dict, if (element) { printf("[\n"); while (element != NULL) { - printf(" %s -> ", element->key); + printf(" %s -> '", element->key); if (output != NULL) { (*output)(element->content); } - printf("\n"); + printf("'\n"); element = element->next; } printf("]\n");