From 108a0529d69d25b1f596eff76b5aa73e67036de8 Mon Sep 17 00:00:00 2001 From: Reuben Thomas Date: Mon, 20 Sep 2010 21:00:44 +0000 Subject: [PATCH] Print normal separator too when NUL separator used, as per man page. (Patch from Fedora.) --- src/file.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/file.c b/src/file.c index 3fbef87e..1c5595d9 100644 --- a/src/file.c +++ b/src/file.c @@ -32,7 +32,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: file.c,v 1.136 2009/12/06 23:18:04 rrt Exp $") +FILE_RCSID("@(#)$File: file.c,v 1.137 2010/09/20 14:14:49 christos Exp $") #endif /* lint */ #include "magic.h" @@ -422,9 +422,8 @@ process(struct magic_set *ms, const char *inname, int wid) if (wid > 0 && !bflag) { (void)printf("%s", std_in ? "/dev/stdin" : inname); if (nulsep) - (void)putc('\0', stdout); - else - (void)printf("%s", separator); + (void)putc('\0', stdout); + (void)printf("%s", separator); (void)printf("%*s ", (int) (nopad ? 0 : (wid - file_mbswidth(inname))), ""); } -- 2.40.0