mirror of
https://github.com/postgres/postgres.git
synced 2025-06-16 06:01:02 +03:00
Initial pgindent run for v12.
This is still using the 2.0 version of pg_bsd_indent. I thought it would be good to commit this separately, so as to document the differences between 2.0 and 2.1 behavior. Discussion: https://postgr.es/m/16296.1558103386@sss.pgh.pa.us
This commit is contained in:
@ -3023,6 +3023,7 @@ DCH_from_char(FormatNode *node, char *in, TmFromChar *out)
|
||||
int len,
|
||||
value;
|
||||
bool fx_mode = false;
|
||||
|
||||
/* number of extra skipped characters (more than given in format string) */
|
||||
int extra_skip = 0;
|
||||
|
||||
@ -3049,8 +3050,8 @@ DCH_from_char(FormatNode *node, char *in, TmFromChar *out)
|
||||
/*
|
||||
* In non FX (fixed format) mode one format string space or
|
||||
* separator match to one space or separator in input string.
|
||||
* Or match nothing if there is no space or separator in
|
||||
* the current position of input string.
|
||||
* Or match nothing if there is no space or separator in the
|
||||
* current position of input string.
|
||||
*/
|
||||
extra_skip--;
|
||||
if (isspace((unsigned char) *s) || is_separator_char(s))
|
||||
@ -3176,11 +3177,13 @@ DCH_from_char(FormatNode *node, char *in, TmFromChar *out)
|
||||
n->key->name)));
|
||||
break;
|
||||
case DCH_TZH:
|
||||
|
||||
/*
|
||||
* Value of TZH might be negative. And the issue is that we
|
||||
* might swallow minus sign as the separator. So, if we have
|
||||
* skipped more characters than specified in the format string,
|
||||
* then we consider prepending last skipped minus to TZH.
|
||||
* skipped more characters than specified in the format
|
||||
* string, then we consider prepending last skipped minus to
|
||||
* TZH.
|
||||
*/
|
||||
if (*s == '+' || *s == '-' || *s == ' ')
|
||||
{
|
||||
|
Reference in New Issue
Block a user