/* -*-c-*-
*
- * $Id: mkphrase.c,v 1.1 2000/08/06 10:50:55 mdw Exp $
+ * $Id: mkphrase.c,v 1.3 2003/01/24 20:16:04 mdw Exp $
*
* Generate passphrases from word lists
*
/*----- Revision history --------------------------------------------------*
*
* $Log: mkphrase.c,v $
+ * Revision 1.3 2003/01/24 20:16:04 mdw
+ * Fix stupidity in reading wordlists from stdin. (Thanks to James
+ * Harvey.)
+ *
+ * Revision 1.2 2000/12/06 20:33:27 mdw
+ * Make flags be macros rather than enumerations, to ensure that they're
+ * unsigned.
+ *
* Revision 1.1 2000/08/06 10:50:55 mdw
* (mkphrase): New program for generating random passphrases with measured
* strength.
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 (;;) {
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) {