aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Klaus <philipp.klaus@gmail.com>2011-06-21 17:12:21 +0200
committerPhilipp Klaus <philipp.klaus@gmail.com>2011-06-21 17:12:21 +0200
commit6fe4e7f082beca523e237db60807e2d3535fee45 (patch)
treeadb828d7f4f674220af98d36402b3291a92980ff
parent4535ac486ce87b6a7257a7959426138405b7ecf8 (diff)
downloadpwgen-6fe4e7f082beca523e237db60807e2d3535fee45.zip
automatic commit for pwgen-2.01
-rw-r--r--ChangeLog6
-rw-r--r--Makefile.in2
-rw-r--r--pwgen.12
-rw-r--r--pwgen.c29
4 files changed, 37 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..6fb394b
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,6 @@
+2001-06-19 Theodore Tso <tytso@valinux.com>
+
+ * Release of pwgen 2.01
+
+ * pwgen.c (usage): Add help/usage message
+
diff --git a/Makefile.in b/Makefile.in
index caf2e24..21cf0c3 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,4 +1,4 @@
-PWGEN_VERSION=2.0
+PWGEN_VERSION=2.01
srcdir = @srcdir@
top_srcdir = @top_srcdir@
diff --git a/pwgen.1 b/pwgen.1
index fa1c8dd..fb952c3 100644
--- a/pwgen.1
+++ b/pwgen.1
@@ -1,4 +1,4 @@
-.TH PWGEN 1 "June 2001" "pwgen version 2.0"
+.TH PWGEN 1 "June 2001" "pwgen version 2.01"
.SH NAME
pwgen \- generate pronounceable passwords
.SH SYNOPSIS
diff --git a/pwgen.c b/pwgen.c
index 84a8284..590bacf 100644
--- a/pwgen.c
+++ b/pwgen.c
@@ -44,6 +44,31 @@ struct option pwgen_options[] = {
};
#endif
+const char *usage_msg =
+"Usage: pwgen [ OPTIONS ] [ pw_length ] [ num_pw ]\n\n"
+"Options supported by pwgen:\n"
+" -c or -capitalize\n"
+"\tInclude at least one capital letter in the password\n"
+" -n or --numerals\n"
+"\tInclude at least one number in the password\n"
+" -s or --secure\n"
+"\tGenerate completely random passwords\n"
+" -h or --help\n"
+"\tPrint a help message\n"
+" --no-numerals, --no-capitalize\n"
+"\tDon't include a number or capital letter in the password\n"
+" -C\n\tPrint the generated passwords in columns\n"
+" -1\n\tDon't print the generated passwords in columns\n"
+;
+
+void usage(void)
+{
+ fprintf(stderr, usage_msg);
+
+ exit(1);
+}
+
+
int main(int argc, char **argv)
{
int term_width = 80;
@@ -93,6 +118,10 @@ int main(int argc, char **argv)
case '1':
do_columns = 0;
break;
+ case 'h':
+ case '?':
+ usage();
+ break;
}
}
if (optind < argc) {