summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristos Zoulas <christos@zoulas.com>2007-10-25 15:33:17 +0000
committerChristos Zoulas <christos@zoulas.com>2007-10-25 15:33:17 +0000
commited1010b25ce6884a63fd32f41769c479d93206fd (patch)
treef5f86b071313e7250cb0351db93d4fbbd773dbf5
parent25f2e980610c11d35211aa22cdab19b24b86d51c (diff)
downloadfile-git-ed1010b25ce6884a63fd32f41769c479d93206fd.tar.gz
nuke the --with and -no filename options. Leave the brief option like before.
-rw-r--r--src/file.c18
-rw-r--r--src/file_opts.h9
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")