1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-25 01:02:05 +03:00

pgindent run for 8.3.

This commit is contained in:
Bruce Momjian
2007-11-15 21:14:46 +00:00
parent 3adc760fb9
commit fdf5a5efb7
486 changed files with 10044 additions and 9664 deletions

View File

@ -3,7 +3,7 @@
* 1996-06-05 by Arthur David Olson (arthur_david_olson@nih.gov).
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/timezone/localtime.c,v 1.18 2007/10/26 13:30:10 tgl Exp $
* $PostgreSQL: pgsql/src/timezone/localtime.c,v 1.19 2007/11/15 21:14:46 momjian Exp $
*/
/*
@ -122,7 +122,7 @@ detzcode(const char *codep)
}
int
tzload(const char *name, char *canonname, struct state *sp)
tzload(const char *name, char *canonname, struct state * sp)
{
const char *p;
int i;
@ -549,10 +549,11 @@ tzparse(const char *name, struct state * sp, int lastditch)
if (stdlen >= sizeof sp->chars)
stdlen = (sizeof sp->chars) - 1;
stdoffset = 0;
/*
* Unlike the original zic library, do NOT invoke tzload() here;
* we can't assume pg_open_tzfile() is sane yet, and we don't
* care about leap seconds anyway.
* Unlike the original zic library, do NOT invoke tzload() here; we
* can't assume pg_open_tzfile() is sane yet, and we don't care about
* leap seconds anyway.
*/
load_result = -1;
}
@ -1081,7 +1082,7 @@ pg_get_timezone_offset(const pg_tz *tz, long int *gmtoff)
{
/*
* The zone could have more than one ttinfo, if it's historically used
* more than one abbreviation. We return TRUE as long as they all have
* more than one abbreviation. We return TRUE as long as they all have
* the same gmtoff.
*/
const struct state *sp;

View File

@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/timezone/pgtz.c,v 1.54 2007/08/25 20:29:25 tgl Exp $
* $PostgreSQL: pgsql/src/timezone/pgtz.c,v 1.55 2007/11/15 21:14:46 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -39,8 +39,8 @@ static pg_tz gmt_timezone_data;
static bool scan_directory_ci(const char *dirname,
const char *fname, int fnamelen,
char *canonname, int canonnamelen);
const char *fname, int fnamelen,
char *canonname, int canonnamelen);
static const char *identify_system_timezone(void);
static pg_tz *get_pg_tz_for_zone(const char *tzname);
static pg_tz *select_default_timezone(void);
@ -100,7 +100,7 @@ pg_open_tzfile(const char *name, char *canonname)
for (;;)
{
const char *slashptr;
int fnamelen;
int fnamelen;
slashptr = strchr(fname, '/');
if (slashptr)
@ -130,7 +130,7 @@ pg_open_tzfile(const char *name, char *canonname)
/*
* Scan specified directory for a case-insensitive match to fname
* (of length fnamelen --- fname may not be null terminated!). If found,
* (of length fnamelen --- fname may not be null terminated!). If found,
* copy the actual filename into canonname and return true.
*/
static bool
@ -153,7 +153,7 @@ scan_directory_ci(const char *dirname, const char *fname, int fnamelen,
while ((direntry = ReadDir(dirdesc, dirname)) != NULL)
{
/*
* Ignore . and .., plus any other "hidden" files. This is a security
* Ignore . and .., plus any other "hidden" files. This is a security
* measure to prevent access to files outside the timezone directory.
*/
if (direntry->d_name[0] == '.')
@ -907,7 +907,7 @@ static const struct
"Australia/Perth"
}, /* (GMT+08:00) Perth */
/* {"W. Central Africa Standard Time", "W. Central Africa Daylight Time",
* * * * * ""}, Could not find a match for this one. Excluded for now. *//* (
* * * * * * ""}, Could not find a match for this one. Excluded for now. *//* (
* G MT+01:00) West Central Africa */
{
"W. Europe Standard Time", "W. Europe Daylight Time",
@ -1087,7 +1087,7 @@ typedef struct
/* tznameupper contains the all-upper-case name of the timezone */
char tznameupper[TZ_STRLEN_MAX + 1];
pg_tz tz;
} pg_tz_cache;
} pg_tz_cache;
static HTAB *timezone_cache = NULL;
@ -1135,8 +1135,8 @@ pg_tzset(const char *name)
/*
* Upcase the given name to perform a case-insensitive hashtable search.
* (We could alternatively downcase it, but we prefer upcase so that we
* can get consistently upcased results from tzparse() in case the name
* is a POSIX-style timezone spec.)
* can get consistently upcased results from tzparse() in case the name is
* a POSIX-style timezone spec.)
*/
p = uppername;
while (*name)
@ -1209,7 +1209,7 @@ tz_acceptable(pg_tz *tz)
/*
* Get a pg_tz struct for the given timezone name. Returns NULL if name
* Get a pg_tz struct for the given timezone name. Returns NULL if name
* is invalid or not an "acceptable" zone.
*/
static pg_tz *
@ -1267,18 +1267,17 @@ select_default_timezone(void)
*
* This is called before GUC variable initialization begins. Its purpose
* is to ensure that elog.c has a pgtz variable available to format timestamps
* with, in case log_line_prefix is set to a value requiring that. We cannot
* with, in case log_line_prefix is set to a value requiring that. We cannot
* set log_timezone yet.
*/
void
pg_timezone_pre_initialize(void)
{
/*
* We can't use tzload() because we may not know where PGSHAREDIR
* is (in particular this is true in an EXEC_BACKEND subprocess).
* Since this timezone variable will only be used for emergency
* fallback purposes, it seems OK to just use the "lastditch" case
* provided by tzparse().
* We can't use tzload() because we may not know where PGSHAREDIR is (in
* particular this is true in an EXEC_BACKEND subprocess). Since this
* timezone variable will only be used for emergency fallback purposes, it
* seems OK to just use the "lastditch" case provided by tzparse().
*/
if (tzparse("GMT", &gmt_timezone_data.state, TRUE) != 0)
elog(FATAL, "could not initialize GMT timezone");

View File

@ -9,7 +9,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/timezone/pgtz.h,v 1.19 2007/01/05 22:20:04 momjian Exp $
* $PostgreSQL: pgsql/src/timezone/pgtz.h,v 1.20 2007/11/15 21:14:46 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -64,7 +64,7 @@ struct pg_tz
extern int pg_open_tzfile(const char *name, char *canonname);
/* in localtime.c */
extern int tzload(const char *name, char *canonname, struct state *sp);
extern int tzparse(const char *name, struct state *sp, int lastditch);
extern int tzload(const char *name, char *canonname, struct state * sp);
extern int tzparse(const char *name, struct state * sp, int lastditch);
#endif /* _PGTZ_H */