2003-04-24 Marcus Brinkmann <marcus@g10code.de>
authorMarcus Brinkmann <mb@g10code.com>
Thu, 24 Apr 2003 15:11:45 +0000 (15:11 +0000)
committerMarcus Brinkmann <mb@g10code.com>
Thu, 24 Apr 2003 15:11:45 +0000 (15:11 +0000)
* mkstatus: Strip trailing comma.
* gpgme.h (GpgmeStatus): Pretty print.

gpgme/ChangeLog
gpgme/gpgme.h
gpgme/mkstatus

index 219bcff..59eed25 100644 (file)
@@ -1,4 +1,7 @@
 2003-04-24  Marcus Brinkmann  <marcus@g10code.de>
+       
+       * mkstatus: Strip trailing comma.
+       * gpgme.h (GpgmeStatus): Pretty print.
 
        * gpgme.h (GpgmeError): Rename GPGME_No_Passphrase to
        GPGME_Bad_Passphrase.
index 4a718f1..a5f56ae 100644 (file)
@@ -220,90 +220,92 @@ typedef enum
   }
 GpgmeProtocol;
 
-
+\f
 /* The possible stati for the edit operation.  */
-
-typedef enum  {
+typedef enum
+  {
     GPGME_STATUS_EOF,
-    /* mkstatus starts here */
-    GPGME_STATUS_ENTER             , 
-    GPGME_STATUS_LEAVE             ,
-    GPGME_STATUS_ABORT              ,
-
-    GPGME_STATUS_GOODSIG            ,
-    GPGME_STATUS_BADSIG                    ,
-    GPGME_STATUS_ERRSIG                    ,
-
-    GPGME_STATUS_BADARMOR           ,
-
-    GPGME_STATUS_RSA_OR_IDEA        ,
-    GPGME_STATUS_KEYEXPIRED         ,
-    GPGME_STATUS_KEYREVOKED         ,
-
-    GPGME_STATUS_TRUST_UNDEFINED    ,
-    GPGME_STATUS_TRUST_NEVER        ,
-    GPGME_STATUS_TRUST_MARGINAL     ,
-    GPGME_STATUS_TRUST_FULLY        ,
-    GPGME_STATUS_TRUST_ULTIMATE     ,
-
-    GPGME_STATUS_SHM_INFO           ,
-    GPGME_STATUS_SHM_GET           ,
-    GPGME_STATUS_SHM_GET_BOOL       ,
-    GPGME_STATUS_SHM_GET_HIDDEN     ,
-
-    GPGME_STATUS_NEED_PASSPHRASE    ,
-    GPGME_STATUS_VALIDSIG           ,
-    GPGME_STATUS_SIG_ID                    ,
-    GPGME_STATUS_ENC_TO                    ,
-    GPGME_STATUS_NODATA                    ,
-    GPGME_STATUS_BAD_PASSPHRASE     ,
-    GPGME_STATUS_NO_PUBKEY          ,
-    GPGME_STATUS_NO_SECKEY          ,
+    /* mkstatus processing starts here */
+    GPGME_STATUS_ENTER,
+    GPGME_STATUS_LEAVE,
+    GPGME_STATUS_ABORT,
+
+    GPGME_STATUS_GOODSIG,
+    GPGME_STATUS_BADSIG,
+    GPGME_STATUS_ERRSIG,
+
+    GPGME_STATUS_BADARMOR,
+
+    GPGME_STATUS_RSA_OR_IDEA,
+    GPGME_STATUS_KEYEXPIRED,
+    GPGME_STATUS_KEYREVOKED,
+
+    GPGME_STATUS_TRUST_UNDEFINED,
+    GPGME_STATUS_TRUST_NEVER,
+    GPGME_STATUS_TRUST_MARGINAL,
+    GPGME_STATUS_TRUST_FULLY,
+    GPGME_STATUS_TRUST_ULTIMATE,
+
+    GPGME_STATUS_SHM_INFO,
+    GPGME_STATUS_SHM_GET,
+    GPGME_STATUS_SHM_GET_BOOL,
+    GPGME_STATUS_SHM_GET_HIDDEN,
+
+    GPGME_STATUS_NEED_PASSPHRASE,
+    GPGME_STATUS_VALIDSIG,
+    GPGME_STATUS_SIG_ID,
+    GPGME_STATUS_ENC_TO,
+    GPGME_STATUS_NODATA,
+    GPGME_STATUS_BAD_PASSPHRASE,
+    GPGME_STATUS_NO_PUBKEY,
+    GPGME_STATUS_NO_SECKEY,
     GPGME_STATUS_NEED_PASSPHRASE_SYM,
-    GPGME_STATUS_DECRYPTION_FAILED  ,
-    GPGME_STATUS_DECRYPTION_OKAY    ,
-    GPGME_STATUS_MISSING_PASSPHRASE ,
-    GPGME_STATUS_GOOD_PASSPHRASE    ,
-    GPGME_STATUS_GOODMDC            ,
-    GPGME_STATUS_BADMDC                    ,
-    GPGME_STATUS_ERRMDC                    ,
-    GPGME_STATUS_IMPORTED          ,
-    GPGME_STATUS_IMPORT_RES        ,
-    GPGME_STATUS_FILE_START        ,
-    GPGME_STATUS_FILE_DONE         ,
-    GPGME_STATUS_FILE_ERROR        ,
-
-    GPGME_STATUS_BEGIN_DECRYPTION   ,
-    GPGME_STATUS_END_DECRYPTION     ,
-    GPGME_STATUS_BEGIN_ENCRYPTION   ,
-    GPGME_STATUS_END_ENCRYPTION     ,
-
-    GPGME_STATUS_DELETE_PROBLEM     ,
-    GPGME_STATUS_GET_BOOL          ,
-    GPGME_STATUS_GET_LINE          ,
-    GPGME_STATUS_GET_HIDDEN        ,
-    GPGME_STATUS_GOT_IT                    ,
-    GPGME_STATUS_PROGRESS          ,
-    GPGME_STATUS_SIG_CREATED       ,
-    GPGME_STATUS_SESSION_KEY        ,
-    GPGME_STATUS_NOTATION_NAME      ,
-    GPGME_STATUS_NOTATION_DATA      ,
-    GPGME_STATUS_POLICY_URL         ,
-    GPGME_STATUS_BEGIN_STREAM       ,
-    GPGME_STATUS_END_STREAM         ,
-    GPGME_STATUS_KEY_CREATED       ,
-    GPGME_STATUS_USERID_HINT       ,
-    GPGME_STATUS_UNEXPECTED         ,
-    GPGME_STATUS_INV_RECP           ,
-    GPGME_STATUS_NO_RECP            ,
-    GPGME_STATUS_ALREADY_SIGNED     ,
-    GPGME_STATUS_SIGEXPIRED         ,
-    GPGME_STATUS_EXPSIG             ,
-    GPGME_STATUS_EXPKEYSIG          ,
-    GPGME_STATUS_TRUNCATED          ,
-    GPGME_STATUS_ERROR              
-} GpgmeStatusCode;
-
+    GPGME_STATUS_DECRYPTION_FAILED,
+    GPGME_STATUS_DECRYPTION_OKAY,
+    GPGME_STATUS_MISSING_PASSPHRASE,
+    GPGME_STATUS_GOOD_PASSPHRASE,
+    GPGME_STATUS_GOODMDC,
+    GPGME_STATUS_BADMDC,
+    GPGME_STATUS_ERRMDC,
+    GPGME_STATUS_IMPORTED,
+    GPGME_STATUS_IMPORT_OK,
+    GPGME_STATUS_IMPORT_PROBLEM,
+    GPGME_STATUS_IMPORT_RES,
+    GPGME_STATUS_FILE_START,
+    GPGME_STATUS_FILE_DONE,
+    GPGME_STATUS_FILE_ERROR,
+
+    GPGME_STATUS_BEGIN_DECRYPTION,
+    GPGME_STATUS_END_DECRYPTION,
+    GPGME_STATUS_BEGIN_ENCRYPTION,
+    GPGME_STATUS_END_ENCRYPTION,
+
+    GPGME_STATUS_DELETE_PROBLEM,
+    GPGME_STATUS_GET_BOOL,
+    GPGME_STATUS_GET_LINE,
+    GPGME_STATUS_GET_HIDDEN,
+    GPGME_STATUS_GOT_IT,
+    GPGME_STATUS_PROGRESS,
+    GPGME_STATUS_SIG_CREATED,
+    GPGME_STATUS_SESSION_KEY,
+    GPGME_STATUS_NOTATION_NAME,
+    GPGME_STATUS_NOTATION_DATA,
+    GPGME_STATUS_POLICY_URL,
+    GPGME_STATUS_BEGIN_STREAM,
+    GPGME_STATUS_END_STREAM,
+    GPGME_STATUS_KEY_CREATED,
+    GPGME_STATUS_USERID_HINT,
+    GPGME_STATUS_UNEXPECTED,
+    GPGME_STATUS_INV_RECP,
+    GPGME_STATUS_NO_RECP,
+    GPGME_STATUS_ALREADY_SIGNED,
+    GPGME_STATUS_SIGEXPIRED,
+    GPGME_STATUS_EXPSIG,
+    GPGME_STATUS_EXPKEYSIG,
+    GPGME_STATUS_TRUNCATED,
+    GPGME_STATUS_ERROR
+  }
+GpgmeStatusCode;
 
 /* The available keylist mode flags.  */
 #define GPGME_KEYLIST_MODE_LOCAL  1
index 7e438cc..03779be 100755 (executable)
@@ -42,7 +42,7 @@ awk '
 /GPGME_STATUS_ENTER/     { okay=1 }
 !okay              {next}
 /}/                { exit 0 }
-/GPGME_STATUS_[A-Za-z_]*/ { printf "  { \"%s\", %s },\n", substr($1,14), $1 }
+/GPGME_STATUS_[A-Za-z_]*/ {  sub (/,/, "", $1); printf "  { \"%s\", %s },\n", substr($1,14), $1 }
 ' | sort  
 
 cat <<EOF