mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Add trailing commas to enum definitions
Since C99, there can be a trailing comma after the last value in an enum definition. A lot of new code has been introducing this style on the fly. Some new patches are now taking an inconsistent approach to this. Some add the last comma on the fly if they add a new last value, some are trying to preserve the existing style in each place, some are even dropping the last comma if there was one. We could nudge this all in a consistent direction if we just add the trailing commas everywhere once. I omitted a few places where there was a fixed "last" value that will always stay last. I also skipped the header files of libpq and ecpg, in case people want to use those with older compilers. There were also a small number of cases where the enum type wasn't used anywhere (but the enum values were), which ended up confusing pgindent a bit, so I left those alone. Discussion: https://www.postgresql.org/message-id/flat/386f8c45-c8ac-4681-8add-e3b0852c1620%40eisentraut.org
This commit is contained in:
@ -38,7 +38,7 @@ enum PGP_S2K_TYPE
|
||||
{
|
||||
PGP_S2K_SIMPLE = 0,
|
||||
PGP_S2K_SALTED = 1,
|
||||
PGP_S2K_ISALTED = 3
|
||||
PGP_S2K_ISALTED = 3,
|
||||
};
|
||||
|
||||
enum PGP_PKT_TYPE
|
||||
@ -60,7 +60,7 @@ enum PGP_PKT_TYPE
|
||||
PGP_PKT_USER_ATTR = 17,
|
||||
PGP_PKT_SYMENCRYPTED_DATA_MDC = 18,
|
||||
PGP_PKT_MDC = 19,
|
||||
PGP_PKT_PRIV_61 = 61 /* occurs in gpg secring */
|
||||
PGP_PKT_PRIV_61 = 61, /* occurs in gpg secring */
|
||||
};
|
||||
|
||||
enum PGP_PUB_ALGO_TYPE
|
||||
@ -69,7 +69,7 @@ enum PGP_PUB_ALGO_TYPE
|
||||
PGP_PUB_RSA_ENCRYPT = 2,
|
||||
PGP_PUB_RSA_SIGN = 3,
|
||||
PGP_PUB_ELG_ENCRYPT = 16,
|
||||
PGP_PUB_DSA_SIGN = 17
|
||||
PGP_PUB_DSA_SIGN = 17,
|
||||
};
|
||||
|
||||
enum PGP_SYMENC_TYPE
|
||||
@ -84,7 +84,7 @@ enum PGP_SYMENC_TYPE
|
||||
PGP_SYM_AES_128 = 7, /* should */
|
||||
PGP_SYM_AES_192 = 8,
|
||||
PGP_SYM_AES_256 = 9,
|
||||
PGP_SYM_TWOFISH = 10
|
||||
PGP_SYM_TWOFISH = 10,
|
||||
};
|
||||
|
||||
enum PGP_COMPR_TYPE
|
||||
@ -92,7 +92,7 @@ enum PGP_COMPR_TYPE
|
||||
PGP_COMPR_NONE = 0, /* must */
|
||||
PGP_COMPR_ZIP = 1, /* should */
|
||||
PGP_COMPR_ZLIB = 2,
|
||||
PGP_COMPR_BZIP2 = 3
|
||||
PGP_COMPR_BZIP2 = 3,
|
||||
};
|
||||
|
||||
enum PGP_DIGEST_TYPE
|
||||
@ -106,7 +106,7 @@ enum PGP_DIGEST_TYPE
|
||||
PGP_DIGEST_HAVAL5_160 = 7, /* obsolete */
|
||||
PGP_DIGEST_SHA256 = 8,
|
||||
PGP_DIGEST_SHA384 = 9,
|
||||
PGP_DIGEST_SHA512 = 10
|
||||
PGP_DIGEST_SHA512 = 10,
|
||||
};
|
||||
|
||||
#define PGP_MAX_KEY (256/8)
|
||||
|
Reference in New Issue
Block a user