Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit af74855

Browse files
committed
Renaming cleanup, no pgindent yet.
1 parent 2aa080f commit af74855

File tree

329 files changed

+4380
-4388
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

329 files changed

+4380
-4388
lines changed

src/backend/access/common/heaptuple.c

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.39 1998/08/19 02:00:53 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.40 1998/09/01 03:20:41 momjian Exp $
1212
*
1313
* NOTES
1414
* The old interface functions have been converted to macros
@@ -55,13 +55,13 @@ long heap_sysoffset[] = {
5555
*/
5656
Size
5757
ComputeDataSize(TupleDesc tupleDesc,
58-
Datum value[],
59-
char nulls[])
58+
Datum *value,
59+
char *nulls)
6060
{
6161
uint32 data_length;
6262
int i;
6363
int numberOfAttributes = tupleDesc->natts;
64-
AttributeTupleForm *att = tupleDesc->attrs;
64+
Form_pg_attribute *att = tupleDesc->attrs;
6565

6666
for (data_length = 0, i = 0; i < numberOfAttributes; i++)
6767
{
@@ -118,8 +118,8 @@ ComputeDataSize(TupleDesc tupleDesc,
118118
void
119119
DataFill(char *data,
120120
TupleDesc tupleDesc,
121-
Datum value[],
122-
char nulls[],
121+
Datum *value,
122+
char *nulls,
123123
uint16 *infomask,
124124
bits8 *bit)
125125
{
@@ -128,7 +128,7 @@ DataFill(char *data,
128128
uint32 data_length;
129129
int i;
130130
int numberOfAttributes = tupleDesc->natts;
131-
AttributeTupleForm *att = tupleDesc->attrs;
131+
Form_pg_attribute *att = tupleDesc->attrs;
132132

133133
if (bit != NULL)
134134
{
@@ -227,13 +227,13 @@ int
227227
heap_attisnull(HeapTuple tup, int attnum)
228228
{
229229
if (attnum > (int) tup->t_natts)
230-
return (1);
230+
return 1;
231231

232232
if (HeapTupleNoNulls(tup))
233-
return (0);
233+
return 0;
234234

235235
if (attnum > 0)
236-
return (att_isnull(attnum - 1, tup->t_bits));
236+
return att_isnull(attnum - 1, tup->t_bits);
237237
else
238238
switch (attnum)
239239
{
@@ -252,7 +252,7 @@ heap_attisnull(HeapTuple tup, int attnum)
252252
elog(ERROR, "heap_attisnull: undefined negative attnum");
253253
}
254254

255-
return (0);
255+
return 0;
256256
}
257257

258258
/* ----------------------------------------------------------------
@@ -343,21 +343,21 @@ heap_getsysattr(HeapTuple tup, Buffer b, int attnum)
343343
switch (attnum)
344344
{
345345
case SelfItemPointerAttributeNumber:
346-
return ((Datum) &tup->t_ctid);
346+
return (Datum) &tup->t_ctid;
347347
case ObjectIdAttributeNumber:
348-
return ((Datum) (long) tup->t_oid);
348+
return (Datum) (long) tup->t_oid;
349349
case MinTransactionIdAttributeNumber:
350-
return ((Datum) (long) tup->t_xmin);
350+
return (Datum) (long) tup->t_xmin;
351351
case MinCommandIdAttributeNumber:
352-
return ((Datum) (long) tup->t_cmin);
352+
return (Datum) (long) tup->t_cmin;
353353
case MaxTransactionIdAttributeNumber:
354-
return ((Datum) (long) tup->t_xmax);
354+
return (Datum) (long) tup->t_xmax;
355355
case MaxCommandIdAttributeNumber:
356-
return ((Datum) (long) tup->t_cmax);
356+
return (Datum) (long) tup->t_cmax;
357357
default:
358358
elog(ERROR, "heap_getsysattr: undefined attnum %d", attnum);
359359
}
360-
return ((Datum) NULL);
360+
return (Datum) NULL;
361361
}
362362

363363
/* ----------------
@@ -388,7 +388,7 @@ nocachegetattr(HeapTuple tup,
388388
char *tp; /* ptr to att in tuple */
389389
bits8 *bp = tup->t_bits; /* ptr to att in tuple */
390390
int slow; /* do we have to walk nulls? */
391-
AttributeTupleForm *att = tupleDesc->attrs;
391+
Form_pg_attribute *att = tupleDesc->attrs;
392392

393393

394394
#if IN_MACRO
@@ -426,7 +426,7 @@ nocachegetattr(HeapTuple tup,
426426
/*
427427
* first attribute is always at position zero
428428
*/
429-
return ((Datum) fetchatt(&(att[0]), (char *) tup + tup->t_hoff));
429+
return (Datum) fetchatt(&(att[0]), (char *) tup + tup->t_hoff);
430430
}
431431
#endif
432432

@@ -505,7 +505,7 @@ nocachegetattr(HeapTuple tup,
505505
tp + att[attnum]->attcacheoff);
506506
}
507507
else if (attnum == 0)
508-
return ((Datum) fetchatt(&(att[0]), (char *) tp));
508+
return (Datum) fetchatt(&(att[0]), (char *) tp);
509509
else if (!HeapTupleAllFixed(tup))
510510
{
511511
int j = 0;
@@ -734,11 +734,11 @@ heap_copytuple(HeapTuple tuple)
734734
HeapTuple newTuple;
735735

736736
if (!HeapTupleIsValid(tuple))
737-
return (NULL);
737+
return NULL;
738738

739739
newTuple = (HeapTuple) palloc(tuple->t_len);
740740
memmove((char *) newTuple, (char *) tuple, (int) tuple->t_len);
741-
return (newTuple);
741+
return newTuple;
742742
}
743743

744744
#ifdef NOT_USED
@@ -751,8 +751,8 @@ heap_copytuple(HeapTuple tuple)
751751
void
752752
heap_deformtuple(HeapTuple tuple,
753753
TupleDesc tdesc,
754-
Datum values[],
755-
char nulls[])
754+
Datum *values,
755+
char *nulls)
756756
{
757757
int i;
758758
int natts;
@@ -780,7 +780,7 @@ heap_deformtuple(HeapTuple tuple,
780780
/* ----------------
781781
* heap_formtuple
782782
*
783-
* constructs a tuple from the given value[] and null[] arrays
783+
* constructs a tuple from the given *value and *null arrays
784784
*
785785
* old comments
786786
* Handles alignment by aligning 2 byte attributes on short boundries
@@ -789,16 +789,16 @@ heap_deformtuple(HeapTuple tuple,
789789
* not properly align fixed length arrays of 1 or 2 byte types (yet).
790790
*
791791
* Null attributes are indicated by a 'n' in the appropriate byte
792-
* of the null[]. Non-null attributes are indicated by a ' ' (space).
792+
* of the *null. Non-null attributes are indicated by a ' ' (space).
793793
*
794794
* Fix me. (Figure that must keep context if debug--allow give oid.)
795795
* Assumes in order.
796796
* ----------------
797797
*/
798798
HeapTuple
799799
heap_formtuple(TupleDesc tupleDescriptor,
800-
Datum value[],
801-
char nulls[])
800+
Datum *value,
801+
char *nulls)
802802
{
803803
char *tp; /* tuple pointer */
804804
HeapTuple tuple; /* return tuple */
@@ -849,7 +849,7 @@ heap_formtuple(TupleDesc tupleDescriptor,
849849

850850
tuple->t_infomask |= HEAP_XMAX_INVALID;
851851

852-
return (tuple);
852+
return tuple;
853853
}
854854

855855
/* ----------------
@@ -862,9 +862,9 @@ heap_formtuple(TupleDesc tupleDescriptor,
862862
HeapTuple
863863
heap_modifytuple(HeapTuple tuple,
864864
Relation relation,
865-
Datum replValue[],
866-
char replNull[],
867-
char repl[])
865+
Datum *replValue,
866+
char *replNull,
867+
char *repl)
868868
{
869869
int attoff;
870870
int numberOfAttributes;
@@ -884,10 +884,10 @@ heap_modifytuple(HeapTuple tuple,
884884
Assert(PointerIsValid(replNull));
885885
Assert(PointerIsValid(repl));
886886

887-
numberOfAttributes = RelationGetRelationTupleForm(relation)->relnatts;
887+
numberOfAttributes = RelationGetForm(relation)->relnatts;
888888

889889
/* ----------------
890-
* allocate and fill value[] and nulls[] arrays from either
890+
* allocate and fill *value and *nulls arrays from either
891891
* the tuple or the repl information, as appropriate.
892892
* ----------------
893893
*/
@@ -904,7 +904,7 @@ heap_modifytuple(HeapTuple tuple,
904904
value[attoff] =
905905
heap_getattr(tuple,
906906
AttrOffsetGetAttrNumber(attoff),
907-
RelationGetTupleDescriptor(relation),
907+
RelationGetDescr(relation),
908908
&isNull);
909909
nulls[attoff] = (isNull) ? 'n' : ' ';
910910

@@ -919,10 +919,10 @@ heap_modifytuple(HeapTuple tuple,
919919
}
920920

921921
/* ----------------
922-
* create a new tuple from the values[] and nulls[] arrays
922+
* create a new tuple from the *values and *nulls arrays
923923
* ----------------
924924
*/
925-
newTuple = heap_formtuple(RelationGetTupleDescriptor(relation),
925+
newTuple = heap_formtuple(RelationGetDescr(relation),
926926
value,
927927
nulls);
928928

@@ -972,5 +972,5 @@ heap_addheader(uint32 natts, /* max domain index */
972972

973973
memmove(tp, structure, structlen);
974974

975-
return (tup);
975+
return tup;
976976
}

src/backend/access/common/indextuple.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.30 1998/08/27 05:06:54 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.31 1998/09/01 03:20:42 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -38,8 +38,8 @@
3838
*/
3939
IndexTuple
4040
index_formtuple(TupleDesc tupleDescriptor,
41-
Datum value[],
42-
char null[])
41+
Datum *value,
42+
char *null)
4343
{
4444
char *tp; /* tuple pointer */
4545
IndexTuple tuple; /* return tuple */
@@ -107,7 +107,7 @@ index_formtuple(TupleDesc tupleDescriptor,
107107
* ----------------
108108
*/
109109
tuple->t_info = infomask;
110-
return (tuple);
110+
return tuple;
111111
}
112112

113113
/* ----------------
@@ -139,7 +139,7 @@ nocache_index_getattr(IndexTuple tup,
139139
char *bp = NULL; /* ptr to att in tuple */
140140
int slow; /* do we have to walk nulls? */
141141
int data_off; /* tuple data offset */
142-
AttributeTupleForm *att = tupleDesc->attrs;
142+
Form_pg_attribute *att = tupleDesc->attrs;
143143

144144
/* ----------------
145145
* sanity checks
@@ -256,7 +256,7 @@ nocache_index_getattr(IndexTuple tup,
256256
tp + att[attnum]->attcacheoff);
257257
}
258258
else if (attnum == 0)
259-
return ((Datum) fetchatt(&(att[0]), (char *) tp));
259+
return (Datum) fetchatt(&(att[0]), (char *) tp);
260260
else if (!IndexTupleAllFixed(tup))
261261
{
262262
int j = 0;
@@ -461,7 +461,7 @@ FormRetrieveIndexResult(ItemPointer indexItemPointer,
461461
result->index_iptr = *indexItemPointer;
462462
result->heap_iptr = *heapItemPointer;
463463

464-
return (result);
464+
return result;
465465
}
466466

467467
/*

src/backend/access/common/indexvalid.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/common/Attic/indexvalid.c,v 1.19 1998/06/15 19:27:45 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/common/Attic/indexvalid.c,v 1.20 1998/09/01 03:20:44 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -57,11 +57,11 @@ index_keytest(IndexTuple tuple,
5757
if (isNull)
5858
{
5959
/* XXX eventually should check if SK_ISNULL */
60-
return (false);
60+
return false;
6161
}
6262

6363
if (key[0].sk_flags & SK_ISNULL)
64-
return (false);
64+
return false;
6565

6666
if (key[0].sk_flags & SK_COMMUTE)
6767
{
@@ -77,11 +77,11 @@ index_keytest(IndexTuple tuple,
7777
}
7878

7979
if (!test == !(key[0].sk_flags & SK_NEGATE))
80-
return (false);
80+
return false;
8181

8282
scanKeySize -= 1;
8383
key++;
8484
}
8585

86-
return (true);
86+
return true;
8787
}

src/backend/access/common/printtup.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.33 1998/08/30 19:30:38 scrappy Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.34 1998/09/01 03:20:45 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -46,10 +46,10 @@ typtoout(Oid type)
4646
0, 0, 0);
4747

4848
if (HeapTupleIsValid(typeTuple))
49-
return ((Oid) ((TypeTupleForm) GETSTRUCT(typeTuple))->typoutput);
49+
return (Oid) ((Form_pg_type) GETSTRUCT(typeTuple))->typoutput;
5050

5151
elog(ERROR, "typtoout: Cache lookup of type %d failed", type);
52-
return (InvalidOid);
52+
return InvalidOid;
5353
}
5454

5555
Oid
@@ -62,10 +62,10 @@ gettypelem(Oid type)
6262
0, 0, 0);
6363

6464
if (HeapTupleIsValid(typeTuple))
65-
return ((Oid) ((TypeTupleForm) GETSTRUCT(typeTuple))->typelem);
65+
return (Oid) ((Form_pg_type) GETSTRUCT(typeTuple))->typelem;
6666

6767
elog(ERROR, "typtoout: Cache lookup of type %d failed", type);
68-
return (InvalidOid);
68+
return InvalidOid;
6969
}
7070

7171
/* ----------------
@@ -157,7 +157,7 @@ printtup(HeapTuple tuple, TupleDesc typeinfo)
157157
*/
158158
static void
159159
printatt(unsigned attributeId,
160-
AttributeTupleForm attributeP,
160+
Form_pg_attribute attributeP,
161161
char *value)
162162
{
163163
printf("\t%2d: %s%s%s%s\t(typeid = %u, len = %d, typmod = %d, byval = %c)\n",
@@ -181,7 +181,7 @@ showatts(char *name, TupleDesc tupleDesc)
181181
{
182182
int i;
183183
int natts = tupleDesc->natts;
184-
AttributeTupleForm *attinfo = tupleDesc->attrs;
184+
Form_pg_attribute *attinfo = tupleDesc->attrs;
185185

186186
puts(name);
187187
for (i = 0; i < natts; ++i)

0 commit comments

Comments
 (0)