]> Dogcows Code - chaz/tar/blobdiff - src/tar.c
(decode_oflag): O_APPEND might not be defined.
[chaz/tar] / src / tar.c
index 998a21ae0cae67acb4efd119fd0eb0ffda1152f4..dfbeca8eb70f90a9e49b510537f4c2cad4060d9b 100644 (file)
--- a/src/tar.c
+++ b/src/tar.c
@@ -278,7 +278,13 @@ usage (int status)
 GNU `tar' saves many files together into a single tape or disk archive, and\n\
 can restore individual files from the archive.\n"),
             stdout);
-      printf (_("\nUsage: %s [OPTION]... [FILE]...\n"), program_name);
+      printf (_("\nUsage: %s [OPTION]... [FILE]...\n\
+\n\
+Examples:\n\
+  %s -cf archive.tar foo bar  # Create archive.tar from files foo and bar.\n\
+  %s -tvf archive.tar         # List all files in archive.tar verbosely.\n\
+  %s -xf archive.tar          # Extract all files from archive.tar.\n"),
+            program_name, program_name, program_name, program_name);
       fputs (_("\
 \n\
 If a long option shows an argument as mandatory, then it is mandatory\n\
@@ -417,10 +423,7 @@ Support for POSIX is only partially implemented, don't count on it yet.\n\
 ARCHIVE may be FILE, HOST:FILE or USER@HOST:FILE; and FILE may be a file\n\
 or a device.  *This* `tar' defaults to `-f%s -b%d'.\n"),
              DEFAULT_ARCHIVE, DEFAULT_BLOCKING);
-      fputs (_("\
-\n\
-Report bugs to <bug-tar@gnu.org>.\n"),
-              stdout);
+      fputs (_("\nReport bugs to <bug-tar@gnu.org>.\n"), stdout);
     }
   exit (status);
 }
@@ -725,7 +728,8 @@ decode_options (int argc, char *const *argv)
 
        newer_mtime_option = get_date (optarg, 0);
        if (newer_mtime_option == (time_t) -1)
-         USAGE_ERROR ((0, 0, _("Invalid date format `%s'"), optarg));
+         WARN ((0, 0, _("Substituting %s for unknown date format `%s'"),
+                tartime (newer_mtime_option), optarg));
 
        break;
 #endif /* not MSDOS */
@@ -1034,19 +1038,13 @@ decode_options (int argc, char *const *argv)
 
   if (show_version)
     {
-      printf ("tar (GNU %s) %s\n", PACKAGE, VERSION);
-      fputs (_("\
-\n\
-Copyright 1988, 92,93,94,95,96,97,98, 1999 Free Software Foundation, Inc.\n"),
-            stdout);
-      fputs (_("\
-This is free software; see the source for copying conditions.  There is NO\n\
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"),
-            stdout);
-      fputs (_("\
-\n\
-Written by John Gilmore and Jay Fenlason.\n"),
-            stdout);
+      printf ("tar (GNU %s) %s\n%s\n%s\n%s\n", PACKAGE, VERSION,
+             "Copyright 1999 Free Software Foundation, Inc.",
+             _("\
+This program comes with NO WARRANTY, to the extent permitted by law.\n\
+You may redistribute it under the terms of the GNU General Public License;\n\
+see the file named COPYING for details."),
+             _("Written by John Gilmore and Jay Fenlason."));
       exit (TAREXIT_SUCCESS);
     }
 
This page took 0.023509 seconds and 4 git commands to generate.