mirror of
https://github.com/postgres/postgres.git
synced 2025-11-12 05:01:15 +03:00
Rename oid8 -> oidvector and int28 -> int2vector. Cleanup of *out functions.
This commit is contained in:
@@ -7,14 +7,14 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.30 2000/01/10 15:41:26 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.31 2000/01/10 16:13:14 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
/*
|
||||
* OLD COMMENTS
|
||||
* I/O routines:
|
||||
* int2in, int2out, int28in, int28out, int4in, int4out
|
||||
* int2in, int2out, int2vectorin, int2vectorout, int4in, int4out
|
||||
* Conversion routines:
|
||||
* itoi, int2_text, int4_text
|
||||
* Boolean operators:
|
||||
@@ -71,13 +71,13 @@ int2out(int16 sh)
|
||||
}
|
||||
|
||||
/*
|
||||
* int28in - converts "num num ..." to internal form
|
||||
* int2vectorin - converts "num num ..." to internal form
|
||||
*
|
||||
* Note:
|
||||
* Fills any nonexistent digits with NULLs.
|
||||
*/
|
||||
int16 *
|
||||
int28in(char *intString)
|
||||
int2vectorin(char *intString)
|
||||
{
|
||||
int16 *result;
|
||||
int slot;
|
||||
@@ -99,7 +99,7 @@ int28in(char *intString)
|
||||
while (*intString && isspace(*intString))
|
||||
intString++;
|
||||
if (*intString)
|
||||
elog(ERROR,"int28 value has too many values");
|
||||
elog(ERROR,"int2vector value has too many values");
|
||||
while (slot < INDEX_MAX_KEYS)
|
||||
result[slot++] = 0;
|
||||
|
||||
@@ -107,10 +107,10 @@ int28in(char *intString)
|
||||
}
|
||||
|
||||
/*
|
||||
* int28out - converts internal form to "num num ..."
|
||||
* int2vectorout - converts internal form to "num num ..."
|
||||
*/
|
||||
char *
|
||||
int28out(int16 *int2Array)
|
||||
int2vectorout(int16 *int2Array)
|
||||
{
|
||||
int num, maxnum;
|
||||
char *rp;
|
||||
@@ -130,7 +130,7 @@ int28out(int16 *int2Array)
|
||||
break;
|
||||
|
||||
/* assumes sign, 5 digits, ' ' */
|
||||
rp = result = (char *) palloc(maxnum * 7 + 1);
|
||||
rp = result = (char *) palloc((maxnum+1) * 7 + 1);
|
||||
for (num = 0; num <= maxnum; num++)
|
||||
{
|
||||
if (num != 0)
|
||||
@@ -168,7 +168,7 @@ int44in(char *input_string)
|
||||
}
|
||||
|
||||
/*
|
||||
* int28out - converts internal form to "num num ..."
|
||||
* int2vectorout - converts internal form to "num num ..."
|
||||
*/
|
||||
char *
|
||||
int44out(int32 *an_array)
|
||||
|
||||
@@ -519,7 +519,7 @@ int84(int64 *val)
|
||||
|
||||
#if NOT_USED
|
||||
int64 *
|
||||
int28 (int16 val)
|
||||
int2vector (int16 val)
|
||||
{
|
||||
int64 *result;
|
||||
|
||||
@@ -528,7 +528,7 @@ int28 (int16 val)
|
||||
*result = val;
|
||||
|
||||
return result;
|
||||
} /* int28() */
|
||||
} /* int2vector() */
|
||||
|
||||
int16
|
||||
int82(int64 *val)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/oid.c,v 1.31 2000/01/10 15:41:26 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/oid.c,v 1.32 2000/01/10 16:13:14 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -22,13 +22,13 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* oid8in - converts "num num ..." to internal form
|
||||
* oidvectorin - converts "num num ..." to internal form
|
||||
*
|
||||
* Note:
|
||||
* Fills any nonexistent digits with NULL oids.
|
||||
*/
|
||||
Oid *
|
||||
oid8in(char *oidString)
|
||||
oidvectorin(char *oidString)
|
||||
{
|
||||
Oid *result;
|
||||
int slot;
|
||||
@@ -50,7 +50,7 @@ oid8in(char *oidString)
|
||||
while (*oidString && isspace(*oidString))
|
||||
oidString++;
|
||||
if (*oidString)
|
||||
elog(ERROR,"oid8 value has too many values");
|
||||
elog(ERROR,"oidvector value has too many values");
|
||||
while (slot < INDEX_MAX_KEYS)
|
||||
result[slot++] = 0;
|
||||
|
||||
@@ -58,10 +58,10 @@ oid8in(char *oidString)
|
||||
}
|
||||
|
||||
/*
|
||||
* oid8out - converts internal form to "num num ..."
|
||||
* oidvectorout - converts internal form to "num num ..."
|
||||
*/
|
||||
char *
|
||||
oid8out(Oid *oidArray)
|
||||
oidvectorout(Oid *oidArray)
|
||||
{
|
||||
int num, maxnum;
|
||||
char *rp;
|
||||
@@ -81,7 +81,7 @@ oid8out(Oid *oidArray)
|
||||
break;
|
||||
|
||||
/* assumes sign, 10 digits, ' ' */
|
||||
rp = result = (char *) palloc(maxnum * 12 + 1);
|
||||
rp = result = (char *) palloc((maxnum+1) * 12 + 1);
|
||||
for (num = 0; num <= maxnum; num++)
|
||||
{
|
||||
if (num != 0)
|
||||
@@ -127,19 +127,19 @@ oidne(Oid arg1, Oid arg2)
|
||||
}
|
||||
|
||||
bool
|
||||
oid8eq(Oid *arg1, Oid *arg2)
|
||||
oidvectoreq(Oid *arg1, Oid *arg2)
|
||||
{
|
||||
return (bool) (memcmp(arg1, arg2, INDEX_MAX_KEYS * sizeof(Oid)) == 0);
|
||||
}
|
||||
|
||||
bool
|
||||
oid8ne(Oid *arg1, Oid *arg2)
|
||||
oidvectorne(Oid *arg1, Oid *arg2)
|
||||
{
|
||||
return (bool) (memcmp(arg1, arg2, INDEX_MAX_KEYS * sizeof(Oid)) != 0);
|
||||
}
|
||||
|
||||
bool
|
||||
oid8lt(Oid *arg1, Oid *arg2)
|
||||
oidvectorlt(Oid *arg1, Oid *arg2)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -150,7 +150,7 @@ oid8lt(Oid *arg1, Oid *arg2)
|
||||
}
|
||||
|
||||
bool
|
||||
oid8le(Oid *arg1, Oid *arg2)
|
||||
oidvectorle(Oid *arg1, Oid *arg2)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -161,7 +161,7 @@ oid8le(Oid *arg1, Oid *arg2)
|
||||
}
|
||||
|
||||
bool
|
||||
oid8ge(Oid *arg1, Oid *arg2)
|
||||
oidvectorge(Oid *arg1, Oid *arg2)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -172,7 +172,7 @@ oid8ge(Oid *arg1, Oid *arg2)
|
||||
}
|
||||
|
||||
bool
|
||||
oid8gt(Oid *arg1, Oid *arg2)
|
||||
oidvectorgt(Oid *arg1, Oid *arg2)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.47 1999/12/30 05:05:07 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.48 2000/01/10 16:13:14 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -233,7 +233,7 @@ regprocout(RegProcedure proid)
|
||||
* int8typeout - converts int8 type oids to "typname" list
|
||||
*/
|
||||
text *
|
||||
oid8types(Oid *oidArray)
|
||||
oidvectortypes(Oid *oidArray)
|
||||
{
|
||||
HeapTuple typetup;
|
||||
text *result;
|
||||
|
||||
Reference in New Issue
Block a user