summaryrefslogtreecommitdiff
path: root/src/dd.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1993-04-02 04:26:26 +0000
committerJim Meyering <jim@meyering.net>1993-04-02 04:26:26 +0000
commitee871dbed84a671bad1217b23ad3802ab023e26c (patch)
treee35f1c605334d3d40c2ea1cd67fada6cd41d9d62 /src/dd.c
parent0a6061f1f9178df1bfddaff7b25dbf5393833096 (diff)
downloadcoreutils-ee871dbed84a671bad1217b23ad3802ab023e26c.tar.xz
Add --help and --version options.
Diffstat (limited to 'src/dd.c')
-rw-r--r--src/dd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/dd.c b/src/dd.c
index c8a433740..cdf5234fd 100644
--- a/src/dd.c
+++ b/src/dd.c
@@ -57,6 +57,7 @@
#include <ctype.h>
#if !defined (isascii) || defined (STDC_HEADERS)
+#undef isascii
#define isascii(c) 1
#endif
@@ -307,7 +308,10 @@ static unsigned char const ebcdic_to_ascii[] =
070, 071, 0372, 0373, 0374, 0375, 0376, 0377
};
+/* If non-zero, display usage information and exit. */
static int flag_help;
+
+/* If non-zero, print the version on standard error. */
static int flag_version;
static struct option const long_options[] =
@@ -337,7 +341,7 @@ main (argc, argv)
scanargs (argc, argv);
if (flag_version)
- fprintf (stderr, "%s", version_string);
+ fprintf (stderr, "%s\n", version_string);
if (flag_help)
usage ("", NULL, NULL);