mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-07 06:43:00 +03:00
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.
This commit is contained in:
@@ -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 <drepper@cygnus.com>, 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 : "");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user