summaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
authorBruce Momjian2005-07-12 16:05:12 +0000
committerBruce Momjian2005-07-12 16:05:12 +0000
commit7f0b690334b3f735f926c940686589eca486d247 (patch)
tree17962ca89973aa8a2fc63f8363bbcc330ccd48c8 /src/interfaces
parent62abb039dfe6e48fac8e2705a0fb7301311053d9 (diff)
Improve comments for AdjustIntervalForTypmod.
Blank line adjustments.
Diffstat (limited to 'src/interfaces')
-rw-r--r--src/interfaces/ecpg/pgtypeslib/dt_common.c1
-rw-r--r--src/interfaces/ecpg/pgtypeslib/interval.c9
-rw-r--r--src/interfaces/ecpg/pgtypeslib/timestamp.c5
3 files changed, 5 insertions, 10 deletions
diff --git a/src/interfaces/ecpg/pgtypeslib/dt_common.c b/src/interfaces/ecpg/pgtypeslib/dt_common.c
index b412c1b8ec2..617d7eef3e4 100644
--- a/src/interfaces/ecpg/pgtypeslib/dt_common.c
+++ b/src/interfaces/ecpg/pgtypeslib/dt_common.c
@@ -1237,7 +1237,6 @@ dt2time(double jd, int *hour, int *min, int *sec, fsec_t *fsec)
{
#ifdef HAVE_INT64_TIMESTAMP
int64 time;
-
#else
double time;
#endif
diff --git a/src/interfaces/ecpg/pgtypeslib/interval.c b/src/interfaces/ecpg/pgtypeslib/interval.c
index a5e9673b10d..4871bdeeab4 100644
--- a/src/interfaces/ecpg/pgtypeslib/interval.c
+++ b/src/interfaces/ecpg/pgtypeslib/interval.c
@@ -416,7 +416,7 @@ DecodeInterval(char **field, int *ftype, int nf, int *dtype, struct tm * tm, fse
sec = (*fsec / USECS_PER_SEC);
*fsec -= (sec * USECS_PER_SEC);
#else
- TMODULO(*fsec, sec, 1e0);
+ TMODULO(*fsec, sec, 1.0);
#endif
tm->tm_sec += sec;
}
@@ -674,7 +674,6 @@ interval2tm(interval span, struct tm * tm, fsec_t *fsec)
{
#ifdef HAVE_INT64_TIMESTAMP
int64 time;
-
#else
double time;
#endif
@@ -704,9 +703,9 @@ interval2tm(interval span, struct tm * tm, fsec_t *fsec)
*fsec = (time - (tm->tm_sec * USECS_PER_SEC));
#else
TMODULO(time, tm->tm_mday, (double)SECS_PER_DAY);
- TMODULO(time, tm->tm_hour, 3600e0);
- TMODULO(time, tm->tm_min, 60e0);
- TMODULO(time, tm->tm_sec, 1e0);
+ TMODULO(time, tm->tm_hour, 3600.0);
+ TMODULO(time, tm->tm_min, 60.0);
+ TMODULO(time, tm->tm_sec, 1.0);
*fsec = time;
#endif
diff --git a/src/interfaces/ecpg/pgtypeslib/timestamp.c b/src/interfaces/ecpg/pgtypeslib/timestamp.c
index 556e5733e34..13bc33642de 100644
--- a/src/interfaces/ecpg/pgtypeslib/timestamp.c
+++ b/src/interfaces/ecpg/pgtypeslib/timestamp.c
@@ -103,7 +103,6 @@ dt2time(timestamp jd, int *hour, int *min, int *sec, fsec_t *fsec)
{
#ifdef HAVE_INT64_TIMESTAMP
int64 time;
-
#else
double time;
#endif
@@ -148,7 +147,6 @@ timestamp2tm(timestamp dt, int *tzp, struct tm * tm, fsec_t *fsec, char **tzn)
int dDate,
date0;
int64 time;
-
#else
double dDate,
date0;
@@ -280,7 +278,6 @@ PGTYPEStimestamp_from_asc(char *str, char **endptr)
#ifdef HAVE_INT64_TIMESTAMP
int64 noresult = 0;
-
#else
double noresult = 0.0;
#endif
@@ -572,7 +569,7 @@ dttofmtasc_replace(timestamp *ts, date dDate, int dow, struct tm * tm,
break;
case 's':
#ifdef HAVE_INT64_TIMESTAMP
- replace_val.int64_val = (*ts - SetEpochTimestamp()) / 1000000e0;
+ replace_val.int64_val = (*ts - SetEpochTimestamp()) / 1000000.0;
replace_type = PGTYPES_TYPE_INT64;
#else
replace_val.double_val = *ts - SetEpochTimestamp();