X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2f2cc25e16ad775ec3afc1984ac4e41398754113..39eaafd39429445bac3fb906bfde2714fc1dc848:/src/xbt/xbt_log_layout_format.c?ds=sidebyside diff --git a/src/xbt/xbt_log_layout_format.c b/src/xbt/xbt_log_layout_format.c index d09a2fe417..e19302c788 100644 --- a/src/xbt/xbt_log_layout_format.c +++ b/src/xbt/xbt_log_layout_format.c @@ -64,7 +64,11 @@ static double format_begin_of_time = -1; check_overflow(len); \ } else (void)0 -#define show_string(data) show_it(data, "s") +#define show_string(data) \ + if (1) { \ + const char *show_string_data = (data); \ + show_it(show_string_data ? show_string_data : "(null)", "s"); \ + } else (void)0 #define show_int(data) show_it(data, "d") #define show_double(data) show_it(data, "f") @@ -84,7 +88,8 @@ static int xbt_log_layout_format_doit(xbt_log_layout_t l, handle_modifier: switch (*q) { case '\0': - xbt_die("Layout format (%s) ending with %%\n", (char *)l->data); + fprintf(stderr, "Layout format (%s) ending with %%\n", (char *)l->data); + xbt_abort(); case '%': *p = '%'; check_overflow(1); @@ -192,7 +197,8 @@ static int xbt_log_layout_format_doit(xbt_log_layout_t l, break; } default: - xbt_die(ERRMSG, *q, (char *)l->data); + fprintf(stderr, ERRMSG, *q, (char *)l->data); + xbt_abort(); } } else { *p = *q;