summaryrefslogtreecommitdiff
path: root/src/timezone/strftime.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2009-06-11 14:49:15 +0000
committerBruce Momjian <bruce@momjian.us>2009-06-11 14:49:15 +0000
commitd7471402794266078953f1bd113dab4913d631a1 (patch)
tree618e392a84eaf837e00bf78f8694097b78fec227 /src/timezone/strftime.c
parent4e86efb4e51b66ef57b3fe6f28576de23a1bf1c6 (diff)
downloadpostgresql-d7471402794266078953f1bd113dab4913d631a1.tar.gz
8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list
provided by Andrew.
Diffstat (limited to 'src/timezone/strftime.c')
-rw-r--r--src/timezone/strftime.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/timezone/strftime.c b/src/timezone/strftime.c
index 3d9d4274c5..39443af9d5 100644
--- a/src/timezone/strftime.c
+++ b/src/timezone/strftime.c
@@ -15,7 +15,7 @@
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/timezone/strftime.c,v 1.13 2008/02/19 12:06:35 mha Exp $
+ * $PostgreSQL: pgsql/src/timezone/strftime.c,v 1.14 2009/06/11 14:49:15 momjian Exp $
*/
#include "postgres.h"
@@ -92,8 +92,8 @@ static char *_add(const char *, char *, const char *);
static char *_conv(int, const char *, char *, const char *);
static char *_fmt(const char *, const struct pg_tm *, char *,
const char *, int *);
-static char * _yconv(const int, const int, const int, const int,
- char *, const char * const);
+static char *_yconv(const int, const int, const int, const int,
+ char *, const char *const);
#define IN_NONE 0
#define IN_SOME 1
@@ -368,11 +368,11 @@ _fmt(const char *format, const struct pg_tm * t, char *pt, const char *ptlim,
{
*warnp = IN_ALL;
pt = _yconv(year, base, 0, 1,
- pt, ptlim);
+ pt, ptlim);
}
else
pt = _yconv(year, base, 1, 1,
- pt, ptlim);
+ pt, ptlim);
}
continue;
case 'v':
@@ -493,13 +493,13 @@ _add(const char *str, char *pt, const char *ptlim)
* with more only if necessary.
*/
static char *
-_yconv(const int a, const int b, const int convert_top,
- const int convert_yy, char *pt, const char * const ptlim)
+_yconv(const int a, const int b, const int convert_top,
+ const int convert_yy, char *pt, const char *const ptlim)
{
- int lead;
- int trail;
-
-#define DIVISOR 100
+ int lead;
+ int trail;
+
+#define DIVISOR 100
trail = a % DIVISOR + b % DIVISOR;
lead = a / DIVISOR + b / DIVISOR + trail / DIVISOR;
trail %= DIVISOR;
@@ -517,10 +517,10 @@ _yconv(const int a, const int b, const int convert_top,
{
if (lead == 0 && trail < 0)
pt = _add("-0", pt, ptlim);
- else pt = _conv(lead, "%02d", pt, ptlim);
+ else
+ pt = _conv(lead, "%02d", pt, ptlim);
}
if (convert_yy)
pt = _conv(((trail < 0) ? -trail : trail), "%02d", pt, ptlim);
return pt;
}
-