From 9f6c1fc4947e0b6d007cff159166bc0373386c61 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 27 Oct 2000 23:37:52 +0000 Subject: Update. * stdlib/fmtmsg.c (fmtmsg): Change output format slightly to make it look better and bring it closer to SysV behavior. * stdlib/Makefile (distribute): Add tst-fmtmsg.sh. (test-srcs): Add tst-fmtmsg. (tests): Add $(objpfx)tst-fmtmsg.out. Add rule to generate it. * stdlib/tst-fmtmsg.sh: New file. * stdlib/tst-fmtmsg.c: New file. --- stdlib/fmtmsg.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'stdlib/fmtmsg.c') diff --git a/stdlib/fmtmsg.c b/stdlib/fmtmsg.c index 126132d859..1c9e4298cd 100644 --- a/stdlib/fmtmsg.c +++ b/stdlib/fmtmsg.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -145,15 +145,15 @@ fmtmsg (long int classification, const char *label, int severity, if (fprintf (stderr, "%s%s%s%s%s%s%s%s%s%s\n", do_label ? label : "", - do_label && (do_severity | do_text) ? ": " : "", + do_label && (do_severity | do_text | do_action | do_tag) + ? ": " : "", do_severity ? severity_rec->string : "", - do_severity && do_text ? ": " : "", + do_severity && (do_text | do_action | do_tag) ? ": " : "", do_text ? text : "", - (do_label | do_severity | do_text) && (do_action | do_tag) - ? "\n" : "", + do_text && (do_action | do_tag) ? "\n" : "", do_action ? "TO FIX: " : "", do_action ? action : "", - do_action && do_tag ? " " : "", + do_action && do_tag ? " " : "", do_tag ? tag : "") == EOF) /* Oh, oh. An error occurred during the output. */ result = MM_NOMSG; @@ -169,15 +169,15 @@ fmtmsg (long int classification, const char *label, int severity, syslog (LOG_ERR, "%s%s%s%s%s%s%s%s%s%s\n", do_label ? label : "", - do_label && (do_severity | do_text) ? ": " : "", + do_label && (do_severity | do_text | do_action | do_tag) + ? ": " : "", do_severity ? severity_rec->string : "", - do_severity && do_text ? ": " : "", + do_severity && (do_text | do_action | do_tag) ? ": " : "", do_text ? text : "", - (do_label | do_severity | do_text) && (do_action | do_tag) - ? "\n" : "", + do_text && (do_action | do_tag) ? "\n" : "", do_action ? "TO FIX: " : "", do_action ? action : "", - do_action && do_tag ? " " : "", + do_action && do_tag ? " " : "", do_tag ? tag : ""); } -- cgit 1.4.1