diff options
Diffstat (limited to 'src/include/utils')
29 files changed, 394 insertions, 377 deletions
diff --git a/src/include/utils/acl.h b/src/include/utils/acl.h index c8b79da859c..f1f60fca4cd 100644 --- a/src/include/utils/acl.h +++ b/src/include/utils/acl.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: acl.h,v 1.24 2000/01/26 05:58:37 momjian Exp $ + * $Id: acl.h,v 1.25 2000/04/12 17:16:54 momjian Exp $ * * NOTES * For backward-compatability purposes we have to allow there @@ -76,11 +76,13 @@ typedef struct AclItem AclId ai_id; AclIdType ai_idtype; AclMode ai_mode; + /* - * This is actually type 'aclitem', and we want a fixed size for - * for all platforms, so we pad this with dummies. + * This is actually type 'aclitem', and we want a fixed size for for + * all platforms, so we pad this with dummies. */ - char dummy1, dummy2; + char dummy1, + dummy2; } AclItem; /* Note: if the size of AclItem changes, diff --git a/src/include/utils/array.h b/src/include/utils/array.h index 2c42ebb9998..61317d47051 100644 --- a/src/include/utils/array.h +++ b/src/include/utils/array.h @@ -11,7 +11,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: array.h,v 1.22 2000/01/26 05:58:37 momjian Exp $ + * $Id: array.h,v 1.23 2000/04/12 17:16:54 momjian Exp $ * * NOTES * XXX the data array should be LONGALIGN'd -- notice that the array @@ -98,7 +98,7 @@ typedef struct *------------------------------------------------------------------------ */ -#define RETURN_NULL {*isNull = true; return(0); } +#define RETURN_NULL do {*isNull = true; return(0); } while (0) #define NAME_LEN 30 #define MAX_BUFF_SIZE BLCKSZ diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h index 270187e9173..80d91aba75a 100644 --- a/src/include/utils/builtins.h +++ b/src/include/utils/builtins.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: builtins.h,v 1.109 2000/04/08 02:13:10 thomas Exp $ + * $Id: builtins.h,v 1.110 2000/04/12 17:16:54 momjian Exp $ * * NOTES * This should normally only be included by fmgr.h. @@ -164,11 +164,12 @@ extern int namestrcmp(Name name, const char *str); #define ltoa pg_ltoa #endif /* hpux */ extern int32 pg_atoi(char *s, int size, int c); + /* XXX hack. QNX has itoa and ltoa (with different arguments) already. */ #ifdef __QNX__ #define itoa pg_itoa #define ltoa pg_ltoa -#endif /* QNX */ +#endif /* QNX */ extern void itoa(int i, char *a); extern void ltoa(int32 l, char *a); @@ -363,11 +364,11 @@ extern Oid regproctooid(RegProcedure rp); /* ruleutils.c */ extern text *pg_get_ruledef(NameData *rname); -extern text *pg_get_viewdef(NameData *rname); -extern text *pg_get_indexdef(Oid indexrelid); +extern text *pg_get_viewdef(NameData *rname); +extern text *pg_get_indexdef(Oid indexrelid); extern NameData *pg_get_userbyid(int32 uid); extern char *deparse_expression(Node *expr, List *rangetables, - bool forceprefix); + bool forceprefix); /* selfuncs.c */ extern float64 eqsel(Oid opid, Oid relid, AttrNumber attno, Datum value, int32 flag); @@ -381,35 +382,35 @@ extern float64 scalargtjoinsel(Oid opid, Oid relid1, AttrNumber attno1, Oid reli extern bool convert_to_scalar(Datum value, Oid typid, double *scaleval); extern void btcostestimate(Query *root, RelOptInfo *rel, - IndexOptInfo *index, List *indexQuals, - Cost *indexStartupCost, - Cost *indexTotalCost, - Selectivity *indexSelectivity); + IndexOptInfo *index, List *indexQuals, + Cost *indexStartupCost, + Cost *indexTotalCost, + Selectivity *indexSelectivity); extern void rtcostestimate(Query *root, RelOptInfo *rel, - IndexOptInfo *index, List *indexQuals, - Cost *indexStartupCost, - Cost *indexTotalCost, - Selectivity *indexSelectivity); + IndexOptInfo *index, List *indexQuals, + Cost *indexStartupCost, + Cost *indexTotalCost, + Selectivity *indexSelectivity); extern void hashcostestimate(Query *root, RelOptInfo *rel, - IndexOptInfo *index, List *indexQuals, - Cost *indexStartupCost, - Cost *indexTotalCost, - Selectivity *indexSelectivity); + IndexOptInfo *index, List *indexQuals, + Cost *indexStartupCost, + Cost *indexTotalCost, + Selectivity *indexSelectivity); extern void gistcostestimate(Query *root, RelOptInfo *rel, - IndexOptInfo *index, List *indexQuals, - Cost *indexStartupCost, - Cost *indexTotalCost, - Selectivity *indexSelectivity); + IndexOptInfo *index, List *indexQuals, + Cost *indexStartupCost, + Cost *indexTotalCost, + Selectivity *indexSelectivity); /* tid.c */ extern ItemPointer tidin(const char *str); extern char *tidout(ItemPointer itemPtr); -extern bool tideq(ItemPointer,ItemPointer); -extern bool tidne(ItemPointer,ItemPointer); +extern bool tideq(ItemPointer, ItemPointer); +extern bool tidne(ItemPointer, ItemPointer); extern text *tid_text(ItemPointer); -extern ItemPointer text_tid(const text *); -extern ItemPointer currtid_byreloid(Oid relOid, ItemPointer); -extern ItemPointer currtid_byrelname(const text* relName, ItemPointer); +extern ItemPointer text_tid(const text *); +extern ItemPointer currtid_byreloid(Oid relOid, ItemPointer); +extern ItemPointer currtid_byrelname(const text *relName, ItemPointer); /* varchar.c */ extern char *bpcharin(char *s, int dummy, int32 atttypmod); @@ -490,7 +491,7 @@ extern text *rpad(text *string1, int4 len, text *string2); extern text *btrim(text *string, text *set); extern text *ltrim(text *string, text *set); extern text *rtrim(text *string, text *set); -extern text *substr(text *string, int4 m, int4 n); +extern text *substr(text *string, int4 m, int4 n); extern text *translate(text *string, text *from, text *to); extern text *ichar(int4 arg1); extern text *repeat(text *string, int4 count); @@ -503,113 +504,113 @@ extern char *inet_net_ntop(int af, const void *src, int bits, char *dst, size_t extern char *inet_cidr_ntop(int af, const void *src, int bits, char *dst, size_t size); /* inet_net_pton.c */ -extern int inet_net_pton(int af, const char *src, void *dst, size_t size); +extern int inet_net_pton(int af, const char *src, void *dst, size_t size); /* network.c */ -extern inet *inet_in(char *str); -extern char *inet_out(inet *addr); -extern inet *cidr_in(char *str); -extern char *cidr_out(inet *addr); -extern bool network_lt(inet *a1, inet *a2); -extern bool network_le(inet *a1, inet *a2); -extern bool network_eq(inet *a1, inet *a2); -extern bool network_ge(inet *a1, inet *a2); -extern bool network_gt(inet *a1, inet *a2); -extern bool network_ne(inet *a1, inet *a2); -extern bool network_sub(inet *a1, inet *a2); -extern bool network_subeq(inet *a1, inet *a2); -extern bool network_sup(inet *a1, inet *a2); -extern bool network_supeq(inet *a1, inet *a2); -extern int4 network_cmp(inet *a1, inet *a2); - -extern text *network_network(inet *addr); -extern text *network_netmask(inet *addr); -extern int4 network_masklen(inet *addr); -extern text *network_broadcast(inet *addr); -extern text *network_host(inet *addr); +extern inet *inet_in(char *str); +extern char *inet_out(inet *addr); +extern inet *cidr_in(char *str); +extern char *cidr_out(inet *addr); +extern bool network_lt(inet *a1, inet *a2); +extern bool network_le(inet *a1, inet *a2); +extern bool network_eq(inet *a1, inet *a2); +extern bool network_ge(inet *a1, inet *a2); +extern bool network_gt(inet *a1, inet *a2); +extern bool network_ne(inet *a1, inet *a2); +extern bool network_sub(inet *a1, inet *a2); +extern bool network_subeq(inet *a1, inet *a2); +extern bool network_sup(inet *a1, inet *a2); +extern bool network_supeq(inet *a1, inet *a2); +extern int4 network_cmp(inet *a1, inet *a2); + +extern text *network_network(inet *addr); +extern text *network_netmask(inet *addr); +extern int4 network_masklen(inet *addr); +extern text *network_broadcast(inet *addr); +extern text *network_host(inet *addr); /* mac.c */ extern macaddr *macaddr_in(char *str); -extern char *macaddr_out(macaddr *addr); -extern bool macaddr_lt(macaddr *a1, macaddr *a2); -extern bool macaddr_le(macaddr *a1, macaddr *a2); -extern bool macaddr_eq(macaddr *a1, macaddr *a2); -extern bool macaddr_ge(macaddr *a1, macaddr *a2); -extern bool macaddr_gt(macaddr *a1, macaddr *a2); -extern bool macaddr_ne(macaddr *a1, macaddr *a2); -extern int4 macaddr_cmp(macaddr *a1, macaddr *a2); -extern text *macaddr_manuf(macaddr *addr); +extern char *macaddr_out(macaddr *addr); +extern bool macaddr_lt(macaddr *a1, macaddr *a2); +extern bool macaddr_le(macaddr *a1, macaddr *a2); +extern bool macaddr_eq(macaddr *a1, macaddr *a2); +extern bool macaddr_ge(macaddr *a1, macaddr *a2); +extern bool macaddr_gt(macaddr *a1, macaddr *a2); +extern bool macaddr_ne(macaddr *a1, macaddr *a2); +extern int4 macaddr_cmp(macaddr *a1, macaddr *a2); +extern text *macaddr_manuf(macaddr *addr); /* numeric.c */ -extern Numeric numeric_in(char *str, int dummy, int32 typmod); -extern char *numeric_out(Numeric num); -extern Numeric numeric(Numeric num, int32 typmod); -extern Numeric numeric_abs(Numeric num); -extern Numeric numeric_uminus(Numeric num); -extern Numeric numeric_sign(Numeric num); -extern Numeric numeric_round(Numeric num, int32 scale); -extern Numeric numeric_trunc(Numeric num, int32 scale); -extern Numeric numeric_ceil(Numeric num); -extern Numeric numeric_floor(Numeric num); -extern int32 numeric_cmp(Numeric num1, Numeric num2); -extern bool numeric_eq(Numeric num1, Numeric num2); -extern bool numeric_ne(Numeric num1, Numeric num2); -extern bool numeric_gt(Numeric num1, Numeric num2); -extern bool numeric_ge(Numeric num1, Numeric num2); -extern bool numeric_lt(Numeric num1, Numeric num2); -extern bool numeric_le(Numeric num1, Numeric num2); -extern Numeric numeric_add(Numeric num1, Numeric num2); -extern Numeric numeric_sub(Numeric num1, Numeric num2); -extern Numeric numeric_mul(Numeric num1, Numeric num2); -extern Numeric numeric_div(Numeric num1, Numeric num2); -extern Numeric numeric_mod(Numeric num1, Numeric num2); -extern Numeric numeric_inc(Numeric num); -extern Numeric numeric_dec(Numeric num); -extern Numeric numeric_smaller(Numeric num1, Numeric num2); -extern Numeric numeric_larger(Numeric num1, Numeric num2); -extern Numeric numeric_sqrt(Numeric num); -extern Numeric numeric_exp(Numeric num); -extern Numeric numeric_ln(Numeric num); -extern Numeric numeric_log(Numeric num1, Numeric num2); -extern Numeric numeric_power(Numeric num1, Numeric num2); -extern Numeric int4_numeric(int32 val); -extern int32 numeric_int4(Numeric num); -extern Numeric int8_numeric(int64 *val); -extern int64 *numeric_int8(Numeric num); -extern Numeric int2_numeric(int16 val); -extern int16 numeric_int2(Numeric num); -extern Numeric float4_numeric(float32 val); -extern float32 numeric_float4(Numeric num); -extern Numeric float8_numeric(float64 val); -extern float64 numeric_float8(Numeric num); +extern Numeric numeric_in(char *str, int dummy, int32 typmod); +extern char *numeric_out(Numeric num); +extern Numeric numeric(Numeric num, int32 typmod); +extern Numeric numeric_abs(Numeric num); +extern Numeric numeric_uminus(Numeric num); +extern Numeric numeric_sign(Numeric num); +extern Numeric numeric_round(Numeric num, int32 scale); +extern Numeric numeric_trunc(Numeric num, int32 scale); +extern Numeric numeric_ceil(Numeric num); +extern Numeric numeric_floor(Numeric num); +extern int32 numeric_cmp(Numeric num1, Numeric num2); +extern bool numeric_eq(Numeric num1, Numeric num2); +extern bool numeric_ne(Numeric num1, Numeric num2); +extern bool numeric_gt(Numeric num1, Numeric num2); +extern bool numeric_ge(Numeric num1, Numeric num2); +extern bool numeric_lt(Numeric num1, Numeric num2); +extern bool numeric_le(Numeric num1, Numeric num2); +extern Numeric numeric_add(Numeric num1, Numeric num2); +extern Numeric numeric_sub(Numeric num1, Numeric num2); +extern Numeric numeric_mul(Numeric num1, Numeric num2); +extern Numeric numeric_div(Numeric num1, Numeric num2); +extern Numeric numeric_mod(Numeric num1, Numeric num2); +extern Numeric numeric_inc(Numeric num); +extern Numeric numeric_dec(Numeric num); +extern Numeric numeric_smaller(Numeric num1, Numeric num2); +extern Numeric numeric_larger(Numeric num1, Numeric num2); +extern Numeric numeric_sqrt(Numeric num); +extern Numeric numeric_exp(Numeric num); +extern Numeric numeric_ln(Numeric num); +extern Numeric numeric_log(Numeric num1, Numeric num2); +extern Numeric numeric_power(Numeric num1, Numeric num2); +extern Numeric int4_numeric(int32 val); +extern int32 numeric_int4(Numeric num); +extern Numeric int8_numeric(int64 *val); +extern int64 *numeric_int8(Numeric num); +extern Numeric int2_numeric(int16 val); +extern int16 numeric_int2(Numeric num); +extern Numeric float4_numeric(float32 val); +extern float32 numeric_float4(Numeric num); +extern Numeric float8_numeric(float64 val); +extern float64 numeric_float8(Numeric num); /* lztext.c */ -lztext *lztextin(char *str); -char *lztextout(lztext *lz); -text *lztext_text(lztext *lz); -lztext *text_lztext(text *txt); -int32 lztextlen(lztext *lz); -int32 lztextoctetlen(lztext *lz); -int32 lztext_cmp(lztext *lz1, lztext *lz2); -bool lztext_eq(lztext *lz1, lztext *lz2); -bool lztext_ne(lztext *lz1, lztext *lz2); -bool lztext_gt(lztext *lz1, lztext *lz2); -bool lztext_ge(lztext *lz1, lztext *lz2); -bool lztext_lt(lztext *lz1, lztext *lz2); -bool lztext_le(lztext *lz1, lztext *lz2); +lztext *lztextin(char *str); +char *lztextout(lztext *lz); +text *lztext_text(lztext *lz); +lztext *text_lztext(text *txt); +int32 lztextlen(lztext *lz); +int32 lztextoctetlen(lztext *lz); +int32 lztext_cmp(lztext *lz1, lztext *lz2); +bool lztext_eq(lztext *lz1, lztext *lz2); +bool lztext_ne(lztext *lz1, lztext *lz2); +bool lztext_gt(lztext *lz1, lztext *lz2); +bool lztext_ge(lztext *lz1, lztext *lz2); +bool lztext_lt(lztext *lz1, lztext *lz2); +bool lztext_le(lztext *lz1, lztext *lz2); /* ri_triggers.c */ -extern HeapTuple RI_FKey_check_ins(FmgrInfo *proinfo); -extern HeapTuple RI_FKey_check_upd(FmgrInfo *proinfo); -extern HeapTuple RI_FKey_noaction_del(FmgrInfo *proinfo); -extern HeapTuple RI_FKey_noaction_upd(FmgrInfo *proinfo); -extern HeapTuple RI_FKey_cascade_del(FmgrInfo *proinfo); -extern HeapTuple RI_FKey_cascade_upd(FmgrInfo *proinfo); -extern HeapTuple RI_FKey_restrict_del(FmgrInfo *proinfo); -extern HeapTuple RI_FKey_restrict_upd(FmgrInfo *proinfo); -extern HeapTuple RI_FKey_setnull_del(FmgrInfo *proinfo); -extern HeapTuple RI_FKey_setnull_upd(FmgrInfo *proinfo); -extern HeapTuple RI_FKey_setdefault_del(FmgrInfo *proinfo); -extern HeapTuple RI_FKey_setdefault_upd(FmgrInfo *proinfo); +extern HeapTuple RI_FKey_check_ins(FmgrInfo *proinfo); +extern HeapTuple RI_FKey_check_upd(FmgrInfo *proinfo); +extern HeapTuple RI_FKey_noaction_del(FmgrInfo *proinfo); +extern HeapTuple RI_FKey_noaction_upd(FmgrInfo *proinfo); +extern HeapTuple RI_FKey_cascade_del(FmgrInfo *proinfo); +extern HeapTuple RI_FKey_cascade_upd(FmgrInfo *proinfo); +extern HeapTuple RI_FKey_restrict_del(FmgrInfo *proinfo); +extern HeapTuple RI_FKey_restrict_upd(FmgrInfo *proinfo); +extern HeapTuple RI_FKey_setnull_del(FmgrInfo *proinfo); +extern HeapTuple RI_FKey_setnull_upd(FmgrInfo *proinfo); +extern HeapTuple RI_FKey_setdefault_del(FmgrInfo *proinfo); +extern HeapTuple RI_FKey_setdefault_upd(FmgrInfo *proinfo); #endif /* BUILTINS_H */ diff --git a/src/include/utils/catcache.h b/src/include/utils/catcache.h index 7b4b679e9dd..cf9b1efc6f3 100644 --- a/src/include/utils/catcache.h +++ b/src/include/utils/catcache.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: catcache.h,v 1.20 2000/02/21 03:36:59 tgl Exp $ + * $Id: catcache.h,v 1.21 2000/04/12 17:16:54 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -27,7 +27,9 @@ typedef struct catctup { HeapTuple ct_tup; /* A pointer to a tuple */ - /* Each tuple in the cache has two catctup items, one in the LRU list + + /* + * Each tuple in the cache has two catctup items, one in the LRU list * and one in the hashbucket list for its hash value. ct_node in each * one points to the other one. */ @@ -38,7 +40,7 @@ typedef struct catctup #define NCCBUCK 500 /* CatCache buckets */ #define MAXTUP 300 /* Maximum # of tuples cached per cache */ -typedef uint32 (* CCHashFunc) (Datum); +typedef uint32 (*CCHashFunc) (Datum); typedef struct catcache { @@ -55,11 +57,11 @@ typedef struct catcache short cc_nkeys; short cc_size; short cc_key[4]; /* AttrNumber of each key */ - CCHashFunc cc_hashfunc[4]; /* hash function to use for each key */ + CCHashFunc cc_hashfunc[4]; /* hash function to use for each key */ ScanKeyData cc_skey[4]; struct catcache *cc_next; Dllist *cc_lrulist; /* LRU list, most recent first */ - Dllist *cc_cache[NCCBUCK + 1]; /* hash buckets */ + Dllist *cc_cache[NCCBUCK + 1]; /* hash buckets */ } CatCache; #define InvalidCatalogCacheId (-1) diff --git a/src/include/utils/date.h b/src/include/utils/date.h index b474634a384..0d53f3755c1 100644 --- a/src/include/utils/date.h +++ b/src/include/utils/date.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: date.h,v 1.2 2000/03/14 23:06:50 thomas Exp $ + * $Id: date.h,v 1.3 2000/04/12 17:16:54 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -20,8 +20,9 @@ typedef float8 TimeADT; typedef struct { - double time; /* all time units other than months and years */ - int4 zone; /* numeric time zone, in seconds */ + double time; /* all time units other than months and + * years */ + int4 zone; /* numeric time zone, in seconds */ } TimeTzADT; /* date.c */ @@ -52,9 +53,9 @@ extern bool time_lt(TimeADT *time1, TimeADT *time2); extern bool time_le(TimeADT *time1, TimeADT *time2); extern bool time_gt(TimeADT *time1, TimeADT *time2); extern bool time_ge(TimeADT *time1, TimeADT *time2); -extern int time_cmp(TimeADT *time1, TimeADT *time2); +extern int time_cmp(TimeADT *time1, TimeADT *time2); extern bool overlaps_time(TimeADT *time1, TimeADT *time2, - TimeADT *time3, TimeADT *time4); + TimeADT *time3, TimeADT *time4); extern TimeADT *time_larger(TimeADT *time1, TimeADT *time2); extern TimeADT *time_smaller(TimeADT *time1, TimeADT *time2); extern TimeADT *timestamp_time(Timestamp *timestamp); @@ -68,15 +69,12 @@ extern bool timetz_lt(TimeTzADT *time1, TimeTzADT *time2); extern bool timetz_le(TimeTzADT *time1, TimeTzADT *time2); extern bool timetz_gt(TimeTzADT *time1, TimeTzADT *time2); extern bool timetz_ge(TimeTzADT *time1, TimeTzADT *time2); -extern int timetz_cmp(TimeTzADT *time1, TimeTzADT *time2); +extern int timetz_cmp(TimeTzADT *time1, TimeTzADT *time2); extern bool overlaps_timetz(TimeTzADT *time1, TimeTzADT *time2, - TimeTzADT *time3, TimeTzADT *time4); + TimeTzADT *time3, TimeTzADT *time4); extern TimeTzADT *timetz_larger(TimeTzADT *time1, TimeTzADT *time2); extern TimeTzADT *timetz_smaller(TimeTzADT *time1, TimeTzADT *time2); extern TimeTzADT *timestamp_timetz(Timestamp *timestamp); extern Timestamp *datetimetz_timestamp(DateADT date, TimeTzADT *time); #endif /* DATE_H */ - - - diff --git a/src/include/utils/datetime.h b/src/include/utils/datetime.h index e6469d46de5..0ba0504e85b 100644 --- a/src/include/utils/datetime.h +++ b/src/include/utils/datetime.h @@ -9,7 +9,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: datetime.h,v 1.11 2000/03/14 23:06:50 thomas Exp $ + * $Id: datetime.h,v 1.12 2000/04/12 17:16:54 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -236,39 +236,39 @@ extern void j2date(int jd, int *year, int *month, int *day); extern int date2j(int year, int month, int day); extern int ParseDateTime(char *timestr, char *lowstr, - char **field, int *ftype, - int maxfields, int *numfields); + char **field, int *ftype, + int maxfields, int *numfields); extern int DecodeDateTime(char **field, int *ftype, - int nf, int *dtype, - struct tm * tm, double *fsec, int *tzp); + int nf, int *dtype, + struct tm * tm, double *fsec, int *tzp); extern int DecodeTimeOnly(char **field, int *ftype, - int nf, int *dtype, - struct tm * tm, double *fsec, int *tzp); + int nf, int *dtype, + struct tm * tm, double *fsec, int *tzp); extern int DecodeDateDelta(char **field, int *ftype, - int nf, int *dtype, - struct tm * tm, double *fsec); + int nf, int *dtype, + struct tm * tm, double *fsec); -extern int EncodeDateOnly(struct tm * tm, int style, char *str); -extern int EncodeTimeOnly(struct tm * tm, double fsec, int *tzp, int style, char *str); -extern int EncodeDateTime(struct tm * tm, double fsec, int *tzp, char **tzn, int style, char *str); -extern int EncodeTimeSpan(struct tm * tm, double fsec, int style, char *str); +extern int EncodeDateOnly(struct tm * tm, int style, char *str); +extern int EncodeTimeOnly(struct tm * tm, double fsec, int *tzp, int style, char *str); +extern int EncodeDateTime(struct tm * tm, double fsec, int *tzp, char **tzn, int style, char *str); +extern int EncodeTimeSpan(struct tm * tm, double fsec, int style, char *str); -extern int DecodeDate(char *str, int fmask, int *tmask, struct tm * tm); +extern int DecodeDate(char *str, int fmask, int *tmask, struct tm * tm); extern int DecodeNumber(int flen, char *field, - int fmask, int *tmask, - struct tm * tm, double *fsec, int *is2digits); + int fmask, int *tmask, + struct tm * tm, double *fsec, int *is2digits); extern int DecodeNumberField(int len, char *str, - int fmask, int *tmask, - struct tm * tm, double *fsec, int *is2digits); -extern int DecodeSpecial(int field, char *lowtoken, int *val); + int fmask, int *tmask, + struct tm * tm, double *fsec, int *is2digits); +extern int DecodeSpecial(int field, char *lowtoken, int *val); extern int DecodeTime(char *str, int fmask, int *tmask, - struct tm * tm, double *fsec); -extern int DecodeTimezone(char *str, int *tzp); -extern int DecodeUnits(int field, char *lowtoken, int *val); + struct tm * tm, double *fsec); +extern int DecodeTimezone(char *str, int *tzp); +extern int DecodeUnits(int field, char *lowtoken, int *val); extern datetkn *datebsearch(char *key, datetkn *base, unsigned int nel); -extern int j2day(int jd); +extern int j2day(int jd); #endif /* DATETIME_H */ diff --git a/src/include/utils/elog.h b/src/include/utils/elog.h index eb9ed14f10e..190d44cfff2 100644 --- a/src/include/utils/elog.h +++ b/src/include/utils/elog.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: elog.h,v 1.15 2000/01/26 05:58:37 momjian Exp $ + * $Id: elog.h,v 1.16 2000/04/12 17:16:54 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -17,22 +17,25 @@ #define NOTICE 0 /* random info - no special action */ #define ERROR (-1) /* user error - return to known state */ #define FATAL 1 /* fatal error - abort process */ -#define REALLYFATAL 2 /* take down the other backends with me */ -#define STOP REALLYFATAL +#define REALLYFATAL 2 /* take down the other backends with me */ +#define STOP REALLYFATAL #define DEBUG (-2) /* debug message */ -#define LOG DEBUG +#define LOG DEBUG #define NOIND (-3) /* debug message, don't indent as far */ #ifndef __GNUC__ -extern void elog(int lev, const char *fmt, ...); +extern void elog(int lev, const char *fmt,...); + #else /* This extension allows gcc to check the format string for consistency with the supplied arguments. */ -extern void elog(int lev, const char *fmt, ...) __attribute__ ((format (printf, 2, 3))); +extern void elog(int lev, const char *fmt,...) __attribute__((format(printf, 2, 3))); + #endif #ifndef PG_STANDALONE extern int DebugFileOpen(void); + #endif #endif /* ELOG_H */ diff --git a/src/include/utils/formatting.h b/src/include/utils/formatting.h index 39259afff24..36cc381b36d 100644 --- a/src/include/utils/formatting.h +++ b/src/include/utils/formatting.h @@ -2,15 +2,15 @@ /* ----------------------------------------------------------------------- * formatting.h * - * $Id: formatting.h,v 1.3 2000/02/16 17:26:26 thomas Exp $ + * $Id: formatting.h,v 1.4 2000/04/12 17:16:55 momjian Exp $ * * - * Portions Copyright (c) 1999-2000, PostgreSQL, Inc + * Portions Copyright (c) 1999-2000, PostgreSQL, Inc * - * The PostgreSQL routines for a DateTime/int/float/numeric formatting, - * inspire with Oracle TO_CHAR() / TO_DATE() / TO_NUMBER() routines. + * The PostgreSQL routines for a DateTime/int/float/numeric formatting, + * inspire with Oracle TO_CHAR() / TO_DATE() / TO_NUMBER() routines. * - * Karel Zak - Zakkr + * Karel Zak - Zakkr * * ----------------------------------------------------------------------- */ diff --git a/src/include/utils/geo_decls.h b/src/include/utils/geo_decls.h index 6d8869802c0..305b482a64e 100644 --- a/src/include/utils/geo_decls.h +++ b/src/include/utils/geo_decls.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: geo_decls.h,v 1.26 2000/03/14 23:06:50 thomas Exp $ + * $Id: geo_decls.h,v 1.27 2000/04/12 17:16:55 momjian Exp $ * * NOTE * These routines do *not* use the float types from adt/. @@ -361,16 +361,16 @@ extern double circle_dt(CIRCLE *circle1, CIRCLE *circle2); /* geo_selfuncs.c */ extern float64 areasel(Oid opid, Oid relid, AttrNumber attno, - Datum value, int32 flag); + Datum value, int32 flag); extern float64 areajoinsel(Oid opid, Oid relid1, AttrNumber attno1, - Oid relid2, AttrNumber attno2); + Oid relid2, AttrNumber attno2); extern float64 positionsel(Oid opid, Oid relid, AttrNumber attno, - Datum value, int32 flag); + Datum value, int32 flag); extern float64 positionjoinsel(Oid opid, Oid relid1, AttrNumber attno1, - Oid relid2, AttrNumber attno2); + Oid relid2, AttrNumber attno2); extern float64 contsel(Oid opid, Oid relid, AttrNumber attno, - Datum value, int32 flag); + Datum value, int32 flag); extern float64 contjoinsel(Oid opid, Oid relid1, AttrNumber attno1, - Oid relid2, AttrNumber attno2); + Oid relid2, AttrNumber attno2); #endif /* GEO_DECLS_H */ diff --git a/src/include/utils/hsearch.h b/src/include/utils/hsearch.h index aa5f4603012..ef243da145f 100644 --- a/src/include/utils/hsearch.h +++ b/src/include/utils/hsearch.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: hsearch.h,v 1.14 2000/02/26 05:25:53 tgl Exp $ + * $Id: hsearch.h,v 1.15 2000/04/12 17:16:55 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -27,13 +27,13 @@ * In a hash table allocated in shared memory, the directory cannot be * expanded because it must stay at a fixed address. The directory size * should be selected using hash_select_dirsize (and you'd better have - * a good idea of the maximum number of entries!). For non-shared hash + * a good idea of the maximum number of entries!). For non-shared hash * tables, the initial directory size can be left at the default. */ #define DEF_SEGSIZE 256 -#define DEF_SEGSIZE_SHIFT 8 /* must be log2(DEF_SEGSIZE) */ +#define DEF_SEGSIZE_SHIFT 8/* must be log2(DEF_SEGSIZE) */ #define DEF_DIRSIZE 256 -#define DEF_FFACTOR 1 /* default fill factor */ +#define DEF_FFACTOR 1/* default fill factor */ #define PRIME1 37 /* for the hash function */ #define PRIME2 1048583 @@ -68,8 +68,9 @@ typedef struct hashhdr long nsegs; /* Number of allocated segments */ long keysize; /* hash key length in bytes */ long datasize; /* elem data length in bytes */ - long max_dsize; /* 'dsize' limit if directory is fixed size */ - BUCKET_INDEX freeBucketIndex; /* index of first free bucket */ + long max_dsize; /* 'dsize' limit if directory is fixed + * size */ + BUCKET_INDEX freeBucketIndex; /* index of first free bucket */ #ifdef HASH_STATISTICS long accesses; long collisions; diff --git a/src/include/utils/int8.h b/src/include/utils/int8.h index 02053d6c393..dab1e0addd1 100644 --- a/src/include/utils/int8.h +++ b/src/include/utils/int8.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: int8.h,v 1.19 2000/03/14 23:06:50 thomas Exp $ + * $Id: int8.h,v 1.20 2000/04/12 17:16:55 momjian Exp $ * * NOTES * These data types are supported on all 64-bit architectures, and may @@ -97,6 +97,7 @@ extern int32 int84(int64 *val); #ifdef NOT_USED extern int16 int82(int64 *val); + #endif extern float64 i8tod(int64 *val); diff --git a/src/include/utils/logtape.h b/src/include/utils/logtape.h index 24bf0bca59b..1ce02fc64b4 100644 --- a/src/include/utils/logtape.h +++ b/src/include/utils/logtape.h @@ -8,7 +8,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: logtape.h,v 1.2 2000/01/26 05:58:38 momjian Exp $ + * $Id: logtape.h,v 1.3 2000/04/12 17:16:55 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -27,16 +27,16 @@ typedef struct LogicalTapeSet LogicalTapeSet; extern LogicalTapeSet *LogicalTapeSetCreate(int ntapes); extern void LogicalTapeSetClose(LogicalTapeSet *lts); extern size_t LogicalTapeRead(LogicalTapeSet *lts, int tapenum, - void *ptr, size_t size); + void *ptr, size_t size); extern void LogicalTapeWrite(LogicalTapeSet *lts, int tapenum, - void *ptr, size_t size); + void *ptr, size_t size); extern void LogicalTapeRewind(LogicalTapeSet *lts, int tapenum, bool forWrite); extern void LogicalTapeFreeze(LogicalTapeSet *lts, int tapenum); extern bool LogicalTapeBackspace(LogicalTapeSet *lts, int tapenum, - size_t size); + size_t size); extern bool LogicalTapeSeek(LogicalTapeSet *lts, int tapenum, - long blocknum, int offset); + long blocknum, int offset); extern void LogicalTapeTell(LogicalTapeSet *lts, int tapenum, - long *blocknum, int *offset); + long *blocknum, int *offset); #endif /* LOGTAPE_H */ diff --git a/src/include/utils/lsyscache.h b/src/include/utils/lsyscache.h index df510f60bfb..b6c02a11929 100644 --- a/src/include/utils/lsyscache.h +++ b/src/include/utils/lsyscache.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: lsyscache.h,v 1.22 2000/01/26 05:58:38 momjian Exp $ + * $Id: lsyscache.h,v 1.23 2000/04/12 17:16:55 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -22,7 +22,7 @@ extern Oid get_atttype(Oid relid, AttrNumber attnum); extern bool get_attisset(Oid relid, char *attname); extern int32 get_atttypmod(Oid relid, AttrNumber attnum); extern double get_attdisbursion(Oid relid, AttrNumber attnum, - double min_estimate); + double min_estimate); extern RegProcedure get_opcode(Oid opid); extern char *get_opname(Oid opid); extern bool op_mergejoinable(Oid opid, Oid ltype, Oid rtype, diff --git a/src/include/utils/lztext.h b/src/include/utils/lztext.h index a10ab34cd1e..8936ffb133d 100644 --- a/src/include/utils/lztext.h +++ b/src/include/utils/lztext.h @@ -1,7 +1,7 @@ /* ---------- * lztext.h * - * $Header: /cvsroot/pgsql/src/include/utils/Attic/lztext.h,v 1.2 1999/12/28 13:40:53 wieck Exp $ + * $Header: /cvsroot/pgsql/src/include/utils/Attic/lztext.h,v 1.3 2000/04/12 17:16:55 momjian Exp $ * * Definitions for the lztext compressed data type * ---------- @@ -17,6 +17,6 @@ * The internal storage format of an LZ compressed text field * ---------- */ -typedef PGLZ_Header lztext; +typedef PGLZ_Header lztext; -#endif /* _LZTEXT_H_ */ +#endif /* _LZTEXT_H_ */ diff --git a/src/include/utils/memutils.h b/src/include/utils/memutils.h index e86c4be0ae9..a42bce402cd 100644 --- a/src/include/utils/memutils.h +++ b/src/include/utils/memutils.h @@ -13,7 +13,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: memutils.h,v 1.33 2000/01/26 05:58:38 momjian Exp $ + * $Id: memutils.h,v 1.34 2000/04/12 17:16:55 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -31,7 +31,7 @@ * ---------------- */ -#define TYPEALIGN(ALIGNVAL,LEN) (((long)(LEN) + (ALIGNVAL-1)) & ~(ALIGNVAL-1)) +#define TYPEALIGN(ALIGNVAL,LEN) (((long)(LEN) + (ALIGNVAL-1)) & ~(ALIGNVAL-1)) #define SHORTALIGN(LEN) TYPEALIGN(ALIGNOF_SHORT, (LEN)) #define INTALIGN(LEN) TYPEALIGN(ALIGNOF_INT, (LEN)) @@ -165,14 +165,14 @@ typedef struct AllocSetData { AllocBlock blocks; /* head of list of blocks in this set */ #define ALLOCSET_NUM_FREELISTS 8 - AllocChunk freelist[ALLOCSET_NUM_FREELISTS]; /* free chunk lists */ + AllocChunk freelist[ALLOCSET_NUM_FREELISTS]; /* free chunk lists */ /* Note: this will change in the future to support other modes */ } AllocSetData; /* * AllocBlock * An AllocBlock is the unit of memory that is obtained by aset.c - * from malloc(). It contains one or more AllocChunks, which are + * from malloc(). It contains one or more AllocChunks, which are * the units requested by palloc() and freed by pfree(). AllocChunks * cannot be returned to malloc() individually, instead they are put * on freelists by pfree() and re-used by the next palloc() that has diff --git a/src/include/utils/nabstime.h b/src/include/utils/nabstime.h index a822e58a66e..97f5119fd74 100644 --- a/src/include/utils/nabstime.h +++ b/src/include/utils/nabstime.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: nabstime.h,v 1.24 2000/03/27 17:07:48 thomas Exp $ + * $Id: nabstime.h,v 1.25 2000/04/12 17:16:55 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -25,7 +25,7 @@ * * ---------------------------------------------------------------- */ -/* +/* * Although time_t generally is a long int on 64 bit systems, these two * types must be 4 bytes, because that's what the system assumes. They * should be yanked (long) before 2038 and be replaced by timestamp and @@ -52,10 +52,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) 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) */ +#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) /* @@ -66,10 +66,10 @@ typedef TimeIntervalData *TimeInterval; */ #define NOSTART_ABSTIME ((AbsoluteTime) INT_MIN) #else -#define NOSTART_ABSTIME ((AbsoluteTime) 0x80000001) /* -2147483647 (- 2^31) */ +#define NOSTART_ABSTIME ((AbsoluteTime) 0x80000001) /* -2147483647 (- 2^31) */ #endif /* _AIX */ -#define INVALID_RELTIME ((RelativeTime) 0x7FFFFFFE) /* 2147483647 (2^31 - 1) */ +#define INVALID_RELTIME ((RelativeTime) 0x7FFFFFFE) /* 2147483647 (2^31 - 1) */ #define AbsoluteTimeIsValid(time) \ ((bool) ((time) != INVALID_ABSTIME)) diff --git a/src/include/utils/numeric.h b/src/include/utils/numeric.h index cd8ff13e289..1b3864dc0dd 100644 --- a/src/include/utils/numeric.h +++ b/src/include/utils/numeric.h @@ -5,7 +5,7 @@ * * 1998 Jan Wieck * - * $Header: /cvsroot/pgsql/src/include/utils/numeric.h,v 1.8 2000/01/15 23:42:48 tgl Exp $ + * $Header: /cvsroot/pgsql/src/include/utils/numeric.h,v 1.9 2000/04/12 17:16:55 momjian Exp $ * * ---------- */ @@ -41,7 +41,7 @@ #define NUMERIC_POS 0x0000 #define NUMERIC_NEG 0x4000 #define NUMERIC_NAN 0xC000 -#define NUMERIC_DSCALE_MASK 0x3FFF +#define NUMERIC_DSCALE_MASK 0x3FFF #define NUMERIC_SIGN(n) ((n)->n_sign_dscale & NUMERIC_SIGN_MASK) #define NUMERIC_DSCALE(n) ((n)->n_sign_dscale & NUMERIC_DSCALE_MASK) #define NUMERIC_IS_NAN(n) (NUMERIC_SIGN(n) != NUMERIC_POS && \ diff --git a/src/include/utils/pg_locale.h b/src/include/utils/pg_locale.h index 21e9a6d0f5a..b3a178d6a79 100644 --- a/src/include/utils/pg_locale.h +++ b/src/include/utils/pg_locale.h @@ -2,50 +2,51 @@ /* ----------------------------------------------------------------------- * pg_locale.h * - * $Header: /cvsroot/pgsql/src/include/utils/pg_locale.h,v 1.3 2000/03/18 18:57:15 tgl Exp $ + * $Header: /cvsroot/pgsql/src/include/utils/pg_locale.h,v 1.4 2000/04/12 17:16:55 momjian Exp $ * * - * Portions Copyright (c) 1999-2000, PostgreSQL, Inc + * Portions Copyright (c) 1999-2000, PostgreSQL, Inc * - * The PostgreSQL locale utils. + * The PostgreSQL locale utils. * * Karel Zak - Zakkr * * ----------------------------------------------------------------------- */ - - #ifndef _PG_LOCALE_ - #define _PG_LOCALE_ - - #ifdef USE_LOCALE - + +#ifndef _PG_LOCALE_ +#define _PG_LOCALE_ + +#ifdef USE_LOCALE + /*------ * POSIX locale categories and environment variable LANG *------ */ -typedef struct PG_LocaleCategories { - char *lang, - *lc_ctype, - *lc_numeric, - *lc_time, - *lc_collate, - *lc_monetary, - *lc_messages; -} PG_LocaleCategories; +typedef struct PG_LocaleCategories +{ + char *lang, + *lc_ctype, + *lc_numeric, + *lc_time, + *lc_collate, + *lc_monetary, + *lc_messages; +} PG_LocaleCategories; -extern PG_LocaleCategories *PGLC_current( PG_LocaleCategories *lc ); -extern PG_LocaleCategories *PGLC_setlocale( PG_LocaleCategories *lc ); +extern PG_LocaleCategories *PGLC_current(PG_LocaleCategories * lc); +extern PG_LocaleCategories *PGLC_setlocale(PG_LocaleCategories * lc); /*------ * Return the POSIX lconv struct (contains number/money formatting information) - * with locale information for *all* categories. Returned lconv is *independent* + * with locale information for *all* categories. Returned lconv is *independent* * on current locale catogories setting - in contrast to standard localeconv(). *------ */ extern struct lconv *PGLC_localeconv(void); - -#endif /* USE_LOCALE */ - -#endif /* _PG_LOCALE_ */ + +#endif /* USE_LOCALE */ + +#endif /* _PG_LOCALE_ */ diff --git a/src/include/utils/pg_lzcompress.h b/src/include/utils/pg_lzcompress.h index db9618fd40e..fd1e62a8bed 100644 --- a/src/include/utils/pg_lzcompress.h +++ b/src/include/utils/pg_lzcompress.h @@ -1,7 +1,7 @@ /* ---------- * pg_lzcompress.h - * - * $Header: /cvsroot/pgsql/src/include/utils/pg_lzcompress.h,v 1.4 2000/01/05 18:23:52 momjian Exp $ + * $Header: /cvsroot/pgsql/src/include/utils/pg_lzcompress.h,v 1.5 2000/04/12 17:16:55 momjian Exp $ * * Definitions for the builtin LZ compressor * ---------- @@ -14,14 +14,15 @@ /* ---------- * PGLZ_Header - * - * The information at the top of the compressed data. + * The information at the top of the compressed data. * The varsize must be kept the same data type as the value * in front of all variable size data types in PostgreSQL. * ---------- */ -typedef struct PGLZ_Header { - int32 varsize; - int32 rawsize; +typedef struct PGLZ_Header +{ + int32 varsize; + int32 rawsize; } PGLZ_Header; @@ -54,9 +55,9 @@ typedef struct PGLZ_Header { * uncompressed data. * ---------- */ -#define PGLZ_IS_COMPRESSED(_lzdata) (_lzdata->varsize != \ - _lzdata->rawsize + \ - sizeof(PGLZ_Header)) +#define PGLZ_IS_COMPRESSED(_lzdata) (_lzdata->varsize != \ + _lzdata->rawsize + \ + sizeof(PGLZ_Header)) /* ---------- * PGLZ_RAW_DATA - @@ -65,7 +66,7 @@ typedef struct PGLZ_Header { * data. Useful if PGLZ_IS_COMPRESSED returns false. * ---------- */ -#define PGLZ_RAW_DATA(_lzdata) (((char *)(_lzdata)) + \ +#define PGLZ_RAW_DATA(_lzdata) (((char *)(_lzdata)) + \ sizeof(PGLZ_Header)) /* ---------- @@ -89,7 +90,7 @@ typedef struct PGLZ_Header { * lookup. When looking up the history to find a * match that could be expressed as a tag, the * algorithm does not allways walk back entirely. - * A good match fast is usually better than the + * A good match fast is usually better than the * best possible one very late. For each iteration * in the lookup, this value is lowered so the * longer the lookup takes, the smaller matches @@ -101,7 +102,8 @@ typedef struct PGLZ_Header { * latest history entry at all). * ---------- */ -typedef struct PGLZ_Strategy { +typedef struct PGLZ_Strategy +{ int32 min_input_size; int32 force_input_size; int32 min_comp_rate; @@ -117,16 +119,17 @@ typedef struct PGLZ_Strategy { * using pglz_decomp_getchar() macro. * ---------- */ -typedef struct PGLZ_DecompState { - unsigned char *temp_buf; - unsigned char *cp_in; - unsigned char *cp_end; - unsigned char *cp_out; - unsigned char *cp_copy; - int (*next_char)(struct PGLZ_DecompState *dstate); - int tocopy; - int ctrl_count; - unsigned char ctrl; +typedef struct PGLZ_DecompState +{ + unsigned char *temp_buf; + unsigned char *cp_in; + unsigned char *cp_end; + unsigned char *cp_out; + unsigned char *cp_copy; + int (*next_char) (struct PGLZ_DecompState *dstate); + int tocopy; + int ctrl_count; + unsigned char ctrl; } PGLZ_DecompState; @@ -154,9 +157,9 @@ typedef struct PGLZ_DecompState { * for generic interfacing. * ---------- */ -extern PGLZ_Strategy *PGLZ_strategy_default; -extern PGLZ_Strategy *PGLZ_strategy_allways; -extern PGLZ_Strategy *PGLZ_strategy_never; +extern PGLZ_Strategy *PGLZ_strategy_default; +extern PGLZ_Strategy *PGLZ_strategy_allways; +extern PGLZ_Strategy *PGLZ_strategy_never; /* ---------- @@ -177,10 +180,10 @@ extern PGLZ_Strategy *PGLZ_strategy_never; * Initialize a decomp state from a compressed input. * ---------- */ -#define pglz_decomp_init(_ds,_lz) { \ - (_ds)->cp_in = ((unsigned char *)(_lz)) \ +#define pglz_decomp_init(_ds,_lz) do { \ + (_ds)->cp_in = ((unsigned char *)(_lz)) \ + sizeof(PGLZ_Header); \ - (_ds)->cp_end = (_ds)->cp_in + (_lz)->varsize \ + (_ds)->cp_end = (_ds)->cp_in + (_lz)->varsize \ - sizeof(PGLZ_Header); \ if (PGLZ_IS_COMPRESSED((_lz))) { \ (_ds)->temp_buf = (unsigned char *) \ @@ -193,7 +196,7 @@ extern PGLZ_Strategy *PGLZ_strategy_never; (_ds)->temp_buf = NULL; \ (_ds)->next_char = pglz_get_next_decomp_char_from_plain; \ } \ - } + } while (0) /* ---------- @@ -202,19 +205,19 @@ extern PGLZ_Strategy *PGLZ_strategy_never; * Deallocate resources after decompression. * ---------- */ -#define pglz_decomp_end(_ds) { \ +#define pglz_decomp_end(_ds) do { \ if ((_ds)->temp_buf != NULL) \ pfree((void *)((_ds)->temp_buf)); \ - } + } while (0) /* ---------- * Global function declarations * ---------- */ -int pglz_compress (char *source, int32 slen, PGLZ_Header *dest, - PGLZ_Strategy *strategy); -int pglz_decompress (PGLZ_Header *source, char *dest); +int pglz_compress(char *source, int32 slen, PGLZ_Header *dest, + PGLZ_Strategy *strategy); +int pglz_decompress(PGLZ_Header *source, char *dest); /* ---------- @@ -222,8 +225,7 @@ int pglz_decompress (PGLZ_Header *source, char *dest); * Internal use only. * ---------- */ -extern int pglz_get_next_decomp_char_from_lzdata(PGLZ_DecompState *dstate); -extern int pglz_get_next_decomp_char_from_plain(PGLZ_DecompState *dstate); - -#endif /* _PG_LZCOMPRESS_H_ */ +extern int pglz_get_next_decomp_char_from_lzdata(PGLZ_DecompState *dstate); +extern int pglz_get_next_decomp_char_from_plain(PGLZ_DecompState *dstate); +#endif /* _PG_LZCOMPRESS_H_ */ diff --git a/src/include/utils/portal.h b/src/include/utils/portal.h index d24fd16f1a5..406fcc6af23 100644 --- a/src/include/utils/portal.h +++ b/src/include/utils/portal.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: portal.h,v 1.22 2000/02/18 09:30:16 inoue Exp $ + * $Id: portal.h,v 1.23 2000/04/12 17:16:55 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -61,7 +61,7 @@ struct PortalD * Special portals (well, their names anyway) */ #define VACPNAME "<vacuum>" -#define TRUNCPNAME "<truncate>" +#define TRUNCPNAME "<truncate>" extern bool PortalNameIsSpecial(char *pname); extern void AtEOXact_portals(void); diff --git a/src/include/utils/ps_status.h b/src/include/utils/ps_status.h index 0058e56ae3f..b74816586b4 100644 --- a/src/include/utils/ps_status.h +++ b/src/include/utils/ps_status.h @@ -21,7 +21,7 @@ extern char *ps_status_buffer; char *ps_status_buffer = NULL #define PS_INIT_STATUS(argc, argv, execname, username, hostname, dbname) \ - { \ + do { \ int i; \ for (i = 0; i < (argc); i++) { \ memset((argv)[i], 0, strlen((argv)[i])); \ @@ -30,10 +30,10 @@ char *ps_status_buffer = NULL sprintf(ps_status_buffer, "%s %s %s %s ", execname, username, hostname, dbname); \ ps_status_buffer += strlen(ps_status_buffer); \ ps_status_buffer[0] = '\0'; \ - } + } while (0) #define PS_CLEAR_STATUS() \ - { if (ps_status_buffer) memset(ps_status_buffer, 0, strlen(ps_status_buffer)); } + do { if (ps_status_buffer) memset(ps_status_buffer, 0, strlen(ps_status_buffer)); } #define PS_SET_STATUS(status) \ { \ @@ -42,7 +42,7 @@ char *ps_status_buffer = NULL PS_CLEAR_STATUS(); \ strcpy(ps_status_buffer, status); \ } \ - } + } while (0) #define PS_STATUS (ps_status_buffer ? ps_status_buffer : "") @@ -53,7 +53,7 @@ extern char Ps_status_buffer[]; #undef PS_DEFINE_BUFFER #define PS_INIT_STATUS(argc, argv, execname, username, hostname, dbname) \ - { \ + do { \ int i; \ Assert(argc >= 5); \ argv[0] = execname; \ @@ -63,13 +63,13 @@ extern char Ps_status_buffer[]; argv[4] = Ps_status_buffer; \ for (i = 5; i < argc; i++) \ argv[i] = ""; /* blank them */ \ - } + } while (0) #define PS_CLEAR_STATUS() \ - { Ps_status_buffer[0] = '\0'; } + do { Ps_status_buffer[0] = '\0'; } while (0) #define PS_SET_STATUS(status) \ - { strcpy(Ps_status_buffer, (status)); } + do { strcpy(Ps_status_buffer, (status)); } while (0) #define PS_STATUS (Ps_status_buffer) #endif @@ -78,7 +78,7 @@ extern char Ps_status_buffer[]; #undef PS_DEFINE_BUFFER #define PS_INIT_STATUS(argc, argv, execname, username, hostname, dbname) #define PS_CLEAR_STATUS() -#define PS_SET_STATUS(status) { if ((status)); } +#define PS_SET_STATUS(status) do { if ((status)); } while (0) #define PS_STATUS "" #endif /* !linux */ diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h index dcc9cffcbf4..1bd2f10376e 100644 --- a/src/include/utils/rel.h +++ b/src/include/utils/rel.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: rel.h,v 1.35 2000/02/27 07:31:00 tgl Exp $ + * $Id: rel.h,v 1.36 2000/04/12 17:16:55 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -95,7 +95,8 @@ typedef struct RelationData Form_pg_am rd_am; /* AM tuple */ Form_pg_class rd_rel; /* RELATION tuple */ Oid rd_id; /* relation's object id */ - LockInfoData rd_lockInfo; /* lock manager's info for locking relation */ + LockInfoData rd_lockInfo; /* lock manager's info for locking + * relation */ TupleDesc rd_att; /* tuple descriptor */ RuleLock *rd_rules; /* rewrite rules */ IndexStrategy rd_istrat; @@ -225,7 +226,7 @@ typedef Relation *RelationPtr; extern void RelationSetIndexSupport(Relation relation, - IndexStrategy strategy, - RegProcedure *support); + IndexStrategy strategy, + RegProcedure *support); #endif /* REL_H */ diff --git a/src/include/utils/syscache.h b/src/include/utils/syscache.h index 01dea2a9c2c..272b177c781 100644 --- a/src/include/utils/syscache.h +++ b/src/include/utils/syscache.h @@ -9,7 +9,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: syscache.h,v 1.24 2000/01/26 05:58:38 momjian Exp $ + * $Id: syscache.h,v 1.25 2000/04/12 17:16:55 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -83,7 +83,7 @@ extern HeapTuple SearchSysCacheTupleCopy(int cacheId, extern HeapTuple SearchSysCacheTuple(int cacheId, Datum key1, Datum key2, Datum key3, Datum key4); extern Datum SysCacheGetAttr(int cacheId, HeapTuple tup, - AttrNumber attributeNumber, - bool *isnull); + AttrNumber attributeNumber, + bool *isnull); #endif /* SYSCACHE_H */ diff --git a/src/include/utils/temprel.h b/src/include/utils/temprel.h index ddcca0bc0de..7a1dfa9e1bf 100644 --- a/src/include/utils/temprel.h +++ b/src/include/utils/temprel.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: temprel.h,v 1.8 2000/01/26 05:58:38 momjian Exp $ + * $Id: temprel.h,v 1.9 2000/04/12 17:16:55 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -20,7 +20,7 @@ void create_temp_relation(const char *relname, HeapTuple pg_class_tuple); void remove_all_temp_relations(void); void invalidate_temp_relations(void); void remove_temp_relation(Oid relid); -char *get_temp_rel_by_username(const char *user_relname); -char *get_temp_rel_by_physicalname(const char *relname); +char *get_temp_rel_by_username(const char *user_relname); +char *get_temp_rel_by_physicalname(const char *relname); #endif /* TEMPREL_H */ diff --git a/src/include/utils/timestamp.h b/src/include/utils/timestamp.h index cea772afb77..bce73ae0801 100644 --- a/src/include/utils/timestamp.h +++ b/src/include/utils/timestamp.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: timestamp.h,v 1.3 2000/04/07 13:40:12 thomas Exp $ + * $Id: timestamp.h,v 1.4 2000/04/12 17:16:56 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -31,8 +31,10 @@ typedef double Timestamp; typedef struct { - double time; /* all time units other than months and years */ - int4 month; /* months and years, after time for alignment */ + double time; /* all time units other than months and + * years */ + int4 month; /* months and years, after time for + * alignment */ } Interval; @@ -51,29 +53,29 @@ typedef struct #define DT_CURRENT (DBL_MIN) #define DT_EPOCH (-DBL_MIN) -#define TIMESTAMP_INVALID(j) {j = DT_INVALID;} +#define TIMESTAMP_INVALID(j) do {j = DT_INVALID;} while (0) #ifdef NAN -#define TIMESTAMP_IS_INVALID(j) (isnan(j)) +#define TIMESTAMP_IS_INVALID(j) (isnan(j)) #else -#define TIMESTAMP_IS_INVALID(j) (j == DT_INVALID) +#define TIMESTAMP_IS_INVALID(j) (j == DT_INVALID) #endif -#define TIMESTAMP_NOBEGIN(j) {j = DT_NOBEGIN;} -#define TIMESTAMP_IS_NOBEGIN(j) (j == DT_NOBEGIN) +#define TIMESTAMP_NOBEGIN(j) do {j = DT_NOBEGIN;} while (0) +#define TIMESTAMP_IS_NOBEGIN(j) (j == DT_NOBEGIN) -#define TIMESTAMP_NOEND(j) {j = DT_NOEND;} +#define TIMESTAMP_NOEND(j) do {j = DT_NOEND;} while (0) #define TIMESTAMP_IS_NOEND(j) (j == DT_NOEND) -#define TIMESTAMP_CURRENT(j) {j = DT_CURRENT;} +#define TIMESTAMP_CURRENT(j) do {j = DT_CURRENT;} while (0) #if defined(linux) && defined(__powerpc__) extern int timestamp_is_current(double j); -#define TIMESTAMP_IS_CURRENT(j) timestamp_is_current(j) +#define TIMESTAMP_IS_CURRENT(j) timestamp_is_current(j) #else -#define TIMESTAMP_IS_CURRENT(j) (j == DT_CURRENT) +#define TIMESTAMP_IS_CURRENT(j) (j == DT_CURRENT) #endif -#define TIMESTAMP_EPOCH(j) {j = DT_EPOCH;} +#define TIMESTAMP_EPOCH(j) do {j = DT_EPOCH;} while (0) #if defined(linux) && defined(__powerpc__) extern int timestamp_is_epoch(double j); @@ -83,11 +85,11 @@ extern int timestamp_is_epoch(double j); #endif #define TIMESTAMP_IS_RELATIVE(j) (TIMESTAMP_IS_CURRENT(j) || TIMESTAMP_IS_EPOCH(j)) -#define TIMESTAMP_NOT_FINITE(j) (TIMESTAMP_IS_INVALID(j) \ +#define TIMESTAMP_NOT_FINITE(j) (TIMESTAMP_IS_INVALID(j) \ || TIMESTAMP_IS_NOBEGIN(j) || TIMESTAMP_IS_NOEND(j)) #define TIMESTAMP_IS_RESERVED(j) (TIMESTAMP_IS_RELATIVE(j) || TIMESTAMP_NOT_FINITE(j)) -#define INTERVAL_INVALID(j) {(j).time = DT_INVALID;} +#define INTERVAL_INVALID(j) do {(j).time = DT_INVALID;} while (0) #ifdef NAN #define INTERVAL_IS_INVALID(j) (isnan((j).time)) #else @@ -152,15 +154,15 @@ extern Timestamp *timestamp_mi_span(Timestamp *dt, Interval *span); extern Interval *timestamp_age(Timestamp *dt1, Timestamp *dt2); extern bool overlaps_timestamp(Timestamp *dt1, Timestamp *dt2, Timestamp *dt3, Timestamp *dt4); -extern int tm2timestamp(struct tm * tm, double fsec, int *tzp, Timestamp *dt); -extern int timestamp2tm(Timestamp dt, int *tzp, struct tm * tm, double *fsec, char **tzn); +extern int tm2timestamp(struct tm * tm, double fsec, int *tzp, Timestamp *dt); +extern int timestamp2tm(Timestamp dt, int *tzp, struct tm * tm, double *fsec, char **tzn); extern Timestamp SetTimestamp(Timestamp timestamp); extern Timestamp dt2local(Timestamp dt, int timezone); extern void dt2time(Timestamp dt, int *hour, int *min, double *sec); -extern int EncodeSpecialTimestamp(Timestamp dt, char *str); -extern int interval2tm(Interval span, struct tm * tm, float8 *fsec); -extern int tm2interval(struct tm * tm, double fsec, Interval *span); +extern int EncodeSpecialTimestamp(Timestamp dt, char *str); +extern int interval2tm(Interval span, struct tm * tm, float8 *fsec); +extern int tm2interval(struct tm * tm, double fsec, Interval *span); extern Timestamp *now(void); #endif /* TIMESTAMP_H */ diff --git a/src/include/utils/tqual.h b/src/include/utils/tqual.h index 9f361fd6ff4..01a3b9c80c7 100644 --- a/src/include/utils/tqual.h +++ b/src/include/utils/tqual.h @@ -8,7 +8,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: tqual.h,v 1.28 2000/01/26 05:58:38 momjian Exp $ + * $Id: tqual.h,v 1.29 2000/04/12 17:16:56 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -21,11 +21,11 @@ typedef struct SnapshotData { - TransactionId xmin; /* XID < xmin are visible to me */ - TransactionId xmax; /* XID >= xmax are invisible to me */ - uint32 xcnt; /* # of xact below */ - TransactionId *xip; /* array of xacts in progress */ - ItemPointerData tid; /* required for Dirty snapshot -:( */ + TransactionId xmin; /* XID < xmin are visible to me */ + TransactionId xmax; /* XID >= xmax are invisible to me */ + uint32 xcnt; /* # of xact below */ + TransactionId *xip; /* array of xacts in progress */ + ItemPointerData tid; /* required for Dirty snapshot -:( */ } SnapshotData; typedef SnapshotData *Snapshot; @@ -89,7 +89,7 @@ extern bool HeapTupleSatisfiesItself(HeapTupleHeader tuple); extern bool HeapTupleSatisfiesNow(HeapTupleHeader tuple); extern bool HeapTupleSatisfiesDirty(HeapTupleHeader tuple); extern bool HeapTupleSatisfiesSnapshot(HeapTupleHeader tuple, - Snapshot snapshot); + Snapshot snapshot); extern int HeapTupleSatisfiesUpdate(HeapTuple tuple); extern Snapshot GetSnapshotData(bool serializable); diff --git a/src/include/utils/trace.h b/src/include/utils/trace.h index 3cb2d9e28f1..71e402e9edc 100644 --- a/src/include/utils/trace.h +++ b/src/include/utils/trace.h @@ -34,8 +34,10 @@ extern void read_pg_options(SIGNAL_ARGS); * Trace options, used as index into pg_options. * Must match the constants in pg_options[]. */ -enum pg_option_enum { - TRACE_ALL, /* 0=trace some, 1=trace all, -1=trace none */ +enum pg_option_enum +{ + TRACE_ALL, /* 0=trace some, 1=trace all, -1=trace + * none */ TRACE_VERBOSE, TRACE_QUERY, TRACE_PLAN, diff --git a/src/include/utils/tuplesort.h b/src/include/utils/tuplesort.h index dc4dffa8e0a..6b54eb9f0b9 100644 --- a/src/include/utils/tuplesort.h +++ b/src/include/utils/tuplesort.h @@ -6,14 +6,14 @@ * This module handles sorting of heap tuples, index tuples, or single * Datums (and could easily support other kinds of sortable objects, * if necessary). It works efficiently for both small and large amounts - * of data. Small amounts are sorted in-memory using qsort(). Large + * of data. Small amounts are sorted in-memory using qsort(). Large * amounts are sorted using temporary files and a standard external sort * algorithm. * * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: tuplesort.h,v 1.3 2000/01/26 05:58:38 momjian Exp $ + * $Id: tuplesort.h,v 1.4 2000/04/12 17:16:56 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -39,31 +39,32 @@ typedef struct Tuplesortstate Tuplesortstate; */ extern Tuplesortstate *tuplesort_begin_heap(TupleDesc tupDesc, - int nkeys, ScanKey keys, - bool randomAccess); + int nkeys, ScanKey keys, + bool randomAccess); extern Tuplesortstate *tuplesort_begin_index(Relation indexRel, - bool enforceUnique, - bool randomAccess); + bool enforceUnique, + bool randomAccess); extern Tuplesortstate *tuplesort_begin_datum(Oid datumType, - Oid sortOperator, - bool randomAccess); + Oid sortOperator, + bool randomAccess); extern void tuplesort_puttuple(Tuplesortstate *state, void *tuple); extern void tuplesort_putdatum(Tuplesortstate *state, Datum val, - bool isNull); + bool isNull); extern void tuplesort_performsort(Tuplesortstate *state); extern void *tuplesort_gettuple(Tuplesortstate *state, bool forward, - bool *should_free); + bool *should_free); + #define tuplesort_getheaptuple(state, forward, should_free) \ ((HeapTuple) tuplesort_gettuple(state, forward, should_free)) #define tuplesort_getindextuple(state, forward, should_free) \ ((IndexTuple) tuplesort_gettuple(state, forward, should_free)) extern bool tuplesort_getdatum(Tuplesortstate *state, bool forward, - Datum *val, bool *isNull); + Datum *val, bool *isNull); extern void tuplesort_end(Tuplesortstate *state); diff --git a/src/include/utils/varbit.h b/src/include/utils/varbit.h index 9ee0724b01d..e6106331b9a 100644 --- a/src/include/utils/varbit.h +++ b/src/include/utils/varbit.h @@ -17,7 +17,7 @@ #include "utils/builtins.h" -#define HEXDIG(z) (z)<10 ? ((z)+'0') : ((z)-10+'A') +#define HEXDIG(z) (z)<10 ? ((z)+'0') : ((z)-10+'A') /* Modeled on struct varlena from postgres.h, bu data type is bits8 */ struct varbita @@ -47,41 +47,41 @@ struct varbita #define BITHIGH 0x80 -bits8 * zpbit_in(char *s, int dummy, int32 atttypmod); -char * zpbit_out(bits8 *s); -char * zpbits_out(bits8 *s); -bits8 * varbit_in(char *s, int dummy, int32 atttypmod); -char * varbit_out (bits8 *s); -bool biteq (bits8 *arg1, bits8 *arg2); -bool bitne (bits8 *arg1, bits8 *arg2); -bool bitge (bits8 *arg1, bits8 *arg2); -bool bitgt (bits8 *arg1, bits8 *arg2); -bool bitle (bits8 *arg1, bits8 *arg2); -bool bitlt (bits8 *arg1, bits8 *arg2); -int bitcmp (bits8 *arg1, bits8 *arg2); -bits8 * bitand (bits8 * arg1, bits8 * arg2); -bits8 * bitor (bits8 * arg1, bits8 * arg2); -bits8 * bitxor (bits8 * arg1, bits8 * arg2); -bits8 * bitnot (bits8 * arg); -bits8 * bitshiftright (bits8 * arg, int shft); -bits8 * bitshiftleft (bits8 * arg, int shft); -bits8 * bitcat (bits8 *arg1, bits8 *arg2); -bits8 * bitsubstr (bits8 *arg, int32 s, int32 l); +bits8 *zpbit_in(char *s, int dummy, int32 atttypmod); +char *zpbit_out(bits8 *s); +char *zpbits_out(bits8 *s); +bits8 *varbit_in(char *s, int dummy, int32 atttypmod); +char *varbit_out(bits8 *s); +bool biteq(bits8 *arg1, bits8 *arg2); +bool bitne(bits8 *arg1, bits8 *arg2); +bool bitge(bits8 *arg1, bits8 *arg2); +bool bitgt(bits8 *arg1, bits8 *arg2); +bool bitle(bits8 *arg1, bits8 *arg2); +bool bitlt(bits8 *arg1, bits8 *arg2); +int bitcmp(bits8 *arg1, bits8 *arg2); +bits8 *bitand(bits8 *arg1, bits8 *arg2); +bits8 *bitor(bits8 *arg1, bits8 *arg2); +bits8 *bitxor(bits8 *arg1, bits8 *arg2); +bits8 *bitnot(bits8 *arg); +bits8 *bitshiftright(bits8 *arg, int shft); +bits8 *bitshiftleft(bits8 *arg, int shft); +bits8 *bitcat(bits8 *arg1, bits8 *arg2); +bits8 *bitsubstr(bits8 *arg, int32 s, int32 l); -bool varbiteq (bits8 *arg1, bits8 *arg2); -bool varbitne (bits8 *arg1, bits8 *arg2); -bool varbitge (bits8 *arg1, bits8 *arg2); -bool varbitgt (bits8 *arg1, bits8 *arg2); -bool varbitle (bits8 *arg1, bits8 *arg2); -bool varbitlt (bits8 *arg1, bits8 *arg2); -int varbitcmp (bits8 *arg1, bits8 *arg2); -bits8 * varbitand (bits8 * arg1, bits8 * arg2); -bits8 * varbitor (bits8 * arg1, bits8 * arg2); -bits8 * varbitxor (bits8 * arg1, bits8 * arg2); -bits8 * varbitnot (bits8 * arg); -bits8 * varbitshiftright (bits8 * arg, int shft); -bits8 * varbitshiftleft (bits8 * arg, int shft); -bits8 * varbitcat (bits8 *arg1, bits8 *arg2); -bits8 * varbitsubstr (bits8 *arg, int32 s, int32 l); +bool varbiteq(bits8 *arg1, bits8 *arg2); +bool varbitne(bits8 *arg1, bits8 *arg2); +bool varbitge(bits8 *arg1, bits8 *arg2); +bool varbitgt(bits8 *arg1, bits8 *arg2); +bool varbitle(bits8 *arg1, bits8 *arg2); +bool varbitlt(bits8 *arg1, bits8 *arg2); +int varbitcmp(bits8 *arg1, bits8 *arg2); +bits8 *varbitand(bits8 *arg1, bits8 *arg2); +bits8 *varbitor(bits8 *arg1, bits8 *arg2); +bits8 *varbitxor(bits8 *arg1, bits8 *arg2); +bits8 *varbitnot(bits8 *arg); +bits8 *varbitshiftright(bits8 *arg, int shft); +bits8 *varbitshiftleft(bits8 *arg, int shft); +bits8 *varbitcat(bits8 *arg1, bits8 *arg2); +bits8 *varbitsubstr(bits8 *arg, int32 s, int32 l); #endif |