From be76af171cdb3e7465c4ef234af403f97ad79b7b Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 22 May 2019 12:55:34 -0400 Subject: 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 --- src/backend/utils/adt/formatting.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/backend/utils/adt/formatting.c') diff --git a/src/backend/utils/adt/formatting.c b/src/backend/utils/adt/formatting.c index 69a691f18e7..3a6a878ffac 100644 --- a/src/backend/utils/adt/formatting.c +++ b/src/backend/utils/adt/formatting.c @@ -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 == ' ') { -- cgit v1.2.3