From 57c9a67574a0563e784c152ee85666ece0c356ad Mon Sep 17 00:00:00 2001 From: Matthias Bolte Date: Mon, 15 Jun 2009 17:12:39 +0200 Subject: [PATCH] [misc] Fix relevant error marking, if the first error is the relevant one. Signed-off-by: Matthias Bolte --- misc/error.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/misc/error.c b/misc/error.c index 4514a6c..5256a02 100644 --- a/misc/error.c +++ b/misc/error.c @@ -299,6 +299,7 @@ void vsc_error_fprint (struct VscError *error, FILE *stream) { struct tm time_info; + struct VscError *relevant = NULL; VSC__ASSERT (error != NULL); VSC__ASSERT (error->occured); @@ -310,11 +311,13 @@ vsc_error_fprint (struct VscError *error, FILE *stream) localtime_r (&error->timestamp.tv_sec, &time_info); - fprintf (stream, "%02d:%02d:%02d.%03d %s:%d %s : Error [%s]", + relevant = vsc_error_get_relevant (error); + + fprintf (stream, "%02d:%02d:%02d.%03d %c %s:%d %s : Error [%s]", time_info.tm_hour, time_info.tm_min, time_info.tm_sec, - (int) error->timestamp.tv_usec / 1000, error->file, - error->line, error->function, - vsc_error_string (error->code)); + (int) error->timestamp.tv_usec / 1000, + relevant == error ? '>' : ' ', error->file, error->line, + error->function, vsc_error_string (error->code)); if (error->message != NULL) { fprintf (stream, " %s\n", error->message); -- 1.7.10.4