mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Phase 3 of pgindent updates.
Don't move parenthesized lines to the left, even if that means they flow past the right margin. By default, BSD indent lines up statement continuation lines that are within parentheses so that they start just to the right of the preceding left parenthesis. However, traditionally, if that resulted in the continuation line extending to the right of the desired right margin, then indent would push it left just far enough to not overrun the margin, if it could do so without making the continuation line start to the left of the current statement indent. That makes for a weird mix of indentations unless one has been completely rigid about never violating the 80-column limit. This behavior has been pretty universally panned by Postgres developers. Hence, disable it with indent's new -lpl switch, so that parenthesized lines are always lined up with the preceding left paren. This patch is much less interesting than the first round of indent changes, but also bulkier, so I thought it best to separate the effects. Discussion: https://postgr.es/m/E1dAmxK-0006EE-1r@gemulon.postgresql.org Discussion: https://postgr.es/m/30527.1495162840@sss.pgh.pa.us
This commit is contained in:
@ -737,7 +737,7 @@ _crypt_blowfish_rn(const char *key, const char *setting,
|
||||
|
||||
memcpy(output, setting, 7 + 22 - 1);
|
||||
output[7 + 22 - 1] = BF_itoa64[(int)
|
||||
BF_atoi64[(int) setting[7 + 22 - 1] - 0x20] & 0x30];
|
||||
BF_atoi64[(int) setting[7 + 22 - 1] - 0x20] & 0x30];
|
||||
|
||||
/* This has to be bug-compatible with the original implementation, so
|
||||
* only encode 23 of the 24 bytes. :-) */
|
||||
|
@ -23,7 +23,7 @@ static unsigned char _crypt_itoa64[64 + 1] =
|
||||
|
||||
char *
|
||||
_crypt_gensalt_traditional_rn(unsigned long count,
|
||||
const char *input, int size, char *output, int output_size)
|
||||
const char *input, int size, char *output, int output_size)
|
||||
{
|
||||
if (size < 2 || output_size < 2 + 1 || (count && count != 25))
|
||||
{
|
||||
@ -41,7 +41,7 @@ _crypt_gensalt_traditional_rn(unsigned long count,
|
||||
|
||||
char *
|
||||
_crypt_gensalt_extended_rn(unsigned long count,
|
||||
const char *input, int size, char *output, int output_size)
|
||||
const char *input, int size, char *output, int output_size)
|
||||
{
|
||||
unsigned long value;
|
||||
|
||||
@ -77,7 +77,7 @@ _crypt_gensalt_extended_rn(unsigned long count,
|
||||
|
||||
char *
|
||||
_crypt_gensalt_md5_rn(unsigned long count,
|
||||
const char *input, int size, char *output, int output_size)
|
||||
const char *input, int size, char *output, int output_size)
|
||||
{
|
||||
unsigned long value;
|
||||
|
||||
@ -159,7 +159,7 @@ BF_encode(char *dst, const BF_word *src, int size)
|
||||
|
||||
char *
|
||||
_crypt_gensalt_blowfish_rn(unsigned long count,
|
||||
const char *input, int size, char *output, int output_size)
|
||||
const char *input, int size, char *output, int output_size)
|
||||
{
|
||||
if (size < 16 || output_size < 7 + 22 + 1 ||
|
||||
(count && (count < 4 || count > 31)))
|
||||
|
@ -818,7 +818,7 @@ parse_key_value_arrays(ArrayType *key_array, ArrayType *val_array,
|
||||
if (!string_is_ascii(v))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
||||
errmsg("header key must not contain non-ASCII characters")));
|
||||
errmsg("header key must not contain non-ASCII characters")));
|
||||
if (strstr(v, ": "))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
||||
@ -840,7 +840,7 @@ parse_key_value_arrays(ArrayType *key_array, ArrayType *val_array,
|
||||
if (!string_is_ascii(v))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
||||
errmsg("header value must not contain non-ASCII characters")));
|
||||
errmsg("header value must not contain non-ASCII characters")));
|
||||
if (strchr(v, '\n'))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
||||
|
@ -57,13 +57,13 @@ int px_gen_salt(const char *salt_type, char *dst, int rounds);
|
||||
|
||||
/* crypt-gensalt.c */
|
||||
char *_crypt_gensalt_traditional_rn(unsigned long count,
|
||||
const char *input, int size, char *output, int output_size);
|
||||
const char *input, int size, char *output, int output_size);
|
||||
char *_crypt_gensalt_extended_rn(unsigned long count,
|
||||
const char *input, int size, char *output, int output_size);
|
||||
const char *input, int size, char *output, int output_size);
|
||||
char *_crypt_gensalt_md5_rn(unsigned long count,
|
||||
const char *input, int size, char *output, int output_size);
|
||||
const char *input, int size, char *output, int output_size);
|
||||
char *_crypt_gensalt_blowfish_rn(unsigned long count,
|
||||
const char *input, int size, char *output, int output_size);
|
||||
const char *input, int size, char *output, int output_size);
|
||||
|
||||
/* disable 'extended DES crypt' */
|
||||
/* #define DISABLE_XDES */
|
||||
|
Reference in New Issue
Block a user