From ed1010b25ce6884a63fd32f41769c479d93206fd Mon Sep 17 00:00:00 2001 From: Christos Zoulas Date: Thu, 25 Oct 2007 15:33:17 +0000 Subject: [PATCH] nuke the --with and -no filename options. Leave the brief option like before. --- src/file.c | 18 ++++++------------ src/file_opts.h | 9 +-------- 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/src/file.c b/src/file.c index 39c1ec48..eb2ad4a2 100644 --- a/src/file.c +++ b/src/file.c @@ -71,7 +71,7 @@ #include "patchlevel.h" #ifndef lint -FILE_RCSID("@(#)$File: file.c,v 1.111 2007/05/08 14:44:18 christos Exp $") +FILE_RCSID("@(#)$File: file.c,v 1.114 2007/10/23 21:26:56 christos Exp $") #endif /* lint */ @@ -206,16 +206,10 @@ main(int argc, char *argv[]) case 0: help(); break; - case 5: - bflag++; - break; - case 6: - bflag = 0; - break; - case 12: + case 10: flags |= MAGIC_MIME_TYPE; break; - case 13: + case 11: flags |= MAGIC_MIME_ENCODING; break; } @@ -345,10 +339,10 @@ main(int argc, char *argv[]) wid = nw; } /* - * If bflag is only set once, set it depending on - * number of files + * If bflag is only set twice, set it depending on + * number of files [this is undocumented, and subject to change] */ - if (bflag == 1) { + if (bflag == 2) { bflag = optind >= argc - 1; } for (; optind < argc; optind++) diff --git a/src/file_opts.h b/src/file_opts.h index 7f377a41..eacb10f1 100644 --- a/src/file_opts.h +++ b/src/file_opts.h @@ -17,14 +17,7 @@ OPT('v', "version", 0, " output version information and exit\n") OPT('m', "magic-file", 1, " LIST use LIST as a colon-separated list of magic\n" " number files\n") OPT('z', "uncompress", 0, " try to look inside compressed files\n") -OPT('b', "brief", 0, " do not prepend filenames to output lines\n" - " If this flag is specified once, then\n" - " the filename is printed if more than one\n" - " files are tested. If this flag is specified\n" - " more than once, then filenames are never printed\n") -OPT_LONGONLY("no-filename", 0, " synonym for --brief\n") -OPT_LONGONLY("with-filename", 0, " print the file name for each match. This is\n" - " the default.\n") +OPT('b', "brief", 0, " do not prepend filenames to output lines\n") OPT('c', "checking-printout", 0, " print the parsed form of the magic file, use in\n" " conjunction with -m to debug a new magic file\n" " before installing it\n") -- 2.40.0