Commit e89d139d authored by Thomas G. Lockhart's avatar Thomas G. Lockhart

Add new routines.

Change definition for isreltime().
Change some names of #define constants to avoid conflicts with the yacc parser.
parent e1d9cf09
......@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: builtins.h,v 1.19 1997/06/23 15:03:38 thomas Exp $
* $Id: builtins.h,v 1.20 1997/07/29 16:16:10 thomas Exp $
*
* NOTES
* This should normally only be included by fmgr.h.
......@@ -253,7 +253,7 @@ extern bool intervalct(TimeInterval i1, TimeInterval i2);
extern bool intervalov(TimeInterval i1, TimeInterval i2);
extern AbsoluteTime intervalstart(TimeInterval i);
extern AbsoluteTime intervalend(TimeInterval i);
extern int isreltime(char *timestring, int *sign, long *quantity, int *unitnr);
extern int isreltime(char *timestring);
extern text *timeofday(void);
/* dt.c */
......@@ -474,6 +474,7 @@ extern bool text_lt(struct varlena *arg1, struct varlena *arg2);
extern bool text_le(struct varlena *arg1, struct varlena *arg2);
extern bool text_gt(struct varlena *arg1, struct varlena *arg2);
extern bool text_ge(struct varlena *arg1, struct varlena *arg2);
extern int32 textpos(text* t1, text* t2);
extern int32 byteaGetSize(struct varlena *v);
extern int32 byteaGetByte(struct varlena *v, int32 n);
extern int32 byteaGetBit(struct varlena *v, int32 n);
......
......@@ -8,7 +8,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: dt.h,v 1.14 1997/07/29 14:08:21 momjian Exp $
* $Id: dt.h,v 1.15 1997/07/29 16:16:12 thomas Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -99,7 +99,7 @@ typedef struct {
#define MONTH 1
#define YEAR 2
#define DAY 3
#define TIME 4
#define TIMES 4 /* not used - thomas 1997-07-14 */
#define TZ 5
#define DTZ 6
#define DTZMOD 7
......
This diff is collapsed.
......@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: nabstime.h,v 1.8 1997/06/23 14:58:51 thomas Exp $
* $Id: nabstime.h,v 1.9 1997/07/29 16:16:14 thomas Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -43,10 +43,10 @@ typedef TimeIntervalData *TimeInterval;
* so redefine them explicitly using these bit patterns. - tgl 97/02/24
*/
#define EPOCH_ABSTIME ((AbsoluteTime) 0)
#define INVALID_ABSTIME ((AbsoluteTime) 0x4FFFFFFE) /* 2147483647 == 2^31 - 1 */
#define CURRENT_ABSTIME ((AbsoluteTime) 0x4FFFFFFD) /* 2147483646 == 2^31 - 2 */
#define NOEND_ABSTIME ((AbsoluteTime) 0x4FFFFFFC) /* 2147483645 == 2^31 - 3 */
#define BIG_ABSTIME ((AbsoluteTime) 0x4FFFFFFB) /* 2147483644 == 2^31 - 4 */
#define INVALID_ABSTIME ((AbsoluteTime) 0x7FFFFFFE) /* 2147483647 == 2^31 - 1 */
#define CURRENT_ABSTIME ((AbsoluteTime) 0x7FFFFFFD) /* 2147483646 == 2^31 - 2 */
#define NOEND_ABSTIME ((AbsoluteTime) 0x7FFFFFFC) /* 2147483645 == 2^31 - 3 */
#define BIG_ABSTIME ((AbsoluteTime) 0x7FFFFFFB) /* 2147483644 == 2^31 - 4 */
#if defined(aix)
/*
......@@ -55,14 +55,12 @@ typedef TimeIntervalData *TimeInterval;
* these integer constants depending on whether the constant is signed
* or not!
*/
/*#define NOSTART_ABSTIME ((AbsoluteTime) HIBITI) */ /* - 2^31 */
#define NOSTART_ABSTIME ((AbsoluteTime) INT_MIN)
#else
/*#define NOSTART_ABSTIME ((AbsoluteTime) 2147483648)*/ /* - 2^31 */
#define NOSTART_ABSTIME ((AbsoluteTime) 0x80000001) /* -2147483647 == - 2^31 */
#endif /* aix */
#define INVALID_RELTIME ((RelativeTime) 0x4FFFFFFE) /* 2147483647 == 2^31 - 1 */
#define INVALID_RELTIME ((RelativeTime) 0x7FFFFFFE) /* 2147483647 == 2^31 - 1 */
#define AbsoluteTimeIsValid(time) \
((bool) ((time) != INVALID_ABSTIME))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment