1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-30 06:01:21 +03:00

Goodbye register keyword. Compiler knows better.

This commit is contained in:
Bruce Momjian
1998-02-11 19:14:04 +00:00
parent df10360d8e
commit 24cab6bd0d
50 changed files with 494 additions and 500 deletions

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.35 1998/02/06 20:17:49 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.36 1998/02/11 19:09:21 momjian Exp $
*
* NOTES
* The old interface functions have been converted to macros
@@ -44,12 +44,6 @@ long heap_sysoffset[] = {
offsetof(HeapTupleData, t_cmax)
};
/* this is so the sparcstation debugger works */
#if !defined(NO_ASSERT_CHECKING) && defined(sparc) && defined(sunos4)
#define register
#endif /* !NO_ASSERT_CHECKING && sparc && sunos4 */
/* ----------------------------------------------------------------
* misc support routines
* ----------------------------------------------------------------
@@ -476,10 +470,10 @@ nocachegetattr(HeapTuple tup,
* ----------------
*/
{
register int i = 0; /* current offset in bp */
register int mask; /* bit in byte we're looking at */
register char n; /* current byte in bp */
register int byte,
int i = 0; /* current offset in bp */
int mask; /* bit in byte we're looking at */
char n; /* current byte in bp */
int byte,
finalbit;
byte = attnum >> 3;
@@ -523,7 +517,7 @@ nocachegetattr(HeapTuple tup,
}
else if (!HeapTupleAllFixed(tup))
{
register int j = 0;
int j = 0;
/*
* In for(), we make this <= and not < because we want to
@@ -542,8 +536,8 @@ nocachegetattr(HeapTuple tup,
*/
if (!slow)
{
register int j = 1;
register long off;
int j = 1;
long off;
/*
* need to set cache for some atts
@@ -624,9 +618,9 @@ nocachegetattr(HeapTuple tup,
}
else
{
register bool usecache = true;
register int off = 0;
register int i;
bool usecache = true;
int off = 0;
int i;
/*
* Now we know that we have to walk the tuple CAREFULLY.
@@ -999,7 +993,7 @@ heap_addheader(uint32 natts, /* max domain index */
int structlen, /* its length */
char *structure) /* pointer to the struct */
{
register char *tp; /* tuple data pointer */
char *tp; /* tuple data pointer */
HeapTuple tup;
long len;
int hoff;

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.26 1998/02/06 20:17:51 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.27 1998/02/11 19:09:23 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -41,7 +41,7 @@ index_formtuple(TupleDesc tupleDescriptor,
Datum value[],
char null[])
{
register char *tp; /* tuple pointer */
char *tp; /* tuple pointer */
IndexTuple tuple; /* return tuple */
Size size,
hoff;
@@ -137,10 +137,10 @@ nocache_index_getattr(IndexTuple tup,
TupleDesc tupleDesc,
bool *isnull)
{
register char *tp; /* ptr to att in tuple */
register char *bp = NULL; /* ptr to att in tuple */
char *tp; /* ptr to att in tuple */
char *bp = NULL; /* ptr to att in tuple */
int slow; /* do we have to walk nulls? */
register int data_off; /* tuple data offset */
int data_off; /* tuple data offset */
AttributeTupleForm *att = tupleDesc->attrs;
/* ----------------
@@ -219,10 +219,10 @@ nocache_index_getattr(IndexTuple tup,
* ----------------
*/
{
register int i = 0; /* current offset in bp */
register int mask; /* bit in byte we're looking at */
register char n; /* current byte in bp */
register int byte,
int i = 0; /* current offset in bp */
int mask; /* bit in byte we're looking at */
char n; /* current byte in bp */
int byte,
finalbit;
byte = attnum >> 3;
@@ -265,7 +265,7 @@ nocache_index_getattr(IndexTuple tup,
}
else if (!IndexTupleAllFixed(tup))
{
register int j = 0;
int j = 0;
for (j = 0; j < attnum && !slow; j++)
if (att[j]->attlen < 1 && !VARLENA_FIXED_SIZE(att[j]))
@@ -281,8 +281,8 @@ nocache_index_getattr(IndexTuple tup,
if (!slow)
{
register int j = 1;
register long off;
int j = 1;
long off;
/*
* need to set cache for some atts
@@ -346,9 +346,9 @@ nocache_index_getattr(IndexTuple tup,
}
else
{
register bool usecache = true;
register int off = 0;
register int i;
bool usecache = true;
int off = 0;
int i;
/*
* Now we know that we have to walk the tuple CAREFULLY.

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.25 1998/02/10 16:02:44 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.26 1998/02/11 19:09:25 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -176,7 +176,7 @@ showatts(char *name, TupleDesc tupleDesc)
void
debugtup(HeapTuple tuple, TupleDesc typeinfo)
{
register int i;
int i;
Datum attr;
char *value;
bool isnull;

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.25 1998/01/07 21:01:20 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.26 1998/02/11 19:09:30 momjian Exp $
*
*
* INTERFACE ROUTINES
@@ -791,7 +791,7 @@ heap_getnext(HeapScanDesc scandesc,
int backw,
Buffer *b)
{
register HeapScanDesc sdesc = scandesc;
HeapScanDesc sdesc = scandesc;
Buffer localb;
/* ----------------