]> granicus.if.org Git - file/commitdiff
nuke the --with and -no filename options. Leave the brief option like before.
authorChristos Zoulas <christos@zoulas.com>
Thu, 25 Oct 2007 15:33:17 +0000 (15:33 +0000)
committerChristos Zoulas <christos@zoulas.com>
Thu, 25 Oct 2007 15:33:17 +0000 (15:33 +0000)
src/file.c
src/file_opts.h

index 39c1ec487695a4d90876a1df0693c3f07052d5ad..eb2ad4a261096c9386f0ec1bdcac8d68ba7bf520 100644 (file)
@@ -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++)
index 7f377a41af8e95063f209c8b0829eb7fd0cfa135..eacb10f1febd80d425b7b9011d906dc9cb144003 100644 (file)
@@ -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")