]> granicus.if.org Git - file/commitdiff
help and version output to stdout
authorChristos Zoulas <christos@zoulas.com>
Thu, 3 Feb 2011 01:54:43 +0000 (01:54 +0000)
committerChristos Zoulas <christos@zoulas.com>
Thu, 3 Feb 2011 01:54:43 +0000 (01:54 +0000)
ChangeLog
src/file.c

index 42166050d630d14550a8b964cf7df556201f2177..a35a2608afcf3866edd09a4e06922fa48eef0c81 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2011-02-02  20:40  Christos Zoulas <christos@zoulas.com>
 
+       * help and version output to stdout.
+
        * When matching softmagic for ascii files, don't just print
          the softmagic classification, keep going and print the
          text classification too. This fixes broken troff files when
index 85d26c1526bd0061ddeaf33f915a1baf679d17e7..3518b0ae51d87dffc25a1a82352195f2f1e558f8 100644 (file)
@@ -32,7 +32,7 @@
 #include "file.h"
 
 #ifndef        lint
-FILE_RCSID("@(#)$File: file.c,v 1.139 2010/10/08 22:03:57 christos Exp $")
+FILE_RCSID("@(#)$File: file.c,v 1.140 2010/11/30 14:58:53 rrt Exp $")
 #endif /* lint */
 
 #include "magic.h"
@@ -255,9 +255,9 @@ main(int argc, char *argv[])
                case 'v':
                        if (magicfile == NULL)
                                magicfile = magic_getpath(magicfile, action);
-                       (void)fprintf(stderr, "%s-%d.%.2d\n", progname,
+                       (void)fprintf(stdout, "%s-%d.%.2d\n", progname,
                                       FILE_VERSION_MAJOR, patchlevel);
-                       (void)fprintf(stderr, "magic file from %s\n",
+                       (void)fprintf(stdout, "magic file from %s\n",
                                       magicfile);
                        return 1;
                case 'z':
@@ -486,11 +486,11 @@ help(void)
        (void)fputs(
 "Usage: file [OPTION...] [FILE...]\n"
 "Determine type of FILEs.\n"
-"\n", stderr);
+"\n", stdout);
 #define OPT(shortname, longname, opt, doc)      \
-       fprintf(stderr, "  -%c, --" longname doc, shortname);
+       fprintf(stdout, "  -%c, --" longname doc, shortname);
 #define OPT_LONGONLY(longname, opt, doc)        \
-       fprintf(stderr, "      --" longname doc);
+       fprintf(stdout, "      --" longname doc);
 #include "file_opts.h"
 #undef OPT
 #undef OPT_LONGONLY