Make flags be macros rather than enumerations, to ensure that they're
[u/mdw/catacomb] / keyutil.c
index 174bbfe..fac8813 100644 (file)
--- a/keyutil.c
+++ b/keyutil.c
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: keyutil.c,v 1.10 2000/10/08 12:02:21 mdw Exp $
+ * $Id: keyutil.c,v 1.11 2000/12/06 20:33:27 mdw Exp $
  *
  * Simple key manager program
  *
 /*----- Revision history --------------------------------------------------* 
  *
  * $Log: keyutil.c,v $
+ * Revision 1.11  2000/12/06 20:33:27  mdw
+ * Make flags be macros rather than enumerations, to ensure that they're
+ * unsigned.
+ *
  * Revision 1.10  2000/10/08 12:02:21  mdw
  * Use @MP_EQ@ instead of @MP_CMP@.
  *
@@ -182,13 +186,11 @@ typedef struct keyopts {
   key *p;                              /* Parameters key-data */
 } keyopts;
 
-enum {
-  f_bogus = 1,                         /* Error in parsing */
-  f_lock = 2,                          /* Passphrase-lock private key */
-  f_quiet = 4,                         /* Don't show a progress indicator */
-  f_limlee = 8,                                /* Generate Lim-Lee primes */
-  f_subgroup = 16                      /* Generate a subgroup */
-};
+#define f_bogus 1u                     /* Error in parsing */
+#define f_lock 2u                      /* Passphrase-lock private key */
+#define f_quiet 4u                     /* Don't show a progress indicator */
+#define f_limlee 8u                    /* Generate Lim-Lee primes */
+#define f_subgroup 16u                 /* Generate a subgroup */
 
 /* --- @dolock@ --- *
  *
@@ -912,11 +914,9 @@ typedef struct listopts {
 
 /* --- Listing flags --- */
 
-enum {
-  f_newline = 2,                       /* Write newline before next entry */
-  f_attr = 4,                          /* Written at least one attribute */
-  f_utc = 8                            /* Emit UTC time, not local time */
-};
+#define f_newline 2u                   /* Write newline before next entry */
+#define f_attr 4u                      /* Written at least one attribute */
+#define f_utc 8u                       /* Emit UTC time, not local time */
 
 /* --- @showkeydata@ --- *
  *
@@ -1627,9 +1627,7 @@ int main(int argc, char *argv[])
 {
   unsigned f = 0;
 
-  enum {
-    f_bogus = 1
-  };
+#define f_bogus 1u
 
   /* --- Initialization --- */