catcrypt: Implement symmetric key-encapsulation and signature schemes.
[u/mdw/catacomb] / mkphrase.c
index f315108..3a26ed9 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: mkphrase.c,v 1.1 2000/08/06 10:50:55 mdw Exp $
+ * $Id$
  *
  * Generate passphrases from word lists
  *
  * MA 02111-1307, USA.
  */
 
-/*----- Revision history --------------------------------------------------* 
- *
- * $Log: mkphrase.c,v $
- * Revision 1.1  2000/08/06 10:50:55  mdw
- * (mkphrase): New program for generating random passphrases with measured
- * strength.
- *
- */
-
 /*----- Header files ------------------------------------------------------*/
 
 #include "config.h"
@@ -283,7 +274,7 @@ static void version(FILE *fp)
 static void usage(FILE *fp)
 {
   pquis(fp, "\
-Usage: $ [-p] [-b bits] [-g gen] [-n count] [-r [min-]max] wordlist...\n\
+Usage: $ [-p] [-b BITS] [-g GEN] [-n COUNT] [-r [MIN-]MAX] WORDLIST...\n\
 ");
 }
 
@@ -321,10 +312,8 @@ int main(int argc, char *argv[])
   dstr dd = DSTR_INIT;
   unsigned i;
 
-  enum {
-    f_bogus = 1,
-    f_showp = 2
-  };
+#define f_bogus 1u
+#define f_showp 2u
 
   ego(argv[0]);
   for (;;) {
@@ -418,7 +407,7 @@ int main(int argc, char *argv[])
   ctx = ops->init();
   while (*argv) {
     if (strcmp(*argv, "-") == 0)
-      ops->scan(ctx, stdin);
+      ops->scan(stdin, ctx);
     else {
       FILE *fp = fopen(*argv, "r");
       if (!fp) {