From f58531a211d7062be4ca92b4c4843f4cf73f5010 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Thu, 24 Apr 2003 15:11:45 +0000 Subject: [PATCH] 2003-04-24 Marcus Brinkmann * mkstatus: Strip trailing comma. * gpgme.h (GpgmeStatus): Pretty print. --- gpgme/ChangeLog | 3 + gpgme/gpgme.h | 148 ++++++++++++++++++++++++------------------------ gpgme/mkstatus | 2 +- 3 files changed, 79 insertions(+), 74 deletions(-) diff --git a/gpgme/ChangeLog b/gpgme/ChangeLog index 219bcff6..59eed259 100644 --- a/gpgme/ChangeLog +++ b/gpgme/ChangeLog @@ -1,4 +1,7 @@ 2003-04-24 Marcus Brinkmann + + * mkstatus: Strip trailing comma. + * gpgme.h (GpgmeStatus): Pretty print. * gpgme.h (GpgmeError): Rename GPGME_No_Passphrase to GPGME_Bad_Passphrase. diff --git a/gpgme/gpgme.h b/gpgme/gpgme.h index 4a718f11..a5f56ae0 100644 --- a/gpgme/gpgme.h +++ b/gpgme/gpgme.h @@ -220,90 +220,92 @@ typedef enum } GpgmeProtocol; - + /* 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 , + /* mkstatus processing starts here */ + GPGME_STATUS_ENTER, + GPGME_STATUS_LEAVE, + GPGME_STATUS_ABORT, - GPGME_STATUS_GOODSIG , - GPGME_STATUS_BADSIG , - GPGME_STATUS_ERRSIG , + GPGME_STATUS_GOODSIG, + GPGME_STATUS_BADSIG, + GPGME_STATUS_ERRSIG, - GPGME_STATUS_BADARMOR , + GPGME_STATUS_BADARMOR, - GPGME_STATUS_RSA_OR_IDEA , - GPGME_STATUS_KEYEXPIRED , - GPGME_STATUS_KEYREVOKED , + 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_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_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, + 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_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; + 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 diff --git a/gpgme/mkstatus b/gpgme/mkstatus index 7e438ccc..03779bec 100755 --- a/gpgme/mkstatus +++ b/gpgme/mkstatus @@ -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 <