Commit 1ccd4232 authored by Bruce Momjian's avatar Bruce Momjian

Massive commit to run PGINDENT on all *.c and *.h files.

parent 8fecd4fe
......@@ -41,7 +41,7 @@
#include "utils/elog.h"
static int32
array_iterator(Oid elemtype, Oid proc, int and, ArrayType *array, Datum value)
array_iterator(Oid elemtype, Oid proc, int and, ArrayType * array, Datum value)
{
HeapTuple typ_tuple;
TypeTupleForm typ_struct;
......@@ -49,28 +49,34 @@ array_iterator(Oid elemtype, Oid proc, int and, ArrayType *array, Datum value)
int typlen;
func_ptr proc_fn;
int pronargs;
int nitems, i, result;
int ndim, *dim;
int nitems,
i,
result;
int ndim,
*dim;
char *p;
/* Sanity checks */
if ((array == (ArrayType *) NULL)
|| (ARR_IS_LO(array) == true)) {
|| (ARR_IS_LO(array) == true))
{
/* elog(NOTICE, "array_iterator: array is null"); */
return (0);
}
ndim = ARR_NDIM(array);
dim = ARR_DIMS(array);
nitems = getNitems(ndim, dim);
if (nitems == 0) {
if (nitems == 0)
{
/* elog(NOTICE, "array_iterator: nitems = 0"); */
return (0);
}
/* Lookup element type information */
typ_tuple = SearchSysCacheTuple(TYPOID, ObjectIdGetDatum(elemtype),0,0,0);
if (!HeapTupleIsValid(typ_tuple)) {
elog(WARN,"array_iterator: cache lookup failed for type %d", elemtype);
typ_tuple = SearchSysCacheTuple(TYPOID, ObjectIdGetDatum(elemtype), 0, 0, 0);
if (!HeapTupleIsValid(typ_tuple))
{
elog(WARN, "array_iterator: cache lookup failed for type %d", elemtype);
return 0;
}
typ_struct = (TypeTupleForm) GETSTRUCT(typ_tuple);
......@@ -80,7 +86,8 @@ array_iterator(Oid elemtype, Oid proc, int and, ArrayType *array, Datum value)
/* Lookup the function entry point */
proc_fn == (func_ptr) NULL;
fmgr_info(proc, &proc_fn, &pronargs);
if ((proc_fn == NULL) || (pronargs != 2)) {
if ((proc_fn == NULL) || (pronargs != 2))
{
elog(WARN, "array_iterator: fmgr_info lookup failed for oid %d", proc);
return (0);
}
......@@ -88,43 +95,59 @@ array_iterator(Oid elemtype, Oid proc, int and, ArrayType *array, Datum value)
/* Scan the array and apply the operator to each element */
result = 0;
p = ARR_DATA_PTR(array);
for (i = 0; i < nitems; i++) {
if (typbyval) {
switch(typlen) {
for (i = 0; i < nitems; i++)
{
if (typbyval)
{
switch (typlen)
{
case 1:
result = (int) (*proc_fn)(*p, value);
result = (int) (*proc_fn) (*p, value);
break;
case 2:
result = (int) (*proc_fn)(* (int16 *) p, value);
result = (int) (*proc_fn) (*(int16 *) p, value);
break;
case 3:
case 4:
result = (int) (*proc_fn)(* (int32 *) p, value);
result = (int) (*proc_fn) (*(int32 *) p, value);
break;
}
p += typlen;
} else {
result = (int) (*proc_fn)(p, value);
if (typlen > 0) {
}
else
{
result = (int) (*proc_fn) (p, value);
if (typlen > 0)
{
p += typlen;
} else {
p += INTALIGN(* (int32 *) p);
}
else
{
p += INTALIGN(*(int32 *) p);
}
}
if (result) {
if (!and) {
if (result)
{
if (!and)
{
return (1);
}
} else {
if (and) {
}
else
{
if (and)
{
return (0);
}
}
}
if (and && result) {
if (and && result)
{
return (1);
} else {
}
else
{
return (0);
}
}
......@@ -134,39 +157,39 @@ array_iterator(Oid elemtype, Oid proc, int and, ArrayType *array, Datum value)
*/
int32
array_texteq(ArrayType *array, char* value)
array_texteq(ArrayType * array, char *value)
{
return array_iterator((Oid) 25, /* text */
(Oid) 67, /* texteq */
0, /* logical or */
array, (Datum)value);
array, (Datum) value);
}
int32
array_all_texteq(ArrayType *array, char* value)
array_all_texteq(ArrayType * array, char *value)
{
return array_iterator((Oid) 25, /* text */
(Oid) 67, /* texteq */
1, /* logical and */
array, (Datum)value);
array, (Datum) value);
}
int32
array_textregexeq(ArrayType *array, char* value)
array_textregexeq(ArrayType * array, char *value)
{
return array_iterator((Oid) 25, /* text */
(Oid) 81, /* textregexeq */
0, /* logical or */
array, (Datum)value);
array, (Datum) value);
}
int32
array_all_textregexeq(ArrayType *array, char* value)
array_all_textregexeq(ArrayType * array, char *value)
{
return array_iterator((Oid) 25, /* text */
(Oid) 81, /* textregexeq */
1, /* logical and */
array, (Datum)value);
array, (Datum) value);
}
/*
......@@ -175,39 +198,39 @@ array_all_textregexeq(ArrayType *array, char* value)
*/
int32
array_char16eq(ArrayType *array, char* value)
array_char16eq(ArrayType * array, char *value)
{
return array_iterator((Oid) 20, /* char16 */
(Oid) 490, /* char16eq */
0, /* logical or */
array, (Datum)value);
array, (Datum) value);
}
int32
array_all_char16eq(ArrayType *array, char* value)
array_all_char16eq(ArrayType * array, char *value)
{
return array_iterator((Oid) 20, /* char16 */
(Oid) 490, /* char16eq */
1, /* logical and */
array, (Datum)value);
array, (Datum) value);
}
int32
array_char16regexeq(ArrayType *array, char* value)
array_char16regexeq(ArrayType * array, char *value)
{
return array_iterator((Oid) 20, /* char16 */
(Oid) 700, /* char16regexeq */
0, /* logical or */
array, (Datum)value);
array, (Datum) value);
}
int32
array_all_char16regexeq(ArrayType *array, char* value)
array_all_char16regexeq(ArrayType * array, char *value)
{
return array_iterator((Oid) 20, /* char16 */
(Oid) 700, /* char16regexeq */
1, /* logical and */
array, (Datum)value);
array, (Datum) value);
}
/*
......@@ -215,37 +238,37 @@ array_all_char16regexeq(ArrayType *array, char* value)
*/
int32
array_int4eq(ArrayType *array, int4 value)
array_int4eq(ArrayType * array, int4 value)
{
return array_iterator((Oid) 23, /* int4 */
(Oid) 65, /* int4eq */
0, /* logical or */
array, (Datum)value);
array, (Datum) value);
}
int32
array_all_int4eq(ArrayType *array, int4 value)
array_all_int4eq(ArrayType * array, int4 value)
{
return array_iterator((Oid) 23, /* int4 */
(Oid) 65, /* int4eq */
1, /* logical and */
array, (Datum)value);
array, (Datum) value);
}
int32
array_int4gt(ArrayType *array, int4 value)
array_int4gt(ArrayType * array, int4 value)
{
return array_iterator((Oid) 23, /* int4 */
(Oid) 147, /* int4gt */
0, /* logical or */
array, (Datum)value);
array, (Datum) value);
}
int32
array_all_int4gt(ArrayType *array, int4 value)
array_all_int4gt(ArrayType * array, int4 value)
{
return array_iterator((Oid) 23, /* int4 */
(Oid) 147, /* int4gt */
1, /* logical and */
array, (Datum)value);
array, (Datum) value);
}
......@@ -13,14 +13,17 @@
#include "utils/datetime.h"
TimeADT *time_difference(TimeADT * time1, TimeADT * time2)
TimeADT *
time_difference(TimeADT * time1, TimeADT * time2)
{
TimeADT *result = (TimeADT *) palloc(sizeof(TimeADT));
*result = *time1 - *time2;
return (result);
}
TimeADT *currenttime()
TimeADT *
currenttime()
{
time_t current_time;
struct tm *tm;
......@@ -28,69 +31,79 @@ TimeADT *currenttime()
current_time = time(NULL);
tm = localtime(&current_time);
*result = ((((tm->tm_hour*60)+tm->tm_min)*60)+tm->tm_sec);
*result = ((((tm->tm_hour * 60) + tm->tm_min) * 60) + tm->tm_sec);
return (result);
}
DateADT currentdate()
DateADT
currentdate()
{
time_t current_time;
struct tm *tm;
DateADT result;
current_time = time(NULL);
tm = localtime(&current_time);
result = date2j(tm->tm_year,tm->tm_mon + 1,tm->tm_mday) -
date2j(100,1,1);
result = date2j(tm->tm_year, tm->tm_mon + 1, tm->tm_mday) -
date2j(100, 1, 1);
return (result);
}
int4 hours(TimeADT * time)
int4
hours(TimeADT * time)
{
return(*time / (60*60));
return (*time / (60 * 60));
}
int4 minutes(TimeADT * time)
int4
minutes(TimeADT * time)
{
return(((int) (*time / 60)) % 60);
return (((int) (*time / 60)) % 60);
}
int4 seconds(TimeADT * time)
int4
seconds(TimeADT * time)
{
return(((int) *time) % 60);
return (((int) *time) % 60);
}
int4 day(DateADT *date)
int4
day(DateADT * date)
{
struct tm tm;
j2date( (*date + date2j(2000,1,1)),
j2date((*date + date2j(2000, 1, 1)),
&tm.tm_year, &tm.tm_mon, &tm.tm_mday);
return (tm.tm_mday);
}
int4 month(DateADT *date)
int4
month(DateADT * date)
{
struct tm tm;
j2date( (*date + date2j(2000,1,1)),
j2date((*date + date2j(2000, 1, 1)),
&tm.tm_year, &tm.tm_mon, &tm.tm_mday);
return (tm.tm_mon);
}
int4 year(DateADT *date)
int4
year(DateADT * date)
{
struct tm tm;
j2date( (*date + date2j(2000,1,1)),
j2date((*date + date2j(2000, 1, 1)),
&tm.tm_year, &tm.tm_mon, &tm.tm_mday);
return (tm.tm_year);
}
int4 asminutes(TimeADT * time)
int4
asminutes(TimeADT * time)
{
int seconds = (int) *time;
return (seconds / 60);
}
int4 asseconds(TimeADT * time)
int4
asseconds(TimeADT * time)
{
int seconds = (int) *time;
......
......@@ -26,52 +26,57 @@
#endif
#ifndef HAVE_64BIT_INTS
typedef char[8] int64;
typedef char [8] int64;
#elif defined(__alpha)
typedef long int int64;
#define INT64_FORMAT "%ld"
#elif defined(__GNUC__)
typedef long long int int64;
#define INT64_FORMAT "%Ld"
#else
typedef long int int64;
#define INT64_FORMAT "%ld"
#endif
int64 *int8in(char *str);
char *int8out(int64 *val);
bool int8eq(int64 *val1, int64 *val2);
bool int8ne(int64 *val1, int64 *val2);
bool int8lt(int64 *val1, int64 *val2);
bool int8gt(int64 *val1, int64 *val2);
bool int8le(int64 *val1, int64 *val2);
bool int8ge(int64 *val1, int64 *val2);
bool int84eq(int64 *val1, int32 val2);
bool int84ne(int64 *val1, int32 val2);
bool int84lt(int64 *val1, int32 val2);
bool int84gt(int64 *val1, int32 val2);
bool int84le(int64 *val1, int32 val2);
bool int84ge(int64 *val1, int32 val2);
int64 *int8um(int64 *val);
int64 *int8pl(int64 *val1, int64 *val2);
int64 *int8mi(int64 *val1, int64 *val2);
int64 *int8mul(int64 *val1, int64 *val2);
int64 *int8div(int64 *val1, int64 *val2);
char *int8out(int64 * val);
bool int8eq(int64 * val1, int64 * val2);
bool int8ne(int64 * val1, int64 * val2);
bool int8lt(int64 * val1, int64 * val2);
bool int8gt(int64 * val1, int64 * val2);
bool int8le(int64 * val1, int64 * val2);
bool int8ge(int64 * val1, int64 * val2);
bool int84eq(int64 * val1, int32 val2);
bool int84ne(int64 * val1, int32 val2);
bool int84lt(int64 * val1, int32 val2);
bool int84gt(int64 * val1, int32 val2);
bool int84le(int64 * val1, int32 val2);
bool int84ge(int64 * val1, int32 val2);
int64 *int8um(int64 * val);
int64 *int8pl(int64 * val1, int64 * val2);
int64 *int8mi(int64 * val1, int64 * val2);
int64 *int8mul(int64 * val1, int64 * val2);
int64 *int8div(int64 * val1, int64 * val2);
int64 *int48(int32 val);
int32 int84(int64 *val);
int32 int84(int64 * val);
#if FALSE
int64 *int28(int16 val);
int16 int82(int64 *val);
int16 int82(int64 * val);
#endif
float64 i8tod(int64 *val);
float64 i8tod(int64 * val);
int64 *dtoi8(float64 val);
#if USE_LOCAL_CODE
......@@ -98,52 +103,54 @@ int64 *dtoi8(float64 val);
/* int8in()
*/
int64 *int8in(char *str)
int64 *
int8in(char *str)
{
int64 *result = PALLOCTYPE(int64);
#if HAVE_64BIT_INTS
if (!PointerIsValid(str))
elog (WARN,"Bad (null) int8 external representation",NULL);
elog(WARN, "Bad (null) int8 external representation", NULL);
if (sscanf(str, INT64_FORMAT, result) != 1)
elog(WARN,"Bad int8 external representation '%s'",str);
elog(WARN, "Bad int8 external representation '%s'", str);
#else
elog(WARN,"64-bit integers are not supported",NULL);
elog(WARN, "64-bit integers are not supported", NULL);
result = NULL;
#endif
return(result);
return (result);
} /* int8in() */
/* int8out()
*/
char *int8out(int64 *val)
char *
int8out(int64 * val)
{
char *result;
int len;
char buf[MAXINT8LEN+1];
char buf[MAXINT8LEN + 1];
#if HAVE_64BIT_INTS
if (!PointerIsValid(val))
return(NULL);
return (NULL);
if ((len = snprintf( buf, MAXINT8LEN, INT64_FORMAT, *val)) < 0)
elog (WARN,"Unable to format int8",NULL);
if ((len = snprintf(buf, MAXINT8LEN, INT64_FORMAT, *val)) < 0)
elog(WARN, "Unable to format int8", NULL);
result = PALLOC(len+1);
result = PALLOC(len + 1);
strcpy(result, buf);
#else
elog(WARN,"64-bit integers are not supported",NULL);
elog(WARN, "64-bit integers are not supported", NULL);
result = NULL;
#endif
return( result);
return (result);
} /* int8out() */
......@@ -154,68 +161,80 @@ char *int8out(int64 *val)
/* int8relop()
* Is val1 relop val2?
*/
bool int8eq(int64 *val1, int64 *val2)
bool
int8eq(int64 * val1, int64 * val2)
{
return(*val1 == *val2);
return (*val1 == *val2);
} /* int8eq() */
bool int8ne(int64 *val1, int64 *val2)
bool
int8ne(int64 * val1, int64 * val2)
{
return(*val1 != *val2);
return (*val1 != *val2);
} /* int8ne() */
bool int8lt(int64 *val1, int64 *val2)
bool
int8lt(int64 * val1, int64 * val2)
{
return(*val1 < *val2);
return (*val1 < *val2);
} /* int8lt() */
bool int8gt(int64 *val1, int64 *val2)
bool
int8gt(int64 * val1, int64 * val2)
{
return(*val1 > *val2);
return (*val1 > *val2);
} /* int8gt() */
bool int8le(int64 *val1, int64 *val2)
bool
int8le(int64 * val1, int64 * val2)
{
return(*val1 <= *val2);
return (*val1 <= *val2);
} /* int8le() */
bool int8ge(int64 *val1, int64 *val2)
bool
int8ge(int64 * val1, int64 * val2)
{
return(*val1 >= *val2);
return (*val1 >= *val2);
} /* int8ge() */
/* int84relop()
* Is 64-bit val1 relop 32-bit val2?
*/
bool int84eq(int64 *val1, int32 val2)
bool
int84eq(int64 * val1, int32 val2)
{
return(*val1 == val2);
return (*val1 == val2);
} /* int84eq() */
bool int84ne(int64 *val1, int32 val2)
bool
int84ne(int64 * val1, int32 val2)
{
return(*val1 != val2);
return (*val1 != val2);
} /* int84ne() */
bool int84lt(int64 *val1, int32 val2)
bool
int84lt(int64 * val1, int32 val2)
{
return(*val1 < val2);
return (*val1 < val2);
} /* int84lt() */
bool int84gt(int64 *val1, int32 val2)
bool
int84gt(int64 * val1, int32 val2)
{
return(*val1 > val2);
return (*val1 > val2);
} /* int84gt() */
bool int84le(int64 *val1, int32 val2)
bool
int84le(int64 * val1, int32 val2)
{
return(*val1 <= val2);
return (*val1 <= val2);
} /* int84le() */
bool int84ge(int64 *val1, int32 val2)
bool
int84ge(int64 * val1, int32 val2)
{
return(*val1 >= val2);
return (*val1 >= val2);
} /* int84ge() */
......@@ -223,19 +242,21 @@ bool int84ge(int64 *val1, int32 val2)
* Arithmetic operators on 64-bit integers.
*---------------------------------------------------------*/
int64 *int8um(int64 *val)
int64 *
int8um(int64 * val)
{
int64 *result = PALLOCTYPE(int64);
if (!PointerIsValid(val))
return NULL;
*result = (- *val);
*result = (-*val);
return(result);
return (result);
} /* int8um() */
int64 *int8pl(int64 *val1, int64 *val2)
int64 *
int8pl(int64 * val1, int64 * val2)
{
int64 *result = PALLOCTYPE(int64);
......@@ -244,10 +265,11 @@ int64 *int8pl(int64 *val1, int64 *val2)
*result = *val1 + *val2;
return(result);
return (result);
} /* int8pl() */
int64 *int8mi(int64 *val1, int64 *val2)
int64 *
int8mi(int64 * val1, int64 * val2)
{
int64 *result = PALLOCTYPE(int64);
......@@ -256,10 +278,11 @@ int64 *int8mi(int64 *val1, int64 *val2)
*result = *val1 - *val2;
return(result);
return (result);
} /* int8mi() */
int64 *int8mul(int64 *val1, int64 *val2)
int64 *
int8mul(int64 * val1, int64 * val2)
{
int64 *result = PALLOCTYPE(int64);
......@@ -268,10 +291,11 @@ int64 *int8mul(int64 *val1, int64 *val2)
*result = *val1 * *val2;
return(result);
return (result);
} /* int8mul() */
int64 *int8div(int64 *val1, int64 *val2)
int64 *
int8div(int64 * val1, int64 * val2)
{
int64 *result = PALLOCTYPE(int64);
......@@ -280,7 +304,7 @@ int64 *int8div(int64 *val1, int64 *val2)
*result = *val1 / *val2;
return(result);
return (result);
} /* int8div() */
......@@ -288,74 +312,80 @@ int64 *int8div(int64 *val1, int64 *val2)
* Conversion operators.
*---------------------------------------------------------*/
int64 *int48(int32 val)
int64 *
int48(int32 val)
{
int64 *result = PALLOCTYPE(int64);
*result = val;
return(result);
return (result);
} /* int48() */
int32 int84(int64 *val)
int32
int84(int64 * val)
{
int32 result;
if (!PointerIsValid(val))
elog(WARN,"Invalid (null) int64, can't convert int8 to int4",NULL);
elog(WARN, "Invalid (null) int64, can't convert int8 to int4", NULL);
if ((*val < INT_MIN) || (*val > INT_MAX))
elog(WARN,"int8 conversion to int4 is out of range",NULL);
elog(WARN, "int8 conversion to int4 is out of range", NULL);
result = *val;
return(result);
return (result);
} /* int84() */
#if FALSE
int64 *int28(int16 val)
int64 *
int28(int16 val)
{
int64 *result;
if (!PointerIsValid(result = PALLOCTYPE(int64)))
elog(WARN,"Memory allocation failed, can't convert int8 to int2",NULL);
elog(WARN, "Memory allocation failed, can't convert int8 to int2", NULL);
*result = val;
return(result);
return (result);
} /* int28() */
int16 int82(int64 *val)
int16
int82(int64 * val)
{
int16 result;
if (!PointerIsValid(val))
elog(WARN,"Invalid (null) int8, can't convert to int2",NULL);
elog(WARN, "Invalid (null) int8, can't convert to int2", NULL);
result = *val;
return(result);
return (result);
} /* int82() */
#endif
float64 i8tod(int64 *val)
float64
i8tod(int64 * val)
{
float64 result = PALLOCTYPE(float64data);
*result = *val;
return(result);
return (result);
} /* i8tod() */
int64 *dtoi8(float64 val)
int64 *
dtoi8(float64 val)
{
int64 *result = PALLOCTYPE(int64);
if ((*val < (-pow(2,64)+1)) || (*val > (pow(2,64)-1)))
elog(WARN,"Floating point conversion to int64 is out of range",NULL);
if ((*val < (-pow(2, 64) + 1)) || (*val > (pow(2, 64) - 1)))
elog(WARN, "Floating point conversion to int64 is out of range", NULL);
*result = *val;
return(result);
return (result);
} /* dtoi8() */
......@@ -20,39 +20,41 @@
**------------------------------------------------------------------------*/
/*VARARGS*/
void halt(va_alist)
void
halt(va_alist)
va_dcl
{
va_list arg_ptr;
char *format, *pstr;
void (*sig_func)();
char *format,
*pstr;
void (*sig_func) ();
va_start(arg_ptr);
format = va_arg(arg_ptr,char *);
if (strncmp(format,"PERROR", 6) != 0)
vfprintf(stderr,format,arg_ptr);
format = va_arg(arg_ptr, char *);
if (strncmp(format, "PERROR", 6) != 0)
vfprintf(stderr, format, arg_ptr);
else
{
for (pstr=format+6; *pstr == ' ' || *pstr == ':'; pstr++)
for (pstr = format + 6; *pstr == ' ' || *pstr == ':'; pstr++)
;
vfprintf(stderr,pstr,arg_ptr);
vfprintf(stderr, pstr, arg_ptr);
perror("");
}
va_end(arg_ptr);
fflush(stderr);
/* call one clean up function if defined */
if ( (sig_func = signal(SIGTERM, SIG_DFL)) != SIG_DFL &&
if ((sig_func = signal(SIGTERM, SIG_DFL)) != SIG_DFL &&
sig_func != SIG_IGN)
(*sig_func)(0);
else if ( (sig_func = signal(SIGHUP, SIG_DFL)) != SIG_DFL &&
(*sig_func) (0);
else if ((sig_func = signal(SIGHUP, SIG_DFL)) != SIG_DFL &&
sig_func != SIG_IGN)
(*sig_func)(0);
else if ( (sig_func = signal(SIGINT, SIG_DFL)) != SIG_DFL &&
(*sig_func) (0);
else if ((sig_func = signal(SIGINT, SIG_DFL)) != SIG_DFL &&
sig_func != SIG_IGN)
(*sig_func)(0);
else if ( (sig_func = signal(SIGQUIT, SIG_DFL)) != SIG_DFL &&
(*sig_func) (0);
else if ((sig_func = signal(SIGQUIT, SIG_DFL)) != SIG_DFL &&
sig_func != SIG_IGN)
(*sig_func)(0);
(*sig_func) (0);
exit(1);
}
......@@ -4,4 +4,3 @@
*/
void halt();
......@@ -10,20 +10,25 @@
#include "halt.h"
#include "pginterface.h"
int main(int argc, char **argv)
int
main(int argc, char **argv)
{
char query[4000];
int row =1;
int row = 1;
int aint;
float afloat;
double adouble;
char achar[11], achar16[17], abpchar[11], avarchar[51], atext[51];
char achar[11],
achar16[17],
abpchar[11],
avarchar[51],
atext[51];
time_t aabstime;
if (argc != 2)
halt("Usage: %s database\n",argv[0]);
halt("Usage: %s database\n", argv[0]);
connectdb(argv[1],NULL,NULL,NULL,NULL);
connectdb(argv[1], NULL, NULL, NULL, NULL);
on_error_continue();
doquery("DROP TABLE testfetch");
......@@ -42,9 +47,9 @@ int main(int argc, char **argv)
aabstime abstime) \
");
while(1)
while (1)
{
sprintf(query,"INSERT INTO testfetch VALUES ( \
sprintf(query, "INSERT INTO testfetch VALUES ( \
%d, \
2322.12, \
'923121.0323'::float8, \
......@@ -87,7 +92,7 @@ bpchar %s\nvarchar %s\ntext %s\nabstime %s",
doquery("CLOSE c_testfetch");
doquery("COMMIT WORK");
printf("--- %-d rows inserted so far\n",row);
printf("--- %-d rows inserted so far\n", row);
row++;
}
......@@ -95,4 +100,3 @@ bpchar %s\nvarchar %s\ntext %s\nabstime %s",
disconnectdb();
return 0;
}
......@@ -18,8 +18,8 @@ static void set_signals();
#define NUL '\0'
/* GLOBAL VARIABLES */
static PGconn* conn;
static PGresult* res = NULL;
static PGconn *conn;
static PGresult *res = NULL;
#define ON_ERROR_STOP 0
#define ON_ERROR_CONTINUE 1
......@@ -27,7 +27,8 @@ static PGresult* res = NULL;
static int on_error_state = ON_ERROR_STOP;
/* LOCAL VARIABLES */
static sigset_t block_sigs, unblock_sigs;
static sigset_t block_sigs,
unblock_sigs;
static int tuple;
/*
......@@ -35,7 +36,8 @@ static int tuple;
** connectdb - returns PGconn structure
**
*/
PGconn *connectdb( char *dbName,
PGconn *
connectdb(char *dbName,
char *pghost,
char *pgport,
char *pgoptions,
......@@ -55,7 +57,8 @@ PGconn *connectdb( char *dbName,
** disconnectdb
**
*/
void disconnectdb()
void
disconnectdb()
{
PQfinish(conn);
}
......@@ -65,14 +68,15 @@ void disconnectdb()
** doquery - returns PGresult structure
**
*/
PGresult *doquery(char *query)
PGresult *
doquery(char *query)
{
if (res != NULL)
PQclear(res);
sigprocmask(SIG_SETMASK,&block_sigs,NULL);
sigprocmask(SIG_SETMASK, &block_sigs, NULL);
res = PQexec(conn, query);
sigprocmask(SIG_SETMASK,&unblock_sigs,NULL);
sigprocmask(SIG_SETMASK, &unblock_sigs, NULL);
if (on_error_state == ON_ERROR_STOP &&
(res == NULL ||
......@@ -81,8 +85,9 @@ PGresult *doquery(char *query)
PQresultStatus(res) == PGRES_FATAL_ERROR))
{
if (res != NULL)
fprintf(stderr,"query error: %s\n",PQcmdStatus(res));
else fprintf(stderr,"connection error: %s\n",PQerrorMessage(conn));
fprintf(stderr, "query error: %s\n", PQcmdStatus(res));
else
fprintf(stderr, "connection error: %s\n", PQerrorMessage(conn));
PQfinish(conn);
halt("failed request: %s\n", query);
}
......@@ -96,10 +101,12 @@ PGresult *doquery(char *query)
** NULL pointers are skipped
**
*/
int fetch(void *param, ...)
int
fetch(void *param,...)
{
va_list ap;
int arg, num_fields;
int arg,
num_fields;
num_fields = PQnfields(res);
......@@ -113,11 +120,11 @@ int fetch(void *param, ...)
{
if (PQfsize(res, arg) == -1)
{
memcpy(param,PQgetvalue(res,tuple,arg),PQgetlength(res,tuple,arg));
((char *)param)[PQgetlength(res,tuple,arg)] = NUL;
memcpy(param, PQgetvalue(res, tuple, arg), PQgetlength(res, tuple, arg));
((char *) param)[PQgetlength(res, tuple, arg)] = NUL;
}
else
memcpy(param,PQgetvalue(res,tuple,arg),PQfsize(res,arg));
memcpy(param, PQgetvalue(res, tuple, arg), PQfsize(res, arg));
}
param = va_arg(ap, char *);
}
......@@ -132,10 +139,12 @@ int fetch(void *param, ...)
** Returns true or false into null indicator variables
** NULL pointers are skipped
*/
int fetchwithnulls(void *param, ...)
int
fetchwithnulls(void *param,...)
{
va_list ap;
int arg, num_fields;
int arg,
num_fields;
num_fields = PQnfields(res);
......@@ -149,17 +158,17 @@ int fetchwithnulls(void *param, ...)
{
if (PQfsize(res, arg) == -1)
{
memcpy(param,PQgetvalue(res,tuple,arg),PQgetlength(res,tuple,arg));
((char *)param)[PQgetlength(res,tuple,arg)] = NUL;
memcpy(param, PQgetvalue(res, tuple, arg), PQgetlength(res, tuple, arg));
((char *) param)[PQgetlength(res, tuple, arg)] = NUL;
}
else
memcpy(param,PQgetvalue(res,tuple,arg),PQfsize(res,arg));
memcpy(param, PQgetvalue(res, tuple, arg), PQfsize(res, arg));
}
param = va_arg(ap, char *);
if (PQgetisnull(res,tuple,arg) != 0)
*(int *)param = 1;
if (PQgetisnull(res, tuple, arg) != 0)
*(int *) param = 1;
else
*(int *)param = 0;
*(int *) param = 0;
param = va_arg(ap, char *);
}
va_end(ap);
......@@ -171,7 +180,8 @@ int fetchwithnulls(void *param, ...)
** on_error_stop
**
*/
void on_error_stop()
void
on_error_stop()
{
on_error_state = ON_ERROR_STOP;
}
......@@ -181,7 +191,8 @@ void on_error_stop()
** on_error_continue
**
*/
void on_error_continue()
void
on_error_continue()
{
on_error_state = ON_ERROR_CONTINUE;
}
......@@ -191,9 +202,10 @@ void on_error_continue()
** sig_disconnect
**
*/
static void sig_disconnect()
static void
sig_disconnect()
{
fprintf(stderr,"exiting...\n");
fprintf(stderr, "exiting...\n");
PQfinish(conn);
exit(1);
}
......@@ -203,17 +215,18 @@ static void sig_disconnect()
** set_signals
**
*/
static void set_signals()
static void
set_signals()
{
sigemptyset(&block_sigs);
sigemptyset(&unblock_sigs);
sigaddset(&block_sigs,SIGTERM);
sigaddset(&block_sigs,SIGHUP);
sigaddset(&block_sigs,SIGINT);
sigaddset(&block_sigs, SIGTERM);
sigaddset(&block_sigs, SIGHUP);
sigaddset(&block_sigs, SIGINT);
/* sigaddset(&block_sigs,SIGQUIT); no block */
sigprocmask(SIG_SETMASK,&unblock_sigs,NULL);
signal(SIGTERM,sig_disconnect);
signal(SIGHUP,sig_disconnect);
signal(SIGINT,sig_disconnect);
signal(SIGQUIT,sig_disconnect);
sigprocmask(SIG_SETMASK, &unblock_sigs, NULL);
signal(SIGTERM, sig_disconnect);
signal(SIGHUP, sig_disconnect);
signal(SIGINT, sig_disconnect);
signal(SIGQUIT, sig_disconnect);
}
......@@ -6,8 +6,8 @@
PGresult *doquery(char *query);
PGconn *connectdb();
void disconnectdb();
int fetch(void *param, ...);
int fetchwithnulls(void *param, ...);
int fetch(void *param,...);
int fetchwithnulls(void *param,...);
void on_error_continue();
void on_error_stop();
......
......@@ -12,14 +12,19 @@
#include <libpq-fe.h>
#include <pginterface.h>
int main(int argc, char **argv)
int
main(int argc, char **argv)
{
char query[4000];
int row =1;
int row = 1;
int aint;
float afloat;
double adouble;
char achar[11], achar16[17], abpchar[11], avarchar[51], atext[51];
char achar[11],
achar16[17],
abpchar[11],
avarchar[51],
atext[51];
time_t aabstime;
int aint_null,
afloat_null,
......@@ -32,9 +37,9 @@ int main(int argc, char **argv)
aabstime_null;
if (argc != 2)
halt("Usage: %s database\n",argv[0]);
halt("Usage: %s database\n", argv[0]);
connectdb(argv[1],NULL,NULL,NULL,NULL);
connectdb(argv[1], NULL, NULL, NULL, NULL);
on_error_continue();
doquery("DROP TABLE testfetch");
......@@ -54,7 +59,7 @@ int main(int argc, char **argv)
");
#ifdef TEST_NON_NULLS
sprintf(query,"INSERT INTO testfetch VALUES ( \
sprintf(query, "INSERT INTO testfetch VALUES ( \
0, \
0, \
0, \
......@@ -65,7 +70,7 @@ int main(int argc, char **argv)
'', \
'');");
#else
sprintf(query,"INSERT INTO testfetch VALUES ( \
sprintf(query, "INSERT INTO testfetch VALUES ( \
NULL, \
NULL, \
NULL, \
......@@ -129,11 +134,10 @@ bpchar %d\nvarchar %d\ntext %d\nabstime %d\n",
doquery("CLOSE c_testfetch");
doquery("COMMIT WORK");
printf("--- %-d rows inserted so far\n",row);
printf("--- %-d rows inserted so far\n", row);
row++;
disconnectdb();
return 0;
}
......@@ -10,7 +10,8 @@
#include <libpq-fe.h>
#include "pginterface.h"
int main(int argc, char **argv)
int
main(int argc, char **argv)
{
char query[4000];
int row = 0;
......@@ -18,9 +19,9 @@ int main(int argc, char **argv)
char line[4000];
if (argc != 2)
halt("Usage: %s database\n",argv[0]);
halt("Usage: %s database\n", argv[0]);
connectdb(argv[1],NULL,NULL,NULL,NULL);
connectdb(argv[1], NULL, NULL, NULL, NULL);
on_error_continue();
doquery("DROP TABLE words");
on_error_stop();
......@@ -35,12 +36,12 @@ int main(int argc, char **argv)
word text_ops )\
");
while(1)
while (1)
{
if (scanf("%s",line) != 1)
if (scanf("%s", line) != 1)
break;
doquery("BEGIN WORK");
sprintf(query,"\
sprintf(query, "\
DECLARE c_words BINARY CURSOR FOR \
SELECT count(*) \
FROM words \
......@@ -54,11 +55,11 @@ int main(int argc, char **argv)
doquery("COMMIT WORK");
if (count == 0)
sprintf(query,"\
sprintf(query, "\
INSERT INTO words \
VALUES (1, '%s')", line);
else
sprintf(query,"\
sprintf(query, "\
UPDATE words \
SET matches = matches + 1 \
WHERE word = '%s'", line);
......@@ -69,4 +70,3 @@ int main(int argc, char **argv)
disconnectdb();
return 0;
}
......@@ -13,29 +13,30 @@
/* prototype for soundex function */
char *soundex(char *instr, char *outstr);
text *text_soundex(text *t)
text *
text_soundex(text * t)
{
/* ABCDEFGHIJKLMNOPQRSTUVWXYZ */
char *table = "01230120022455012623010202";
int count = 0;
text *new_t;
char outstr[6+1]; /* max length of soundex is 6 */
char outstr[6 + 1]; /* max length of soundex is 6 */
char *instr;
/* make a null-terminated string */
instr=palloc(VARSIZE(t)+1);
memcpy(instr,VARDATA(t),VARSIZE(t)-VARHDRSZ);
instr[VARSIZE(t)-VARHDRSZ] = (char)0;
instr = palloc(VARSIZE(t) + 1);
memcpy(instr, VARDATA(t), VARSIZE(t) - VARHDRSZ);
instr[VARSIZE(t) - VARHDRSZ] = (char) 0;
/* load soundex into outstr */
soundex(instr, outstr);
/* Now the outstr contains the soundex of instr */
/* copy outstr to new_t */
new_t = (text *) palloc(strlen(outstr)+VARHDRSZ);
memset(new_t, 0, strlen(outstr)+1);
VARSIZE(new_t) = strlen(outstr)+VARHDRSZ;
new_t = (text *) palloc(strlen(outstr) + VARHDRSZ);
memset(new_t, 0, strlen(outstr) + 1);
VARSIZE(new_t) = strlen(outstr) + VARHDRSZ;
memcpy((void *) VARDATA(new_t),
(void *) outstr,
strlen(outstr));
......@@ -43,33 +44,39 @@ text *text_soundex(text *t)
/* free instr */
pfree(instr);
return(new_t);
return (new_t);
}
char *soundex(char *instr, char *outstr)
char *
soundex(char *instr, char *outstr)
{ /* ABCDEFGHIJKLMNOPQRSTUVWXYZ */
char *table = "01230120022455012623010202";
int count = 0;
while(!isalpha(instr[0]) && instr[0])
while (!isalpha(instr[0]) && instr[0])
++instr;
if(!instr[0]) { /* Hey! Where'd the string go? */
outstr[0]=(char)0;
if (!instr[0])
{ /* Hey! Where'd the string go? */
outstr[0] = (char) 0;
return outstr;
}
if(toupper(instr[0]) == 'P' && toupper(instr[1]) == 'H') {
if (toupper(instr[0]) == 'P' && toupper(instr[1]) == 'H')
{
instr[0] = 'F';
instr[1] = 'A';
}
*outstr++ = (char)toupper(*instr++);
*outstr++ = (char) toupper(*instr++);
while(*instr && count < 5) {
if(isalpha(*instr) && *instr != *(instr-1)) {
while (*instr && count < 5)
{
if (isalpha(*instr) && *instr != *(instr - 1))
{
*outstr = table[toupper(instr[0]) - 'A'];
if(*outstr != '0') {
if (*outstr != '0')
{
++outstr;
++count;
}
......@@ -78,6 +85,5 @@ char *soundex(char *instr, char *outstr)
}
*outstr = '\0';
return(outstr);
return (outstr);
}
......@@ -48,26 +48,34 @@
char *
string_output(char *data, int size)
{
register unsigned char c, *p, *r, *result;
register int l, len;
if (data == NULL) {
register unsigned char c,
*p,
*r,
*result;
register int l,
len;
if (data == NULL)
{
result = (char *) palloc(2);
result[0] = '-';
result[1] = '\0';
return (result);
}
if (size < 0) {
if (size < 0)
{
size = strlen(data);
}
/* adjust string length for escapes */
len = size;
for (p=data,l=size; l>0; p++,l--) {
switch (*p) {
for (p = data, l = size; l > 0; p++, l--)
{
switch (*p)
{
case '\\':
case '"' :
case '"':
case '{':
case '}':
case '\b':
......@@ -79,7 +87,8 @@ string_output(char *data, int size)
len++;
break;
default:
if (NOTPRINTABLE(*p)) {
if (NOTPRINTABLE(*p))
{
len += 3;
}
}
......@@ -88,10 +97,12 @@ string_output(char *data, int size)
result = (char *) palloc(len);
for (p=data,r=result,l=size; (l > 0) && (c = *p); p++,l--) {
switch (c) {
for (p = data, r = result, l = size; (l > 0) && (c = *p); p++, l--)
{
switch (c)
{
case '\\':
case '"' :
case '"':
case '{':
case '}':
*r++ = '\\';
......@@ -122,7 +133,8 @@ string_output(char *data, int size)
*r++ = 'v';
break;
default:
if (NOTPRINTABLE(c)) {
if (NOTPRINTABLE(c))
{
*r = '\\';
r += 3;
*r-- = DIGIT(c & 07);
......@@ -131,14 +143,16 @@ string_output(char *data, int size)
c >>= 3;
*r = DIGIT(c & 03);
r += 3;
} else {
}
else
{
*r++ = c;
}
}
}
*r = '\0';
return((char *) result);
return ((char *) result);
}
/*
......@@ -170,54 +184,69 @@ string_output(char *data, int size)
char *
string_input(char *str, int size, int hdrsize, int *rtn_size)
{
register unsigned char *p, *r;
register unsigned char *p,
*r;
unsigned char *result;
int len;
if ((str == NULL) || (hdrsize < 0)) {
if ((str == NULL) || (hdrsize < 0))
{
return (char *) NULL;
}
/* Compute result size */
len = strlen(str);
for (p=str; *p; ) {
if (*p++ == '\\') {
if (ISOCTAL(*p)) {
if (ISOCTAL(*(p+1))) {
for (p = str; *p;)
{
if (*p++ == '\\')
{
if (ISOCTAL(*p))
{
if (ISOCTAL(*(p + 1)))
{
p++;
len--;
}
if (ISOCTAL(*(p+1))) {
if (ISOCTAL(*(p + 1)))
{
p++;
len--;
}
}
if (*p) p++;
if (*p)
p++;
len--;
}
}
/* result has variable length */
if (size == 0) {
size = len+1;
} else
if (size == 0)
{
size = len + 1;
}
else
/* result has variable length with maximum size */
if (size < 0) {
size = MIN(len, - size)+1;
if (size < 0)
{
size = MIN(len, -size) + 1;
}
result = (char *) palloc(hdrsize+size);
memset(result, 0, hdrsize+size);
if (rtn_size) {
result = (char *) palloc(hdrsize + size);
memset(result, 0, hdrsize + size);
if (rtn_size)
{
*rtn_size = size;
}
r = result + hdrsize;
for (p=str; *p; ) {
for (p = str; *p;)
{
register unsigned char c;
if ((c = *p++) == '\\') {
switch (c = *p++) {
if ((c = *p++) == '\\')
{
switch (c = *p++)
{
case '\0':
p--;
break;
......@@ -230,11 +259,13 @@ string_input(char *str, int size, int hdrsize, int *rtn_size)
case '6':
case '7':
c = VALUE(c);
if (isdigit(*p)) {
c = (c<<3) + VALUE(*p++);
if (isdigit(*p))
{
c = (c << 3) + VALUE(*p++);
}
if (isdigit(*p)) {
c = (c<<3) + VALUE(*p++);
if (isdigit(*p))
{
c = (c << 3) + VALUE(*p++);
}
*r++ = c;
break;
......@@ -259,12 +290,14 @@ string_input(char *str, int size, int hdrsize, int *rtn_size)
default:
*r++ = c;
}
} else {
}
else
{
*r++ = c;
}
}
return((char *) result);
return ((char *) result);
}
char *
......@@ -307,12 +340,13 @@ c_char16out(char *s)
*/
char *
c_textout(struct varlena *vlena)
c_textout(struct varlena * vlena)
{
int len = 0;
char *s = NULL;
if (vlena) {
if (vlena)
{
len = VARSIZE(vlena) - VARHDRSZ;
s = VARDATA(vlena);
}
......@@ -328,8 +362,9 @@ c_varcharout(char *s)
{
int len;
if (s) {
len = *(int32*)s - 4;
if (s)
{
len = *(int32 *) s - 4;
s += 4;
}
return (string_output(s, len));
......@@ -342,7 +377,8 @@ c_textin(char *str)
struct varlena *result;
int len;
if (str == NULL) {
if (str == NULL)
{
return ((struct varlena *) NULL);
}
......@@ -357,5 +393,5 @@ c_char16in(char *str)
{
return (string_input(str, 16, 0, NULL));
}
#endif
#endif
This diff is collapsed.
......@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/Attic/heapvalid.c,v 1.16 1997/08/29 09:12:20 vadim Exp $
* $Header: /cvsroot/pgsql/src/backend/access/common/Attic/heapvalid.c,v 1.17 1997/09/07 04:37:36 momjian Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -40,8 +40,9 @@ heap_keytest(HeapTuple t,
Datum atp;
int test;
for (; nkeys--; keys++) {
atp = (Datum)heap_getattr(t, InvalidBuffer,
for (; nkeys--; keys++)
{
atp = (Datum) heap_getattr(t, InvalidBuffer,
keys->sk_attno,
tupdesc,
&isnull);
......@@ -50,11 +51,12 @@ heap_keytest(HeapTuple t,
/* XXX eventually should check if SK_ISNULL */
return false;
if (keys->sk_flags & SK_ISNULL) {
if (keys->sk_flags & SK_ISNULL)
{
return (false);
}
if (keys->sk_func == (func_ptr)oideq) /* optimization */
if (keys->sk_func == (func_ptr) oideq) /* optimization */
test = (keys->sk_argument == atp);
else if (keys->sk_flags & SK_COMMUTE)
test = (long) FMGR_PTR2(keys->sk_func, keys->sk_procedure,
......@@ -99,11 +101,13 @@ heap_tuple_satisfies(ItemId itemId,
int nKeys,
ScanKey key)
{
HeapTuple tuple, result;
HeapTuple tuple,
result;
bool res;
TransactionId old_tmin, old_tmax;
TransactionId old_tmin,
old_tmax;
if (! ItemIdIsUsed(itemId))
if (!ItemIdIsUsed(itemId))
return NULL;
tuple = (HeapTuple) PageGetItem((Page) disk_page, itemId);
......@@ -114,19 +118,25 @@ heap_tuple_satisfies(ItemId itemId,
else
res = TRUE;
result = (HeapTuple)NULL;
if (res) {
if(relation->rd_rel->relkind == RELKIND_UNCATALOGED) {
result = (HeapTuple) NULL;
if (res)
{
if (relation->rd_rel->relkind == RELKIND_UNCATALOGED)
{
result = tuple;
} else {
}
else
{
old_tmin = tuple->t_tmin;
old_tmax = tuple->t_tmax;
res = HeapTupleSatisfiesTimeQual(tuple,qual);
if(tuple->t_tmin != old_tmin ||
tuple->t_tmax != old_tmax) {
res = HeapTupleSatisfiesTimeQual(tuple, qual);
if (tuple->t_tmin != old_tmin ||
tuple->t_tmax != old_tmax)
{
SetBufferCommitInfoNeedsSave(buffer);
}
if(res) {
if (res)
{
result = tuple;
}
}
......@@ -145,7 +155,7 @@ TupleUpdatedByCurXactAndCmd(HeapTuple t)
{
if (TransactionIdEquals(t->t_xmax,
GetCurrentTransactionId()) &&
CommandIdGEScanCommandId (t->t_cmax))
CommandIdGEScanCommandId(t->t_cmax))
return true;
return false;
......
This diff is collapsed.
......@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/Attic/indexvalid.c,v 1.14 1997/03/18 18:38:19 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/access/common/Attic/indexvalid.c,v 1.15 1997/09/07 04:37:38 momjian Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -46,32 +46,39 @@ index_keytest(IndexTuple tuple,
IncrIndexProcessed();
while (scanKeySize > 0) {
while (scanKeySize > 0)
{
datum = index_getattr(tuple,
key[0].sk_attno,
tupdesc,
&isNull);
if (isNull) {
if (isNull)
{
/* XXX eventually should check if SK_ISNULL */
return (false);
}
if (key[0].sk_flags & SK_ISNULL) {
if (key[0].sk_flags & SK_ISNULL)
{
return (false);
}
if (key[0].sk_flags & SK_COMMUTE) {
if (key[0].sk_flags & SK_COMMUTE)
{
test = (*(key[0].sk_func))
(DatumGetPointer(key[0].sk_argument),
datum) ? 1 : 0;
} else {
}
else
{
test = (*(key[0].sk_func))
(datum,
DatumGetPointer(key[0].sk_argument)) ? 1 : 0;
}
if (!test == !(key[0].sk_flags & SK_NEGATE)) {
if (!test == !(key[0].sk_flags & SK_NEGATE))
{
return (false);
}
......@@ -81,4 +88,3 @@ index_keytest(IndexTuple tuple,
return (true);
}
......@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.15 1997/08/26 23:31:23 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.16 1997/09/07 04:37:39 momjian Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -42,11 +42,11 @@ typtoout(Oid type)
0, 0, 0);
if (HeapTupleIsValid(typeTuple))
return((Oid)
return ((Oid)
((TypeTupleForm) GETSTRUCT(typeTuple))->typoutput);
elog(WARN, "typtoout: Cache lookup of type %d failed", type);
return(InvalidOid);
return (InvalidOid);
}
Oid
......@@ -56,14 +56,14 @@ gettypelem(Oid type)
typeTuple = SearchSysCacheTuple(TYPOID,
ObjectIdGetDatum(type),
0,0,0);
0, 0, 0);
if (HeapTupleIsValid(typeTuple))
return((Oid)
return ((Oid)
((TypeTupleForm) GETSTRUCT(typeTuple))->typelem);
elog(WARN, "typtoout: Cache lookup of type %d failed", type);
return(InvalidOid);
return (InvalidOid);
}
/* ----------------
......@@ -73,8 +73,11 @@ gettypelem(Oid type)
void
printtup(HeapTuple tuple, TupleDesc typeinfo)
{
int i, j, k;
char *outputstr, *attr;
int i,
j,
k;
char *outputstr,
*attr;
bool isnull;
Oid typoutput;
......@@ -90,13 +93,16 @@ printtup(HeapTuple tuple, TupleDesc typeinfo)
*/
j = 0;
k = 1 << 7;
for (i = 0; i < tuple->t_natts; ) {
i++; /* heap_getattr is a macro, so no increment */
for (i = 0; i < tuple->t_natts;)
{
i++; /* heap_getattr is a macro, so no
* increment */
attr = heap_getattr(tuple, InvalidBuffer, i, typeinfo, &isnull);
if (!isnull)
j |= k;
k >>= 1;
if (!(i & 7)) {
if (!(i & 7))
{
pq_putint(j, 1);
j = 0;
k = 1 << 7;
......@@ -109,14 +115,16 @@ printtup(HeapTuple tuple, TupleDesc typeinfo)
* send the attributes of this tuple
* ----------------
*/
for (i = 0; i < tuple->t_natts; ++i) {
attr = heap_getattr(tuple, InvalidBuffer, i+1, typeinfo, &isnull);
for (i = 0; i < tuple->t_natts; ++i)
{
attr = heap_getattr(tuple, InvalidBuffer, i + 1, typeinfo, &isnull);
typoutput = typtoout((Oid) typeinfo->attrs[i]->atttypid);
if (!isnull && OidIsValid(typoutput)) {
if (!isnull && OidIsValid(typoutput))
{
outputstr = fmgr(typoutput, attr,
gettypelem(typeinfo->attrs[i]->atttypid));
pq_putint(strlen(outputstr)+4, 4);
pq_putint(strlen(outputstr) + 4, 4);
pq_putnchar(outputstr, strlen(outputstr));
pfree(outputstr);
}
......@@ -156,7 +164,7 @@ showatts(char *name, TupleDesc tupleDesc)
puts(name);
for (i = 0; i < natts; ++i)
printatt((unsigned) i+1, attinfo[i], (char *) NULL);
printatt((unsigned) i + 1, attinfo[i], (char *) NULL);
printf("\t----\n");
}
......@@ -168,18 +176,21 @@ void
debugtup(HeapTuple tuple, TupleDesc typeinfo)
{
register int i;
char *attr, *value;
char *attr,
*value;
bool isnull;
Oid typoutput;
for (i = 0; i < tuple->t_natts; ++i) {
attr = heap_getattr(tuple, InvalidBuffer, i+1, typeinfo, &isnull);
for (i = 0; i < tuple->t_natts; ++i)
{
attr = heap_getattr(tuple, InvalidBuffer, i + 1, typeinfo, &isnull);
typoutput = typtoout((Oid) typeinfo->attrs[i]->atttypid);
if (!isnull && OidIsValid(typoutput)) {
if (!isnull && OidIsValid(typoutput))
{
value = fmgr(typoutput, attr,
gettypelem(typeinfo->attrs[i]->atttypid));
printatt((unsigned) i+1, typeinfo->attrs[i], value);
printatt((unsigned) i + 1, typeinfo->attrs[i], value);
pfree(value);
}
}
......@@ -198,7 +209,9 @@ debugtup(HeapTuple tuple, TupleDesc typeinfo)
void
printtup_internal(HeapTuple tuple, TupleDesc typeinfo)
{
int i, j, k;
int i,
j,
k;
char *attr;
bool isnull;
......@@ -214,13 +227,16 @@ printtup_internal(HeapTuple tuple, TupleDesc typeinfo)
*/
j = 0;
k = 1 << 7;
for (i = 0; i < tuple->t_natts; ) {
i++; /* heap_getattr is a macro, so no increment */
for (i = 0; i < tuple->t_natts;)
{
i++; /* heap_getattr is a macro, so no
* increment */
attr = heap_getattr(tuple, InvalidBuffer, i, typeinfo, &isnull);
if (!isnull)
j |= k;
k >>= 1;
if (!(i & 7)) {
if (!(i & 7))
{
pq_putint(j, 1);
j = 0;
k = 1 << 7;
......@@ -236,13 +252,16 @@ printtup_internal(HeapTuple tuple, TupleDesc typeinfo)
#ifdef IPORTAL_DEBUG
fprintf(stderr, "sending tuple with %d atts\n", tuple->t_natts);
#endif
for (i = 0; i < tuple->t_natts; ++i) {
for (i = 0; i < tuple->t_natts; ++i)
{
int32 len = typeinfo->attrs[i]->attlen;
attr = heap_getattr(tuple, InvalidBuffer, i+1, typeinfo, &isnull);
if (!isnull) {
attr = heap_getattr(tuple, InvalidBuffer, i + 1, typeinfo, &isnull);
if (!isnull)
{
/* # of bytes, and opaque data */
if (len == -1) {
if (len == -1)
{
/* variable length, assume a varlena structure */
len = VARSIZE(attr) - VARHDRSZ;
......@@ -253,18 +272,22 @@ printtup_internal(HeapTuple tuple, TupleDesc typeinfo)
char *d = VARDATA(attr);
fprintf(stderr, "length %d data %x%x%x%x\n",
len, *d, *(d+1), *(d+2), *(d+3));
len, *d, *(d + 1), *(d + 2), *(d + 3));
}
#endif
} else {
}
else
{
/* fixed size */
if (typeinfo->attrs[i]->attbyval) {
if (typeinfo->attrs[i]->attbyval)
{
int8 i8;
int16 i16;
int32 i32;
pq_putint(len, sizeof(int32));
switch (len) {
switch (len)
{
case sizeof(int8):
i8 = DatumGetChar(attr);
pq_putnchar((char *) &i8, len);
......@@ -281,7 +304,9 @@ printtup_internal(HeapTuple tuple, TupleDesc typeinfo)
#ifdef IPORTAL_DEBUG
fprintf(stderr, "byval length %d data %d\n", len, attr);
#endif
} else {
}
else
{
pq_putint(len, sizeof(int32));
pq_putnchar(attr, len);
#ifdef IPORTAL_DEBUG
......
......@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/scankey.c,v 1.9 1996/11/05 07:42:45 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/access/common/scankey.c,v 1.10 1997/09/07 04:37:39 momjian Exp $
*
*-------------------------------------------------------------------------
*/
......
This diff is collapsed.
This diff is collapsed.
......@@ -22,20 +22,22 @@
#include <storage/bufmgr.h>
#ifndef HAVE_MEMMOVE
# include <regex/utils.h>
#include <regex/utils.h>
#else
# include <string.h>
#include <string.h>
#endif
static OffsetNumber gistfindnext(IndexScanDesc s, Page p, OffsetNumber n,
static OffsetNumber
gistfindnext(IndexScanDesc s, Page p, OffsetNumber n,
ScanDirection dir);
static RetrieveIndexResult gistscancache(IndexScanDesc s, ScanDirection dir);
static RetrieveIndexResult gistfirst(IndexScanDesc s, ScanDirection dir);
static RetrieveIndexResult gistnext(IndexScanDesc s, ScanDirection dir);
static ItemPointer gistheapptr(Relation r, ItemPointer itemp);
static bool gistindex_keytest(IndexTuple tuple, TupleDesc tupdesc,
int scanKeySize, ScanKey key, GISTSTATE *giststate,
static bool
gistindex_keytest(IndexTuple tuple, TupleDesc tupdesc,
int scanKeySize, ScanKey key, GISTSTATE * giststate,
Relation r, Page p, OffsetNumber offset);
......@@ -49,9 +51,12 @@ gistgettuple(IndexScanDesc s, ScanDirection dir)
return (res);
/* not cached, so we'll have to do some work */
if (ItemPointerIsValid(&(s->currentItemData))) {
if (ItemPointerIsValid(&(s->currentItemData)))
{
res = gistnext(s, dir);
} else {
}
else
{
res = gistfirst(s, dir);
}
return (res);
......@@ -76,14 +81,16 @@ gistfirst(IndexScanDesc s, ScanDirection dir)
po = (GISTPageOpaque) PageGetSpecialPointer(p);
so = (GISTScanOpaque) s->opaque;
for (;;) {
for (;;)
{
maxoff = PageGetMaxOffsetNumber(p);
if (ScanDirectionIsBackward(dir))
n = gistfindnext(s, p, maxoff, dir);
else
n = gistfindnext(s, p, FirstOffsetNumber, dir);
while (n < FirstOffsetNumber || n > maxoff) {
while (n < FirstOffsetNumber || n > maxoff)
{
ReleaseBuffer(b);
if (so->s_stack == (GISTSTACK *) NULL)
......@@ -95,9 +102,12 @@ gistfirst(IndexScanDesc s, ScanDirection dir)
po = (GISTPageOpaque) PageGetSpecialPointer(p);
maxoff = PageGetMaxOffsetNumber(p);
if (ScanDirectionIsBackward(dir)) {
if (ScanDirectionIsBackward(dir))
{
n = OffsetNumberPrev(stk->gs_child);
} else {
}
else
{
n = OffsetNumberNext(stk->gs_child);
}
so->s_stack = stk->gs_parent;
......@@ -105,7 +115,8 @@ gistfirst(IndexScanDesc s, ScanDirection dir)
n = gistfindnext(s, p, n, dir);
}
if (po->flags & F_LEAF) {
if (po->flags & F_LEAF)
{
ItemPointerSet(&(s->currentItemData), BufferGetBlockNumber(b), n);
it = (IndexTuple) PageGetItem(p, PageGetItemId(p, n));
......@@ -114,7 +125,9 @@ gistfirst(IndexScanDesc s, ScanDirection dir)
ReleaseBuffer(b);
return (res);
} else {
}
else
{
stk = (GISTSTACK *) palloc(sizeof(GISTSTACK));
stk->gs_child = n;
stk->gs_blk = BufferGetBlockNumber(b);
......@@ -149,9 +162,12 @@ gistnext(IndexScanDesc s, ScanDirection dir)
blk = ItemPointerGetBlockNumber(&(s->currentItemData));
n = ItemPointerGetOffsetNumber(&(s->currentItemData));
if (ScanDirectionIsForward(dir)) {
if (ScanDirectionIsForward(dir))
{
n = OffsetNumberNext(n);
} else {
}
else
{
n = OffsetNumberPrev(n);
}
......@@ -160,11 +176,13 @@ gistnext(IndexScanDesc s, ScanDirection dir)
po = (GISTPageOpaque) PageGetSpecialPointer(p);
so = (GISTScanOpaque) s->opaque;
for (;;) {
for (;;)
{
maxoff = PageGetMaxOffsetNumber(p);
n = gistfindnext(s, p, n, dir);
while (n < FirstOffsetNumber || n > maxoff) {
while (n < FirstOffsetNumber || n > maxoff)
{
ReleaseBuffer(b);
if (so->s_stack == (GISTSTACK *) NULL)
......@@ -176,9 +194,12 @@ gistnext(IndexScanDesc s, ScanDirection dir)
maxoff = PageGetMaxOffsetNumber(p);
po = (GISTPageOpaque) PageGetSpecialPointer(p);
if (ScanDirectionIsBackward(dir)) {
if (ScanDirectionIsBackward(dir))
{
n = OffsetNumberPrev(stk->gs_child);
} else {
}
else
{
n = OffsetNumberNext(stk->gs_child);
}
so->s_stack = stk->gs_parent;
......@@ -186,7 +207,8 @@ gistnext(IndexScanDesc s, ScanDirection dir)
n = gistfindnext(s, p, n, dir);
}
if (po->flags & F_LEAF) {
if (po->flags & F_LEAF)
{
ItemPointerSet(&(s->currentItemData), BufferGetBlockNumber(b), n);
it = (IndexTuple) PageGetItem(p, PageGetItemId(p, n));
......@@ -195,7 +217,9 @@ gistnext(IndexScanDesc s, ScanDirection dir)
ReleaseBuffer(b);
return (res);
} else {
}
else
{
stk = (GISTSTACK *) palloc(sizeof(GISTSTACK));
stk->gs_child = n;
stk->gs_blk = BufferGetBlockNumber(b);
......@@ -210,9 +234,12 @@ gistnext(IndexScanDesc s, ScanDirection dir)
p = BufferGetPage(b);
po = (GISTPageOpaque) PageGetSpecialPointer(p);
if (ScanDirectionIsBackward(dir)) {
if (ScanDirectionIsBackward(dir))
{
n = PageGetMaxOffsetNumber(p);
} else {
}
else
{
n = FirstOffsetNumber;
}
}
......@@ -225,7 +252,7 @@ gistindex_keytest(IndexTuple tuple,
TupleDesc tupdesc,
int scanKeySize,
ScanKey key,
GISTSTATE *giststate,
GISTSTATE * giststate,
Relation r,
Page p,
OffsetNumber offset)
......@@ -238,32 +265,38 @@ gistindex_keytest(IndexTuple tuple,
IncrIndexProcessed();
while (scanKeySize > 0) {
while (scanKeySize > 0)
{
datum = index_getattr(tuple,
1,
tupdesc,
&isNull);
gistdentryinit(giststate, &de, (char *)datum, r, p, offset,
gistdentryinit(giststate, &de, (char *) datum, r, p, offset,
IndexTupleSize(tuple) - sizeof(IndexTupleData),
FALSE);
if (isNull) {
if (isNull)
{
/* XXX eventually should check if SK_ISNULL */
return (false);
}
if (key[0].sk_flags & SK_COMMUTE) {
if (key[0].sk_flags & SK_COMMUTE)
{
test = (*(key[0].sk_func))
(DatumGetPointer(key[0].sk_argument),
&de, key[0].sk_procedure) ? 1 : 0;
} else {
}
else
{
test = (*(key[0].sk_func))
(&de,
DatumGetPointer(key[0].sk_argument),
key[0].sk_procedure) ? 1 : 0;
}
if (!test == !(key[0].sk_flags & SK_NEGATE)) {
if (!test == !(key[0].sk_flags & SK_NEGATE))
{
return (false);
}
......@@ -294,12 +327,14 @@ gistfindnext(IndexScanDesc s, Page p, OffsetNumber n, ScanDirection dir)
* a ghost tuple, before the scan. If this is the case, back up one.
*/
if (so->s_flags & GS_CURBEFORE) {
if (so->s_flags & GS_CURBEFORE)
{
so->s_flags &= ~GS_CURBEFORE;
n = OffsetNumberPrev(n);
}
while (n >= FirstOffsetNumber && n <= maxoff) {
while (n >= FirstOffsetNumber && n <= maxoff)
{
it = (char *) PageGetItem(p, PageGetItemId(p, n));
if (gistindex_keytest((IndexTuple) it,
RelationGetTupleDescriptor(s->relation),
......@@ -307,9 +342,12 @@ gistfindnext(IndexScanDesc s, Page p, OffsetNumber n, ScanDirection dir)
s->relation, p, n))
break;
if (ScanDirectionIsBackward(dir)) {
if (ScanDirectionIsBackward(dir))
{
n = OffsetNumberPrev(n);
} else {
}
else
{
n = OffsetNumberNext(n);
}
}
......@@ -324,7 +362,8 @@ gistscancache(IndexScanDesc s, ScanDirection dir)
ItemPointer ip;
if (!(ScanDirectionIsNoMovement(dir)
&& ItemPointerIsValid(&(s->currentItemData)))) {
&& ItemPointerIsValid(&(s->currentItemData))))
{
return ((RetrieveIndexResult) NULL);
}
......@@ -336,7 +375,7 @@ gistscancache(IndexScanDesc s, ScanDirection dir)
else
res = (RetrieveIndexResult) NULL;
pfree (ip);
pfree(ip);
return (res);
}
......@@ -355,7 +394,8 @@ gistheapptr(Relation r, ItemPointer itemp)
OffsetNumber n;
ip = (ItemPointer) palloc(sizeof(ItemPointerData));
if (ItemPointerIsValid(itemp)) {
if (ItemPointerIsValid(itemp))
{
b = ReadBuffer(r, ItemPointerGetBlockNumber(itemp));
p = BufferGetPage(b);
n = ItemPointerGetOffsetNumber(itemp);
......@@ -363,7 +403,9 @@ gistheapptr(Relation r, ItemPointer itemp)
memmove((char *) ip, (char *) &(it->t_tid),
sizeof(ItemPointerData));
ReleaseBuffer(b);
} else {
}
else
{
ItemPointerSetInvalid(ip);
}
......
This diff is collapsed.
......@@ -48,21 +48,21 @@ static StrategyNumber GISTNegate[GISTNStrategies] = {
InvalidStrategy,
InvalidStrategy,
InvalidStrategy
};
};
/* if a op_1 b, what is the operator op_2 such that b op_2 a? */
static StrategyNumber GISTCommute[GISTNStrategies] = {
InvalidStrategy,
InvalidStrategy,
InvalidStrategy
};
};
/* if a op_1 b, what is the operator op_2 such that (b !op_2 a)? */
static StrategyNumber GISTNegateCommute[GISTNStrategies] = {
InvalidStrategy,
InvalidStrategy,
InvalidStrategy
};
};
/*
* GiSTs do not currently support TermData (see rtree/rtstrat.c for
......@@ -91,7 +91,7 @@ static StrategyEvaluationData GISTEvaluationData = {
(StrategyTransformMap) GISTNegate, /* how to do (not qual) */
(StrategyTransformMap) GISTCommute, /* how to swap operands */
(StrategyTransformMap) GISTNegateCommute, /* how to do both */
{ NULL }
{NULL}
};
StrategyNumber
......@@ -113,4 +113,5 @@ RelationInvokeGISTStrategy(Relation r,
return (RelationInvokeStrategy(r, &GISTEvaluationData, attnum, s,
left, right));
}
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/hash/Attic/hashstrat.c,v 1.9 1997/08/20 02:01:42 vadim Exp $
* $Header: /cvsroot/pgsql/src/backend/access/hash/Attic/hashstrat.c,v 1.10 1997/09/07 04:38:03 momjian Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -38,11 +38,12 @@ static StrategyEvaluationData HTEvaluationData = {
/* XXX static for simplicity */
HTMaxStrategyNumber,
(StrategyTransformMap)HTNegate,
(StrategyTransformMap)HTCommute,
(StrategyTransformMap)HTNegateCommute,
{NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL}
(StrategyTransformMap) HTNegate,
(StrategyTransformMap) HTCommute,
(StrategyTransformMap) HTNegateCommute,
{NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}
};
#endif
/* ----------------------------------------------------------------
......@@ -64,6 +65,7 @@ _hash_getstrat(Relation rel,
return (strat);
}
#endif
#ifdef NOT_USED
......@@ -77,4 +79,5 @@ _hash_invokestrat(Relation rel,
return (RelationInvokeStrategy(rel, &HTEvaluationData, attno, strat,
left, right));
}
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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