diff options
author | Jim Meyering <jim@meyering.net> | 1996-06-25 03:41:29 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1996-06-25 03:41:29 +0000 |
commit | 408a47499efb5da42c1c3ac829f6e9e73284e9ea (patch) | |
tree | ca6c59f0058a4291f742d9f4afc6dd3c3da9c8fc /src | |
parent | 30a65b1aa3be4392af839bf436d163943e2ebeb4 (diff) | |
download | coreutils-408a47499efb5da42c1c3ac829f6e9e73284e9ea.tar.xz |
(dc_parse_stream): Remove spurious newline in error message.
(dc_parse_file): Remove erroneous test of ERR.
Diffstat (limited to 'src')
-rw-r--r-- | src/dircolors.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/dircolors.c b/src/dircolors.c index e4d538089..b2b409686 100644 --- a/src/dircolors.c +++ b/src/dircolors.c @@ -1,3 +1,4 @@ +/* FIXME: why no error for BERM? */ /* FIXME: dircolors - parse a Slackware-style DIR_COLORS file. Copyright (C) 1994, 1995 H. Peter Anvin Copyright (C) 1996 Free Software Foundation, Inc. @@ -325,7 +326,7 @@ dc_parse_stream (FILE *fp, const char *filename, char **result) } else { - error (0, 0, _("%s:%lu: unrecognized keyword %s\n"), + error (0, 0, _("%s:%lu: unrecognized keyword %s"), filename, (long unsigned) line_number, keywd); err = 1; } @@ -366,13 +367,6 @@ dc_parse_file (const char *filename, char **ls_color_string) } err = dc_parse_stream (fp, filename, ls_color_string); - if (err) - { - error (0, errno, "%s", filename); - if (fp != stdin) - fclose (fp); - return 1; - } if (fp != stdin && fclose (fp) == EOF) { @@ -380,7 +374,7 @@ dc_parse_file (const char *filename, char **ls_color_string) return 1; } - return 0; + return err; } int |