Mark various pgp value tables read-only as they should be

This commit is contained in:
Panu Matilainen 2008-03-06 18:56:38 +02:00
parent 2f833b0a05
commit 84ff15177d
2 changed files with 20 additions and 20 deletions

View File

@ -23,7 +23,7 @@ static pgpDig _dig = NULL;
static pgpDigParams _digp = NULL;
struct pgpValTbl_s pgpSigTypeTbl[] = {
const struct pgpValTbl_s const pgpSigTypeTbl[] = {
{ PGPSIGTYPE_BINARY, "Binary document signature" },
{ PGPSIGTYPE_TEXT, "Text document signature" },
{ PGPSIGTYPE_STANDALONE, "Standalone signature" },
@ -40,7 +40,7 @@ struct pgpValTbl_s pgpSigTypeTbl[] = {
{ -1, "Unknown signature type" },
};
struct pgpValTbl_s pgpPubkeyTbl[] = {
const struct pgpValTbl_s const pgpPubkeyTbl[] = {
{ PGPPUBKEYALGO_RSA, "RSA" },
{ PGPPUBKEYALGO_RSA_ENCRYPT,"RSA(Encrypt-Only)" },
{ PGPPUBKEYALGO_RSA_SIGN, "RSA(Sign-Only)" },
@ -53,7 +53,7 @@ struct pgpValTbl_s pgpPubkeyTbl[] = {
{ -1, "Unknown public key algorithm" },
};
struct pgpValTbl_s pgpSymkeyTbl[] = {
const struct pgpValTbl_s const pgpSymkeyTbl[] = {
{ PGPSYMKEYALGO_PLAINTEXT, "Plaintext" },
{ PGPSYMKEYALGO_IDEA, "IDEA" },
{ PGPSYMKEYALGO_TRIPLE_DES, "3DES" },
@ -69,7 +69,7 @@ struct pgpValTbl_s pgpSymkeyTbl[] = {
{ -1, "Unknown symmetric key algorithm" },
};
struct pgpValTbl_s pgpCompressionTbl[] = {
const struct pgpValTbl_s const pgpCompressionTbl[] = {
{ PGPCOMPRESSALGO_NONE, "Uncompressed" },
{ PGPCOMPRESSALGO_ZIP, "ZIP" },
{ PGPCOMPRESSALGO_ZLIB, "ZLIB" },
@ -77,7 +77,7 @@ struct pgpValTbl_s pgpCompressionTbl[] = {
{ -1, "Unknown compression algorithm" },
};
struct pgpValTbl_s pgpHashTbl[] = {
const struct pgpValTbl_s const pgpHashTbl[] = {
{ PGPHASHALGO_MD5, "MD5" },
{ PGPHASHALGO_SHA1, "SHA1" },
{ PGPHASHALGO_RIPEMD160, "RIPEMD160" },
@ -90,12 +90,12 @@ struct pgpValTbl_s pgpHashTbl[] = {
{ -1, "Unknown hash algorithm" },
};
struct pgpValTbl_s pgpKeyServerPrefsTbl[] = {
const struct pgpValTbl_s const pgpKeyServerPrefsTbl[] = {
{ 0x80, "No-modify" },
{ -1, "Unknown key server preference" },
};
struct pgpValTbl_s pgpSubTypeTbl[] = {
const struct pgpValTbl_s const pgpSubTypeTbl[] = {
{ PGPSUBTYPE_SIG_CREATE_TIME,"signature creation time" },
{ PGPSUBTYPE_SIG_EXPIRE_TIME,"signature expiration time" },
{ PGPSUBTYPE_EXPORTABLE_CERT,"exportable certification" },
@ -134,7 +134,7 @@ struct pgpValTbl_s pgpSubTypeTbl[] = {
{ -1, "Unknown signature subkey type" },
};
struct pgpValTbl_s pgpTagTbl[] = {
const struct pgpValTbl_s const pgpTagTbl[] = {
{ PGPTAG_PUBLIC_SESSION_KEY,"Public-Key Encrypted Session Key" },
{ PGPTAG_SIGNATURE, "Signature" },
{ PGPTAG_SYMMETRIC_SESSION_KEY,"Symmetric-Key Encrypted Session Key" },
@ -160,7 +160,7 @@ struct pgpValTbl_s pgpTagTbl[] = {
{ -1, "Unknown packet tag" },
};
struct pgpValTbl_s pgpArmorTbl[] = {
const struct pgpValTbl_s const pgpArmorTbl[] = {
{ PGPARMOR_MESSAGE, "MESSAGE" },
{ PGPARMOR_PUBKEY, "PUBLIC KEY BLOCK" },
{ PGPARMOR_SIGNATURE, "SIGNATURE" },
@ -171,7 +171,7 @@ struct pgpValTbl_s pgpArmorTbl[] = {
{ -1, "Unknown armor block" }
};
struct pgpValTbl_s pgpArmorKeyTbl[] = {
const struct pgpValTbl_s const pgpArmorKeyTbl[] = {
{ PGPARMORKEY_VERSION, "Version: " },
{ PGPARMORKEY_COMMENT, "Comment: " },
{ PGPARMORKEY_MESSAGEID, "MessageID: " },

View File

@ -37,7 +37,7 @@ typedef uint8_t pgpTime_t[4];
*/
typedef const struct pgpValTbl_s {
int val;
const char * str;
const char const * str;
} * pgpValTbl;
/** \ingroup rpmpgp
@ -75,7 +75,7 @@ typedef enum pgpTag_e {
/** \ingroup rpmpgp
*/
extern struct pgpValTbl_s pgpTagTbl[];
extern const struct pgpValTbl_s const pgpTagTbl[];
/** \ingroup rpmpgp
* 5.1. Public-Key Encrypted Session Key Packets (Tag 1)
@ -146,7 +146,7 @@ typedef enum pgpSigType_e {
/** \ingroup rpmpgp
*/
extern struct pgpValTbl_s pgpSigTypeTbl[];
extern const struct pgpValTbl_s const pgpSigTypeTbl[];
/** \ingroup rpmpgp
* 9.1. Public Key Algorithms
@ -185,7 +185,7 @@ typedef enum pgpPubkeyAlgo_e {
/** \ingroup rpmpgp
*/
extern struct pgpValTbl_s pgpPubkeyTbl[];
extern const struct pgpValTbl_s const pgpPubkeyTbl[];
/** \ingroup rpmpgp
* 9.2. Symmetric Key Algorithms
@ -229,7 +229,7 @@ typedef enum pgpSymkeyAlgo_e {
/** \ingroup rpmpgp
* Symmetric key (string, value) pairs.
*/
extern struct pgpValTbl_s pgpSymkeyTbl[];
extern const struct pgpValTbl_s const pgpSymkeyTbl[];
/** \ingroup rpmpgp
* 9.3. Compression Algorithms
@ -256,7 +256,7 @@ typedef enum pgpCompressAlgo_e {
/** \ingroup rpmpgp
* Compression (string, value) pairs.
*/
extern struct pgpValTbl_s pgpCompressionTbl[];
extern const struct pgpValTbl_s const pgpCompressionTbl[];
/** \ingroup rpmpgp
* 9.4. Hash Algorithms
@ -294,7 +294,7 @@ typedef enum pgpHashAlgo_e {
/** \ingroup rpmpgp
* Hash (string, value) pairs.
*/
extern struct pgpValTbl_s pgpHashTbl[];
extern const struct pgpValTbl_s const pgpHashTbl[];
/** \ingroup rpmpgp
* 5.2.2. Version 3 Signature Packet Format
@ -467,7 +467,7 @@ typedef enum pgpSubType_e {
/** \ingroup rpmpgp
* Subtype (string, value) pairs.
*/
extern struct pgpValTbl_s pgpSubTypeTbl[];
extern const struct pgpValTbl_s const pgpSubTypeTbl[];
/** \ingroup rpmpgp
* 5.2. Signature Packet (Tag 2)
@ -942,7 +942,7 @@ typedef enum pgpArmor_e {
/** \ingroup rpmpgp
* Armor (string, value) pairs.
*/
extern struct pgpValTbl_s pgpArmorTbl[];
extern const struct pgpValTbl_s const pgpArmorTbl[];
/** \ingroup rpmpgp
*/
@ -957,7 +957,7 @@ typedef enum pgpArmorKey_e {
/** \ingroup rpmpgp
* Armor key (string, value) pairs.
*/
extern struct pgpValTbl_s pgpArmorKeyTbl[];
extern const struct pgpValTbl_s const pgpArmorKeyTbl[];
/** \ingroup rpmpgp
* Bit(s) to control digest operation.