summaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2008-11-12 18:41:49 +0100
committerWerner Koch <wk@gnupg.org>2008-11-12 18:41:49 +0100
commit329509c864cfc545e723fc279d12e36794a803f0 (patch)
tree78ea93ed70f6fbd466b4de4ae12212fb14efec40 /g10
parentuse $() instead of backticks. (diff)
downloadgnupg2-329509c864cfc545e723fc279d12e36794a803f0.tar.xz
gnupg2-329509c864cfc545e723fc279d12e36794a803f0.zip
Made arg_parse more readable.
Diffstat (limited to 'g10')
-rw-r--r--g10/ChangeLog4
-rw-r--r--g10/gpg.c721
2 files changed, 380 insertions, 345 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index 130ebd511..c098a20a0 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,7 @@
+2008-11-11 Werner Koch <wk@g10code.com>
+
+ * gpg.c (opts): Use new ARGPARSE macros for clarity.
+
2008-10-24 Werner Koch <wk@g10code.com>
* keyedit.c (change_passphrase): Clear passphrase cache.
diff --git a/g10/gpg.c b/g10/gpg.c
index 834936566..b5b27f70d 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -367,358 +367,387 @@ enum cmd_and_opt_values
static ARGPARSE_OPTS opts[] = {
- { 300, NULL, 0, N_("@Commands:\n ") },
-
- { aSign, "sign", 256, N_("|[file]|make a signature")},
- { aClearsign, "clearsign", 256, N_("|[file]|make a clear text signature")},
- { aDetachedSign, "detach-sign", 256, N_("make a detached signature")},
- { aEncr, "encrypt", 256, N_("encrypt data")},
- { aEncrFiles, "encrypt-files", 256, "@"},
- { aSym, "symmetric", 256, N_("encryption only with symmetric cipher")},
- { aStore, "store", 256, "@"},
- { aDecrypt, "decrypt", 256, N_("decrypt data (default)")},
- { aDecryptFiles, "decrypt-files", 256, "@"},
- { aVerify, "verify" , 256, N_("verify a signature")},
- { aVerifyFiles, "verify-files" , 256, "@" },
- { aListKeys, "list-keys", 256, N_("list keys")},
- { aListKeys, "list-public-keys", 256, "@" },
- { aListSigs, "list-sigs", 256, N_("list keys and signatures")},
- { aCheckKeys, "check-sigs",256, N_("list and check key signatures")},
- { oFingerprint, "fingerprint", 256, N_("list keys and fingerprints")},
- { aListSecretKeys, "list-secret-keys", 256, N_("list secret keys")},
- { aKeygen, "gen-key", 256, N_("generate a new key pair")},
- { aDeleteKeys,"delete-keys",256,N_("remove keys from the public keyring")},
- { aDeleteSecretKeys, "delete-secret-keys",256,
- N_("remove keys from the secret keyring")},
- { aSignKey, "sign-key" ,256, N_("sign a key")},
- { aLSignKey, "lsign-key" ,256, N_("sign a key locally")},
- { aEditKey, "edit-key" ,256, N_("sign or edit a key")},
- { aGenRevoke, "gen-revoke",256, N_("generate a revocation certificate")},
- { aDesigRevoke, "desig-revoke",256, "@" },
- { aExport, "export" , 256, N_("export keys") },
- { aSendKeys, "send-keys" , 256, N_("export keys to a key server") },
- { aRecvKeys, "recv-keys" , 256, N_("import keys from a key server") },
- { aSearchKeys, "search-keys" , 256,
- N_("search for keys on a key server") },
- { aRefreshKeys, "refresh-keys", 256,
- N_("update all keys from a keyserver")},
- { aLocateKeys, "locate-keys", 256, "@"},
- { aFetchKeys, "fetch-keys" , 256, "@" },
- { aExportSecret, "export-secret-keys" , 256, "@" },
- { aExportSecretSub, "export-secret-subkeys" , 256, "@" },
- { aImport, "import", 256 , N_("import/merge keys")},
- { aFastImport, "fast-import", 256 , "@"},
+ ARGPARSE_group (300, N_("@Commands:\n ")),
+
+ ARGPARSE_c (aSign, "sign", N_("|[file]|make a signature")),
+ ARGPARSE_c (aClearsign, "clearsign", N_("|[file]|make a clear text signature")),
+ ARGPARSE_c (aDetachedSign, "detach-sign", N_("make a detached signature")),
+ ARGPARSE_c (aEncr, "encrypt", N_("encrypt data")),
+ ARGPARSE_c (aEncrFiles, "encrypt-files", "@"),
+ ARGPARSE_c (aSym, "symmetric", N_("encryption only with symmetric cipher")),
+ ARGPARSE_c (aStore, "store", "@"),
+ ARGPARSE_c (aDecrypt, "decrypt", N_("decrypt data (default)")),
+ ARGPARSE_c (aDecryptFiles, "decrypt-files", "@"),
+ ARGPARSE_c (aVerify, "verify" , N_("verify a signature")),
+ ARGPARSE_c (aVerifyFiles, "verify-files" , "@" ),
+ ARGPARSE_c (aListKeys, "list-keys", N_("list keys")),
+ ARGPARSE_c (aListKeys, "list-public-keys", "@" ),
+ ARGPARSE_c (aListSigs, "list-sigs", N_("list keys and signatures")),
+ ARGPARSE_c (aCheckKeys, "check-sigs",N_("list and check key signatures")),
+ ARGPARSE_c (oFingerprint, "fingerprint", N_("list keys and fingerprints")),
+ ARGPARSE_c (aListSecretKeys, "list-secret-keys", N_("list secret keys")),
+ ARGPARSE_c (aKeygen, "gen-key", N_("generate a new key pair")),
+ ARGPARSE_c (aDeleteKeys,"delete-keys",
+ N_("remove keys from the public keyring")),
+ ARGPARSE_c (aDeleteSecretKeys, "delete-secret-keys",
+ N_("remove keys from the secret keyring")),
+ ARGPARSE_c (aSignKey, "sign-key" ,N_("sign a key")),
+ ARGPARSE_c (aLSignKey, "lsign-key" ,N_("sign a key locally")),
+ ARGPARSE_c (aEditKey, "edit-key" ,N_("sign or edit a key")),
+ ARGPARSE_c (aGenRevoke, "gen-revoke",N_("generate a revocation certificate")),
+ ARGPARSE_c (aDesigRevoke, "desig-revoke","@" ),
+ ARGPARSE_c (aExport, "export" , N_("export keys") ),
+ ARGPARSE_c (aSendKeys, "send-keys" , N_("export keys to a key server") ),
+ ARGPARSE_c (aRecvKeys, "recv-keys" , N_("import keys from a key server") ),
+ ARGPARSE_c (aSearchKeys, "search-keys" ,
+ N_("search for keys on a key server") ),
+ ARGPARSE_c (aRefreshKeys, "refresh-keys",
+ N_("update all keys from a keyserver")),
+ ARGPARSE_c (aLocateKeys, "locate-keys", "@"),
+ ARGPARSE_c (aFetchKeys, "fetch-keys" , "@" ),
+ ARGPARSE_c (aExportSecret, "export-secret-keys" , "@" ),
+ ARGPARSE_c (aExportSecretSub, "export-secret-subkeys" , "@" ),
+ ARGPARSE_c (aImport, "import", N_("import/merge keys")),
+ ARGPARSE_c (aFastImport, "fast-import", "@"),
#ifdef ENABLE_CARD_SUPPORT
- { aCardStatus, "card-status", 256, N_("print the card status")},
- { aCardEdit, "card-edit", 256, N_("change data on a card")},
- { aChangePIN, "change-pin", 256, N_("change a card's PIN")},
+ ARGPARSE_c (aCardStatus, "card-status", N_("print the card status")),
+ ARGPARSE_c (aCardEdit, "card-edit", N_("change data on a card")),
+ ARGPARSE_c (aChangePIN, "change-pin", N_("change a card's PIN")),
#endif
- { aListConfig, "list-config", 256, "@"},
- { aGPGConfList, "gpgconf-list", 256, "@" },
- { aGPGConfTest, "gpgconf-test", 256, "@" },
- { aListPackets, "list-packets",256, "@"},
- { aExportOwnerTrust, "export-ownertrust", 256, "@"},
- { aImportOwnerTrust, "import-ownertrust", 256, "@"},
- { aUpdateTrustDB,
- "update-trustdb",0 , N_("update the trust database")},
- { aCheckTrustDB, "check-trustdb", 0, "@"},
- { aFixTrustDB, "fix-trustdb", 0, "@"},
- { aDeArmor, "dearmor", 256, "@"},
- { aDeArmor, "dearmour", 256, "@"},
- { aEnArmor, "enarmor", 256, "@"},
- { aEnArmor, "enarmour", 256, "@"},
- { aPrintMD, "print-md" , 256, N_("|algo [files]|print message digests")},
- { aPrimegen, "gen-prime" , 256, "@" },
- { aGenRandom, "gen-random", 256, "@" },
- { aServer, "server", 256, N_("run in server mode")},
-
- { 301, NULL, 0, N_("@\nOptions:\n ") },
-
- { oArmor, "armor", 0, N_("create ascii armored output")},
- { oArmor, "armour", 0, "@" },
- { oRecipient, "recipient", 2, N_("|NAME|encrypt for NAME")},
- { oHiddenRecipient, "hidden-recipient", 2, "@" },
- { oRecipient, "remote-user", 2, "@"}, /* old option name */
- { oDefRecipient, "default-recipient", 2, "@"},
- { oDefRecipientSelf, "default-recipient-self", 0, "@"},
- { oNoDefRecipient, "no-default-recipient", 0, "@" },
- { oTempDir, "temp-directory", 2, "@" },
- { oExecPath, "exec-path", 2, "@" },
- { oEncryptTo, "encrypt-to", 2, "@" },
- { oHiddenEncryptTo, "hidden-encrypt-to", 2, "@" },
- { oNoEncryptTo, "no-encrypt-to", 0, "@" },
- { oLocalUser, "local-user",2, N_("use this user-id to sign or decrypt")},
- { oCompress, NULL, 1, N_("|N|set compress level N (0 disables)") },
- { oCompressLevel, "compress-level", 1, "@" },
- { oBZ2CompressLevel, "bzip2-compress-level", 1, "@" },
- { oBZ2DecompressLowmem, "bzip2-decompress-lowmem", 0, "@" },
- { oTextmodeShort, NULL, 0, "@"},
- { oTextmode, "textmode", 0, N_("use canonical text mode")},
- { oNoTextmode, "no-textmode", 0, "@"},
- { oExpert, "expert", 0, "@"},
- { oNoExpert, "no-expert", 0, "@"},
- { oDefSigExpire, "default-sig-expire", 2, "@"},
- { oAskSigExpire, "ask-sig-expire", 0, "@"},
- { oNoAskSigExpire, "no-ask-sig-expire", 0, "@"},
- { oDefCertExpire, "default-cert-expire", 2, "@"},
- { oAskCertExpire, "ask-cert-expire", 0, "@"},
- { oNoAskCertExpire, "no-ask-cert-expire", 0, "@"},
- { oDefCertLevel, "default-cert-level", 1, "@"},
- { oMinCertLevel, "min-cert-level", 1, "@"},
- { oAskCertLevel, "ask-cert-level", 0, "@"},
- { oNoAskCertLevel, "no-ask-cert-level", 0, "@"},
- { oOutput, "output", 2, N_("|FILE|write output to FILE")},
- { oMaxOutput, "max-output", 16|4, "@" },
- { oVerbose, "verbose", 0, N_("verbose") },
- { oQuiet, "quiet", 0, "@"},
- { oNoTTY, "no-tty", 0, "@"},
- { oForceV3Sigs, "force-v3-sigs", 0, "@"},
- { oNoForceV3Sigs, "no-force-v3-sigs", 0, "@"},
- { oForceV4Certs, "force-v4-certs", 0, "@"},
- { oNoForceV4Certs, "no-force-v4-certs", 0, "@"},
- { oForceMDC, "force-mdc", 0, "@"},
- { oNoForceMDC, "no-force-mdc", 0, "@" },
- { oDisableMDC, "disable-mdc", 0, "@"},
- { oNoDisableMDC, "no-disable-mdc", 0, "@" },
- { oDryRun, "dry-run", 0, N_("do not make any changes") },
- { oInteractive, "interactive", 0, N_("prompt before overwriting") },
- { oUseAgent, "use-agent",0, "@"},
- { oNoUseAgent, "no-use-agent",0, "@"},
- { oGpgAgentInfo, "gpg-agent-info",2, "@"},
- { oBatch, "batch", 0, "@"},
- { oAnswerYes, "yes", 0, "@"},
- { oAnswerNo, "no", 0, "@"},
- { oKeyring, "keyring", 2, "@"},
- { oPrimaryKeyring, "primary-keyring",2, "@" },
- { oSecretKeyring, "secret-keyring", 2, "@"},
- { oShowKeyring, "show-keyring", 0, "@"},
- { oDefaultKey, "default-key", 2, "@"},
- { oKeyServer, "keyserver", 2, "@"},
- { oKeyServerOptions, "keyserver-options",2,"@"},
- { oImportOptions, "import-options",2,"@"},
- { oExportOptions, "export-options",2,"@"},
- { oListOptions, "list-options",2,"@"},
- { oVerifyOptions, "verify-options",2,"@"},
- { oDisplayCharset, "display-charset", 2, "@"},
- { oDisplayCharset, "charset", 2, "@"},
- { oOptions, "options", 2, "@"},
- { oDebug, "debug" ,4|16, "@"},
- { oDebugLevel, "debug-level" ,2, "@"},
- { oDebugAll, "debug-all" ,0, "@"},
- { oStatusFD, "status-fd" ,1, "@"},
- { oStatusFile, "status-file" ,2, "@"},
- { oAttributeFD, "attribute-fd" ,1, "@" },
- { oAttributeFile, "attribute-file" ,2, "@" },
- { oNoop, "sk-comments", 0, "@"},
- { oNoop, "no-sk-comments", 0, "@"},
- { oCompletesNeeded, "completes-needed", 1, "@"},
- { oMarginalsNeeded, "marginals-needed", 1, "@"},
- { oMaxCertDepth, "max-cert-depth", 1, "@" },
- { oTrustedKey, "trusted-key", 2, "@"},
- { oLoadExtension, "load-extension", 2, "@"},
- { oGnuPG, "gnupg", 0, "@"},
- { oGnuPG, "no-pgp2", 0, "@"},
- { oGnuPG, "no-pgp6", 0, "@"},
- { oGnuPG, "no-pgp7", 0, "@"},
- { oGnuPG, "no-pgp8", 0, "@"},
- { oRFC1991, "rfc1991", 0, "@"},
- { oRFC2440, "rfc2440", 0, "@" },
- { oRFC4880, "rfc4880", 0, "@" },
- { oOpenPGP, "openpgp", 0, N_("use strict OpenPGP behavior")},
- { oPGP2, "pgp2", 0, N_("generate PGP 2.x compatible messages")},
- { oPGP6, "pgp6", 0, "@"},
- { oPGP7, "pgp7", 0, "@"},
- { oPGP8, "pgp8", 0, "@"},
- { oRFC2440Text, "rfc2440-text", 0, "@"},
- { oNoRFC2440Text, "no-rfc2440-text", 0, "@"},
- { oS2KMode, "s2k-mode", 1, "@"},
- { oS2KDigest, "s2k-digest-algo", 2, "@"},
- { oS2KCipher, "s2k-cipher-algo", 2, "@"},
- { oS2KCount, "s2k-count", 1, "@"},
- { oSimpleSKChecksum, "simple-sk-checksum", 0, "@"},
- { oCipherAlgo, "cipher-algo", 2, "@"},
- { oDigestAlgo, "digest-algo", 2, "@"},
- { oCertDigestAlgo, "cert-digest-algo", 2 , "@" },
- { oCompressAlgo,"compress-algo", 2, "@"},
- { oCompressAlgo, "compression-algo", 2, "@"}, /* Alias */
- { oThrowKeyids, "throw-keyid", 0, "@"},
- { oThrowKeyids, "throw-keyids", 0, "@"},
- { oNoThrowKeyids, "no-throw-keyid", 0, "@" },
- { oNoThrowKeyids, "no-throw-keyids", 0, "@" },
- { oShowPhotos, "show-photos", 0, "@" },
- { oNoShowPhotos, "no-show-photos", 0, "@" },
- { oPhotoViewer, "photo-viewer", 2, "@" },
- { oSetNotation, "set-notation", 2, "@" },
- { oSetNotation, "notation-data", 2, "@" }, /* Alias */
- { oSigNotation, "sig-notation", 2, "@" },
- { oCertNotation, "cert-notation", 2, "@" },
-
- { 302, NULL, 0, N_(
+ ARGPARSE_c (aListConfig, "list-config", "@"),
+ ARGPARSE_c (aGPGConfList, "gpgconf-list", "@" ),
+ ARGPARSE_c (aGPGConfTest, "gpgconf-test", "@" ),
+ ARGPARSE_c (aListPackets, "list-packets","@"),
+ ARGPARSE_c (aExportOwnerTrust, "export-ownertrust", "@"),
+ ARGPARSE_c (aImportOwnerTrust, "import-ownertrust", "@"),
+ ARGPARSE_c (aUpdateTrustDB,"update-trustdb",
+ N_("update the trust database")),
+ ARGPARSE_c (aCheckTrustDB, "check-trustdb", "@"),
+ ARGPARSE_c (aFixTrustDB, "fix-trustdb", "@"),
+ ARGPARSE_c (aDeArmor, "dearmor", "@"),
+ ARGPARSE_c (aDeArmor, "dearmour", "@"),
+ ARGPARSE_c (aEnArmor, "enarmor", "@"),
+ ARGPARSE_c (aEnArmor, "enarmour", "@"),
+ ARGPARSE_c (aPrintMD, "print-md", N_("|algo [files]|print message digests")),
+ ARGPARSE_c (aPrimegen, "gen-prime", "@" ),
+ ARGPARSE_c (aGenRandom,"gen-random", "@" ),
+ ARGPARSE_c (aServer, "server", N_("run in server mode")),
+
+ ARGPARSE_group (301, N_("@\nOptions:\n ")),
+
+ ARGPARSE_s_n (oArmor, "armor", N_("create ascii armored output")),
+ ARGPARSE_s_n (oArmor, "armour", "@"),
+
+ ARGPARSE_s_s (oRecipient, "recipient", N_("|NAME|encrypt for NAME")),
+ ARGPARSE_s_s (oHiddenRecipient, "hidden-recipient", "@"),
+ ARGPARSE_s_s (oRecipient, "remote-user", "@"), /* (old option name) */
+ ARGPARSE_s_s (oDefRecipient, "default-recipient", "@"),
+ ARGPARSE_s_n (oDefRecipientSelf, "default-recipient-self", "@"),
+ ARGPARSE_s_n (oNoDefRecipient, "no-default-recipient", "@"),
+
+ ARGPARSE_s_s (oTempDir, "temp-directory", "@"),
+ ARGPARSE_s_s (oExecPath, "exec-path", "@"),
+ ARGPARSE_s_s (oEncryptTo, "encrypt-to", "@"),
+ ARGPARSE_s_n (oNoEncryptTo, "no-encrypt-to", "@"),
+ ARGPARSE_s_s (oHiddenEncryptTo, "hidden-encrypt-to", "@"),
+ ARGPARSE_s_s (oLocalUser, "local-user",
+ N_("use this user-id to sign or decrypt")),
+
+ ARGPARSE_s_i (oCompress, NULL, N_("|N|set compress level N (0 disables)")),
+ ARGPARSE_s_i (oCompressLevel, "compress-level", "@"),
+ ARGPARSE_s_i (oBZ2CompressLevel, "bzip2-compress-level", "@"),
+ ARGPARSE_s_n (oBZ2DecompressLowmem, "bzip2-decompress-lowmem", "@"),
+
+ ARGPARSE_s_n (oTextmodeShort, NULL, "@"),
+ ARGPARSE_s_n (oTextmode, "textmode", N_("use canonical text mode")),
+ ARGPARSE_s_n (oNoTextmode, "no-textmode", "@"),
+
+ ARGPARSE_s_n (oExpert, "expert", "@"),
+ ARGPARSE_s_n (oNoExpert, "no-expert", "@"),
+
+ ARGPARSE_s_s (oDefSigExpire, "default-sig-expire", "@"),
+ ARGPARSE_s_n (oAskSigExpire, "ask-sig-expire", "@"),
+ ARGPARSE_s_n (oNoAskSigExpire, "no-ask-sig-expire", "@"),
+ ARGPARSE_s_s (oDefCertExpire, "default-cert-expire", "@"),
+ ARGPARSE_s_n (oAskCertExpire, "ask-cert-expire", "@"),
+ ARGPARSE_s_n (oNoAskCertExpire, "no-ask-cert-expire", "@"),
+ ARGPARSE_s_i (oDefCertLevel, "default-cert-level", "@"),
+ ARGPARSE_s_i (oMinCertLevel, "min-cert-level", "@"),
+ ARGPARSE_s_n (oAskCertLevel, "ask-cert-level", "@"),
+ ARGPARSE_s_n (oNoAskCertLevel, "no-ask-cert-level", "@"),
+
+ ARGPARSE_s_s (oOutput, "output", N_("|FILE|write output to FILE")),
+ ARGPARSE_p_u (oMaxOutput, "max-output", "@"),
+
+ ARGPARSE_s_n (oVerbose, "verbose", N_("verbose")),
+ ARGPARSE_s_n (oQuiet, "quiet", "@"),
+ ARGPARSE_s_n (oNoTTY, "no-tty", "@"),
+
+ ARGPARSE_s_n (oForceV3Sigs, "force-v3-sigs", "@"),
+ ARGPARSE_s_n (oNoForceV3Sigs, "no-force-v3-sigs", "@"),
+ ARGPARSE_s_n (oForceV4Certs, "force-v4-certs", "@"),
+ ARGPARSE_s_n (oNoForceV4Certs, "no-force-v4-certs", "@"),
+ ARGPARSE_s_n (oForceMDC, "force-mdc", "@"),
+ ARGPARSE_s_n (oNoForceMDC, "no-force-mdc", "@"),
+ ARGPARSE_s_n (oDisableMDC, "disable-mdc", "@"),
+ ARGPARSE_s_n (oNoDisableMDC, "no-disable-mdc", "@"),
+
+ ARGPARSE_s_n (oDryRun, "dry-run", N_("do not make any changes")),
+ ARGPARSE_s_n (oInteractive, "interactive", N_("prompt before overwriting")),
+
+ ARGPARSE_s_n (oUseAgent, "use-agent", "@"),
+ ARGPARSE_s_n (oNoUseAgent, "no-use-agent", "@"),
+ ARGPARSE_s_s (oGpgAgentInfo, "gpg-agent-info", "@"),
+
+ ARGPARSE_s_n (oBatch, "batch", "@"),
+ ARGPARSE_s_n (oAnswerYes, "yes", "@"),
+ ARGPARSE_s_n (oAnswerNo, "no", "@"),
+ ARGPARSE_s_s (oKeyring, "keyring", "@"),
+ ARGPARSE_s_s (oPrimaryKeyring, "primary-keyring", "@"),
+ ARGPARSE_s_s (oSecretKeyring, "secret-keyring", "@"),
+ ARGPARSE_s_n (oShowKeyring, "show-keyring", "@"),
+ ARGPARSE_s_s (oDefaultKey, "default-key", "@"),
+
+ ARGPARSE_s_s (oKeyServer, "keyserver", "@"),
+ ARGPARSE_s_s (oKeyServerOptions, "keyserver-options", "@"),
+ ARGPARSE_s_s (oImportOptions, "import-options", "@"),
+ ARGPARSE_s_s (oExportOptions, "export-options", "@"),
+ ARGPARSE_s_s (oListOptions, "list-options", "@"),
+ ARGPARSE_s_s (oVerifyOptions, "verify-options", "@"),
+
+ ARGPARSE_s_s (oDisplayCharset, "display-charset", "@"),
+ ARGPARSE_s_s (oDisplayCharset, "charset", "@"),
+ ARGPARSE_s_s (oOptions, "options", "@"),
+
+ ARGPARSE_p_u (oDebug, "debug", "@"),
+ ARGPARSE_s_s (oDebugLevel, "debug-level", "@"),
+ ARGPARSE_s_n (oDebugAll, "debug-all", "@"),
+ ARGPARSE_s_i (oStatusFD, "status-fd", "@"),
+ ARGPARSE_s_s (oStatusFile, "status-file", "@"),
+ ARGPARSE_s_i (oAttributeFD, "attribute-fd", "@"),
+ ARGPARSE_s_s (oAttributeFile, "attribute-file", "@"),
+
+ ARGPARSE_s_n (oNoop, "sk-comments", "@"),
+ ARGPARSE_s_n (oNoop, "no-sk-comments", "@"),
+
+ ARGPARSE_s_i (oCompletesNeeded, "completes-needed", "@"),
+ ARGPARSE_s_i (oMarginalsNeeded, "marginals-needed", "@"),
+ ARGPARSE_s_i (oMaxCertDepth, "max-cert-depth", "@" ),
+ ARGPARSE_s_s (oTrustedKey, "trusted-key", "@"),
+
+ ARGPARSE_s_s (oLoadExtension, "load-extension", "@"), /* Dummy. */
+
+ ARGPARSE_s_n (oGnuPG, "gnupg", "@"),
+ ARGPARSE_s_n (oGnuPG, "no-pgp2", "@"),
+ ARGPARSE_s_n (oGnuPG, "no-pgp6", "@"),
+ ARGPARSE_s_n (oGnuPG, "no-pgp7", "@"),
+ ARGPARSE_s_n (oGnuPG, "no-pgp8", "@"),
+ ARGPARSE_s_n (oRFC1991, "rfc1991", "@"),
+ ARGPARSE_s_n (oRFC2440, "rfc2440", "@"),
+ ARGPARSE_s_n (oRFC4880, "rfc4880", "@"),
+ ARGPARSE_s_n (oOpenPGP, "openpgp", N_("use strict OpenPGP behavior")),
+ ARGPARSE_s_n (oPGP2, "pgp2", N_("generate PGP 2.x compatible messages")),
+ ARGPARSE_s_n (oPGP6, "pgp6", "@"),
+ ARGPARSE_s_n (oPGP7, "pgp7", "@"),
+ ARGPARSE_s_n (oPGP8, "pgp8", "@"),
+
+ ARGPARSE_s_n (oRFC2440Text, "rfc2440-text", "@"),
+ ARGPARSE_s_n (oNoRFC2440Text, "no-rfc2440-text", "@"),
+ ARGPARSE_s_i (oS2KMode, "s2k-mode", "@"),
+ ARGPARSE_s_s (oS2KDigest, "s2k-digest-algo", "@"),
+ ARGPARSE_s_s (oS2KCipher, "s2k-cipher-algo", "@"),
+ ARGPARSE_s_i (oS2KCount, "s2k-count", "@"),
+ ARGPARSE_s_n (oSimpleSKChecksum, "simple-sk-checksum", "@"),
+ ARGPARSE_s_s (oCipherAlgo, "cipher-algo", "@"),
+ ARGPARSE_s_s (oDigestAlgo, "digest-algo", "@"),
+ ARGPARSE_s_s (oCertDigestAlgo, "cert-digest-algo", "@"),
+ ARGPARSE_s_s (oCompressAlgo,"compress-algo", "@"),
+ ARGPARSE_s_s (oCompressAlgo, "compression-algo", "@"), /* Alias */
+ ARGPARSE_s_n (oThrowKeyids, "throw-keyid", "@"),
+ ARGPARSE_s_n (oThrowKeyids, "throw-keyids", "@"),
+ ARGPARSE_s_n (oNoThrowKeyids, "no-throw-keyid", "@"),
+ ARGPARSE_s_n (oNoThrowKeyids, "no-throw-keyids", "@"),
+ ARGPARSE_s_n (oShowPhotos, "show-photos", "@"),
+ ARGPARSE_s_n (oNoShowPhotos, "no-show-photos", "@"),
+ ARGPARSE_s_s (oPhotoViewer, "photo-viewer", "@"),
+ ARGPARSE_s_s (oSetNotation, "set-notation", "@"),
+ ARGPARSE_s_s (oSetNotation, "notation-data", "@"), /* Alias */
+ ARGPARSE_s_s (oSigNotation, "sig-notation", "@"),
+ ARGPARSE_s_s (oCertNotation, "cert-notation", "@"),
+
+ ARGPARSE_group (302, N_(
"@\n(See the man page for a complete listing of all commands and options)\n"
- )},
+ )),
- { 303, NULL, 0, N_("@\nExamples:\n\n"
+ ARGPARSE_group (303, N_("@\nExamples:\n\n"
" -se -r Bob [file] sign and encrypt for user Bob\n"
" --clearsign [file] make a clear text signature\n"
" --detach-sign [file] make a detached signature\n"
" --list-keys [names] show keys\n"
- " --fingerprint [names] show fingerprints\n" ) },
-
- /* hidden options */
- { aPrintMDs, "print-mds" , 256, "@"}, /* old */
- { aListTrustDB, "list-trustdb",0 , "@"},
- /* Not yet used */
- /* { aListTrustPath, "list-trust-path",0, "@"}, */
- { oPasswd, "passphrase",2, "@" },
- { oPasswdFD, "passphrase-fd",1, "@" },
- { oPasswdFile, "passphrase-file",2, "@" },
- { oPasswdRepeat, "passphrase-repeat", 1, "@"},
- { oCommandFD, "command-fd",1, "@" },
- { oCommandFile, "command-file",2, "@" },
- { oQuickRandom, "debug-quick-random", 0, "@"},
- { oNoVerbose, "no-verbose", 0, "@"},
- { oTrustDBName, "trustdb-name", 2, "@" },
- { oNoSecmemWarn, "no-secmem-warning", 0, "@" },
- { oRequireSecmem,"require-secmem", 0, "@" },
- { oNoRequireSecmem,"no-require-secmem", 0, "@" },
- { oNoPermissionWarn, "no-permission-warning", 0, "@" },
- { oNoMDCWarn, "no-mdc-warning", 0, "@" },
- { oNoArmor, "no-armor", 0, "@"},
- { oNoArmor, "no-armour", 0, "@"},
- { oNoDefKeyring, "no-default-keyring", 0, "@" },
- { oNoGreeting, "no-greeting", 0, "@" },
- { oNoOptions, "no-options", 0, "@" }, /* shortcut for --options /dev/null */
- { oHomedir, "homedir", 2, "@" }, /* defaults to "~/.gnupg" */
- { oNoBatch, "no-batch", 0, "@" },
- { oWithColons, "with-colons", 0, "@"},
- { oWithKeyData,"with-key-data", 0, "@"},
- { oWithSigList,"with-sig-list", 0, "@"},
- { oWithSigCheck,"with-sig-check", 0, "@"},
- { aListKeys, "list-key", 0, "@" }, /* alias */
- { aListSigs, "list-sig", 0, "@" }, /* alias */
- { aCheckKeys, "check-sig",0, "@" }, /* alias */
- { oSkipVerify, "skip-verify",0, "@" },
- { oCompressKeys, "compress-keys",0, "@"},
- { oCompressSigs, "compress-sigs",0, "@"},
- { oDefCertLevel, "default-cert-check-level", 1, "@"}, /* Old option */
- { oAlwaysTrust, "always-trust", 0, "@"},
- { oTrustModel, "trust-model", 2, "@"},
- { oForceOwnertrust, "force-ownertrust", 2, "@"},
- { oSetFilename, "set-filename", 2, "@" },
- { oForYourEyesOnly, "for-your-eyes-only", 0, "@" },
- { oNoForYourEyesOnly, "no-for-your-eyes-only", 0, "@" },
- { oSetPolicyURL, "set-policy-url", 2, "@" },
- { oSigPolicyURL, "sig-policy-url", 2, "@" },
- { oCertPolicyURL, "cert-policy-url", 2, "@" },
- { oShowPolicyURL, "show-policy-url", 0, "@" },
- { oNoShowPolicyURL, "no-show-policy-url", 0, "@" },
- { oSigKeyserverURL, "sig-keyserver-url", 2, "@" },
- { oShowNotation, "show-notation", 0, "@" },
- { oNoShowNotation, "no-show-notation", 0, "@" },
- { oComment, "comment", 2, "@" },
- { oDefaultComment, "default-comment", 0, "@" },
- { oNoComments, "no-comments", 0, "@" },
- { oEmitVersion, "emit-version", 0, "@"},
- { oNoEmitVersion, "no-emit-version", 0, "@"},
- { oNoEmitVersion, "no-version", 0, "@"}, /* alias */
- { oNotDashEscaped, "not-dash-escaped", 0, "@" },
- { oEscapeFrom, "escape-from-lines", 0, "@" },
- { oNoEscapeFrom, "no-escape-from-lines", 0, "@" },
- { oLockOnce, "lock-once", 0, "@" },
- { oLockMultiple, "lock-multiple", 0, "@" },
- { oLockNever, "lock-never", 0, "@" },
- { oLoggerFD, "logger-fd",1, "@" },
- { oLoggerFile, "log-file",2, "@" },
- { oLoggerFile, "logger-file",2, "@" }, /* For 1.4 compatibility. */
- { oUseEmbeddedFilename, "use-embedded-filename", 0, "@" },
- { oNoUseEmbeddedFilename, "no-use-embedded-filename", 0, "@" },
- { oUtf8Strings, "utf8-strings", 0, "@" },
- { oNoUtf8Strings, "no-utf8-strings", 0, "@" },
- { oWithFingerprint, "with-fingerprint", 0, "@" },
- { oDisableCipherAlgo, "disable-cipher-algo", 2, "@" },
- { oDisablePubkeyAlgo, "disable-pubkey-algo", 2, "@" },
- { oAllowNonSelfsignedUID, "allow-non-selfsigned-uid", 0, "@" },
- { oNoAllowNonSelfsignedUID, "no-allow-non-selfsigned-uid", 0, "@" },
- { oAllowFreeformUID, "allow-freeform-uid", 0, "@" },
- { oNoAllowFreeformUID, "no-allow-freeform-uid", 0, "@" },
- { oNoLiteral, "no-literal", 0, "@" },
- { oSetFilesize, "set-filesize", 20, "@" },
- { oHonorHttpProxy,"honor-http-proxy", 0, "@" },
- { oFastListMode,"fast-list-mode", 0, "@" },
- { oFixedListMode,"fixed-list-mode", 0, "@" },
- { oListOnly, "list-only", 0, "@"},
- { oIgnoreTimeConflict, "ignore-time-conflict", 0, "@" },
- { oIgnoreValidFrom, "ignore-valid-from", 0, "@" },
- { oIgnoreCrcError, "ignore-crc-error", 0,"@" },
- { oIgnoreMDCError, "ignore-mdc-error", 0,"@" },
- { oShowSessionKey, "show-session-key", 0, "@" },
- { oOverrideSessionKey, "override-session-key", 2, "@" },
- { oNoRandomSeedFile, "no-random-seed-file", 0, "@" },
- { oAutoKeyRetrieve, "auto-key-retrieve", 0, "@" },
- { oNoAutoKeyRetrieve, "no-auto-key-retrieve", 0, "@" },
- { oNoSigCache, "no-sig-cache", 0, "@" },
- { oNoSigCreateCheck, "no-sig-create-check", 0, "@" },
- { oAutoCheckTrustDB, "auto-check-trustdb", 0, "@"},
- { oNoAutoCheckTrustDB, "no-auto-check-trustdb", 0, "@"},
- { oMergeOnly, "merge-only", 0, "@" },
- { oAllowSecretKeyImport, "allow-secret-key-import", 0, "@" },
- { oTryAllSecrets, "try-all-secrets", 0, "@" },
- { oEnableSpecialFilenames, "enable-special-filenames", 0, "@" },
- { oNoExpensiveTrustChecks, "no-expensive-trust-checks", 0, "@" },
- { aDeleteSecretAndPublicKeys, "delete-secret-and-public-keys",256, "@" },
- { aRebuildKeydbCaches, "rebuild-keydb-caches", 256, "@"},
- { oPreservePermissions, "preserve-permissions", 0, "@"},
- { oDefaultPreferenceList, "default-preference-list", 2, "@"},
- { oDefaultKeyserverURL, "default-keyserver-url", 2, "@"},
- { oPersonalCipherPreferences, "personal-cipher-preferences", 2, "@"},
- { oPersonalDigestPreferences, "personal-digest-preferences", 2, "@"},
- { oPersonalCompressPreferences, "personal-compress-preferences", 2, "@"},
- /* Aliases. I constantly mistype these, and assume other people
- do as well. */
- { oPersonalCipherPreferences, "personal-cipher-prefs", 2, "@"},
- { oPersonalDigestPreferences, "personal-digest-prefs", 2, "@"},
- { oPersonalCompressPreferences, "personal-compress-prefs", 2, "@"},
- { oAgentProgram, "agent-program", 2 , "@" },
- { oDisplay, "display", 2, "@" },
- { oTTYname, "ttyname", 2, "@" },
- { oTTYtype, "ttytype", 2, "@" },
- { oLCctype, "lc-ctype", 2, "@" },
- { oLCmessages, "lc-messages", 2, "@" },
- { oXauthority, "xauthority", 2, "@" },
- { oGroup, "group", 2, "@" },
- { oUnGroup, "ungroup", 2, "@" },
- { oNoGroups, "no-groups", 0, "@" },
- { oStrict, "strict", 0, "@" },
- { oNoStrict, "no-strict", 0, "@" },
- { oMangleDosFilenames, "mangle-dos-filenames", 0, "@" },
- { oNoMangleDosFilenames, "no-mangle-dos-filenames", 0, "@" },
- { oEnableProgressFilter, "enable-progress-filter", 0, "@" },
- { oMultifile, "multifile", 0, "@" },
- { oKeyidFormat, "keyid-format", 2, "@" },
- { oExitOnStatusWriteError, "exit-on-status-write-error", 0, "@" },
- { oLimitCardInsertTries, "limit-card-insert-tries", 1, "@"},
-
- { oAllowMultisigVerification, "allow-multisig-verification", 0, "@"},
- { oEnableDSA2, "enable-dsa2", 0, "@"},
- { oDisableDSA2, "disable-dsa2", 0, "@"},
- { oAllowMultipleMessages, "allow-multiple-messages", 0, "@"},
- { oNoAllowMultipleMessages, "no-allow-multiple-messages", 0, "@"},
-
- /* These two are aliases to help users of the PGP command line
- product use gpg with minimal pain. Many commands are common
- already as they seem to have borrowed commands from us. Now
- I'm returning the favor. */
- { oLocalUser, "sign-with", 2, "@" },
- { oRecipient, "user", 2, "@" },
-
- { oRequireCrossCert, "require-backsigs", 0, "@"},
- { oRequireCrossCert, "require-cross-certification", 0, "@"},
- { oNoRequireCrossCert, "no-require-backsigs", 0, "@"},
- { oNoRequireCrossCert, "no-require-cross-certification", 0, "@"},
- { oAutoKeyLocate, "auto-key-locate", 2, "@"},
- { oNoAutoKeyLocate, "no-auto-key-locate", 0, "@"},
-
- {0,NULL,0,NULL}
+ " --fingerprint [names] show fingerprints\n")),
+
+ /* More hidden commands and options. */
+ ARGPARSE_c (aPrintMDs, "print-mds", "@"), /* old */
+ ARGPARSE_c (aListTrustDB, "list-trustdb", "@"),
+ /* Not yet used:
+ ARGPARSE_c (aListTrustPath, "list-trust-path", "@"), */
+ ARGPARSE_c (aDeleteSecretAndPublicKeys,
+ "delete-secret-and-public-keys", "@"),
+ ARGPARSE_c (aRebuildKeydbCaches, "rebuild-keydb-caches", "@"),
+
+ ARGPARSE_s_s (oPasswd, "passphrase", "@"),
+ ARGPARSE_s_i (oPasswdFD, "passphrase-fd", "@"),
+ ARGPARSE_s_s (oPasswdFile, "passphrase-file", "@"),
+ ARGPARSE_s_i (oPasswdRepeat, "passphrase-repeat", "@"),
+ ARGPARSE_s_i (oCommandFD, "command-fd", "@"),
+ ARGPARSE_s_s (oCommandFile, "command-file", "@"),
+ ARGPARSE_s_n (oQuickRandom, "debug-quick-random", "@"),
+ ARGPARSE_s_n (oNoVerbose, "no-verbose", "@"),
+ ARGPARSE_s_s (oTrustDBName, "trustdb-name", "@"),
+ ARGPARSE_s_n (oNoSecmemWarn, "no-secmem-warning", "@"),
+ ARGPARSE_s_n (oRequireSecmem, "require-secmem", "@"),
+ ARGPARSE_s_n (oNoRequireSecmem, "no-require-secmem", "@"),
+ ARGPARSE_s_n (oNoPermissionWarn, "no-permission-warning", "@"),
+ ARGPARSE_s_n (oNoMDCWarn, "no-mdc-warning", "@"),
+ ARGPARSE_s_n (oNoArmor, "no-armor", "@"),
+ ARGPARSE_s_n (oNoArmor, "no-armour", "@"),
+ ARGPARSE_s_n (oNoDefKeyring, "no-default-keyring", "@"),
+ ARGPARSE_s_n (oNoGreeting, "no-greeting", "@"),
+ ARGPARSE_s_n (oNoOptions, "no-options", "@"),
+ ARGPARSE_s_s (oHomedir, "homedir", "@"),
+ ARGPARSE_s_n (oNoBatch, "no-batch", "@"),
+ ARGPARSE_s_n (oWithColons, "with-colons", "@"),
+ ARGPARSE_s_n (oWithKeyData,"with-key-data", "@"),
+ ARGPARSE_s_n (oWithSigList,"with-sig-list", "@"),
+ ARGPARSE_s_n (oWithSigCheck,"with-sig-check", "@"),
+ ARGPARSE_s_n (aListKeys, "list-key", "@"), /* alias */
+ ARGPARSE_s_n (aListSigs, "list-sig", "@"), /* alias */
+ ARGPARSE_s_n (aCheckKeys, "check-sig", "@"), /* alias */
+ ARGPARSE_s_n (oSkipVerify, "skip-verify", "@"),
+ ARGPARSE_s_n (oCompressKeys, "compress-keys", "@"),
+ ARGPARSE_s_n (oCompressSigs, "compress-sigs", "@"),
+ ARGPARSE_s_i (oDefCertLevel, "default-cert-check-level", "@"), /* old */
+ ARGPARSE_s_n (oAlwaysTrust, "always-trust", "@"),
+ ARGPARSE_s_s (oTrustModel, "trust-model", "@"),
+ ARGPARSE_s_s (oForceOwnertrust, "force-ownertrust", "@"),
+ ARGPARSE_s_s (oSetFilename, "set-filename", "@"),
+ ARGPARSE_s_n (oForYourEyesOnly, "for-your-eyes-only", "@"),
+ ARGPARSE_s_n (oNoForYourEyesOnly, "no-for-your-eyes-only", "@"),
+ ARGPARSE_s_s (oSetPolicyURL, "set-policy-url", "@"),
+ ARGPARSE_s_s (oSigPolicyURL, "sig-policy-url", "@"),
+ ARGPARSE_s_s (oCertPolicyURL, "cert-policy-url", "@"),
+ ARGPARSE_s_n (oShowPolicyURL, "show-policy-url", "@"),
+ ARGPARSE_s_n (oNoShowPolicyURL, "no-show-policy-url", "@"),
+ ARGPARSE_s_s (oSigKeyserverURL, "sig-keyserver-url", "@"),
+ ARGPARSE_s_n (oShowNotation, "show-notation", "@"),
+ ARGPARSE_s_n (oNoShowNotation, "no-show-notation", "@"),
+ ARGPARSE_s_s (oComment, "comment", "@"),
+ ARGPARSE_s_n (oDefaultComment, "default-comment", "@"),
+ ARGPARSE_s_n (oNoComments, "no-comments", "@"),
+ ARGPARSE_s_n (oEmitVersion, "emit-version", "@"),
+ ARGPARSE_s_n (oNoEmitVersion, "no-emit-version", "@"),
+ ARGPARSE_s_n (oNoEmitVersion, "no-version", "@"), /* alias */
+ ARGPARSE_s_n (oNotDashEscaped, "not-dash-escaped", "@"),
+ ARGPARSE_s_n (oEscapeFrom, "escape-from-lines", "@"),
+ ARGPARSE_s_n (oNoEscapeFrom, "no-escape-from-lines", "@"),
+ ARGPARSE_s_n (oLockOnce, "lock-once", "@"),
+ ARGPARSE_s_n (oLockMultiple, "lock-multiple", "@"),
+ ARGPARSE_s_n (oLockNever, "lock-never", "@"),
+ ARGPARSE_s_i (oLoggerFD, "logger-fd", "@"),
+ ARGPARSE_s_s (oLoggerFile, "log-file", "@"),
+ ARGPARSE_s_s (oLoggerFile, "logger-file", "@"), /* 1.4 compatibility. */
+ ARGPARSE_s_n (oUseEmbeddedFilename, "use-embedded-filename", "@"),
+ ARGPARSE_s_n (oNoUseEmbeddedFilename, "no-use-embedded-filename", "@"),
+ ARGPARSE_s_n (oUtf8Strings, "utf8-strings", "@"),
+ ARGPARSE_s_n (oNoUtf8Strings, "no-utf8-strings", "@"),
+ ARGPARSE_s_n (oWithFingerprint, "with-fingerprint", "@"),
+ ARGPARSE_s_s (oDisableCipherAlgo, "disable-cipher-algo", "@"),
+ ARGPARSE_s_s (oDisablePubkeyAlgo, "disable-pubkey-algo", "@"),
+ ARGPARSE_s_n (oAllowNonSelfsignedUID, "allow-non-selfsigned-uid", "@"),
+ ARGPARSE_s_n (oNoAllowNonSelfsignedUID, "no-allow-non-selfsigned-uid", "@"),
+ ARGPARSE_s_n (oAllowFreeformUID, "allow-freeform-uid", "@"),
+ ARGPARSE_s_n (oNoAllowFreeformUID, "no-allow-freeform-uid", "@"),
+ ARGPARSE_s_n (oNoLiteral, "no-literal", "@"),
+ ARGPARSE_p_u (oSetFilesize, "set-filesize", "@"),
+ ARGPARSE_s_n (oHonorHttpProxy, "honor-http-proxy", "@"),
+ ARGPARSE_s_n (oFastListMode, "fast-list-mode", "@"),
+ ARGPARSE_s_n (oFixedListMode, "fixed-list-mode", "@"),
+ ARGPARSE_s_n (oListOnly, "list-only", "@"),
+ ARGPARSE_s_n (oIgnoreTimeConflict, "ignore-time-conflict", "@"),
+ ARGPARSE_s_n (oIgnoreValidFrom, "ignore-valid-from", "@"),
+ ARGPARSE_s_n (oIgnoreCrcError, "ignore-crc-error", "@"),
+ ARGPARSE_s_n (oIgnoreMDCError, "ignore-mdc-error", "@"),
+ ARGPARSE_s_n (oShowSessionKey, "show-session-key", "@"),
+ ARGPARSE_s_s (oOverrideSessionKey, "override-session-key", "@"),
+ ARGPARSE_s_n (oNoRandomSeedFile, "no-random-seed-file", "@"),
+ ARGPARSE_s_n (oAutoKeyRetrieve, "auto-key-retrieve", "@"),
+ ARGPARSE_s_n (oNoAutoKeyRetrieve, "no-auto-key-retrieve", "@"),
+ ARGPARSE_s_n (oNoSigCache, "no-sig-cache", "@"),
+ ARGPARSE_s_n (oNoSigCreateCheck, "no-sig-create-check", "@"),
+ ARGPARSE_s_n (oAutoCheckTrustDB, "auto-check-trustdb", "@"),
+ ARGPARSE_s_n (oNoAutoCheckTrustDB, "no-auto-check-trustdb", "@"),
+ ARGPARSE_s_n (oMergeOnly, "merge-only", "@" ),
+ ARGPARSE_s_n (oAllowSecretKeyImport, "allow-secret-key-import", "@"),
+ ARGPARSE_s_n (oTryAllSecrets, "try-all-secrets", "@"),
+ ARGPARSE_s_n (oEnableSpecialFilenames, "enable-special-filenames", "@"),
+ ARGPARSE_s_n (oNoExpensiveTrustChecks, "no-expensive-trust-checks", "@"),
+ ARGPARSE_s_n (oPreservePermissions, "preserve-permissions", "@"),
+ ARGPARSE_s_s (oDefaultPreferenceList, "default-preference-list", "@"),
+ ARGPARSE_s_s (oDefaultKeyserverURL, "default-keyserver-url", "@"),
+ ARGPARSE_s_s (oPersonalCipherPreferences, "personal-cipher-preferences","@"),
+ ARGPARSE_s_s (oPersonalDigestPreferences, "personal-digest-preferences","@"),
+ ARGPARSE_s_s (oPersonalCompressPreferences,
+ "personal-compress-preferences", "@"),
+
+ /* Aliases. I constantly mistype these, and assume other people do
+ as well. */
+ ARGPARSE_s_s (oPersonalCipherPreferences, "personal-cipher-prefs", "@"),
+ ARGPARSE_s_s (oPersonalDigestPreferences, "personal-digest-prefs", "@"),
+ ARGPARSE_s_s (oPersonalCompressPreferences, "personal-compress-prefs", "@"),
+ ARGPARSE_s_s (oAgentProgram, "agent-program", "@"),
+ ARGPARSE_s_s (oDisplay, "display", "@"),
+ ARGPARSE_s_s (oTTYname, "ttyname", "@"),
+ ARGPARSE_s_s (oTTYtype, "ttytype", "@"),
+ ARGPARSE_s_s (oLCctype, "lc-ctype", "@"),
+ ARGPARSE_s_s (oLCmessages, "lc-messages","@"),
+ ARGPARSE_s_s (oXauthority, "xauthority", "@"),
+ ARGPARSE_s_s (oGroup, "group", "@"),
+ ARGPARSE_s_s (oUnGroup, "ungroup", "@"),
+ ARGPARSE_s_n (oNoGroups, "no-groups", "@"),
+ ARGPARSE_s_n (oStrict, "strict", "@"),
+ ARGPARSE_s_n (oNoStrict, "no-strict", "@"),
+ ARGPARSE_s_n (oMangleDosFilenames, "mangle-dos-filenames", "@"),
+ ARGPARSE_s_n (oNoMangleDosFilenames, "no-mangle-dos-filenames", "@"),
+ ARGPARSE_s_n (oEnableProgressFilter, "enable-progress-filter", "@"),
+ ARGPARSE_s_n (oMultifile, "multifile", "@"),
+ ARGPARSE_s_s (oKeyidFormat, "keyid-format", "@"),
+ ARGPARSE_s_n (oExitOnStatusWriteError, "exit-on-status-write-error", "@"),
+ ARGPARSE_s_i (oLimitCardInsertTries, "limit-card-insert-tries", "@"),
+
+ ARGPARSE_s_n (oAllowMultisigVerification,
+ "allow-multisig-verification", "@"),
+ ARGPARSE_s_n (oEnableDSA2, "enable-dsa2", "@"),
+ ARGPARSE_s_n (oDisableDSA2, "disable-dsa2", "@"),
+ ARGPARSE_s_n (oAllowMultipleMessages, "allow-multiple-messages", "@"),
+ ARGPARSE_s_n (oNoAllowMultipleMessages, "no-allow-multiple-messages", "@"),
+
+ /* These two are aliases to help users of the PGP command line
+ product use gpg with minimal pain. Many commands are common
+ already as they seem to have borrowed commands from us. Now I'm
+ returning the favor. */
+ ARGPARSE_s_s (oLocalUser, "sign-with", "@"),
+ ARGPARSE_s_s (oRecipient, "user", "@"),
+
+ ARGPARSE_s_n (oRequireCrossCert, "require-backsigs", "@"),
+ ARGPARSE_s_n (oRequireCrossCert, "require-cross-certification", "@"),
+ ARGPARSE_s_n (oNoRequireCrossCert, "no-require-backsigs", "@"),
+ ARGPARSE_s_n (oNoRequireCrossCert, "no-require-cross-certification", "@"),
+
+ /* New options. Fixme: Should go more to the top. */
+ ARGPARSE_s_s (oAutoKeyLocate, "auto-key-locate", "@"),
+ ARGPARSE_s_n (oNoAutoKeyLocate, "no-auto-key-locate", "@"),
+
+ ARGPARSE_end ()
};
@@ -2880,7 +2909,9 @@ main (int argc, char **argv)
case oNoop: break;
- default : pargs.err = configfp? 1:2; break;
+ default:
+ pargs.err = configfp? ARGPARSE_PRINT_WARNING:ARGPARSE_PRINT_ERROR;
+ break;
}
}