1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-29 10:41:53 +03:00

8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list

provided by Andrew.
This commit is contained in:
Bruce Momjian
2009-06-11 14:49:15 +00:00
parent 4e86efb4e5
commit d747140279
654 changed files with 11900 additions and 11387 deletions

View File

@ -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;
}