Renaming cleanup, no pgindent yet.
authorBruce Momjian
Tue, 1 Sep 1998 03:29:17 +0000 (03:29 +0000)
committerBruce Momjian
Tue, 1 Sep 1998 03:29:17 +0000 (03:29 +0000)
329 files changed:
src/backend/access/common/heaptuple.c
src/backend/access/common/indextuple.c
src/backend/access/common/indexvalid.c
src/backend/access/common/printtup.c
src/backend/access/common/tupdesc.c
src/backend/access/gist/gist.c
src/backend/access/gist/gistget.c
src/backend/access/gist/gistscan.c
src/backend/access/gist/giststrat.c
src/backend/access/hash/hash.c
src/backend/access/hash/hashfunc.c
src/backend/access/hash/hashinsert.c
src/backend/access/hash/hashovfl.c
src/backend/access/hash/hashpage.c
src/backend/access/hash/hashscan.c
src/backend/access/hash/hashsearch.c
src/backend/access/hash/hashstrat.c
src/backend/access/hash/hashutil.c
src/backend/access/heap/heapam.c
src/backend/access/index/genam.c
src/backend/access/index/indexam.c
src/backend/access/index/istrat.c
src/backend/access/nbtree/nbtcompare.c
src/backend/access/nbtree/nbtinsert.c
src/backend/access/nbtree/nbtpage.c
src/backend/access/nbtree/nbtree.c
src/backend/access/nbtree/nbtscan.c
src/backend/access/nbtree/nbtsearch.c
src/backend/access/nbtree/nbtsort.c
src/backend/access/nbtree/nbtstrat.c
src/backend/access/nbtree/nbtutils.c
src/backend/access/rtree/rtget.c
src/backend/access/rtree/rtproc.c
src/backend/access/rtree/rtree.c
src/backend/access/rtree/rtscan.c
src/backend/access/rtree/rtstrat.c
src/backend/access/transam/transam.c
src/backend/access/transam/xact.c
src/backend/access/transam/xid.c
src/backend/bootstrap/bootstrap.c
src/backend/catalog/aclchk.c
src/backend/catalog/catalog.c
src/backend/catalog/heap.c
src/backend/catalog/index.c
src/backend/catalog/indexing.c
src/backend/catalog/pg_aggregate.c
src/backend/catalog/pg_operator.c
src/backend/catalog/pg_proc.c
src/backend/catalog/pg_type.c
src/backend/commands/async.c
src/backend/commands/cluster.c
src/backend/commands/command.c
src/backend/commands/copy.c
src/backend/commands/creatinh.c
src/backend/commands/dbcommands.c
src/backend/commands/defind.c
src/backend/commands/define.c
src/backend/commands/recipe.c
src/backend/commands/remove.c
src/backend/commands/rename.c
src/backend/commands/sequence.c
src/backend/commands/trigger.c
src/backend/commands/user.c
src/backend/commands/vacuum.c
src/backend/commands/variable.c
src/backend/executor/execFlatten.c
src/backend/executor/execJunk.c
src/backend/executor/execMain.c
src/backend/executor/execProcnode.c
src/backend/executor/execQual.c
src/backend/executor/execTuples.c
src/backend/executor/execUtils.c
src/backend/executor/functions.c
src/backend/executor/nodeHash.c
src/backend/executor/nodeHashjoin.c
src/backend/executor/nodeIndexscan.c
src/backend/executor/nodeMaterial.c
src/backend/executor/nodeSeqscan.c
src/backend/executor/nodeSort.c
src/backend/executor/nodeSubplan.c
src/backend/executor/nodeTee.c
src/backend/executor/spi.c
src/backend/lib/dllist.c
src/backend/lib/fstack.c
src/backend/lib/lispsort.c
src/backend/lib/stringinfo.c
src/backend/libpq/auth.c
src/backend/libpq/be-dumpdata.c
src/backend/libpq/be-fsstubs.c
src/backend/libpq/be-pqexec.c
src/backend/libpq/hba.c
src/backend/libpq/portal.c
src/backend/libpq/portalbuf.c
src/backend/libpq/pqcomm.c
src/backend/libpq/pqsignal.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/nodes/list.c
src/backend/nodes/nodeFuncs.c
src/backend/nodes/nodes.c
src/backend/nodes/outfuncs.c
src/backend/nodes/read.c
src/backend/nodes/readfuncs.c
src/backend/optimizer/geqo/geqo_cx.c
src/backend/optimizer/geqo/geqo_erx.c
src/backend/optimizer/geqo/geqo_eval.c
src/backend/optimizer/geqo/geqo_main.c
src/backend/optimizer/geqo/geqo_misc.c
src/backend/optimizer/geqo/geqo_params.c
src/backend/optimizer/geqo/geqo_paths.c
src/backend/optimizer/geqo/geqo_pool.c
src/backend/optimizer/geqo/geqo_recombination.c
src/backend/optimizer/geqo/geqo_selection.c
src/backend/optimizer/path/allpaths.c
src/backend/optimizer/path/clausesel.c
src/backend/optimizer/path/costsize.c
src/backend/optimizer/path/hashutils.c
src/backend/optimizer/path/indxpath.c
src/backend/optimizer/path/joinpath.c
src/backend/optimizer/path/joinrels.c
src/backend/optimizer/path/joinutils.c
src/backend/optimizer/path/mergeutils.c
src/backend/optimizer/path/orindxpath.c
src/backend/optimizer/path/predmig.c
src/backend/optimizer/path/prune.c
src/backend/optimizer/path/xfunc.c
src/backend/optimizer/plan/createplan.c
src/backend/optimizer/plan/initsplan.c
src/backend/optimizer/plan/planmain.c
src/backend/optimizer/plan/planner.c
src/backend/optimizer/plan/setrefs.c
src/backend/optimizer/plan/subselect.c
src/backend/optimizer/prep/prepqual.c
src/backend/optimizer/prep/preptlist.c
src/backend/optimizer/prep/prepunion.c
src/backend/optimizer/util/clauseinfo.c
src/backend/optimizer/util/clauses.c
src/backend/optimizer/util/indexnode.c
src/backend/optimizer/util/joininfo.c
src/backend/optimizer/util/keys.c
src/backend/optimizer/util/ordering.c
src/backend/optimizer/util/pathnode.c
src/backend/optimizer/util/plancat.c
src/backend/optimizer/util/relnode.c
src/backend/optimizer/util/tlist.c
src/backend/optimizer/util/var.c
src/backend/parser/analyze.c
src/backend/parser/gram.c
src/backend/parser/gram.y
src/backend/parser/keywords.c
src/backend/parser/parse_coerce.c
src/backend/parser/parse_expr.c
src/backend/parser/parse_func.c
src/backend/parser/parse_node.c
src/backend/parser/parse_oper.c
src/backend/parser/parse_relation.c
src/backend/parser/parse_target.c
src/backend/parser/parse_type.c
src/backend/parser/parser.c
src/backend/parser/scan.c
src/backend/parser/scan.l
src/backend/port/dynloader/bsd.c
src/backend/port/dynloader/bsdi.c
src/backend/port/dynloader/hpux.c
src/backend/port/dynloader/linux.c
src/backend/port/dynloader/ultrix4.c
src/backend/port/gethostname.c
src/backend/port/getrusage.c
src/backend/port/inet_aton.c
src/backend/port/isinf.c
src/backend/port/nextstep/port.c
src/backend/port/random.c
src/backend/port/snprintf.c
src/backend/port/strerror.c
src/backend/port/strtol.c
src/backend/port/strtoul.c
src/backend/postmaster/postmaster.c
src/backend/regex/engine.c
src/backend/regex/regcomp.c
src/backend/regex/regerror.c
src/backend/regex/regexec.c
src/backend/rewrite/locks.c
src/backend/rewrite/rewriteDefine.c
src/backend/rewrite/rewriteManip.c
src/backend/rewrite/rewriteRemove.c
src/backend/rewrite/rewriteSupport.c
src/backend/storage/buffer/buf_table.c
src/backend/storage/buffer/bufmgr.c
src/backend/storage/buffer/freelist.c
src/backend/storage/file/fd.c
src/backend/storage/ipc/ipc.c
src/backend/storage/ipc/ipci.c
src/backend/storage/ipc/shmem.c
src/backend/storage/ipc/shmqueue.c
src/backend/storage/ipc/sinvaladt.c
src/backend/storage/ipc/spin.c
src/backend/storage/large_object/inv_api.c
src/backend/storage/lmgr/lock.c
src/backend/storage/lmgr/multi.c
src/backend/storage/lmgr/proc.c
src/backend/storage/lmgr/single.c
src/backend/storage/page/bufpage.c
src/backend/storage/page/itemptr.c
src/backend/storage/smgr/md.c
src/backend/storage/smgr/mm.c
src/backend/storage/smgr/smgr.c
src/backend/storage/smgr/smgrtype.c
src/backend/tcop/dest.c
src/backend/tcop/fastpath.c
src/backend/tcop/postgres.c
src/backend/utils/adt/acl.c
src/backend/utils/adt/arrayfuncs.c
src/backend/utils/adt/arrayutils.c
src/backend/utils/adt/bool.c
src/backend/utils/adt/cash.c
src/backend/utils/adt/char.c
src/backend/utils/adt/chunk.c
src/backend/utils/adt/date.c
src/backend/utils/adt/datetime.c
src/backend/utils/adt/datum.c
src/backend/utils/adt/dt.c
src/backend/utils/adt/filename.c
src/backend/utils/adt/float.c
src/backend/utils/adt/geo_ops.c
src/backend/utils/adt/geo_selfuncs.c
src/backend/utils/adt/int.c
src/backend/utils/adt/int8.c
src/backend/utils/adt/like.c
src/backend/utils/adt/misc.c
src/backend/utils/adt/nabstime.c
src/backend/utils/adt/name.c
src/backend/utils/adt/not_in.c
src/backend/utils/adt/numutils.c
src/backend/utils/adt/oid.c
src/backend/utils/adt/regexp.c
src/backend/utils/adt/regproc.c
src/backend/utils/adt/ruleutils.c
src/backend/utils/adt/selfuncs.c
src/backend/utils/adt/sets.c
src/backend/utils/adt/timestamp.c
src/backend/utils/adt/varchar.c
src/backend/utils/adt/varlena.c
src/backend/utils/cache/catcache.c
src/backend/utils/cache/fcache.c
src/backend/utils/cache/inval.c
src/backend/utils/cache/lsyscache.c
src/backend/utils/cache/relcache.c
src/backend/utils/cache/syscache.c
src/backend/utils/error/assert.c
src/backend/utils/error/elog.c
src/backend/utils/error/exc.c
src/backend/utils/error/format.c
src/backend/utils/fmgr/dfmgr.c
src/backend/utils/fmgr/fmgr.c
src/backend/utils/hash/dynahash.c
src/backend/utils/hash/hashfn.c
src/backend/utils/init/enbl.c
src/backend/utils/init/findbe.c
src/backend/utils/init/miscinit.c
src/backend/utils/mb/wstrcmp.c
src/backend/utils/mb/wstrncmp.c
src/backend/utils/misc/database.c
src/backend/utils/mmgr/aset.c
src/backend/utils/mmgr/mcxt.c
src/backend/utils/mmgr/oset.c
src/backend/utils/mmgr/palloc.c
src/backend/utils/mmgr/portalmem.c
src/backend/utils/sort/lselect.c
src/backend/utils/sort/psort.c
src/backend/utils/time/tqual.c
src/bin/pg_dump/common.c
src/bin/pg_dump/pg_dump.c
src/bin/pg_version/pg_version.c
src/include/access/genam.h
src/include/access/hash.h
src/include/access/heapam.h
src/include/access/itup.h
src/include/access/tupdesc.h
src/include/access/tupmacs.h
src/include/access/valid.h
src/include/bootstrap/bootstrap.h
src/include/catalog/catalog.h
src/include/catalog/heap.h
src/include/catalog/index.h
src/include/catalog/indexing.h
src/include/catalog/pg_attribute.h
src/include/catalog/pg_index.h
src/include/catalog/pg_inherits.h
src/include/catalog/pg_operator.h
src/include/catalog/pg_type.h
src/include/catalog/pg_version.h
src/include/commands/cluster.h
src/include/commands/vacuum.h
src/include/executor/executor.h
src/include/libpq/hba.h
src/include/nodes/nodes.h
src/include/nodes/relation.h
src/include/optimizer/clauseinfo.h
src/include/optimizer/joininfo.h
src/include/optimizer/xfunc.h
src/include/tcop/dest.h
src/include/utils/array.h
src/include/utils/builtins.h
src/include/utils/catcache.h
src/include/utils/dt.h
src/include/utils/rel.h
src/interfaces/ecpg/lib/ecpglib.c
src/interfaces/ecpg/preproc/c_keywords.c
src/interfaces/ecpg/preproc/ecpg.c
src/interfaces/ecpg/preproc/ecpg_keywords.c
src/interfaces/ecpg/preproc/keywords.c
src/interfaces/ecpg/preproc/pgc.l
src/interfaces/ecpg/preproc/preproc.y
src/interfaces/ecpg/preproc/type.c
src/interfaces/libpgtcl/pgtclCmds.c
src/interfaces/libpq/fe-auth.c
src/interfaces/libpq/fe-exec.c
src/interfaces/libpq/fe-print.c
src/interfaces/libpq/libpqdll.c
src/interfaces/libpq/pqsignal.c
src/interfaces/odbc/columninfo.c
src/interfaces/odbc/execute.c
src/pl/plpgsql/src/pl_comp.c
src/pl/plpgsql/src/pl_exec.c
src/pl/tcl/pltcl.c
src/test/regress/regress.c
src/tutorial/complex.c
src/tutorial/funcs.c
src/utils/getopt.c

index cade50db3ca7668a7139bfb28913a329adfd82c7..432bfe02abc8cc9eb8b5907a94a334743eddb236 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.39 1998/08/19 02:00:53 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.40 1998/09/01 03:20:41 momjian Exp $
  *
  * NOTES
  *   The old interface functions have been converted to macros
@@ -55,13 +55,13 @@ long        heap_sysoffset[] = {
  */
 Size
 ComputeDataSize(TupleDesc tupleDesc,
-               Datum value[],
-               char nulls[])
+               Datum *value,
+               char *nulls)
 {
    uint32      data_length;
    int         i;
    int         numberOfAttributes = tupleDesc->natts;
-   AttributeTupleForm *att = tupleDesc->attrs;
+   Form_pg_attribute *att = tupleDesc->attrs;
 
    for (data_length = 0, i = 0; i < numberOfAttributes; i++)
    {
@@ -118,8 +118,8 @@ ComputeDataSize(TupleDesc tupleDesc,
 void
 DataFill(char *data,
         TupleDesc tupleDesc,
-        Datum value[],
-        char nulls[],
+        Datum *value,
+        char *nulls,
         uint16 *infomask,
         bits8 *bit)
 {
@@ -128,7 +128,7 @@ DataFill(char *data,
    uint32      data_length;
    int         i;
    int         numberOfAttributes = tupleDesc->natts;
-   AttributeTupleForm *att = tupleDesc->attrs;
+   Form_pg_attribute *att = tupleDesc->attrs;
 
    if (bit != NULL)
    {
@@ -227,13 +227,13 @@ int
 heap_attisnull(HeapTuple tup, int attnum)
 {
    if (attnum > (int) tup->t_natts)
-       return (1);
+       return 1;
 
    if (HeapTupleNoNulls(tup))
-       return (0);
+       return 0;
 
    if (attnum > 0)
-       return (att_isnull(attnum - 1, tup->t_bits));
+       return att_isnull(attnum - 1, tup->t_bits);
    else
        switch (attnum)
        {
@@ -252,7 +252,7 @@ heap_attisnull(HeapTuple tup, int attnum)
                elog(ERROR, "heap_attisnull: undefined negative attnum");
        }
 
-   return (0);
+   return 0;
 }
 
 /* ----------------------------------------------------------------
@@ -343,21 +343,21 @@ heap_getsysattr(HeapTuple tup, Buffer b, int attnum)
    switch (attnum)
    {
            case SelfItemPointerAttributeNumber:
-           return ((Datum) &tup->t_ctid);
+           return (Datum) &tup->t_ctid;
        case ObjectIdAttributeNumber:
-           return ((Datum) (long) tup->t_oid);
+           return (Datum) (long) tup->t_oid;
        case MinTransactionIdAttributeNumber:
-           return ((Datum) (long) tup->t_xmin);
+           return (Datum) (long) tup->t_xmin;
        case MinCommandIdAttributeNumber:
-           return ((Datum) (long) tup->t_cmin);
+           return (Datum) (long) tup->t_cmin;
        case MaxTransactionIdAttributeNumber:
-           return ((Datum) (long) tup->t_xmax);
+           return (Datum) (long) tup->t_xmax;
        case MaxCommandIdAttributeNumber:
-           return ((Datum) (long) tup->t_cmax);
+           return (Datum) (long) tup->t_cmax;
        default:
            elog(ERROR, "heap_getsysattr: undefined attnum %d", attnum);
    }
-   return ((Datum) NULL);
+   return (Datum) NULL;
 }
 
 /* ----------------
@@ -388,7 +388,7 @@ nocachegetattr(HeapTuple tup,
    char       *tp;             /* ptr to att in tuple */
    bits8      *bp = tup->t_bits;       /* ptr to att in tuple */
    int         slow;           /* do we have to walk nulls? */
-   AttributeTupleForm *att = tupleDesc->attrs;
+   Form_pg_attribute *att = tupleDesc->attrs;
 
 
 #if IN_MACRO
@@ -426,7 +426,7 @@ nocachegetattr(HeapTuple tup,
            /*
             * first attribute is always at position zero
             */
-           return ((Datum) fetchatt(&(att[0]), (char *) tup + tup->t_hoff));
+           return (Datum) fetchatt(&(att[0]), (char *) tup + tup->t_hoff);
        }
 #endif
 
@@ -505,7 +505,7 @@ nocachegetattr(HeapTuple tup,
                                    tp + att[attnum]->attcacheoff);
        }
        else if (attnum == 0)
-           return ((Datum) fetchatt(&(att[0]), (char *) tp));
+           return (Datum) fetchatt(&(att[0]), (char *) tp);
        else if (!HeapTupleAllFixed(tup))
        {
            int         j = 0;
@@ -734,11 +734,11 @@ heap_copytuple(HeapTuple tuple)
    HeapTuple   newTuple;
 
    if (!HeapTupleIsValid(tuple))
-       return (NULL);
+       return NULL;
 
    newTuple = (HeapTuple) palloc(tuple->t_len);
    memmove((char *) newTuple, (char *) tuple, (int) tuple->t_len);
-   return (newTuple);
+   return newTuple;
 }
 
 #ifdef NOT_USED
@@ -751,8 +751,8 @@ heap_copytuple(HeapTuple tuple)
 void
 heap_deformtuple(HeapTuple tuple,
                 TupleDesc tdesc,
-                Datum values[],
-                char nulls[])
+                Datum *values,
+                char *nulls)
 {
    int         i;
    int         natts;
@@ -780,7 +780,7 @@ heap_deformtuple(HeapTuple tuple,
 /* ----------------
  *     heap_formtuple
  *
- *     constructs a tuple from the given value[] and null[] arrays
+ *     constructs a tuple from the given *value and *null arrays
  *
  * old comments
  *     Handles alignment by aligning 2 byte attributes on short boundries
@@ -789,7 +789,7 @@ heap_deformtuple(HeapTuple tuple,
  *     not properly align fixed length arrays of 1 or 2 byte types (yet).
  *
  *     Null attributes are indicated by a 'n' in the appropriate byte
- *     of the null[].  Non-null attributes are indicated by a ' ' (space).
+ *     of the *null.   Non-null attributes are indicated by a ' ' (space).
  *
  *     Fix me.  (Figure that must keep context if debug--allow give oid.)
  *     Assumes in order.
@@ -797,8 +797,8 @@ heap_deformtuple(HeapTuple tuple,
  */
 HeapTuple
 heap_formtuple(TupleDesc tupleDescriptor,
-              Datum value[],
-              char nulls[])
+              Datum *value,
+              char *nulls)
 {
    char       *tp;             /* tuple pointer */
    HeapTuple   tuple;          /* return tuple */
@@ -849,7 +849,7 @@ heap_formtuple(TupleDesc tupleDescriptor,
 
    tuple->t_infomask |= HEAP_XMAX_INVALID;
 
-   return (tuple);
+   return tuple;
 }
 
 /* ----------------
@@ -862,9 +862,9 @@ heap_formtuple(TupleDesc tupleDescriptor,
 HeapTuple
 heap_modifytuple(HeapTuple tuple,
                 Relation relation,
-                Datum replValue[],
-                char replNull[],
-                char repl[])
+                Datum *replValue,
+                char *replNull,
+                char *repl)
 {
    int         attoff;
    int         numberOfAttributes;
@@ -884,10 +884,10 @@ heap_modifytuple(HeapTuple tuple,
    Assert(PointerIsValid(replNull));
    Assert(PointerIsValid(repl));
 
-   numberOfAttributes = RelationGetRelationTupleForm(relation)->relnatts;
+   numberOfAttributes = RelationGetForm(relation)->relnatts;
 
    /* ----------------
-    *  allocate and fill value[] and nulls[] arrays from either
+    *  allocate and fill *value and *nulls arrays from either
     *  the tuple or the repl information, as appropriate.
     * ----------------
     */
@@ -904,7 +904,7 @@ heap_modifytuple(HeapTuple tuple,
            value[attoff] =
                heap_getattr(tuple,
                             AttrOffsetGetAttrNumber(attoff),
-                            RelationGetTupleDescriptor(relation),
+                            RelationGetDescr(relation),
                             &isNull);
            nulls[attoff] = (isNull) ? 'n' : ' ';
 
@@ -919,10 +919,10 @@ heap_modifytuple(HeapTuple tuple,
    }
 
    /* ----------------
-    *  create a new tuple from the values[] and nulls[] arrays
+    *  create a new tuple from the *values and *nulls arrays
     * ----------------
     */
-   newTuple = heap_formtuple(RelationGetTupleDescriptor(relation),
+   newTuple = heap_formtuple(RelationGetDescr(relation),
                              value,
                              nulls);
 
@@ -972,5 +972,5 @@ heap_addheader(uint32 natts,    /* max domain index */
 
    memmove(tp, structure, structlen);
 
-   return (tup);
+   return tup;
 }
index cdb362ae51902185b2beac5a80dcb40ed603fce1..370294a0bb4823aedf46f4d478b85274da5cc76e 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.30 1998/08/27 05:06:54 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.31 1998/09/01 03:20:42 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -38,8 +38,8 @@
  */
 IndexTuple
 index_formtuple(TupleDesc tupleDescriptor,
-               Datum value[],
-               char null[])
+               Datum *value,
+               char *null)
 {
    char       *tp;             /* tuple pointer */
    IndexTuple  tuple;          /* return tuple */
@@ -107,7 +107,7 @@ index_formtuple(TupleDesc tupleDescriptor,
     * ----------------
     */
    tuple->t_info = infomask;
-   return (tuple);
+   return tuple;
 }
 
 /* ----------------
@@ -139,7 +139,7 @@ nocache_index_getattr(IndexTuple tup,
    char       *bp = NULL;      /* ptr to att in tuple */
    int         slow;           /* do we have to walk nulls? */
    int         data_off;       /* tuple data offset */
-   AttributeTupleForm *att = tupleDesc->attrs;
+   Form_pg_attribute *att = tupleDesc->attrs;
 
    /* ----------------
     *  sanity checks
@@ -256,7 +256,7 @@ nocache_index_getattr(IndexTuple tup,
                                    tp + att[attnum]->attcacheoff);
        }
        else if (attnum == 0)
-           return ((Datum) fetchatt(&(att[0]), (char *) tp));
+           return (Datum) fetchatt(&(att[0]), (char *) tp);
        else if (!IndexTupleAllFixed(tup))
        {
            int         j = 0;
@@ -461,7 +461,7 @@ FormRetrieveIndexResult(ItemPointer indexItemPointer,
    result->index_iptr = *indexItemPointer;
    result->heap_iptr = *heapItemPointer;
 
-   return (result);
+   return result;
 }
 
 /*
index b19b35c923d963ff62fe761576806192bebb1fdc..a30bf84d890dc50cfeaf6584855f5e4732373954 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/access/common/Attic/indexvalid.c,v 1.19 1998/06/15 19:27:45 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/access/common/Attic/indexvalid.c,v 1.20 1998/09/01 03:20:44 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -57,11 +57,11 @@ index_keytest(IndexTuple tuple,
        if (isNull)
        {
            /* XXX eventually should check if SK_ISNULL */
-           return (false);
+           return false;
        }
 
        if (key[0].sk_flags & SK_ISNULL)
-           return (false);
+           return false;
 
        if (key[0].sk_flags & SK_COMMUTE)
        {
@@ -77,11 +77,11 @@ index_keytest(IndexTuple tuple,
        }
 
        if (!test == !(key[0].sk_flags & SK_NEGATE))
-           return (false);
+           return false;
 
        scanKeySize -= 1;
        key++;
    }
 
-   return (true);
+   return true;
 }
index 24cd7ff9c7f933f564e425969299892dc566573d..d9b37bcf878ad6a5d86630666563ee485e6f68c3 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.33 1998/08/30 19:30:38 scrappy Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.34 1998/09/01 03:20:45 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -46,10 +46,10 @@ typtoout(Oid type)
                                    0, 0, 0);
 
    if (HeapTupleIsValid(typeTuple))
-       return ((Oid) ((TypeTupleForm) GETSTRUCT(typeTuple))->typoutput);
+       return (Oid) ((Form_pg_type) GETSTRUCT(typeTuple))->typoutput;
 
    elog(ERROR, "typtoout: Cache lookup of type %d failed", type);
-   return (InvalidOid);
+   return InvalidOid;
 }
 
 Oid
@@ -62,10 +62,10 @@ gettypelem(Oid type)
                                    0, 0, 0);
 
    if (HeapTupleIsValid(typeTuple))
-       return ((Oid) ((TypeTupleForm) GETSTRUCT(typeTuple))->typelem);
+       return (Oid) ((Form_pg_type) GETSTRUCT(typeTuple))->typelem;
 
    elog(ERROR, "typtoout: Cache lookup of type %d failed", type);
-   return (InvalidOid);
+   return InvalidOid;
 }
 
 /* ----------------
@@ -157,7 +157,7 @@ printtup(HeapTuple tuple, TupleDesc typeinfo)
  */
 static void
 printatt(unsigned attributeId,
-        AttributeTupleForm attributeP,
+        Form_pg_attribute attributeP,
         char *value)
 {
    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)
 {
    int         i;
    int         natts = tupleDesc->natts;
-   AttributeTupleForm *attinfo = tupleDesc->attrs;
+   Form_pg_attribute *attinfo = tupleDesc->attrs;
 
    puts(name);
    for (i = 0; i < natts; ++i)
index 569fac67101a5c3e4b06cbc8b8e2fa49c531ee81..df51228305202b40c30a4b88a96e3d889b5da6d0 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.42 1998/08/19 02:00:56 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.43 1998/09/01 03:20:46 momjian Exp $
  *
  * NOTES
  *   some of the executor utility code such as "ExecTypeFromTL" should be
@@ -57,25 +57,25 @@ CreateTemplateTupleDesc(int natts)
     *  is filled with NULL pointers.
     * ----------------
     */
-   size = natts * sizeof(AttributeTupleForm);
+   size = natts * sizeof(Form_pg_attribute);
    desc = (TupleDesc) palloc(sizeof(struct tupleDesc));
-   desc->attrs = (AttributeTupleForm *) palloc(size);
+   desc->attrs = (Form_pg_attribute *) palloc(size);
    desc->constr = NULL;
    MemSet(desc->attrs, 0, size);
 
    desc->natts = natts;
 
-   return (desc);
+   return desc;
 }
 
 /* ----------------------------------------------------------------
  *     CreateTupleDesc
  *
- *     This function allocates a new TupleDesc from AttributeTupleForm array
+ *     This function allocates a new TupleDesc from Form_pg_attribute array
  * ----------------------------------------------------------------
  */
 TupleDesc
-CreateTupleDesc(int natts, AttributeTupleForm *attrs)
+CreateTupleDesc(int natts, Form_pg_attribute *attrs)
 {
    TupleDesc   desc;
 
@@ -90,7 +90,7 @@ CreateTupleDesc(int natts, AttributeTupleForm *attrs)
    desc->natts = natts;
    desc->constr = NULL;
 
-   return (desc);
+   return desc;
 }
 
 /* ----------------------------------------------------------------
@@ -111,12 +111,12 @@ CreateTupleDescCopy(TupleDesc tupdesc)
 
    desc = (TupleDesc) palloc(sizeof(struct tupleDesc));
    desc->natts = tupdesc->natts;
-   size = desc->natts * sizeof(AttributeTupleForm);
-   desc->attrs = (AttributeTupleForm *) palloc(size);
+   size = desc->natts * sizeof(Form_pg_attribute);
+   desc->attrs = (Form_pg_attribute *) palloc(size);
    for (i = 0; i < desc->natts; i++)
    {
        desc->attrs[i] =
-           (AttributeTupleForm) palloc(ATTRIBUTE_TUPLE_SIZE);
+           (Form_pg_attribute) palloc(ATTRIBUTE_TUPLE_SIZE);
        memmove(desc->attrs[i],
                tupdesc->attrs[i],
                ATTRIBUTE_TUPLE_SIZE);
@@ -146,12 +146,12 @@ CreateTupleDescCopyConstr(TupleDesc tupdesc)
 
    desc = (TupleDesc) palloc(sizeof(struct tupleDesc));
    desc->natts = tupdesc->natts;
-   size = desc->natts * sizeof(AttributeTupleForm);
-   desc->attrs = (AttributeTupleForm *) palloc(size);
+   size = desc->natts * sizeof(Form_pg_attribute);
+   desc->attrs = (Form_pg_attribute *) palloc(size);
    for (i = 0; i < desc->natts; i++)
    {
        desc->attrs[i] =
-           (AttributeTupleForm) palloc(ATTRIBUTE_TUPLE_SIZE);
+           (Form_pg_attribute) palloc(ATTRIBUTE_TUPLE_SIZE);
        memmove(desc->attrs[i],
                tupdesc->attrs[i],
                ATTRIBUTE_TUPLE_SIZE);
@@ -260,8 +260,8 @@ TupleDescInitEntry(TupleDesc desc,
                   bool attisset)
 {
    HeapTuple   tuple;
-   TypeTupleForm typeForm;
-   AttributeTupleForm att;
+   Form_pg_type typeForm;
+   Form_pg_attribute att;
 
    /* ----------------
     *  sanity checks
@@ -284,7 +284,7 @@ TupleDescInitEntry(TupleDesc desc,
     * ----------------
     */
 
-   att = (AttributeTupleForm) palloc(ATTRIBUTE_TUPLE_SIZE);
+   att = (Form_pg_attribute) palloc(ATTRIBUTE_TUPLE_SIZE);
    desc->attrs[attributeNumber - 1] = att;
 
    /* ----------------
@@ -349,7 +349,7 @@ TupleDescInitEntry(TupleDesc desc,
     *  information from the type tuple we found..
     * ----------------
     */
-   typeForm = (TypeTupleForm) GETSTRUCT(tuple);
+   typeForm = (Form_pg_type) GETSTRUCT(tuple);
 
    att->atttypid = tuple->t_oid;
    att->attalign = typeForm->typalign;
@@ -412,7 +412,7 @@ TupleDescMakeSelfReference(TupleDesc desc,
                           AttrNumber attnum,
                           char *relname)
 {
-   AttributeTupleForm att;
+   Form_pg_attribute att;
    Type        t = typeidType(OIDOID);
 
    att = desc->attrs[attnum - 1];
index e61c3ce5dd2c7296b15c8d2e1bc62444902367ab..f316ba2b3c4362aa3f8460fc5dcb635eb1ffde87 100644 (file)
@@ -141,8 +141,8 @@ gistbuild(Relation heap,
    }
 
    /* init the tuple descriptors and get set for a heap scan */
-   hd = RelationGetTupleDescriptor(heap);
-   id = RelationGetTupleDescriptor(index);
+   hd = RelationGetDescr(heap);
+   id = RelationGetDescr(index);
    d = (Datum *) palloc(natts * sizeof(*d));
    nulls = (bool *) palloc(natts * sizeof(*nulls));
 
@@ -350,7 +350,7 @@ gistinsert(Relation r, Datum *datum, char *nulls, ItemPointer ht_ctid, Relation
            compvec[i] = FALSE;
        datum[i] = (Datum) tmpentry.pred;
    }
-   itup = index_formtuple(RelationGetTupleDescriptor(r), datum, nulls);
+   itup = index_formtuple(RelationGetDescr(r), datum, nulls);
    itup->t_tid = *ht_ctid;
 
    RelationSetLockForWrite(r);
@@ -362,7 +362,7 @@ gistinsert(Relation r, Datum *datum, char *nulls, ItemPointer ht_ctid, Relation
    pfree(compvec);
 
    /* XXX two-phase locking -- don't unlock the relation until EOT */
-   return (res);
+   return res;
 }
 
 /*
@@ -431,7 +431,7 @@ gistdoinsert(Relation r,
        res = gistSplit(r, buffer, stack, itup, giststate);
        gistfreestack(stack);
        WriteBuffer(buffer);    /* don't forget to release buffer! */
-       return (res);
+       return res;
    }
 
    if (PageIsEmpty(page))
@@ -458,7 +458,7 @@ gistdoinsert(Relation r,
    res = (InsertIndexResult) palloc(sizeof(InsertIndexResultData));
    ItemPointerSet(&(res->pointerData), blk, l);
 
-   return (res);
+   return res;
 }
 
 
@@ -512,7 +512,7 @@ gistChooseSubtree(Relation r, IndexTuple itup,  /* itup has compressed
    *retstack = stack;
    *leafbuf = buffer;
 
-   return (blk);
+   return blk;
 }
 
 
@@ -568,7 +568,7 @@ gistAdjustKeys(Relation r,
    (*fmgr_faddr(&giststate->equalFn)) (ev0p->pred, datum, &result);
    if (!result)
    {
-       TupleDesc   td = RelationGetTupleDescriptor(r);
+       TupleDesc   td = RelationGetDescr(r);
 
        /* compress datum for storage on page */
        gistcentryinit(giststate, ¢ry, datum, ev0p->rel, ev0p->page,
@@ -869,7 +869,7 @@ gistSplit(Relation r,
    pfree(ltup);
    pfree(rtup);
 
-   return (res);
+   return res;
 }
 
 /*
@@ -962,7 +962,7 @@ gistentryinsert(Relation r, GISTSTACK *stk, IndexTuple tup,
        res = gistSplit(r, b, stk->gs_parent, tup, giststate);
        WriteBuffer(b);         /* don't forget to release buffer!  -
                                 * 01/31/94 */
-       return (res);
+       return res;
    }
    else
    {
@@ -978,7 +978,7 @@ gistentryinsert(Relation r, GISTSTACK *stk, IndexTuple tup,
            pfree(tmpentry.pred);
        if (tup != newtup)
            pfree(newtup);
-       return (res);
+       return res;
    }
 }
 
@@ -1079,13 +1079,13 @@ gistchoose(Relation r, Page p, IndexTuple it,   /* it has compressed entry */
    if (identry.pred != id)
        pfree(identry.pred);
 
-   return (which);
+   return which;
 }
 
 static int
 gistnospace(Page p, IndexTuple it)
 {
-   return (PageGetFreeSpace(p) < IndexTupleSize(it));
+   return PageGetFreeSpace(p) < IndexTupleSize(it);
 }
 
 void
@@ -1144,7 +1144,7 @@ initGISTstate(GISTSTATE *giststate, Relation index)
                picksplit_proc,
                equal_proc;
    HeapTuple   htup;
-   IndexTupleForm itupform;
+   Form_pg_index itupform;
 
    consistent_proc = index_getprocid(index, 1, GIST_CONSISTENT_PROC);
    union_proc = index_getprocid(index, 1, GIST_UNION_PROC);
@@ -1165,7 +1165,7 @@ initGISTstate(GISTSTATE *giststate, Relation index)
    htup = SearchSysCacheTuple(INDEXRELID,
                               ObjectIdGetDatum(RelationGetRelid(index)),
                               0, 0, 0);
-   itupform = (IndexTupleForm) GETSTRUCT(htup);
+   itupform = (Form_pg_index) GETSTRUCT(htup);
    if (!HeapTupleIsValid(htup))
        elog(ERROR, "initGISTstate: index %d not found",
        RelationGetRelid(index));
@@ -1183,7 +1183,7 @@ initGISTstate(GISTSTATE *giststate, Relation index)
                 itupform->indexrelid, FirstOffsetNumber);
            return;
        }
-       giststate->keytypbyval = (((AttributeTupleForm) htup)->attbyval);
+       giststate->keytypbyval = (((Form_pg_attribute) htup)->attbyval);
    }
    else
        giststate->keytypbyval = FALSE;
@@ -1210,7 +1210,7 @@ gist_tuple_replacekey(Relation r, GISTENTRY entry, IndexTuple t)
        /* or in new size */
        t->t_info |= MAXALIGN(entry.bytes + sizeof(IndexTupleData));
 
-       return (t);
+       return t;
    }
    else
    {
@@ -1228,7 +1228,7 @@ gist_tuple_replacekey(Relation r, GISTENTRY entry, IndexTuple t)
                                              isnull);
        newtup->t_tid = t->t_tid;
        pfree(isnull);
-       return (newtup);
+       return newtup;
    }
 }
 
@@ -1345,7 +1345,7 @@ text_range_out(TXTRANGE *r)
               *upper;
 
    if (r == NULL)
-       return (NULL);
+       return NULL;
    result = (char *) palloc(NAMEDATALEN + VARSIZE(TRLOWER(r)) + VARSIZE(TRUPPER(r))
                             - 2 * VARHDRSZ);
 
@@ -1359,7 +1359,7 @@ text_range_out(TXTRANGE *r)
    sprintf(result, "[%s,%s): %d", lower, upper, r->flag);
    pfree(lower);
    pfree(upper);
-   return (result);
+   return result;
 }
 
 #endif
@@ -1370,11 +1370,11 @@ int_range_out(INTRANGE *r)
    char       *result;
 
    if (r == NULL)
-       return (NULL);
+       return NULL;
    result = (char *) palloc(80);
    sprintf(result, "[%d,%d): %d", r->lower, r->upper, r->flag);
 
-   return (result);
+   return result;
 }
 
 #endif                         /* defined GISTDEBUG */
index 3832254af0b1ccc80ec7d8ed5441430c8fc9d3b3..d34ee84d7614a4992b8efaa5215eb36d545588ae 100644 (file)
@@ -48,14 +48,14 @@ gistgettuple(IndexScanDesc s, ScanDirection dir)
 
    /* if we have it cached in the scan desc, just return the value */
    if ((res = gistscancache(s, dir)) != (RetrieveIndexResult) NULL)
-       return (res);
+       return res;
 
    /* not cached, so we'll have to do some work */
    if (ItemPointerIsValid(&(s->currentItemData)))
        res = gistnext(s, dir);
    else
        res = gistfirst(s, dir);
-   return (res);
+   return res;
 }
 
 static RetrieveIndexResult
@@ -90,7 +90,7 @@ gistfirst(IndexScanDesc s, ScanDirection dir)
 
            ReleaseBuffer(b);
            if (so->s_stack == (GISTSTACK *) NULL)
-               return ((RetrieveIndexResult) NULL);
+               return (RetrieveIndexResult) NULL;
 
            stk = so->s_stack;
            b = ReadBuffer(s->relation, stk->gs_blk);
@@ -116,7 +116,7 @@ gistfirst(IndexScanDesc s, ScanDirection dir)
            res = FormRetrieveIndexResult(&(s->currentItemData), &(it->t_tid));
 
            ReleaseBuffer(b);
-           return (res);
+           return res;
        }
        else
        {
@@ -174,7 +174,7 @@ gistnext(IndexScanDesc s, ScanDirection dir)
 
            ReleaseBuffer(b);
            if (so->s_stack == (GISTSTACK *) NULL)
-               return ((RetrieveIndexResult) NULL);
+               return (RetrieveIndexResult) NULL;
 
            stk = so->s_stack;
            b = ReadBuffer(s->relation, stk->gs_blk);
@@ -200,7 +200,7 @@ gistnext(IndexScanDesc s, ScanDirection dir)
            res = FormRetrieveIndexResult(&(s->currentItemData), &(it->t_tid));
 
            ReleaseBuffer(b);
-           return (res);
+           return res;
        }
        else
        {
@@ -258,7 +258,7 @@ gistindex_keytest(IndexTuple tuple,
        if (isNull)
        {
            /* XXX eventually should check if SK_ISNULL */
-           return (false);
+           return false;
        }
 
        if (key[0].sk_flags & SK_COMMUTE)
@@ -276,13 +276,13 @@ gistindex_keytest(IndexTuple tuple,
        }
 
        if (!test == !(key[0].sk_flags & SK_NEGATE))
-           return (false);
+           return false;
 
        scanKeySize -= 1;
        key++;
    }
 
-   return (true);
+   return true;
 }
 
 
@@ -315,7 +315,7 @@ gistfindnext(IndexScanDesc s, Page p, OffsetNumber n, ScanDirection dir)
    {
        it = (char *) PageGetItem(p, PageGetItemId(p, n));
        if (gistindex_keytest((IndexTuple) it,
-                             RelationGetTupleDescriptor(s->relation),
+                             RelationGetDescr(s->relation),
                              s->numberOfKeys, s->keyData, giststate,
                              s->relation, p, n))
            break;
@@ -326,7 +326,7 @@ gistfindnext(IndexScanDesc s, Page p, OffsetNumber n, ScanDirection dir)
            n = OffsetNumberNext(n);
    }
 
-   return (n);
+   return n;
 }
 
 static RetrieveIndexResult
@@ -339,7 +339,7 @@ gistscancache(IndexScanDesc s, ScanDirection dir)
          && ItemPointerIsValid(&(s->currentItemData))))
    {
 
-       return ((RetrieveIndexResult) NULL);
+       return (RetrieveIndexResult) NULL;
    }
 
    ip = gistheapptr(s->relation, &(s->currentItemData));
@@ -351,7 +351,7 @@ gistscancache(IndexScanDesc s, ScanDirection dir)
 
    pfree(ip);
 
-   return (res);
+   return res;
 }
 
 /*
@@ -381,5 +381,5 @@ gistheapptr(Relation r, ItemPointer itemp)
    else
        ItemPointerSetInvalid(ip);
 
-   return (ip);
+   return ip;
 }
index ee016c1a934a0bdc00e6b316f5c77d37c2def18d..b440cbc5e9aeac4827f09765af4ee5a78ad9bac5 100644 (file)
@@ -72,7 +72,7 @@ gistbeginscan(Relation r,
    s = RelationGetIndexScan(r, fromEnd, nkeys, key);
    gistregscan(s);
 
-   return (s);
+   return s;
 }
 
 void
index c7a6f9ff7840c9001c7a7dafcad9350bbe09d915..b54c0951c4c8f8e838e70ff281898893641caaa4 100644 (file)
@@ -99,7 +99,7 @@ RelationGetGISTStrategy(Relation r,
                        AttrNumber attnum,
                        RegProcedure proc)
 {
-   return (RelationGetStrategy(r, attnum, &GISTEvaluationData, proc));
+   return RelationGetStrategy(r, attnum, &GISTEvaluationData, proc);
 }
 
 #ifdef NOT_USED
index 4bcc7eab5247c47b9c626d214931ef22422bd778..2a12171d0bc8bb6dac075d09b63b85b7b477a78a 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.20 1998/08/19 02:01:00 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.21 1998/09/01 03:20:53 momjian Exp $
  *
  * NOTES
  *   This file contains only the public interface routines.
@@ -88,8 +88,8 @@ hashbuild(Relation heap,
        _hash_metapinit(index);
 
    /* get tuple descriptors for heap and index relations */
-   htupdesc = RelationGetTupleDescriptor(heap);
-   itupdesc = RelationGetTupleDescriptor(index);
+   htupdesc = RelationGetDescr(heap);
+   itupdesc = RelationGetDescr(index);
 
    /* get space for data items that'll appear in the index tuple */
    attdata = (Datum *) palloc(natts * sizeof(Datum));
@@ -284,11 +284,11 @@ hashinsert(Relation rel, Datum *datum, char *nulls, ItemPointer ht_ctid, Relatio
 
 
    /* generate an index tuple */
-   itup = index_formtuple(RelationGetTupleDescriptor(rel), datum, nulls);
+   itup = index_formtuple(RelationGetDescr(rel), datum, nulls);
    itup->t_tid = *ht_ctid;
 
    if (itup->t_info & INDEX_NULL_MASK)
-       return ((InsertIndexResult) NULL);
+       return (InsertIndexResult) NULL;
 
    hitem = _hash_formitem(itup);
 
@@ -297,7 +297,7 @@ hashinsert(Relation rel, Datum *datum, char *nulls, ItemPointer ht_ctid, Relatio
    pfree(hitem);
    pfree(itup);
 
-   return (res);
+   return res;
 }
 
 
@@ -320,7 +320,7 @@ hashgettuple(IndexScanDesc scan, ScanDirection dir)
    else
        res = _hash_first(scan, dir);
 
-   return ((char *) res);
+   return (char *) res;
 }
 
 
@@ -345,7 +345,7 @@ hashbeginscan(Relation rel,
    /* register scan in case we change pages it's using */
    _hash_regscan(scan);
 
-   return ((char *) scan);
+   return (char *) scan;
 }
 
 /*
index d57c65e4e0705950762b2270ad2eb8e1aecbb873..9376ad2e57fddb5253b95fb44ff213a47e2b4ef2 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/access/hash/hashfunc.c,v 1.10 1998/08/19 02:01:02 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/access/hash/hashfunc.c,v 1.11 1998/09/01 03:20:54 momjian Exp $
  *
  * NOTES
  *   These functions are stored in pg_amproc.  For each operator class
 uint32
 hashint2(int16 key)
 {
-   return ((uint32) ~key);
+   return (uint32) ~key;
 }
 
 uint32
 hashint4(uint32 key)
 {
-   return (~key);
+   return ~key;
 }
 
 /* Hash function from Chris Torek. */
@@ -76,7 +76,7 @@ hashfloat4(float32 keyp)
                } while (--loop);
        }
    }
-   return (h);
+   return h;
 }
 
 
@@ -123,18 +123,18 @@ hashfloat8(float64 keyp)
                } while (--loop);
        }
    }
-   return (h);
+   return h;
 }
 
 
 uint32
 hashoid(Oid key)
 {
-   return ((uint32) ~key);
+   return (uint32) ~key;
 }
 
 uint32
-hashoid8(Oid key[])
+hashoid8(Oid *key)
 {
    int i;
    uint32 result = 0;
@@ -160,7 +160,7 @@ hashchar(char key)
    h = h * PRIME1 ^ (key - ' ');
    h %= PRIME2;
 
-   return (h);
+   return h;
 }
 
 
@@ -180,7 +180,7 @@ hashname(NameData *n)
        h = h * PRIME1 ^ (*key++ - ' ');
    h %= PRIME2;
 
-   return (h);
+   return h;
 }
 
 
@@ -240,5 +240,5 @@ hashtext(struct varlena * key)
                } while (--loop);
        }
    }
-   return (n);
+   return n;
 }
index 8e70e456637c6da770c8efc327970e9fda336629..df52938979cb9a30cc1f763d2c84a72275276608 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/access/hash/hashinsert.c,v 1.13 1998/06/15 19:27:48 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/access/hash/hashinsert.c,v 1.14 1998/09/01 03:20:56 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -85,7 +85,7 @@ _hash_doinsert(Relation rel, HashItem hitem)
    /* be tidy */
    _hash_freeskey(itup_scankey);
 
-   return (res);
+   return res;
 }
 
 /*
@@ -206,7 +206,7 @@ _hash_insertonpg(Relation rel,
        > metap->hashm_ffactor)
        _hash_expandtable(rel, metabuf);
    _hash_relbuf(rel, metabuf, HASH_READ);
-   return (res);
+   return res;
 }
 
 /*
@@ -236,5 +236,5 @@ _hash_pgaddtup(Relation rel,
    /* write the buffer, but hold our lock */
    _hash_wrtnorelbuf(rel, buf);
 
-   return (itup_off);
+   return itup_off;
 }
index 54178179162802dda31ab9b2e57a018bb45df766..8809091cc638dfc15dbc46db182c514918d18d5d 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.16 1998/06/15 19:27:49 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.17 1998/09/01 03:20:57 momjian Exp $
  *
  * NOTES
  *   Overflow pages look like ordinary relation pages.
@@ -84,7 +84,7 @@ _hash_addovflpage(Relation rel, Buffer *metabufp, Buffer buf)
    /* logically chain overflow page to previous page */
    pageopaque->hasho_nextblkno = ovflblkno;
    _hash_wrtnorelbuf(rel, buf);
-   return (ovflbuf);
+   return ovflbuf;
 }
 
 /*
@@ -227,7 +227,7 @@ _hash_getovfladdr(Relation rel, Buffer *metabufp)
    /* Calculate address of the new overflow page */
    oaddr = OADDR_OF(splitnum, offset);
    _hash_chgbufaccess(rel, metabufp, HASH_WRITE, HASH_READ);
-   return (oaddr);
+   return oaddr;
 
 found:
    bit = bit + _hash_firstfreebit(freep[j]);
@@ -254,7 +254,7 @@ found:
    /* initialize this page */
    oaddr = OADDR_OF(i, offset);
    _hash_chgbufaccess(rel, metabufp, HASH_WRITE, HASH_READ);
-   return (oaddr);
+   return oaddr;
 }
 
 /*
@@ -275,10 +275,10 @@ _hash_firstfreebit(uint32 map)
    for (i = 0; i < BITS_PER_MAP; i++)
    {
        if (!(mask & map))
-           return (i);
+           return i;
        mask = mask << 1;
    }
-   return (i);
+   return i;
 }
 
 /*
@@ -387,9 +387,9 @@ _hash_freeovflpage(Relation rel, Buffer ovflbuf)
     * return that buffer with a write lock.
     */
    if (BlockNumberIsValid(nextblkno))
-       return (_hash_getbuf(rel, nextblkno, HASH_WRITE));
+       return _hash_getbuf(rel, nextblkno, HASH_WRITE);
    else
-       return (InvalidBuffer);
+       return InvalidBuffer;
 }
 
 
@@ -455,7 +455,7 @@ _hash_initbitmap(Relation rel,
    /* write out the new bitmap page (releasing its locks) */
    _hash_wrtbuf(rel, buf);
 
-   return (0);
+   return 0;
 }
 
 
index ebac11ed12e0281b3abbaa24cb73aff68ff97493..dc3ad3727aaee1ded7467a0f283a8e74a3fcaf6b 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/access/hash/hashpage.c,v 1.16 1998/06/15 19:27:49 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/access/hash/hashpage.c,v 1.17 1998/09/01 03:20:58 momjian Exp $
  *
  * NOTES
  *   Postgres hash pages look like ordinary relation pages.  The opaque
@@ -204,7 +204,7 @@ _hash_getbuf(Relation rel, BlockNumber blkno, int access)
    buf = ReadBuffer(rel, blkno);
 
    /* ref count and lock type are correct */
-   return (buf);
+   return buf;
 }
 
 /*
@@ -288,7 +288,7 @@ _hash_chgbufaccess(Relation rel,
            break;
    }
    *bufp = _hash_getbuf(rel, blkno, to_access);
-   return (BufferGetPage(*bufp));
+   return BufferGetPage(*bufp);
 }
 
 /*
@@ -604,7 +604,7 @@ _hash_splitpage(Relation rel,
        /* hash on the tuple */
        hitem = (HashItem) PageGetItem(opage, PageGetItemId(opage, ooffnum));
        itup = &(hitem->hash_itup);
-       itupdesc = RelationGetTupleDescriptor(rel);
+       itupdesc = RelationGetDescr(rel);
        datum = index_getattr(itup, 1, itupdesc, &null);
        bucket = _hash_call(rel, metap, datum);
 
index ebc41220352b942568463cd4de0502c8e3144d37..add3971ac2794cf05929f6bf6d6990c3b51a5380 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/access/hash/hashscan.c,v 1.15 1998/08/19 02:01:04 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/access/hash/hashscan.c,v 1.16 1998/09/01 03:20:59 momjian Exp $
  *
  * NOTES
  *   Because we can be doing an index scan on a relation while we
@@ -153,13 +153,13 @@ _hash_scantouched(IndexScanDesc scan,
    if (ItemPointerIsValid(current)
        && ItemPointerGetBlockNumber(current) == blkno
        && ItemPointerGetOffsetNumber(current) >= offno)
-       return (true);
+       return true;
 
    current = &(scan->currentMarkData);
    if (ItemPointerIsValid(current)
        && ItemPointerGetBlockNumber(current) == blkno
        && ItemPointerGetOffsetNumber(current) >= offno)
-       return (true);
+       return true;
 
-   return (false);
+   return false;
 }
index a3d56190605736a59307623ef0ce55df4199eaa6..adb20353906e121d70f3057cefc8f2fbd0cc6d3f 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/access/hash/hashsearch.c,v 1.15 1998/06/15 19:27:50 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/access/hash/hashsearch.c,v 1.16 1998/09/01 03:21:01 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -107,7 +107,7 @@ _hash_next(IndexScanDesc scan, ScanDirection dir)
     * next tuple, we come back with a lock on that buffer.
     */
    if (!_hash_step(scan, &buf, dir, metabuf))
-       return ((RetrieveIndexResult) NULL);
+       return (RetrieveIndexResult) NULL;
 
    /* if we're here, _hash_step found a valid tuple */
    current = &(scan->currentItemData);
@@ -118,7 +118,7 @@ _hash_next(IndexScanDesc scan, ScanDirection dir)
    itup = &hitem->hash_itup;
    res = FormRetrieveIndexResult(current, &(itup->t_tid));
 
-   return (res);
+   return res;
 }
 
 static void
@@ -236,7 +236,7 @@ _hash_first(IndexScanDesc scan, ScanDirection dir)
            {
                _hash_relbuf(rel, buf, HASH_READ);
                _hash_relbuf(rel, metabuf, HASH_READ);
-               return ((RetrieveIndexResult) NULL);
+               return (RetrieveIndexResult) NULL;
            }
        }
    }
@@ -247,7 +247,7 @@ _hash_first(IndexScanDesc scan, ScanDirection dir)
    }
 
    if (!_hash_step(scan, &buf, dir, metabuf))
-       return ((RetrieveIndexResult) NULL);
+       return (RetrieveIndexResult) NULL;
 
    /* if we're here, _hash_step found a valid tuple */
    current = &(scan->currentItemData);
@@ -258,7 +258,7 @@ _hash_first(IndexScanDesc scan, ScanDirection dir)
    itup = &hitem->hash_itup;
    res = FormRetrieveIndexResult(current, &(itup->t_tid));
 
-   return (res);
+   return res;
 }
 
 /*
@@ -432,7 +432,7 @@ _hash_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir, Buffer metabuf)
            _hash_relbuf(rel, metabuf, HASH_READ);
            *bufP = so->hashso_curbuf = InvalidBuffer;
            ItemPointerSetInvalid(current);
-           return (false);
+           return false;
        }
 
        /* get ready to check this tuple */
@@ -445,5 +445,5 @@ _hash_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir, Buffer metabuf)
    blkno = BufferGetBlockNumber(buf);
    *bufP = so->hashso_curbuf = buf;
    ItemPointerSet(current, blkno, offnum);
-   return (true);
+   return true;
 }
index a3a3656d76f30d2cb4007b43f97d94d8554d05c7..8244184b949acaba1c7549ecd5f7d4a111b07a81 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/access/hash/Attic/hashstrat.c,v 1.11 1997/09/08 02:20:21 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/access/hash/Attic/hashstrat.c,v 1.12 1998/09/01 03:21:02 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -63,7 +63,7 @@ _hash_getstrat(Relation rel,
 
    Assert(StrategyNumberIsValid(strat));
 
-   return (strat);
+   return strat;
 }
 
 #endif
index 64c7233533b95372ccabc41541098507e21af8d2..fc6641f7a6aed897749716a3107553152fafff95 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/access/hash/hashutil.c,v 1.13 1998/01/07 21:01:16 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/access/hash/hashutil.c,v 1.14 1998/09/01 03:21:03 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -37,7 +37,7 @@ _hash_mkscankey(Relation rel, IndexTuple itup, HashMetaPage metap)
    bool        null;
 
    natts = rel->rd_rel->relnatts;
-   itupdesc = RelationGetTupleDescriptor(rel);
+   itupdesc = RelationGetDescr(rel);
 
    skey = (ScanKey) palloc(natts * sizeof(ScanKeyData));
 
@@ -49,7 +49,7 @@ _hash_mkscankey(Relation rel, IndexTuple itup, HashMetaPage metap)
                               0x0, (AttrNumber) (i + 1), proc, arg);
    }
 
-   return (skey);
+   return skey;
 }
 
 void
@@ -64,10 +64,10 @@ _hash_checkqual(IndexScanDesc scan, IndexTuple itup)
 {
    if (scan->numberOfKeys > 0)
        return (index_keytest(itup,
-                             RelationGetTupleDescriptor(scan->relation),
+                             RelationGetDescr(scan->relation),
                              scan->numberOfKeys, scan->keyData));
    else
-       return (true);
+       return true;
 }
 
 HashItem
@@ -89,7 +89,7 @@ _hash_formitem(IndexTuple itup)
    hitem = (HashItem) palloc(nbytes_hitem);
    memmove((char *) &(hitem->hash_itup), (char *) itup, tuplen);
 
-   return (hitem);
+   return hitem;
 }
 
 Bucket
@@ -104,7 +104,7 @@ _hash_call(Relation rel, HashMetaPage metap, Datum key)
    bucket = n & metap->hashm_highmask;
    if (bucket > metap->hashm_maxbucket)
        bucket = bucket & metap->hashm_lowmask;
-   return (bucket);
+   return bucket;
 }
 
 /*
@@ -119,7 +119,7 @@ _hash_log2(uint32 num)
    limit = 1;
    for (i = 0; limit < num; limit = limit << 1, i++)
        ;
-   return (i);
+   return i;
 }
 
 /*
index 45899d15d83c4bde02bb5f7a923206410f5c7833..bb98e2800cc771bd60eac2a8f234192145acc7c2 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.33 1998/08/20 22:07:30 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.34 1998/09/01 03:21:05 momjian Exp $
  *
  *
  * INTERFACE ROUTINES
@@ -194,7 +194,7 @@ unpinscan(HeapScanDesc scan)
 static int
 nextpage(int page, int dir)
 {
-   return ((dir < 0) ? page - 1 : page + 1);
+   return (dir < 0) ? page - 1 : page + 1;
 }
 
 /* ----------------
@@ -268,7 +268,7 @@ heapgettup(Relation relation,
     * ----------------
     */
    if (!(pages = relation->rd_nblocks))
-       return (NULL);
+       return NULL;
 
    /* ----------------
     *  calculate next starting lineoff, given scan direction
@@ -284,7 +284,7 @@ heapgettup(Relation relation,
        if (ItemPointerIsValid(tid) == false)
        {
            *buf= InvalidBuffer;
-           return (NULL);
+           return NULL;
        }
        *buf = RelationGetBufferWithBuffer(relation,
                                         ItemPointerGetBlockNumber(tid),
@@ -300,7 +300,7 @@ heapgettup(Relation relation,
        lpp = PageGetItemId(dp, lineoff);
 
        rtup = (HeapTuple) PageGetItem((Page) dp, lpp);
-       return (rtup);
+       return rtup;
 
    }
    else if (dir < 0)
@@ -322,7 +322,7 @@ heapgettup(Relation relation,
        if (page < 0)
        {
            *buf = InvalidBuffer;
-           return (NULL);
+           return NULL;
        }
 
        *buf = RelationGetBufferWithBuffer(relation, page, *buf);
@@ -366,7 +366,7 @@ heapgettup(Relation relation,
        if (page >= pages)
        {
            *buf = InvalidBuffer;
-           return (NULL);
+           return NULL;
        }
        /* page and lineoff now reference the physically next tid */
 
@@ -420,7 +420,7 @@ heapgettup(Relation relation,
                     */
                    ItemPointerSetBlockNumber(iptr, page);
                }
-               return (rtup);
+               return rtup;
            }
 
            /* ----------------
@@ -455,7 +455,7 @@ heapgettup(Relation relation,
            if (BufferIsValid(*buf))
                ReleaseBuffer(*buf);
            *buf = InvalidBuffer;
-           return (NULL);
+           return NULL;
        }
 
        *buf = ReleaseAndReadBuffer(*buf, relation, page);
@@ -526,7 +526,7 @@ heap_open(Oid relationId)
    if (RelationIsValid(r) && r->rd_rel->relkind == RELKIND_INDEX)
        elog(ERROR, "%s is an index relation", r->rd_rel->relname.data);
 
-   return (r);
+   return r;
 }
 
 /* ----------------
@@ -553,7 +553,7 @@ heap_openr(char *relationName)
    if (RelationIsValid(r) && r->rd_rel->relkind == RELKIND_INDEX)
        elog(ERROR, "%s is an index relation", r->rd_rel->relname.data);
 
-   return (r);
+   return r;
 }
 
 /* ----------------
@@ -646,7 +646,7 @@ heap_beginscan(Relation relation,
    scan->rs_snapshot = snapshot;
    scan->rs_nkeys = (short) nkeys;
 
-   return (scan);
+   return scan;
 }
 
 /* ----------------
@@ -806,7 +806,7 @@ heap_getnext(HeapScanDesc scandesc, int backw)
        {
            if (BufferIsValid(scan->rs_nbuf))
                ReleaseBuffer(scan->rs_nbuf);
-           return (NULL);
+           return NULL;
        }
 
        /*
@@ -871,7 +871,7 @@ heap_getnext(HeapScanDesc scandesc, int backw)
                ReleaseBuffer(scan->rs_nbuf);
            scan->rs_ntup = NULL;
            scan->rs_nbuf = InvalidBuffer;
-           return (NULL);
+           return NULL;
        }
 
        if (BufferIsValid(scan->rs_pbuf))
@@ -892,7 +892,7 @@ heap_getnext(HeapScanDesc scandesc, int backw)
            if (BufferIsValid(scan->rs_pbuf))
                ReleaseBuffer(scan->rs_pbuf);
            HEAPDEBUG_3;        /* heap_getnext returns NULL at end */
-           return (NULL);
+           return NULL;
        }
 
        /*
@@ -959,7 +959,7 @@ heap_getnext(HeapScanDesc scandesc, int backw)
            scan->rs_ptup = NULL;
            scan->rs_pbuf = InvalidBuffer;
            HEAPDEBUG_6;        /* heap_getnext returning EOS */
-           return (NULL);
+           return NULL;
        }
 
        if (BufferIsValid(scan->rs_nbuf))
@@ -1064,7 +1064,7 @@ heap_fetch(Relation relation,
    if (tuple == NULL)
    {
        ReleaseBuffer(buffer);
-       return (NULL);
+       return NULL;
    }
 
    /* ----------------
@@ -1076,7 +1076,7 @@ heap_fetch(Relation relation,
 
    *userbuf = buffer;  /* user is required to ReleaseBuffer() this */
 
-   return (tuple);
+   return tuple;
 }
 
 /* ----------------
@@ -1150,7 +1150,7 @@ heap_insert(Relation relation, HeapTuple tup)
        SetRefreshWhenInvalidate((bool) !ImmediateInvalidation);
    }
 
-   return (tup->t_oid);
+   return tup->t_oid;
 }
 
 /* ----------------
@@ -1213,7 +1213,7 @@ heap_delete(Relation relation, ItemPointer tid)
        if (IsSystemRelationName(RelationGetRelationName(relation)->data))
            RelationUnsetLockForWrite(relation);
        ReleaseBuffer(buf);
-       return (1);
+       return 1;
    }
    /* ----------------
     *  check that we're deleteing a valid item
@@ -1256,7 +1256,7 @@ heap_delete(Relation relation, ItemPointer tid)
    if (IsSystemRelationName(RelationGetRelationName(relation)->data))
        RelationUnsetLockForWrite(relation);
 
-   return (0);
+   return 0;
 }
 
 /* ----------------
@@ -1339,7 +1339,7 @@ heap_replace(Relation relation, ItemPointer otid, HeapTuple replace_tuple)
        if (IsSystemRelationName(RelationGetRelationName(relation)->data))
            RelationUnsetLockForWrite(relation);
        ReleaseBuffer(buffer);
-       return (1);
+       return 1;
    }
 
    /* ----------------
@@ -1411,7 +1411,7 @@ heap_replace(Relation relation, ItemPointer otid, HeapTuple replace_tuple)
    if (IsSystemRelationName(RelationGetRelationName(relation)->data))
        RelationUnsetLockForWrite(relation);
 
-   return (0);
+   return 0;
 }
 
 /* ----------------
index 59e2cb1b546d6245790009688407121a575c3a66..d4de95821878978f893b3fc0e6ab144701a81531 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/access/index/genam.c,v 1.13 1998/08/19 02:01:09 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/access/index/genam.c,v 1.14 1998/09/01 03:21:07 momjian Exp $
  *
  * NOTES
  *   many of the old access method routines have been turned into
@@ -123,7 +123,7 @@ RelationGetIndexScan(Relation relation,
 
    index_rescan(scan, scanFromEnd, key);
 
-   return (scan);
+   return scan;
 }
 
 #ifdef NOT_USED
index 3f3721341ac5eac5a370f125973d8522b1484343..fdfbddde91b88d1589d73af8f7326a30d3633098 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.23 1998/08/19 02:01:10 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.24 1998/09/01 03:21:09 momjian Exp $
  *
  * INTERFACE ROUTINES
  *     index_open      - open an index relation by relationId
@@ -207,7 +207,7 @@ index_insert(Relation relation,
     * ----------------
     */
 
-   return (specificResult);
+   return specificResult;
 }
 
 /* ----------------
@@ -366,14 +366,14 @@ index_getprocid(Relation irel,
 
    Assert(loc != NULL);
 
-   return (loc[(natts * (procnum - 1)) + (attnum - 1)]);
+   return loc[(natts * (procnum - 1)) + (attnum - 1)];
 }
 
 Datum
 GetIndexValue(HeapTuple tuple,
              TupleDesc hTupDesc,
              int attOff,
-             AttrNumber attrNums[],
+             AttrNumber *attrNums,
              FuncIndexInfo *fInfo,
              bool *attNull)
 {
index b4c6117069a6cfaa041b86f41e040843e8835b78..b92faa655f3661e485dce08e7bc33bac03a49eb9 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.26 1998/08/19 02:01:11 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.27 1998/09/01 03:21:10 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -74,7 +74,7 @@ StrategyMapGetScanKeyEntry(StrategyMap map,
 {
    Assert(StrategyMapIsValid(map));
    Assert(StrategyNumberIsValid(strategyNumber));
-   return (&map->entry[strategyNumber - 1]);
+   return &map->entry[strategyNumber - 1];
 }
 
 /*
@@ -515,7 +515,7 @@ OperatorRelationFillScanKeyEntry(Relation operatorRelation,
    }
 
    entry->sk_flags = 0;
-   entry->sk_procedure = ((OperatorTupleForm) GETSTRUCT(tuple))->oprcode;
+   entry->sk_procedure = ((Form_pg_operator) GETSTRUCT(tuple))->oprcode;
    fmgr_info(entry->sk_procedure, &entry->sk_func);
    entry->sk_nargs = entry->sk_func.fn_nargs;
 
@@ -578,13 +578,13 @@ IndexSupportInitialize(IndexStrategy indexStrategy,
 
    /*
     * XXX note that the following assumes the INDEX tuple is well formed
-    * and that the key[] and class[] are 0 terminated.
+    * and that the *key and *class are 0 terminated.
     */
    for (attributeIndex = 0; attributeIndex < maxAttributeNumber; attributeIndex++)
    {
-       IndexTupleForm iform;
+       Form_pg_index iform;
 
-       iform = (IndexTupleForm) GETSTRUCT(tuple);
+       iform = (Form_pg_index) GETSTRUCT(tuple);
 
        if (!OidIsValid(iform->indkey[attributeIndex]))
        {
index 45ec7b241deb54ee53ff4af8d7b6a84d8947d031..65db2d3e1acace5f204ab518b441ebcd235bc209 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtcompare.c,v 1.17 1998/08/19 02:01:13 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtcompare.c,v 1.18 1998/09/01 03:21:12 momjian Exp $
  *
  * NOTES
  *     These functions are stored in pg_amproc.  For each operator class
@@ -85,7 +85,7 @@ btoidcmp(Oid a, Oid b)
 }
 
 int32
-btoid8cmp(Oid a[], Oid b[])
+btoid8cmp(Oid *a, Oid *b)
 {
    int i;
    for (i=0; i < 8; i++)
index b575476ba8a66a62d8477b386d4c415e60ba3f65..f6a34e97acd526a4d69acc581fb5f46829c50060 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.28 1998/08/19 02:01:15 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.29 1998/09/01 03:21:13 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -104,7 +104,7 @@ _bt_doinsert(Relation rel, BTItem btitem, bool index_is_unique, Relation heapRel
            Buffer      nbuf;
            BlockNumber blkno;
 
-           itupdesc = RelationGetTupleDescriptor(rel);
+           itupdesc = RelationGetDescr(rel);
            nbuf = InvalidBuffer;
            opaque = (BTPageOpaque) PageGetSpecialPointer(page);
 
@@ -182,7 +182,7 @@ _bt_doinsert(Relation rel, BTItem btitem, bool index_is_unique, Relation heapRel
    _bt_freestack(stack);
    _bt_freeskey(itup_scankey);
 
-   return (res);
+   return res;
 }
 
 /*
@@ -301,7 +301,7 @@ _bt_insertonpg(Relation rel,
                                     keysz, scankey, stack->bts_btitem,
                                     NULL);
                ItemPointerSet(&(res->pointerData), itup_blkno, itup_off);
-               return (res);
+               return res;
            }
        }
        else
@@ -780,7 +780,7 @@ _bt_insertonpg(Relation rel,
    res = (InsertIndexResult) palloc(sizeof(InsertIndexResultData));
    ItemPointerSet(&(res->pointerData), itup_blkno, itup_off);
 
-   return (res);
+   return res;
 }
 
 /*
@@ -961,7 +961,7 @@ _bt_split(Relation rel, Buffer buf, OffsetNumber firstright)
    }
 
    /* split's done */
-   return (rbuf);
+   return rbuf;
 }
 
 /*
@@ -1045,7 +1045,7 @@ _bt_findsplitloc(Relation rel,
    if (saferight == maxoff && (maxoff - start) > 1)
        saferight = start + (maxoff - start) / 2;
 
-   return (saferight);
+   return saferight;
 }
 
 /*
@@ -1193,7 +1193,7 @@ _bt_pgaddtup(Relation rel,
    /* write the buffer, but hold our lock */
    _bt_wrtnorelbuf(rel, buf);
 
-   return (itup_off);
+   return itup_off;
 }
 
 /*
@@ -1227,7 +1227,7 @@ _bt_goesonpg(Relation rel,
    /* no right neighbor? */
    opaque = (BTPageOpaque) PageGetSpecialPointer(page);
    if (P_RIGHTMOST(opaque))
-       return (true);
+       return true;
 
    /*
     * this is a non-rightmost page, so it must have a high key item.
@@ -1237,7 +1237,7 @@ _bt_goesonpg(Relation rel,
     */
    hikey = PageGetItemId(page, P_HIKEY);
    if (_bt_skeycmp(rel, keysz, scankey, page, hikey, BTLessStrategyNumber))
-       return (true);
+       return true;
 
    /*
     * If the scan key is > the high key, then it for sure doesn't belong
@@ -1245,7 +1245,7 @@ _bt_goesonpg(Relation rel,
     */
 
    if (_bt_skeycmp(rel, keysz, scankey, page, hikey, BTGreaterStrategyNumber))
-       return (false);
+       return false;
 
    /*
     * If we have no adjacency information, and the item is equal to the
@@ -1258,14 +1258,14 @@ _bt_goesonpg(Relation rel,
    if (afteritem == (BTItem) NULL)
    {
        if (opaque->btpo_flags & BTP_LEAF)
-           return (false);
+           return false;
        if (opaque->btpo_flags & BTP_CHAIN)
-           return (true);
+           return true;
        if (_bt_skeycmp(rel, keysz, scankey, page,
                        PageGetItemId(page, P_FIRSTKEY),
                        BTEqualStrategyNumber))
-           return (true);
-       return (false);
+           return true;
+       return false;
    }
 
    /* damn, have to work for it.  i hate that. */
@@ -1293,7 +1293,7 @@ _bt_goesonpg(Relation rel,
        }
    }
 
-   return (found);
+   return found;
 }
 
 /*
@@ -1330,7 +1330,7 @@ _bt_itemcmp(Relation rel,
        strat = BTGreaterStrategyNumber;
    }
 
-   tupDes = RelationGetTupleDescriptor(rel);
+   tupDes = RelationGetDescr(rel);
    indexTuple1 = &(item1->bti_itup);
    indexTuple2 = &(item2->bti_itup);
 
@@ -1357,13 +1357,13 @@ _bt_itemcmp(Relation rel,
        if (compare)            /* true for one of ">, <, =" */
        {
            if (strat != BTEqualStrategyNumber)
-               return (true);
+               return true;
        }
        else
 /* false for one of ">, <, =" */
        {
            if (strat == BTEqualStrategyNumber)
-               return (false);
+               return false;
 
            /*
             * if original strat was "<=, >=" OR "<, >" but some
@@ -1379,10 +1379,10 @@ _bt_itemcmp(Relation rel,
                if (compare)    /* item1' and item2' attributes are equal */
                    continue;   /* - try to compare next attributes */
            }
-           return (false);
+           return false;
        }
    }
-   return (true);
+   return true;
 }
 
 /*
@@ -1475,15 +1475,15 @@ _bt_isequal(TupleDesc itupdesc, Page page, OffsetNumber offnum,
 
        /* NULLs are not equal */
        if (entry->sk_flags & SK_ISNULL || null)
-           return (false);
+           return false;
 
        result = (long) FMGR_PTR2(&entry->sk_func, entry->sk_argument, datum);
        if (result != 0)
-           return (false);
+           return false;
    }
 
    /* by here, the keys are equal */
-   return (true);
+   return true;
 }
 
 #ifdef NOT_USED
@@ -1621,7 +1621,7 @@ _bt_shift(Relation rel, Buffer buf, BTStack stack, int keysz,
 
    ItemPointerSet(&(res->pointerData), nbknum, P_HIKEY);
 
-   return (res);
+   return res;
 }
 
 #endif
index 1d71416655886a81e34f1a6145dd0579ad223342..223efc5c91e1c3fda2125fde3b636d9af693802a 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.15 1998/01/07 21:01:53 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.16 1998/09/01 03:21:14 momjian Exp $
  *
  * NOTES
  *    Postgres btree pages look like ordinary relation pages.  The opaque
@@ -274,7 +274,7 @@ _bt_getroot(Relation rel, int access)
             */
 
            _bt_relbuf(rel, metabuf, BT_WRITE);
-           return (_bt_getroot(rel, access));
+           return _bt_getroot(rel, access);
        }
    }
    else
@@ -298,7 +298,7 @@ _bt_getroot(Relation rel, int access)
 
        /* it happened, try again */
        _bt_relbuf(rel, rootbuf, access);
-       return (_bt_getroot(rel, access));
+       return _bt_getroot(rel, access);
    }
 
    /*
@@ -307,7 +307,7 @@ _bt_getroot(Relation rel, int access)
     * Return the root block.
     */
 
-   return (rootbuf);
+   return rootbuf;
 }
 
 /*
@@ -350,7 +350,7 @@ _bt_getbuf(Relation rel, BlockNumber blkno, int access)
    }
 
    /* ref count and lock type are correct */
-   return (buf);
+   return buf;
 }
 
 /*
@@ -505,7 +505,7 @@ _bt_getstackbuf(Relation rel, BTStack stack, int access)
            item_save = (BTItem) palloc(item_nbytes);
            memmove((char *) item_save, (char *) item, item_nbytes);
            stack->bts_btitem = item_save;
-           return (buf);
+           return buf;
        }
 
        /* if the item has just moved right on this page, we're done */
@@ -525,7 +525,7 @@ _bt_getstackbuf(Relation rel, BTStack stack, int access)
                item_save = (BTItem) palloc(item_nbytes);
                memmove((char *) item_save, (char *) item, item_nbytes);
                stack->bts_btitem = item_save;
-               return (buf);
+               return buf;
            }
        }
    }
@@ -562,7 +562,7 @@ _bt_getstackbuf(Relation rel, BTStack stack, int access)
                item_save = (BTItem) palloc(item_nbytes);
                memmove((char *) item_save, (char *) item, item_nbytes);
                stack->bts_btitem = item_save;
-               return (buf);
+               return buf;
            }
        }
    }
index 582988c1b07eec50f01a4b0ee773027defad776c..082cfe36283aa9a14d792f3487f9509d0bd36f87 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.30 1998/08/25 21:33:56 scrappy Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.31 1998/09/01 03:21:16 momjian Exp $
  *
  * NOTES
  *   This file contains only the public interface routines.
@@ -119,8 +119,8 @@ btbuild(Relation heap,
        _bt_metapinit(index);
 
    /* get tuple descriptors for heap and index relations */
-   htupdesc = RelationGetTupleDescriptor(heap);
-   itupdesc = RelationGetTupleDescriptor(index);
+   htupdesc = RelationGetDescr(heap);
+   itupdesc = RelationGetDescr(index);
 
    /* get space for data items that'll appear in the index tuple */
    attdata = (Datum *) palloc(natts * sizeof(Datum));
@@ -355,13 +355,14 @@ btinsert(Relation rel, Datum *datum, char *nulls, ItemPointer ht_ctid, Relation
    InsertIndexResult res;
 
    /* generate an index tuple */
-   itup = index_formtuple(RelationGetTupleDescriptor(rel), datum, nulls);
+   itup = index_formtuple(RelationGetDescr(rel), datum, nulls);
    itup->t_tid = *ht_ctid;
 
    /*
     * See comments in btbuild.
     *
-    * if (itup->t_info & INDEX_NULL_MASK) return ((InsertIndexResult) NULL);
+    * if (itup->t_info & INDEX_NULL_MASK)
+           return (InsertIndexResult) NULL;
     */
 
    btitem = _bt_formitem(itup);
@@ -377,7 +378,7 @@ btinsert(Relation rel, Datum *datum, char *nulls, ItemPointer ht_ctid, Relation
    _bt_adjscans(rel, &(res->pointerData), BT_INSERT);
 #endif
 
-   return (res);
+   return res;
 }
 
 /*
@@ -417,7 +418,7 @@ btgettuple(IndexScanDesc scan, ScanDirection dir)
    if (res)
        ((BTScanOpaque)scan->opaque)->curHeapIptr = res->heap_iptr;
    
-   return ((char *) res);
+   return (char *) res;
 }
 
 /*
@@ -434,7 +435,7 @@ btbeginscan(Relation rel, bool fromEnd, uint16 keysz, ScanKey scankey)
    /* register scan in case we change pages it's using */
    _bt_regscan(scan);
 
-   return ((char *) scan);
+   return (char *) scan;
 }
 
 /*
index b6566e936a9a023599a5afbc16115951836899ca..11b765937650120e6de9de71f6b614df9fcda977 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.16 1998/08/19 02:01:17 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.17 1998/09/01 03:21:17 momjian Exp $
  *
  *
  * NOTES
@@ -231,13 +231,13 @@ _bt_scantouched(IndexScanDesc scan, BlockNumber blkno, OffsetNumber offno)
    if (ItemPointerIsValid(current)
        && ItemPointerGetBlockNumber(current) == blkno
        && ItemPointerGetOffsetNumber(current) >= offno)
-       return (true);
+       return true;
 
    current = &(scan->currentMarkData);
    if (ItemPointerIsValid(current)
        && ItemPointerGetBlockNumber(current) == blkno
        && ItemPointerGetOffsetNumber(current) >= offno)
-       return (true);
+       return true;
 
-   return (false);
+   return false;
 }
index 633a310ea1a98bc06a20fcb84f953bb753d80c67..8584f2058757df9913f7bc7c056af9d7dee9090d 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.36 1998/06/15 19:27:58 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.37 1998/09/01 03:21:18 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -52,7 +52,7 @@ BTStack
 _bt_search(Relation rel, int keysz, ScanKey scankey, Buffer *bufP)
 {
    *bufP = _bt_getroot(rel, BT_READ);
-   return (_bt_searchr(rel, keysz, scankey, bufP, (BTStack) NULL));
+   return _bt_searchr(rel, keysz, scankey, bufP, (BTStack) NULL);
 }
 
 /*
@@ -81,7 +81,7 @@ _bt_searchr(Relation rel,
    page = BufferGetPage(*bufP);
    opaque = (BTPageOpaque) PageGetSpecialPointer(page);
    if (opaque->btpo_flags & BTP_LEAF)
-       return (stack_in);
+       return stack_in;
 
    /*
     * Find the appropriate item on the internal page, and get the child
@@ -127,7 +127,7 @@ _bt_searchr(Relation rel,
    *bufP = _bt_moveright(rel, *bufP, keysz, scankey, BT_READ);
 
    /* okay, all set to move down a level */
-   return (_bt_searchr(rel, keysz, scankey, bufP, stack));
+   return _bt_searchr(rel, keysz, scankey, bufP, stack);
 }
 
 /*
@@ -166,7 +166,7 @@ _bt_moveright(Relation rel,
 
    /* if we're on a rightmost page, we don't need to move right */
    if (P_RIGHTMOST(opaque))
-       return (buf);
+       return buf;
 
    /* by convention, item 0 on non-rightmost pages is the high key */
    hikey = PageGetItemId(page, P_HIKEY);
@@ -252,7 +252,7 @@ _bt_moveright(Relation rel,
                 && _bt_skeycmp(rel, keysz, scankey, page, hikey,
                                BTGreaterEqualStrategyNumber));
    }
-   return (buf);
+   return buf;
 }
 
 /*
@@ -300,7 +300,7 @@ _bt_skeycmp(Relation rel,
    item = (BTItem) PageGetItem(page, itemid);
    indexTuple = &(item->bti_itup);
 
-   tupDes = RelationGetTupleDescriptor(rel);
+   tupDes = RelationGetDescr(rel);
 
    /* see if the comparison is true for all of the key attributes */
    for (i = 1; i <= keysz; i++)
@@ -338,13 +338,13 @@ _bt_skeycmp(Relation rel,
        if (compare)            /* true for one of ">, <, =" */
        {
            if (strat != BTEqualStrategyNumber)
-               return (true);
+               return true;
        }
        else
 /* false for one of ">, <, =" */
        {
            if (strat == BTEqualStrategyNumber)
-               return (false);
+               return false;
 
            /*
             * if original strat was "<=, >=" OR "<, >" but some
@@ -360,11 +360,11 @@ _bt_skeycmp(Relation rel,
                if (compare)    /* key' and item' attributes are equal */
                    continue;   /* - try to compare next attributes */
            }
-           return (false);
+           return false;
        }
    }
 
-   return (true);
+   return true;
 }
 
 /*
@@ -397,7 +397,7 @@ _bt_binsrch(Relation rel,
    int         natts = rel->rd_rel->relnatts;
    int         result;
 
-   itupdesc = RelationGetTupleDescriptor(rel);
+   itupdesc = RelationGetDescr(rel);
    page = BufferGetPage(buf);
    opaque = (BTPageOpaque) PageGetSpecialPointer(page);
 
@@ -416,17 +416,17 @@ _bt_binsrch(Relation rel,
     */
 
    if (PageIsEmpty(page))
-       return (low);
+       return low;
    if ((!P_RIGHTMOST(opaque) && high <= low))
    {
        if (high < low ||
            (srchtype == BT_DESCENT && !(opaque->btpo_flags & BTP_LEAF)))
-           return (low);
+           return low;
        /* It's insertion and high == low == 2 */
        result = _bt_compare(rel, itupdesc, page, keysz, scankey, low);
        if (result > 0)
-           return (OffsetNumberNext(low));
-       return (low);
+           return OffsetNumberNext(low);
+       return low;
    }
 
    while ((high - low) > 1)
@@ -454,11 +454,11 @@ _bt_binsrch(Relation rel,
             * code (natts == keysz).          - vadim 04/15/97
             */
            if (natts == keysz || opaque->btpo_flags & BTP_LEAF)
-               return (mid);
+               return mid;
            low = P_RIGHTMOST(opaque) ? P_HIKEY : P_FIRSTKEY;
            if (mid == low)
-               return (mid);
-           return (OffsetNumberPrev(mid));
+               return mid;
+           return OffsetNumberPrev(mid);
        }
    }
 
@@ -490,33 +490,33 @@ _bt_binsrch(Relation rel,
             * comments above for multi-column indices.
             */
            if (natts == keysz)
-               return (mid);
+               return mid;
            low = P_RIGHTMOST(opaque) ? P_HIKEY : P_FIRSTKEY;
            if (mid == low)
-               return (mid);
-           return (OffsetNumberPrev(mid));
+               return mid;
+           return OffsetNumberPrev(mid);
        }
        else if (result > 0)
-           return (high);
+           return high;
        else
-           return (low);
+           return low;
    }
    else
 /* we want the first key >= the scan key */
    {
        result = _bt_compare(rel, itupdesc, page, keysz, scankey, low);
        if (result <= 0)
-           return (low);
+           return low;
        else
        {
            if (low == high)
-               return (OffsetNumberNext(low));
+               return OffsetNumberNext(low);
 
            result = _bt_compare(rel, itupdesc, page, keysz, scankey, high);
            if (result <= 0)
-               return (high);
+               return high;
            else
-               return (OffsetNumberNext(high));
+               return OffsetNumberNext(high);
        }
    }
 }
@@ -543,7 +543,7 @@ _bt_firsteq(Relation rel,
                          keysz, scankey, OffsetNumberPrev(offnum)) == 0)
        offnum = OffsetNumberPrev(offnum);
 
-   return (offnum);
+   return offnum;
 }
 
 /*
@@ -630,8 +630,8 @@ _bt_compare(Relation rel,
 
        if (_bt_skeycmp(rel, keysz, scankey, page, itemid,
                        BTEqualStrategyNumber))
-           return (0);
-       return (1);
+           return 0;
+       return 1;
 #endif
    }
 
@@ -675,11 +675,11 @@ _bt_compare(Relation rel,
 
        /* if the keys are unequal, return the difference */
        if (result != 0)
-           return (result);
+           return result;
    }
 
    /* by here, the keys are equal */
-   return (0);
+   return 0;
 }
 
 /*
@@ -726,7 +726,7 @@ _bt_next(IndexScanDesc scan, ScanDirection dir)
    {
        /* step one tuple in the appropriate direction */
        if (!_bt_step(scan, &buf, dir))
-           return ((RetrieveIndexResult) NULL);
+           return (RetrieveIndexResult) NULL;
 
        /* by here, current is the tuple we want to return */
        offnum = ItemPointerGetOffsetNumber(current);
@@ -741,7 +741,7 @@ _bt_next(IndexScanDesc scan, ScanDirection dir)
 
            /* remember which buffer we have pinned and locked */
            so->btso_curbuf = buf;
-           return (res);
+           return res;
        }
 
    } while (keysok >= so->numberOfFirstKeys);
@@ -750,7 +750,7 @@ _bt_next(IndexScanDesc scan, ScanDirection dir)
    so->btso_curbuf = InvalidBuffer;
    _bt_relbuf(rel, buf, BT_READ);
 
-   return ((RetrieveIndexResult) NULL);
+   return (RetrieveIndexResult) NULL;
 }
 
 /*
@@ -812,13 +812,13 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
        scan->scanFromEnd = true;
 
    if (so->qual_ok == 0)
-       return ((RetrieveIndexResult) NULL);
+       return (RetrieveIndexResult) NULL;
 
    /* if we just need to walk down one edge of the tree, do that */
    if (scan->scanFromEnd)
-       return (_bt_endpoint(scan, dir));
+       return _bt_endpoint(scan, dir);
 
-   itupdesc = RelationGetTupleDescriptor(rel);
+   itupdesc = RelationGetDescr(rel);
    current = &(scan->currentItemData);
 
    /*
@@ -831,7 +831,7 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
    if (so->keyData[0].sk_flags & SK_ISNULL)
    {
        elog(ERROR, "_bt_first: btree doesn't support is(not)null, yet");
-       return ((RetrieveIndexResult) NULL);
+       return (RetrieveIndexResult) NULL;
    }
    proc = index_getprocid(rel, 1, BTORDER_PROC);
    ScanKeyEntryInitialize(&skdata, so->keyData[0].sk_flags, 1, proc,
@@ -855,7 +855,7 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
        ItemPointerSetInvalid(current);
        so->btso_curbuf = InvalidBuffer;
        _bt_relbuf(rel, buf, BT_READ);
-       return ((RetrieveIndexResult) NULL);
+       return (RetrieveIndexResult) NULL;
    }
    maxoff = PageGetMaxOffsetNumber(page);
    pop = (BTPageOpaque) PageGetSpecialPointer(page);
@@ -881,7 +881,7 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
            ItemPointerSetInvalid(current);
            so->btso_curbuf = InvalidBuffer;
            _bt_relbuf(rel, buf, BT_READ);
-           return ((RetrieveIndexResult) NULL);
+           return (RetrieveIndexResult) NULL;
        }
        maxoff = PageGetMaxOffsetNumber(page);
        pop = (BTPageOpaque) PageGetSpecialPointer(page);
@@ -955,7 +955,7 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
                _bt_relbuf(scan->relation, buf, BT_READ);
                so->btso_curbuf = InvalidBuffer;
                ItemPointerSetInvalid(&(scan->currentItemData));
-               return ((RetrieveIndexResult) NULL);
+               return (RetrieveIndexResult) NULL;
            }
            break;
 
@@ -970,7 +970,7 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
                        _bt_relbuf(scan->relation, buf, BT_READ);
                        so->btso_curbuf = InvalidBuffer;
                        ItemPointerSetInvalid(&(scan->currentItemData));
-                       return ((RetrieveIndexResult) NULL);
+                       return (RetrieveIndexResult) NULL;
                    }
                }
                else if (result > 0)
@@ -1035,7 +1035,7 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
    else if (keysok >= so->numberOfFirstKeys)
    {
        so->btso_curbuf = buf;
-       return (_bt_next(scan, dir));
+       return _bt_next(scan, dir);
    }
    else
    {
@@ -1045,7 +1045,7 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
        res = (RetrieveIndexResult) NULL;
    }
 
-   return (res);
+   return res;
 }
 
 /*
@@ -1093,7 +1093,7 @@ _bt_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir)
                _bt_relbuf(rel, *bufP, BT_READ);
                ItemPointerSetInvalid(current);
                *bufP = so->btso_curbuf = InvalidBuffer;
-               return (false);
+               return false;
            }
            else
            {
@@ -1118,7 +1118,7 @@ _bt_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir)
                        {
                            *bufP = so->btso_curbuf = InvalidBuffer;
                            ItemPointerSetInvalid(current);
-                           return (false);
+                           return false;
                        }
                    }
                }
@@ -1144,7 +1144,7 @@ _bt_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir)
                _bt_relbuf(rel, *bufP, BT_READ);
                *bufP = so->btso_curbuf = InvalidBuffer;
                ItemPointerSetInvalid(current);
-               return (false);
+               return false;
            }
            else
            {
@@ -1192,7 +1192,7 @@ _bt_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir)
                        {
                            *bufP = so->btso_curbuf = InvalidBuffer;
                            ItemPointerSetInvalid(current);
-                           return (false);
+                           return false;
                        }
                    }
                }
@@ -1204,7 +1204,7 @@ _bt_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir)
    so->btso_curbuf = *bufP;
    ItemPointerSet(current, blkno, offnum);
 
-   return (true);
+   return true;
 }
 
 /*
@@ -1252,19 +1252,19 @@ _bt_twostep(IndexScanDesc scan, Buffer *bufP, ScanDirection dir)
    if (ScanDirectionIsForward(dir) && offnum < maxoff)
    {                           /* XXX PageIsEmpty? */
        ItemPointerSet(current, blkno, OffsetNumberNext(offnum));
-       return (true);
+       return true;
    }
    else if (ScanDirectionIsBackward(dir) && offnum > start)
    {
        ItemPointerSet(current, blkno, OffsetNumberPrev(offnum));
-       return (true);
+       return true;
    }
 
    /* if we've hit end of scan we don't have to do any work */
    if (ScanDirectionIsForward(dir) && P_RIGHTMOST(opaque))
-       return (false);
+       return false;
    else if (ScanDirectionIsBackward(dir) && P_LEFTMOST(opaque))
-       return (false);
+       return false;
 
    /*
     * Okay, it's off the page; let _bt_step() do the hard work, and we'll
@@ -1283,7 +1283,7 @@ _bt_twostep(IndexScanDesc scan, Buffer *bufP, ScanDirection dir)
    if (_bt_step(scan, bufP, dir))
    {
        pfree(svitem);
-       return (true);
+       return true;
    }
 
    /* try to find our place again */
@@ -1299,7 +1299,7 @@ _bt_twostep(IndexScanDesc scan, Buffer *bufP, ScanDirection dir)
        {
            pfree(svitem);
            ItemPointerSet(current, blkno, offnum);
-           return (false);
+           return false;
        }
    }
 
@@ -1312,7 +1312,7 @@ _bt_twostep(IndexScanDesc scan, Buffer *bufP, ScanDirection dir)
 
    elog(ERROR, "btree synchronization error:  concurrent update botched scan");
 
-   return (false);
+   return false;
 }
 
 /*
@@ -1406,7 +1406,7 @@ _bt_endpoint(IndexScanDesc scan, ScanDirection dir)
        {
            ItemPointerSet(current, blkno, maxoff);
            if (!_bt_step(scan, &buf, BackwardScanDirection))
-               return ((RetrieveIndexResult) NULL);
+               return (RetrieveIndexResult) NULL;
 
            start = ItemPointerGetOffsetNumber(current);
            page = BufferGetPage(buf);
@@ -1424,13 +1424,13 @@ _bt_endpoint(IndexScanDesc scan, ScanDirection dir)
            _bt_relbuf(rel, buf, BT_READ);
            ItemPointerSetInvalid(current);
            so->btso_curbuf = InvalidBuffer;
-           return ((RetrieveIndexResult) NULL);
+           return (RetrieveIndexResult) NULL;
        }
        if (start > maxoff)     /* start == 2 && maxoff == 1 */
        {
            ItemPointerSet(current, blkno, maxoff);
            if (!_bt_step(scan, &buf, ForwardScanDirection))
-               return ((RetrieveIndexResult) NULL);
+               return (RetrieveIndexResult) NULL;
 
            start = ItemPointerGetOffsetNumber(current);
            page = BufferGetPage(buf);
@@ -1452,7 +1452,7 @@ _bt_endpoint(IndexScanDesc scan, ScanDirection dir)
        {
            ItemPointerSet(current, blkno, FirstOffsetNumber);
            if (!_bt_step(scan, &buf, ForwardScanDirection))
-               return ((RetrieveIndexResult) NULL);
+               return (RetrieveIndexResult) NULL;
 
            start = ItemPointerGetOffsetNumber(current);
            page = BufferGetPage(buf);
@@ -1466,12 +1466,12 @@ _bt_endpoint(IndexScanDesc scan, ScanDirection dir)
                _bt_relbuf(rel, buf, BT_READ);
                ItemPointerSetInvalid(current);
                so->btso_curbuf = InvalidBuffer;
-               return ((RetrieveIndexResult) NULL);
+               return (RetrieveIndexResult) NULL;
            }
            /* Go back ! */
            ItemPointerSet(current, blkno, FirstOffsetNumber);
            if (!_bt_step(scan, &buf, BackwardScanDirection))
-               return ((RetrieveIndexResult) NULL);
+               return (RetrieveIndexResult) NULL;
 
            start = ItemPointerGetOffsetNumber(current);
            page = BufferGetPage(buf);
@@ -1500,7 +1500,7 @@ _bt_endpoint(IndexScanDesc scan, ScanDirection dir)
    else if (keysok >= so->numberOfFirstKeys)
    {
        so->btso_curbuf = buf;
-       return (_bt_next(scan, dir));
+       return _bt_next(scan, dir);
    }
    else
    {
@@ -1510,5 +1510,5 @@ _bt_endpoint(IndexScanDesc scan, ScanDirection dir)
        res = (RetrieveIndexResult) NULL;
    }
 
-   return (res);
+   return res;
 }
index 404653f8e9c92d066013e2c17e48ee7438fad144..5fb3145c36c0c24845411dc609ef9a01bc632bba 100644 (file)
@@ -5,7 +5,7 @@
  *
  *
  * IDENTIFICATION
- *   $Id: nbtsort.c,v 1.31 1998/08/25 21:33:57 scrappy Exp $
+ *   $Id: nbtsort.c,v 1.32 1998/09/01 03:21:19 momjian Exp $
  *
  * NOTES
  *
@@ -180,11 +180,11 @@ _bt_isortcmp(BTSortKey *k1, BTSortKey *k2)
    if (k1->btsk_item == (BTItem) NULL)
    {
        if (k2->btsk_item == (BTItem) NULL)
-           return (0);         /* 1 = 2 */
-       return (1);             /* 1 > 2 */
+           return 0;           /* 1 = 2 */
+       return 1;               /* 1 > 2 */
    }
    else if (k2->btsk_item == (BTItem) NULL)
-       return (-1);            /* 1 < 2 */
+       return -1;          /* 1 < 2 */
 
    for (i = 0; i < _bt_nattr; i++)
    {
@@ -195,17 +195,17 @@ _bt_isortcmp(BTSortKey *k1, BTSortKey *k2)
                equal_isnull = true;
                continue;
            }
-           return (1);         /* NULL ">" NOT_NULL */
+           return 1;           /* NULL ">" NOT_NULL */
        }
        else if (k2_nulls[i] != ' ')    /* k2 attr is NULL */
-           return (-1);        /* NOT_NULL "<" NULL */
+           return -1;      /* NOT_NULL "<" NULL */
 
        if (_bt_invokestrat(_bt_sortrel, i + 1, BTGreaterStrategyNumber,
                            k1_datum[i], k2_datum[i]))
-           return (1);         /* 1 > 2 */
+           return 1;           /* 1 > 2 */
        else if (_bt_invokestrat(_bt_sortrel, i + 1, BTGreaterStrategyNumber,
                                 k2_datum[i], k1_datum[i]))
-           return (-1);        /* 1 < 2 */
+           return -1;      /* 1 < 2 */
    }
 
    if (_bt_inspool->isunique && !equal_isnull)
@@ -213,7 +213,7 @@ _bt_isortcmp(BTSortKey *k1, BTSortKey *k2)
        _bt_spooldestroy((void *) _bt_inspool);
        elog(ERROR, "Cannot create unique index. Table contains non-unique values");
    }
-   return (0);                 /* 1 = 2 */
+   return 0;                   /* 1 = 2 */
 }
 
 static void
@@ -307,17 +307,17 @@ _bt_pqnext(BTPriQueue *q, BTPriQueueElem *e)
 {
    if (q->btpq_nelem < 1)
    {                           /* already empty */
-       return (-1);
+       return -1;
    }
    *e = q->btpq_queue[0];      /* struct = */
 
    if (--q->btpq_nelem < 1)
    {                           /* now empty, don't sift */
-       return (0);
+       return 0;
    }
    q->btpq_queue[0] = q->btpq_queue[q->btpq_nelem];    /* struct = */
    _bt_pqsift(q, 0);
-   return (0);
+   return 0;
 }
 
 static void
@@ -426,7 +426,7 @@ _bt_tapecreate(char *fname)
    /* initialize the buffer */
    _bt_tapereset(tape);
 
-   return (tape);
+   return tape;
 }
 
 /*
@@ -468,7 +468,7 @@ _bt_taperead(BTTapeBlock *tape)
 
    if (tape->bttb_eor)
    {
-       return (0);             /* we are already at End-Of-Run */
+       return 0;               /* we are already at End-Of-Run */
    }
 
    /*
@@ -482,11 +482,11 @@ _bt_taperead(BTTapeBlock *tape)
    if (nread != TAPEBLCKSZ)
    {
        Assert(nread == 0);     /* we are at EOF */
-       return (0);
+       return 0;
    }
    Assert(tape->bttb_magic == BTTAPEMAGIC);
    NDirectFileRead += TAPEBLCKSZ / BLCKSZ;
-   return (1);
+   return 1;
 }
 
 /*
@@ -506,11 +506,11 @@ _bt_tapenext(BTTapeBlock *tape, char **pos)
    BTItem      bti;
 
    if (*pos >= tape->bttb_data + tape->bttb_top)
-       return ((BTItem) NULL);
+       return (BTItem) NULL;
    bti = (BTItem) *pos;
    itemsz = BTITEMSZ(bti);
    *pos += DOUBLEALIGN(itemsz);
-   return (bti);
+   return bti;
 }
 
 /*
@@ -574,7 +574,7 @@ _bt_spoolinit(Relation index, int ntapes, bool isunique)
 
    _bt_isortcmpinit(index, btspool);
 
-   return ((void *) btspool);
+   return (void *) btspool;
 }
 
 /*
@@ -838,7 +838,7 @@ _bt_pagestate(Relation index, int flags, int level, bool doupper)
    state->btps_level = level;
    state->btps_doupper = doupper;
 
-   return ((void *) state);
+   return (void *) state;
 }
 
 /*
@@ -859,7 +859,7 @@ _bt_minitem(Page opage, BlockNumber oblkno, int atend)
    nbti = _bt_formitem(&(obti->bti_itup));
    ItemPointerSet(&(nbti->bti_itup.t_tid), oblkno, P_HIKEY);
 
-   return (nbti);
+   return nbti;
 }
 
 /*
@@ -1074,7 +1074,7 @@ _bt_buildadd(Relation index, void *pstate, BTItem bti, int flags)
    state->btps_lastoff = last_off;
    state->btps_firstoff = first_off;
 
-   return (last_bti);
+   return last_bti;
 }
 
 static void
index 6af9df2b65ab512f1f41c64af3a4e7ae5f6a4f8b..3d155aa164b665904c9d902d9c2d7b343016d9b9 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtstrat.c,v 1.6 1997/09/08 02:20:59 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtstrat.c,v 1.7 1998/09/01 03:21:21 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -115,7 +115,7 @@ _bt_getstrat(Relation rel,
 
    Assert(StrategyNumberIsValid(strat));
 
-   return (strat);
+   return strat;
 }
 
 bool
index f8a8e860dc3a064b685efcb55a791cd4ece3005d..30baab1e9f507b18e185ebdc6407806bc3d69563 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.21 1998/08/19 02:01:18 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.22 1998/09/01 03:21:23 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -44,7 +44,7 @@ _bt_mkscankey(Relation rel, IndexTuple itup)
    bits16      flag;
 
    natts = rel->rd_rel->relnatts;
-   itupdesc = RelationGetTupleDescriptor(rel);
+   itupdesc = RelationGetDescr(rel);
 
    skey = (ScanKey) palloc(natts * sizeof(ScanKeyData));
 
@@ -64,7 +64,7 @@ _bt_mkscankey(Relation rel, IndexTuple itup)
        ScanKeyEntryInitialize(&skey[i], flag, (AttrNumber) (i + 1), proc, arg);
    }
 
-   return (skey);
+   return skey;
 }
 
 void
@@ -306,7 +306,7 @@ _bt_formitem(IndexTuple itup)
 #ifndef BTREE_VERSION_1
    btitem->bti_oid = newoid();
 #endif
-   return (btitem);
+   return btitem;
 }
 
 #ifdef NOT_USED
@@ -317,10 +317,10 @@ _bt_checkqual(IndexScanDesc scan, IndexTuple itup)
 
    so = (BTScanOpaque) scan->opaque;
    if (so->numberOfKeys > 0)
-       return (index_keytest(itup, RelationGetTupleDescriptor(scan->relation),
+       return (index_keytest(itup, RelationGetDescr(scan->relation),
                              so->numberOfKeys, so->keyData));
    else
-       return (true);
+       return true;
 }
 
 #endif
@@ -333,10 +333,10 @@ _bt_checkforkeys(IndexScanDesc scan, IndexTuple itup, Size keysz)
 
    so = (BTScanOpaque) scan->opaque;
    if (keysz > 0 && so->numberOfKeys >= keysz)
-       return (index_keytest(itup, RelationGetTupleDescriptor(scan->relation),
+       return (index_keytest(itup, RelationGetDescr(scan->relation),
                              keysz, so->keyData));
    else
-       return (true);
+       return true;
 }
 
 #endif
@@ -354,10 +354,10 @@ _bt_checkkeys(IndexScanDesc scan, IndexTuple tuple, Size *keysok)
 
    *keysok = 0;
    if (keysz == 0)
-       return (true);
+       return true;
 
    key = so->keyData;
-   tupdesc = RelationGetTupleDescriptor(scan->relation);
+   tupdesc = RelationGetDescr(scan->relation);
 
    IncrIndexProcessed();
 
@@ -370,7 +370,7 @@ _bt_checkkeys(IndexScanDesc scan, IndexTuple tuple, Size *keysok)
 
        /* btree doesn't support 'A is null' clauses, yet */
        if (isNull || key[0].sk_flags & SK_ISNULL)
-           return (false);
+           return false;
 
        if (key[0].sk_flags & SK_COMMUTE)
        {
@@ -386,12 +386,12 @@ _bt_checkkeys(IndexScanDesc scan, IndexTuple tuple, Size *keysok)
        }
 
        if (!test == !(key[0].sk_flags & SK_NEGATE))
-           return (false);
+           return false;
 
        keysz -= 1;
        key++;
        (*keysok)++;
    }
 
-   return (true);
+   return true;
 }
index eb9d43943edb51237a17972701ec6a9ebd0e1387..644240e6504b54be72c1bf488224cf9915ab9784 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtget.c,v 1.10 1998/06/15 19:28:00 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtget.c,v 1.11 1998/09/01 03:21:24 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -43,14 +43,14 @@ rtgettuple(IndexScanDesc s, ScanDirection dir)
 
    /* if we have it cached in the scan desc, just return the value */
    if ((res = rtscancache(s, dir)) != (RetrieveIndexResult) NULL)
-       return (res);
+       return res;
 
    /* not cached, so we'll have to do some work */
    if (ItemPointerIsValid(&(s->currentItemData)))
        res = rtnext(s, dir);
    else
        res = rtfirst(s, dir);
-   return (res);
+   return res;
 }
 
 static RetrieveIndexResult
@@ -85,7 +85,7 @@ rtfirst(IndexScanDesc s, ScanDirection dir)
 
            ReleaseBuffer(b);
            if (so->s_stack == (RTSTACK *) NULL)
-               return ((RetrieveIndexResult) NULL);
+               return (RetrieveIndexResult) NULL;
 
            stk = so->s_stack;
            b = ReadBuffer(s->relation, stk->rts_blk);
@@ -111,7 +111,7 @@ rtfirst(IndexScanDesc s, ScanDirection dir)
            res = FormRetrieveIndexResult(&(s->currentItemData), &(it->t_tid));
 
            ReleaseBuffer(b);
-           return (res);
+           return res;
        }
        else
        {
@@ -169,7 +169,7 @@ rtnext(IndexScanDesc s, ScanDirection dir)
 
            ReleaseBuffer(b);
            if (so->s_stack == (RTSTACK *) NULL)
-               return ((RetrieveIndexResult) NULL);
+               return (RetrieveIndexResult) NULL;
 
            stk = so->s_stack;
            b = ReadBuffer(s->relation, stk->rts_blk);
@@ -195,7 +195,7 @@ rtnext(IndexScanDesc s, ScanDirection dir)
            res = FormRetrieveIndexResult(&(s->currentItemData), &(it->t_tid));
 
            ReleaseBuffer(b);
-           return (res);
+           return res;
        }
        else
        {
@@ -250,14 +250,14 @@ findnext(IndexScanDesc s, Page p, OffsetNumber n, ScanDirection dir)
        if (po->flags & F_LEAF)
        {
            if (index_keytest(it,
-                             RelationGetTupleDescriptor(s->relation),
+                             RelationGetDescr(s->relation),
                              s->numberOfKeys, s->keyData))
                break;
        }
        else
        {
            if (index_keytest(it,
-                             RelationGetTupleDescriptor(s->relation),
+                             RelationGetDescr(s->relation),
                              so->s_internalNKey, so->s_internalKey))
                break;
        }
@@ -268,7 +268,7 @@ findnext(IndexScanDesc s, Page p, OffsetNumber n, ScanDirection dir)
            n = OffsetNumberNext(n);
    }
 
-   return (n);
+   return n;
 }
 
 static RetrieveIndexResult
@@ -281,7 +281,7 @@ rtscancache(IndexScanDesc s, ScanDirection dir)
          && ItemPointerIsValid(&(s->currentItemData))))
    {
 
-       return ((RetrieveIndexResult) NULL);
+       return (RetrieveIndexResult) NULL;
    }
 
    ip = rtheapptr(s->relation, &(s->currentItemData));
@@ -293,7 +293,7 @@ rtscancache(IndexScanDesc s, ScanDirection dir)
 
    pfree(ip);
 
-   return (res);
+   return res;
 }
 
 /*
@@ -323,5 +323,5 @@ rtheapptr(Relation r, ItemPointer itemp)
    else
        ItemPointerSetInvalid(ip);
 
-   return (ip);
+   return ip;
 }
index e9b52ead23914176404ed6762e021e996490f180..a2bced8fc7710d2a59abd5aad5b0a4990290c11b 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtproc.c,v 1.16 1998/02/26 04:30:06 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtproc.c,v 1.17 1998/09/01 03:21:26 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -36,7 +36,7 @@ rt_box_union(BOX *a, BOX *b)
    n->low.x = Min(a->low.x, b->low.x);
    n->low.y = Min(a->low.y, b->low.y);
 
-   return (n);
+   return n;
 }
 
 BOX *
@@ -55,10 +55,10 @@ rt_box_inter(BOX *a, BOX *b)
    if (n->high.x < n->low.x || n->high.y < n->low.y)
    {
        pfree(n);
-       return ((BOX *) NULL);
+       return (BOX *) NULL;
    }
 
-   return (n);
+   return n;
 }
 
 void
@@ -149,8 +149,8 @@ rt_poly_inter(POLYGON *a, POLYGON *b)
    if (p->boundbox.high.x < p->boundbox.low.x || p->boundbox.high.y < p->boundbox.low.y)
    {
        pfree(p);
-       return ((POLYGON *) NULL);
+       return (POLYGON *) NULL;
    }
 
-   return (p);
+   return p;
 }
index c86fec6c3a8405861ada2cc86957dbe0ef38df9b..2352b9b7e71173cacef6db0ab2266914ff97da39 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.26 1998/08/19 02:01:20 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.27 1998/09/01 03:21:27 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -136,8 +136,8 @@ rtbuild(Relation heap,
    }
 
    /* init the tuple descriptors and get set for a heap scan */
-   hd = RelationGetTupleDescriptor(heap);
-   id = RelationGetTupleDescriptor(index);
+   hd = RelationGetDescr(heap);
+   id = RelationGetDescr(index);
    d = (Datum *) palloc(natts * sizeof(*d));
    nulls = (bool *) palloc(natts * sizeof(*nulls));
 
@@ -310,7 +310,7 @@ rtinsert(Relation r, Datum *datum, char *nulls, ItemPointer ht_ctid, Relation he
    RTSTATE     rtState;
 
    /* generate an index tuple */
-   itup = index_formtuple(RelationGetTupleDescriptor(r), datum, nulls);
+   itup = index_formtuple(RelationGetDescr(r), datum, nulls);
    itup->t_tid = *ht_ctid;
    initRtstate(&rtState, r);
 
@@ -318,7 +318,7 @@ rtinsert(Relation r, Datum *datum, char *nulls, ItemPointer ht_ctid, Relation he
    res = rtdoinsert(r, itup, &rtState);
 
    /* XXX two-phase locking -- don't unlock the relation until EOT */
-   return (res);
+   return res;
 }
 
 static InsertIndexResult
@@ -372,7 +372,7 @@ rtdoinsert(Relation r, IndexTuple itup, RTSTATE *rtstate)
        res = dosplit(r, buffer, stack, itup, rtstate);
        freestack(stack);
        WriteBuffer(buffer);    /* don't forget to release buffer! */
-       return (res);
+       return res;
    }
 
    /* add the item and write the buffer */
@@ -402,7 +402,7 @@ rtdoinsert(Relation r, IndexTuple itup, RTSTATE *rtstate)
    res = (InsertIndexResult) palloc(sizeof(InsertIndexResultData));
    ItemPointerSet(&(res->pointerData), blk, l);
 
-   return (res);
+   return res;
 }
 
 static void
@@ -435,7 +435,7 @@ rttighten(Relation r,
 
    if (newd_size != old_size)
    {
-       TupleDesc   td = RelationGetTupleDescriptor(r);
+       TupleDesc   td = RelationGetDescr(r);
 
        if (td->attrs[0]->attlen < 0)
        {
@@ -620,7 +620,7 @@ dosplit(Relation r,
    pfree(ltup);
    pfree(rtup);
 
-   return (res);
+   return res;
 }
 
 static void
@@ -922,13 +922,13 @@ choose(Relation r, Page p, IndexTuple it, RTSTATE *rtstate)
        }
    }
 
-   return (which);
+   return which;
 }
 
 static int
 nospace(Page p, IndexTuple it)
 {
-   return (PageGetFreeSpace(p) < IndexTupleSize(it));
+   return PageGetFreeSpace(p) < IndexTupleSize(it);
 }
 
 void
@@ -970,7 +970,7 @@ rtdelete(Relation r, ItemPointer tid)
    WriteBuffer(buf);
 
    /* XXX -- two-phase locking, don't release the write lock */
-   return ((char *) NULL);
+   return (char *) NULL;
 }
 
 static void
index 2c14968d4eff25f6e111f84de7b3c27587836c8f..21e1f1c3119ea97d499b1521be1af1cdf53ae13a 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.17 1998/08/19 02:01:21 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.18 1998/09/01 03:21:28 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -73,7 +73,7 @@ rtbeginscan(Relation r,
    s = RelationGetIndexScan(r, fromEnd, nkeys, key);
    rtregscan(s);
 
-   return (s);
+   return s;
 }
 
 void
index 028625d48a1388bbafdac12244081859b8199fe0..04c5728888e84b8db8919cd7863ae78377de2b97 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtstrat.c,v 1.8 1997/09/08 02:21:11 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtstrat.c,v 1.9 1998/09/01 03:21:30 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -209,7 +209,7 @@ RelationGetRTStrategy(Relation r,
                      AttrNumber attnum,
                      RegProcedure proc)
 {
-   return (RelationGetStrategy(r, attnum, &RTEvaluationData, proc));
+   return RelationGetStrategy(r, attnum, &RTEvaluationData, proc);
 }
 
 #ifdef NOT_USED
@@ -239,5 +239,5 @@ RTMapOperator(Relation r,
                                              RTNStrategies,
                                              attnum);
 
-   return (strategyMap->entry[RTOperMap[procstrat - 1] - 1].sk_procedure);
+   return strategyMap->entry[RTOperMap[procstrat - 1] - 1].sk_procedure;
 }
index 5beaa125be4afe2206b199df868a5de710ed8ec4..284400116d68b52397a44e9075c4fe1ffe682a66 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.17 1998/02/26 04:30:18 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.18 1998/09/01 03:21:31 momjian Exp $
  *
  * NOTES
  *   This file contains the high level access-method interface to the
@@ -188,7 +188,7 @@ TransactionLogTest(TransactionId transactionId, /* transaction id to test */
    /*
     * so lint is happy...
     */
-   return (false);
+   return false;
 }
 
 /* --------------------------------
index f32a7fb00b5ab37549976da92cc398b5c407e6ea..e40f49fc87ce6d649057b0f1bc538df2d7b51944 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.21 1998/07/21 04:17:21 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.22 1998/09/01 03:21:33 momjian Exp $
  *
  * NOTES
  *     Transaction aborts can now occur two ways:
@@ -295,7 +295,7 @@ IsTransactionState(void)
    /*
     * Shouldn't get here, but lint is not happy with this...
     */
-   return (false);
+   return false;
 }
 
 /* --------------------------------
@@ -863,7 +863,7 @@ StartTransaction()
 bool
 CurrentXactInProgress()
 {
-   return (CurrentTransactionState->state == TRANS_INPROGRESS);
+   return CurrentTransactionState->state == TRANS_INPROGRESS;
 }
 
 /* --------------------------------
@@ -1462,7 +1462,7 @@ IsTransactionBlock()
 
    if (s->blockState == TBLOCK_INPROGRESS
        || s->blockState == TBLOCK_ENDABORT)
-       return (true);
+       return true;
 
-   return (false);
+   return false;
 }
index 207b634e317ae29e3babca4f666588de9a2d94e1..60bd7e774f031294b6b18333b956fb8afdf9753d 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/xid.c,v 1.16 1998/04/26 04:05:34 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/xid.c,v 1.17 1998/09/01 03:21:34 momjian Exp $
  *
  * OLD COMMENTS
  * XXX WARNING
@@ -34,7 +34,7 @@ extern TransactionId FirstTransactionId;
 TransactionId
 xidin(char *representation)
 {
-   return (atol(representation));
+   return atol(representation);
 }
 
 /* XXX name for catalogs */
@@ -49,7 +49,7 @@ xidout(TransactionId transactionId)
 
    sprintf(representation, "%u", transactionId);
 
-   return (representation);
+   return representation;
 
 }
 
@@ -60,7 +60,7 @@ xidout(TransactionId transactionId)
 bool
 TransactionIdIsLessThan(TransactionId id1, TransactionId id2)
 {
-   return ((bool) (id1 < id2));
+   return (bool) (id1 < id2);
 }
 
 /* ----------------------------------------------------------------
@@ -75,7 +75,7 @@ TransactionIdIsLessThan(TransactionId id1, TransactionId id2)
 bool
 xideq(TransactionId xid1, TransactionId xid2)
 {
-   return ((bool) (xid1 == xid2));
+   return (bool) (xid1 == xid2);
 }
 
 
index 060d3e9f246581ade76323aad600a5bd6543161c..18497cb2f257835f2673ddb584abc5eab9342522 100644 (file)
@@ -7,7 +7,7 @@
  * Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.49 1998/08/24 19:04:02 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.50 1998/09/01 03:21:36 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -86,7 +86,7 @@
 
 extern int Int_yyparse(void);
 static hashnode *AddStr(char *str, int strlength, int mderef);
-static AttributeTupleForm AllocateAttribute(void);
+static Form_pg_attribute AllocateAttribute(void);
 static bool BootstrapAlreadySeen(Oid id);
 static int CompHash(char *str, int len);
 static hashnode *FindStr(char *str, int length, hashnode *mderef);
@@ -165,7 +165,7 @@ static int  n_types = sizeof(Procid) / sizeof(struct typinfo);
 struct typmap
 {                              /* a hack */
    Oid         am_oid;
-   TypeTupleFormData am_typ;
+   FormData_pg_type am_typ;
 };
 
 static struct typmap **Typ = (struct typmap **) NULL;
@@ -176,7 +176,7 @@ static char Blanks[MAXATTR];
 
 static char *relname;          /* current relation name */
 
-AttributeTupleForm attrtypes[MAXATTR]; /* points to attribute info */
+Form_pg_attribute attrtypes[MAXATTR];  /* points to attribute info */
 static char *values[MAXATTR];  /* cooresponding attribute values */
 int            numattr;            /* number of attributes for cur. rel */
 extern int fsyncOff;           /* do not fsync the database */
@@ -394,7 +394,7 @@ BootstrapMain(int argc, char *argv[])
 
    for (i = 0; i < MAXATTR; i++)
    {
-       attrtypes[i] = (AttributeTupleForm) NULL;
+       attrtypes[i] = (Form_pg_attribute) NULL;
        Blanks[i] = ' ';
    }
    for (i = 0; i < STRTABLESIZE; ++i)
@@ -514,7 +514,7 @@ boot_openrel(char *relname)
 
        if (DebugMode)
        {
-           AttributeTupleForm at = attrtypes[i];
+           Form_pg_attribute at = attrtypes[i];
 
            printf("create attribute %d name %s len %d num %d type %d\n",
                   i, at->attname.data, at->attlen, at->attnum,
@@ -580,7 +580,7 @@ DefineAttr(char *name, char *type, int attnum)
    }
 
    typeoid = gettype(type);
-   if (attrtypes[attnum] == (AttributeTupleForm) NULL)
+   if (attrtypes[attnum] == (Form_pg_attribute) NULL)
        attrtypes[attnum] = AllocateAttribute();
    if (Typ != (struct typmap **) NULL)
    {
@@ -757,7 +757,7 @@ BootstrapAlreadySeen(Oid id)
        seenArray[nseen] = id;
        nseen++;
    }
-   return (seenthis);
+   return seenthis;
 }
 
 /* ----------------
@@ -802,7 +802,7 @@ gettype(char *type)
            if (strncmp((*app)->am_typ.typname.data, type, NAMEDATALEN) == 0)
            {
                Ap = *app;
-               return ((*app)->am_oid);
+               return (*app)->am_oid;
            }
        }
    }
@@ -811,7 +811,7 @@ gettype(char *type)
        for (i = 0; i <= n_types; i++)
        {
            if (strncmp(type, Procid[i].name, NAMEDATALEN) == 0)
-               return (i);
+               return i;
        }
        if (DebugMode)
            printf("bootstrap.c: External Type: %s\n", type);
@@ -836,7 +836,7 @@ gettype(char *type)
        }
        heap_endscan(scan);
        heap_close(rel);
-       return (gettype(type));
+       return gettype(type);
    }
    elog(ERROR, "Error: unknown type '%s'.\n", type);
    err_out();
@@ -848,17 +848,17 @@ gettype(char *type)
  *     AllocateAttribute
  * ----------------
  */
-static AttributeTupleForm      /* XXX */
+static Form_pg_attribute       /* XXX */
 AllocateAttribute()
 {
-   AttributeTupleForm attribute =
-   (AttributeTupleForm) malloc(ATTRIBUTE_TUPLE_SIZE);
+   Form_pg_attribute attribute =
+   (Form_pg_attribute) malloc(ATTRIBUTE_TUPLE_SIZE);
 
    if (!PointerIsValid(attribute))
        elog(FATAL, "AllocateAttribute: malloc failed");
    MemSet(attribute, 0, ATTRIBUTE_TUPLE_SIZE);
 
-   return (attribute);
+   return attribute;
 }
 
 /* ----------------
@@ -912,11 +912,11 @@ EnterString(char *str)
 
    node = FindStr(str, len, 0);
    if (node)
-       return (node->strnum);
+       return node->strnum;
    else
    {
        node = AddStr(str, len, 0);
-       return (node->strnum);
+       return node->strnum;
    }
 }
 
@@ -929,7 +929,7 @@ EnterString(char *str)
 char *
 LexIDStr(int ident_num)
 {
-   return (strtable[ident_num]);
+   return strtable[ident_num];
 }
 
 
@@ -949,7 +949,7 @@ CompHash(char *str, int len)
 
    result = (NUM * str[0] + NUMSQR * str[len - 1] + NUMCUBE * str[(len - 1) / 2]);
 
-   return (result % HASHTABLESIZE);
+   return result % HASHTABLESIZE;
 
 }
 
@@ -976,13 +976,13 @@ FindStr(char *str, int length, hashnode *mderef)
         */
        if (!strcmp(str, strtable[node->strnum]))
        {
-           return (node);      /* no need to check */
+           return node;        /* no need to check */
        }
        else
            node = node->next;
    }
    /* Couldn't find it in the list */
-   return (NULL);
+   return NULL;
 }
 
 /* ----------------
@@ -1048,7 +1048,7 @@ AddStr(char *str, int strlength, int mderef)
        }
        trail->next = newnode;
    }
-   return (newnode);
+   return newnode;
 }
 
 
index 45772f5e0483e998f342ff4f284c3767da0f0ac1..3d778d260994062740d40b414b3d509010d310ad 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.14 1998/08/19 02:01:27 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.15 1998/09/01 03:21:38 momjian Exp $
  *
  * NOTES
  *   See acl.h.
@@ -130,7 +130,7 @@ ChangeAcl(char *relname,
    if (!heap_attisnull(tuple, Anum_pg_class_relacl))
        old_acl = (Acl *) heap_getattr(tuple,
                                       Anum_pg_class_relacl,
-                                      RelationGetTupleDescriptor(relation),
+                                      RelationGetDescr(relation),
                                       (bool *) NULL);
    if (!old_acl || ACL_NUM(old_acl) < 1)
    {
@@ -190,7 +190,7 @@ get_grosysid(char *groname)
        id = ((Form_pg_group) GETSTRUCT(tuple))->grosysid;
    else
        elog(ERROR, "non-existent group \"%s\"", groname);
-   return (id);
+   return id;
 }
 
 char *
@@ -206,7 +206,7 @@ get_groname(AclId grosysid)
        name = (((Form_pg_group) GETSTRUCT(tuple))->groname).data;
    else
        elog(NOTICE, "get_groname: group %d not found", grosysid);
-   return (name);
+   return name;
 }
 
 static int32
@@ -225,7 +225,7 @@ in_group(AclId uid, AclId gid)
    {
        elog(NOTICE, "in_group: could not open \"%s\"??",
             GroupRelationName);
-       return (0);
+       return 0;
    }
    tuple = SearchSysCacheTuple(GROSYSID,
                                ObjectIdGetDatum(gid),
@@ -235,7 +235,7 @@ in_group(AclId uid, AclId gid)
    {
        tmp = (IdList *) heap_getattr(tuple,
                                      Anum_pg_group_grolist,
-                                   RelationGetTupleDescriptor(relation),
+                                   RelationGetDescr(relation),
                                      (bool *) NULL);
        /* XXX make me a function */
        num = IDLIST_NUM(tmp);
@@ -250,7 +250,7 @@ in_group(AclId uid, AclId gid)
    else
        elog(NOTICE, "in_group: group %d not found", gid);
    heap_close(relation);
-   return (found);
+   return found;
 }
 
 /*
@@ -300,7 +300,7 @@ aclcheck(char *relname, Acl *acl, AclId id, AclIdType idtype, AclMode mode)
                    elog(DEBUG, "aclcheck: found %d/%d",
                         aip->ai_id, aip->ai_mode);
 #endif
-                   return ((aip->ai_mode & mode) ? ACLCHECK_OK : ACLCHECK_NO_PRIV);
+                   return (aip->ai_mode & mode) ? ACLCHECK_OK : ACLCHECK_NO_PRIV;
                }
            }
            for (found_group = 0;
@@ -340,7 +340,7 @@ aclcheck(char *relname, Acl *acl, AclId id, AclIdType idtype, AclMode mode)
                    elog(DEBUG, "aclcheck: found %d/%d",
                         aip->ai_id, aip->ai_mode);
 #endif
-                   return ((aip->ai_mode & mode) ? ACLCHECK_OK : ACLCHECK_NO_PRIV);
+                   return (aip->ai_mode & mode) ? ACLCHECK_OK : ACLCHECK_NO_PRIV;
                }
            }
            break;
@@ -354,7 +354,7 @@ aclcheck(char *relname, Acl *acl, AclId id, AclIdType idtype, AclMode mode)
 #ifdef ACLDEBUG_TRACE
    elog(DEBUG, "aclcheck: using world=%d", aidat->ai_mode);
 #endif
-   return ((aidat->ai_mode & mode) ? ACLCHECK_OK : ACLCHECK_NO_PRIV);
+   return (aidat->ai_mode & mode) ? ACLCHECK_OK : ACLCHECK_NO_PRIV;
 }
 
 int32
@@ -433,7 +433,7 @@ pg_aclcheck(char *relname, char *usename, AclMode mode)
        relation = heap_openr(RelationRelationName);
        tmp = (Acl *) heap_getattr(tuple,
                                   Anum_pg_class_relacl,
-                                  RelationGetTupleDescriptor(relation),
+                                  RelationGetDescr(relation),
                                   (bool *) NULL);
        acl = makeacl(ACL_NUM(tmp));
        memmove((char *) acl, (char *) tmp, ACL_SIZE(tmp));
@@ -451,7 +451,7 @@ pg_aclcheck(char *relname, char *usename, AclMode mode)
        relation = heap_openr(RelationRelationName);
        ownerId = (int4) heap_getattr(tuple,
                                     Anum_pg_class_relowner,
-                                    RelationGetTupleDescriptor(relation),
+                                    RelationGetDescr(relation),
                                     (bool *) NULL);
        acl = aclownerdefault(relname, (AclId)ownerId);
    }
@@ -476,7 +476,7 @@ pg_aclcheck(char *relname, char *usename, AclMode mode)
        {
            tmp = (Acl *) heap_getattr(tuple,
                                       Anum_pg_class_relacl,
-                                       RelationGetTupleDescriptor(relation),
+                                       RelationGetDescr(relation),
                                       (bool *) NULL);
            acl = makeacl(ACL_NUM(tmp));
            memmove((char *) acl, (char *) tmp, ACL_SIZE(tmp));
@@ -487,7 +487,7 @@ pg_aclcheck(char *relname, char *usename, AclMode mode)
    result = aclcheck(relname, acl, id, (AclIdType) ACL_IDTYPE_UID, mode);
    if (acl)
        pfree(acl);
-   return (result);
+   return result;
 }
 
 int32
@@ -516,7 +516,7 @@ pg_ownercheck(char *usename,
        elog(DEBUG, "pg_ownercheck: user \"%s\" is superuser",
             usename);
 #endif
-       return (1);
+       return 1;
    }
 
    tuple = SearchSysCacheTuple(cacheid, PointerGetDatum(value),
@@ -527,7 +527,7 @@ pg_ownercheck(char *usename,
            if (!HeapTupleIsValid(tuple))
                elog(ERROR, "pg_ownercheck: operator %ld not found",
                     PointerGetDatum(value));
-           owner_id = ((OperatorTupleForm) GETSTRUCT(tuple))->oprowner;
+           owner_id = ((Form_pg_operator) GETSTRUCT(tuple))->oprowner;
            break;
        case PRONAME:
            if (!HeapTupleIsValid(tuple))
@@ -545,7 +545,7 @@ pg_ownercheck(char *usename,
            if (!HeapTupleIsValid(tuple))
                elog(ERROR, "pg_ownercheck: type \"%s\" not found",
                     value);
-           owner_id = ((TypeTupleForm) GETSTRUCT(tuple))->typowner;
+           owner_id = ((Form_pg_type) GETSTRUCT(tuple))->typowner;
            break;
        default:
            elog(ERROR, "pg_ownercheck: invalid cache id: %d",
@@ -553,7 +553,7 @@ pg_ownercheck(char *usename,
            break;
    }
 
-   return (user_id == owner_id);
+   return user_id == owner_id;
 }
 
 int32
@@ -583,7 +583,7 @@ pg_func_ownercheck(char *usename,
        elog(DEBUG, "pg_ownercheck: user \"%s\" is superuser",
             usename);
 #endif
-       return (1);
+       return 1;
    }
 
    tuple = SearchSysCacheTuple(PRONAME,
@@ -596,7 +596,7 @@ pg_func_ownercheck(char *usename,
 
    owner_id = ((Form_pg_proc) GETSTRUCT(tuple))->proowner;
 
-   return (user_id == owner_id);
+   return user_id == owner_id;
 }
 
 int32
@@ -625,7 +625,7 @@ pg_aggr_ownercheck(char *usename,
        elog(DEBUG, "pg_aggr_ownercheck: user \"%s\" is superuser",
             usename);
 #endif
-       return (1);
+       return 1;
    }
 
    tuple = SearchSysCacheTuple(AGGNAME,
@@ -638,5 +638,5 @@ pg_aggr_ownercheck(char *usename,
 
    owner_id = ((Form_pg_aggregate) GETSTRUCT(tuple))->aggowner;
 
-   return (user_id == owner_id);
+   return user_id == owner_id;
 }
index 76dfa70630e751d737fa7b5de3ed55817c669883..5db4be03109f0e4b1e793959915952252f7ab9c2 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.16 1998/08/19 02:01:29 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.17 1998/09/01 03:21:40 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -27,7 +27,7 @@
  *     Perhaps this should be in-line code in relopen().
  */
 char *
-relpath(char relname[])
+relpath(char *relname)
 {
    char       *path;
 
@@ -35,9 +35,9 @@ relpath(char relname[])
    {
        path = (char *) palloc(strlen(DataDir) + sizeof(NameData) + 2);
        sprintf(path, "%s/%s", DataDir, relname);
-       return (path);
+       return path;
    }
-   return (relname);
+   return relname;
 }
 
 #ifdef NOT_USED
@@ -51,7 +51,7 @@ relpath(char relname[])
  *     XXX this is way bogus. -- pma
  */
 bool
-issystem(char relname[])
+issystem(char *relname)
 {
    if (relname[0] && relname[1] && relname[2])
        return (relname[0] == 'p' &&
@@ -154,12 +154,12 @@ newoid()
 void
 fillatt(TupleDesc tupleDesc)
 {
-   AttributeTupleForm *attributeP;
-   TypeTupleForm typp;
+   Form_pg_attribute *attributeP;
+   Form_pg_type typp;
    HeapTuple   tuple;
    int         i;
    int         natts = tupleDesc->natts;
-   AttributeTupleForm *att = tupleDesc->attrs;
+   Form_pg_attribute *att = tupleDesc->attrs;
 
    if (natts < 0 || natts > MaxHeapAttributeNumber)
        elog(ERROR, "fillatt: %d attributes is too large", natts);
@@ -193,7 +193,7 @@ fillatt(TupleDesc tupleDesc)
             */
            if (!(*attributeP)->attisset)
            {
-               typp = (TypeTupleForm) GETSTRUCT(tuple);        /* XXX */
+               typp = (Form_pg_type) GETSTRUCT(tuple);     /* XXX */
                (*attributeP)->attlen = typp->typlen;
                (*attributeP)->attbyval = typp->typbyval;
            }
index d4212f631f460fc5fc67480cbc34ee83208aac45..d6c252f7baf99b418076143a26aa47f17b6d2ada 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.62 1998/08/29 04:19:08 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.63 1998/09/01 03:21:41 momjian Exp $
  *
  * INTERFACE ROUTINES
  *     heap_create()           - Create an uncataloged heap relation
@@ -73,7 +73,7 @@ static void AddToTempRelList(Relation r);
 static void DeletePgAttributeTuples(Relation rel);
 static void DeletePgRelationTuple(Relation rel);
 static void DeletePgTypeTuple(Relation rel);
-static int RelationAlreadyExists(Relation pg_class_desc, char relname[]);
+static int RelationAlreadyExists(Relation pg_class_desc, char *relname);
 static void RelationRemoveIndexes(Relation relation);
 static void RelationRemoveInheritance(Relation relation);
 static void RemoveFromTempRelList(Relation r);
@@ -129,7 +129,7 @@ static FormData_pg_attribute a6 = {
    MaxCommandIdAttributeNumber, 0, -1, -1, '\001', '\0', 'i', '\0', '\0'
 };
 
-static AttributeTupleForm HeapAtt[] =
+static Form_pg_attribute HeapAtt[] =
 {&a1, &a2, &a3, &a4, &a5, &a6};
 
 /* ----------------------------------------------------------------
@@ -185,7 +185,7 @@ heap_create(char *name,
    int         isTemp = 0;
    int         natts = tupDesc->natts;
 
-/*   AttributeTupleForm *att = tupDesc->attrs; */
+/*   Form_pg_attribute *att = tupDesc->attrs; */
 
    extern GlobalMemory CacheCxt;
    MemoryContext oldcxt;
@@ -332,7 +332,7 @@ heap_create(char *name,
    if (isTemp)
        AddToTempRelList(rel);
 
-   return (rel);
+   return rel;
 }
 
 
@@ -465,7 +465,7 @@ CheckAttributeNames(TupleDesc tupdesc)
  * --------------------------------
  */
 static int
-RelationAlreadyExists(Relation pg_class_desc, char relname[])
+RelationAlreadyExists(Relation pg_class_desc, char *relname)
 {
    ScanKeyData key;
    HeapScanDesc pg_class_scan;
@@ -535,7 +535,7 @@ static void
 AddNewAttributeTuples(Oid new_rel_oid,
                      TupleDesc tupdesc)
 {
-   AttributeTupleForm *dpp;
+   Form_pg_attribute *dpp;
    unsigned    i;
    HeapTuple   tup;
    Relation    rel;
@@ -555,7 +555,7 @@ AddNewAttributeTuples(Oid new_rel_oid,
     */
    Assert(rel);
    Assert(rel->rd_rel);
-   hasindex = RelationGetRelationTupleForm(rel)->relhasindex;
+   hasindex = RelationGetForm(rel)->relhasindex;
    if (hasindex)
        CatalogOpenIndices(Num_pg_attr_indices, Name_pg_attr_indices, idescs);
 
@@ -911,7 +911,7 @@ RelationRemoveInheritance(Relation relation)
        heap_close(catalogRelation);
 
        elog(ERROR, "relation <%d> inherits \"%s\"",
-            ((InheritsTupleForm) GETSTRUCT(tuple))->inhrel,
+            ((Form_pg_inherits) GETSTRUCT(tuple))->inhrel,
             RelationGetRelationName(relation));
    }
 
@@ -984,7 +984,7 @@ RelationRemoveIndexes(Relation relation)
                          &entry);
 
    while (HeapTupleIsValid(tuple = heap_getnext(scan, 0)))
-       index_destroy(((IndexTupleForm) GETSTRUCT(tuple))->indexrelid);
+       index_destroy(((Form_pg_index) GETSTRUCT(tuple))->indexrelid);
 
    heap_endscan(scan);
    heap_close(indexRelation);
@@ -1165,7 +1165,7 @@ DeletePgTypeTuple(Relation rel)
 
    if (HeapTupleIsValid(atttup))
    {
-       Oid         relid = ((AttributeTupleForm) GETSTRUCT(atttup))->attrelid;
+       Oid         relid = ((Form_pg_attribute) GETSTRUCT(atttup))->attrelid;
 
        heap_endscan(pg_type_scan);
        heap_close(pg_type_desc);
@@ -1428,7 +1428,7 @@ StoreAttrDefault(Relation rel, AttrDefault *attrdef)
 {
    char        str[MAX_PARSE_BUFFER];
    char        cast[2 * NAMEDATALEN] = {0};
-   AttributeTupleForm atp = rel->rd_att->attrs[attrdef->adnum - 1];
+   Form_pg_attribute atp = rel->rd_att->attrs[attrdef->adnum - 1];
    QueryTreeList *queryTree_list;
    Query      *query;
    List       *planTree_list;
index 260f29d98c6f2d403e8d2dcac157e24d1ba88dd7..ad8725a25498fb615a8528f85197b0145c98fc4b 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.58 1998/08/31 17:49:16 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.59 1998/09/01 03:21:43 momjian Exp $
  *
  *
  * INTERFACE ROUTINES
@@ -71,7 +71,7 @@ static TupleDesc BuildFuncTupleDesc(FuncIndexInfo *funcInfo);
 static TupleDesc
 ConstructTupleDescriptor(Oid heapoid, Relation heapRelation,
                         List *attributeList,
-                        int numatts, AttrNumber attNums[]);
+                        int numatts, AttrNumber *attNums);
 
 static void ConstructIndexReldesc(Relation indexRelation, Oid amoid);
 static Oid UpdateRelationRelation(Relation indexRelation);
@@ -84,13 +84,13 @@ static void
 static void
 UpdateIndexRelation(Oid indexoid, Oid heapoid,
                    FuncIndexInfo *funcInfo, int natts,
-                 AttrNumber attNums[], Oid classOids[], Node *predicate,
+                 AttrNumber *attNums, Oid *classOids, Node *predicate,
                    List *attributeList, bool islossy, bool unique);
 static void
 DefaultBuild(Relation heapRelation, Relation indexRelation,
-            int numberOfAttributes, AttrNumber attributeNumber[],
+            int numberOfAttributes, AttrNumber *attributeNumber,
             IndexStrategy indexStrategy, uint16 parameterCount,
-      Datum parameter[], FuncIndexInfoPtr funcInfo, PredInfo *predInfo);
+      Datum *parameter, FuncIndexInfoPtr funcInfo, PredInfo *predInfo);
 
 /* ----------------------------------------------------------------
  *   sysatts is a structure containing attribute tuple forms
@@ -241,7 +241,7 @@ BuildFuncTupleDesc(FuncIndexInfo *funcInfo)
     * Allocate and zero a tuple descriptor.
     */
    funcTupDesc = CreateTemplateTupleDesc(1);
-   funcTupDesc->attrs[0] = (AttributeTupleForm) palloc(ATTRIBUTE_TUPLE_SIZE);
+   funcTupDesc->attrs[0] = (Form_pg_attribute) palloc(ATTRIBUTE_TUPLE_SIZE);
    MemSet(funcTupDesc->attrs[0], 0, ATTRIBUTE_TUPLE_SIZE);
 
    /*
@@ -273,20 +273,20 @@ BuildFuncTupleDesc(FuncIndexInfo *funcInfo)
    /*
     * Assign some of the attributes values. Leave the rest as 0.
     */
-   funcTupDesc->attrs[0]->attlen = ((TypeTupleForm) GETSTRUCT(tuple))->typlen;
+   funcTupDesc->attrs[0]->attlen = ((Form_pg_type) GETSTRUCT(tuple))->typlen;
    funcTupDesc->attrs[0]->atttypid = retType;
    funcTupDesc->attrs[0]->attnum = 1;
-   funcTupDesc->attrs[0]->attbyval = ((TypeTupleForm) GETSTRUCT(tuple))->typbyval;
+   funcTupDesc->attrs[0]->attbyval = ((Form_pg_type) GETSTRUCT(tuple))->typbyval;
    funcTupDesc->attrs[0]->attcacheoff = -1;
    funcTupDesc->attrs[0]->atttypmod = -1;
-   funcTupDesc->attrs[0]->attalign = ((TypeTupleForm) GETSTRUCT(tuple))->typalign;
+   funcTupDesc->attrs[0]->attalign = ((Form_pg_type) GETSTRUCT(tuple))->typalign;
 
    /*
     * make the attributes name the same as the functions
     */
    namestrcpy(&funcTupDesc->attrs[0]->attname, funcname);
 
-   return (funcTupDesc);
+   return funcTupDesc;
 }
 
 /* ----------------------------------------------------------------
@@ -298,7 +298,7 @@ ConstructTupleDescriptor(Oid heapoid,
                         Relation heapRelation,
                         List *attributeList,
                         int numatts,
-                        AttrNumber attNums[])
+                        AttrNumber *attNums)
 {
    TupleDesc   heapTupDesc;
    TupleDesc   indexTupDesc;
@@ -306,7 +306,7 @@ ConstructTupleDescriptor(Oid heapoid,
    TypeName   *IndexKeyType;
    AttrNumber  atnum;          /* attributeNumber[attributeOffset] */
    AttrNumber  atind;
-   int         natts;          /* RelationTupleForm->relnatts */
+   int         natts;          /* Form_pg_class->relnatts */
    char       *from;           /* used to simplify memcpy below */
    char       *to;             /* used to simplify memcpy below */
    int         i;
@@ -315,7 +315,7 @@ ConstructTupleDescriptor(Oid heapoid,
     *  allocate the new tuple descriptor
     * ----------------
     */
-   natts = RelationGetRelationTupleForm(heapRelation)->relnatts;
+   natts = RelationGetForm(heapRelation)->relnatts;
 
    indexTupDesc = CreateTemplateTupleDesc(numatts);
 
@@ -350,7 +350,7 @@ ConstructTupleDescriptor(Oid heapoid,
        else
            IndexKeyType = NULL;
 
-       indexTupDesc->attrs[i] = (AttributeTupleForm) palloc(ATTRIBUTE_TUPLE_SIZE);
+       indexTupDesc->attrs[i] = (Form_pg_attribute) palloc(ATTRIBUTE_TUPLE_SIZE);
 
        /* ----------------
         *   determine which tuple descriptor to copy
@@ -379,7 +379,7 @@ ConstructTupleDescriptor(Oid heapoid,
             *    here we are indexing on a normal attribute (1...n)
             * ----------------
             */
-           heapTupDesc = RelationGetTupleDescriptor(heapRelation);
+           heapTupDesc = RelationGetDescr(heapRelation);
            atind = AttrNumberGetAttrOffset(atnum);
 
            from = (char *) (heapTupDesc->attrs[atind]);
@@ -394,13 +394,13 @@ ConstructTupleDescriptor(Oid heapoid,
        to = (char *) (indexTupDesc->attrs[i]);
        memcpy(to, from, ATTRIBUTE_TUPLE_SIZE);
 
-       ((AttributeTupleForm) to)->attnum = i + 1;
+       ((Form_pg_attribute) to)->attnum = i + 1;
 
-       ((AttributeTupleForm) to)->attnotnull = false;
-       ((AttributeTupleForm) to)->atthasdef = false;
-       ((AttributeTupleForm) to)->attcacheoff = -1;
-       ((AttributeTupleForm) to)->atttypmod = -1;
-       ((AttributeTupleForm) to)->attalign = 'i';
+       ((Form_pg_attribute) to)->attnotnull = false;
+       ((Form_pg_attribute) to)->atthasdef = false;
+       ((Form_pg_attribute) to)->attcacheoff = -1;
+       ((Form_pg_attribute) to)->atttypmod = -1;
+       ((Form_pg_attribute) to)->attalign = 'i';
 
        /*
         * if the keytype is defined, we need to change the tuple form's
@@ -416,14 +416,14 @@ ConstructTupleDescriptor(Oid heapoid,
            if (!HeapTupleIsValid(tup))
                elog(ERROR, "create index: type '%s' undefined",
                     IndexKeyType->name);
-           ((AttributeTupleForm) to)->atttypid = tup->t_oid;
-           ((AttributeTupleForm) to)->attbyval =
-               ((TypeTupleForm) GETSTRUCT(tup))->typbyval;
-           ((AttributeTupleForm) to)->attlen =
-               ((TypeTupleForm) GETSTRUCT(tup))->typlen;
-           ((AttributeTupleForm) to)->attalign =
-               ((TypeTupleForm) GETSTRUCT(tup))->typalign;
-           ((AttributeTupleForm) to)->atttypmod = IndexKeyType->typmod;
+           ((Form_pg_attribute) to)->atttypid = tup->t_oid;
+           ((Form_pg_attribute) to)->attbyval =
+               ((Form_pg_type) GETSTRUCT(tup))->typbyval;
+           ((Form_pg_attribute) to)->attlen =
+               ((Form_pg_type) GETSTRUCT(tup))->typlen;
+           ((Form_pg_attribute) to)->attalign =
+               ((Form_pg_type) GETSTRUCT(tup))->typalign;
+           ((Form_pg_attribute) to)->atttypmod = IndexKeyType->typmod;
        }
 
 
@@ -433,14 +433,14 @@ ConstructTupleDescriptor(Oid heapoid,
         *    all set.
         * ----------------
         */
-       ((AttributeTupleForm) to)->attrelid = heapoid;
+       ((Form_pg_attribute) to)->attrelid = heapoid;
    }
 
    return indexTupDesc;
 }
 
 /* ----------------------------------------------------------------
- * AccessMethodObjectIdGetAccessMethodTupleForm --
+ * AccessMethodObjectIdGetForm --
  *     Returns the formated access method tuple given its object identifier.
  *
  * XXX ADD INDEXING
@@ -450,7 +450,7 @@ ConstructTupleDescriptor(Oid heapoid,
  * ----------------------------------------------------------------
  */
 Form_pg_am
-AccessMethodObjectIdGetAccessMethodTupleForm(Oid accessMethodObjectId)
+AccessMethodObjectIdGetForm(Oid accessMethodObjectId)
 {
    Relation    pg_am_desc;
    HeapScanDesc pg_am_scan;
@@ -483,7 +483,7 @@ AccessMethodObjectIdGetAccessMethodTupleForm(Oid accessMethodObjectId)
    {
        heap_endscan(pg_am_scan);
        heap_close(pg_am_desc);
-       return (NULL);
+       return NULL;
    }
 
    /* ----------------
@@ -496,7 +496,7 @@ AccessMethodObjectIdGetAccessMethodTupleForm(Oid accessMethodObjectId)
    heap_endscan(pg_am_scan);
    heap_close(pg_am_desc);
 
-   return (form);
+   return form;
 }
 
 /* ----------------------------------------------------------------
@@ -521,7 +521,7 @@ ConstructIndexReldesc(Relation indexRelation, Oid amoid)
    oldcxt = MemoryContextSwitchTo((MemoryContext) CacheCxt);
 
    indexRelation->rd_am =
-       AccessMethodObjectIdGetAccessMethodTupleForm(amoid);
+       AccessMethodObjectIdGetForm(amoid);
 
    MemoryContextSwitchTo(oldcxt);
 
@@ -583,7 +583,7 @@ UpdateRelationRelation(Relation indexRelation)
    pfree(tuple);
    heap_close(pg_class);
 
-   return (tupleOid);
+   return tupleOid;
 }
 
 /* ----------------------------------------------------------------
@@ -598,7 +598,7 @@ InitializeAttributeOids(Relation indexRelation,
    TupleDesc   tupleDescriptor;
    int         i;
 
-   tupleDescriptor = RelationGetTupleDescriptor(indexRelation);
+   tupleDescriptor = RelationGetDescr(indexRelation);
 
    for (i = 0; i < numatts; i += 1)
        tupleDescriptor->attrs[i]->attrelid = indexoid;
@@ -633,7 +633,7 @@ AppendAttributeTuples(Relation indexRelation, int numatts)
    pg_attribute = heap_openr(AttributeRelationName);
 
    /* ----------------
-    *  initialize null[], replace[] and value[]
+    *  initialize *null, *replace and *value
     * ----------------
     */
    MemSet(nullv, ' ', Natts_pg_attribute);
@@ -681,7 +681,7 @@ AppendAttributeTuples(Relation indexRelation, int numatts)
     *  descriptor to form the remaining attribute tuples.
     * ----------------
     */
-   indexTupDesc = RelationGetTupleDescriptor(indexRelation);
+   indexTupDesc = RelationGetDescr(indexRelation);
 
    for (i = 1; i < numatts; i += 1)
    {
@@ -731,14 +731,14 @@ UpdateIndexRelation(Oid indexoid,
                    Oid heapoid,
                    FuncIndexInfo *funcInfo,
                    int natts,
-                   AttrNumber attNums[],
-                   Oid classOids[],
+                   AttrNumber *attNums,
+                   Oid *classOids,
                    Node *predicate,
                    List *attributeList,
                    bool islossy,
                    bool unique)
 {
-   IndexTupleForm indexForm;
+   Form_pg_index indexForm;
    IndexElem  *IndexKey;
    char       *predString;
    text       *predText;
@@ -749,7 +749,7 @@ UpdateIndexRelation(Oid indexoid,
    int         i;
 
    /* ----------------
-    *  allocate an IndexTupleForm big enough to hold the
+    *  allocate an Form_pg_index big enough to hold the
     *  index-predicate (if any) in string form
     * ----------------
     */
@@ -763,7 +763,7 @@ UpdateIndexRelation(Oid indexoid,
        predText = (text *) fmgr(F_TEXTIN, "");
    predLen = VARSIZE(predText);
    itupLen = predLen + sizeof(FormData_pg_index);
-   indexForm = (IndexTupleForm) palloc(itupLen);
+   indexForm = (Form_pg_index) palloc(itupLen);
 
    memmove((char *) &indexForm->indpred, (char *) predText, predLen);
 
@@ -1009,8 +1009,8 @@ index_create(char *heapRelationName,
             List *attributeList,
             Oid accessMethodObjectId,
             int numatts,
-            AttrNumber attNums[],
-            Oid classObjectId[],
+            AttrNumber *attNums,
+            Oid *classObjectId,
             uint16 parameterCount,
             Datum *parameter,
             Node *predicate,
@@ -1259,7 +1259,7 @@ index_destroy(Oid indexId)
  */
 void
 FormIndexDatum(int numberOfAttributes,
-              AttrNumber attributeNumber[],
+              AttrNumber *attributeNumber,
               HeapTuple heapTuple,
               TupleDesc heapDescriptor,
               Datum *datum,
@@ -1475,10 +1475,10 @@ static void
 DefaultBuild(Relation heapRelation,
             Relation indexRelation,
             int numberOfAttributes,
-            AttrNumber attributeNumber[],
+            AttrNumber *attributeNumber,
             IndexStrategy indexStrategy,       /* not used */
             uint16 parameterCount,     /* not used */
-            Datum parameter[], /* not used */
+            Datum *parameter, /* not used */
             FuncIndexInfoPtr funcInfo,
             PredInfo *predInfo)
 {
@@ -1514,8 +1514,8 @@ DefaultBuild(Relation heapRelation,
     *  how to form the index tuples..
     * ----------------
     */
-   heapDescriptor = RelationGetTupleDescriptor(heapRelation);
-   indexDescriptor = RelationGetTupleDescriptor(indexRelation);
+   heapDescriptor = RelationGetDescr(heapRelation);
+   indexDescriptor = RelationGetDescr(indexRelation);
 
    /* ----------------
     *  datum and null are arrays in which we collect the index attributes
@@ -1675,7 +1675,7 @@ void
 index_build(Relation heapRelation,
            Relation indexRelation,
            int numberOfAttributes,
-           AttrNumber attributeNumber[],
+           AttrNumber *attributeNumber,
            uint16 parameterCount,
            Datum *parameter,
            FuncIndexInfo *funcInfo,
@@ -1727,7 +1727,7 @@ bool
 IndexIsUnique(Oid indexId)
 {
    HeapTuple   tuple;
-   IndexTupleForm index;
+   Form_pg_index index;
 
    tuple = SearchSysCacheTuple(INDEXRELID,
                                ObjectIdGetDatum(indexId),
@@ -1737,7 +1737,7 @@ IndexIsUnique(Oid indexId)
        elog(ERROR, "IndexIsUnique: can't find index id %d",
             indexId);
    }
-   index = (IndexTupleForm) GETSTRUCT(tuple);
+   index = (Form_pg_index) GETSTRUCT(tuple);
    Assert(index->indexrelid == indexId);
 
    return index->indisunique;
@@ -1762,7 +1762,7 @@ IndexIsUniqueNoCache(Oid indexId)
    ScanKeyData skey[1];
    HeapScanDesc scandesc;
    HeapTuple   tuple;
-   IndexTupleForm index;
+   Form_pg_index index;
    bool        isunique;
 
    pg_index = heap_openr(IndexRelationName);
@@ -1779,7 +1779,7 @@ IndexIsUniqueNoCache(Oid indexId)
    if (!HeapTupleIsValid(tuple))
        elog(ERROR, "IndexIsUniqueNoCache: can't find index id %d", indexId);
 
-   index = (IndexTupleForm) GETSTRUCT(tuple);
+   index = (Form_pg_index) GETSTRUCT(tuple);
    Assert(index->indexrelid == indexId);
    isunique = index->indisunique;
 
index 86a3c0d68b22843318a621c5726c20f21c46c0ff..8fa94148c01e31e65e3f48e97120009f932c79a0 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.24 1998/08/31 17:49:17 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.25 1998/09/01 03:21:44 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -74,7 +74,7 @@ static HeapTuple CatalogIndexFetchTuple(Relation heapRelation,
  * associated with them.
  */
 void
-CatalogOpenIndices(int nIndices, char *names[], Relation idescs[])
+CatalogOpenIndices(int nIndices, char **names, Relation *idescs)
 {
    int         i;
 
@@ -108,7 +108,7 @@ CatalogIndexInsert(Relation *idescs,
 {
    HeapTuple   pgIndexTup;
    TupleDesc   heapDescriptor;
-   IndexTupleForm pgIndexP;
+   Form_pg_index pgIndexP;
    Datum       datum;
    int         natts;
    AttrNumber *attnumP;
@@ -117,19 +117,19 @@ CatalogIndexInsert(Relation *idescs,
    char        nulls[INDEX_MAX_KEYS];
    int         i;
 
-   heapDescriptor = RelationGetTupleDescriptor(heapRelation);
+   heapDescriptor = RelationGetDescr(heapRelation);
 
    for (i = 0; i < nIndices; i++)
    {
        TupleDesc   indexDescriptor;
        InsertIndexResult indexRes;
 
-       indexDescriptor = RelationGetTupleDescriptor(idescs[i]);
+       indexDescriptor = RelationGetDescr(idescs[i]);
        pgIndexTup = SearchSysCacheTupleCopy(INDEXRELID,
                                         ObjectIdGetDatum(idescs[i]->rd_id),
                                         0, 0, 0);
        Assert(pgIndexTup);
-       pgIndexP = (IndexTupleForm) GETSTRUCT(pgIndexTup);
+       pgIndexP = (Form_pg_index) GETSTRUCT(pgIndexTup);
 
        /*
         * Compute the number of attributes we are indexing upon.
@@ -191,9 +191,9 @@ CatalogHasIndex(char *catName, Oid catId)
        for (i = 0; IndexedCatalogNames[i] != NULL; i++)
        {
            if (strcmp(IndexedCatalogNames[i], catName) == 0)
-               return (true);
+               return true;
        }
-       return (false);
+       return false;
    }
 
    pg_class = heap_openr(RelationRelationName);
@@ -207,7 +207,7 @@ CatalogHasIndex(char *catName, Oid catId)
    }
 
    pgRelP = (Form_pg_class) GETSTRUCT(htup);
-   return (pgRelP->relhasindex);
+   return pgRelP->relhasindex;
 }
 
 /*
index 045bdd002f72378c1ca7dc5917713e1382a4be8e..c9370df540e763a4db930600bf963da6e552eac3 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/catalog/pg_aggregate.c,v 1.15 1998/08/19 02:01:34 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/catalog/pg_aggregate.c,v 1.16 1998/09/01 03:21:45 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -314,14 +314,14 @@ AggNameGetInitVal(char *aggName, Oid basetype, int xfuncno, bool *isNull)
     * NULL
     */
    textInitVal = (text *) fastgetattr(tup, initValAttno,
-                                      RelationGetTupleDescriptor(aggRel),
+                                      RelationGetDescr(aggRel),
                                       isNull);
    if (!PointerIsValid(textInitVal))
        *isNull = true;
    if (*isNull)
    {
        heap_close(aggRel);
-       return ((char *) NULL);
+       return (char *) NULL;
    }
    strInitVal = textout(textInitVal);
    heap_close(aggRel);
@@ -334,7 +334,7 @@ AggNameGetInitVal(char *aggName, Oid basetype, int xfuncno, bool *isNull)
        pfree(strInitVal);
        elog(ERROR, "AggNameGetInitVal: cache lookup failed on aggregate transition function return type");
    }
-   initVal = fmgr(((TypeTupleForm) GETSTRUCT(tup))->typinput, strInitVal, -1);
+   initVal = fmgr(((Form_pg_type) GETSTRUCT(tup))->typinput, strInitVal, -1);
    pfree(strInitVal);
-   return (initVal);
+   return initVal;
 }
index 22209ec1f3973d5b31eda9a613c1fea9a69248d9..a2123fc7c54707a5372ffcbe28cd6af655c5ac40 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.27 1998/08/19 02:01:36 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.28 1998/09/01 03:21:47 momjian Exp $
  *
  * NOTES
  *   these routines moved here from commands/define.c and somewhat cleaned up.
@@ -234,7 +234,7 @@ OperatorShellMakeWithOpenRelation(Relation pg_operator_desc,
    TupleDesc   tupDesc;
 
    /* ----------------
-    *  initialize our nulls[] and values[] arrays
+    *  initialize our *nulls and *values arrays
     * ----------------
     */
    for (i = 0; i < Natts_pg_operator; ++i)
@@ -244,7 +244,7 @@ OperatorShellMakeWithOpenRelation(Relation pg_operator_desc,
    }
 
    /* ----------------
-    *  initialize values[] with the type name and
+    *  initialize *values with the type name and
     * ----------------
     */
    i = 0;
@@ -807,9 +807,9 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
    {
        if (HeapTupleIsValid(tup))
        {
-           OperatorTupleForm t;
+           Form_pg_operator t;
 
-           t = (OperatorTupleForm) GETSTRUCT(tup);
+           t = (Form_pg_operator) GETSTRUCT(tup);
            if (!OidIsValid(t->oprcom)
                || !OidIsValid(t->oprnegate))
            {
@@ -849,7 +849,7 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
 
    /* if commutator and negator are different, do two updates */
    if (HeapTupleIsValid(tup) &&
-       !(OidIsValid(((OperatorTupleForm) GETSTRUCT(tup))->oprcom)))
+       !(OidIsValid(((Form_pg_operator) GETSTRUCT(tup))->oprcom)))
    {
        values[Anum_pg_operator_oprcom - 1] = ObjectIdGetDatum(baseId);
        replaces[Anum_pg_operator_oprcom - 1] = 'r';
@@ -878,7 +878,7 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
 
    tup = heap_getnext(pg_operator_scan, 0);
    if (HeapTupleIsValid(tup) &&
-       !(OidIsValid(((OperatorTupleForm) GETSTRUCT(tup))->oprnegate)))
+       !(OidIsValid(((Form_pg_operator) GETSTRUCT(tup))->oprnegate)))
    {
        values[Anum_pg_operator_oprnegate - 1] = ObjectIdGetDatum(baseId);
        replaces[Anum_pg_operator_oprnegate - 1] = 'r';
index 2e83652ac84fb8c4aaf6eb8ef2eaf209f6cda8d8..006286f6f75e65e7641741d2483cdbc6c53cf085 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.21 1998/08/31 17:49:18 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.22 1998/09/01 03:21:48 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -266,7 +266,7 @@ ProcedureCreate(char *procedureName,
 
    heap_insert(rel, tup);
 
-   if (RelationGetRelationTupleForm(rel)->relhasindex)
+   if (RelationGetForm(rel)->relhasindex)
    {
        Relation    idescs[Num_pg_proc_indices];
 
index 999a398db6c21d9f9ef898eaa54bd228a8301a5a..3375cfe591ccfb8b703f75ec5dc8c243720327ae 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.28 1998/08/20 22:07:37 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.29 1998/09/01 03:21:49 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -98,7 +98,7 @@ TypeGetWithOpenRelation(Relation pg_type_desc,
     * ----------------
     */
    heap_endscan(scan);
-   *defined = (bool) ((TypeTupleForm) GETSTRUCT(tup))->typisdefined;
+   *defined = (bool) ((Form_pg_type) GETSTRUCT(tup))->typisdefined;
 
    return tup->t_oid;
 }
@@ -163,7 +163,7 @@ TypeShellMakeWithOpenRelation(Relation pg_type_desc, char *typeName)
    TupleDesc   tupDesc;
 
    /* ----------------
-    *  initialize our nulls[] and values[] arrays
+    *  initialize our *nulls and *values arrays
     * ----------------
     */
    for (i = 0; i < Natts_pg_type; ++i)
@@ -173,7 +173,7 @@ TypeShellMakeWithOpenRelation(Relation pg_type_desc, char *typeName)
    }
 
    /* ----------------
-    *  initialize values[] with the type name and
+    *  initialize *values with the type name and
     * ----------------
     */
    i = 0;
@@ -215,7 +215,7 @@ TypeShellMakeWithOpenRelation(Relation pg_type_desc, char *typeName)
    heap_insert(pg_type_desc, tup);
    typoid = tup->t_oid;
 
-   if (RelationGetRelationTupleForm(pg_type_desc)->relhasindex)
+   if (RelationGetForm(pg_type_desc)->relhasindex)
    {
        Relation    idescs[Num_pg_type_indices];
 
@@ -375,7 +375,7 @@ TypeCreate(char *typeName,
        internalSize = -1;
 
    /* ----------------
-    *  initialize the values[] information
+    *  initialize the *values information
     * ----------------
     */
    i = 0;
@@ -509,7 +509,7 @@ TypeCreate(char *typeName,
     */
    heap_endscan(pg_type_scan);
 
-   if (RelationGetRelationTupleForm(pg_type_desc)->relhasindex)
+   if (RelationGetForm(pg_type_desc)->relhasindex)
    {
        Relation    idescs[Num_pg_type_indices];
 
@@ -558,7 +558,7 @@ TypeRename(char *oldTypeName, char *newTypeName)
        elog(ERROR, "TypeRename: type %s already defined", newTypeName);
    }
    
-   namestrcpy(&(((TypeTupleForm) GETSTRUCT(oldtup))->typname), newTypeName);
+   namestrcpy(&(((Form_pg_type) GETSTRUCT(oldtup))->typname), newTypeName);
 
    setheapoverride(true);
    heap_replace(pg_type_desc, &oldtup->t_ctid, oldtup);
index 03e5a4ca0468ebed29d02016a04d7e0bbae2c324..b057455923d4e3c06727f90463c063aaa46a1122 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.38 1998/08/30 21:04:43 scrappy Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.39 1998/09/01 03:21:50 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -189,7 +189,7 @@ Async_Notify(char *relname)
                           PointerGetDatum(notifyName));
 
    lRel = heap_openr(ListenerRelationName);
-   tdesc = RelationGetTupleDescriptor(lRel);
+   tdesc = RelationGetDescr(lRel);
    RelationSetLockForWrite(lRel);
    sRel = heap_beginscan(lRel, 0, SnapshotNow, 1, &key);
 
@@ -281,7 +281,7 @@ Async_NotifyAtCommit()
            lRel = heap_openr(ListenerRelationName);
            RelationSetLockForWrite(lRel);
            sRel = heap_beginscan(lRel, 0, SnapshotNow, 1, &key);
-           tdesc = RelationGetTupleDescriptor(lRel);
+           tdesc = RelationGetDescr(lRel);
 
            while (HeapTupleIsValid(lTuple = heap_getnext(sRel, 0)))
            {
@@ -445,7 +445,7 @@ Async_Listen(char *relname, int pid)
    RelationSetLockForWrite(lDesc);
 
    /* is someone already listening.  One listener per relation */
-   tdesc = RelationGetTupleDescriptor(lDesc);
+   tdesc = RelationGetDescr(lDesc);
    scan = heap_beginscan(lDesc, 0, SnapshotNow, 0, (ScanKey) NULL);
    while (HeapTupleIsValid(tuple = heap_getnext(scan, 0)))
    {
@@ -571,7 +571,7 @@ Async_UnlistenAll()
                           Int32GetDatum(MyProcPid));
    lRel = heap_openr(ListenerRelationName);
    RelationSetLockForWrite(lRel);
-   tdesc = RelationGetTupleDescriptor(lRel);
+   tdesc = RelationGetDescr(lRel);
    sRel = heap_beginscan(lRel, 0, SnapshotNow, 1, key);
 
    while (HeapTupleIsValid(lTuple = heap_getnext(sRel, 0)))
@@ -672,7 +672,7 @@ Async_NotifyFrontEnd_Aux()
                           Int32GetDatum(MyProcPid));
    lRel = heap_openr(ListenerRelationName);
    RelationSetLockForWrite(lRel);
-   tdesc = RelationGetTupleDescriptor(lRel);
+   tdesc = RelationGetDescr(lRel);
    sRel = heap_beginscan(lRel, 0, SnapshotNow, 2, key);
 
    nulls[0] = nulls[1] = nulls[2] = ' ';
index b0cc82e7cf50724fd7d35569ba65049296ee8da8..928a6b5f6d408f827a8053690cabab856ef6c966 100644 (file)
@@ -14,7 +14,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.29 1998/08/20 22:24:10 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.30 1998/09/01 03:21:52 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -80,7 +80,7 @@ static void rebuildheap(Oid OIDNewHeap, Oid OIDOldHeap, Oid OIDOldIndex);
  *
  */
 void
-cluster(char oldrelname[], char oldindexname[])
+cluster(char *oldrelname, char *oldindexname)
 {
    Oid         OIDOldHeap,
                OIDOldIndex,
@@ -209,7 +209,7 @@ copy_heap(Oid OIDOldHeap)
    sprintf(NewName, "temp_%x", OIDOldHeap);
 
    OldHeap = heap_open(OIDOldHeap);
-   OldHeapDesc = RelationGetTupleDescriptor(OldHeap);
+   OldHeapDesc = RelationGetDescr(OldHeap);
 
    /*
     * Need to make a copy of the tuple descriptor,
@@ -239,7 +239,7 @@ copy_index(Oid OIDOldIndex, Oid OIDNewHeap)
    HeapTuple   Old_pg_index_Tuple,
                Old_pg_index_relation_Tuple,
                pg_proc_Tuple;
-   IndexTupleForm Old_pg_index_Form;
+   Form_pg_index Old_pg_index_Form;
    Form_pg_class Old_pg_index_relation_Form;
    Form_pg_proc pg_proc_Form;
    char       *NewIndexName;
@@ -261,7 +261,7 @@ copy_index(Oid OIDOldIndex, Oid OIDNewHeap)
                            0, 0, 0);
 
    Assert(Old_pg_index_Tuple);
-   Old_pg_index_Form = (IndexTupleForm) GETSTRUCT(Old_pg_index_Tuple);
+   Old_pg_index_Form = (Form_pg_index) GETSTRUCT(Old_pg_index_Tuple);
 
    Old_pg_index_relation_Tuple =
        SearchSysCacheTuple(RELOID,
index de6cbceb8cc96b2423dbbf4a28c243fc77828dfd..5fdc9fd0c735d25146ec02e0df0de7160aeae5df 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.30 1998/08/19 02:01:42 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.31 1998/09/01 03:21:53 momjian Exp $
  *
  * NOTES
  *   The PortalExecutorHeapMemory crap needs to be eliminated
@@ -270,11 +270,11 @@ PerformAddAttribute(char *relationName,
                    bool inherits,
                    ColumnDef *colDef)
 {
-   Relation    relrdesc,
+   Relation    rel,
                attrdesc;
    HeapTuple   reltup;
    HeapTuple   attributeTuple;
-   AttributeTupleForm attribute;
+   Form_pg_attribute attribute;
    FormData_pg_attribute attributeD;
    int         i;
    int         minattnum,
@@ -325,14 +325,14 @@ PerformAddAttribute(char *relationName,
            List       *child,
                       *children;
 
-           relrdesc = heap_openr(relationName);
-           if (!RelationIsValid(relrdesc))
+           rel = heap_openr(relationName);
+           if (!RelationIsValid(rel))
            {
                elog(ERROR, "PerformAddAttribute: unknown relation: \"%s\"",
                     relationName);
            }
-           myrelid = RelationGetRelid(relrdesc);
-           heap_close(relrdesc);
+           myrelid = RelationGetRelid(rel);
+           heap_close(rel);
 
            /* this routine is actually in the planner */
            children = find_all_inheritors(lconsi(myrelid, NIL), NIL);
@@ -347,20 +347,20 @@ PerformAddAttribute(char *relationName,
                childrelid = lfirsti(child);
                if (childrelid == myrelid)
                    continue;
-               relrdesc = heap_open(childrelid);
-               if (!RelationIsValid(relrdesc))
+               rel = heap_open(childrelid);
+               if (!RelationIsValid(rel))
                {
                    elog(ERROR, "PerformAddAttribute: can't find catalog entry for inheriting class with oid %d",
                         childrelid);
                }
-               PerformAddAttribute((relrdesc->rd_rel->relname).data,
+               PerformAddAttribute((rel->rd_rel->relname).data,
                                    userName, false, colDef);
-               heap_close(relrdesc);
+               heap_close(rel);
            }
        }
    }
 
-   relrdesc = heap_openr(RelationRelationName);
+   rel = heap_openr(RelationRelationName);
 
    reltup = SearchSysCacheTupleCopy(RELNAME,
                                     PointerGetDatum(relationName),
@@ -368,7 +368,7 @@ PerformAddAttribute(char *relationName,
 
    if (!HeapTupleIsValid(reltup))
    {
-       heap_close(relrdesc);
+       heap_close(rel);
        elog(ERROR, "PerformAddAttribute: relation \"%s\" not found",
             relationName);
    }
@@ -388,7 +388,7 @@ PerformAddAttribute(char *relationName,
    if (maxatts > MaxHeapAttributeNumber)
    {
        pfree(reltup);
-       heap_close(relrdesc);
+       heap_close(rel);
        elog(ERROR, "PerformAddAttribute: relations limited to %d attributes",
             MaxHeapAttributeNumber);
    }
@@ -396,12 +396,12 @@ PerformAddAttribute(char *relationName,
    attrdesc = heap_openr(AttributeRelationName);
 
    Assert(attrdesc);
-   Assert(RelationGetRelationTupleForm(attrdesc));
+   Assert(RelationGetForm(attrdesc));
 
    /*
     * Open all (if any) pg_attribute indices
     */
-   hasindex = RelationGetRelationTupleForm(attrdesc)->relhasindex;
+   hasindex = RelationGetForm(attrdesc)->relhasindex;
    if (hasindex)
        CatalogOpenIndices(Num_pg_attr_indices, Name_pg_attr_indices, idescs);
 
@@ -411,13 +411,13 @@ PerformAddAttribute(char *relationName,
                                    sizeof attributeD,
                                    (char *) &attributeD);
 
-   attribute = (AttributeTupleForm) GETSTRUCT(attributeTuple);
+   attribute = (Form_pg_attribute) GETSTRUCT(attributeTuple);
 
    i = 1 + minattnum;
 
    {
        HeapTuple   typeTuple;
-       TypeTupleForm form;
+       Form_pg_type form;
        char       *typename;
        int         attnelems;
 
@@ -429,7 +429,7 @@ PerformAddAttribute(char *relationName,
        if (HeapTupleIsValid(tup))
        {
            heap_close(attrdesc);
-           heap_close(relrdesc);
+           heap_close(rel);
            elog(ERROR, "PerformAddAttribute: attribute \"%s\" already exists in class \"%s\"",
                colDef->colname, relationName);
        }
@@ -451,7 +451,7 @@ PerformAddAttribute(char *relationName,
        typeTuple = SearchSysCacheTuple(TYPNAME,
                                        PointerGetDatum(typename),
                                        0, 0, 0);
-       form = (TypeTupleForm) GETSTRUCT(typeTuple);
+       form = (Form_pg_type) GETSTRUCT(typeTuple);
 
        if (!HeapTupleIsValid(typeTuple))
            elog(ERROR, "Add: type \"%s\" nonexistent", typename);
@@ -482,13 +482,13 @@ PerformAddAttribute(char *relationName,
    heap_close(attrdesc);
 
    ((Form_pg_class) GETSTRUCT(reltup))->relnatts = maxatts;
-   heap_replace(relrdesc, &reltup->t_ctid, reltup);
+   heap_replace(rel, &reltup->t_ctid, reltup);
 
    /* keep catalog indices current */
    CatalogOpenIndices(Num_pg_class_indices, Name_pg_class_indices, ridescs);
-   CatalogIndexInsert(ridescs, Num_pg_class_indices, relrdesc, reltup);
+   CatalogIndexInsert(ridescs, Num_pg_class_indices, rel, reltup);
    CatalogCloseIndices(Num_pg_class_indices, ridescs);
 
    pfree(reltup);
-   heap_close(relrdesc);
+   heap_close(rel);
 }
index fa016c7353d2846519606486aa4362005b0dcc6c..f13a0ece827125a4f6dc28b31d76696ad8127d92 100644 (file)
@@ -6,7 +6,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.57 1998/08/29 18:19:59 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.58 1998/09/01 03:21:55 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -217,7 +217,7 @@ CopyTo(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
 
    int32       attr_count,
                i;
-   AttributeTupleForm *attr;
+   Form_pg_attribute *attr;
    FmgrInfo   *out_functions;
    Oid         out_func_oid;
    Oid        *elements;
@@ -371,7 +371,7 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
 {
    HeapTuple   tuple;
    AttrNumber  attr_count;
-   AttributeTupleForm *attr;
+   Form_pg_attribute *attr;
    FmgrInfo   *in_functions;
    int         i;
    Oid         in_func_oid;
@@ -397,7 +397,7 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
              **finfoP = NULL;
    TupleDesc  *itupdescArr;
    HeapTuple   pgIndexTup;
-   IndexTupleForm *pgIndexP = NULL;
+   Form_pg_index *pgIndexP = NULL;
    int        *indexNatts = NULL;
    char       *predString;
    Node      **indexPred = NULL;
@@ -418,7 +418,7 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
    Oid         loaded_oid;
    bool        skip_tuple = false;
 
-   tupDesc = RelationGetTupleDescriptor(rel);
+   tupDesc = RelationGetDescr(rel);
    attr = tupDesc->attrs;
    attr_count = tupDesc->natts;
 
@@ -438,7 +438,7 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
            itupdescArr =
                (TupleDesc *) palloc(n_indices * sizeof(TupleDesc));
            pgIndexP =
-               (IndexTupleForm *) palloc(n_indices * sizeof(IndexTupleForm));
+               (Form_pg_index *) palloc(n_indices * sizeof(Form_pg_index));
            indexNatts = (int *) palloc(n_indices * sizeof(int));
            finfo = (FuncIndexInfo *) palloc(n_indices * sizeof(FuncIndexInfo));
            finfoP = (FuncIndexInfo **) palloc(n_indices * sizeof(FuncIndexInfo *));
@@ -446,13 +446,13 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
            econtext = NULL;
            for (i = 0; i < n_indices; i++)
            {
-               itupdescArr[i] = RelationGetTupleDescriptor(index_rels[i]);
+               itupdescArr[i] = RelationGetDescr(index_rels[i]);
                pgIndexTup =
                    SearchSysCacheTuple(INDEXRELID,
                                  ObjectIdGetDatum(RelationGetRelid(index_rels[i])),
                                        0, 0, 0);
                Assert(pgIndexTup);
-               pgIndexP[i] = (IndexTupleForm) GETSTRUCT(pgIndexTup);
+               pgIndexP[i] = (Form_pg_index) GETSTRUCT(pgIndexTup);
                for (attnumP = &(pgIndexP[i]->indkey[0]), natts = 0;
                     *attnumP != InvalidAttrNumber;
                     attnumP++, natts++);
@@ -480,7 +480,7 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
                        slot = ExecAllocTableSlot(tupleTable);
                        econtext = makeNode(ExprContext);
                        econtext->ecxt_scantuple = slot;
-                       rtupdesc = RelationGetTupleDescriptor(rel);
+                       rtupdesc = RelationGetDescr(rel);
                        slot->ttc_tupleDescriptor = rtupdesc;
 
                        /*
@@ -831,10 +831,10 @@ GetOutputFunction(Oid type)
                                    0, 0, 0);
 
    if (HeapTupleIsValid(typeTuple))
-       return ((int) ((TypeTupleForm) GETSTRUCT(typeTuple))->typoutput);
+       return (int) ((Form_pg_type) GETSTRUCT(typeTuple))->typoutput;
 
    elog(ERROR, "GetOutputFunction: Cache lookup of type %d failed", type);
-   return (InvalidOid);
+   return InvalidOid;
 }
 
 static Oid
@@ -847,10 +847,10 @@ GetTypeElement(Oid type)
                                    0, 0, 0);
 
    if (HeapTupleIsValid(typeTuple))
-       return ((int) ((TypeTupleForm) GETSTRUCT(typeTuple))->typelem);
+       return (int) ((Form_pg_type) GETSTRUCT(typeTuple))->typelem;
 
    elog(ERROR, "GetOutputFunction: Cache lookup of type %d failed", type);
-   return (InvalidOid);
+   return InvalidOid;
 }
 
 static Oid
@@ -863,10 +863,10 @@ GetInputFunction(Oid type)
                                    0, 0, 0);
 
    if (HeapTupleIsValid(typeTuple))
-       return ((int) ((TypeTupleForm) GETSTRUCT(typeTuple))->typinput);
+       return (int) ((Form_pg_type) GETSTRUCT(typeTuple))->typinput;
 
    elog(ERROR, "GetInputFunction: Cache lookup of type %d failed", type);
-   return (InvalidOid);
+   return InvalidOid;
 }
 
 static Oid
@@ -879,11 +879,11 @@ IsTypeByVal(Oid type)
                                    0, 0, 0);
 
    if (HeapTupleIsValid(typeTuple))
-       return ((int) ((TypeTupleForm) GETSTRUCT(typeTuple))->typbyval);
+       return (int) ((Form_pg_type) GETSTRUCT(typeTuple))->typbyval;
 
    elog(ERROR, "GetInputFunction: Cache lookup of type %d failed", type);
 
-   return (InvalidOid);
+   return InvalidOid;
 }
 
 /*
@@ -917,7 +917,7 @@ GetIndexRelations(Oid main_relation_oid,
 
    pg_index_rel = heap_openr(IndexRelationName);
    scandesc = heap_beginscan(pg_index_rel, 0, SnapshotNow, 0, NULL);
-   tupDesc = RelationGetTupleDescriptor(pg_index_rel);
+   tupDesc = RelationGetDescr(pg_index_rel);
 
    *n_indices = 0;
 
@@ -1039,25 +1039,25 @@ CopyReadAttribute(FILE *fp, bool *isnull, char *delim)
    if (*newline)
    {
        *isnull = (bool) true;
-       return (NULL);
+       return NULL;
    }
 #endif
 
    *isnull = (bool) false;     /* set default */
    if (feof(fp))
-       return (NULL);
+       return NULL;
 
    while (!done)
    {
        c = getc(fp);
 
        if (feof(fp))
-           return (NULL);
+           return NULL;
        else if (c == '\\')
        {
            c = getc(fp);
            if (feof(fp))
-               return (NULL);
+               return NULL;
            switch (c)
            {
                case '0':
@@ -1082,14 +1082,14 @@ CopyReadAttribute(FILE *fp, bool *isnull, char *delim)
                            else
                            {
                                if (feof(fp))
-                                   return (NULL);
+                                   return NULL;
                                ungetc(c, fp);
                            }
                        }
                        else
                        {
                            if (feof(fp))
-                               return (NULL);
+                               return NULL;
                            ungetc(c, fp);
                        }
                        c = val & 0377;
@@ -1121,7 +1121,7 @@ CopyReadAttribute(FILE *fp, bool *isnull, char *delim)
                    c = getc(fp);
                    if (c != '\n')
                        elog(ERROR, "CopyReadAttribute - end of record marker corrupted. line: %d", lineno);
-                   return (NULL);
+                   return NULL;
                    break;
            }
        }
@@ -1142,7 +1142,7 @@ CopyReadAttribute(FILE *fp, bool *isnull, char *delim)
            for(j=0;j
              c = getc(fp);
              if (feof(fp))
-               return (NULL);
+               return NULL;
              attribute[i++] = c;
            }
 #endif
@@ -1153,7 +1153,7 @@ CopyReadAttribute(FILE *fp, bool *isnull, char *delim)
 #ifdef MULTIBYTE
    return(pg_client_to_server((unsigned char*)attribute, strlen(attribute)));
 #else
-   return (&attribute[0]);
+   return &attribute[0];
 #endif
 }
 
@@ -1233,5 +1233,5 @@ CountTuples(Relation relation)
    while (HeapTupleIsValid(tuple = heap_getnext(scandesc, 0)))
        i++;
    heap_endscan(scandesc);
-   return (i);
+   return i;
 }
index 9ca0f0e722719f5760cd13e30cc9bb3c7aabf16e..0286ab4659c83d59a1d8dfa0cb772c776d8478ec 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.32 1998/08/19 02:01:45 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.33 1998/09/01 03:21:56 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -258,12 +258,12 @@ MergeAttributes(List *schema, List *supers, List **supconstr)
        }
        if (relation->rd_rel->relkind == 'S')
            elog(ERROR, "MergeAttr: Can't inherit from sequence superclass '%s'", name);
-       tupleDesc = RelationGetTupleDescriptor(relation);
+       tupleDesc = RelationGetDescr(relation);
        constr = tupleDesc->constr;
 
        for (attrno = relation->rd_rel->relnatts - 1; attrno >= 0; attrno--)
        {
-           AttributeTupleForm attribute = tupleDesc->attrs[attrno];
+           Form_pg_attribute attribute = tupleDesc->attrs[attrno];
            char       *attributeName;
            char       *attributeType;
            HeapTuple   tuple;
@@ -280,7 +280,7 @@ MergeAttributes(List *schema, List *supers, List **supconstr)
                                    0, 0, 0);
            AssertState(HeapTupleIsValid(tuple));
            attributeType =
-               (((TypeTupleForm) GETSTRUCT(tuple))->typname).data;
+               (((Form_pg_type) GETSTRUCT(tuple))->typname).data;
 
            /*
             * check validity
@@ -363,7 +363,7 @@ MergeAttributes(List *schema, List *supers, List **supconstr)
     */
    schema = nconc(inhSchema, schema);
    *supconstr = constraints;
-   return (schema);
+   return schema;
 }
 
 /*
@@ -394,7 +394,7 @@ StoreCatalogInheritance(Oid relationId, List *supers)
     * ----------------
     */
    relation = heap_openr(InheritsRelationName);
-   desc = RelationGetTupleDescriptor(relation);
+   desc = RelationGetDescr(relation);
 
    seqNumber = 1;
    idList = NIL;
@@ -469,7 +469,7 @@ StoreCatalogInheritance(Oid relationId, List *supers)
                break;
 
            lnext(current) =
-               lconsi(((InheritsTupleForm)
+               lconsi(((Form_pg_inherits)
                        GETSTRUCT(tuple))->inhparent,
                       NIL);
 
@@ -519,7 +519,7 @@ again:
     * ----------------
     */
    relation = heap_openr(InheritancePrecidenceListRelationName);
-   desc = RelationGetTupleDescriptor(relation);
+   desc = RelationGetDescr(relation);
 
    seqNumber = 1;
 
index fdd6a6a3cc3794ca54b6ff5a0b8a3106fda3f543..3954eb78debc4b1fa9049710e38c8c82320c3a8d 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.22 1998/08/29 04:09:24 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.23 1998/09/01 03:21:57 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -171,7 +171,7 @@ get_pg_dbtup(char *command, char *dbname, Relation dbrel)
        dbtup = tup;
 
    heap_endscan(scan);
-   return (dbtup);
+   return dbtup;
 }
 
 /*
@@ -250,12 +250,12 @@ check_permissions(char *command,
    {
        dbowner = (int4) heap_getattr(dbtup,
                                     Anum_pg_database_datdba,
-                                    RelationGetTupleDescriptor(dbrel),
+                                    RelationGetDescr(dbrel),
                                     (char *) NULL);
        *dbIdP = dbtup->t_oid;
        dbtext = (text *) heap_getattr(dbtup,
                                       Anum_pg_database_datpath,
-                                      RelationGetTupleDescriptor(dbrel),
+                                      RelationGetDescr(dbrel),
                                       (char *) NULL);
 
        strncpy(path, VARDATA(dbtext), (VARSIZE(dbtext) - VARHDRSZ));
index 7df18c0f69833b94c7a87997393c7f189846ff5f..342a99b127d9a4e8b5a7a900edd2b3d3ce1c9440 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/commands/Attic/defind.c,v 1.24 1998/08/26 16:43:41 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/commands/Attic/defind.c,v 1.25 1998/09/01 03:21:58 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -234,7 +234,7 @@ ExtendIndex(char *indexRelationName, Expr *predicate, List *rangetable)
    HeapTuple   tuple;
    FuncIndexInfo fInfo;
    FuncIndexInfo *funcInfo = NULL;
-   IndexTupleForm index;
+   Form_pg_index index;
    Node       *oldPred = NULL;
    List       *cnfPred = NULL;
    PredInfo   *predInfo;
@@ -271,7 +271,7 @@ ExtendIndex(char *indexRelationName, Expr *predicate, List *rangetable)
    /*
     * Extract info from the pg_index tuple
     */
-   index = (IndexTupleForm) GETSTRUCT(tuple);
+   index = (Form_pg_index) GETSTRUCT(tuple);
    Assert(index->indexrelid == indexId);
    relationId = index->indrelid;
    indproc = index->indproc;
@@ -421,7 +421,7 @@ FuncIndexArgs(IndexElem *funcIndex,
 {
    List       *rest;
    HeapTuple   tuple;
-   AttributeTupleForm att;
+   Form_pg_attribute att;
 
    tuple = SearchSysCacheTuple(CLANAME,
                                PointerGetDatum(funcIndex->class),
@@ -455,7 +455,7 @@ FuncIndexArgs(IndexElem *funcIndex,
                 "DefineIndex: attribute \"%s\" not found",
                 arg);
        }
-       att = (AttributeTupleForm) GETSTRUCT(tuple);
+       att = (Form_pg_attribute) GETSTRUCT(tuple);
        *attNumP++ = att->attnum;
        *argTypes++ = att->atttypid;
    }
@@ -477,7 +477,7 @@ NormIndexAttrs(List *attList,   /* list of IndexElem's */
    for (rest = attList; rest != NIL; rest = lnext(rest))
    {
        IndexElem  *attribute;
-       AttributeTupleForm attform;
+       Form_pg_attribute attform;
 
        attribute = lfirst(rest);
 
@@ -495,7 +495,7 @@ NormIndexAttrs(List *attList,   /* list of IndexElem's */
                 attribute->name);
        }
 
-       attform = (AttributeTupleForm) GETSTRUCT(atttuple);
+       attform = (Form_pg_attribute) GETSTRUCT(atttuple);
        *attNumP++ = attform->attnum;
 
        /* we want the type so we can set the proper alignment, etc. */
@@ -509,7 +509,7 @@ NormIndexAttrs(List *attList,   /* list of IndexElem's */
                     attribute->name);
            /* we just set the type name because that is all we need */
            attribute->typename = makeNode(TypeName);
-           attribute->typename->name = nameout(&((TypeTupleForm) GETSTRUCT(tuple))->typname);
+           attribute->typename->name = nameout(&((Form_pg_type) GETSTRUCT(tuple))->typname);
        }
 
        if (attribute->class == NULL)
index 39340d17260ec11593930ea3a39f6ec62484e79e..9ec71d57dd5e55d77abf486ac5cc92131ce0400d 100644 (file)
@@ -9,7 +9,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.25 1998/06/15 19:28:15 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.26 1998/09/01 03:22:00 momjian Exp $
  *
  * DESCRIPTION
  *   The "DefineFoo" routines take the parse tree and pick out the
@@ -182,7 +182,7 @@ compute_full_attributes(const List *parameters, int32 *byte_pct_p,
 
 
 static void
-interpret_AS_clause(const char languageName[], const char as[],
+interpret_AS_clause(const char *languageName, const char *as,
                    char **prosrc_str_p, char **probin_str_p)
 {
 
@@ -710,14 +710,14 @@ defGetString(DefElem *def)
 {
    if (nodeTag(def->arg) != T_String)
        elog(ERROR, "Define: \"%s\" = what?", def->defname);
-   return (strVal(def->arg));
+   return strVal(def->arg);
 }
 
 static int
 defGetTypeLength(DefElem *def)
 {
    if (nodeTag(def->arg) == T_Integer)
-       return (intVal(def->arg));
+       return intVal(def->arg);
    else if (nodeTag(def->arg) == T_String &&
             !strcasecmp(strVal(def->arg), "variable"))
        return -1;              /* variable length */
index 6f300664cc6be79c7902e465c05da42be0273a27..4d06c57feb7b2666a4643cba535a277589850730 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/commands/Attic/recipe.c,v 1.22 1998/08/06 05:12:26 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/commands/Attic/recipe.c,v 1.23 1998/09/01 03:22:01 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -692,7 +692,7 @@ tg_rewriteParamsInExpr(Node *expression, QueryTreeList *inputQlist)
    this code is very similar to ProcedureDefine() in pg_proc.c
 */
 static int
-getParamTypes(TgElement * elem, Oid typev[])
+getParamTypes(TgElement * elem, Oid *typev)
 {
    /* this code is similar to ProcedureDefine() */
    int16       parameterCount;
index 014ddc6e19b3551c1abe04fd1bb944e7d57ff02d..aa828ec4d8a7316875b7cdfa27bd41f99c903808 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.27 1998/08/19 02:01:50 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.28 1998/09/01 03:22:02 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -201,7 +201,7 @@ AttributeAndRelationRemove(Oid typeOid)
    scan = heap_beginscan(rel, 0, SnapshotNow, 1, key);
    while (HeapTupleIsValid(tup = heap_getnext(scan, 0)))
    {
-       optr->reloid = ((AttributeTupleForm) GETSTRUCT(tup))->attrelid;
+       optr->reloid = ((Form_pg_attribute) GETSTRUCT(tup))->attrelid;
        optr->next = (struct oidlist *) palloc(sizeof(*oidptr));
        optr = optr->next;
    }
index 8ac94ae22d8a986052f69435eb0f1689bd206375..25243224afd79d72bf6c01ba07c82e1856ff7702 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/commands/Attic/rename.c,v 1.15 1998/08/24 01:13:42 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/commands/Attic/rename.c,v 1.16 1998/09/01 03:22:04 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -164,7 +164,7 @@ renameatt(char *relname,
    if (!HeapTupleIsValid(oldatttup))
        elog(ERROR, "renameatt: attribute \"%s\" nonexistent", oldattname);
 
-   if (((AttributeTupleForm) GETSTRUCT(oldatttup))->attnum < 0)
+   if (((Form_pg_attribute) GETSTRUCT(oldatttup))->attnum < 0)
        elog(ERROR, "renameatt: system attribute \"%s\" not renamed", oldattname);
 
    newatttup = SearchSysCacheTuple(ATTNAME,
@@ -178,7 +178,7 @@ renameatt(char *relname,
        elog(ERROR, "renameatt: attribute \"%s\" exists", newattname);
    }
 
-   StrNCpy((((AttributeTupleForm) (GETSTRUCT(oldatttup)))->attname.data),
+   StrNCpy((((Form_pg_attribute) (GETSTRUCT(oldatttup)))->attname.data),
               newattname, NAMEDATALEN);
 
    attrelation = heap_openr(AttributeRelationName);
index 20f9bef503a2de9a98ec2da2adbea1506347867e..e73981e8131d4e77a67a4b6aa124de1570d015e3 100644 (file)
@@ -38,7 +38,7 @@ typedef struct FormData_pg_sequence
    char        is_called;
 } FormData_pg_sequence;
 
-typedef FormData_pg_sequence *SequenceTupleForm;
+typedef FormData_pg_sequence *Form_pg_sequence;
 
 typedef struct sequence_magic
 {
@@ -61,8 +61,8 @@ typedef SeqTableData *SeqTable;
 static SeqTable seqtab = NULL;
 
 static SeqTable init_sequence(char *caller, char *name);
-static SequenceTupleForm read_info(char *caller, SeqTable elm, Buffer *buf);
-static void init_params(CreateSeqStmt *seq, SequenceTupleForm new);
+static Form_pg_sequence read_info(char *caller, SeqTable elm, Buffer *buf);
+static void init_params(CreateSeqStmt *seq, Form_pg_sequence new);
 static int get_param(DefElem *def);
 
 /*
@@ -91,7 +91,7 @@ DefineSequence(CreateSeqStmt *seq)
    init_params(seq, &new);
 
    /*
-    * Create relation (and fill null[] & value[])
+    * Create relation (and fill *null & *value)
     */
    stmt->tableElts = NIL;
    for (i = SEQ_COL_FIRSTCOL; i <= SEQ_COL_LASTCOL; i++)
@@ -164,7 +164,7 @@ DefineSequence(CreateSeqStmt *seq)
 
    RelationSetLockForWrite(rel);
 
-   tupDesc = RelationGetTupleDescriptor(rel);
+   tupDesc = RelationGetDescr(rel);
 
    Assert(RelationGetNumberOfBlocks(rel) == 0);
    buf = ReadBuffer(rel, P_NEW);
@@ -199,7 +199,7 @@ nextval(struct varlena * seqin)
    char       *seqname = textout(seqin);
    SeqTable    elm;
    Buffer      buf;
-   SequenceTupleForm seq;
+   Form_pg_sequence seq;
    ItemPointerData iptr;
    int4        incby,
                maxv,
@@ -216,7 +216,7 @@ nextval(struct varlena * seqin)
    if (elm->last != elm->cached)       /* some numbers were cached */
    {
        elm->last += elm->increment;
-       return (elm->last);
+       return elm->last;
    }
 
    seq = read_info("nextval", elm, &buf);      /* lock page and read
@@ -288,7 +288,7 @@ nextval(struct varlena * seqin)
    ItemPointerSet(&iptr, 0, FirstOffsetNumber);
    RelationUnsetSingleWLockPage(elm->rel, &iptr);
 
-   return (result);
+   return result;
 
 }
 
@@ -309,7 +309,7 @@ currval(struct varlena * seqin)
 
    result = elm->last;
 
-   return (result);
+   return result;
 
 }
 
@@ -319,7 +319,7 @@ setval(struct varlena * seqin, int4 next)
    char    *seqname = textout(seqin);
    SeqTable    elm;
    Buffer  buf;
-   SequenceTupleForm seq;
+   Form_pg_sequence seq;
    ItemPointerData iptr;
 
 #ifndef NO_SECURITY
@@ -356,10 +356,10 @@ setval(struct varlena * seqin, int4 next)
    ItemPointerSet(&iptr, 0, FirstOffsetNumber);
    RelationUnsetSingleWLockPage (elm->rel, &iptr);
 
-   return (next);
+   return next;
 }
 
-static SequenceTupleForm
+static Form_pg_sequence
 read_info(char *caller, SeqTable elm, Buffer *buf)
 {
    ItemPointerData iptr;
@@ -367,7 +367,7 @@ read_info(char *caller, SeqTable elm, Buffer *buf)
    ItemId      lp;
    HeapTuple   tuple;
    sequence_magic *sm;
-   SequenceTupleForm seq;
+   Form_pg_sequence seq;
 
    ItemPointerSet(&iptr, 0, FirstOffsetNumber);
    RelationSetSingleWLockPage(elm->rel, &iptr);
@@ -390,11 +390,11 @@ read_info(char *caller, SeqTable elm, Buffer *buf)
    Assert(ItemIdIsUsed(lp));
    tuple = (HeapTuple) PageGetItem((Page) page, lp);
 
-   seq = (SequenceTupleForm) GETSTRUCT(tuple);
+   seq = (Form_pg_sequence) GETSTRUCT(tuple);
 
    elm->increment = seq->increment_by;
 
-   return (seq);
+   return seq;
 
 }
 
@@ -427,7 +427,7 @@ init_sequence(char *caller, char *name)
 /* found */
    {
        if (elm->rel != (Relation) NULL)        /* already opened */
-           return (elm);
+           return elm;
        temp = elm;
    }
 
@@ -461,7 +461,7 @@ init_sequence(char *caller, char *name)
            priv->next = elm;
    }
 
-   return (elm);
+   return elm;
 
 }
 
@@ -494,7 +494,7 @@ CloseSequences(void)
 
 
 static void
-init_params(CreateSeqStmt *seq, SequenceTupleForm new)
+init_params(CreateSeqStmt *seq, Form_pg_sequence new)
 {
    DefElem    *last_value = NULL;
    DefElem    *increment_by = NULL;
@@ -591,8 +591,8 @@ get_param(DefElem *def)
        elog(ERROR, "DefineSequence: \"%s\" value unspecified", def->defname);
 
    if (nodeTag(def->arg) == T_Integer)
-       return (intVal(def->arg));
+       return intVal(def->arg);
 
    elog(ERROR, "DefineSequence: \"%s\" is to be integer", def->defname);
-   return (-1);
+   return -1;
 }
index 6aa583cba4c420c94336369998f51d9c8700aa3e..f26860cfb79bdc1cf88373c2de9c8ed1899190cc 100644 (file)
@@ -57,7 +57,7 @@ CreateTrigger(CreateTrigStmt *stmt)
    Relation    tgrel;
    HeapScanDesc tgscan;
    ScanKeyData key;
-   Relation    relrdesc;
+   Relation    pgrel;
    HeapTuple   tuple;
    Relation    idescs[Num_pg_trigger_indices];
    Relation    ridescs[Num_pg_class_indices];
@@ -225,15 +225,15 @@ CreateTrigger(CreateTrigStmt *stmt)
    if (!HeapTupleIsValid(tuple))
        elog(ERROR, "CreateTrigger: relation %s not found in pg_class", stmt->relname);
 
-   relrdesc = heap_openr(RelationRelationName);
+   pgrel = heap_openr(RelationRelationName);
    ((Form_pg_class) GETSTRUCT(tuple))->reltriggers = found + 1;
-   RelationInvalidateHeapTuple(relrdesc, tuple);
-   heap_replace(relrdesc, &tuple->t_ctid, tuple);
+   RelationInvalidateHeapTuple(pgrel, tuple);
+   heap_replace(pgrel, &tuple->t_ctid, tuple);
    CatalogOpenIndices(Num_pg_class_indices, Name_pg_class_indices, ridescs);
-   CatalogIndexInsert(ridescs, Num_pg_class_indices, relrdesc, tuple);
+   CatalogIndexInsert(ridescs, Num_pg_class_indices, pgrel, tuple);
    CatalogCloseIndices(Num_pg_class_indices, ridescs);
    pfree(tuple);
-   heap_close(relrdesc);
+   heap_close(pgrel);
 
    CommandCounterIncrement();
    oldcxt = MemoryContextSwitchTo((MemoryContext) CacheCxt);
@@ -252,7 +252,7 @@ DropTrigger(DropTrigStmt *stmt)
    Relation    tgrel;
    HeapScanDesc tgscan;
    ScanKeyData key;
-   Relation    relrdesc;
+   Relation    pgrel;
    HeapTuple   tuple;
    Relation    ridescs[Num_pg_class_indices];
    MemoryContext oldcxt;
@@ -304,15 +304,15 @@ DropTrigger(DropTrigStmt *stmt)
        elog(ERROR, "DropTrigger: relation %s not found in pg_class", stmt->relname);
 
    /* update pg_class */
-   relrdesc = heap_openr(RelationRelationName);
+   pgrel = heap_openr(RelationRelationName);
    ((Form_pg_class) GETSTRUCT(tuple))->reltriggers = found;
-   RelationInvalidateHeapTuple(relrdesc, tuple);
-   heap_replace(relrdesc, &tuple->t_ctid, tuple);
+   RelationInvalidateHeapTuple(pgrel, tuple);
+   heap_replace(pgrel, &tuple->t_ctid, tuple);
    CatalogOpenIndices(Num_pg_class_indices, Name_pg_class_indices, ridescs);
-   CatalogIndexInsert(ridescs, Num_pg_class_indices, relrdesc, tuple);
+   CatalogIndexInsert(ridescs, Num_pg_class_indices, pgrel, tuple);
    CatalogCloseIndices(Num_pg_class_indices, ridescs);
    pfree(tuple);
-   heap_close(relrdesc);
+   heap_close(pgrel);
 
    CommandCounterIncrement();
    oldcxt = MemoryContextSwitchTo((MemoryContext) CacheCxt);
@@ -631,7 +631,7 @@ ExecBRInsertTriggers(Relation rel, HeapTuple trigtuple)
    }
    CurrentTriggerData = NULL;
    pfree(SaveTriggerData);
-   return (newtuple);
+   return newtuple;
 }
 
 void
@@ -670,7 +670,7 @@ ExecBRDeleteTriggers(Relation rel, ItemPointer tupleid)
 
    trigtuple = GetTupleForTrigger(rel, tupleid, true);
    if (trigtuple == NULL)
-       return (false);
+       return false;
 
    SaveTriggerData = (TriggerData *) palloc(sizeof(TriggerData));
    SaveTriggerData->tg_event =
@@ -690,7 +690,7 @@ ExecBRDeleteTriggers(Relation rel, ItemPointer tupleid)
    pfree(SaveTriggerData);
    pfree(trigtuple);
 
-   return ((newtuple == NULL) ? false : true);
+   return (newtuple == NULL) ? false : true;
 }
 
 void
@@ -736,7 +736,7 @@ ExecBRUpdateTriggers(Relation rel, ItemPointer tupleid, HeapTuple newtuple)
 
    trigtuple = GetTupleForTrigger(rel, tupleid, true);
    if (trigtuple == NULL)
-       return (NULL);
+       return NULL;
 
    SaveTriggerData = (TriggerData *) palloc(sizeof(TriggerData));
    SaveTriggerData->tg_event =
@@ -757,7 +757,7 @@ ExecBRUpdateTriggers(Relation rel, ItemPointer tupleid, HeapTuple newtuple)
    CurrentTriggerData = NULL;
    pfree(SaveTriggerData);
    pfree(trigtuple);
-   return (newtuple);
+   return newtuple;
 }
 
 void
@@ -816,7 +816,7 @@ GetTupleForTrigger(Relation relation, ItemPointer tid, bool before)
        {
            elog(NOTICE, "GetTupleForTrigger: Non-functional delete/update");
            ReleaseBuffer(b);
-           return (NULL);
+           return NULL;
        }
 
        HeapTupleSatisfies(lp, relation, b, dp,
@@ -831,5 +831,5 @@ GetTupleForTrigger(Relation relation, ItemPointer tid, bool before)
    tuple = heap_copytuple(tuple);
    ReleaseBuffer(b);
 
-   return (tuple);
+   return tuple;
 }
index 349e0aad07705da5f6c0dbcc9578edfb418c1ed3..a61bfd5f2e5b067b3e6bbef2edf62c9a12a827b6 100644 (file)
@@ -125,7 +125,7 @@ DefineUser(CreateUserStmt *stmt)
     * exist.
     */
    pg_shadow_rel = heap_openr(ShadowRelationName);
-   pg_shadow_dsc = RelationGetTupleDescriptor(pg_shadow_rel);
+   pg_shadow_dsc = RelationGetDescr(pg_shadow_rel);
 
    /*
     * Secure a write lock on pg_shadow so we can be sure of what the next
@@ -247,7 +247,7 @@ AlterUser(AlterUserStmt *stmt)
     * Scan the pg_shadow relation to be certain the user exists.
     */
    pg_shadow_rel = heap_openr(ShadowRelationName);
-   pg_shadow_dsc = RelationGetTupleDescriptor(pg_shadow_rel);
+   pg_shadow_dsc = RelationGetDescr(pg_shadow_rel);
 
    /*
     * Secure a write lock on pg_shadow so we can be sure that when the
@@ -363,7 +363,7 @@ RemoveUser(char *user)
     * message.
     */
    pg_shadow_rel = heap_openr(ShadowRelationName);
-   pg_dsc = RelationGetTupleDescriptor(pg_shadow_rel);
+   pg_dsc = RelationGetDescr(pg_shadow_rel);
 
    /*
     * Secure a write lock on pg_shadow so we can be sure that when the
@@ -390,7 +390,7 @@ RemoveUser(char *user)
     * owned by usesysid.  Then drop them.
     */
    pg_rel = heap_openr(DatabaseRelationName);
-   pg_dsc = RelationGetTupleDescriptor(pg_rel);
+   pg_dsc = RelationGetDescr(pg_rel);
 
    scan = heap_beginscan(pg_rel, false, SnapshotNow, 0, NULL);
    while (HeapTupleIsValid(tuple = heap_getnext(scan, 0)))
index fe0b59d8ec38080c18b46fdf1b30406ac0c2bb6c..1d522795b22ec4b2d5a27118066712aa3fbd12ab 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.78 1998/08/28 04:57:21 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.79 1998/09/01 03:22:08 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -87,7 +87,7 @@ static void vc_vacpage(Page page, VPageDescr vpd);
 static void vc_vaconeind(VPageList vpl, Relation indrel, int num_tuples);
 static void vc_scanoneind(Relation indrel, int num_tuples);
 static void vc_attrstats(Relation onerel, VRelStats *vacrelstats, HeapTuple tuple);
-static void vc_bucketcpy(AttributeTupleForm attr, Datum value, Datum *bucket, int16 *bucket_len);
+static void vc_bucketcpy(Form_pg_attribute attr, Datum value, Datum *bucket, int16 *bucket_len);
 static void vc_updstats(Oid relid, int num_pages, int num_tuples, bool hasindex, VRelStats *vacrelstats);
 static void vc_delhilowstats(Oid relid, int attcnt, int *attnums);
 static void vc_setpagelock(Relation rel, BlockNumber blkno);
@@ -295,7 +295,7 @@ vc_getrels(NameData *VacRelP)
    vrl = cur = (VRelList) NULL;
 
    rel = heap_openr(RelationRelationName);
-   tupdesc = RelationGetTupleDescriptor(rel);
+   tupdesc = RelationGetDescr(rel);
 
    scan = heap_beginscan(rel, false, SnapshotNow, 1, &key);
 
@@ -354,7 +354,7 @@ vc_getrels(NameData *VacRelP)
 
    CommitTransactionCommand();
 
-   return (vrl);
+   return vrl;
 }
 
 /*
@@ -390,7 +390,7 @@ vc_vacone(Oid relid, bool analyze, List *va_cols)
    StartTransactionCommand();
 
    rel = heap_openr(RelationRelationName);
-   tupdesc = RelationGetTupleDescriptor(rel);
+   tupdesc = RelationGetDescr(rel);
 
    /*
     * Race condition -- if the pg_class tuple has gone away since the
@@ -417,7 +417,7 @@ vc_vacone(Oid relid, bool analyze, List *va_cols)
    {
        int         attr_cnt,
                   *attnums = NULL;
-       AttributeTupleForm *attr;
+       Form_pg_attribute *attr;
 
        attr_cnt = onerel->rd_att->natts;
        attr = onerel->rd_att->attrs;
@@ -457,7 +457,7 @@ vc_vacone(Oid relid, bool analyze, List *va_cols)
        for (i = 0; i < attr_cnt; i++)
        {
            Operator    func_operator;
-           OperatorTupleForm pgopform;
+           Form_pg_operator pgopform;
            VacAttrStats *stats;
 
            stats = &vacrelstats->vacattrstats[i];
@@ -474,7 +474,7 @@ vc_vacone(Oid relid, bool analyze, List *va_cols)
            func_operator = oper("=", stats->attr->atttypid, stats->attr->atttypid, true);
            if (func_operator != NULL)
            {
-               pgopform = (OperatorTupleForm) GETSTRUCT(func_operator);
+               pgopform = (Form_pg_operator) GETSTRUCT(func_operator);
                fmgr_info(pgopform->oprcode, &(stats->f_cmpeq));
            }
            else
@@ -483,7 +483,7 @@ vc_vacone(Oid relid, bool analyze, List *va_cols)
            func_operator = oper("<", stats->attr->atttypid, stats->attr->atttypid, true);
            if (func_operator != NULL)
            {
-               pgopform = (OperatorTupleForm) GETSTRUCT(func_operator);
+               pgopform = (Form_pg_operator) GETSTRUCT(func_operator);
                fmgr_info(pgopform->oprcode, &(stats->f_cmplt));
            }
            else
@@ -492,7 +492,7 @@ vc_vacone(Oid relid, bool analyze, List *va_cols)
            func_operator = oper(">", stats->attr->atttypid, stats->attr->atttypid, true);
            if (func_operator != NULL)
            {
-               pgopform = (OperatorTupleForm) GETSTRUCT(func_operator);
+               pgopform = (Form_pg_operator) GETSTRUCT(func_operator);
                fmgr_info(pgopform->oprcode, &(stats->f_cmpgt));
            }
            else
@@ -502,7 +502,7 @@ vc_vacone(Oid relid, bool analyze, List *va_cols)
                                     ObjectIdGetDatum(stats->attr->atttypid),
                                         0, 0, 0);
            if (HeapTupleIsValid(typetuple))
-               stats->outfunc = ((TypeTupleForm) GETSTRUCT(typetuple))->typoutput;
+               stats->outfunc = ((Form_pg_type) GETSTRUCT(typetuple))->typoutput;
            else
                stats->outfunc = InvalidOid;
        }
@@ -975,7 +975,7 @@ vc_rpfheap(VRelStats *vacrelstats, Relation onerel,
    if (Irel != (Relation *) NULL)      /* preparation for index' inserts */
    {
        vc_mkindesc(onerel, nindices, Irel, &Idesc);
-       tupdesc = RelationGetTupleDescriptor(onerel);
+       tupdesc = RelationGetDescr(onerel);
        idatum = (Datum *) palloc(INDEX_MAX_KEYS * sizeof(*idatum));
        inulls = (char *) palloc(INDEX_MAX_KEYS * sizeof(*inulls));
    }
@@ -1559,14 +1559,14 @@ vc_tidreapped(ItemPointer itemptr, VPageList vpl)
                                    vc_cmp_blk);
 
    if (vpp == (VPageDescr *) NULL)
-       return ((VPageDescr) NULL);
+       return (VPageDescr) NULL;
    vp = *vpp;
 
    /* ok - we are on true page */
 
    if (vp->vpd_offsets_free == 0)
    {                           /* this is EmptyPage !!! */
-       return (vp);
+       return vp;
    }
 
    voff = (OffsetNumber *) vc_find_eq((char *) (vp->vpd_offsets),
@@ -1574,9 +1574,9 @@ vc_tidreapped(ItemPointer itemptr, VPageList vpl)
                                       vc_cmp_offno);
 
    if (voff == (OffsetNumber *) NULL)
-       return ((VPageDescr) NULL);
+       return (VPageDescr) NULL;
 
-   return (vp);
+   return vp;
 
 }  /* vc_tidreapped */
 
@@ -1702,7 +1702,7 @@ vc_attrstats(Relation onerel, VRelStats *vacrelstats, HeapTuple tuple)
  *
  */
 static void
-vc_bucketcpy(AttributeTupleForm attr, Datum value, Datum *bucket, int16 *bucket_len)
+vc_bucketcpy(Form_pg_attribute attr, Datum value, Datum *bucket, int16 *bucket_len)
 {
    if (attr->attbyval && attr->attlen != -1)
        *bucket = value;
@@ -1744,7 +1744,7 @@ vc_updstats(Oid relid, int num_pages, int num_tuples, bool hasindex, VRelStats *
                stup;
    Form_pg_class pgcform;
    ScanKeyData askey;
-   AttributeTupleForm attp;
+   Form_pg_attribute attp;
    Buffer      buffer;
    
    /*
@@ -1790,7 +1790,7 @@ vc_updstats(Oid relid, int num_pages, int num_tuples, bool hasindex, VRelStats *
            Datum       values[Natts_pg_statistic];
            char        nulls[Natts_pg_statistic];
 
-           attp = (AttributeTupleForm) GETSTRUCT(atup);
+           attp = (Form_pg_attribute) GETSTRUCT(atup);
            if (attp->attnum <= 0)      /* skip system attributes for now, */
                /* they are unique anyway */
                continue;
@@ -2040,27 +2040,27 @@ vc_find_eq(char *bot, int nelem, int size, char *elm, int (*compar) (char *, cha
        {
            res = compar(bot, elm);
            if (res > 0)
-               return (NULL);
+               return NULL;
            if (res == 0)
-               return (bot);
+               return bot;
            first_move = false;
        }
        if (last_move == true)
        {
            res = compar(elm, bot + last * size);
            if (res > 0)
-               return (NULL);
+               return NULL;
            if (res == 0)
-               return (bot + last * size);
+               return bot + last * size;
            last_move = false;
        }
        res = compar(elm, bot + celm * size);
        if (res == 0)
-           return (bot + celm * size);
+           return bot + celm * size;
        if (res < 0)
        {
            if (celm == 0)
-               return (NULL);
+               return NULL;
            last = celm - 1;
            celm = celm / 2;
            last_move = true;
@@ -2068,7 +2068,7 @@ vc_find_eq(char *bot, int nelem, int size, char *elm, int (*compar) (char *, cha
        }
 
        if (celm == last)
-           return (NULL);
+           return NULL;
 
        last = last - celm - 1;
        bot = bot + (celm + 1) * size;
@@ -2088,10 +2088,10 @@ vc_cmp_blk(char *left, char *right)
    rblk = (*((VPageDescr *) right))->vpd_blkno;
 
    if (lblk < rblk)
-       return (-1);
+       return -1;
    if (lblk == rblk)
-       return (0);
-   return (1);
+       return 0;
+   return 1;
 
 }  /* vc_cmp_blk */
 
@@ -2100,10 +2100,10 @@ vc_cmp_offno(char *left, char *right)
 {
 
    if (*(OffsetNumber *) left < *(OffsetNumber *) right)
-       return (-1);
+       return -1;
    if (*(OffsetNumber *) left == *(OffsetNumber *) right)
-       return (0);
-   return (1);
+       return 0;
+   return 1;
 
 }  /* vc_cmp_offno */
 
@@ -2129,7 +2129,7 @@ vc_getindices(Oid relid, int *nindices, Relation **Irel)
 
    /* prepare a heap scan on the pg_index relation */
    pgindex = heap_openr(IndexRelationName);
-   tupdesc = RelationGetTupleDescriptor(pgindex);
+   tupdesc = RelationGetDescr(pgindex);
 
    ScanKeyEntryInitialize(&key, 0x0, Anum_pg_index_indrelid,
                           F_OIDEQ,
@@ -2217,7 +2217,7 @@ vc_mkindesc(Relation onerel, int nindices, Relation *Irel, IndDesc **Idesc)
                                        0, 0, 0);
        Assert(cachetuple);
        /* we never free the copy we make, because Idesc needs it for later */
-       idcur->tform = (IndexTupleForm) GETSTRUCT(cachetuple);
+       idcur->tform = (Form_pg_index) GETSTRUCT(cachetuple);
        for (attnumP = &(idcur->tform->indkey[0]), natts = 0;
             *attnumP != InvalidAttrNumber && natts != INDEX_MAX_KEYS;
             attnumP++, natts++);
@@ -2245,15 +2245,15 @@ vc_enough_space(VPageDescr vpd, Size len)
    len = DOUBLEALIGN(len);
 
    if (len > vpd->vpd_free)
-       return (false);
+       return false;
 
    if (vpd->vpd_offsets_used < vpd->vpd_offsets_free)  /* there are free itemid(s) */
-       return (true);          /* and len <= free_space */
+       return true;            /* and len <= free_space */
 
    /* ok. noff_usd >= noff_free and so we'll have to allocate new itemid */
    if (len <= vpd->vpd_free - sizeof(ItemIdData))
-       return (true);
+       return true;
 
-   return (false);
+   return false;
 
 }  /* vc_enough_space */
index 2e59fd05dd41a0b822d8dd782ed6eca76222ecaf..e01967f43b7a6176e5bb75906de1c9722c7d5683 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for handling of 'SET var TO',
  * 'SHOW var' and 'RESET var' statements.
  *
- * $Id: variable.c,v 1.10 1998/07/26 04:30:26 scrappy Exp $
+ * $Id: variable.c,v 1.11 1998/09/01 03:22:10 momjian Exp $
  *
  */
 
@@ -73,13 +73,13 @@ get_token(char **tok, char **val, const char *str)
    /* end of string? */
    if (!(*str))
    {
-       return (str);
+       return str;
 
        /* delimiter? */
    }
    else if (*str == ',')
    {
-       return (++str);
+       return ++str;
 
    }
    else if ((val == NULL) || (*str != '='))
@@ -117,9 +117,9 @@ get_token(char **tok, char **val, const char *str)
        str++;
 
    if (!(*str))
-       return (NULL);
+       return NULL;
    if (*str == ',')
-       return (++str);
+       return ++str;
 
    elog(ERROR, "Syntax error near (%s)", str);
 
index 92bef496fcca567c5e29911636939952745b0523..24b524fbf558560a9c2d9b513f85ae13fda44dd2 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/executor/Attic/execFlatten.c,v 1.5 1997/09/08 21:42:55 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/executor/Attic/execFlatten.c,v 1.6 1998/09/01 03:22:11 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -222,7 +222,7 @@ FjoinBumpOuterNodes(TargetEntry *tlist,
    if (funcIsDone)
    {
        set_fj_initialized(fjNode, false);
-       return (true);
+       return true;
    }
 
    /*
index 9e4937e4682f8db8c3612b9a56bbadb3f8c5e98c..bba39a183f2d681b321144af2d60e30ed70d0feb 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/executor/execJunk.c,v 1.13 1998/07/20 20:48:50 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/executor/execJunk.c,v 1.14 1998/09/01 03:22:13 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -244,7 +244,7 @@ ExecInitJunkFilter(List *targetList)
    junkfilter->jf_cleanTupType = cleanTupType;
    junkfilter->jf_cleanMap = cleanMap;
 
-   return (junkfilter);
+   return junkfilter;
 
 }
 
@@ -301,7 +301,7 @@ ExecGetJunkAttribute(JunkFilter *junkfilter,
    if (resno == InvalidAttrNumber)
    {
        /* Ooops! We couldn't find this attribute... */
-       return (false);
+       return false;
    }
 
    /* ---------------------
@@ -414,5 +414,5 @@ ExecRemoveJunk(JunkFilter *junkfilter, TupleTableSlot *slot)
        pfree(nulls);
    }
 
-   return (cleanTuple);
+   return cleanTuple;
 }
index 41943446a7ea2052d9f6fac2dfe3b73ced597014..3d782f34b0a365b0b1a26b8bec98759178881374 100644 (file)
@@ -26,7 +26,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.53 1998/08/19 02:01:59 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.54 1998/09/01 03:22:14 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -839,7 +839,7 @@ ExecutePlan(EState *estate,
 
                /*
                 * Total hack. I'm ignoring any accessor functions for
-                * Relation, RelationTupleForm, NameData. Assuming that
+                * Relation, RelationForm, NameData. Assuming that
                 * NameData.data has offset 0.
                 */
            case CMD_NOTIFY:
@@ -1288,7 +1288,7 @@ ExecAttrDefault(Relation rel, HeapTuple tuple)
    pfree(econtext);
 
    if (repl == NULL)
-       return (tuple);
+       return tuple;
 
    newtuple = heap_modifytuple(tuple, rel, replValue, replNull, repl);
 
@@ -1297,7 +1297,7 @@ ExecAttrDefault(Relation rel, HeapTuple tuple)
    pfree(replNull);
    pfree(replValue);
 
-   return (newtuple);
+   return newtuple;
 
 }
 
@@ -1346,7 +1346,7 @@ ExecRelCheck(Relation rel, HeapTuple tuple)
        pfree(qual);
 
        if (!res)
-           return (check[i].ccname);
+           return check[i].ccname;
    }
 
    pfree(slot);
@@ -1355,7 +1355,7 @@ ExecRelCheck(Relation rel, HeapTuple tuple)
    pfree(rtlist);
    pfree(econtext);
 
-   return ((char *) NULL);
+   return (char *) NULL;
 
 }
 
@@ -1391,5 +1391,5 @@ ExecConstraints(char *caller, Relation rel, HeapTuple tuple)
            elog(ERROR, "%s: rejected due to CHECK constraint %s", caller, failed);
    }
 
-   return (newtuple);
+   return newtuple;
 }
index 8f167b8546cd2e4fe0d3b19c32d91f9f115947ff..87c411475c94b719d13e8d727f35ebd1cadb3d32 100644 (file)
@@ -11,7 +11,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/executor/execProcnode.c,v 1.11 1998/06/15 19:28:19 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/executor/execProcnode.c,v 1.12 1998/09/01 03:22:17 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -123,7 +123,7 @@ ExecInitNode(Plan *node, EState *estate, Plan *parent)
    {
        result = ExecInitSubPlan((SubPlan *) lfirst(subp), estate, node);
        if (result == FALSE)
-           return (FALSE);
+           return FALSE;
    }
 
    switch (nodeTag(node))
@@ -211,7 +211,7 @@ ExecInitNode(Plan *node, EState *estate, Plan *parent)
        {
            result = ExecInitSubPlan((SubPlan *) lfirst(subp), estate, node);
            if (result == FALSE)
-               return (FALSE);
+               return FALSE;
        }
    }
 
index 55a16f53b2f3c4e16f8b066f2042663b4bf214a1..72de0b8faf7c738911c1bd678a3f4ee975a51b75 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.34 1998/08/01 22:12:02 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.35 1998/09/01 03:22:18 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -390,7 +390,7 @@ ExecEvalParam(Param *expression, ExprContext *econtext, bool *isNull)
            ExecSetParamPlan(prm->execPlan);
        Assert(prm->execPlan == NULL);
        *isNull = prm->isnull;
-       return (prm->value);
+       return prm->value;
    }
 
    thisParameterName = expression->paramname;
@@ -487,7 +487,7 @@ ExecEvalParam(Param *expression, ExprContext *econtext, bool *isNull)
                                 tle, tup, isNull);
        return value;
    }
-   return (paramList->value);
+   return paramList->value;
 }
 
 
@@ -545,7 +545,7 @@ att_by_num(TupleTableSlot *slot,
           AttrNumber attrno,
           bool *isNull)
 {
-   return (GetAttributeByNum(slot, attrno, isNull));
+   return GetAttributeByNum(slot, attrno, isNull);
 }
 
 #endif
@@ -604,7 +604,7 @@ GetAttributeByName(TupleTableSlot *slot, char *attname, bool *isNull)
 char *
 att_by_name(TupleTableSlot *slot, char *attname, bool *isNull)
 {
-   return (GetAttributeByName(slot, attname, isNull));
+   return GetAttributeByName(slot, attname, isNull);
 }
 
 #endif
@@ -829,7 +829,7 @@ ExecMakeFunctionResult(Node *node,
            if (fcache->nullVect[i] == true)
                *isNull = true;
 
-       return ((Datum) fmgr_c(&fcache->func, (FmgrValues *) argV, isNull));
+       return (Datum) fmgr_c(&fcache->func, (FmgrValues *) argV, isNull);
    }
 }
 
index 90ba4e5f1104f782c1f02581ad9b2b6a89394d02..9517b731b2b06c2bb5e1e04451691c632ca48b8e 100644 (file)
@@ -14,7 +14,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.19 1998/07/15 14:54:29 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.20 1998/09/01 03:22:20 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -869,7 +869,7 @@ ExecCopyTupType(TupleDesc td, int natts)
    while (i < natts)
        {
            newTd[i] =
-               (AttributeTupleForm)palloc(sizeof(FormData_pg_attribute));
+               (Form_pg_attribute)palloc(sizeof(FormData_pg_attribute));
            memmove(newTd[i], td[i], sizeof(FormData_pg_attribute));
            i++;
        }
index bbc8e2d94085f8ddf63d3b1a8aad7cfab4997da6..7cc53dce4850b0f07c3c38dd9c75b63cb8c1a3ae 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.36 1998/08/20 22:07:41 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.37 1998/09/01 03:22:21 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -58,7 +58,7 @@
 #include "utils/mcxt.h"
 
 static void
-ExecGetIndexKeyInfo(IndexTupleForm indexTuple, int *numAttsOutP,
+ExecGetIndexKeyInfo(Form_pg_index indexTuple, int *numAttsOutP,
                    AttrNumber **attsOutP, FuncIndexInfoPtr fInfoP);
 
 /* ----------------------------------------------------------------
@@ -484,7 +484,7 @@ ExecSetTypeInfo(int index,
                bool attbyVal,
                char attalign)
 {
-   AttributeTupleForm att;
+   Form_pg_attribute att;
 
    /* ----------------
     *  get attribute pointer and preform a sanity check..
@@ -600,7 +600,7 @@ QueryDescGetTypeInfo(QueryDesc *queryDesc)
  * ----------------------------------------------------------------
  */
 static void
-ExecGetIndexKeyInfo(IndexTupleForm indexTuple,
+ExecGetIndexKeyInfo(Form_pg_index indexTuple,
                    int *numAttsOutP,
                    AttrNumber **attsOutP,
                    FuncIndexInfoPtr fInfoP)
@@ -706,7 +706,7 @@ ExecOpenIndices(Oid resultRelationOid,
    HeapScanDesc indexSd;
    ScanKeyData key;
    HeapTuple   tuple;
-   IndexTupleForm indexStruct;
+   Form_pg_index indexStruct;
    Oid         indexOid;
    List       *oidList;
    List       *nkeyList;
@@ -770,7 +770,7 @@ ExecOpenIndices(Oid resultRelationOid,
         *  first get the oid of the index relation from the tuple
         * ----------------
         */
-       indexStruct = (IndexTupleForm) GETSTRUCT(tuple);
+       indexStruct = (Form_pg_index) GETSTRUCT(tuple);
        indexOid = indexStruct->indexrelid;
 
        /* ----------------
@@ -1005,8 +1005,8 @@ ExecFormIndexTuple(HeapTuple heapTuple,
     *  how to form the index tuples..
     * ----------------
     */
-   heapDescriptor = RelationGetTupleDescriptor(heapRelation);
-   indexDescriptor = RelationGetTupleDescriptor(indexRelation);
+   heapDescriptor = RelationGetDescr(heapRelation);
+   indexDescriptor = RelationGetDescr(indexRelation);
 
    /* ----------------
     *  FormIndexDatum fills in its datum and null parameters
@@ -1124,7 +1124,7 @@ ExecInsertIndexTuples(TupleTableSlot *slot,
        fInfoP = indexInfo->ii_FuncIndexInfo;
        datum = (Datum *) palloc(numberOfAttributes * sizeof *datum);
        nulls = (char *) palloc(numberOfAttributes * sizeof *nulls);
-       heapDescriptor = (TupleDesc) RelationGetTupleDescriptor(heapRelation);
+       heapDescriptor = (TupleDesc) RelationGetDescr(heapRelation);
 
        FormIndexDatum(numberOfAttributes,      /* num attributes */
                       keyAttributeNumbers,     /* array of att nums to
index 645a312fbf8ad7f2614e9bb4db35af0955471362..4d23d27178f3e5993bb56ea25b145ac5e0782c65 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/executor/functions.c,v 1.18 1998/08/24 01:37:48 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/executor/functions.c,v 1.19 1998/09/01 03:22:22 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -276,7 +276,7 @@ copy_function_result(FunctionCachePtr fcache,
        while (i < oldTuple->t_natts)
        {
            funcTd->attrs[i] =
-               (AttributeTupleForm) palloc(ATTRIBUTE_TUPLE_SIZE);
+               (Form_pg_attribute) palloc(ATTRIBUTE_TUPLE_SIZE);
            memmove(funcTd->attrs[i],
                    resultTd->attrs[i],
                    ATTRIBUTE_TUPLE_SIZE);
index eb99a1d08e85348c2f71ea04eacbdcb3404d7cd4..9fa3f011905356ff66d6bf58fdbe52fa11efed2b 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/executor/nodeHash.c,v 1.21 1998/06/15 19:28:21 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/executor/nodeHash.c,v 1.22 1998/09/01 03:22:23 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -438,7 +438,7 @@ ExecHashTableCreate(Hash *node)
        bucket->firstotuple = bucket->lastotuple = -1;
        bucket = (HashBucket) LONGALIGN(((char *) bucket + bucketsize));
    }
-   return (hashtable);
+   return hashtable;
 }
 
 /* ----------------------------------------------------------------
@@ -586,7 +586,7 @@ ExecHashGetBucket(HashJoinTable hashtable,
        printf("hash(%d) = %d\n", keyval, bucketno);
 #endif
 
-   return (bucketno);
+   return bucketno;
 }
 
 /* ----------------------------------------------------------------
@@ -810,7 +810,7 @@ hashFunc(char *key, int len)
        h = h * PRIME1 ^ (*k++);
    h %= PRIME2;
 
-   return (h);
+   return h;
 }
 
 /* ----------------------------------------------------------------
index 9a99e80da58d10c0070262795302e841f2db8aa9..c4a52fe91018a7772c0df5f83982a31f0d409bae 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/executor/nodeHashjoin.c,v 1.11 1998/02/26 04:31:26 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/executor/nodeHashjoin.c,v 1.12 1998/09/01 03:22:25 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -155,7 +155,7 @@ ExecHashJoin(HashJoin *node)
        node->hashdone = true;
    }
    else if (hashtable == NULL)
-       return (NULL);
+       return NULL;
 
    nbatch = hashtable->nbatch;
    outerbatches = hjstate->hj_OuterBatches;
index e4ebd01055ecb378597f98807e4a56faf777a2f3..03b43f09b55cec592fca50b828e9c8eeb825f808 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.25 1998/08/19 15:47:36 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.26 1998/09/01 03:22:26 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -954,7 +954,7 @@ ExecInitIndexScan(IndexScan *node, EState *estate, Plan *parent)
     *  get the scan type from the relation descriptor.
     * ----------------
     */
-   ExecAssignScanType(scanstate, RelationGetTupleDescriptor(currentRelation));
+   ExecAssignScanType(scanstate, RelationGetDescr(currentRelation));
    ExecAssignResultTypeFromTL((Plan *) node, &scanstate->cstate);
 
    /* ----------------
index 3d5496c7e665bd35021b86688a0df73538a9094a..1c957d7661232375e49bc1f8b5e514b3791920ef 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/executor/nodeMaterial.c,v 1.15 1998/08/19 02:02:03 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/executor/nodeMaterial.c,v 1.16 1998/09/01 03:22:27 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -145,7 +145,7 @@ ExecMaterial(Material *node)
        matstate->csstate.css_currentScanDesc = currentScanDesc;
 
        ExecAssignScanType(&matstate->csstate,
-                          RelationGetTupleDescriptor(currentRelation));
+                          RelationGetDescr(currentRelation));
 
        /* ----------------
         *  finally set the sorted flag to true
index 80bdef829376b062141f38dfbf80a9add1bbdfde..6b2972d4102ba8703eb0cdf88cc39436f313b915 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/executor/nodeSeqscan.c,v 1.12 1998/08/19 02:02:05 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/executor/nodeSeqscan.c,v 1.13 1998/09/01 03:22:28 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -185,7 +185,7 @@ InitScanRelation(SeqScan *node, EState *estate,
        scanstate->css_currentScanDesc = currentScanDesc;
 
        ExecAssignScanType(scanstate,
-                          RelationGetTupleDescriptor(currentRelation));
+                          RelationGetDescr(currentRelation));
    }
    else
    {
index 7c27a2608281dcbaa3dc10637a8ea625c93ea1c5..dd9ca22c656ca1fb61ba417ea80740aefbcda2a0 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/executor/nodeSort.c,v 1.15 1998/06/15 19:28:23 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/executor/nodeSort.c,v 1.16 1998/09/01 03:22:30 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -192,7 +192,7 @@ ExecSort(Sort *node)
     */
    heapTuple = psort_grabtuple(node, &should_free);
 
-   return (ExecStoreTuple(heapTuple, slot, InvalidBuffer, should_free));
+   return ExecStoreTuple(heapTuple, slot, InvalidBuffer, should_free);
 }
 
 /* ----------------------------------------------------------------
index cba1e04c884e502fb95d35fd3c7b722572a21ad6..95fa2f0afe26e5f5c6a9956eebd8c014cbfd40b4 100644 (file)
@@ -67,11 +67,11 @@ ExecSubPlan(SubPlan *node, List *pvar, ExprContext *econtext)
        if (sublink->subLinkType == EXPR_SUBLINK && found)
        {
            elog(ERROR, "ExecSubPlan: more than one tuple returned by expression subselect");
-           return ((Datum) false);
+           return (Datum) false;
        }
 
        if (sublink->subLinkType == EXISTS_SUBLINK)
-           return ((Datum) true);
+           return (Datum) true;
 
        found = true;
 
@@ -96,9 +96,9 @@ ExecSubPlan(SubPlan *node, List *pvar, ExprContext *econtext)
    }
 
    if (!found && sublink->subLinkType == ALL_SUBLINK)
-       return ((Datum) true);
+       return (Datum) true;
 
-   return ((Datum) result);
+   return (Datum) result;
 }
 
 /* ----------------------------------------------------------------
@@ -123,7 +123,7 @@ ExecInitSubPlan(SubPlan *node, EState *estate, Plan *parent)
    sp_estate->es_refcount = estate->es_refcount;
 
    if (!ExecInitNode(node->plan, sp_estate, NULL))
-       return (false);
+       return false;
 
    node->shutdown = true;
 
@@ -149,7 +149,7 @@ ExecInitSubPlan(SubPlan *node, EState *estate, Plan *parent)
         */
    }
 
-   return (true);
+   return true;
 }
 
 /* ----------------------------------------------------------------
index c7a0a99a277e392f4687df778cf673cd7244110e..b96cac45adc870bc0e5383789b075579ccbd4273 100644 (file)
@@ -15,7 +15,7 @@
  *     ExecEndTee
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/executor/Attic/nodeTee.c,v 1.21 1998/08/19 02:02:06 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/executor/Attic/nodeTee.c,v 1.22 1998/09/01 03:22:32 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -402,7 +402,7 @@ ExecTee(Tee *node, Plan *parent)
            IncrBufferRefCount(scanDesc->rs_cbuf);
 
        slot = teeState->cstate.cs_ResultTupleSlot;
-       slot->ttc_tupleDescriptor = RelationGetTupleDescriptor(bufferRel);
+       slot->ttc_tupleDescriptor = RelationGetDescr(bufferRel);
 
        result = ExecStoreTuple(heapTuple,      /* tuple to store */
                                slot,   /* slot to store in */
index 0f559e1bcdfb74d5306afc94463a6b09e6cd8fab..17f81537eeaed7b6f02ea7f79f1c9c03f59ef83f 100644 (file)
@@ -102,7 +102,7 @@ SPI_connect()
     * to _SPI_connected
     */
    if (_SPI_curid != _SPI_connected)
-       return (SPI_ERROR_CONNECT);
+       return SPI_ERROR_CONNECT;
 
    if (_SPI_stack == NULL)
    {
@@ -141,7 +141,7 @@ SPI_connect()
    _SPI_current->savedId = GetScanCommandId();
    SetScanCommandId(GetCurrentCommandId());
 
-   return (SPI_OK_CONNECT);
+   return SPI_OK_CONNECT;
 
 }
 
@@ -152,7 +152,7 @@ SPI_finish()
 
    res = _SPI_begin_call(false);       /* live in procedure memory */
    if (res < 0)
-       return (res);
+       return res;
 
    /* Restore memory context as it was before procedure call */
    MemoryContextSwitchTo(_SPI_current->savedcxt);
@@ -179,7 +179,7 @@ SPI_finish()
        _SPI_current = &(_SPI_stack[_SPI_connected]);
    }
 
-   return (SPI_OK_FINISH);
+   return SPI_OK_FINISH;
 
 }
 
@@ -189,16 +189,16 @@ SPI_exec(char *src, int tcount)
    int         res;
 
    if (src == NULL || tcount < 0)
-       return (SPI_ERROR_ARGUMENT);
+       return SPI_ERROR_ARGUMENT;
 
    res = _SPI_begin_call(true);
    if (res < 0)
-       return (res);
+       return res;
 
    res = _SPI_execute(src, tcount, NULL);
 
    _SPI_end_call(true);
-   return (res);
+   return res;
 }
 
 int
@@ -207,14 +207,14 @@ SPI_execp(void *plan, Datum *Values, char *Nulls, int tcount)
    int         res;
 
    if (plan == NULL || tcount < 0)
-       return (SPI_ERROR_ARGUMENT);
+       return SPI_ERROR_ARGUMENT;
 
    if (((_SPI_plan *) plan)->nargs > 0 && Values == NULL)
-       return (SPI_ERROR_PARAM);
+       return SPI_ERROR_PARAM;
 
    res = _SPI_begin_call(true);
    if (res < 0)
-       return (res);
+       return res;
 
    /* copy plan to current (executor) context */
    plan = (void *) _SPI_copy_plan(plan, _SPI_CPLAN_CURCXT);
@@ -222,7 +222,7 @@ SPI_execp(void *plan, Datum *Values, char *Nulls, int tcount)
    res = _SPI_execute_plan((_SPI_plan *) plan, Values, Nulls, tcount);
 
    _SPI_end_call(true);
-   return (res);
+   return res;
 }
 
 void *
@@ -233,12 +233,12 @@ SPI_prepare(char *src, int nargs, Oid *argtypes)
    if (src == NULL || nargs < 0 || (nargs > 0 && argtypes == NULL))
    {
        SPI_result = SPI_ERROR_ARGUMENT;
-       return (NULL);
+       return NULL;
    }
 
    SPI_result = _SPI_begin_call(true);
    if (SPI_result < 0)
-       return (NULL);
+       return NULL;
 
    plan = (_SPI_plan *) palloc(sizeof(_SPI_plan));     /* Executor context */
    plan->argtypes = argtypes;
@@ -253,7 +253,7 @@ SPI_prepare(char *src, int nargs, Oid *argtypes)
 
    _SPI_end_call(true);
 
-   return ((void *) plan);
+   return (void *) plan;
 
 }
 
@@ -265,19 +265,19 @@ SPI_saveplan(void *plan)
    if (plan == NULL)
    {
        SPI_result = SPI_ERROR_ARGUMENT;
-       return (NULL);
+       return NULL;
    }
 
    SPI_result = _SPI_begin_call(false);        /* don't change context */
    if (SPI_result < 0)
-       return (NULL);
+       return NULL;
 
    newplan = _SPI_copy_plan((_SPI_plan *) plan, _SPI_CPLAN_TOPCXT);
 
    _SPI_curid--;
    SPI_result = 0;
 
-   return ((void *) newplan);
+   return (void *) newplan;
 
 }
 
@@ -290,7 +290,7 @@ SPI_copytuple(HeapTuple tuple)
    if (tuple == NULL)
    {
        SPI_result = SPI_ERROR_ARGUMENT;
-       return (NULL);
+       return NULL;
    }
 
    if (_SPI_curid + 1 == _SPI_connected)       /* connected */
@@ -305,7 +305,7 @@ SPI_copytuple(HeapTuple tuple)
    if (oldcxt)
        MemoryContextSwitchTo(oldcxt);
 
-   return (ctuple);
+   return ctuple;
 }
 
 HeapTuple
@@ -324,7 +324,7 @@ SPI_modifytuple(Relation rel, HeapTuple tuple, int natts, int *attnum,
    if (rel == NULL || tuple == NULL || natts <= 0 || attnum == NULL || Values == NULL)
    {
        SPI_result = SPI_ERROR_ARGUMENT;
-       return (NULL);
+       return NULL;
    }
 
    if (_SPI_curid + 1 == _SPI_connected)       /* connected */
@@ -354,7 +354,7 @@ SPI_modifytuple(Relation rel, HeapTuple tuple, int natts, int *attnum,
        n[attnum[i] - 1] = (Nulls && Nulls[i] == 'n') ? 'n' : ' ';
    }
 
-   if (i == natts)             /* no errors in attnum[] */
+   if (i == natts)             /* no errors in *attnum */
    {
        mtuple = heap_formtuple(rel->rd_att, v, n);
        infomask = mtuple->t_infomask;
@@ -375,7 +375,7 @@ SPI_modifytuple(Relation rel, HeapTuple tuple, int natts, int *attnum,
    if (oldcxt)
        MemoryContextSwitchTo(oldcxt);
 
-   return (mtuple);
+   return mtuple;
 }
 
 int
@@ -386,10 +386,10 @@ SPI_fnumber(TupleDesc tupdesc, char *fname)
    for (res = 0; res < tupdesc->natts; res++)
    {
        if (strcasecmp(tupdesc->attrs[res]->attname.data, fname) == 0)
-           return (res + 1);
+           return res + 1;
    }
 
-   return (SPI_ERROR_NOATTRIBUTE);
+   return SPI_ERROR_NOATTRIBUTE;
 }
 
 char *
@@ -400,10 +400,10 @@ SPI_fname(TupleDesc tupdesc, int fnumber)
    if (tupdesc->natts < fnumber || fnumber <= 0)
    {
        SPI_result = SPI_ERROR_NOATTRIBUTE;
-       return (NULL);
+       return NULL;
    }
 
-   return (nameout(&(tupdesc->attrs[fnumber - 1]->attname)));
+   return nameout(&(tupdesc->attrs[fnumber - 1]->attname));
 }
 
 char *
@@ -417,17 +417,17 @@ SPI_getvalue(HeapTuple tuple, TupleDesc tupdesc, int fnumber)
    if (tuple->t_natts < fnumber || fnumber <= 0)
    {
        SPI_result = SPI_ERROR_NOATTRIBUTE;
-       return (NULL);
+       return NULL;
    }
 
    val = heap_getattr(tuple, fnumber, tupdesc, &isnull);
    if (isnull)
-       return (NULL);
+       return NULL;
    foutoid = typtoout((Oid) tupdesc->attrs[fnumber - 1]->atttypid);
    if (!OidIsValid(foutoid))
    {
        SPI_result = SPI_ERROR_NOOUTFUNC;
-       return (NULL);
+       return NULL;
    }
 
    return (fmgr(foutoid, val,
@@ -445,12 +445,12 @@ SPI_getbinval(HeapTuple tuple, TupleDesc tupdesc, int fnumber, bool *isnull)
    if (tuple->t_natts < fnumber || fnumber <= 0)
    {
        SPI_result = SPI_ERROR_NOATTRIBUTE;
-       return ((Datum) NULL);
+       return (Datum) NULL;
    }
 
    val = heap_getattr(tuple, fnumber, tupdesc, isnull);
 
-   return (val);
+   return val;
 }
 
 char *
@@ -462,7 +462,7 @@ SPI_gettype(TupleDesc tupdesc, int fnumber)
    if (tupdesc->natts < fnumber || fnumber <= 0)
    {
        SPI_result = SPI_ERROR_NOATTRIBUTE;
-       return (NULL);
+       return NULL;
    }
 
    typeTuple = SearchSysCacheTuple(TYPOID,
@@ -472,10 +472,10 @@ SPI_gettype(TupleDesc tupdesc, int fnumber)
    if (!HeapTupleIsValid(typeTuple))
    {
        SPI_result = SPI_ERROR_TYPUNKNOWN;
-       return (NULL);
+       return NULL;
    }
 
-   return (pstrdup(((TypeTupleForm) GETSTRUCT(typeTuple))->typname.data));
+   return pstrdup(((Form_pg_type) GETSTRUCT(typeTuple))->typname.data);
 }
 
 Oid
@@ -486,16 +486,16 @@ SPI_gettypeid(TupleDesc tupdesc, int fnumber)
    if (tupdesc->natts < fnumber || fnumber <= 0)
    {
        SPI_result = SPI_ERROR_NOATTRIBUTE;
-       return (InvalidOid);
+       return InvalidOid;
    }
 
-   return (tupdesc->attrs[fnumber - 1]->atttypid);
+   return tupdesc->attrs[fnumber - 1]->atttypid;
 }
 
 char *
 SPI_getrelname(Relation rel)
 {
-   return (pstrdup(rel->rd_rel->relname.data));
+   return pstrdup(rel->rd_rel->relname.data);
 }
 
 void *
@@ -516,7 +516,7 @@ SPI_palloc(Size size)
    if (oldcxt)
        MemoryContextSwitchTo(oldcxt);
 
-   return (pointer);
+   return pointer;
 }
 
 void *
@@ -536,7 +536,7 @@ SPI_repalloc(void *pointer, Size size)
    if (oldcxt)
        MemoryContextSwitchTo(oldcxt);
 
-   return (pointer);
+   return pointer;
 }
 
 void
@@ -661,13 +661,13 @@ _SPI_execute(char *src, int tcount, _SPI_plan *plan)
                CopyStmt   *stmt = (CopyStmt *) (queryTree->utilityStmt);
 
                if (stmt->filename == NULL)
-                   return (SPI_ERROR_COPY);
+                   return SPI_ERROR_COPY;
            }
            else if (nodeTag(queryTree->utilityStmt) == T_ClosePortalStmt ||
                     nodeTag(queryTree->utilityStmt) == T_FetchStmt)
-               return (SPI_ERROR_CURSOR);
+               return SPI_ERROR_CURSOR;
            else if (nodeTag(queryTree->utilityStmt) == T_TransactionStmt)
-               return (SPI_ERROR_TRANSACTION);
+               return SPI_ERROR_TRANSACTION;
            res = SPI_OK_UTILITY;
            if (plan == NULL)
            {
@@ -675,7 +675,7 @@ _SPI_execute(char *src, int tcount, _SPI_plan *plan)
                if (i < qlen - 1)
                    CommandCounterIncrement();
                else
-                   return (res);
+                   return res;
            }
            else if (i >= qlen - 1)
                break;
@@ -687,7 +687,7 @@ _SPI_execute(char *src, int tcount, _SPI_plan *plan)
            state = CreateExecutorState();
            res = _SPI_pquery(qdesc, state, (i < qlen - 1) ? 0 : tcount);
            if (res < 0 || i >= qlen - 1)
-               return (res);
+               return res;
            CommandCounterIncrement();
        }
        else
@@ -696,7 +696,7 @@ _SPI_execute(char *src, int tcount, _SPI_plan *plan)
                                    (i < qlen - 1) ? None : SPI);
            res = _SPI_pquery(qdesc, NULL, (i < qlen - 1) ? 0 : tcount);
            if (res < 0)
-               return (res);
+               return res;
            if (i >= qlen - 1)
                break;
        }
@@ -705,7 +705,7 @@ _SPI_execute(char *src, int tcount, _SPI_plan *plan)
    plan->qtlist = queryTree_list;
    plan->ptlist = ptlist;
 
-   return (res);
+   return res;
 
 }
 
@@ -745,7 +745,7 @@ _SPI_execute_plan(_SPI_plan *plan, Datum *Values, char *Nulls, int tcount)
            if (i < qlen - 1)
                CommandCounterIncrement();
            else
-               return (SPI_OK_UTILITY);
+               return SPI_OK_UTILITY;
        }
        else
        {
@@ -771,12 +771,12 @@ _SPI_execute_plan(_SPI_plan *plan, Datum *Values, char *Nulls, int tcount)
                state->es_param_list_info = NULL;
            res = _SPI_pquery(qdesc, state, (i < qlen - 1) ? 0 : tcount);
            if (res < 0 || i >= qlen - 1)
-               return (res);
+               return res;
            CommandCounterIncrement();
        }
    }
 
-   return (res);
+   return res;
 
 }
 
@@ -803,7 +803,7 @@ _SPI_pquery(QueryDesc *queryDesc, EState *state, int tcount)
                intoName = parseTree->into;
                parseTree->isBinary = false;    /* */
 
-               return (SPI_ERROR_CURSOR);
+               return SPI_ERROR_CURSOR;
 
            }
            else if (parseTree->into != NULL)   /* select into table */
@@ -823,11 +823,11 @@ _SPI_pquery(QueryDesc *queryDesc, EState *state, int tcount)
            res = SPI_OK_UPDATE;
            break;
        default:
-           return (SPI_ERROR_OPUNKNOWN);
+           return SPI_ERROR_OPUNKNOWN;
    }
 
    if (state == NULL)          /* plan preparation */
-       return (res);
+       return res;
 #ifdef SPI_EXECUTOR_STATS
    if (ShowExecutorStats)
        ResetUsage();
@@ -843,7 +843,7 @@ _SPI_pquery(QueryDesc *queryDesc, EState *state, int tcount)
                      state,
                      tupdesc,
                      None);
-       return (SPI_OK_CURSOR);
+       return SPI_OK_CURSOR;
    }
 
    ExecutorRun(queryDesc, state, EXEC_FOR, tcount);
@@ -872,7 +872,7 @@ _SPI_pquery(QueryDesc *queryDesc, EState *state, int tcount)
    }
    queryDesc->dest = dest;
 
-   return (res);
+   return res;
 
 }
 
@@ -925,7 +925,7 @@ _SPI_execmem()
    phmem = PortalGetHeapMemory(_SPI_current->portal);
    oldcxt = MemoryContextSwitchTo((MemoryContext) phmem);
 
-   return (oldcxt);
+   return oldcxt;
 
 }
 
@@ -938,7 +938,7 @@ _SPI_procmem()
    pvmem = PortalGetVariableMemory(_SPI_current->portal);
    oldcxt = MemoryContextSwitchTo((MemoryContext) pvmem);
 
-   return (oldcxt);
+   return oldcxt;
 
 }
 
@@ -950,7 +950,7 @@ static int
 _SPI_begin_call(bool execmem)
 {
    if (_SPI_curid + 1 != _SPI_connected)
-       return (SPI_ERROR_UNCONNECTED);
+       return SPI_ERROR_UNCONNECTED;
    _SPI_curid++;
    if (_SPI_current != &(_SPI_stack[_SPI_curid]))
        elog(FATAL, "SPI: stack corrupted");
@@ -961,7 +961,7 @@ _SPI_begin_call(bool execmem)
        StartPortalAllocMode(DefaultAllocMode, 0);
    }
 
-   return (0);
+   return 0;
 }
 
 static int
@@ -986,7 +986,7 @@ _SPI_end_call(bool procmem)
        _SPI_procmem();
    }
 
-   return (0);
+   return 0;
 }
 
 static bool
@@ -1010,7 +1010,7 @@ _SPI_checktuples()
            failed = true;
    }
 
-   return (failed);
+   return failed;
 }
 
 static _SPI_plan *
@@ -1048,5 +1048,5 @@ _SPI_copy_plan(_SPI_plan *plan, int location)
    if (location != _SPI_CPLAN_CURCXT)
        MemoryContextSwitchTo(oldcxt);
 
-   return (newplan);
+   return newplan;
 }
index 40eb3ff8b9388f595956fac9751d6084bdab17f6..c8b50c466aa6ed4583753628baaa53e61f968235 100644 (file)
@@ -9,7 +9,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/lib/dllist.c,v 1.10 1998/06/15 19:28:23 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/lib/dllist.c,v 1.11 1998/09/01 03:22:35 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -64,7 +64,7 @@ DLFreeElem(Dlelem *e)
 Dlelem *
 DLGetHead(Dllist *l)
 {
-   return (l ? l->dll_head : 0);
+   return l ? l->dll_head : 0;
 }
 
 /* get the value stored in the first element */
@@ -74,7 +74,7 @@ DLGetHeadVal(Dllist *l)
 {
    Dlelem     *e = DLGetHead(l);
 
-   return (e ? e->dle_val : 0);
+   return e ? e->dle_val : 0;
 }
 
 #endif
@@ -82,7 +82,7 @@ DLGetHeadVal(Dllist *l)
 Dlelem *
 DLGetTail(Dllist *l)
 {
-   return (l ? l->dll_tail : 0);
+   return l ? l->dll_tail : 0;
 }
 
 /* get the value stored in the first element */
@@ -92,7 +92,7 @@ DLGetTailVal(Dllist *l)
 {
    Dlelem     *e = DLGetTail(l);
 
-   return (e ? e->dle_val : 0);
+   return e ? e->dle_val : 0;
 }
 
 #endif
@@ -100,13 +100,13 @@ DLGetTailVal(Dllist *l)
 Dlelem *
 DLGetPred(Dlelem *e)           /* get predecessor */
 {
-   return (e ? e->dle_prev : 0);
+   return e ? e->dle_prev : 0;
 }
 
 Dlelem *
 DLGetSucc(Dlelem *e)           /* get successor */
 {
-   return (e ? e->dle_next : 0);
+   return e ? e->dle_next : 0;
 }
 
 void
index ae81edf251d18328b763b06ea77d56471629ea15..0970daa3422575590798223a00573589921813eb 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/lib/Attic/fstack.c,v 1.8 1998/06/15 19:28:24 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/lib/Attic/fstack.c,v 1.9 1998/09/01 03:22:37 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -62,12 +62,12 @@ FixedStackPop(FixedStack stack)
    AssertArg(FixedStackIsValid(stack));
 
    if (!PointerIsValid(stack->top))
-       return (NULL);
+       return NULL;
 
    pointer = FixedStackGetItemBase(stack, stack->top);
    stack->top = stack->top->next;
 
-   return (pointer);
+   return pointer;
 }
 
 void
@@ -108,9 +108,9 @@ FixedStackContains(FixedStack stack, Pointer pointer)
    for (next = stack->top; FixedItemIsValid(next); next = next->next)
    {
        if (next == item)
-           return (true);
+           return true;
    }
-   return (false);
+   return false;
 }
 
 #endif
@@ -121,9 +121,9 @@ FixedStackGetTop(FixedStack stack)
    AssertArg(FixedStackIsValid(stack));
 
    if (!PointerIsValid(stack->top))
-       return (NULL);
+       return NULL;
 
-   return (FixedStackGetItemBase(stack, stack->top));
+   return FixedStackGetItemBase(stack, stack->top);
 }
 
 Pointer
@@ -138,7 +138,7 @@ FixedStackGetNext(FixedStack stack, Pointer pointer)
    item = FixedStackGetItem(stack, pointer)->next;
 
    if (!PointerIsValid(item))
-       return (NULL);
+       return NULL;
 
-   return (FixedStackGetItemBase(stack, item));
+   return FixedStackGetItemBase(stack, item);
 }
index c6e2bdbab6adf9f8c0fcf477dd5168da015c5e10..f815c30b44df8447895a151e7880bf2301fea528 100644 (file)
@@ -6,7 +6,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/lib/Attic/lispsort.c,v 1.8 1998/02/26 04:31:39 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/lib/Attic/lispsort.c,v 1.9 1998/09/01 03:22:38 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -42,7 +42,7 @@ lisp_qsort(List *the_list,        /* the list to be sorted */
    /* find size of list */
    num = length(the_list);
    if (num < 2)
-       return (copyObject(the_list));
+       return copyObject(the_list);
 
    /* copy elements of the list into an array */
    nodearray = (List **) palloc(num * sizeof(List *));
@@ -58,7 +58,7 @@ lisp_qsort(List *the_list,        /* the list to be sorted */
    for (i = num - 1; i >= 0; i--)
        output = lcons(nodearray[i], output);
 
-   return (output);
+   return output;
 }
 
 #endif
index af85d2cf7e308a1146e54e4a1895b885f90a6029..5dbfde953f3cd0134a4d7cd0378b6946c59d0f5f 100644 (file)
@@ -9,7 +9,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/lib/stringinfo.c,v 1.10 1998/06/15 19:28:24 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/lib/stringinfo.c,v 1.11 1998/09/01 03:22:39 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -54,7 +54,7 @@ makeStringInfo()
     */
    res->data[0] = '\0';
 
-   return (res);
+   return res;
 }
 
 /*---------------------------------------------------------------------
index c1cc08f4c797cb7c7adf6048bbf41df02d36c238..027f945a3d86ca1a40bb4d3f0d69398f40233871 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.29 1998/07/09 03:28:45 scrappy Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.30 1998/09/01 03:22:41 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -103,7 +103,7 @@ pg_krb4_recvauth(Port *port)
                krb_err_txt[status]);
        fputs(PQerrormsg, stderr);
        pqdebug("%s", PQerrormsg);
-       return (STATUS_ERROR);
+       return STATUS_ERROR;
    }
    if (strncmp(version, PG_KRB4_VERSION, KRB_SENDAUTH_VLEN))
    {
@@ -112,7 +112,7 @@ pg_krb4_recvauth(Port *port)
                PG_KRB4_VERSION);
        fputs(PQerrormsg, stderr);
        pqdebug("%s", PQerrormsg);
-       return (STATUS_ERROR);
+       return STATUS_ERROR;
    }
    if (strncmp(port->user, auth_data.pname, SM_USER))
    {
@@ -122,9 +122,9 @@ pg_krb4_recvauth(Port *port)
                auth_data.pname);
        fputs(PQerrormsg, stderr);
        pqdebug("%s", PQerrormsg);
-       return (STATUS_ERROR);
+       return STATUS_ERROR;
    }
-   return (STATUS_OK);
+   return STATUS_OK;
 }
 
 #else
@@ -137,7 +137,7 @@ pg_krb4_recvauth(Port *port)
    fputs(PQerrormsg, stderr);
    pqdebug("%s", PQerrormsg);
 
-   return (STATUS_ERROR);
+   return STATUS_ERROR;
 }
 
 #endif                         /* KRB4 */
@@ -174,7 +174,7 @@ pg_an_to_ln(char *aname)
 
    if ((p = strchr(aname, '/')) || (p = strchr(aname, '@')))
        *p = '\0';
-   return (aname);
+   return aname;
 }
 
 /*
@@ -230,7 +230,7 @@ pg_krb5_recvauth(Port *port)
              "pg_krb5_recvauth: Kerberos error %d in krb5_parse_name\n",
                code);
        com_err("pg_krb5_recvauth", code, "in krb5_parse_name");
-       return (STATUS_ERROR);
+       return STATUS_ERROR;
    }
 
    /*
@@ -265,7 +265,7 @@ pg_krb5_recvauth(Port *port)
                code);
        com_err("pg_krb5_recvauth", code, "in krb5_recvauth");
        krb5_free_principal(server);
-       return (STATUS_ERROR);
+       return STATUS_ERROR;
    }
    krb5_free_principal(server);
 
@@ -281,7 +281,7 @@ pg_krb5_recvauth(Port *port)
                code);
        com_err("pg_krb5_recvauth", code, "in krb5_unparse_name");
        krb5_free_principal(client);
-       return (STATUS_ERROR);
+       return STATUS_ERROR;
    }
    krb5_free_principal(client);
    if (!kusername)
@@ -290,7 +290,7 @@ pg_krb5_recvauth(Port *port)
                "pg_krb5_recvauth: could not decode username\n");
        fputs(PQerrormsg, stderr);
        pqdebug("%s", PQerrormsg);
-       return (STATUS_ERROR);
+       return STATUS_ERROR;
    }
    kusername = pg_an_to_ln(kusername);
    if (strncmp(username, kusername, SM_USER))
@@ -301,10 +301,10 @@ pg_krb5_recvauth(Port *port)
        fputs(PQerrormsg, stderr);
        pqdebug("%s", PQerrormsg);
        pfree(kusername);
-       return (STATUS_ERROR);
+       return STATUS_ERROR;
    }
    pfree(kusername);
-   return (STATUS_OK);
+   return STATUS_OK;
 }
 
 #else
@@ -317,7 +317,7 @@ pg_krb5_recvauth(Port *port)
    fputs(PQerrormsg, stderr);
    pqdebug("%s", PQerrormsg);
 
-   return (STATUS_ERROR);
+   return STATUS_ERROR;
 }
 
 #endif                         /* KRB5 */
@@ -394,7 +394,7 @@ pg_passwordv0_recvauth(void *arg, PacketLen len, void *pkt)
            auth_failed(port);
    }
 
-   return (STATUS_OK);         /* don't close the connection yet */
+   return STATUS_OK;           /* don't close the connection yet */
 }
 
 
@@ -628,7 +628,7 @@ readPasswordPacket(void *arg, PacketLen len, void *pkt)
    else
        sendAuthRequest(port, AUTH_REQ_OK, handle_done_auth);
 
-   return (STATUS_OK);         /* don't close the connection yet */
+   return STATUS_OK;           /* don't close the connection yet */
 }
 
 
index 0f0a4b021c5d65bd00c2886ceb618ae23d221368..76bff775f0cfbd99a7907a95c782c006513e9d9d 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/libpq/Attic/be-dumpdata.c,v 1.16 1998/07/13 16:34:48 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/libpq/Attic/be-dumpdata.c,v 1.17 1998/09/01 03:22:43 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -111,7 +111,7 @@ be_currentportal(void)
    Dlelem     *elt;
 
    elt = DLGetTail(be_portalstack);
-   return (elt ? (PortalEntry *) DLE_VAL(elt) : NULL);
+   return elt ? (PortalEntry *) DLE_VAL(elt) : NULL;
 }
 
 /* ----------------
@@ -173,7 +173,7 @@ be_typeinit(PortalEntry *entry,
    PortalBuffer *portal;
    GroupBuffer *group;
    int         i;
-   AttributeTupleForm *attrs = tupDesc->attrs;
+   Form_pg_attribute *attrs = tupDesc->attrs;
 
    /* ----------------
     *  add a new portal group to the portal
index 05a639aec4a72bef93709e54dcc79eaabc6555ee..7be91f13e8b8b7cc5ae43a16b05247c6e34a4d12 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.24 1998/08/19 02:02:09 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.25 1998/09/01 03:22:44 momjian Exp $
  *
  * NOTES
  *   This should be moved to a more appropriate place.  It is here
@@ -211,7 +211,7 @@ lo_tell(int fd)
 int
 lo_unlink(Oid lobjId)
 {
-   return (inv_destroy(lobjId));
+   return inv_destroy(lobjId);
 }
 
 /*****************************************************************************
index 2d3952bebadbd2ffc2b09a387050be85459766ca..1fb6ca7644e7334596ba7092bb569803cb829c8f 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/libpq/Attic/be-pqexec.c,v 1.18 1998/08/24 01:37:52 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/libpq/Attic/be-pqexec.c,v 1.19 1998/09/01 03:22:45 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -412,5 +412,5 @@ pqtest(struct varlena * vlena)
            return pqtest_PQexec(q);
            break;
    }
-   return (0);
+   return 0;
 }
index 80c149b062db85adcae422340b4b25fde5e72543..83acfe4c0065113d059d6a661c59be02cf7c7aaf 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.33 1998/06/15 19:28:26 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.34 1998/09/01 03:22:46 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -36,7 +36,7 @@
 static bool
 isblank(const char c)
 {
-   return (c == ' ' || c == 9 /* tab */ );
+   return c == ' ' || c == 9 /* tab */ ;
 }
 
 
@@ -97,7 +97,7 @@ read_through_eol(FILE *file)
 
 
 static void
-read_hba_entry2(FILE *file, UserAuth *userauth_p, char auth_arg[],
+read_hba_entry2(FILE *file, UserAuth *userauth_p, char *auth_arg,
                bool *error_p)
 {
 /*--------------------------------------------------------------------------
@@ -154,15 +154,15 @@ read_hba_entry2(FILE *file, UserAuth *userauth_p, char auth_arg[],
 
 
 static void
-process_hba_record(FILE *file, SockAddr *raddr, const char user[],
-                  const char database[], bool *matches_p, bool *error_p,
-                  UserAuth *userauth_p, char auth_arg[])
+process_hba_record(FILE *file, SockAddr *raddr, const char *user,
+                  const char *database, bool *matches_p, bool *error_p,
+                  UserAuth *userauth_p, char *auth_arg)
 {
 /*---------------------------------------------------------------------------
   Process the non-comment record in the config file that is next on the file.
   See if it applies to a connection to a host with IP address "*raddr"
-  to a database named "database[]".  If so, return *matches_p true
-  and *userauth_p and auth_arg[] as the values from the entry.
+  to a database named "*database".  If so, return *matches_p true
+  and *userauth_p and *auth_arg as the values from the entry.
   If not, leave *matches_p as it was.  If the record has a syntax error,
   return *error_p true, after issuing a message to stderr. If no error,
   leave *error_p as it was.
@@ -299,9 +299,9 @@ syntax:
 
 
 static void
-process_open_config_file(FILE *file, SockAddr *raddr, const char user[],
-                        const char database[], bool *host_ok_p,
-                        UserAuth *userauth_p, char auth_arg[])
+process_open_config_file(FILE *file, SockAddr *raddr, const char *user,
+                        const char *database, bool *host_ok_p,
+                        UserAuth *userauth_p, char *auth_arg)
 {
 /*---------------------------------------------------------------------------
   This function does the same thing as find_hba_entry, only with
@@ -355,8 +355,8 @@ process_open_config_file(FILE *file, SockAddr *raddr, const char user[],
 
 
 static void
-find_hba_entry(SockAddr *raddr, const char user[], const char database[],
-              bool *host_ok_p, UserAuth *userauth_p, char auth_arg[])
+find_hba_entry(SockAddr *raddr, const char *user, const char *database,
+              bool *host_ok_p, UserAuth *userauth_p, char *auth_arg)
 {
 /*--------------------------------------------------------------------------
   Read the config file and find an entry that allows connection from
@@ -442,16 +442,16 @@ find_hba_entry(SockAddr *raddr, const char user[], const char database[],
 
 
 static void
-interpret_ident_response(char ident_response[],
-                        bool *error_p, char ident_username[])
+interpret_ident_response(char *ident_response,
+                        bool *error_p, char *ident_username)
 {
 /*----------------------------------------------------------------------------
-  Parse the string "ident_response[]" as a response from a query to an Ident
+  Parse the string "*ident_response" as a response from a query to an Ident
   server.  If it's a normal response indicating a username, return
-  *error_p == false and the username as ident_username[].  If it's anything
-  else, return *error_p == true and ident_username[] undefined.
+  *error_p == false and the username as *ident_username.  If it's anything
+  else, return *error_p == true and *ident_username undefined.
 ----------------------------------------------------------------------------*/
-   char       *cursor;         /* Cursor into ident_response[] */
+   char       *cursor;         /* Cursor into *ident_response */
 
    cursor = &ident_response[0];
 
@@ -474,7 +474,7 @@ interpret_ident_response(char ident_response[],
        {
            /* We're positioned to colon before response type field */
            char        response_type[80];
-           int         i;      /* Index into response_type[] */
+           int         i;      /* Index into *response_type */
 
            cursor++;           /* Go over colon */
            while (isblank(*cursor))
@@ -508,7 +508,7 @@ interpret_ident_response(char ident_response[],
                        *error_p = true;
                    else
                    {
-                       int         i;  /* Index into ident_username[] */
+                       int         i;  /* Index into *ident_username */
 
                        cursor++;       /* Go over colon */
                        while (isblank(*cursor))
@@ -531,18 +531,18 @@ interpret_ident_response(char ident_response[],
 static void
 ident(const struct in_addr remote_ip_addr, const struct in_addr local_ip_addr,
      const ushort remote_port, const ushort local_port,
-     bool *ident_failed, char ident_username[])
+     bool *ident_failed, char *ident_username)
 {
 /*--------------------------------------------------------------------------
   Talk to the ident server on host "remote_ip_addr" and find out who
   owns the tcp connection from his port "remote_port" to port
   "local_port_addr" on host "local_ip_addr".  Return the username the
-  ident server gives as "ident_username[]".
+  ident server gives as "*ident_username".
 
   IP addresses and port numbers are in network byte order.
 
   But iff we're unable to get the information from ident, return
-  *ident_failed == true (and ident_username[] undefined).
+  *ident_failed == true (and *ident_username undefined).
 ----------------------------------------------------------------------------*/
 
    int         sock_fd;
@@ -644,7 +644,7 @@ ident(const struct in_addr remote_ip_addr, const struct in_addr local_ip_addr,
 
 static void
 parse_map_record(FILE *file,
-                char file_map[], char file_pguser[], char file_iuser[])
+                char *file_map, char *file_pguser, char *file_iuser)
 {
 /*---------------------------------------------------------------------------
   Take the noncomment line which is next on file "file" and interpret
@@ -689,9 +689,9 @@ parse_map_record(FILE *file,
 
 static void
 verify_against_open_usermap(FILE *file,
-                           const char pguser[],
-                           const char ident_username[],
-                           const char usermap_name[],
+                           const char *pguser,
+                           const char *ident_username,
+                           const char *usermap_name,
                            bool *checks_out_p)
 {
 /*--------------------------------------------------------------------------
@@ -740,9 +740,9 @@ verify_against_open_usermap(FILE *file,
 
 
 static void
-verify_against_usermap(const char pguser[],
-                      const char ident_username[],
-                      const char usermap_name[],
+verify_against_usermap(const char *pguser,
+                      const char *ident_username,
+                      const char *usermap_name,
                       bool *checks_out_p)
 {
 /*--------------------------------------------------------------------------
@@ -821,14 +821,14 @@ verify_against_usermap(const char pguser[],
 
 int
 authident(struct sockaddr_in * raddr, struct sockaddr_in * laddr,
-         const char postgres_username[],
-         const char auth_arg[])
+         const char *postgres_username,
+         const char *auth_arg)
 {
 /*---------------------------------------------------------------------------
   Talk to the ident server on the remote host and find out who owns the
   connection described by "port".  Then look in the usermap file under
-  the usermap auth_arg[] and see if that user is equivalent to
-  Postgres user user[].
+  the usermap *auth_arg and see if that user is equivalent to
+  Postgres user *user.
 
   Return STATUS_OK if yes.
 ---------------------------------------------------------------------------*/
@@ -850,7 +850,7 @@ authident(struct sockaddr_in * raddr, struct sockaddr_in * laddr,
    verify_against_usermap(postgres_username, ident_username, auth_arg,
                           &checks_out);
 
-   return (checks_out ? STATUS_OK : STATUS_ERROR);
+   return checks_out ? STATUS_OK : STATUS_ERROR;
 }
 
 
@@ -930,7 +930,7 @@ InRange(char *buf, int host)
            if (valid)
            {
                FromAddr = file_ip_addr.s_addr;
-               return ((unsigned) FromAddr == (unsigned) host);
+               return (unsigned) FromAddr == (unsigned) host;
            }
        }
    }
@@ -938,7 +938,7 @@ InRange(char *buf, int host)
 }
 
 void
-GetCharSetByHost(char TableName[], int host, const char DataDir[])
+GetCharSetByHost(char *TableName, int host, const char *DataDir)
 {
    FILE       *file;
    char        buf[MAX_TOKEN],
@@ -1064,5 +1064,5 @@ hba_getauthmethod(SockAddr *raddr, char *user, char *database,
 
    find_hba_entry(raddr, user, database, &host_ok, auth_method, auth_arg);
 
-   return (host_ok ? STATUS_OK : STATUS_ERROR);
+   return host_ok ? STATUS_OK : STATUS_ERROR;
 }
index ac5240e19266c38ebb4bc76685a79b2ffa985700..679d9bdc9b5c561ebc0c5496249c0d666aa27f7c 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/libpq/Attic/portal.c,v 1.15 1998/07/13 16:34:48 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/libpq/Attic/portal.c,v 1.16 1998/09/01 03:22:48 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -48,7 +48,7 @@
  *     communicate with a backend or by user-defined functions which
  *     are compiled or dynamically loaded into a backend.
  *
- *     the portals[] array should be organized as a hash table for
+ *     the *portals array should be organized as a hash table for
  *     quick portal-by-name lookup.
  *
  *     Do not confuse "PortalEntry" (or "PortalBuffer") with "Portal"
@@ -79,9 +79,9 @@ in_range(char *msg, int value, int min, int max)
                msg, value, min, max);
        pqdebug("%s", PQerrormsg);
        fputs(PQerrormsg, stderr);
-       return (0);
+       return 0;
    }
-   return (1);
+   return 1;
 }
 
 static int
@@ -92,9 +92,9 @@ valid_pointer(char *msg, void *ptr)
        sprintf(PQerrormsg, "FATAL: %s\n", msg);
        pqdebug("%s", PQerrormsg);
        fputs(PQerrormsg, stderr);
-       return (0);
+       return 0;
    }
-   return (1);
+   return 1;
 }
 
 
@@ -122,7 +122,7 @@ PQnportals(int rule_p)
                ++n;
        }
    }
-   return (n);
+   return n;
 }
 
 /* --------------------------------
@@ -172,8 +172,8 @@ PQparray(char *pname)
        return NULL;
 
    if ((i = pbuf_getIndex(pname)) < 0)
-       return ((PortalBuffer *) NULL);
-   return (portals[i]->portal);
+       return (PortalBuffer *) NULL;
+   return portals[i]->portal;
 }
 
 /* --------------------------------
@@ -184,9 +184,9 @@ int
 PQrulep(PortalBuffer *portal)
 {
    if (!valid_pointer("PQrulep: invalid portal pointer", portal))
-       return (-1);
+       return -1;
 
-   return (portal->rule_p);
+   return portal->rule_p;
 }
 
 /* --------------------------------
@@ -197,15 +197,15 @@ int
 PQntuples(PortalBuffer *portal)
 {
    if (!valid_pointer("PQntuples: invalid portal pointer", portal))
-       return (-1);
+       return -1;
 
-   return (portal->no_tuples);
+   return portal->no_tuples;
 }
 
 int
 PQninstances(PortalBuffer *portal)
 {
-   return (PQntuples(portal));
+   return PQntuples(portal);
 }
 
 /* --------------------------------
@@ -216,9 +216,9 @@ int
 PQngroups(PortalBuffer *portal)
 {
    if (!valid_pointer("PQngroups: invalid portal pointer", portal))
-       return (-1);
+       return -1;
 
-   return (portal->no_groups);
+   return portal->no_groups;
 }
 
 /* --------------------------------
@@ -233,18 +233,18 @@ PQntuplesGroup(PortalBuffer *portal, int group_index)
    if (!valid_pointer("PQntuplesGroup: invalid portal pointer", portal) ||
        !in_range("PQntuplesGroup: group index",
                  group_index, 0, portal->no_groups))
-       return (-1);
+       return -1;
 
    gbp = pbuf_findGroup(portal, group_index);
    if (gbp)
-       return (gbp->no_tuples);
-   return (-1);
+       return gbp->no_tuples;
+   return -1;
 }
 
 int
 PQninstancesGroup(PortalBuffer *portal, int group_index)
 {
-   return (PQntuplesGroup(portal, group_index));
+   return PQntuplesGroup(portal, group_index);
 }
 
 /* --------------------------------
@@ -259,11 +259,11 @@ PQnfieldsGroup(PortalBuffer *portal, int group_index)
    if (!valid_pointer("PQnfieldsGroup: invalid portal pointer", portal) ||
        !in_range("PQnfieldsGroup: group index",
                  group_index, 0, portal->no_groups))
-       return (-1);
+       return -1;
    gbp = pbuf_findGroup(portal, group_index);
    if (gbp)
-       return (gbp->no_fields);
-   return (-1);
+       return gbp->no_fields;
+   return -1;
 }
 
 /* --------------------------------
@@ -281,11 +281,11 @@ PQfnumberGroup(PortalBuffer *portal, int group_index, char *field_name)
                       field_name) ||
        !in_range("PQfnumberGroup: group index",
                  group_index, 0, portal->no_groups))
-       return (-1);
+       return -1;
    gbp = pbuf_findGroup(portal, group_index);
    if (gbp)
-       return (pbuf_findFnumber(gbp, field_name));
-   return (-1);
+       return pbuf_findFnumber(gbp, field_name);
+   return -1;
 }
 
 /* --------------------------------
@@ -301,13 +301,13 @@ PQfnameGroup(PortalBuffer *portal, int group_index, int field_number)
    if (!valid_pointer("PQfnameGroup: invalid portal pointer", portal) ||
        !in_range("PQfnameGroup: group index",
                  group_index, 0, portal->no_groups))
-       return ((char *) NULL);
+       return (char *) NULL;
 
    if ((gbp = pbuf_findGroup(portal, group_index)) &&
        in_range("PQfnameGroup: field number",
                 field_number, 0, gbp->no_fields))
-       return (pbuf_findFname(gbp, field_number));
-   return ((char *) NULL);
+       return pbuf_findFname(gbp, field_number);
+   return (char *) NULL;
 }
 
 /* --------------------------------
@@ -323,12 +323,12 @@ PQftypeGroup(PortalBuffer *portal, int group_index, int field_number)
    if (!valid_pointer("PQftypeGroup: invalid portal pointer", portal) ||
        !in_range("PQftypeGroup: group index",
                  group_index, 0, portal->no_groups))
-       return (-1);
+       return -1;
 
    if ((gbp = pbuf_findGroup(portal, group_index)) &&
        in_range("PQftypeGroup: field number", field_number, 0, gbp->no_fields))
-       return (gbp->types[field_number].typid);
-   return (-1);
+       return gbp->types[field_number].typid;
+   return -1;
 }
 
 /* --------------------------------
@@ -344,12 +344,12 @@ PQfsizeGroup(PortalBuffer *portal, int group_index, int field_number)
    if (!valid_pointer("PQfsizeGroup: invalid portal pointer", portal) ||
        !in_range("PQfsizeGroup: tuple index",
                  group_index, 0, portal->no_groups))
-       return (-1);
+       return -1;
 
    if ((gbp = pbuf_findGroup(portal, group_index)) &&
        in_range("PQfsizeGroup: field number", field_number, 0, gbp->no_fields))
-       return (gbp->types[field_number].typlen);
-   return (-1);
+       return gbp->types[field_number].typlen;
+   return -1;
 }
 
 
@@ -366,7 +366,7 @@ PQgroup(PortalBuffer *portal, int tuple_index)
    if (!valid_pointer("PQgroup: invalid portal pointer", portal) ||
        !in_range("PQgroup: tuple index",
                  tuple_index, 0, portal->no_tuples))
-       return ((GroupBuffer *) NULL);
+       return (GroupBuffer *) NULL;
 
    for (gbp = portal->groups;
         gbp && tuple_index >= (tuple_count += gbp->no_tuples);
@@ -374,8 +374,8 @@ PQgroup(PortalBuffer *portal, int tuple_index)
        ;
    if (!in_range("PQgroup: tuple not found: tuple index",
                  tuple_index, 0, tuple_count))
-       return ((GroupBuffer *) NULL);
-   return (gbp);
+       return (GroupBuffer *) NULL;
+   return gbp;
 }
 
 /* --------------------------------
@@ -393,7 +393,7 @@ PQgetgroup(PortalBuffer *portal, int tuple_index)
    if (!valid_pointer("PQgetgroup: invalid portal pointer", portal) ||
        !in_range("PQgetgroup: tuple index",
                  tuple_index, 0, portal->no_tuples))
-       return (-1);
+       return -1;
 
    for (gbp = portal->groups;
         gbp && tuple_index >= (tuple_count += gbp->no_tuples);
@@ -401,8 +401,8 @@ PQgetgroup(PortalBuffer *portal, int tuple_index)
        ++group_count;
    if (!gbp || !in_range("PQgetgroup: tuple not found: tuple index",
                          tuple_index, 0, tuple_count))
-       return (-1);
-   return (group_count);
+       return -1;
+   return group_count;
 }
 
 /* --------------------------------
@@ -417,11 +417,11 @@ PQnfields(PortalBuffer *portal, int tuple_index)
    if (!valid_pointer("PQnfields: invalid portal pointer", portal) ||
        !in_range("PQnfields: tuple index",
                  tuple_index, 0, portal->no_tuples))
-       return (-1);
+       return -1;
    gbp = PQgroup(portal, tuple_index);
    if (gbp)
-       return (gbp->no_fields);
-   return (-1);
+       return gbp->no_fields;
+   return -1;
 }
 
 /* --------------------------------
@@ -438,11 +438,11 @@ PQfnumber(PortalBuffer *portal, int tuple_index, char *field_name)
    !valid_pointer("PQfnumber: invalid field name pointer", field_name) ||
        !in_range("PQfnumber: tuple index",
                  tuple_index, 0, portal->no_tuples))
-       return (-1);
+       return -1;
    gbp = PQgroup(portal, tuple_index);
    if (gbp)
-       return (pbuf_findFnumber(gbp, field_name));
-   return (-1);
+       return pbuf_findFnumber(gbp, field_name);
+   return -1;
 }
 
 /* --------------------------------
@@ -457,13 +457,13 @@ PQfname(PortalBuffer *portal, int tuple_index, int field_number)
    if (!valid_pointer("PQfname: invalid portal pointer", portal) ||
        !in_range("PQfname: tuple index",
                  tuple_index, 0, portal->no_tuples))
-       return ((char *) NULL);
+       return (char *) NULL;
 
    if ((gbp = PQgroup(portal, tuple_index)) &&
        in_range("PQfname: field number",
                 field_number, 0, gbp->no_fields))
-       return (pbuf_findFname(gbp, field_number));
-   return ((char *) NULL);
+       return pbuf_findFname(gbp, field_number);
+   return (char *) NULL;
 }
 
 /* --------------------------------
@@ -478,12 +478,12 @@ PQftype(PortalBuffer *portal, int tuple_index, int field_number)
    if (!valid_pointer("PQftype: invalid portal pointer", portal) ||
        !in_range("PQfname: tuple index",
                  tuple_index, 0, portal->no_tuples))
-       return (-1);
+       return -1;
 
    if ((gbp = PQgroup(portal, tuple_index)) &&
        in_range("PQftype: field number", field_number, 0, gbp->no_fields))
-       return (gbp->types[field_number].typid);
-   return (-1);
+       return gbp->types[field_number].typid;
+   return -1;
 }
 
 /* --------------------------------
@@ -498,12 +498,12 @@ PQfsize(PortalBuffer *portal, int tuple_index, int field_number)
    if (!valid_pointer("PQfsize: invalid portal pointer", portal) ||
        !in_range("PQfsize: tuple index",
                  tuple_index, 0, portal->no_tuples))
-       return (-1);
+       return -1;
 
    if ((gbp = PQgroup(portal, tuple_index)) &&
      in_range("PQfsize: field number", field_number, 0, gbp->no_fields))
-       return (gbp->types[field_number].typlen);
-   return (-1);
+       return gbp->types[field_number].typlen;
+   return -1;
 }
 
 
@@ -524,13 +524,13 @@ PQsametype(PortalBuffer *portal, int tuple_index1, int tuple_index2)
                  tuple_index1, 0, portal->no_tuples) ||
        !in_range("PQsametype: tuple index 2",
                  tuple_index2, 0, portal->no_tuples))
-       return (-1);
+       return -1;
 
    gbp1 = PQgroup(portal, tuple_index1);
    gbp2 = PQgroup(portal, tuple_index2);
    if (gbp1 && gbp2)
-       return (gbp1 == gbp2);
-   return (-1);
+       return gbp1 == gbp2;
+   return -1;
 }
 
 static TupleBlock *
@@ -547,7 +547,7 @@ PQGetTupleBlock(PortalBuffer *portal,
                       tuple_offset) ||
        !in_range("PQGetTupleBlock: tuple index",
                  tuple_index, 0, portal->no_tuples))
-       return ((TupleBlock *) NULL);
+       return (TupleBlock *) NULL;
 
    for (gbp = portal->groups;
         gbp && tuple_index >= (tuple_count += gbp->no_tuples);
@@ -556,7 +556,7 @@ PQGetTupleBlock(PortalBuffer *portal,
    if (!gbp ||
        !in_range("PQGetTupleBlock: tuple not found: tuple index",
                  tuple_index, 0, tuple_count))
-       return ((TupleBlock *) NULL);
+       return (TupleBlock *) NULL;
    tuple_count -= gbp->no_tuples;
    for (tbp = gbp->tuples;
         tbp && tuple_index >= (tuple_count += TupleBlockSize);
@@ -565,11 +565,11 @@ PQGetTupleBlock(PortalBuffer *portal,
    if (!tbp ||
        !in_range("PQGetTupleBlock: tuple not found: tuple index",
                  tuple_index, 0, tuple_count))
-       return ((TupleBlock *) NULL);
+       return (TupleBlock *) NULL;
    tuple_count -= TupleBlockSize;
 
    *tuple_offset = tuple_index - tuple_count;
-   return (tbp);
+   return tbp;
 }
 
 /* --------------------------------
@@ -586,8 +586,8 @@ PQgetvalue(PortalBuffer *portal,
 
    tbp = PQGetTupleBlock(portal, tuple_index, &tuple_offset);
    if (tbp)
-       return (tbp->values[tuple_offset][field_number]);
-   return ((char *) NULL);
+       return tbp->values[tuple_offset][field_number];
+   return (char *) NULL;
 }
 
 /* --------------------------------
@@ -634,8 +634,8 @@ PQgetlength(PortalBuffer *portal,
 
    tbp = PQGetTupleBlock(portal, tuple_index, &tuple_offset);
    if (tbp)
-       return (tbp->lengths[tuple_offset][field_number]);
-   return (-1);
+       return tbp->lengths[tuple_offset][field_number];
+   return -1;
 }
 
 /* ----------------
@@ -708,7 +708,7 @@ PQnotifies()
 
    PQcleanNotify();
    e = DLGetHead(pqNotifyList);
-   return (e ? (PQNotifyList *) DLE_VAL(e) : NULL);
+   return e ? (PQNotifyList *) DLE_VAL(e) : NULL;
 }
 
 void
index f3cbf22a20b53c703538795f8d32c8ae6fa690bd..21eef4c8fcc53a9c7bbf67e32920830b855e65ca 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/libpq/Attic/portalbuf.c,v 1.10 1998/02/26 04:31:52 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/libpq/Attic/portalbuf.c,v 1.11 1998/09/01 03:22:49 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -115,7 +115,7 @@ pbuf_alloc(size_t size)
    if (addr == (caddr_t) NULL)
        libpq_raise(&MemoryError, form("Cannot Allocate space."));
 
-   return (addr);
+   return addr;
 }
 
 /* --------------------------------
@@ -152,7 +152,7 @@ pbuf_addPortal()
    portal->no_groups = 0;
    portal->groups = NULL;
 
-   return (portal);
+   return portal;
 }
 
 /* --------------------------------
@@ -184,7 +184,7 @@ pbuf_addGroup(PortalBuffer *portal)
        group1->next = group;
    }
 
-   return (group);
+   return group;
 }
 
 /* --------------------------------
@@ -199,7 +199,7 @@ pbuf_addTypes(int n)
    types = (TypeBlock *)
        pbuf_alloc(n * sizeof(TypeBlock));
 
-   return (types);
+   return types;
 }
 
 /* --------------------------------
@@ -217,7 +217,7 @@ pbuf_addTuples()
    tuples->next = NULL;
    tuples->tuple_index = 0;
 
-   return (tuples);
+   return tuples;
 }
 
 /* --------------------------------
@@ -373,7 +373,7 @@ pbuf_getIndex(char *pname)
                return i;
    }
 
-   return (-1);
+   return -1;
 }
 
 /* --------------------------------
@@ -465,7 +465,7 @@ pbuf_findGroup(PortalBuffer *portal,
        libpq_raise(&PortalError,
                    form("Group index %d out of bound.", group_index));
 
-   return (group);
+   return group;
 }
 
 /* --------------------------------
@@ -483,7 +483,7 @@ pbuf_findFnumber(GroupBuffer *group,
 
    for (i = 0; i < group->no_fields; i++)
        if (strncmp(types[i].name, field_name, NAMEDATALEN) == 0)
-           return (i);
+           return i;
 
    libpq_raise(&PortalError,
                form("Field-name %s does not exist.", field_name));
index 1a67903959dc05453a34f7a6e94108094b0896ef..f44176400ce022b7d3ae24126e31fbb021e834b4 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.51 1998/08/25 21:32:10 scrappy Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.52 1998/09/01 03:22:50 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -139,8 +139,8 @@ pq_getport()
    char       *envport = getenv("PGPORT");
 
    if (envport)
-       return (atoi(envport));
-   return (atoi(DEF_PGPORT));
+       return atoi(envport);
+   return atoi(DEF_PGPORT);
 }
 
 /* --------------------------------
@@ -194,7 +194,7 @@ pq_getstr(char *s, int maxlen)
    if (Pfin == (FILE *) NULL)
    {
 /*     elog(DEBUG, "Input descriptor is null"); */
-       return (EOF);
+       return EOF;
    }
 
    while (maxlen-- && (c = pq_getc(Pfin)) != EOF && c)
@@ -215,8 +215,8 @@ pq_getstr(char *s, int maxlen)
     * -----------------
     */
    if (c == EOF)
-       return (EOF);
-   return (!EOF);
+       return EOF;
+   return !EOF;
 }
 
 /*
@@ -240,7 +240,7 @@ int
 PQgetline(char *s, int maxlen)
 {
    if (!Pfin || !s || maxlen <= 1)
-       return (EOF);
+       return EOF;
 
    if (fgets(s, maxlen - 1, Pfin) == NULL)
        return feof(Pfin) ? EOF : 1;
@@ -275,7 +275,7 @@ PQputline(char *s)
        fputs(s, Pfout);
        fflush(Pfout);
    }
-   return (0);
+   return 0;
 }
 
 /* --------------------------------
@@ -438,7 +438,7 @@ pq_getinaddr(struct sockaddr_in * sin,
            if (!(hs = gethostbyname(host)))
            {
                perror(host);
-               return (1);
+               return 1;
            }
            if (hs->h_addrtype != AF_INET)
            {
@@ -447,7 +447,7 @@ pq_getinaddr(struct sockaddr_in * sin,
                        host);
                fputs(PQerrormsg, stderr);
                pqdebug("%s", PQerrormsg);
-               return (1);
+               return 1;
            }
            memmove((char *) &sin->sin_addr,
                    hs->h_addr,
@@ -456,7 +456,7 @@ pq_getinaddr(struct sockaddr_in * sin,
    }
    sin->sin_family = AF_INET;
    sin->sin_port = htons(port);
-   return (0);
+   return 0;
 }
 
 /* --------------------------------
@@ -469,7 +469,7 @@ pq_getinserv(struct sockaddr_in * sin, char *host, char *serv)
    struct servent *ss;
 
    if (*serv >= '0' && *serv <= '9')
-       return (pq_getinaddr(sin, host, atoi(serv)));
+       return pq_getinaddr(sin, host, atoi(serv));
    if (!(ss = getservbyname(serv, NULL)))
    {
        sprintf(PQerrormsg,
@@ -477,9 +477,9 @@ pq_getinserv(struct sockaddr_in * sin, char *host, char *serv)
                serv);
        fputs(PQerrormsg, stderr);
        pqdebug("%s", PQerrormsg);
-       return (1);
+       return 1;
    }
-   return (pq_getinaddr(sin, host, ntohs(ss->s_port)));
+   return pq_getinaddr(sin, host, ntohs(ss->s_port));
 }
 
 /*
@@ -535,7 +535,7 @@ StreamServerPort(char *hostName, short portName, int *fdP)
                errno);
        fputs(PQerrormsg, stderr);
        pqdebug("%s", PQerrormsg);
-       return (STATUS_ERROR);
+       return STATUS_ERROR;
    }
    if ((setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char *) &one,
                    sizeof(one))) == -1)
@@ -545,7 +545,7 @@ StreamServerPort(char *hostName, short portName, int *fdP)
                errno);
        fputs(PQerrormsg, stderr);
        pqdebug("%s", PQerrormsg);
-       return (STATUS_ERROR);
+       return STATUS_ERROR;
    }
    MemSet((char *) &saddr, 0, sizeof(saddr));
    saddr.sa.sa_family = family;
@@ -590,7 +590,7 @@ StreamServerPort(char *hostName, short portName, int *fdP)
        else
            strcat(PQerrormsg, "\tIf not, wait a few seconds and retry.\n");
        fputs(PQerrormsg, stderr);
-       return (STATUS_ERROR);
+       return STATUS_ERROR;
    }
 
    if (family == AF_UNIX) {
@@ -620,7 +620,7 @@ StreamServerPort(char *hostName, short portName, int *fdP)
    *fdP = fd;
    if (family == AF_UNIX)
        chmod(sock_path, 0777);
-   return (STATUS_OK);
+   return STATUS_OK;
 }
 
 /*
@@ -647,7 +647,7 @@ StreamConnection(int server_fd, Port *port)
                             &addrlen)) < 0)
    {
        elog(ERROR, "postmaster: StreamConnection: accept: %m");
-       return (STATUS_ERROR);
+       return STATUS_ERROR;
    }
 
    /* fill in the server (local) address */
@@ -656,7 +656,7 @@ StreamConnection(int server_fd, Port *port)
                    &addrlen) < 0)
    {
        elog(ERROR, "postmaster: StreamConnection: getsockname: %m");
-       return (STATUS_ERROR);
+       return STATUS_ERROR;
    }
    if (family == AF_INET)
    {
@@ -667,20 +667,20 @@ StreamConnection(int server_fd, Port *port)
        if (pe == NULL)
        {
            elog(ERROR, "postmaster: getprotobyname failed");
-           return (STATUS_ERROR);
+           return STATUS_ERROR;
        }
        if (setsockopt(port->sock, pe->p_proto, TCP_NODELAY,
                       &on, sizeof(on)) < 0)
        {
            elog(ERROR, "postmaster: setsockopt failed");
-           return (STATUS_ERROR);
+           return STATUS_ERROR;
        }
    }
 
    /* reset to non-blocking */
    fcntl(port->sock, F_SETFL, 1);
 
-   return (STATUS_OK);
+   return STATUS_OK;
 }
 
 /*
@@ -722,7 +722,7 @@ StreamOpen(char *hostName, short portName, Port *port)
                    hostName);
            fputs(PQerrormsg, stderr);
            pqdebug("%s", PQerrormsg);
-           return (STATUS_ERROR);
+           return STATUS_ERROR;
        }
        memmove((char *) &(port->raddr.in.sin_addr),
                (char *) hp->h_addr,
@@ -744,7 +744,7 @@ StreamOpen(char *hostName, short portName, Port *port)
                errno);
        fputs(PQerrormsg, stderr);
        pqdebug("%s", PQerrormsg);
-       return (STATUS_ERROR);
+       return STATUS_ERROR;
    }
    err = connect(port->sock, &port->raddr.sa, len);
    if (err < 0)
@@ -754,7 +754,7 @@ StreamOpen(char *hostName, short portName, Port *port)
                errno);
        fputs(PQerrormsg, stderr);
        pqdebug("%s", PQerrormsg);
-       return (STATUS_ERROR);
+       return STATUS_ERROR;
    }
 
    /* fill in the client address */
@@ -765,10 +765,10 @@ StreamOpen(char *hostName, short portName, Port *port)
                errno);
        fputs(PQerrormsg, stderr);
        pqdebug("%s", PQerrormsg);
-       return (STATUS_ERROR);
+       return STATUS_ERROR;
    }
 
-   return (STATUS_OK);
+   return STATUS_OK;
 }
 
 #ifdef MULTIBYTE
index 8829af19ca3891ddc4bd6066f388687561d48668..ab5afd12ebcac4428222a3e50d688b3d34ed959e 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/libpq/pqsignal.c,v 1.8 1998/06/15 19:28:27 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/libpq/pqsignal.c,v 1.9 1998/09/01 03:22:52 momjian Exp $
  *
  * NOTES
  *     This shouldn't be in libpq, but the monitor and some other
@@ -58,7 +58,7 @@ pqsignal(int signo, pqsigfunc func)
    if (signo != SIGALRM)
        act.sa_flags |= SA_RESTART;
    if (sigaction(signo, &act, &oact) < 0)
-       return (SIG_ERR);
-   return (oact.sa_handler);
+       return SIG_ERR;
+   return oact.sa_handler;
 #endif                         /* !USE_POSIX_SIGNALS */
 }
index ac88763601eea376f949c447f684253c86078c38..d7dc535812a939ee63fe0ee091aa18a7072fa434 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.46 1998/08/04 16:43:56 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.47 1998/09/01 03:22:53 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -765,7 +765,7 @@ _copyConst(Const *from)
    if (!from->constisnull && cached_type != from->consttype)
    {
        HeapTuple   typeTuple;
-       TypeTupleForm typeStruct;
+       Form_pg_type typeStruct;
 
        /* ----------------
         *   get the type tuple corresponding to the paramList->type,
@@ -784,7 +784,7 @@ _copyConst(Const *from)
         */
        Assert(PointerIsValid(typeTuple));
 
-       typeStruct = (TypeTupleForm) GETSTRUCT(typeTuple);
+       typeStruct = (Form_pg_type) GETSTRUCT(typeTuple);
        cached_typbyval = (typeStruct)->typbyval ? true : false;
        cached_type = from->consttype;
    }
@@ -1316,13 +1316,13 @@ _copyMergeOrder(MergeOrder *from)
 }
 
 /* ----------------
- *     _copyCInfo
+ *     _copyClauseInfo
  * ----------------
  */
-static CInfo *
-_copyCInfo(CInfo *from)
+static ClauseInfo *
+_copyClauseInfo(ClauseInfo *from)
 {
-   CInfo      *newnode = makeNode(CInfo);
+   ClauseInfo     *newnode = makeNode(ClauseInfo);
 
    /* ----------------
     *  copy remainder of node
@@ -1409,13 +1409,13 @@ _copyMInfo(MInfo *from)
 }
 
 /* ----------------
- *     _copyJInfo
+ *     _copyJoinInfo
  * ----------------
  */
-static JInfo *
-_copyJInfo(JInfo *from)
+static JoinInfo *
+_copyJoinInfo(JoinInfo *from)
 {
-   JInfo      *newnode = makeNode(JInfo);
+   JoinInfo       *newnode = makeNode(JoinInfo);
 
    /* ----------------
     *  copy remainder of node
@@ -1761,8 +1761,8 @@ copyObject(void *from)
        case T_MergeOrder:
            retval = _copyMergeOrder(from);
            break;
-       case T_CInfo:
-           retval = _copyCInfo(from);
+       case T_ClauseInfo:
+           retval = _copyClauseInfo(from);
            break;
        case T_JoinMethod:
            retval = _copyJoinMethod(from);
@@ -1773,8 +1773,8 @@ copyObject(void *from)
        case T_MInfo:
            retval = _copyMInfo(from);
            break;
-       case T_JInfo:
-           retval = _copyJInfo(from);
+       case T_JoinInfo:
+           retval = _copyJoinInfo(from);
            break;
        case T_Iter:
            retval = _copyIter(from);
index 4c2f341014557ec614a10bea3c71c7e4ec425c67..5e9be73256f1bb8bff4779a2a7e94942418615d9 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.18 1998/08/04 16:43:58 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.19 1998/09/01 03:22:55 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -39,19 +39,19 @@ static bool
 _equalResdom(Resdom *a, Resdom *b)
 {
    if (a->resno != b->resno)
-       return (false);
+       return false;
    if (a->restype != b->restype)
-       return (false);
+       return false;
    if (a->restypmod != b->restypmod)
-       return (false);
+       return false;
    if (strcmp(a->resname, b->resname) != 0)
-       return (false);
+       return false;
    if (a->reskey != b->reskey)
-       return (false);
+       return false;
    if (a->reskeyop != b->reskeyop)
-       return (false);
+       return false;
 
-   return (true);
+   return true;
 }
 
 static bool
@@ -60,19 +60,19 @@ _equalFjoin(Fjoin *a, Fjoin *b)
    int         nNodes;
 
    if (a->fj_initialized != b->fj_initialized)
-       return (false);
+       return false;
    if (a->fj_nNodes != b->fj_nNodes)
-       return (false);
+       return false;
    if (!equal(a->fj_innerNode, b->fj_innerNode))
-       return (false);
+       return false;
 
    nNodes = a->fj_nNodes;
    if (memcmp(a->fj_results, b->fj_results, nNodes * sizeof(Datum)) != 0)
-       return (false);
+       return false;
    if (memcmp(a->fj_alwaysDone, b->fj_alwaysDone, nNodes * sizeof(bool)) != 0)
-       return (false);
+       return false;
 
-   return (true);
+   return true;
 }
 
 /*
@@ -82,39 +82,39 @@ static bool
 _equalExpr(Expr *a, Expr *b)
 {
    if (a->opType != b->opType)
-       return (false);
+       return false;
    if (!equal(a->oper, b->oper))
-       return (false);
+       return false;
    if (!equal(a->args, b->args))
-       return (false);
+       return false;
 
-   return (true);
+   return true;
 }
 
 static bool
 _equalIter(Iter *a, Iter *b)
 {
-   return (equal(a->iterexpr, b->iterexpr));
+   return equal(a->iterexpr, b->iterexpr);
 }
 
 static bool
 _equalStream(Stream *a, Stream *b)
 {
    if (a->clausetype != b->clausetype)
-       return (false);
+       return false;
    if (a->groupup != b->groupup)
-       return (false);
+       return false;
    if (a->groupcost != b->groupcost)
-       return (false);
+       return false;
    if (a->groupsel != b->groupsel)
-       return (false);
+       return false;
    if (!equal(a->pathptr, b->pathptr))
-       return (false);
+       return false;
    if (!equal(a->cinfo, b->cinfo))
-       return (false);
+       return false;
    if (!equal(a->upstream, b->upstream))
-       return (false);
-   return (equal(a->downstream, b->downstream));
+       return false;
+   return equal(a->downstream, b->downstream);
 }
 
 /*
@@ -124,57 +124,57 @@ static bool
 _equalVar(Var *a, Var *b)
 {
    if (a->varno != b->varno)
-       return (false);
+       return false;
    if (a->varattno != b->varattno)
-       return (false);
+       return false;
    if (a->vartype != b->vartype)
-       return (false);
+       return false;
    if (a->vartypmod != b->vartypmod)
-       return (false);
+       return false;
    if (a->varlevelsup != b->varlevelsup)
-       return (false);
+       return false;
    if (a->varnoold != b->varnoold)
-       return (false);
+       return false;
    if (a->varoattno != b->varoattno)
-       return (false);
+       return false;
 
-   return (true);
+   return true;
 }
 
 static bool
 _equalArray(Array *a, Array *b)
 {
    if (a->arrayelemtype != b->arrayelemtype)
-       return (false);
+       return false;
    if (a->arrayndim != b->arrayndim)
-       return (false);
+       return false;
    if (a->arraylow.indx[0] != b->arraylow.indx[0])
-       return (false);
+       return false;
    if (a->arrayhigh.indx[0] != b->arrayhigh.indx[0])
-       return (false);
+       return false;
    if (a->arraylen != b->arraylen)
-       return (false);
-   return (TRUE);
+       return false;
+   return TRUE;
 }
 
 static bool
 _equalArrayRef(ArrayRef *a, ArrayRef *b)
 {
    if (a->refelemtype != b->refelemtype)
-       return (false);
+       return false;
    if (a->refattrlength != b->refattrlength)
-       return (false);
+       return false;
    if (a->refelemlength != b->refelemlength)
-       return (false);
+       return false;
    if (a->refelembyval != b->refelembyval)
-       return (false);
+       return false;
    if (!equal(a->refupperindexpr, b->refupperindexpr))
-       return (false);
+       return false;
    if (!equal(a->reflowerindexpr, b->reflowerindexpr))
-       return (false);
+       return false;
    if (!equal(a->refexpr, b->refexpr))
-       return (false);
-   return (equal(a->refassgnexpr, b->refassgnexpr));
+       return false;
+   return equal(a->refassgnexpr, b->refassgnexpr);
 }
 
 /*
@@ -184,11 +184,11 @@ static bool
 _equalOper(Oper *a, Oper *b)
 {
    if (a->opno != b->opno)
-       return (false);
+       return false;
    if (a->opresulttype != b->opresulttype)
-       return (false);
+       return false;
 
-   return (true);
+   return true;
 }
 
 /*
@@ -203,13 +203,13 @@ _equalConst(Const *a, Const *b)
     * ridiculous.  -- JMH, 7/11/92
     */
    if (a->consttype != b->consttype)
-       return (false);
+       return false;
    if (a->constlen != b->constlen)
-       return (false);
+       return false;
    if (a->constisnull != b->constisnull)
-       return (false);
+       return false;
    if (a->constbyval != b->constbyval)
-       return (false);
+       return false;
    return (datumIsEqual(a->constvalue, b->constvalue,
                         a->consttype, a->constbyval, a->constlen));
 }
@@ -221,11 +221,11 @@ static bool
 _equalParam(Param *a, Param *b)
 {
    if (a->paramkind != b->paramkind)
-       return (false);
+       return false;
    if (a->paramtype != b->paramtype)
-       return (false);
+       return false;
    if (!equal(a->param_tlist, b->param_tlist))
-       return (false);
+       return false;
 
    switch (a->paramkind)
    {
@@ -233,26 +233,26 @@ _equalParam(Param *a, Param *b)
        case PARAM_NEW:
        case PARAM_OLD:
            if (strcmp(a->paramname, b->paramname) != 0)
-               return (false);
+               return false;
            break;
        case PARAM_NUM:
        case PARAM_EXEC:
            if (a->paramid != b->paramid)
-               return (false);
+               return false;
            break;
        case PARAM_INVALID:
 
            /*
             * XXX: Hmmm... What are we supposed to return in this case ??
             */
-           return (true);
+           return true;
            break;
        default:
            elog(ERROR, "_equalParam: Invalid paramkind value: %d",
                 a->paramkind);
    }
 
-   return (true);
+   return true;
 }
 
 /*
@@ -262,42 +262,42 @@ static bool
 _equalFunc(Func *a, Func *b)
 {
    if (a->funcid != b->funcid)
-       return (false);
+       return false;
    if (a->functype != b->functype)
-       return (false);
+       return false;
    if (a->funcisindex != b->funcisindex)
-       return (false);
+       return false;
    if (a->funcsize != b->funcsize)
-       return (false);
+       return false;
    if (!equal(a->func_tlist, b->func_tlist))
-       return (false);
+       return false;
    if (!equal(a->func_planlist, b->func_planlist))
-       return (false);
+       return false;
 
-   return (true);
+   return true;
 }
 
 /*
- * CInfo is a subclass of Node.
+ * ClauseInfo is a subclass of Node.
  */
 static bool
-_equalCInfo(CInfo *a, CInfo *b)
+_equalClauseInfo(ClauseInfo *a, ClauseInfo *b)
 {
-   Assert(IsA(a, CInfo));
-   Assert(IsA(b, CInfo));
+   Assert(IsA(a, ClauseInfo));
+   Assert(IsA(b, ClauseInfo));
 
    if (!equal(a->clause, b->clause))
-       return (false);
+       return false;
    if (a->selectivity != b->selectivity)
-       return (false);
+       return false;
    if (a->notclause != b->notclause)
-       return (false);
+       return false;
 #ifdef EqualMergeOrderExists
    if (!EqualMergeOrder(a->mergejoinorder, b->mergejoinorder))
-       return (false);
+       return false;
 #endif
    if (a->hashjoinoperator != b->hashjoinoperator)
-       return (false);
+       return false;
    return (equal((a->indexids),
                  (b->indexids)));
 }
@@ -323,20 +323,20 @@ _equalJoinMethod(JoinMethod *a, JoinMethod *b)
 
    if (!equal((a->jmkeys),
               (b->jmkeys)))
-       return (false);
+       return false;
    if (!equal((a->clauses),
               (b->clauses)))
-       return (false);
-   return (true);
+       return false;
+   return true;
 }
 
 static bool
 _equalPath(Path *a, Path *b)
 {
    if (a->pathtype != b->pathtype)
-       return (false);
+       return false;
    if (a->parent != b->parent)
-       return (false);
+       return false;
 
    /*
     * if (a->path_cost != b->path_cost) return(false);
@@ -370,31 +370,31 @@ _equalPath(Path *a, Path *b)
    {
        if (!equal((a->p_ordering.ord.merge),
                   (b->p_ordering.ord.merge)))
-           return (false);
+           return false;
    }
    if (!equal((a->keys),
               (b->keys)))
-       return (false);
+       return false;
 
    /*
     * if (a->outerjoincost != b->outerjoincost) return(false);
     */
    if (!equali((a->joinid),
                (b->joinid)))
-       return (false);
-   return (true);
+       return false;
+   return true;
 }
 
 static bool
 _equalIndexPath(IndexPath *a, IndexPath *b)
 {
    if (!_equalPath((Path *) a, (Path *) b))
-       return (false);
+       return false;
    if (!equali((a->indexid), (b->indexid)))
-       return (false);
+       return false;
    if (!equal((a->indexqual), (b->indexqual)))
-       return (false);
-   return (true);
+       return false;
+   return true;
 }
 
 static bool
@@ -404,14 +404,14 @@ _equalJoinPath(JoinPath *a, JoinPath *b)
    Assert(IsA_JoinPath(b));
 
    if (!_equalPath((Path *) a, (Path *) b))
-       return (false);
+       return false;
    if (!equal((a->pathclauseinfo), (b->pathclauseinfo)))
-       return (false);
+       return false;
    if (!equal((a->outerjoinpath), (b->outerjoinpath)))
-       return (false);
+       return false;
    if (!equal((a->innerjoinpath), (b->innerjoinpath)))
-       return (false);
-   return (true);
+       return false;
+   return true;
 }
 
 static bool
@@ -421,14 +421,14 @@ _equalMergePath(MergePath *a, MergePath *b)
    Assert(IsA(b, MergePath));
 
    if (!_equalJoinPath((JoinPath *) a, (JoinPath *) b))
-       return (false);
+       return false;
    if (!equal((a->path_mergeclauses), (b->path_mergeclauses)))
-       return (false);
+       return false;
    if (!equal((a->outersortkeys), (b->outersortkeys)))
-       return (false);
+       return false;
    if (!equal((a->innersortkeys), (b->innersortkeys)))
-       return (false);
-   return (true);
+       return false;
+   return true;
 }
 
 static bool
@@ -438,14 +438,14 @@ _equalHashPath(HashPath *a, HashPath *b)
    Assert(IsA(b, HashPath));
 
    if (!_equalJoinPath((JoinPath *) a, (JoinPath *) b))
-       return (false);
+       return false;
    if (!equal((a->path_hashclauses), (b->path_hashclauses)))
-       return (false);
+       return false;
    if (!equal((a->outerhashkeys), (b->outerhashkeys)))
-       return (false);
+       return false;
    if (!equal((a->innerhashkeys), (b->innerhashkeys)))
-       return (false);
-   return (true);
+       return false;
+   return true;
 }
 
 static bool
@@ -455,31 +455,31 @@ _equalJoinKey(JoinKey *a, JoinKey *b)
    Assert(IsA(b, JoinKey));
 
    if (!equal((a->outer), (b->outer)))
-       return (false);
+       return false;
    if (!equal((a->inner), (b->inner)))
-       return (false);
-   return (true);
+       return false;
+   return true;
 }
 
 static bool
 _equalMergeOrder(MergeOrder *a, MergeOrder *b)
 {
    if (a == (MergeOrder *) NULL && b == (MergeOrder *) NULL)
-       return (true);
+       return true;
    Assert(IsA(a, MergeOrder));
    Assert(IsA(b, MergeOrder));
 
    if (a->join_operator != b->join_operator)
-       return (false);
+       return false;
    if (a->left_operator != b->left_operator)
-       return (false);
+       return false;
    if (a->right_operator != b->right_operator)
-       return (false);
+       return false;
    if (a->left_type != b->left_type)
-       return (false);
+       return false;
    if (a->right_type != b->right_type)
-       return (false);
-   return (true);
+       return false;
+   return true;
 }
 
 static bool
@@ -489,8 +489,8 @@ _equalHInfo(HInfo *a, HInfo *b)
    Assert(IsA(b, HInfo));
 
    if (a->hashop != b->hashop)
-       return (false);
-   return (true);
+       return false;
+   return true;
 }
 
 /* XXX This equality function is a quick hack, should be
@@ -507,42 +507,42 @@ _equalIndexScan(IndexScan *a, IndexScan *b)
     */
 
    if (!equal((a->indxqual), (b->indxqual)))
-       return (false);
+       return false;
 
    if (a->scan.scanrelid != b->scan.scanrelid)
-       return (false);
+       return false;
 
    if (!equali((a->indxid), (b->indxid)))
-       return (false);
-   return (true);
+       return false;
+   return true;
 }
 
 static bool
 _equalSubPlan(SubPlan *a, SubPlan *b)
 {
    if (a->plan_id != b->plan_id)
-       return (false);
+       return false;
 
    if (!equal((a->sublink->oper), (b->sublink->oper)))
-       return (false);
+       return false;
 
-   return (true);
+   return true;
 }
 
 static bool
-_equalJInfo(JInfo *a, JInfo *b)
+_equalJoinInfo(JoinInfo *a, JoinInfo *b)
 {
-   Assert(IsA(a, JInfo));
-   Assert(IsA(b, JInfo));
+   Assert(IsA(a, JoinInfo));
+   Assert(IsA(b, JoinInfo));
    if (!equal((a->otherrels), (b->otherrels)))
-       return (false);
+       return false;
    if (!equal((a->jinfoclauseinfo), (b->jinfoclauseinfo)))
-       return (false);
+       return false;
    if (a->mergejoinable != b->mergejoinable)
-       return (false);
+       return false;
    if (a->hashjoinable != b->hashjoinable)
-       return (false);
-   return (true);
+       return false;
+   return true;
 }
 
 /*
@@ -556,28 +556,28 @@ static bool
 _equalEState(EState *a, EState *b)
 {
    if (a->es_direction != b->es_direction)
-       return (false);
+       return false;
 
    if (!equal(a->es_range_table, b->es_range_table))
-       return (false);
+       return false;
 
    if (a->es_result_relation_info != b->es_result_relation_info)
-       return (false);
+       return false;
 
-   return (true);
+   return true;
 }
 
 static bool
 _equalTargetEntry(TargetEntry *a, TargetEntry *b)
 {
    if (!equal(a->resdom, b->resdom))
-       return (false);
+       return false;
    if (!equal(a->fjoin, b->fjoin))
-       return (false);
+       return false;
    if (!equal(a->expr, b->expr))
-       return (false);
+       return false;
 
-   return (true);
+   return true;
 }
 
 
@@ -591,21 +591,21 @@ static bool
 _equalValue(Value *a, Value *b)
 {
    if (a->type != b->type)
-       return (false);
+       return false;
 
    switch (a->type)
    {
        case T_String:
            return strcmp(a->val.str, b->val.str);
        case T_Integer:
-           return (a->val.ival == b->val.ival);
+           return a->val.ival == b->val.ival;
        case T_Float:
-           return (a->val.dval == b->val.dval);
+           return a->val.dval == b->val.dval;
        default:
            break;
    }
 
-   return (true);
+   return true;
 }
 
 /*
@@ -618,19 +618,19 @@ equal(void *a, void *b)
    bool        retval = false;
 
    if (a == b)
-       return (true);
+       return true;
 
    /*
     * note that a!=b, so only one of them can be NULL
     */
    if (a == NULL || b == NULL)
-       return (false);
+       return false;
 
    /*
     * are they the same type of nodes?
     */
    if (nodeTag(a) != nodeTag(b))
-       return (false);
+       return false;
 
    switch (nodeTag(a))
    {
@@ -673,8 +673,8 @@ equal(void *a, void *b)
        case T_Func:
            retval = _equalFunc(a, b);
            break;
-       case T_CInfo:
-           retval = _equalCInfo(a, b);
+       case T_ClauseInfo:
+           retval = _equalClauseInfo(a, b);
            break;
        case T_RelOptInfo:
            retval = _equalRelOptInfo(a, b);
@@ -712,8 +712,8 @@ equal(void *a, void *b)
        case T_SubPlan:
            retval = _equalSubPlan(a, b);
            break;
-       case T_JInfo:
-           retval = _equalJInfo(a, b);
+       case T_JoinInfo:
+           retval = _equalJoinInfo(a, b);
            break;
        case T_EState:
            retval = _equalEState(a, b);
@@ -730,13 +730,13 @@ equal(void *a, void *b)
                List       *l;
 
                if (a == NULL && b == NULL)
-                   return (true);
+                   return true;
                if (length(a) != length(b))
-                   return (false);
+                   return false;
                foreach(l, la)
                {
                    if (!equal(lfirst(l), lfirst(lb)))
-                       return (false);
+                       return false;
                    lb = lnext(lb);
                }
                retval = true;
@@ -765,13 +765,13 @@ equali(List *a, List *b)
    List       *l;
 
    if (a == NULL && b == NULL)
-       return (true);
+       return true;
    if (length(a) != length(b))
-       return (false);
+       return false;
    foreach(l, la)
    {
        if (lfirsti(l) != lfirsti(lb))
-           return (false);
+           return false;
        lb = lnext(lb);
    }
    return true;
index 2b826cdc9f480e8ddf4190bbb5bfff25df9823ba..c19a85ac507e9a3c658b0e565266c8d379a38363 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/nodes/list.c,v 1.13 1998/06/15 19:28:31 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/nodes/list.c,v 1.14 1998/09/01 03:22:56 momjian Exp $
  *
  * NOTES
  *   XXX a few of the following functions are duplicated to handle
@@ -54,7 +54,7 @@ makeList(void *elem,...)
 
    va_end(args);
 
-   return (retval);
+   return retval;
 }
 
 List *
@@ -105,7 +105,7 @@ nconc(List *l1, List *l2)
        ;
 
    lnext(temp) = l2;
-   return (l1);                /* list1 is now list1[]list2  */
+   return l1;              /* list1 is now list1+list2  */
 }
 
 
@@ -116,17 +116,17 @@ nreverse(List *list)
    List       *p = NIL;
 
    if (list == NULL)
-       return (NIL);
+       return NIL;
 
    if (length(list) == 1)
-       return (list);
+       return list;
 
    for (p = list; p != NULL; p = lnext(p))
        rlist = lcons(lfirst(p), rlist);
 
    lfirst(list) = lfirst(rlist);
    lnext(list) = lnext(rlist);
-   return (list);
+   return list;
 }
 
 Value *
@@ -281,19 +281,19 @@ same(List *l1, List *l2)
    List       *temp = NIL;
 
    if (l1 == NULL)
-       return (l2 == NULL);
+       return l2 == NULL;
    if (l2 == NULL)
-       return (l1 == NULL);
+       return l1 == NULL;
    if (length(l1) == length(l2))
    {
        foreach(temp, l1)
        {
            if (!intMember(lfirsti(temp), l2))
-               return (false);
+               return false;
        }
-       return (true);
+       return true;
    }
-   return (false);
+   return false;
 
 }
 
@@ -305,10 +305,10 @@ LispUnion(List *l1, List *l2)
    List       *j = NIL;
 
    if (l1 == NIL)
-       return (l2);            /* XXX - should be copy of l2 */
+       return l2;          /* XXX - should be copy of l2 */
 
    if (l2 == NIL)
-       return (l1);            /* XXX - should be copy of l1 */
+       return l1;          /* XXX - should be copy of l1 */
 
    foreach(i, l1)
    {
@@ -324,7 +324,7 @@ LispUnion(List *l1, List *l2)
    foreach(i, l2)
        retval = lappend(retval, lfirst(i));
 
-   return (retval);
+   return retval;
 }
 
 List *
@@ -335,10 +335,10 @@ LispUnioni(List *l1, List *l2)
    List       *j = NIL;
 
    if (l1 == NIL)
-       return (l2);            /* XXX - should be copy of l2 */
+       return l2;          /* XXX - should be copy of l2 */
 
    if (l2 == NIL)
-       return (l1);            /* XXX - should be copy of l1 */
+       return l1;          /* XXX - should be copy of l1 */
 
    foreach(i, l1)
    {
@@ -354,7 +354,7 @@ LispUnioni(List *l1, List *l2)
    foreach(i, l2)
        retval = lappendi(retval, lfirsti(i));
 
-   return (retval);
+   return retval;
 }
 
 /*
@@ -369,8 +369,8 @@ member(void *l1, List *l2)
 
    foreach(i, l2)
        if (equal((Node *) (lfirst(i)), (Node *) l1))
-       return (true);
-   return (false);
+       return true;
+   return false;
 }
 
 bool
@@ -380,8 +380,8 @@ intMember(int l1, List *l2)
 
    foreach(i, l2)
        if (l1 == lfirsti(i))
-       return (true);
-   return (false);
+       return true;
+   return false;
 }
 
 /*
@@ -432,7 +432,7 @@ LispRemove(void *elem, List *list)
        temp = lnext(temp);
        prev = lnext(prev);
    }
-   return (list);
+   return list;
 }
 
 #ifdef NOT_USED
@@ -457,7 +457,7 @@ intLispRemove(int elem, List *list)
        temp = lnext(temp);
        prev = lnext(prev);
    }
-   return (list);
+   return list;
 }
 
 #endif
@@ -469,14 +469,14 @@ set_difference(List *l1, List *l2)
    List       *result = NIL;
 
    if (l2 == NIL)
-       return (l1);
+       return l1;
 
    foreach(temp1, l1)
    {
        if (!member(lfirst(temp1), l2))
            result = lappend(result, lfirst(temp1));
    }
-   return (result);
+   return result;
 }
 
 List *
@@ -486,12 +486,12 @@ set_differencei(List *l1, List *l2)
    List       *result = NIL;
 
    if (l2 == NIL)
-       return (l1);
+       return l1;
 
    foreach(temp1, l1)
    {
        if (!intMember(lfirsti(temp1), l2))
            result = lappendi(result, lfirsti(temp1));
    }
-   return (result);
+   return result;
 }
index 6ea35a3af79f01db495e5a3ef59f0b47032a5076..ba6430471c2fa9f110b490538d6abd7ffc1f8e66 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/nodes/nodeFuncs.c,v 1.7 1998/02/26 04:32:09 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/nodes/nodeFuncs.c,v 1.8 1998/09/01 03:22:57 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -33,9 +33,9 @@ bool
 single_node(Node *node)
 {
    if (IsA(node, Ident) ||IsA(node, Const) ||IsA(node, Var) ||IsA(node, Param))
-       return (true);
+       return true;
    else
-       return (false);
+       return false;
 }
 
 /*****************************************************************************
@@ -60,13 +60,13 @@ single_node(Node *node)
 bool
 var_is_outer(Var *var)
 {
-   return ((bool) (var->varno == OUTER));
+   return (bool) (var->varno == OUTER);
 }
 
 static bool
 var_is_inner(Var *var)
 {
-   return ((bool) (var->varno == INNER));
+   return (bool) (var->varno == INNER);
 }
 
 bool
@@ -94,7 +94,7 @@ replace_opid(Oper *oper)
 {
    oper->opid = get_opcode(oper->opno);
    oper->op_fcache = NULL;
-   return (oper);
+   return oper;
 }
 
 /*****************************************************************************
@@ -112,7 +112,7 @@ non_null(Expr *c)
 {
 
    if (IsA(c, Const) &&!((Const *) c)->constisnull)
-       return (true);
+       return true;
    else
-       return (false);
+       return false;
 }
index c11928f8cdc736da7ff1bed589f2815643318d02..5926da8183023e713b11bdfee0803ebe4b254395 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/nodes/nodes.c,v 1.5 1998/02/26 04:32:10 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/nodes/nodes.c,v 1.6 1998/09/01 03:22:58 momjian Exp $
  *
  * HISTORY
  *   Andrew Yu         Oct 20, 1994    file creation
@@ -41,5 +41,5 @@ newNode(Size size, NodeTag tag)
    newNode = (Node *) palloc(size);
    MemSet((char *) newNode, 0, size);
    newNode->type = tag;
-   return (newNode);
+   return newNode;
 }
index fba8ba71084e06139f943d699be76c2ad829e023..c515bde33bfbffc6a2b0bdb83ecb40b35c30a0ed 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.44 1998/08/26 05:22:37 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.45 1998/09/01 03:22:59 momjian Exp $
  *
  * NOTES
  *   Every (plan) node in POSTGRES has an associated "out" routine which
@@ -1353,10 +1353,10 @@ _outMergeOrder(StringInfo str, MergeOrder *node)
 }
 
 /*
- * CInfo is a subclass of Node.
+ * ClauseInfo is a subclass of Node.
  */
 static void
-_outCInfo(StringInfo str, CInfo *node)
+_outClauseInfo(StringInfo str, ClauseInfo *node)
 {
    char        buf[500];
 
@@ -1421,10 +1421,10 @@ _outHInfo(StringInfo str, HInfo *node)
 }
 
 /*
- * JInfo is a subclass of Node.
+ * JoinInfo is a subclass of Node.
  */
 static void
-_outJInfo(StringInfo str, JInfo *node)
+_outJoinInfo(StringInfo str, JoinInfo *node)
 {
    appendStringInfo(str, " JINFO ");
 
@@ -1820,8 +1820,8 @@ _outNode(StringInfo str, void *obj)
            case T_MergeOrder:
                _outMergeOrder(str, obj);
                break;
-           case T_CInfo:
-               _outCInfo(str, obj);
+           case T_ClauseInfo:
+               _outClauseInfo(str, obj);
                break;
            case T_JoinMethod:
                _outJoinMethod(str, obj);
@@ -1829,8 +1829,8 @@ _outNode(StringInfo str, void *obj)
            case T_HInfo:
                _outHInfo(str, obj);
                break;
-           case T_JInfo:
-               _outJInfo(str, obj);
+           case T_JoinInfo:
+               _outJoinInfo(str, obj);
                break;
            case T_Iter:
                _outIter(str, obj);
index 47938774c4bdf854c8e23894324da94e6de1d96b..1a7004fc08af0061cf0bf0cc15aa9dd837337b49 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.12 1998/06/15 19:28:32 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.13 1998/09/01 03:23:01 momjian Exp $
  *
  * HISTORY
  *   AUTHOR            DATE            MAJOR EVENT
@@ -105,7 +105,7 @@ nodeTokenType(char *token, int length)
        retval = T_String;
    else if (*token == '{')
        retval = PLAN_SYM;
-   return (retval);
+   return retval;
 }
 
 /*
@@ -125,7 +125,7 @@ lsptok(char *string, int *length)
    {
        local_str = string;
        if (length == NULL)
-           return (NULL);
+           return NULL;
    }
 
    for (; *local_str == ' '
@@ -137,7 +137,7 @@ lsptok(char *string, int *length)
     */
    ret_string = local_str;
    if (*local_str == '\0')
-       return (NULL);
+       return NULL;
    *length = 1;
 
    if (*local_str == '"')
@@ -167,7 +167,7 @@ lsptok(char *string, int *length)
             && *local_str != ')'; local_str++, (*length)++);
        (*length)--;
    }
-   return (ret_string);
+   return ret_string;
 }
 
 /*
@@ -190,7 +190,7 @@ nodeRead(bool read_car_only)
    token = lsptok(NULL, &tok_len);
 
    if (token == NULL)
-       return (NULL);
+       return NULL;
 
    type = nodeTokenType(token, tok_len);
 
@@ -200,7 +200,7 @@ nodeRead(bool read_car_only)
            this_value = parsePlanString();
            token = lsptok(NULL, &tok_len);
            if (token[0] != '}')
-               return (NULL);
+               return NULL;
 
            if (!read_car_only)
                make_dotted_pair_cell = true;
@@ -288,5 +288,5 @@ nodeRead(bool read_car_only)
    }
    else
        return_value = this_value;
-   return (return_value);
+   return return_value;
 }
index 69f90fb126b37568435d97349baa7c9afac92ef9..804942800f462e25d224546df636161d12f8b60b 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.35 1998/08/04 16:44:00 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.36 1998/09/01 03:23:03 momjian Exp $
  *
  * NOTES
  *   Most of the read functions for plan nodes are tested. (In fact, they
@@ -163,7 +163,7 @@ _readQuery()
    token = lsptok(NULL, &length);      /* skip :unionClause */
    local_node->unionClause = nodeRead(true);
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -186,7 +186,7 @@ _readSortClause()
    token = lsptok(NULL, &length);      /* get opoid */
    local_node->opoid = strtoul(token, NULL, 10);
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -209,7 +209,7 @@ _readGroupClause()
    token = lsptok(NULL, &length);      /* get grpOpoid */
    local_node->grpOpoid = strtoul(token, NULL, 10);
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -277,7 +277,7 @@ _readPlan()
 
    _getPlan(local_node);
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -301,7 +301,7 @@ _readResult()
    token = lsptok(NULL, &length);      /* eat :resconstantqual */
    local_node->resconstantqual = nodeRead(true);       /* now read it */
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -335,7 +335,7 @@ _readAppend()
    token = lsptok(NULL, &length);      /* eat :inheritrtable */
    local_node->inheritrtable = nodeRead(true);     /* now read it */
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -366,7 +366,7 @@ _readJoin()
 
    _getJoin(local_node);
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -385,7 +385,7 @@ _readNestLoop()
 
    _getJoin((Join *) local_node);
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -411,7 +411,7 @@ _readMergeJoin()
    token = lsptok(NULL, &length);      /* get mergejoinop */
    local_node->mergejoinop = atol(token);
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -454,7 +454,7 @@ _readHashJoin()
    token = lsptok(NULL, &length);      /* eat hashdone */
    local_node->hashdone = false;
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -495,7 +495,7 @@ _readScan()
 
    _getScan(local_node);
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -513,7 +513,7 @@ _readSeqScan()
 
    _getScan((Scan *) local_node);
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -540,7 +540,7 @@ _readIndexScan()
    token = lsptok(NULL, &length);      /* eat :indxqual */
    local_node->indxqual = nodeRead(true);      /* now read it */
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -568,7 +568,7 @@ _readTemp()
    token = lsptok(NULL, &length);      /* get keycount */
    local_node->keycount = atoi(token);
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -596,7 +596,7 @@ _readSort()
    token = lsptok(NULL, &length);      /* get keycount */
    local_node->keycount = atoi(token);
 
-   return (local_node);
+   return local_node;
 }
 
 static Agg *
@@ -612,7 +612,7 @@ _readAgg()
    token = lsptok(NULL, &length);      /* eat :agg */
    local_node->aggs = nodeRead(true);  /* now read it */
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -639,7 +639,7 @@ _readUnique()
    token = lsptok(NULL, &length);      /* get :keycount */
    local_node->keycount = atoi(token);
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -674,7 +674,7 @@ _readHash()
    token = lsptok(NULL, &length);      /* get hashtablesize */
    local_node->hashtablesize = 0;
 
-   return (local_node);
+   return local_node;
 }
 
 /*
@@ -731,7 +731,7 @@ _readResdom()
    token = lsptok(NULL, &length);      /* get resjunk */
    local_node->resjunk = atoi(token);
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -774,7 +774,7 @@ _readExpr()
    token = lsptok(NULL, &length);      /* eat :args */
    local_node->args = nodeRead(true);  /* now read it */
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -820,7 +820,7 @@ _readVar()
    token = lsptok(NULL, &length);      /* eat :varoattno */
    local_node->varoattno = (int) atol(token);
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -862,7 +862,7 @@ _readArray()
    token = lsptok(NULL, &length);      /* get arraylen */
    local_node->arraylen = atoi(token);
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -908,7 +908,7 @@ _readArrayRef()
    token = lsptok(NULL, &length);      /* eat :refassgnexpr */
    local_node->refassgnexpr = nodeRead(true);
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -967,7 +967,7 @@ _readConst()
    else
        local_node->constbyval = false;
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -1017,7 +1017,7 @@ _readFunc()
    token = lsptok(NULL, &length);      /* get :func_planlist */
    local_node->func_planlist = nodeRead(true); /* now read it */
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -1053,7 +1053,7 @@ _readOper()
     */
    local_node->op_fcache = (FunctionCache *) NULL;
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -1096,7 +1096,7 @@ _readParam()
    token = lsptok(NULL, &length);      /* get :param_tlist */
    local_node->param_tlist = nodeRead(true);   /* now read it */
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -1138,7 +1138,7 @@ _readAggreg()
    token = lsptok(NULL, &length);      /* get usenulls */
    local_node->usenulls = (token[0] == 't') ? true : false;
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -1173,7 +1173,7 @@ _readSubLink()
    token = lsptok(NULL, &length);      /* eat :subselect */
    local_node->subselect = nodeRead(true);     /* now read it */
 
-   return (local_node);
+   return local_node;
 }
 
 /*
@@ -1210,7 +1210,7 @@ _readEState()
 
    sscanf(token, "%x", (unsigned int *) &local_node->es_result_relation_info);
 
-   return (local_node);
+   return local_node;
 }
 
 /*
@@ -1292,7 +1292,7 @@ _readRelOptInfo()
    token = lsptok(NULL, &length);      /* get :innerjoin */
    local_node->innerjoin = nodeRead(true);     /* now read it */
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -1314,7 +1314,7 @@ _readTargetEntry()
    token = lsptok(NULL, &length);      /* get :expr */
    local_node->expr = nodeRead(true);  /* now read it */
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -1366,7 +1366,7 @@ _readRangeTblEntry()
    token = lsptok(NULL, &length);      /* get :skipAcl */
    local_node->skipAcl = (token[0] == 't') ? true : false;
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -1401,7 +1401,7 @@ _readPath()
    token = lsptok(NULL, &length);      /* get :keys */
    local_node->keys = nodeRead(true);  /* now read it */
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -1442,7 +1442,7 @@ _readIndexPath()
    token = lsptok(NULL, &length);      /* get :indexqual */
    local_node->indexqual = nodeRead(true);     /* now read it */
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -1509,7 +1509,7 @@ _readJoinPath()
    local_node->path.joinid =
        toIntList(nodeRead(true));      /* now read it */
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -1586,7 +1586,7 @@ _readMergePath()
    token = lsptok(NULL, &length);      /* get :innersortkeys */
    local_node->innersortkeys = nodeRead(true); /* now read it */
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -1663,7 +1663,7 @@ _readHashPath()
    token = lsptok(NULL, &length);      /* get :innerhashkeys */
    local_node->innerhashkeys = nodeRead(true); /* now read it */
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -1691,7 +1691,7 @@ _readOrderKey()
 
    local_node->array_index = strtoul(token, NULL, 10);
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -1715,7 +1715,7 @@ _readJoinKey()
    token = lsptok(NULL, &length);      /* get :inner */
    local_node->inner = nodeRead(true); /* now read it */
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -1757,23 +1757,23 @@ _readMergeOrder()
 
    local_node->right_type = atol(token);
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
- *     _readCInfo
+ *     _readClauseInfo
  *
- * CInfo is a subclass of Node.
+ * ClauseInfo is a subclass of Node.
  * ----------------
  */
-static CInfo *
-_readCInfo()
+static ClauseInfo *
+_readClauseInfo()
 {
-   CInfo      *local_node;
+   ClauseInfo     *local_node;
    char       *token;
    int         length;
 
-   local_node = makeNode(CInfo);
+   local_node = makeNode(ClauseInfo);
 
    token = lsptok(NULL, &length);      /* get :clause */
    local_node->clause = nodeRead(true);        /* now read it */
@@ -1802,7 +1802,7 @@ _readCInfo()
 
    local_node->hashjoinoperator = atol(token);
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -1826,7 +1826,7 @@ _readJoinMethod()
    token = lsptok(NULL, &length);      /* get :clauses */
    local_node->clauses = nodeRead(true);       /* now read it */
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -1855,23 +1855,23 @@ _readHInfo()
    token = lsptok(NULL, &length);      /* get :clauses */
    local_node->jmethod.clauses = nodeRead(true);       /* now read it */
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
- *     _readJInfo()
+ *     _readJoinInfo()
  *
- * JInfo is a subclass of Node.
+ * JoinInfo is a subclass of Node.
  * ----------------
  */
-static JInfo *
-_readJInfo()
+static JoinInfo *
+_readJoinInfo()
 {
-   JInfo      *local_node;
+   JoinInfo       *local_node;
    char       *token;
    int         length;
 
-   local_node = makeNode(JInfo);
+   local_node = makeNode(JoinInfo);
 
    token = lsptok(NULL, &length);      /* get :otherrels */
    local_node->otherrels =
@@ -1894,7 +1894,7 @@ _readJInfo()
    else
        local_node->hashjoinable = false;
 
-   return (local_node);
+   return local_node;
 }
 
 /* ----------------
@@ -1914,7 +1914,7 @@ _readIter()
    token = lsptok(NULL, &length);      /* eat :iterexpr */
    local_node->iterexpr = nodeRead(true);      /* now read it */
 
-   return (local_node);
+   return local_node;
 }
 
 
@@ -2012,12 +2012,12 @@ parsePlanString(void)
        return_value = _readJoinKey();
    else if (!strncmp(token, "MERGEORDER", length))
        return_value = _readMergeOrder();
-   else if (!strncmp(token, "CINFO", length))
-       return_value = _readCInfo();
+   else if (!strncmp(token, "CLAUSEINFO", length))
+       return_value = _readClauseInfo();
    else if (!strncmp(token, "JOINMETHOD", length))
        return_value = _readJoinMethod();
-   else if (!strncmp(token, "JINFO", length))
-       return_value = _readJInfo();
+   else if (!strncmp(token, "JOININFO", length))
+       return_value = _readJoinInfo();
    else if (!strncmp(token, "HINFO", length))
        return_value = _readHInfo();
    else if (!strncmp(token, "ITER", length))
@@ -2031,7 +2031,7 @@ parsePlanString(void)
    else
        elog(ERROR, "badly formatted planstring \"%.10s\"...\n", token);
 
-   return ((Node *) return_value);
+   return (Node *) return_value;
 }
 
 /*------------------------------------------------------------*/
@@ -2092,5 +2092,5 @@ readDatum(Oid type)
    if (token[0] != ']')
        elog(ERROR, "readValue: ']' expected, length =%d", length);
 
-   return (res);
+   return res;
 }
index 4ade5143004def005e8816711ab8e1afc26099fc..976a6dd2704327e9009bfdce770870db7c61c3da 100644 (file)
@@ -6,7 +6,7 @@
 *   CX operator according to Oliver et al
 *   (Proc 2nd Int'l Conf on GA's)
 *
-* $Id: geqo_cx.c,v 1.4 1997/09/08 21:44:15 momjian Exp $
+* $Id: geqo_cx.c,v 1.5 1998/09/01 03:23:04 momjian Exp $
 *
 *-------------------------------------------------------------------------
 */
@@ -133,5 +133,5 @@ cx(Gene *tour1, Gene *tour2, Gene *offspring, int num_gene, City *city_table)
 
    }
 
-   return (num_diffs);
+   return num_diffs;
 }
index 4a8d53e7a1288976e456243c6e0895a951a88e05..adbaa02855b6290685856a93de9a8e87bfd80c64 100644 (file)
@@ -3,7 +3,7 @@
 * geqo_erx.c--
 *   edge recombination crossover [ER]
 *
-* $Id: geqo_erx.c,v 1.9 1998/06/15 19:28:34 momjian Exp $
+* $Id: geqo_erx.c,v 1.10 1998/09/01 03:23:06 momjian Exp $
 *
 *-------------------------------------------------------------------------
 */
@@ -77,7 +77,7 @@ alloc_edge_table(int num_gene)
 
    edge_table = (Edge *) palloc((num_gene + 1) * sizeof(Edge));
 
-   return (edge_table);
+   return edge_table;
 }
 
 /* free_edge_table--
@@ -147,7 +147,7 @@ gimme_edge_table(Gene *tour1, Gene *tour2, int num_gene, Edge *edge_table)
    }
 
    /* return average number of edges per index */
-   return (((float) (edge_total * 2) / (float) num_gene));
+   return ((float) (edge_total * 2) / (float) num_gene);
 }
 
 /* gimme_edge--
@@ -184,7 +184,7 @@ gimme_edge(Gene gene1, Gene gene2, Edge *edge_table)
            /* mark shared edges as negative */
            edge_table[city1].edge_list[i] = 0 - city2;
 
-           return (0);
+           return 0;
        }
    }
 
@@ -195,7 +195,7 @@ gimme_edge(Gene gene1, Gene gene2, Edge *edge_table)
    edge_table[city1].total_edges++;
    edge_table[city1].unused_edges++;
 
-   return (1);
+   return 1;
 }
 
 /* gimme_tour--
@@ -242,7 +242,7 @@ gimme_tour(Edge *edge_table, Gene *new_gene, int num_gene)
 
    }                           /* for (i=1; i
 
-   return (edge_failures);
+   return edge_failures;
 
 }
 
@@ -326,7 +326,7 @@ gimme_gene(Edge edge, Edge *edge_table)
         * converting to absolute values
         */
        if (friend < 0)
-           return ((Gene) Abs(friend));
+           return (Gene) Abs(friend);
 
 
        /*
@@ -372,7 +372,7 @@ gimme_gene(Edge edge, Edge *edge_table)
            minimum_count--;
 
            if (minimum_count == rand_decision)
-               return (friend);
+               return friend;
        }
    }
 
@@ -433,7 +433,7 @@ edge_failure(Gene *gene, int index, Edge *edge_table, int num_gene)
                four_count--;
 
                if (rand_decision == four_count)
-                   return ((Gene) i);
+                   return (Gene) i;
            }
        }
 
@@ -458,7 +458,7 @@ edge_failure(Gene *gene, int index, Edge *edge_table, int num_gene)
                remaining_edges--;
 
                if (rand_decision == remaining_edges)
-                   return (i);
+                   return i;
            }
        }
 
@@ -478,7 +478,7 @@ edge_failure(Gene *gene, int index, Edge *edge_table, int num_gene)
 
        for (i = 1; i <= num_gene; i++)
            if (edge_table[i].unused_edges >= 0)
-               return ((Gene) i);
+               return (Gene) i;
 
        elog(DEBUG, "edge_failure(3): no edge found via looking for the last ununsed point");
    }
index 5f66f9ee9beb9f355929f3be335132240de9bb67..cf52ddfc457a23c33188ce1ba06e2647f60f96f8 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: geqo_eval.c,v 1.22 1998/08/10 02:26:16 momjian Exp $
+ * $Id: geqo_eval.c,v 1.23 1998/09/01 03:23:07 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -52,7 +52,7 @@
 
 static List *gimme_clause_joins(Query *root, RelOptInfo *outer_rel, RelOptInfo *inner_rel);
 static RelOptInfo *gimme_clauseless_join(RelOptInfo *outer_rel, RelOptInfo *inner_rel);
-static RelOptInfo *init_join_rel(RelOptInfo *outer_rel, RelOptInfo *inner_rel, JInfo *joininfo);
+static RelOptInfo *init_join_rel(RelOptInfo *outer_rel, RelOptInfo *inner_rel, JoinInfo *joininfo);
 static List *new_join_tlist(List *tlist, List *other_relids, int first_resdomno);
 static List *new_joininfo_list(List *joininfo_list, List *join_relids);
 static void geqo_joinrel_size(RelOptInfo *joinrel, RelOptInfo *outer_rel, RelOptInfo *inner_rel);
@@ -86,7 +86,7 @@ geqo_eval(Query *root, Gene *tour, int num_gene)
    pfree(joinrel);
    freeList(temp);
 
-   return (fitness);
+   return fitness;
 
 }
 
@@ -176,7 +176,7 @@ gimme_tree(Query *root, Gene *tour, int rel_count, int num_gene, RelOptInfo *out
 
    }
 
-   return (outer_rel);         /* tree finished ... */
+   return outer_rel;           /* tree finished ... */
 }
 
 /*
@@ -197,7 +197,7 @@ gimme_clause_joins(Query *root, RelOptInfo *outer_rel, RelOptInfo *inner_rel)
 
    foreach(i, joininfo_list)
    {
-       JInfo      *joininfo = (JInfo *) lfirst(i);
+       JoinInfo       *joininfo = (JoinInfo *) lfirst(i);
        RelOptInfo         *rel = NULL;
 
        if (!joininfo->inactive)
@@ -228,7 +228,7 @@ gimme_clause_joins(Query *root, RelOptInfo *outer_rel, RelOptInfo *inner_rel)
        }
    }
 
-   return (join_list);
+   return join_list;
 }
 
 /*
@@ -242,7 +242,7 @@ gimme_clause_joins(Query *root, RelOptInfo *outer_rel, RelOptInfo *inner_rel)
 static RelOptInfo *
 gimme_clauseless_join(RelOptInfo *outer_rel, RelOptInfo *inner_rel)
 {
-   return (init_join_rel(outer_rel, inner_rel, (JInfo *) NULL));
+   return init_join_rel(outer_rel, inner_rel, (JoinInfo *) NULL);
 }
 
 /*
@@ -257,7 +257,7 @@ gimme_clauseless_join(RelOptInfo *outer_rel, RelOptInfo *inner_rel)
  * Returns the new join relation node.
  */
 static RelOptInfo *
-init_join_rel(RelOptInfo *outer_rel, RelOptInfo *inner_rel, JInfo *joininfo)
+init_join_rel(RelOptInfo *outer_rel, RelOptInfo *inner_rel, JoinInfo *joininfo)
 {
    RelOptInfo         *joinrel = makeNode(RelOptInfo);
    List       *joinrel_joininfo_list = NIL;
@@ -315,7 +315,7 @@ init_join_rel(RelOptInfo *outer_rel, RelOptInfo *inner_rel, JInfo *joininfo)
 
    geqo_joinrel_size(joinrel, outer_rel, inner_rel);
 
-   return (joinrel);
+   return joinrel;
 }
 
 /*
@@ -363,7 +363,7 @@ new_join_tlist(List *tlist,
        }
    }
 
-   return (t_list);
+   return t_list;
 }
 
 /*
@@ -389,13 +389,13 @@ new_joininfo_list(List *joininfo_list, List *join_relids)
 {
    List       *current_joininfo_list = NIL;
    List       *new_otherrels = NIL;
-   JInfo      *other_joininfo = (JInfo *) NULL;
+   JoinInfo       *other_joininfo = (JoinInfo *) NULL;
    List       *xjoininfo = NIL;
 
    foreach(xjoininfo, joininfo_list)
    {
        List       *or;
-       JInfo      *joininfo = (JInfo *) lfirst(xjoininfo);
+       JoinInfo       *joininfo = (JoinInfo *) lfirst(xjoininfo);
 
        new_otherrels = joininfo->otherrels;
        foreach(or, new_otherrels)
@@ -416,7 +416,7 @@ new_joininfo_list(List *joininfo_list, List *join_relids)
            }
            else
            {
-               other_joininfo = makeNode(JInfo);
+               other_joininfo = makeNode(JoinInfo);
 
                other_joininfo->otherrels =
                    joininfo->otherrels;
@@ -434,7 +434,7 @@ new_joininfo_list(List *joininfo_list, List *join_relids)
        }
    }
 
-   return (current_joininfo_list);
+   return current_joininfo_list;
 }
 
 #ifdef NOTUSED
@@ -462,7 +462,7 @@ geqo_add_new_joininfos(Query *root, List *joinrels, List *outerrels)
 
    List       *super_rels;
    List       *xsuper_rel = NIL;
-   JInfo      *new_joininfo;
+   JoinInfo       *new_joininfo;
 
    foreach(xjoinrel, joinrels)
    {
@@ -506,7 +506,7 @@ geqo_add_new_joininfos(Query *root, List *joinrels, List *outerrels)
 
        foreach(xjoininfo, joinrel->joininfo)
        {
-           JInfo      *joininfo = (JInfo *) lfirst(xjoininfo);
+           JoinInfo       *joininfo = (JoinInfo *) lfirst(xjoininfo);
            List       *other_rels = joininfo->otherrels;
            List       *clause_info = joininfo->jinfoclauseinfo;
            bool        mergejoinable = joininfo->mergejoinable;
@@ -537,7 +537,7 @@ geqo_add_new_joininfos(Query *root, List *joinrels, List *outerrels)
                rel = rel_member(relids, root->base_rel_list);
 
                super_rels = rel->superrels;
-               new_joininfo = makeNode(JInfo);
+               new_joininfo = makeNode(JoinInfo);
 
                new_joininfo->otherrels = joinrel->relids;
                new_joininfo->jinfoclauseinfo = clause_info;
@@ -554,7 +554,7 @@ geqo_add_new_joininfos(Query *root, List *joinrels, List *outerrels)
                    if (nonoverlap_rels(super_rel, joinrel))
                    {
                        List       *new_relids = super_rel->relids;
-                       JInfo      *other_joininfo =
+                       JoinInfo       *other_joininfo =
                        joininfo_member(new_relids,
                                        joinrel->joininfo);
 
@@ -566,7 +566,7 @@ geqo_add_new_joininfos(Query *root, List *joinrels, List *outerrels)
                        }
                        else
                        {
-                           JInfo      *new_joininfo = makeNode(JInfo);
+                           JoinInfo       *new_joininfo = makeNode(JoinInfo);
 
                            new_joininfo->otherrels = new_relids;
                            new_joininfo->jinfoclauseinfo = clause_info;
@@ -617,7 +617,7 @@ geqo_final_join_rels(List *join_rel_list)
 
        foreach(xjoininfo, rel->joininfo)
        {
-           JInfo      *joininfo = (JInfo *) lfirst(xjoininfo);
+           JoinInfo       *joininfo = (JoinInfo *) lfirst(xjoininfo);
 
            if (joininfo->otherrels != NIL)
            {
@@ -632,7 +632,7 @@ geqo_final_join_rels(List *join_rel_list)
        }
    }
 
-   return (t_list);
+   return t_list;
 }
 
 /*
@@ -662,7 +662,7 @@ add_superrels(RelOptInfo *rel, RelOptInfo *super_rel)
 static bool
 nonoverlap_rels(RelOptInfo *rel1, RelOptInfo *rel2)
 {
-   return (nonoverlap_sets(rel1->relids, rel2->relids));
+   return nonoverlap_sets(rel1->relids, rel2->relids);
 }
 
 static bool
@@ -675,9 +675,9 @@ nonoverlap_sets(List *s1, List *s2)
        int         e = lfirsti(x);
 
        if (intMember(e, s2))
-           return (false);
+           return false;
    }
-   return (true);
+   return true;
 }
 
 #endif                         /* NOTUSED */
@@ -712,7 +712,7 @@ geqo_joinrel_size(RelOptInfo *joinrel, RelOptInfo *outer_rel, RelOptInfo *inner_
 double
 geqo_log(double x, double b)
 {
-   return (log(x) / log(b));
+   return log(x) / log(b);
 }
 
 static RelOptInfo *
index fcb81b857b06d6d01211977dbb06d526a781e4f9..fd75985c40a21ed5506c4be442490678137a40f6 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: geqo_main.c,v 1.9 1998/08/10 02:26:17 momjian Exp $
+ * $Id: geqo_main.c,v 1.10 1998/09/01 03:23:09 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -284,5 +284,5 @@ print_plan(best_plan, root);
 
    free_pool(pool);
 
-   return (best_rel);
+   return best_rel;
 }
index ce915a5f2c87b940802c2252490e937bdd1e403c..c1dab6a99ca658c6683c0c3cf09cccc9f6120f0b 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: geqo_misc.c,v 1.9 1998/07/18 04:22:28 momjian Exp $
+ * $Id: geqo_misc.c,v 1.10 1998/09/01 03:23:10 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -58,7 +58,7 @@ avg_pool(Pool *pool)
    for (i = 0; i < pool->size; i++)
        cumulative = cumulative + pool->data[i].worth;
 
-   return ((float) cumulative / pool->size);
+   return (float) cumulative / pool->size;
 }
 
 /* print_pool--
@@ -146,7 +146,7 @@ geqo_print_joinclauses(Query *root, List *clauses)
 
    foreach(l, clauses)
    {
-       CInfo      *c = lfirst(l);
+       ClauseInfo     *c = lfirst(l);
 
        print_expr((Node *) c->clause, root->rtable);
        if (lnext(l))
index 0b1636125df28478cdf0080779248965a22fcc09..2257f2c293d233e8a07b9bb55988555f164d1cfd 100644 (file)
@@ -5,7 +5,7 @@
 *
 * Copyright (c) 1994, Regents of the University of California
 *
-* $Id: geqo_params.c,v 1.9 1998/06/15 19:28:36 momjian Exp $
+* $Id: geqo_params.c,v 1.10 1998/09/01 03:23:11 momjian Exp $
 *
 *-------------------------------------------------------------------------
 */
@@ -297,7 +297,7 @@ next_token(FILE *fp, char *buf, int bufsz)
    ungetc(c, fp);
 
    /* If we ended with a newline, return that, otherwise return 0 */
-   return (c == '\n' ? '\n' : 0);
+   return c == '\n' ? '\n' : 0;
 }
 
 /* gimme_pool_size--
@@ -315,11 +315,11 @@ gimme_pool_size(int string_length)
    size = pow(2.0, exponent);
 
    if (size < MIN_POOL)
-       return (MIN_POOL);
+       return MIN_POOL;
    else if (size > MAX_POOL)
-       return (MAX_POOL);
+       return MAX_POOL;
    else
-       return ((int) ceil(size));
+       return (int) ceil(size);
 }
 
 /* gimme_number_generations--
@@ -333,5 +333,5 @@ gimme_number_generations(int pool_size, int effort)
 
    number_gens = (int) ceil(geqo_log((double) pool_size, 2.0));
 
-   return (effort * number_gens);
+   return effort * number_gens;
 }
index 8bc75c2349a3890ee2552f0b279d06175c1df6c3..a23c9010de255986cbbe7b862c3b6148964306e3 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: geqo_paths.c,v 1.10 1998/07/18 04:22:28 momjian Exp $
+ * $Id: geqo_paths.c,v 1.11 1998/09/01 03:23:12 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -50,7 +50,7 @@ geqo_prune_rels(List *rel_list)
                 geqo_prune_rels(geqo_prune_rel((RelOptInfo *) lfirst(rel_list),
                                                lnext(rel_list))));
    }
-   return (temp_list);
+   return temp_list;
 }
 
 /*
@@ -88,7 +88,7 @@ geqo_prune_rel(RelOptInfo *rel, List *other_rels)
            t_list = nconc(t_list, temp_node);
        }
    }
-   return (t_list);
+   return t_list;
 }
 
 /*
@@ -149,5 +149,5 @@ set_paths(RelOptInfo *rel, Path *unorderedpath)
    else
        rel->unorderedpath = (Path *) unorderedpath;
 
-   return (cheapest);
+   return cheapest;
 }
index 84210a4a437db1cc77f18dbcf30dee4d155894b1..40996eff03ab3c09a1c79ebb78875e385bc0592d 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: geqo_pool.c,v 1.8 1998/06/15 19:28:37 momjian Exp $
+ * $Id: geqo_pool.c,v 1.9 1998/09/01 03:23:13 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -68,7 +68,7 @@ alloc_pool(int pool_size, int string_length)
    for (i = 0; i < pool_size; i++)
        chromo[i].string = palloc((string_length + 1) * sizeof(Gene));
 
-   return (new_pool);
+   return new_pool;
 }
 
 /*
@@ -140,11 +140,11 @@ compare(const void *arg1, const void *arg2)
    Chromosome  chromo2 = *(Chromosome *) arg2;
 
    if (chromo1.worth == chromo2.worth)
-       return (0);
+       return 0;
    else if (chromo1.worth > chromo2.worth)
-       return (1);
+       return 1;
    else
-       return (-1);
+       return -1;
 }
 
 /* alloc_chromo--
@@ -158,7 +158,7 @@ alloc_chromo(int string_length)
    chromo = (Chromosome *) palloc(sizeof(Chromosome));
    chromo->string = (Gene *) palloc((string_length + 1) * sizeof(Gene));
 
-   return (chromo);
+   return chromo;
 }
 
 /* free_chromo--
index a045c327691eef1420e035f32613cdedf8b608e0..a2c52ff3473382a537fae70a9a1d725d9ed66586 100644 (file)
@@ -3,7 +3,7 @@
 * geqo_recombination.c--
 *   misc recombination procedures
 *
-* $Id: geqo_recombination.c,v 1.5 1998/02/26 04:32:25 momjian Exp $
+* $Id: geqo_recombination.c,v 1.6 1998/09/01 03:23:15 momjian Exp $
 *
 *-------------------------------------------------------------------------
 */
@@ -96,7 +96,7 @@ alloc_city_table(int num_gene)
 
    city_table = (City *) palloc((num_gene + 1) * sizeof(City));
 
-   return (city_table);
+   return city_table;
 }
 
 /* free_city_table--
index f41630d40a4382e5cc59f9e875cd66d140b0c1e9..42eac8600da9c4de48151f34dcd37f786488ead4 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: geqo_selection.c,v 1.4 1997/09/08 21:44:41 momjian Exp $
+ * $Id: geqo_selection.c,v 1.5 1998/09/01 03:23:16 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -101,5 +101,5 @@ linear(int pool_size, double bias)      /* bias is y-intercept of linear
        max * (bias - sqrt((bias * bias) - 4.0 * (bias - 1.0) * geqo_rand()))
        / 2.0 / (bias - 1.0);
 
-   return ((int) index);
+   return (int) index;
 }
index 7344709037f923babe59a9d5ce04fd0778464024..00b22c0abc204808ec4d4cfa4c8f19ad770cfb66 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.21 1998/08/10 04:49:36 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.22 1998/09/01 03:23:17 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -280,7 +280,7 @@ print_joinclauses(Query *root, List *clauses)
 
    foreach(l, clauses)
    {
-       CInfo      *c = lfirst(l);
+       ClauseInfo     *c = lfirst(l);
 
        print_expr((Node *) c->clause, root->rtable);
        if (lnext(l))
index d554772e9fb3a157fa9b8722a12acb5992c4d2be..94cc5c71fcf7e3ad012657362d19dd243ee2959a 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.11 1998/08/09 04:17:37 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.12 1998/09/01 03:23:19 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -46,12 +46,12 @@ void
 set_clause_selectivities(List *clauseinfo_list, Cost new_selectivity)
 {
    List       *temp;
-   CInfo      *clausenode;
+   ClauseInfo     *clausenode;
    Cost        cost_clause;
 
    foreach(temp, clauseinfo_list)
    {
-       clausenode = (CInfo *) lfirst(temp);
+       clausenode = (ClauseInfo *) lfirst(temp);
        cost_clause = clausenode->selectivity;
        if (FLOAT_IS_ZERO(cost_clause) || new_selectivity < cost_clause)
            clausenode->selectivity = new_selectivity;
@@ -76,11 +76,11 @@ product_selec(List *clauseinfo_list)
 
        foreach(xclausenode, clauseinfo_list)
        {
-           temp = ((CInfo *) lfirst(xclausenode))->selectivity;
+           temp = ((ClauseInfo *) lfirst(xclausenode))->selectivity;
            result = result * temp;
        }
    }
-   return (result);
+   return result;
 }
 
 /*
@@ -117,12 +117,12 @@ void
 set_rest_selec(Query *root, List *clauseinfo_list)
 {
    List       *temp = NIL;
-   CInfo      *clausenode = (CInfo *) NULL;
+   ClauseInfo     *clausenode = (ClauseInfo *) NULL;
    Cost        cost_clause;
 
    foreach(temp, clauseinfo_list)
    {
-       clausenode = (CInfo *) lfirst(temp);
+       clausenode = (ClauseInfo *) lfirst(temp);
        cost_clause = clausenode->selectivity;
 
        /*
@@ -179,11 +179,11 @@ compute_clause_selec(Query *root, Node *clause, List *or_selectivities)
         * Both 'or' and 'and' clauses are evaluated as described in
         * (compute_selec).
         */
-       return (compute_selec(root, ((Expr *) clause)->args, or_selectivities));
+       return compute_selec(root, ((Expr *) clause)->args, or_selectivities);
    }
    else
    {
-       return (compute_selec(root, lcons(clause, NIL), or_selectivities));
+       return compute_selec(root, lcons(clause, NIL), or_selectivities);
    }
 }
 
@@ -350,7 +350,7 @@ compute_selec(Query *root, List *clauses, List *or_selectivities)
     */
 
    if (length(clauses) < 2)
-       return (s1);
+       return s1;
    else
    {
        /* Compute selectivity of the 'or'ed subclauses. */
@@ -361,6 +361,6 @@ compute_selec(Query *root, List *clauses, List *or_selectivities)
            s2 = compute_selec(root, lnext(clauses), lnext(or_selectivities));
        else
            s2 = compute_selec(root, lnext(clauses), NIL);
-       return (s1 + s2 - s1 * s2);
+       return s1 + s2 - s1 * s2;
    }
 }
index aa344afa5e645777e9a509aabf28fb82269aabcf..7d00a7f1f5c12d88c743d2e0bb0d754f7b351f0d 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.23 1998/08/04 16:44:04 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.24 1998/09/01 03:23:20 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -95,7 +95,7 @@ cost_seqscan(int relid, int relpages, int reltuples)
        temp += _cpu_page_wight_ * reltuples;
    }
    Assert(temp >= 0);
-   return (temp);
+   return temp;
 }
 
 
@@ -152,7 +152,7 @@ cost_index(Oid indexid,
    temp = temp + (_cpu_page_wight_ * selec * reltuples);
 
    Assert(temp >= 0);
-   return (temp);
+   return temp;
 }
 
 /*
@@ -186,7 +186,7 @@ cost_sort(List *keys, int tuples, int width, bool noread)
    if (tuples == 0 || keys == NULL)
    {
        Assert(temp >= 0);
-       return (temp);
+       return temp;
    }
    temp += pages * base_log((double) pages, (double) 2.0);
 
@@ -201,7 +201,7 @@ cost_sort(List *keys, int tuples, int width, bool noread)
        temp = temp + cost_seqscan(_TEMP_RELATION_ID_, npages, tuples);
    Assert(temp >= 0);
 
-   return (temp);
+   return temp;
 }
 
 
@@ -222,7 +222,7 @@ cost_result(int tuples, int width)
    temp = temp + page_size(tuples, width);
    temp = temp + _cpu_page_wight_ * tuples;
    Assert(temp >= 0);
-   return (temp);
+   return temp;
 }
 
 #endif
@@ -255,7 +255,7 @@ cost_nestloop(Cost outercost,
    temp += outertuples * innercost;
    Assert(temp >= 0);
 
-   return (temp);
+   return temp;
 }
 
 /*
@@ -294,7 +294,7 @@ cost_mergejoin(Cost outercost,
    temp += _cpu_page_wight_ * (outersize + innersize);
    Assert(temp >= 0);
 
-   return (temp);
+   return temp;
 }
 
 /*
@@ -346,7 +346,7 @@ cost_hashjoin(Cost outercost,
    temp += _cpu_page_wight_ * (outersize + nrun * innersize);
    Assert(temp >= 0);
 
-   return (temp);
+   return temp;
 }
 
 /*
@@ -373,7 +373,7 @@ compute_rel_size(RelOptInfo *rel)
        temp1 = ceil((double) temp);
    Assert(temp1 >= 0);
    Assert(temp1 <= MAXINT);
-   return (temp1);
+   return temp1;
 }
 
 /*
@@ -385,7 +385,7 @@ compute_rel_size(RelOptInfo *rel)
 int
 compute_rel_width(RelOptInfo *rel)
 {
-   return (compute_targetlist_width(get_actual_tlist(rel->targetlist)));
+   return compute_targetlist_width(get_actual_tlist(rel->targetlist));
 }
 
 /*
@@ -405,7 +405,7 @@ compute_targetlist_width(List *targetlist)
        tuple_width = tuple_width +
            compute_attribute_width(lfirst(temp_tl));
    }
-   return (tuple_width);
+   return tuple_width;
 }
 
 /*
@@ -423,9 +423,9 @@ compute_attribute_width(TargetEntry *tlistentry)
    int         width = get_typlen(tlistentry->resdom->restype);
 
    if (width < 0)
-       return (_DEFAULT_ATTRIBUTE_WIDTH_);
+       return _DEFAULT_ATTRIBUTE_WIDTH_;
    else
-       return (width);
+       return width;
 }
 
 /*
@@ -457,7 +457,7 @@ compute_joinrel_size(JoinPath *joinpath)
    }
    Assert(temp1 >= 0);
 
-   return (temp1);
+   return temp1;
 }
 
 /*
@@ -473,11 +473,11 @@ page_size(int tuples, int width)
    temp = ceil((double) (tuples * (width + sizeof(HeapTupleData)))
                / BLCKSZ);
    Assert(temp >= 0);
-   return (temp);
+   return temp;
 }
 
 static double
 base_log(double x, double b)
 {
-   return (log(x) / log(b));
+   return log(x) / log(b);
 }
index 88206ea6b09b2a7b16d1732b2e6439009422c056..29ce0f67fcedd7de3516a9547fb1fb89b784ccef 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/hashutils.c,v 1.5 1998/02/26 04:32:30 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/hashutils.c,v 1.6 1998/09/01 03:23:22 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -39,13 +39,13 @@ group_clauses_by_hashop(List *clauseinfo_list,
                        int inner_relid)
 {
    List       *hashinfo_list = NIL;
-   CInfo      *clauseinfo = (CInfo *) NULL;
+   ClauseInfo     *clauseinfo = (ClauseInfo *) NULL;
    List       *i = NIL;
    Oid         hashjoinop = 0;
 
    foreach(i, clauseinfo_list)
    {
-       clauseinfo = (CInfo *) lfirst(i);
+       clauseinfo = (ClauseInfo *) lfirst(i);
        hashjoinop = clauseinfo->hashjoinoperator;
 
        /*
@@ -96,7 +96,7 @@ group_clauses_by_hashop(List *clauseinfo_list,
                lcons(keys, xhashinfo->jmethod.jmkeys);
        }
    }
-   return (hashinfo_list);
+   return hashinfo_list;
 }
 
 
@@ -121,8 +121,8 @@ match_hashop_hashinfo(Oid hashop, List *hashinfo_list)
        key = xhashinfo->hashop;
        if (hashop == key)
        {                       /* found */
-           return (xhashinfo); /* should be a hashinfo node ! */
+           return xhashinfo; /* should be a hashinfo node ! */
        }
    }
-   return ((HInfo *) NIL);
+   return (HInfo *) NIL;
 }
index d7e62b17357f4ad7bf2474f358b735fffd18233b..9d991d97aa1a7185ce2aa80c80058a87dea66ae6 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.32 1998/08/31 07:19:54 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.33 1998/09/01 03:23:23 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -60,9 +60,9 @@ group_clauses_by_indexkey(RelOptInfo *rel, RelOptInfo *index,
 static List *
 group_clauses_by_ikey_for_joins(RelOptInfo *rel, RelOptInfo *index,
                                int *indexkeys, Oid *classes, List *join_cinfo_list, List *restr_cinfo_list);
-static CInfo *
+static ClauseInfo *
 match_clause_to_indexkey(RelOptInfo *rel, RelOptInfo *index, int indexkey,
-                        int xclass, CInfo *clauseInfo, bool join);
+                        int xclass, ClauseInfo *clauseInfo, bool join);
 static bool
 pred_test(List *predicate_list, List *clauseinfo_list,
          List *joininfo_list);
@@ -231,12 +231,12 @@ match_index_orclauses(RelOptInfo *rel,
                      int xclass,
                      List *clauseinfo_list)
 {
-   CInfo      *clauseinfo = (CInfo *) NULL;
+   ClauseInfo     *clauseinfo = (ClauseInfo *) NULL;
    List       *i = NIL;
 
    foreach(i, clauseinfo_list)
    {
-       clauseinfo = (CInfo *) lfirst(i);
+       clauseinfo = (ClauseInfo *) lfirst(i);
        if (valid_or_clause(clauseinfo))
        {
 
@@ -350,7 +350,7 @@ match_index_orclause(RelOptInfo *rel,
 
        matching_indices = lnext(matching_indices);
    }
-   return (index_list);
+   return index_list;
 
 }
 
@@ -403,7 +403,7 @@ group_clauses_by_indexkey(RelOptInfo *rel,
                          List *clauseinfo_list)
 {
    List       *curCinfo = NIL;
-   CInfo      *matched_clause = (CInfo *) NULL;
+   ClauseInfo     *matched_clause = (ClauseInfo *) NULL;
    List       *clausegroup = NIL;
    int         curIndxKey;
    Oid         curClass;
@@ -420,7 +420,7 @@ group_clauses_by_indexkey(RelOptInfo *rel,
 
        foreach(curCinfo, clauseinfo_list)
        {
-           CInfo      *temp = (CInfo *) lfirst(curCinfo);
+           ClauseInfo     *temp = (ClauseInfo *) lfirst(curCinfo);
 
            matched_clause = match_clause_to_indexkey(rel,
                                                      index,
@@ -446,7 +446,7 @@ group_clauses_by_indexkey(RelOptInfo *rel,
    /* clausegroup holds all matched clauses ordered by indexkeys */
 
    if (clausegroup != NIL)
-       return (lcons(clausegroup, NIL));
+       return lcons(clausegroup, NIL);
    return NIL;
 }
 
@@ -466,7 +466,7 @@ group_clauses_by_ikey_for_joins(RelOptInfo *rel,
                                List *restr_cinfo_list)
 {
    List       *curCinfo = NIL;
-   CInfo      *matched_clause = (CInfo *) NULL;
+   ClauseInfo     *matched_clause = (ClauseInfo *) NULL;
    List       *clausegroup = NIL;
    int         curIndxKey;
    Oid         curClass;
@@ -484,7 +484,7 @@ group_clauses_by_ikey_for_joins(RelOptInfo *rel,
 
        foreach(curCinfo, join_cinfo_list)
        {
-           CInfo      *temp = (CInfo *) lfirst(curCinfo);
+           ClauseInfo     *temp = (ClauseInfo *) lfirst(curCinfo);
 
            matched_clause = match_clause_to_indexkey(rel,
                                                      index,
@@ -500,7 +500,7 @@ group_clauses_by_ikey_for_joins(RelOptInfo *rel,
        }
        foreach(curCinfo, restr_cinfo_list)
        {
-           CInfo      *temp = (CInfo *) lfirst(curCinfo);
+           ClauseInfo     *temp = (ClauseInfo *) lfirst(curCinfo);
 
            matched_clause = match_clause_to_indexkey(rel,
                                                      index,
@@ -537,7 +537,7 @@ group_clauses_by_ikey_for_joins(RelOptInfo *rel,
            freeList(clausegroup);
            return NIL;
        }
-       return (lcons(clausegroup, NIL));
+       return lcons(clausegroup, NIL);
    }
    return NIL;
 }
@@ -579,12 +579,12 @@ group_clauses_by_ikey_for_joins(RelOptInfo *rel,
  * NOTE:  returns nil if clause is an or_clause.
  *
  */
-static CInfo *
+static ClauseInfo *
 match_clause_to_indexkey(RelOptInfo *rel,
                         RelOptInfo *index,
                         int indexkey,
                         int xclass,
-                        CInfo *clauseInfo,
+                        ClauseInfo *clauseInfo,
                         bool join)
 {
    Expr       *clause = clauseInfo->clause;
@@ -596,7 +596,7 @@ match_clause_to_indexkey(RelOptInfo *rel,
 
    if (or_clause((Node *) clause) ||
        not_clause((Node *) clause) || single_node((Node *) clause))
-       return ((CInfo *) NULL);
+       return (ClauseInfo *) NULL;
 
    leftop = get_leftop(clause);
    rightop = get_rightop(clause);
@@ -771,9 +771,9 @@ match_clause_to_indexkey(RelOptInfo *rel,
    }
 
    if (isIndexable)
-       return (clauseInfo);
+       return clauseInfo;
 
-   return (NULL);
+   return NULL;
 }
 
 /****************************************************************************
@@ -848,13 +848,13 @@ pred_test(List *predicate_list, List *clauseinfo_list, List *joininfo_list)
 static bool
 one_pred_test(Expr *predicate, List *clauseinfo_list)
 {
-   CInfo      *clauseinfo;
+   ClauseInfo     *clauseinfo;
    List       *item;
 
    Assert(predicate != NULL);
    foreach(item, clauseinfo_list)
    {
-       clauseinfo = (CInfo *) lfirst(item);
+       clauseinfo = (ClauseInfo *) lfirst(item);
        /* if any clause implies the predicate, return true */
        if (one_pred_clause_expr_test(predicate, (Node *) clauseinfo->clause))
            return true;
@@ -1187,7 +1187,7 @@ clause_pred_clause_test(Expr *predicate, Node *clause)
  *
  * Returns a list of these clause groups.
  *
- *   Added: clauseinfo_list - list of restriction CInfos. It's to
+ *   Added: clauseinfo_list - list of restriction ClauseInfos. It's to
  *     support multi-column indices in joins and for cases
  *     when a key is in both join & restriction clauses. - vadim 03/18/97
  *
@@ -1196,14 +1196,14 @@ static List *
 indexable_joinclauses(RelOptInfo *rel, RelOptInfo *index,
                      List *joininfo_list, List *clauseinfo_list)
 {
-   JInfo      *joininfo = (JInfo *) NULL;
+   JoinInfo       *joininfo = (JoinInfo *) NULL;
    List       *cg_list = NIL;
    List       *i = NIL;
    List       *clausegroups = NIL;
 
    foreach(i, joininfo_list)
    {
-       joininfo = (JInfo *) lfirst(i);
+       joininfo = (JoinInfo *) lfirst(i);
 
        if (joininfo->jinfoclauseinfo == NIL)
            continue;
@@ -1219,12 +1219,12 @@ indexable_joinclauses(RelOptInfo *rel, RelOptInfo *index,
        {
            List       *clauses = lfirst(clausegroups);
 
-           ((CInfo *) lfirst(clauses))->cinfojoinid =
+           ((ClauseInfo *) lfirst(clauses))->cinfojoinid =
                joininfo->otherrels;
        }
        cg_list = nconc(cg_list, clausegroups);
    }
-   return (cg_list);
+   return cg_list;
 }
 
 /****************************************************************************
@@ -1245,7 +1245,7 @@ extract_restrict_clauses(List *clausegroup)
 
    foreach(l, clausegroup)
    {
-       CInfo      *cinfo = lfirst(l);
+       ClauseInfo     *cinfo = lfirst(l);
 
        if (!is_joinable((Node *) cinfo->clause))
            restrict_cls = lappend(restrict_cls, cinfo);
@@ -1305,7 +1305,7 @@ index_innerjoin(Query *root, RelOptInfo *rel, List *clausegroup_list,
        pathnode->indexkeys = index->indexkeys;
        pathnode->indexqual = clausegroup;
 
-       pathnode->path.joinid = ((CInfo *) lfirst(clausegroup))->cinfojoinid;
+       pathnode->path.joinid = ((ClauseInfo *) lfirst(clausegroup))->cinfojoinid;
 
        pathnode->path.path_cost =
            cost_index((Oid) lfirsti(index->relids),
@@ -1335,7 +1335,7 @@ index_innerjoin(Query *root, RelOptInfo *rel, List *clausegroup_list,
 #endif
        cg_list = lappend(cg_list, pathnode);
    }
-   return (cg_list);
+   return cg_list;
 }
 
 /*
@@ -1367,7 +1367,7 @@ create_index_paths(Query *root,
 
    foreach(i, clausegroup_list)
    {
-       CInfo      *clauseinfo;
+       ClauseInfo     *clauseinfo;
        List       *temp_node = NIL;
        bool        temp = true;
 
@@ -1375,7 +1375,7 @@ create_index_paths(Query *root,
 
        foreach(j, clausegroup)
        {
-           clauseinfo = (CInfo *) lfirst(j);
+           clauseinfo = (ClauseInfo *) lfirst(j);
            if (!(is_joinable((Node *) clauseinfo->clause) &&
                  equal_path_merge_ordering(index->ordering,
                                            clauseinfo->mergejoinorder)))
@@ -1389,7 +1389,7 @@ create_index_paths(Query *root,
            ip_list = nconc(ip_list, temp_node);
        }
    }
-   return (ip_list);
+   return ip_list;
 }
 
 static List *
@@ -1447,10 +1447,10 @@ function_index_operand(Expr *funcOpnd, RelOptInfo *rel, RelOptInfo *index)
    {
 
        if (indexKeys[i] == 0)
-           return (false);
+           return false;
 
        if (((Var *) lfirst(arg))->varattno != indexKeys[i])
-           return (false);
+           return false;
 
        i++;
    }
index 8a7f1c12707fc62fdc78dd97e98d26b1425d43fb..7b05f9fddfc310ec321307a0477606b19b58d956 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.8 1998/08/04 16:44:07 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.9 1998/09/01 03:23:24 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -221,7 +221,7 @@ best_innerjoin(List *join_paths, List *outer_relids)
            cheapest = (Path *) lfirst(join_path);
        }
    }
-   return (cheapest);
+   return cheapest;
 }
 
 /*
@@ -285,7 +285,7 @@ sort_inner_and_outer(RelOptInfo *joinrel,
 
        ms_list = lappend(ms_list, temp_node);
    }
-   return (ms_list);
+   return ms_list;
 }
 
 /*
@@ -442,7 +442,7 @@ match_unsorted_outer(RelOptInfo *joinrel,
            temp_node = paths;
        jp_list = nconc(jp_list, temp_node);
    }
-   return (jp_list);
+   return jp_list;
 }
 
 /*
@@ -560,7 +560,7 @@ match_unsorted_inner(RelOptInfo *joinrel,
            }
        }
    }
-   return (mp_list);
+   return mp_list;
 
 }
 
@@ -645,5 +645,5 @@ hash_inner_and_outer(RelOptInfo *joinrel,
            hjoin_list = lappend(hjoin_list, temp_node);
        }
    }
-   return (hjoin_list);
+   return hjoin_list;
 }
index 3f18303d9742179011c42ed567f5ee2803a3c07e..2a0755010d654918718f98d7f5da251e4ee62ba8 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.13 1998/08/10 02:26:24 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.14 1998/09/01 03:23:25 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -33,7 +33,7 @@ bool      _use_right_sided_plans_ = false;
 
 static List *find_clause_joins(Query *root, RelOptInfo *outer_rel, List *joininfo_list);
 static List *find_clauseless_joins(RelOptInfo *outer_rel, List *inner_rels);
-static RelOptInfo *init_join_rel(RelOptInfo *outer_rel, RelOptInfo *inner_rel, JInfo *joininfo);
+static RelOptInfo *init_join_rel(RelOptInfo *outer_rel, RelOptInfo *inner_rel, JoinInfo *joininfo);
 static List *
 new_join_tlist(List *tlist, List *other_relids,
               int first_resdomno);
@@ -43,7 +43,7 @@ static bool nonoverlap_rels(RelOptInfo *rel1, RelOptInfo *rel2);
 static bool nonoverlap_sets(List *s1, List *s2);
 static void
 set_joinrel_size(RelOptInfo *joinrel, RelOptInfo *outer_rel, RelOptInfo *inner_rel,
-                JInfo *jinfo);
+                JoinInfo *jinfo);
 
 /*
  * find-join-rels--
@@ -80,7 +80,7 @@ find_join_rels(Query *root, List *outer_rels)
        join_list = nconc(join_list, joins);
    }
 
-   return (join_list);
+   return join_list;
 }
 
 /*
@@ -106,7 +106,7 @@ find_clause_joins(Query *root, RelOptInfo *outer_rel, List *joininfo_list)
 
    foreach(i, joininfo_list)
    {
-       JInfo      *joininfo = (JInfo *) lfirst(i);
+       JoinInfo       *joininfo = (JoinInfo *) lfirst(i);
        RelOptInfo         *rel;
 
        if (!joininfo->inactive)
@@ -146,7 +146,7 @@ find_clause_joins(Query *root, RelOptInfo *outer_rel, List *joininfo_list)
        }
    }
 
-   return (join_list);
+   return join_list;
 }
 
 /*
@@ -172,13 +172,13 @@ find_clauseless_joins(RelOptInfo *outer_rel, List *inner_rels)
        {
            temp_node = lcons(init_join_rel(outer_rel,
                                            inner_rel,
-                                           (JInfo *) NULL),
+                                           (JoinInfo *) NULL),
                              NIL);
            t_list = nconc(t_list, temp_node);
        }
    }
 
-   return (t_list);
+   return t_list;
 }
 
 /*
@@ -193,7 +193,7 @@ find_clauseless_joins(RelOptInfo *outer_rel, List *inner_rels)
  * Returns the new join relation node.
  */
 static RelOptInfo *
-init_join_rel(RelOptInfo *outer_rel, RelOptInfo *inner_rel, JInfo *joininfo)
+init_join_rel(RelOptInfo *outer_rel, RelOptInfo *inner_rel, JoinInfo *joininfo)
 {
    RelOptInfo         *joinrel = makeNode(RelOptInfo);
    List       *joinrel_joininfo_list = NIL;
@@ -253,7 +253,7 @@ init_join_rel(RelOptInfo *outer_rel, RelOptInfo *inner_rel, JInfo *joininfo)
 
    set_joinrel_size(joinrel, outer_rel, inner_rel, joininfo);
 
-   return (joinrel);
+   return joinrel;
 }
 
 /*
@@ -301,7 +301,7 @@ new_join_tlist(List *tlist,
        }
    }
 
-   return (t_list);
+   return t_list;
 }
 
 /*
@@ -327,13 +327,13 @@ new_joininfo_list(List *joininfo_list, List *join_relids)
 {
    List       *current_joininfo_list = NIL;
    List       *new_otherrels = NIL;
-   JInfo      *other_joininfo = (JInfo *) NULL;
+   JoinInfo       *other_joininfo = (JoinInfo *) NULL;
    List       *xjoininfo = NIL;
 
    foreach(xjoininfo, joininfo_list)
    {
        List       *or;
-       JInfo      *joininfo = (JInfo *) lfirst(xjoininfo);
+       JoinInfo       *joininfo = (JoinInfo *) lfirst(xjoininfo);
 
        new_otherrels = joininfo->otherrels;
        foreach(or, new_otherrels)
@@ -354,7 +354,7 @@ new_joininfo_list(List *joininfo_list, List *join_relids)
            }
            else
            {
-               other_joininfo = makeNode(JInfo);
+               other_joininfo = makeNode(JoinInfo);
 
                other_joininfo->otherrels =
                    joininfo->otherrels;
@@ -372,7 +372,7 @@ new_joininfo_list(List *joininfo_list, List *join_relids)
        }
    }
 
-   return (current_joininfo_list);
+   return current_joininfo_list;
 }
 
 /*
@@ -412,7 +412,7 @@ add_new_joininfos(Query *root, List *joinrels, List *outerrels)
 
        foreach(xjoininfo, joinrel->joininfo)
        {
-           JInfo      *joininfo = (JInfo *) lfirst(xjoininfo);
+           JoinInfo       *joininfo = (JoinInfo *) lfirst(xjoininfo);
            List       *other_rels = joininfo->otherrels;
            List       *clause_info = joininfo->jinfoclauseinfo;
            bool        mergejoinable = joininfo->mergejoinable;
@@ -424,7 +424,7 @@ add_new_joininfos(Query *root, List *joinrels, List *outerrels)
                RelOptInfo         *rel = get_join_rel(root, relid);
                List       *super_rels = rel->superrels;
                List       *xsuper_rel = NIL;
-               JInfo      *new_joininfo = makeNode(JInfo);
+               JoinInfo       *new_joininfo = makeNode(JoinInfo);
 
                new_joininfo->otherrels = joinrel->relids;
                new_joininfo->jinfoclauseinfo = clause_info;
@@ -441,7 +441,7 @@ add_new_joininfos(Query *root, List *joinrels, List *outerrels)
                    if (nonoverlap_rels(super_rel, joinrel))
                    {
                        List       *new_relids = super_rel->relids;
-                       JInfo      *other_joininfo =
+                       JoinInfo       *other_joininfo =
                        joininfo_member(new_relids,
                                        joinrel->joininfo);
 
@@ -453,7 +453,7 @@ add_new_joininfos(Query *root, List *joinrels, List *outerrels)
                        }
                        else
                        {
-                           JInfo      *new_joininfo = makeNode(JInfo);
+                           JoinInfo       *new_joininfo = makeNode(JoinInfo);
 
                            new_joininfo->otherrels = new_relids;
                            new_joininfo->jinfoclauseinfo = clause_info;
@@ -505,7 +505,7 @@ final_join_rels(List *join_rel_list)
 
        foreach(xjoininfo, rel->joininfo)
        {
-           JInfo      *joininfo = (JInfo *) lfirst(xjoininfo);
+           JoinInfo       *joininfo = (JoinInfo *) lfirst(xjoininfo);
 
            if (joininfo->otherrels != NIL)
            {
@@ -520,7 +520,7 @@ final_join_rels(List *join_rel_list)
        }
    }
 
-   return (t_list);
+   return t_list;
 }
 
 /*
@@ -550,7 +550,7 @@ add_superrels(RelOptInfo *rel, RelOptInfo *super_rel)
 static bool
 nonoverlap_rels(RelOptInfo *rel1, RelOptInfo *rel2)
 {
-   return (nonoverlap_sets(rel1->relids, rel2->relids));
+   return nonoverlap_sets(rel1->relids, rel2->relids);
 }
 
 static bool
@@ -563,13 +563,13 @@ nonoverlap_sets(List *s1, List *s2)
        int         e = lfirsti(x);
 
        if (intMember(e, s2))
-           return (false);
+           return false;
    }
-   return (true);
+   return true;
 }
 
 static void
-set_joinrel_size(RelOptInfo *joinrel, RelOptInfo *outer_rel, RelOptInfo *inner_rel, JInfo *jinfo)
+set_joinrel_size(RelOptInfo *joinrel, RelOptInfo *outer_rel, RelOptInfo *inner_rel, JoinInfo *jinfo)
 {
    int         ntuples;
    float       selec;
index f1deabea5d5422cedd8c0465cfa9fab2e17a8e7f..f39a783547dde6a205651c164e46345c37c526f6 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/joinutils.c,v 1.6 1998/06/15 19:28:41 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/joinutils.c,v 1.7 1998/09/01 03:23:27 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -106,7 +106,7 @@ match_pathkeys_joinkeys(List *pathkeys,
            joinkeys = LispRemove(xjoinkey, joinkeys);
        }
        else
-           return (NIL);
+           return NIL;
 
    }
    if (matched_joinkeys == NULL ||
@@ -114,7 +114,7 @@ match_pathkeys_joinkeys(List *pathkeys,
        return NIL;
 
    *matchedJoinClausesPtr = nreverse(matched_joinclauses);
-   return (nreverse(matched_joinkeys));
+   return nreverse(matched_joinkeys);
 }
 
 /*
@@ -142,11 +142,11 @@ match_pathkey_joinkeys(List *pathkey,
            jk = (JoinKey *) lfirst(x);
            if (var_equal(path_subkey,
                          extract_subkey(jk, which_subkey)))
-               return (pos);
+               return pos;
            pos++;
        }
    }
-   return (-1);                /* no index found   */
+   return -1;              /* no index found   */
 }
 
 /*
@@ -197,9 +197,9 @@ every_func(List *joinkeys, List *pathkey, int which_subkey)
            }
        }
        if (found == false)
-           return (false);
+           return false;
    }
-   return (found);
+   return found;
 }
 
 
@@ -294,7 +294,7 @@ extract_path_keys(List *joinkeys,
        pathkeys =
            lappend(pathkeys, lcons(key, NIL));
    }
-   return (pathkeys);
+   return pathkeys;
 }
 
 
@@ -337,7 +337,7 @@ new_join_pathkeys(List *outer_pathkeys,
        if (x != NIL)
            t_list = lappend(t_list, x);
    }
-   return (t_list);
+   return t_list;
 }
 
 /*
@@ -395,7 +395,7 @@ new_join_pathkey(List *subkeys,
 
        t_list = nconc(t_list, newly_considered_subkeys);
    }
-   return (t_list);
+   return t_list;
 }
 
 /*
@@ -451,5 +451,5 @@ new_matching_subkeys(Var *subkey,
            t_list = nconc(t_list, temp);
        }
    }
-   return (t_list);
+   return t_list;
 }
index 134937eb58e6ebb26025423d961723074992ab9d..8bf4bb73c2c50ec68dca7848f0b2db48ce3502a0 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/mergeutils.c,v 1.7 1998/08/04 16:44:10 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/mergeutils.c,v 1.8 1998/09/01 03:23:28 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -42,7 +42,7 @@ group_clauses_by_order(List *clauseinfo_list,
 
    foreach(xclauseinfo, clauseinfo_list)
    {
-       CInfo      *clauseinfo = (CInfo *) lfirst(xclauseinfo);
+       ClauseInfo     *clauseinfo = (ClauseInfo *) lfirst(xclauseinfo);
        MergeOrder *merge_ordering = clauseinfo->mergejoinorder;
 
        if (merge_ordering)
@@ -92,7 +92,7 @@ group_clauses_by_order(List *clauseinfo_list,
                      ((JoinMethod *) xmergeinfo)->jmkeys);
        }
    }
-   return (mergeinfo_list);
+   return mergeinfo_list;
 }
 
 
@@ -122,8 +122,8 @@ match_order_mergeinfo(PathOrder *ordering, List *mergeinfo_list)
           equal_path_merge_ordering(ordering->ord.sortop, xmergeorder)))
        {
 
-           return (mergeinfo);
+           return mergeinfo;
        }
    }
-   return ((MInfo *) NIL);
+   return (MInfo *) NIL;
 }
index 13f4b7c20619660fcb49b1094b4183c8b1aad2cb..c56d6200f843440cfe5094fa084e078202e22e62 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/optimizer/path/orindxpath.c,v 1.9 1998/08/31 07:19:55 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/optimizer/path/orindxpath.c,v 1.10 1998/09/01 03:23:29 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -59,7 +59,7 @@ create_or_index_paths(Query *root,
 
    foreach(clist, clauses)
    {
-       CInfo      *clausenode = (CInfo *) (lfirst(clist));
+       ClauseInfo     *clausenode = (ClauseInfo *) (lfirst(clist));
 
        /*
         * Check to see if this clause is an 'or' clause, and, if so,
@@ -131,7 +131,7 @@ create_or_index_paths(Query *root,
        }
    }
 
-   return (t_list);
+   return t_list;
 }
 
 /*
index e67188fa418a8130ce0bde6b032a526f80f90eae..07615c031d5f2633f086b9c0fa50f8053dffaf12 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/predmig.c,v 1.11 1998/06/15 19:28:41 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/predmig.c,v 1.12 1998/09/01 03:23:30 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -67,7 +67,7 @@ static void xfunc_free_stream(Stream root);
 static Stream xfunc_add_clauses(Stream current);
 static void xfunc_setup_group(Stream node, Stream bottom);
 static Stream
-xfunc_streaminsert(CInfo clauseinfo, Stream current,
+xfunc_streaminsert(ClauseInfo clauseinfo, Stream current,
                   int clausetype);
 static int xfunc_num_relids(Stream node);
 static StreamPtr xfunc_get_downjoin(Stream node);
@@ -102,7 +102,7 @@ xfunc_do_predmig(Path root)
            if (progress)
                changed = true;
        } while (progress);
-   return (changed);
+   return changed;
 }
 
 
@@ -145,7 +145,7 @@ xfunc_predmig(JoinPath pathnode,/* root of the join tree */
        set_downstream(laststream, (StreamPtr) newstream);
    set_downstream(newstream, (StreamPtr) NULL);
    set_pathptr(newstream, (pathPtr) pathnode);
-   set_cinfo(newstream, (CInfo) NULL);
+   set_cinfo(newstream, (ClauseInfo) NULL);
    set_clausetype(newstream, XFUNC_UNKNOWN);
 
    /* base case: we're at a leaf, call xfunc_series_llel */
@@ -203,7 +203,7 @@ xfunc_series_llel(Stream stream)
            if (xfunc_llel_chains(stream, temp))
                progress = true;
    }
-   return (progress);
+   return progress;
 }
 
 /*
@@ -270,7 +270,7 @@ xfunc_llel_chains(Stream root, Stream bottom)
 
    /* free up origstream */
    xfunc_free_stream(origstream);
-   return (progress);
+   return progress;
 }
 
 /*
@@ -304,7 +304,7 @@ xfunc_complete_stream(Stream stream)
         tmpstream = (Stream) get_upstream(tmpstream))
         /* no body in for loop */ ;
 
-   return (tmpstream);
+   return tmpstream;
 }
 
 /*
@@ -318,7 +318,7 @@ xfunc_complete_stream(Stream stream)
 static bool
 xfunc_prdmig_pullup(Stream origstream, Stream pullme, JoinPath joinpath)
 {
-   CInfo       clauseinfo = get_cinfo(pullme);
+   ClauseInfo      clauseinfo = get_cinfo(pullme);
    bool        progress = false;
    Stream      upjoin,
                orignode,
@@ -391,7 +391,7 @@ xfunc_prdmig_pullup(Stream origstream, Stream pullme, JoinPath joinpath)
    }
    if (!progress)
        elog(DEBUG, "didn't succeed in pulling up in xfunc_prdmig_pullup");
-   return (progress);
+   return progress;
 }
 
 /*
@@ -530,7 +530,7 @@ xfunc_add_clauses(Stream current)
    foreach(temp, get_locclauseinfo((Path) get_pathptr(current)))
    {
        topnode =
-           xfunc_streaminsert((CInfo) lfirst(temp), topnode,
+           xfunc_streaminsert((ClauseInfo) lfirst(temp), topnode,
                               XFUNC_LOCPRD);
    }
 
@@ -540,13 +540,13 @@ xfunc_add_clauses(Stream current)
        primjoin = xfunc_primary_join((JoinPath) get_pathptr(current));
        foreach(temp, get_pathclauseinfo((JoinPath) get_pathptr(current)))
        {
-           if (!equal(get_clause((CInfo) lfirst(temp)), primjoin))
+           if (!equal(get_clause((ClauseInfo) lfirst(temp)), primjoin))
                topnode =
-                   xfunc_streaminsert((CInfo) lfirst(temp), topnode,
+                   xfunc_streaminsert((ClauseInfo) lfirst(temp), topnode,
                                       XFUNC_JOINPRD);
        }
    }
-   return (topnode);
+   return topnode;
 }
 
 
@@ -596,7 +596,7 @@ xfunc_setup_group(Stream node, Stream bottom)
  ** Return new node.
  */
 static Stream
-xfunc_streaminsert(CInfo clauseinfo,
+xfunc_streaminsert(ClauseInfo clauseinfo,
                   Stream current,
                   int clausetype)      /* XFUNC_LOCPRD or XFUNC_JOINPRD */
 {
@@ -610,7 +610,7 @@ xfunc_streaminsert(CInfo clauseinfo,
    set_pathptr(newstream, get_pathptr(current));
    set_cinfo(newstream, clauseinfo);
    set_clausetype(newstream, clausetype);
-   return (newstream);
+   return newstream;
 }
 
 /*
@@ -623,7 +623,7 @@ static int
 xfunc_num_relids(Stream node)
 {
    if (!node || !IsA(get_pathptr(node), JoinPath))
-       return (0);
+       return 0;
    else
        return (length
                (get_relids(get_parent((JoinPath) get_pathptr(node)))));
@@ -645,7 +645,7 @@ xfunc_get_downjoin(Stream node)
         temp = (Stream) get_downstream(temp))
         /* empty body in for loop */ ;
 
-   return ((StreamPtr) temp);
+   return (StreamPtr) temp;
 }
 
 /*
@@ -663,7 +663,7 @@ xfunc_get_upjoin(Stream node)
         temp = (Stream) get_upstream(temp))
         /* empty body in for loop */ ;
 
-   return ((StreamPtr) temp);
+   return (StreamPtr) temp;
 }
 
 /*
@@ -685,7 +685,7 @@ xfunc_stream_qsort(Stream root, Stream bottom)
         tmp = (Stream) get_downstream(tmp))
        num++;
    if (num <= 1)
-       return (root);
+       return root;
 
    /* copy elements of the list into an array */
    nodearray = (Stream *) palloc(num * sizeof(Stream));
@@ -710,7 +710,7 @@ xfunc_stream_qsort(Stream root, Stream bottom)
        set_upstream(bottom, (StreamPtr) nodearray[0]);
 
    Assert(xfunc_check_stream(output));
-   return (output);
+   return output;
 }
 
 /*
@@ -731,33 +731,33 @@ xfunc_stream_compare(void *arg1, void *arg2)
    rank2 = get_grouprank(stream2);
 
    if (rank1 > rank2)
-       return (1);
+       return 1;
    else if (rank1 < rank2)
-       return (-1);
+       return -1;
    else
    {
        if (is_clause(stream1) && is_clause(stream2))
-           return (0);         /* doesn't matter what order if both are
+           return 0;           /* doesn't matter what order if both are
                                 * restrictions */
        else if (!is_clause(stream1) && !is_clause(stream2))
        {
            if (xfunc_num_relids(stream1) < xfunc_num_relids(stream2))
-               return (-1);
+               return -1;
            else
-               return (1);
+               return 1;
        }
        else if (is_clause(stream1) && !is_clause(stream2))
        {
            if (xfunc_num_relids(stream1) == xfunc_num_relids(stream2))
                /* stream1 is a restriction over stream2 */
-               return (1);
+               return 1;
            else
-               return (-1);
+               return -1;
        }
        else if (!is_clause(stream1) && is_clause(stream2))
        {
            /* stream2 is a restriction over stream1: never push down */
-           return (-1);
+           return -1;
        }
    }
 }
@@ -788,20 +788,20 @@ xfunc_check_stream(Stream node)
        if ((Stream) get_upstream((Stream) get_downstream(temp)) != temp)
        {
            elog(ERROR, "bad pointers in stream");
-           return (false);
+           return false;
        }
        if (!is_clause(temp))
        {
            if ((tmp = xfunc_num_relids(temp)) >= numrelids)
            {
                elog(ERROR, "Joins got reordered!");
-               return (false);
+               return false;
            }
            numrelids = tmp;
        }
    }
 
-   return (true);
+   return true;
 }
 
 /*
@@ -815,6 +815,6 @@ xfunc_in_stream(Stream node, Stream stream)
 
    for (temp = stream; temp; temp = (Stream) get_downstream(temp))
        if (temp == node)
-           return (1);
-   return (0);
+           return 1;
+   return 0;
 }
index f9c1605b3918381b70d3c262ed983a02e40833d8..18228cbd89fac4bf4a7606cd6982eb8416e16a9d 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/prune.c,v 1.15 1998/07/18 04:22:34 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/prune.c,v 1.16 1998/09/01 03:23:32 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -77,7 +77,7 @@ prune_joinrel(RelOptInfo *rel, List *other_rels)
        else
            result = nconc(result, lcons(other_rel, NIL));
    }
-   return (result);
+   return result;
 }
 
 /*
@@ -145,7 +145,7 @@ prune_rel_path(RelOptInfo *rel, Path *unorderedpath)
    else
        rel->unorderedpath = (Path *) unorderedpath;
 
-   return (cheapest);
+   return cheapest;
 }
 
 /*
@@ -169,7 +169,7 @@ merge_joinrels(List *rel_list1, List *rel_list2)
 
        rel_list2 = prune_joinrel(rel, rel_list2);
    }
-   return (append(rel_list1, rel_list2));
+   return append(rel_list1, rel_list2);
 }
 
 /*
@@ -204,7 +204,7 @@ prune_oldrels(List *old_rels)
        {
            foreach(xjoininfo, joininfo_list)
            {
-               JInfo      *joininfo = (JInfo *) lfirst(xjoininfo);
+               JoinInfo       *joininfo = (JoinInfo *) lfirst(xjoininfo);
 
                if (!joininfo->inactive)
                {
index 0346dcf472079f07986ad6c18c00992dce0d74d5..b5eb9f2bdd503a92a99b41646c0756ff0cb7e470 100644 (file)
@@ -9,7 +9,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/xfunc.c,v 1.20 1998/08/24 01:37:53 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/xfunc.c,v 1.21 1998/09/01 03:23:33 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -60,7 +60,7 @@ void
 xfunc_trypullup(RelOptInfo rel)
 {
    LispValue   y;              /* list ptr */
-   CInfo       maxcinfo;       /* The CInfo to pull up, as calculated by
+   ClauseInfo      maxcinfo;       /* The ClauseInfo to pull up, as calculated by
                                 * xfunc_shouldpull() */
    JoinPath    curpath;        /* current path in list */
    int         progress;       /* has progress been made this time
@@ -147,12 +147,12 @@ xfunc_shouldpull(Query *queryInfo,
                 Path childpath,
                 JoinPath parentpath,
                 int whichchild,
-                CInfo *maxcinfopt)     /* Out: pointer to clause to
+                ClauseInfo *maxcinfopt)        /* Out: pointer to clause to
                                         * pullup */
 {
    LispValue   clauselist,
                tmplist;        /* lists of clauses */
-   CInfo       maxcinfo;       /* clause to pullup */
+   ClauseInfo      maxcinfo;       /* clause to pullup */
    LispValue   primjoinclause  /* primary join clause */
    = xfunc_primary_join(parentpath);
    Cost        tmprank,
@@ -167,16 +167,16 @@ xfunc_shouldpull(Query *queryInfo,
    {
        /* find local predicate with maximum rank */
        for (tmplist = clauselist,
-            maxcinfo = (CInfo) lfirst(tmplist),
+            maxcinfo = (ClauseInfo) lfirst(tmplist),
             maxrank = xfunc_rank(get_clause(maxcinfo));
             tmplist != LispNil;
             tmplist = lnext(tmplist))
        {
 
-           if ((tmprank = xfunc_rank(get_clause((CInfo) lfirst(tmplist))))
+           if ((tmprank = xfunc_rank(get_clause((ClauseInfo) lfirst(tmplist))))
                > maxrank)
            {
-               maxcinfo = (CInfo) lfirst(tmplist);
+               maxcinfo = (ClauseInfo) lfirst(tmplist);
                maxrank = tmprank;
            }
        }
@@ -194,16 +194,16 @@ xfunc_shouldpull(Query *queryInfo,
        {
 
            if (tmplist != LispNil &&
-             (tmprank = xfunc_rank(get_clause((CInfo) lfirst(tmplist))))
+             (tmprank = xfunc_rank(get_clause((ClauseInfo) lfirst(tmplist))))
                > maxrank)
            {
-               maxcinfo = (CInfo) lfirst(tmplist);
+               maxcinfo = (ClauseInfo) lfirst(tmplist);
                maxrank = tmprank;
                retval = XFUNC_JOINPRD;
            }
        }
    if (maxrank == (-1 * MAXFLOAT))     /* no expensive clauses */
-       return (0);
+       return 0;
 
    /*
     * * Pullup over join if clause is higher rank than join, or if * join
@@ -233,7 +233,7 @@ xfunc_shouldpull(Query *queryInfo,
        {
 
            *maxcinfopt = maxcinfo;
-           return (retval);
+           return retval;
 
        }
        else if (maxrank != -(MAXFLOAT))
@@ -248,7 +248,7 @@ xfunc_shouldpull(Query *queryInfo,
            /* and fall through */
        }
    }
-   return (0);
+   return 0;
 }
 
 
@@ -261,13 +261,13 @@ xfunc_shouldpull(Query *queryInfo,
  ** in the query; it's merely a parent for the new childpath.
  **    We also have to fix up the path costs of the child and parent.
  **
- ** Now returns a pointer to the new pulled-up CInfo. -- JMH, 11/18/92
+ ** Now returns a pointer to the new pulled-up ClauseInfo. -- JMH, 11/18/92
  */
-CInfo
+ClauseInfo
 xfunc_pullup(Query *queryInfo,
             Path childpath,
             JoinPath parentpath,
-            CInfo cinfo,       /* clause to pull up */
+            ClauseInfo cinfo,      /* clause to pull up */
             int whichchild,    /* whether child is INNER or OUTER of join */
             int clausetype)    /* whether clause to pull is join or local */
 {
@@ -275,7 +275,7 @@ xfunc_pullup(Query *queryInfo,
    RelOptInfo          newrel;
    Cost        pulled_selec;
    Cost        cost;
-   CInfo       newinfo;
+   ClauseInfo      newinfo;
 
    /* remove clause from childpath */
    newkid = (Path) copyObject((Node) childpath);
@@ -321,7 +321,7 @@ xfunc_pullup(Query *queryInfo,
     * * We copy the cinfo, since it may appear in other plans, and we're
     * going * to munge it.  -- JMH, 7/22/92
     */
-   newinfo = (CInfo) copyObject((Node) cinfo);
+   newinfo = (ClauseInfo) copyObject((Node) cinfo);
 
    /*
     * * Fix all vars in the clause * to point to the right varno and
@@ -346,7 +346,7 @@ xfunc_pullup(Query *queryInfo,
    cost = xfunc_total_path_cost(parentpath);
    set_path_cost(parentpath, cost);
 
-   return (newinfo);
+   return newinfo;
 }
 
 /*
@@ -360,10 +360,10 @@ xfunc_rank(Query *queryInfo, LispValue clause)
 
    if (cost == 0)
        if (selec > 1)
-           return (MAXFLOAT);
+           return MAXFLOAT;
        else
-           return (-(MAXFLOAT));
-   return ((selec - 1) / cost);
+           return -(MAXFLOAT);
+   return (selec - 1) / cost;
 }
 
 /*
@@ -385,7 +385,7 @@ LispValue   clause;
            cost /= card;
    }
 
-   return (cost);
+   return cost;
 }
 
 /*
@@ -414,7 +414,7 @@ xfunc_join_expense(Query *queryInfo, JoinPath path, int whichchild)
    if (card)
        cost /= card;
 
-   return (cost);
+   return cost;
 }
 
 /*
@@ -429,13 +429,13 @@ xfunc_local_expense(LispValue clause)
 
    /* First handle the base case */
    if (IsA(clause, Const) ||IsA(clause, Var) ||IsA(clause, Param))
-       return (0);
+       return 0;
    /* now other stuff */
    else if (IsA(clause, Iter))
        /* Too low. Should multiply by the expected number of iterations. */
-       return (xfunc_local_expense(get_iterexpr((Iter) clause)));
+       return xfunc_local_expense(get_iterexpr((Iter) clause));
    else if (IsA(clause, ArrayRef))
-       return (xfunc_local_expense(get_refexpr((ArrayRef) clause)));
+       return xfunc_local_expense(get_refexpr((ArrayRef) clause));
    else if (fast_is_clause(clause))
        return (xfunc_func_expense((LispValue) get_op(clause),
                                   (LispValue) get_opargs(clause)));
@@ -443,19 +443,19 @@ xfunc_local_expense(LispValue clause)
        return (xfunc_func_expense((LispValue) get_function(clause),
                                   (LispValue) get_funcargs(clause)));
    else if (fast_not_clause(clause))
-       return (xfunc_local_expense(lsecond(clause)));
+       return xfunc_local_expense(lsecond(clause));
    else if (fast_or_clause(clause) || fast_and_clause(clause))
    {
        /* find cost of evaluating each disjunct */
        for (tmpclause = lnext(clause); tmpclause != LispNil;
             tmpclause = lnext(tmpclause))
            cost += xfunc_local_expense(lfirst(tmpclause));
-       return (cost);
+       return cost;
    }
    else
    {
        elog(ERROR, "Clause node of undetermined type");
-       return (-1);
+       return -1;
    }
 }
 
@@ -545,7 +545,7 @@ xfunc_func_expense(LispValue node, LispValue args)
         */
        foreach(tmpplan, planlist)
            cost += get_cost((Plan) lfirst(tmpplan));
-       return (cost);
+       return cost;
    }
    else
    {                           /* it's a C function */
@@ -593,7 +593,7 @@ xfunc_width(LispValue clause)
 {
    Relation    rd;             /* Relation Descriptor */
    HeapTuple   tupl;           /* structure to hold a cached tuple */
-   TypeTupleForm type;         /* structure to hold a type tuple */
+   Form_pg_type type;          /* structure to hold a type tuple */
    int         retval = 0;
 
    if (IsA(clause, Const))
@@ -617,7 +617,7 @@ xfunc_width(LispValue clause)
        if (!HeapTupleIsValid(tupl))
            elog(ERROR, "Cache lookup failed for type %d",
                 get_vartype((Var) clause));
-       type = (TypeTupleForm) GETSTRUCT(tupl);
+       type = (Form_pg_type) GETSTRUCT(tupl);
        if (get_varattno((Var) clause) == 0)
        {
            /* clause is a tuple.  Get its width */
@@ -682,7 +682,7 @@ xfunc_width(LispValue clause)
            elog(ERROR, "Cache lookup failed for procedure %d",
                 get_opno((Oper) get_op(clause)));
        return (xfunc_func_width
-               ((RegProcedure) (((OperatorTupleForm) (GETSTRUCT(tupl)))->oprcode),
+               ((RegProcedure) (((Form_pg_operator) (GETSTRUCT(tupl)))->oprcode),
                 (LispValue) get_opargs(clause)));
    }
    else if (fast_is_funcclause(clause))
@@ -711,13 +711,13 @@ xfunc_width(LispValue clause)
    else
    {
        elog(ERROR, "Clause node of undetermined type");
-       return (-1);
+       return -1;
    }
 
 exit:
    if (retval == -1)
        retval = VARLEN_DEFAULT;
-   return (retval);
+   return retval;
 }
 
 /*
@@ -748,7 +748,7 @@ xfunc_card_unreferenced(Query *queryInfo,
        referenced = xfunc_find_references(clause);
    unreferenced = set_difference(allrelids, referenced);
 
-   return (xfunc_card_product(unreferenced));
+   return xfunc_card_product(unreferenced);
 }
 
 /*
@@ -774,10 +774,10 @@ xfunc_card_product(Query *queryInfo, Relid relids)
            /* factor in the selectivity of all zero-cost clauses */
            foreach(cinfonode, get_clauseinfo(currel))
            {
-               if (!xfunc_expense(queryInfo, get_clause((CInfo) lfirst(cinfonode))))
+               if (!xfunc_expense(queryInfo, get_clause((ClauseInfo) lfirst(cinfonode))))
                    tuples *=
                        compute_clause_selec(queryInfo,
-                                  get_clause((CInfo) lfirst(cinfonode)),
+                                  get_clause((ClauseInfo) lfirst(cinfonode)),
                                             LispNil);
            }
 
@@ -789,7 +789,7 @@ xfunc_card_product(Query *queryInfo, Relid relids)
    }
    if (retval == 0)
        retval = 1;             /* saves caller from dividing by zero */
-   return (retval);
+   return retval;
 }
 
 
@@ -805,9 +805,9 @@ xfunc_find_references(LispValue clause)
 
    /* Base cases */
    if (IsA(clause, Var))
-       return (lispCons(lfirst(get_varid((Var) clause)), LispNil));
+       return lispCons(lfirst(get_varid((Var) clause)), LispNil);
    else if (IsA(clause, Const) ||IsA(clause, Param))
-       return ((List) LispNil);
+       return (List) LispNil;
 
    /* recursion */
    else if (IsA(clause, Iter))
@@ -816,16 +816,16 @@ xfunc_find_references(LispValue clause)
         * Too low. Should multiply by the expected number of iterations.
         * maybe
         */
-       return (xfunc_find_references(get_iterexpr((Iter) clause)));
+       return xfunc_find_references(get_iterexpr((Iter) clause));
    else if (IsA(clause, ArrayRef))
-       return (xfunc_find_references(get_refexpr((ArrayRef) clause)));
+       return xfunc_find_references(get_refexpr((ArrayRef) clause));
    else if (fast_is_clause(clause))
    {
        /* string together result of all operands of Oper */
        for (tmpclause = (LispValue) get_opargs(clause); tmpclause != LispNil;
             tmpclause = lnext(tmpclause))
            retval = nconc(retval, xfunc_find_references(lfirst(tmpclause)));
-       return (retval);
+       return retval;
    }
    else if (fast_is_funcclause(clause))
    {
@@ -834,22 +834,22 @@ xfunc_find_references(LispValue clause)
             tmpclause != LispNil;
             tmpclause = lnext(tmpclause))
            retval = nconc(retval, xfunc_find_references(lfirst(tmpclause)));
-       return (retval);
+       return retval;
    }
    else if (fast_not_clause(clause))
-       return (xfunc_find_references(lsecond(clause)));
+       return xfunc_find_references(lsecond(clause));
    else if (fast_or_clause(clause) || fast_and_clause(clause))
    {
        /* string together result of all operands of OR */
        for (tmpclause = lnext(clause); tmpclause != LispNil;
             tmpclause = lnext(tmpclause))
            retval = nconc(retval, xfunc_find_references(lfirst(tmpclause)));
-       return (retval);
+       return retval;
    }
    else
    {
        elog(ERROR, "Clause node of undetermined type");
-       return ((List) LispNil);
+       return (List) LispNil;
    }
 }
 
@@ -863,7 +863,7 @@ LispValue
 xfunc_primary_join(JoinPath pathnode)
 {
    LispValue   joinclauselist = get_pathclauseinfo(pathnode);
-   CInfo       mincinfo;
+   ClauseInfo      mincinfo;
    LispValue   tmplist;
    LispValue   minclause = LispNil;
    Cost        minrank,
@@ -882,7 +882,7 @@ xfunc_primary_join(JoinPath pathnode)
                minrank = tmprank;
                minclause = lfirst(tmplist);
            }
-       return (minclause);
+       return minclause;
    }
    else if (IsA(pathnode, HashPath))
    {
@@ -897,24 +897,24 @@ xfunc_primary_join(JoinPath pathnode)
                minrank = tmprank;
                minclause = lfirst(tmplist);
            }
-       return (minclause);
+       return minclause;
    }
 
    /* if we drop through, it's nested loop join */
    if (joinclauselist == LispNil)
-       return (LispNil);
+       return LispNil;
 
-   for (tmplist = joinclauselist, mincinfo = (CInfo) lfirst(joinclauselist),
-        minrank = xfunc_rank(get_clause((CInfo) lfirst(tmplist)));
+   for (tmplist = joinclauselist, mincinfo = (ClauseInfo) lfirst(joinclauselist),
+        minrank = xfunc_rank(get_clause((ClauseInfo) lfirst(tmplist)));
         tmplist != LispNil;
         tmplist = lnext(tmplist))
-       if ((tmprank = xfunc_rank(get_clause((CInfo) lfirst(tmplist))))
+       if ((tmprank = xfunc_rank(get_clause((ClauseInfo) lfirst(tmplist))))
            < minrank)
        {
            minrank = tmprank;
-           mincinfo = (CInfo) lfirst(tmplist);
+           mincinfo = (ClauseInfo) lfirst(tmplist);
        }
-   return ((LispValue) get_clause(mincinfo));
+   return (LispValue) get_clause(mincinfo);
 }
 
 /*
@@ -942,10 +942,10 @@ xfunc_get_path_cost(Query *queryInfo, Path pathnode)
         tmplist != LispNil;
         tmplist = lnext(tmplist))
    {
-       cost += (Cost) (xfunc_local_expense(get_clause((CInfo) lfirst(tmplist)))
+       cost += (Cost) (xfunc_local_expense(get_clause((ClauseInfo) lfirst(tmplist)))
                      * (Cost) get_tuples(get_parent(pathnode)) * selec);
        selec *= compute_clause_selec(queryInfo,
-                                     get_clause((CInfo) lfirst(tmplist)),
+                                     get_clause((ClauseInfo) lfirst(tmplist)),
                                      LispNil);
    }
 
@@ -963,10 +963,10 @@ xfunc_get_path_cost(Query *queryInfo, Path pathnode)
             tmplist != LispNil;
             tmplist = lnext(tmplist))
        {
-           cost += (Cost) (xfunc_local_expense(get_clause((CInfo) lfirst(tmplist)))
+           cost += (Cost) (xfunc_local_expense(get_clause((ClauseInfo) lfirst(tmplist)))
                      * (Cost) get_tuples(get_parent(pathnode)) * selec);
            selec *= compute_clause_selec(queryInfo,
-                                    get_clause((CInfo) lfirst(tmplist)),
+                                    get_clause((ClauseInfo) lfirst(tmplist)),
                                          LispNil);
        }
    }
@@ -1005,7 +1005,7 @@ xfunc_get_path_cost(Query *queryInfo, Path pathnode)
        }
    }
    Assert(cost >= 0);
-   return (cost);
+   return cost;
 }
 
 /*
@@ -1037,7 +1037,7 @@ xfunc_total_path_cost(JoinPath pathnode)
                            get_width(get_parent((Path) get_innerjoinpath
                                                 (mrgnode))));
        Assert(cost >= 0);
-       return (cost);
+       return cost;
    }
    else if (IsA(pathnode, HashPath))
    {
@@ -1056,7 +1056,7 @@ xfunc_total_path_cost(JoinPath pathnode)
                            get_width(get_parent((Path) get_innerjoinpath
                                                 (hashnode))));
        Assert(cost >= 0);
-       return (cost);
+       return cost;
    }
    else
 /* Nested Loop Join */
@@ -1071,7 +1071,7 @@ xfunc_total_path_cost(JoinPath pathnode)
                                                 (pathnode))),
                            IsA(get_innerjoinpath(pathnode), IndexPath));
        Assert(cost >= 0);
-       return (cost);
+       return cost;
    }
 }
 
@@ -1105,7 +1105,7 @@ xfunc_expense_per_tuple(JoinPath joinnode, int whichchild)
    if (IsA(joinnode, HashPath))
    {
        if (whichchild == INNER)
-           return ((1 + _CPU_PAGE_WEIGHT_) * outers_per_page / NBuffers);
+           return (1 + _CPU_PAGE_WEIGHT_) * outers_per_page / NBuffers;
        else
            return (((1 + _CPU_PAGE_WEIGHT_) * outers_per_page / NBuffers)
                    + _CPU_PAGE_WEIGHT_
@@ -1125,7 +1125,7 @@ xfunc_expense_per_tuple(JoinPath joinnode, int whichchild)
 /* nestloop */
    {
        Assert(IsA(joinnode, JoinPath));
-       return (_CPU_PAGE_WEIGHT_);
+       return _CPU_PAGE_WEIGHT_;
    }
 }
 
@@ -1189,19 +1189,19 @@ xfunc_fixvars(LispValue clause, /* clause being pulled up */
 
 
 /*
- ** Comparison function for lisp_qsort() on a list of CInfo's.
- ** arg1 and arg2 should really be of type (CInfo *).
+ ** Comparison function for lisp_qsort() on a list of ClauseInfo's.
+ ** arg1 and arg2 should really be of type (ClauseInfo *).
  */
 int
 xfunc_cinfo_compare(void *arg1, void *arg2)
 {
-   CInfo       info1 = *(CInfo *) arg1;
-   CInfo       info2 = *(CInfo *) arg2;
+   ClauseInfo      info1 = *(ClauseInfo *) arg1;
+   ClauseInfo      info2 = *(ClauseInfo *) arg2;
 
    LispValue   clause1 = (LispValue) get_clause(info1),
                clause2 = (LispValue) get_clause(info2);
 
-   return (xfunc_clause_compare((void *) &clause1, (void *) &clause2));
+   return xfunc_clause_compare((void *) &clause1, (void *) &clause2);
 }
 
 /*
@@ -1221,11 +1221,11 @@ xfunc_clause_compare(void *arg1, void *arg2)
    rank2 = xfunc_rank(clause2);
 
    if (rank1 < rank2)
-       return (-1);
+       return -1;
    else if (rank1 == rank2)
-       return (0);
+       return 0;
    else
-       return (1);
+       return 1;
 }
 
 /*
@@ -1285,11 +1285,11 @@ xfunc_disjunct_compare(Query *queryInfo, void *arg1, void *arg2)
        rank2 = cost2 / selec2;
 
    if (rank1 < rank2)
-       return (-1);
+       return -1;
    else if (rank1 == rank2)
-       return (0);
+       return 0;
    else
-       return (1);
+       return 1;
 }
 
 /* ------------------------ UTILITY FUNCTIONS ------------------------------- */
@@ -1303,7 +1303,7 @@ xfunc_func_width(RegProcedure funcid, LispValue args)
    Relation    rd;             /* Relation Descriptor */
    HeapTuple   tupl;           /* structure to hold a cached tuple */
    Form_pg_proc proc;          /* structure to hold the pg_proc tuple */
-   TypeTupleForm type;         /* structure to hold the pg_type tuple */
+   Form_pg_type type;          /* structure to hold the pg_type tuple */
    LispValue   tmpclause;
    int         retval;
 
@@ -1332,7 +1332,7 @@ xfunc_func_width(RegProcedure funcid, LispValue args)
                                   0, 0, 0);
        if (!HeapTupleIsValid(tupl))
            elog(ERROR, "Cache lookup failed for type %d", proc->prorettype);
-       type = (TypeTupleForm) GETSTRUCT(tupl);
+       type = (Form_pg_type) GETSTRUCT(tupl);
        /* if the type length is known, return that */
        if (type->typlen != -1)
        {
@@ -1352,7 +1352,7 @@ xfunc_func_width(RegProcedure funcid, LispValue args)
        }
    }
 exit:
-   return (retval);
+   return retval;
 }
 
 /*
@@ -1364,7 +1364,7 @@ xfunc_tuple_width(Relation rd)
 {
    int         i;
    int         retval = 0;
-   TupleDesc   tdesc = RelationGetTupleDescriptor(rd);
+   TupleDesc   tdesc = RelationGetDescr(rd);
 
    for (i = 0; i < tdesc->natts; i++)
    {
@@ -1374,7 +1374,7 @@ xfunc_tuple_width(Relation rd)
            retval += VARLEN_DEFAULT;
    }
 
-   return (retval);
+   return retval;
 }
 
 /*
@@ -1387,11 +1387,11 @@ xfunc_num_join_clauses(JoinPath path)
    int         num = length(get_pathclauseinfo(path));
 
    if (IsA(path, MergePath))
-       return (num + length(get_path_mergeclauses((MergePath) path)));
+       return num + length(get_path_mergeclauses((MergePath) path));
    else if (IsA(path, HashPath))
-       return (num + length(get_path_hashclauses((HashPath) path)));
+       return num + length(get_path_hashclauses((HashPath) path));
    else
-       return (num);
+       return num;
 }
 
 /*
@@ -1414,7 +1414,7 @@ xfunc_LispRemove(LispValue foo, List bar)
    if (!sanity)
        elog(ERROR, "xfunc_LispRemove: didn't find a match!");
 
-   return (result);
+   return result;
 }
 
 #define Node_Copy(a, b, c, d) \
index 54b1cb6335406919bcc32548be12af546d0bc631..5011d0b2487e8309a798ac32cd07b7009c5c70c8 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.30 1998/08/04 16:44:12 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.31 1998/09/01 03:23:35 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -154,7 +154,7 @@ create_plan(Path *best_path)
    }
 #endif
 
-   return (plan_node);
+   return plan_node;
 }
 
 /*
@@ -281,7 +281,7 @@ create_join_node(JoinPath *best_path, List *tlist)
                                   (get_locclauseinfo(best_path)))));
 #endif
 
-   return (retval);
+   return retval;
 }
 
 /*****************************************************************************
@@ -316,7 +316,7 @@ create_seqscan_node(Path *best_path, List *tlist, List *scan_clauses)
 
    scan_node->plan.cost = best_path->path_cost;
 
-   return (scan_node);
+   return scan_node;
 }
 
 /*
@@ -342,7 +342,7 @@ create_indexscan_node(IndexPath *best_path,
    IndexScan  *scan_node = (IndexScan *) NULL;
    bool        lossy = FALSE;
    HeapTuple   indexTuple;
-   IndexTupleForm index;
+   Form_pg_index index;
 
    /*
     * If an 'or' clause is to be used with this index, the indxqual field
@@ -377,7 +377,7 @@ create_indexscan_node(IndexPath *best_path,
        if (!HeapTupleIsValid(indexTuple))
            elog(ERROR, "create_plan: index %d not found",
                 lfirsti(ixid));
-       index = (IndexTupleForm) GETSTRUCT(indexTuple);
+       index = (Form_pg_index) GETSTRUCT(indexTuple);
        if (index->indislossy)
            lossy = TRUE;
    }
@@ -418,7 +418,7 @@ create_indexscan_node(IndexPath *best_path,
                       fixed_indxqual,
                       best_path->path.path_cost);
 
-   return (scan_node);
+   return scan_node;
 }
 
 /*****************************************************************************
@@ -506,7 +506,7 @@ create_nestloop_node(JoinPath *best_path,
 
    join_node->join.cost = best_path->path.path_cost;
 
-   return (join_node);
+   return join_node;
 }
 
 static MergeJoin *
@@ -595,7 +595,7 @@ create_mergejoin_node(MergePath *best_path,
 
    join_node->join.cost = best_path->jpath.path.path_cost;
 
-   return (join_node);
+   return join_node;
 }
 
 /*
@@ -650,7 +650,7 @@ create_hashjoin_node(HashPath *best_path,
                              (Plan *) hash_node);
    join_node->join.cost = best_path->jpath.path.path_cost;
 
-   return (join_node);
+   return join_node;
 }
 
 
@@ -684,17 +684,17 @@ fix_indxqual_references(Node *clause, Path *index_path)
            }
            newclause = copyObject((Node *) clause);
            ((Var *) newclause)->varattno = pos + 1;
-           return (newclause);
+           return newclause;
        }
        else
-           return (clause);
+           return clause;
    }
    else if (IsA(clause, Const))
-       return (clause);
+       return clause;
    else if (IsA(clause, Param))
    {
        /* Function parameter used as index scan arg.  DZ - 27-8-1996 */
-       return (clause);
+       return clause;
    }
    else if (is_opclause(clause) &&
             is_funcclause((Node *) get_leftop((Expr *) clause)) &&
@@ -743,7 +743,7 @@ fix_indxqual_references(Node *clause, Path *index_path)
                make_clause(expr->opType, expr->oper, new_subclauses);
        }
        else
-           return (clause);
+           return clause;
    }
    else
    {
@@ -770,7 +770,7 @@ fix_indxqual_references(Node *clause, Path *index_path)
        if (new_subclauses)
            return (Node *) new_subclauses;
        else
-           return (clause);
+           return clause;
    }
 }
 
@@ -812,7 +812,7 @@ switch_outer(List *clauses)
        else
            t_list = lappend(t_list, clause);
    }
-   return (t_list);
+   return t_list;
 }
 
 /*
@@ -856,7 +856,7 @@ set_temp_tlist_operators(List *tlist, List *pathkeys, Oid *operators)
        }
        keyno += 1;
    }
-   return (tlist);
+   return tlist;
 }
 
 /*****************************************************************************
@@ -917,7 +917,7 @@ make_temp(List *tlist,
            elog(ERROR, "make_temp: unknown temp type %d", temptype);
 
    }
-   return (retval);
+   return retval;
 }
 
 
@@ -939,7 +939,7 @@ make_seqscan(List *qptlist,
    node->scanrelid = scanrelid;
    node->scanstate = (CommonScanState *) NULL;
 
-   return (node);
+   return node;
 }
 
 static IndexScan *
@@ -964,7 +964,7 @@ make_indexscan(List *qptlist,
    node->indxqual = indxqual;
    node->scan.scanstate = (CommonScanState *) NULL;
 
-   return (node);
+   return node;
 }
 
 
@@ -986,7 +986,7 @@ make_nestloop(List *qptlist,
    plan->righttree = righttree;
    node->nlstate = (NestLoopState *) NULL;
 
-   return (node);
+   return node;
 }
 
 static HashJoin *
@@ -1013,7 +1013,7 @@ make_hashjoin(List *tlist,
    node->hashjointablesize = 0;
    node->hashdone = false;
 
-   return (node);
+   return node;
 }
 
 static Hash *
@@ -1034,7 +1034,7 @@ make_hash(List *tlist, Var *hashkey, Plan *lefttree)
    node->hashtablekey = 0;
    node->hashtablesize = 0;
 
-   return (node);
+   return node;
 }
 
 static MergeJoin *
@@ -1062,7 +1062,7 @@ make_mergejoin(List *tlist,
    node->mergerightorder = rightorder;
    node->mergeleftorder = leftorder;
 
-   return (node);
+   return node;
 }
 
 Sort *
@@ -1080,7 +1080,7 @@ make_sort(List *tlist, Oid tempid, Plan *lefttree, int keycount)
    node->tempid = tempid;
    node->keycount = keycount;
 
-   return (node);
+   return node;
 }
 
 static Material *
@@ -1101,7 +1101,7 @@ make_material(List *tlist,
    node->tempid = tempid;
    node->keycount = keycount;
 
-   return (node);
+   return node;
 }
 
 Agg *
@@ -1117,7 +1117,7 @@ make_agg(List *tlist, Plan *lefttree)
    node->plan.righttree = (Plan *) NULL;
    node->aggs = NIL;
 
-   return (node);
+   return node;
 }
 
 Group *
@@ -1139,7 +1139,7 @@ make_group(List *tlist,
    node->numCols = ngrp;
    node->grpColIdx = grpColIdx;
 
-   return (node);
+   return node;
 }
 
 /*
@@ -1168,7 +1168,7 @@ make_unique(List *tlist, Plan *lefttree, char *uniqueAttr)
        node->uniqueAttr = NULL;
    else
        node->uniqueAttr = pstrdup(uniqueAttr);
-   return (node);
+   return node;
 }
 
 #ifdef NOT_USED
index feb9bff1274f89ed9a515ea16e88643406376813..22cfeaf7557f1ba50400d9b6da1477428fe66c5a 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/optimizer/plan/initsplan.c,v 1.18 1998/08/10 02:26:26 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/optimizer/plan/initsplan.c,v 1.19 1998/09/01 03:23:36 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -40,7 +40,7 @@
 extern int Quiet;
 
 static void add_clause_to_rels(Query *root, List *clause);
-static void add_join_info_to_rels(Query *root, CInfo *clauseinfo,
+static void add_join_info_to_rels(Query *root, ClauseInfo *clauseinfo,
                             List *join_relids);
 static void add_vars_to_targetlist(Query *root, List *vars, List *join_relids);
 
@@ -170,7 +170,7 @@ add_clause_to_rels(Query *root, List *clause)
 {
    List       *relids;
    List       *vars;
-   CInfo      *clauseinfo = makeNode(CInfo);
+   ClauseInfo     *clauseinfo = makeNode(ClauseInfo);
 
    /*
     * Retrieve all relids and vars contained within the clause.
@@ -252,13 +252,13 @@ add_clause_to_rels(Query *root, List *clause)
  *
  */
 static void
-add_join_info_to_rels(Query *root, CInfo *clauseinfo, List *join_relids)
+add_join_info_to_rels(Query *root, ClauseInfo *clauseinfo, List *join_relids)
 {
    List       *join_relid;
 
    foreach(join_relid, join_relids)
    {
-       JInfo      *joininfo;
+       JoinInfo       *joininfo;
        List       *other_rels = NIL;
        List       *rel;
 
@@ -332,8 +332,8 @@ init_join_info(List *rel_list)
               *y,
               *z;
    RelOptInfo *rel;
-   JInfo      *joininfo;
-   CInfo      *clauseinfo;
+   JoinInfo       *joininfo;
+   ClauseInfo     *clauseinfo;
    Expr       *clause;
 
    foreach(x, rel_list)
@@ -341,10 +341,10 @@ init_join_info(List *rel_list)
        rel = (RelOptInfo *) lfirst(x);
        foreach(y, rel->joininfo)
        {
-           joininfo = (JInfo *) lfirst(y);
+           joininfo = (JoinInfo *) lfirst(y);
            foreach(z, joininfo->jinfoclauseinfo)
            {
-               clauseinfo = (CInfo *) lfirst(z);
+               clauseinfo = (ClauseInfo *) lfirst(z);
                clause = clauseinfo->clause;
                if (is_joinable((Node *) clause))
                {
@@ -400,10 +400,10 @@ mergejoinop(Expr *clause)
        morder->right_operator = rightOp;
        morder->left_type = (get_leftop(clause))->vartype;
        morder->right_type = (get_rightop(clause))->vartype;
-       return (morder);
+       return morder;
    }
    else
-       return (NULL);
+       return NULL;
 }
 
 /*
index 7cbd1879e537c4c7359bf45cf597636b1e41438e..a3e97063a79bb825ce4d15abf7648a6b17eb1d7d 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.26 1998/08/10 04:49:39 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.27 1998/09/01 03:23:38 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -112,7 +112,7 @@ query_planner(Query *root,
                                          (Plan *) NULL));
        }
        else
-           return ((Plan *) NULL);
+           return (Plan *) NULL;
    }
 
    /*
@@ -167,12 +167,12 @@ query_planner(Query *root,
                                                     (Plan *) scan));
                    }
                    else
-                       return ((Plan *) scan);
+                       return (Plan *) scan;
                }
                break;
 
            default:
-               return ((Plan *) NULL);
+               return (Plan *) NULL;
        }
    }
 
@@ -312,11 +312,11 @@ subplanner(Query *root,
     * it.
     */
    if (final_rel)
-       return (create_plan((Path *) final_rel->cheapestpath));
+       return create_plan((Path *) final_rel->cheapestpath);
    else
    {
        elog(NOTICE, "final relation is nil");
-       return (create_plan((Path *) NULL));
+       return create_plan((Path *) NULL);
    }
 
 }
@@ -344,7 +344,7 @@ make_result(List *tlist,
    node->resconstantqual = resconstantqual;
    node->resstate = NULL;
 
-   return (node);
+   return node;
 }
 
 /*****************************************************************************
index 4fe55a7b72d8c9a202684c1aa46292f273c90ab4..703e067e4cfc76bbc22c400dda1c4e8231899185 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.30 1998/08/29 04:09:25 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.31 1998/09/01 03:23:39 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -79,7 +79,7 @@ planner(Query *parse)
    }
    result_plan->nParamExec = length(PlannerParamVar);
 
-   return (result_plan);
+   return result_plan;
 }
 
 /*
@@ -298,14 +298,14 @@ union_planner(Query *parse)
    {
        Plan       *sortplan = make_sortplan(tlist, parse->sortClause, result_plan);
 
-       return ((Plan *) make_unique(tlist, sortplan, parse->uniqueFlag));
+       return (Plan *) make_unique(tlist, sortplan, parse->uniqueFlag);
    }
    else
    {
        if (parse->sortClause)
-           return (make_sortplan(tlist, parse->sortClause, result_plan));
+           return make_sortplan(tlist, parse->sortClause, result_plan);
        else
-           return ((Plan *) result_plan);
+           return (Plan *) result_plan;
    }
 
 }
@@ -367,7 +367,7 @@ make_sortplan(List *tlist, List *sortcls, Plan *plannode)
 
    sortplan->cost = plannode->cost;
 
-   return (sortplan);
+   return sortplan;
 }
 
 /*
index 4fdde87938af12dac20cced4a0ea4aba4ed81b0c..32f0b8225ff5bd1665cf2e007189c27864194414 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.24 1998/07/20 19:53:46 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.25 1998/09/01 03:23:40 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -274,7 +274,7 @@ index_outerjoin_references(List *inner_indxqual,
        }
 
    }
-   return (t_list);
+   return t_list;
 }
 
 /*
@@ -305,14 +305,14 @@ replace_clause_joinvar_refs(Expr *clause,
        temp = (List *) replace_joinvar_refs((Var *) clause,
                                             outer_tlist, inner_tlist);
        if (temp)
-           return (temp);
+           return temp;
        else if (clause != NULL)
-           return ((List *) clause);
+           return (List *) clause;
        else
-           return (NIL);
+           return NIL;
    }
    else if (single_node((Node *) clause))
-       return ((List *) clause);
+       return (List *) clause;
    else if (and_clause((Node *) clause))
    {
        List       *andclause =
@@ -320,7 +320,7 @@ replace_clause_joinvar_refs(Expr *clause,
                                       outer_tlist,
                                       inner_tlist);
 
-       return ((List *) make_andclause(andclause));
+       return (List *) make_andclause(andclause);
    }
    else if (or_clause((Node *) clause))
    {
@@ -329,7 +329,7 @@ replace_clause_joinvar_refs(Expr *clause,
                                       outer_tlist,
                                       inner_tlist);
 
-       return ((List *) make_orclause(orclause));
+       return (List *) make_orclause(orclause);
    }
    else if (IsA(clause, ArrayRef))
    {
@@ -355,7 +355,7 @@ replace_clause_joinvar_refs(Expr *clause,
         * structure 'clause'.
         */
 
-       return ((List *) clause);
+       return (List *) clause;
    }
    else if (is_funcclause((Node *) clause))
    {
@@ -374,7 +374,7 @@ replace_clause_joinvar_refs(Expr *clause,
                                    outer_tlist,
                                    inner_tlist);
 
-       return ((List *) make_notclause((Expr *) notclause));
+       return (List *) make_notclause((Expr *) notclause);
    }
    else if (is_opclause((Node *) clause))
    {
@@ -401,7 +401,7 @@ replace_clause_joinvar_refs(Expr *clause,
            replace_subclause_joinvar_refs(((SubPlan *) ((Expr *) clause)->oper)->sublink->oper,
                                           outer_tlist,
                                           inner_tlist);
-       return ((List *) clause);
+       return (List *) clause;
    }
    /* shouldn't reach here */
    elog(ERROR, "replace_clause_joinvar_refs: unsupported clause %d",
@@ -425,7 +425,7 @@ replace_subclause_joinvar_refs(List *clauses,
                                           inner_tlist);
        t_list = lappend(t_list, temp);
    }
-   return (t_list);
+   return t_list;
 }
 
 static Var *
@@ -508,7 +508,7 @@ tlist_temp_references(Oid tempid,
 
        t_list = lappend(t_list, temp);
    }
-   return (t_list);
+   return t_list;
 }
 
 /*---------------------------------------------------------
index d01cb72383d1e213f2a18039e202143536d1c647..61d0df57afaab27dae7211e8a6bd2491de249085 100644 (file)
@@ -58,7 +58,7 @@ _new_param(Var *var, int varlevel)
    lfirst(last) = makeVar(var->varno, var->varattno, var->vartype,
                var->vartypmod, varlevel, var->varnoold, var->varoattno);
 
-   return (i);
+   return i;
 }
 
 static Param *
@@ -99,7 +99,7 @@ _replace_var(Var *var)
    retval->paramid = (AttrNumber) i;
    retval->paramtype = var->vartype;
 
-   return (retval);
+   return retval;
 }
 
 static Node *
@@ -239,7 +239,7 @@ _make_subplan(SubLink *slink)
        result = (Node *) expr;
    }
 
-   return (result);
+   return result;
 
 }
 
@@ -247,11 +247,11 @@ static List *
 set_unioni(List *l1, List *l2)
 {
    if (l1 == NULL)
-       return (l2);
+       return l2;
    if (l2 == NULL)
-       return (l1);
+       return l1;
 
-   return (nconc(l1, set_differencei(l2, l1)));
+   return nconc(l1, set_differencei(l2, l1));
 }
 
 static List *
@@ -260,15 +260,15 @@ _finalize_primnode(void *expr, List **subplan)
    List       *result = NULL;
 
    if (expr == NULL)
-       return (NULL);
+       return NULL;
 
    if (IsA(expr, Param))
    {
        if (((Param *) expr)->paramkind == PARAM_EXEC)
-           return (lconsi(((Param *) expr)->paramid, (List *) NULL));
+           return lconsi(((Param *) expr)->paramid, (List *) NULL);
    }
    else if (single_node(expr))
-       return (NULL);
+       return NULL;
    else if (IsA(expr, List))
    {
        List       *le;
@@ -278,12 +278,12 @@ _finalize_primnode(void *expr, List **subplan)
                                _finalize_primnode(lfirst(le), subplan));
    }
    else if (IsA(expr, Iter))
-       return (_finalize_primnode(((Iter *) expr)->iterexpr, subplan));
+       return _finalize_primnode(((Iter *) expr)->iterexpr, subplan);
    else if (or_clause(expr) || and_clause(expr) || is_opclause(expr) ||
             not_clause(expr) || is_funcclause(expr))
-       return (_finalize_primnode(((Expr *) expr)->args, subplan));
+       return _finalize_primnode(((Expr *) expr)->args, subplan);
    else if (IsA(expr, Aggreg))
-       return (_finalize_primnode(((Aggreg *) expr)->target, subplan));
+       return _finalize_primnode(((Aggreg *) expr)->target, subplan);
    else if (IsA(expr, ArrayRef))
    {
        result = _finalize_primnode(((ArrayRef *) expr)->refupperindexpr, subplan);
@@ -295,7 +295,7 @@ _finalize_primnode(void *expr, List **subplan)
         _finalize_primnode(((ArrayRef *) expr)->refassgnexpr, subplan));
    }
    else if (IsA(expr, TargetEntry))
-       return (_finalize_primnode(((TargetEntry *) expr)->expr, subplan));
+       return _finalize_primnode(((TargetEntry *) expr)->expr, subplan);
    else if (is_subplan(expr))
    {
        List       *lst;
@@ -314,7 +314,7 @@ _finalize_primnode(void *expr, List **subplan)
        elog(ERROR, "_finalize_primnode: can't handle node %d",
             nodeTag(expr));
 
-   return (result);
+   return result;
 }
 
 Node *
@@ -322,7 +322,7 @@ SS_replace_correlation_vars(Node *expr)
 {
 
    if (expr == NULL)
-       return (NULL);
+       return NULL;
    if (IsA(expr, List))
    {
        List       *le;
@@ -344,7 +344,7 @@ SS_replace_correlation_vars(Node *expr)
            SS_replace_correlation_vars(((Iter *) expr)->iterexpr);
    }
    else if (single_node(expr))
-       return (expr);
+       return expr;
    else if (or_clause(expr) || and_clause(expr) || is_opclause(expr) ||
             not_clause(expr) || is_funcclause(expr))
        ((Expr *) expr)->args = (List *)
@@ -384,14 +384,14 @@ SS_replace_correlation_vars(Node *expr)
        elog(NOTICE, "SS_replace_correlation_vars: can't handle node %d",
             nodeTag(expr));
 
-   return (expr);
+   return expr;
 }
 
 Node *
 SS_process_sublinks(Node *expr)
 {
    if (expr == NULL)
-       return (NULL);
+       return NULL;
    if (IsA(expr, List))
    {
        List       *le;
@@ -419,7 +419,7 @@ SS_process_sublinks(Node *expr)
        expr = _make_subplan((SubLink *) expr);
    }
    
-   return (expr);
+   return expr;
 }
 
 List *
@@ -432,7 +432,7 @@ SS_finalize_plan(Plan *plan)
    List       *lst;
 
    if (plan == NULL)
-       return (NULL);
+       return NULL;
 
    param_list = _finalize_primnode(plan->targetlist, &subPlan);
    Assert(subPlan == NULL);
@@ -489,7 +489,7 @@ SS_finalize_plan(Plan *plan)
            break;
        default:
            elog(ERROR, "SS_finalize_plan: node %d unsupported", nodeTag(plan));
-           return (NULL);
+           return NULL;
    }
 
    param_list = set_unioni(param_list, _finalize_primnode(plan->qual, &subPlan));
@@ -515,7 +515,7 @@ SS_finalize_plan(Plan *plan)
    plan->locParam = locParam;
    plan->subPlan = subPlan;
 
-   return (param_list);
+   return param_list;
 
 }
 
@@ -527,7 +527,7 @@ SS_pull_subplan(void *expr)
    List       *result = NULL;
 
    if (expr == NULL || single_node(expr))
-       return (NULL);
+       return NULL;
 
    if (IsA(expr, List))
    {
@@ -537,12 +537,12 @@ SS_pull_subplan(void *expr)
            result = nconc(result, SS_pull_subplan(lfirst(le)));
    }
    else if (IsA(expr, Iter))
-       return (SS_pull_subplan(((Iter *) expr)->iterexpr));
+       return SS_pull_subplan(((Iter *) expr)->iterexpr);
    else if (or_clause(expr) || and_clause(expr) || is_opclause(expr) ||
             not_clause(expr) || is_funcclause(expr))
-       return (SS_pull_subplan(((Expr *) expr)->args));
+       return SS_pull_subplan(((Expr *) expr)->args);
    else if (IsA(expr, Aggreg))
-       return (SS_pull_subplan(((Aggreg *) expr)->target));
+       return SS_pull_subplan(((Aggreg *) expr)->target);
    else if (IsA(expr, ArrayRef))
    {
        result = SS_pull_subplan(((ArrayRef *) expr)->refupperindexpr);
@@ -554,12 +554,12 @@ SS_pull_subplan(void *expr)
                     SS_pull_subplan(((ArrayRef *) expr)->refassgnexpr));
    }
    else if (IsA(expr, TargetEntry))
-       return (SS_pull_subplan(((TargetEntry *) expr)->expr));
+       return SS_pull_subplan(((TargetEntry *) expr)->expr);
    else if (is_subplan(expr))
-       return (lcons(((Expr *) expr)->oper, NULL));
+       return lcons(((Expr *) expr)->oper, NULL);
    else
        elog(ERROR, "SS_pull_subplan: can't handle node %d",
             nodeTag(expr));
 
-   return (result);
+   return result;
 }
index 7bb288f9566133e537ac643f649a02d9be4d9bc9..a1f2f309247df27a89d6100c9328456b9c455200 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepqual.c,v 1.9 1998/06/15 19:28:46 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepqual.c,v 1.10 1998/09/01 03:23:43 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -101,7 +101,7 @@ static Expr *
 pull_args(Expr *qual)
 {
    if (qual == NULL)
-       return (NULL);
+       return NULL;
 
    if (is_opclause((Node *) qual))
    {
@@ -117,7 +117,7 @@ pull_args(Expr *qual)
 
        foreach(temp, qual->args)
            t_list = lappend(t_list, pull_args(lfirst(temp)));
-       return (make_andclause(pull_ands(t_list)));
+       return make_andclause(pull_ands(t_list));
    }
    else if (or_clause((Node *) qual))
    {
@@ -126,12 +126,12 @@ pull_args(Expr *qual)
 
        foreach(temp, qual->args)
            t_list = lappend(t_list, pull_args(lfirst(temp)));
-       return (make_orclause(pull_ors(t_list)));
+       return make_orclause(pull_ors(t_list));
    }
    else if (not_clause((Node *) qual))
-       return (make_notclause(pull_args(get_notclausearg(qual))));
+       return make_notclause(pull_args(get_notclausearg(qual)));
    else
-       return (qual);
+       return qual;
 }
 
 /*
@@ -145,7 +145,7 @@ static List *
 pull_ors(List *orlist)
 {
    if (orlist == NIL)
-       return (NIL);
+       return NIL;
 
    if (or_clause(lfirst(orlist)))
    {
@@ -155,7 +155,7 @@ pull_ors(List *orlist)
                               copyObject((Node *) lnext(orlist)))));
    }
    else
-       return (lcons(lfirst(orlist), pull_ors(lnext(orlist))));
+       return lcons(lfirst(orlist), pull_ors(lnext(orlist)));
 }
 
 /*
@@ -169,7 +169,7 @@ static List *
 pull_ands(List *andlist)
 {
    if (andlist == NIL)
-       return (NIL);
+       return NIL;
 
    if (and_clause(lfirst(andlist)))
    {
@@ -179,7 +179,7 @@ pull_ands(List *andlist)
                                copyObject((Node *) lnext(andlist)))));
    }
    else
-       return (lcons(lfirst(andlist), pull_ands(lnext(andlist))));
+       return lcons(lfirst(andlist), pull_ands(lnext(andlist)));
 }
 
 /*
@@ -196,7 +196,7 @@ static Expr *
 find_nots(Expr *qual)
 {
    if (qual == NULL)
-       return (NULL);
+       return NULL;
 
    if (is_opclause((Node *) qual))
    {
@@ -213,7 +213,7 @@ find_nots(Expr *qual)
        foreach(temp, qual->args)
            t_list = lappend(t_list, find_nots(lfirst(temp)));
 
-       return (make_andclause(t_list));
+       return make_andclause(t_list);
    }
    else if (or_clause((Node *) qual))
    {
@@ -222,12 +222,12 @@ find_nots(Expr *qual)
 
        foreach(temp, qual->args)
            t_list = lappend(t_list, find_nots(lfirst(temp)));
-       return (make_orclause(t_list));
+       return make_orclause(t_list);
    }
    else if (not_clause((Node *) qual))
-       return (push_nots(get_notclausearg(qual)));
+       return push_nots(get_notclausearg(qual));
    else
-       return (qual);
+       return qual;
 }
 
 /*
@@ -241,7 +241,7 @@ static Expr *
 push_nots(Expr *qual)
 {
    if (qual == NULL)
-       return (NULL);
+       return NULL;
 
    /*
     * Negate an operator clause if possible: ("NOT" (< A B)) => (> A B)
@@ -265,7 +265,7 @@ push_nots(Expr *qual)
                (make_opclause(op, get_leftop(qual), get_rightop(qual)));
        }
        else
-           return (make_notclause(qual));
+           return make_notclause(qual);
    }
    else if (and_clause((Node *) qual))
    {
@@ -280,7 +280,7 @@ push_nots(Expr *qual)
 
        foreach(temp, qual->args)
            t_list = lappend(t_list, push_nots(lfirst(temp)));
-       return (make_orclause(t_list));
+       return make_orclause(t_list);
    }
    else if (or_clause((Node *) qual))
    {
@@ -289,7 +289,7 @@ push_nots(Expr *qual)
 
        foreach(temp, qual->args)
            t_list = lappend(t_list, push_nots(lfirst(temp)));
-       return (make_andclause(t_list));
+       return make_andclause(t_list);
    }
    else if (not_clause((Node *) qual))
 
@@ -297,14 +297,14 @@ push_nots(Expr *qual)
         * Another 'not' cancels this 'not', so eliminate the 'not' and
         * stop negating this branch.
         */
-       return (find_nots(get_notclausearg(qual)));
+       return find_nots(get_notclausearg(qual));
    else
 
        /*
         * We don't know how to negate anything else, place a 'not' at
         * this level.
         */
-       return (make_notclause(qual));
+       return make_notclause(qual);
 }
 
 /*
@@ -322,7 +322,7 @@ static Expr *
 normalize(Expr *qual)
 {
    if (qual == NULL)
-       return (NULL);
+       return NULL;
 
    if (is_opclause((Node *) qual))
    {
@@ -340,7 +340,7 @@ normalize(Expr *qual)
 
        foreach(temp, qual->args)
            t_list = lappend(t_list, normalize(lfirst(temp)));
-       return (make_andclause(t_list));
+       return make_andclause(t_list);
    }
    else if (or_clause((Node *) qual))
    {
@@ -360,15 +360,15 @@ normalize(Expr *qual)
            }
        }
        if (has_andclause == TRUE)
-           return (make_andclause(or_normalize(orlist)));
+           return make_andclause(or_normalize(orlist));
        else
-           return (make_orclause(orlist));
+           return make_orclause(orlist);
 
    }
    else if (not_clause((Node *) qual))
-       return (make_notclause(normalize(get_notclausearg(qual))));
+       return make_notclause(normalize(get_notclausearg(qual)));
    else
-       return (qual);
+       return qual;
 }
 
 /*
@@ -405,7 +405,7 @@ or_normalize(List *orlist)
                                lnext(new_orlist))));
    }
    else
-       return (orlist);
+       return orlist;
 }
 
 /*
@@ -425,7 +425,7 @@ distribute_args(List *item, List *args)
    List       *t_list = NIL;
 
    if (args == NULL)
-       return (item);
+       return item;
 
    foreach(temp, args)
    {
@@ -434,7 +434,7 @@ distribute_args(List *item, List *args)
        or_list = (List *) make_orclause(n_list);
        t_list = lappend(t_list, or_list);
    }
-   return ((List *) make_andclause(t_list));
+   return (List *) make_andclause(t_list);
 }
 
 /*
@@ -450,7 +450,7 @@ static List *
 qualcleanup(Expr *qual)
 {
    if (qual == NULL)
-       return (NIL);
+       return NIL;
 
    if (is_opclause((Node *) qual))
    {
@@ -471,9 +471,9 @@ qualcleanup(Expr *qual)
        new_and_args = remove_duplicates(t_list);
 
        if (length(new_and_args) > 1)
-           return ((List *) make_andclause(new_and_args));
+           return (List *) make_andclause(new_and_args);
        else
-           return (lfirst(new_and_args));
+           return lfirst(new_and_args);
    }
    else if (or_clause((Node *) qual))
    {
@@ -488,15 +488,15 @@ qualcleanup(Expr *qual)
 
 
        if (length(new_or_args) > 1)
-           return ((List *) make_orclause(new_or_args));
+           return (List *) make_orclause(new_or_args);
        else
-           return (lfirst(new_or_args));
+           return lfirst(new_or_args);
    }
    else if (not_clause((Node *) qual))
-       return ((List *) make_notclause((Expr *) qualcleanup((Expr *) get_notclausearg(qual))));
+       return (List *) make_notclause((Expr *) qualcleanup((Expr *) get_notclausearg(qual)));
 
    else
-       return ((List *) qual);
+       return (List *) qual;
 }
 
 /*
@@ -513,7 +513,7 @@ remove_ands(Expr *qual)
    List       *t_list = NIL;
 
    if (qual == NULL)
-       return (NIL);
+       return NIL;
    if (is_opclause((Node *) qual))
    {
        return ((List *) make_clause(qual->opType, qual->oper,
@@ -527,7 +527,7 @@ remove_ands(Expr *qual)
 
        foreach(temp, qual->args)
            t_list = lappend(t_list, remove_ands(lfirst(temp)));
-       return (t_list);
+       return t_list;
    }
    else if (or_clause((Node *) qual))
    {
@@ -535,12 +535,12 @@ remove_ands(Expr *qual)
 
        foreach(temp, qual->args)
            t_list = lappend(t_list, remove_ands(lfirst(temp)));
-       return ((List *) make_orclause((List *) t_list));
+       return (List *) make_orclause((List *) t_list);
    }
    else if (not_clause((Node *) qual))
-       return ((List *) make_notclause((Expr *) remove_ands((Expr *) get_notclausearg(qual))));
+       return (List *) make_notclause((Expr *) remove_ands((Expr *) get_notclausearg(qual)));
    else
-       return ((List *) qual);
+       return (List *) qual;
 }
 
 /*****************************************************************************
@@ -558,7 +558,7 @@ remove_duplicates(List *list)
    bool        there_exists_duplicate = false;
 
    if (length(list) == 1)
-       return (list);
+       return list;
 
    foreach(i, list)
    {
@@ -575,5 +575,5 @@ remove_duplicates(List *list)
            there_exists_duplicate = false;
        }
    }
-   return (result);
+   return result;
 }
index 636df6111d4ab02fa3e59f1a88e60405c01ebf1c..6fa90a13cf48636bf583cca91bfbe97c1821f88e 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/optimizer/prep/preptlist.c,v 1.14 1998/07/20 19:53:47 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/optimizer/prep/preptlist.c,v 1.15 1998/09/01 03:23:44 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -118,7 +118,7 @@ preprocess_targetlist(List *tlist,
        t_list = lappend(t_list, ctid);
    }
 
-   return (t_list);
+   return t_list;
 }
 
 /*****************************************************************************
@@ -164,10 +164,10 @@ expand_targetlist(List *tlist,
                                                     result_relation,
                                                     node_type);
 
-       return (replace_matching_resname(ntlist, tlist));
+       return replace_matching_resname(ntlist, tlist);
    }
    else
-       return (tlist);
+       return tlist;
 
 }
 
@@ -236,7 +236,7 @@ replace_matching_resname(List *new_tlist, List *old_tlist)
        }
    }
 
-   return (t_list);
+   return t_list;
 }
 
 /*
@@ -331,5 +331,5 @@ new_relation_targetlist(Oid relid, Index rt_index, NodeTag node_type)
        }
    }
 
-   return (t_list);
+   return t_list;
 }
index 8d23792a5373418fc48941d41a3979e0c05b878b..f0242d7270bf7dd3ea4bf474a10f5052ce69670b 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.25 1998/07/15 14:54:37 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.26 1998/09/01 03:23:46 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -297,7 +297,7 @@ plan_inherit_query(List *relids,
    }
 
    *union_rtentriesPtr = union_rtentries;
-   return (union_plans);
+   return union_plans;
 }
 
 /*
@@ -333,7 +333,7 @@ find_all_inheritors(List *unexamined_relids,
                                            new_examined_relids);
 
    if (new_unexamined_relids == NULL)
-       return (new_examined_relids);
+       return new_examined_relids;
    else
    {
        return (find_all_inheritors(new_unexamined_relids,
@@ -386,7 +386,7 @@ new_rangetable_entry(Oid new_relid, RangeTblEntry *old_entry)
        new_entry->relname = get_rel_name(new_relid);
 
    new_entry->relid = new_relid;
-   return (new_entry);
+   return new_entry;
 }
 
 /*
@@ -406,7 +406,7 @@ subst_rangetable(Query *root, Index index, RangeTblEntry *new_entry)
        ;
    lfirst(temp) = new_entry;
 
-   return (new_root);
+   return new_root;
 }
 
 static void
@@ -516,5 +516,5 @@ make_append(List *appendplans,
    node->plan.lefttree = (Plan *) NULL;
    node->plan.righttree = (Plan *) NULL;
 
-   return (node);
+   return node;
 }
index 7b7fdfc407a649b5a1c13c185187cb9d311960d7..0385edaae9ab00a1c64bd56dcfe05ecc7c09b4ff 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/clauseinfo.c,v 1.7 1998/02/26 04:33:09 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/clauseinfo.c,v 1.8 1998/09/01 03:23:47 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
  *
  */
 bool
-valid_or_clause(CInfo *clauseinfo)
+valid_or_clause(ClauseInfo *clauseinfo)
 {
    if (clauseinfo != NULL &&
        !single_node((Node *) clauseinfo->clause) &&
        !clauseinfo->notclause &&
        or_clause((Node *) clauseinfo->clause))
-       return (true);
+       return true;
    else
-       return (false);
+       return false;
 }
 
 /*
@@ -49,14 +49,14 @@ get_actual_clauses(List *clauseinfo_list)
 {
    List       *temp = NIL;
    List       *result = NIL;
-   CInfo      *clause = (CInfo *) NULL;
+   ClauseInfo     *clause = (ClauseInfo *) NULL;
 
    foreach(temp, clauseinfo_list)
    {
-       clause = (CInfo *) lfirst(temp);
+       clause = (ClauseInfo *) lfirst(temp);
        result = lappend(result, clause->clause);
    }
-   return (result);
+   return result;
 }
 
 /*
@@ -93,7 +93,7 @@ get_relattvals(List *clauseinfo_list,
    List       *result1 = NIL;
    List       *result2 = NIL;
    List       *result3 = NIL;
-   CInfo      *temp = (CInfo *) NULL;
+   ClauseInfo     *temp = (ClauseInfo *) NULL;
    List       *i = NIL;
 
    foreach(i, clauseinfo_list)
@@ -103,7 +103,7 @@ get_relattvals(List *clauseinfo_list,
        Datum       constval;
        int         flag;
 
-       temp = (CInfo *) lfirst(i);
+       temp = (ClauseInfo *) lfirst(i);
        get_relattval((Node *) temp->clause, &dummy, &attno, &constval, &flag);
        result1 = lappendi(result1, (int) attno);
        result2 = lappendi(result2, constval);
@@ -144,7 +144,7 @@ get_joinvars(Oid relid,
 
    foreach(temp, clauseinfo_list)
    {
-       CInfo      *clauseinfo = lfirst(temp);
+       ClauseInfo     *clauseinfo = lfirst(temp);
        Expr       *clause = clauseinfo->clause;
 
        if (IsA(get_leftop(clause), Var) &&
@@ -176,16 +176,16 @@ get_joinvars(Oid relid,
 List *
 get_opnos(List *clauseinfo_list)
 {
-   CInfo      *temp = (CInfo *) NULL;
+   ClauseInfo     *temp = (ClauseInfo *) NULL;
    List       *result = NIL;
    List       *i = NIL;
 
    foreach(i, clauseinfo_list)
    {
-       temp = (CInfo *) lfirst(i);
+       temp = (ClauseInfo *) lfirst(i);
        result =
            lappendi(result,
                     (((Oper *) temp->clause->oper)->opno));
    }
-   return (result);
+   return result;
 }
index 89906454ebe55577d2a7606575f529dc646425b2..0ec0f74ca17d5f196111ba58b335bdca58869fd0 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.22 1998/08/31 07:55:47 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.23 1998/09/01 03:23:49 momjian Exp $
  *
  * HISTORY
  *   AUTHOR            DATE            MAJOR EVENT
@@ -60,7 +60,7 @@ make_clause(int type, Node *oper, List *args)
    {
        elog(ERROR, "make_clause: unsupported type %d", type);
        /* will this ever happen? translated from lispy C code - ay 10/94 */
-       return ((Expr *) args);
+       return (Expr *) args;
    }
 }
 
@@ -117,7 +117,7 @@ Var *
 get_leftop(Expr *clause)
 {
    if (clause->args != NULL)
-       return (lfirst(clause->args));
+       return lfirst(clause->args);
    else
        return NULL;
 }
@@ -132,7 +132,7 @@ Var *
 get_rightop(Expr *clause)
 {
    if (clause->args != NULL && lnext(clause->args) != NULL)
-       return (lfirst(lnext(clause->args)));
+       return lfirst(lnext(clause->args));
    else
        return NULL;
 }
@@ -266,7 +266,7 @@ make_notclause(Expr *notclause)
 Expr *
 get_notclausearg(Expr *notclause)
 {
-   return (lfirst(notclause->args));
+   return lfirst(notclause->args);
 }
 
 /*****************************************************************************
@@ -405,7 +405,7 @@ NumRelids(Node *clause)
            var_list = lconsi(var->varno, var_list);
    }
 
-   return (length(var_list));
+   return length(var_list);
 }
 
 /*
@@ -419,10 +419,10 @@ bool
 contains_not(Node *clause)
 {
    if (single_node(clause))
-       return (false);
+       return false;
 
    if (not_clause(clause))
-       return (true);
+       return true;
 
    if (or_clause(clause) || and_clause(clause))
    {
@@ -431,11 +431,11 @@ contains_not(Node *clause)
        foreach(a, ((Expr *) clause)->args)
        {
            if (contains_not(lfirst(a)))
-               return (true);
+               return true;
        }
    }
 
-   return (false);
+   return false;
 }
 
 /*
@@ -467,9 +467,9 @@ is_joinable(Node *clause)
     * ... or a func node.
     */
    if (is_funcclause(leftop) || is_funcclause(rightop))
-       return (true);
+       return true;
 
-   return (false);
+   return false;
 }
 
 /*
@@ -487,11 +487,11 @@ qual_clause_p(Node *clause)
    /* How about Param-s ?  - vadim 02/03/98 */
    if (IsA(get_leftop((Expr *) clause), Var) &&
        IsA(get_rightop((Expr *) clause), Const))
-       return (true);
+       return true;
    else if (IsA(get_rightop((Expr *) clause), Var) &&
             IsA(get_leftop((Expr *) clause), Const))
-       return (true);
-   return (false);
+       return true;
+   return false;
 }
 
 /*
@@ -558,7 +558,7 @@ fix_opids(List *clauses)
    foreach(clause, clauses)
        fix_opid(lfirst(clause));
 
-   return (clauses);
+   return clauses;
 }
 
 /*
@@ -759,7 +759,7 @@ CommuteClause(Node *clause)
 {
    Node       *temp;
    Oper       *commu;
-   OperatorTupleForm commuTup;
+   Form_pg_operator commuTup;
    HeapTuple   heapTup;
 
    if (!is_opclause(clause))
@@ -771,7 +771,7 @@ CommuteClause(Node *clause)
    if (heapTup == (HeapTuple) NULL)
        return;
 
-   commuTup = (OperatorTupleForm) GETSTRUCT(heapTup);
+   commuTup = (Form_pg_operator) GETSTRUCT(heapTup);
 
    commu = makeOper(heapTup->t_oid,
                     InvalidOid,
index 43f870cb1fc5569c81d542eb11169e0020f91718..a48c817e1f5a8208b6bf4a9d924b36629f78dc2b 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/indexnode.c,v 1.8 1998/07/18 04:22:40 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/indexnode.c,v 1.9 1998/09/01 03:23:50 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -36,9 +36,9 @@ List *
 find_relation_indices(Query *root, RelOptInfo *rel)
 {
    if (rel->indexed)
-       return (find_secondary_index(root, lfirsti(rel->relids)));
+       return find_secondary_index(root, lfirsti(rel->relids));
    else
-       return (NIL);
+       return NIL;
 }
 
 /*
index fb3ac0ba3078326a6ac0c2fbc8420c9bc079179f..9e45905bc817c9c41f2c46f014605bb43182f060 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/optimizer/util/joininfo.c,v 1.10 1998/08/10 02:26:30 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/optimizer/util/joininfo.c,v 1.11 1998/09/01 03:23:52 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -35,7 +35,7 @@
  * exists.
  *
  */
-JInfo *
+JoinInfo *
 joininfo_member(List *join_relids, List *joininfo_list)
 {
    List       *i = NIL;
@@ -44,10 +44,10 @@ joininfo_member(List *join_relids, List *joininfo_list)
    foreach(i, joininfo_list)
    {
        other_rels = lfirst(i);
-       if (same(join_relids, ((JInfo *) other_rels)->otherrels))
-           return ((JInfo *) other_rels);
+       if (same(join_relids, ((JoinInfo *) other_rels)->otherrels))
+           return (JoinInfo *) other_rels;
    }
-   return ((JInfo *) NULL);
+   return (JoinInfo *) NULL;
 }
 
 
@@ -61,15 +61,15 @@ joininfo_member(List *join_relids, List *joininfo_list)
  * Returns a joininfo node.
  *
  */
-JInfo *
+JoinInfo *
 find_joininfo_node(RelOptInfo *this_rel, List *join_relids)
 {
-   JInfo      *joininfo = joininfo_member(join_relids,
+   JoinInfo       *joininfo = joininfo_member(join_relids,
                                           this_rel->joininfo);
 
    if (joininfo == NULL)
    {
-       joininfo = makeNode(JInfo);
+       joininfo = makeNode(JoinInfo);
        joininfo->otherrels = join_relids;
        joininfo->jinfoclauseinfo = NIL;
        joininfo->mergejoinable = false;
@@ -77,7 +77,7 @@ find_joininfo_node(RelOptInfo *this_rel, List *join_relids)
        joininfo->inactive = false;
        this_rel->joininfo = lcons(joininfo, this_rel->joininfo);
    }
-   return (joininfo);
+   return joininfo;
 }
 
 /*
@@ -108,5 +108,5 @@ other_join_clause_var(Var *var, Expr *clause)
            retval = l;
    }
 
-   return (retval);
+   return retval;
 }
index 60bbf08dd170ecb837860b2db8ab2b562aa66fc5..9ecf7377abad656f9ecc59cad205ae78a3d1c9f6 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/keys.c,v 1.7 1998/07/18 04:22:41 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/keys.c,v 1.8 1998/09/01 03:23:53 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -59,9 +59,9 @@ match_indexkey_operand(int indexkey, Var *operand, RelOptInfo *rel)
    if (IsA(operand, Var) &&
        (lfirsti(rel->relids) == operand->varno) &&
        equal_indexkey_var(indexkey, operand))
-       return (true);
+       return true;
    else
-       return (false);
+       return false;
 }
 
 /*
@@ -74,9 +74,9 @@ static bool
 equal_indexkey_var(int index_key, Var *var)
 {
    if (index_key == var->varattno)
-       return (true);
+       return true;
    else
-       return (false);
+       return false;
 }
 
 /*
@@ -102,7 +102,7 @@ extract_subkey(JoinKey *jk, int which_subkey)
            elog(DEBUG, "extract_subkey with neither INNER or OUTER");
            retval = NULL;
    }
-   return (retval);
+   return retval;
 }
 
 /*
@@ -130,9 +130,9 @@ samekeys(List *keys1, List *keys2)
            allmember = false;
 
    if ((length(keys2) >= length(keys1)) && allmember)
-       return (true);
+       return true;
    else
-       return (false);
+       return false;
 }
 
 /*
@@ -172,9 +172,9 @@ matching2_tlvar(int var, List *tlist, bool (*test) ())
    }
 
    if (tlentry)
-       return ((Expr *) get_expr(tlentry));
+       return (Expr *) get_expr(tlentry);
    else
-       return ((Expr *) NULL);
+       return (Expr *) NULL;
 }
 
 
@@ -197,5 +197,5 @@ collect_index_pathkeys(int *index_keys, List *tlist)
                                         NIL));
        index_keys++;
    }
-   return (retval);
+   return retval;
 }
index 855f2f7274928afa4431ee1be55b26c7580911f8..1157a3c70985e4bae707b53649c4b26e05107d5a 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/ordering.c,v 1.6 1997/09/08 21:45:52 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/ordering.c,v 1.7 1998/09/01 03:23:54 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -81,13 +81,13 @@ equal_path_merge_ordering(Oid *path_ordering,
                          MergeOrder *merge_ordering)
 {
    if (path_ordering == NULL || merge_ordering == NULL)
-       return (false);
+       return false;
 
    if (path_ordering[0] == merge_ordering->left_operator ||
        path_ordering[0] == merge_ordering->right_operator)
-       return (true);
+       return true;
    else
-       return (false);
+       return false;
 }
 
 /*
@@ -99,7 +99,7 @@ bool
 equal_merge_merge_ordering(MergeOrder *merge_ordering1,
                           MergeOrder *merge_ordering2)
 {
-   return (equal(merge_ordering1, merge_ordering2));
+   return equal(merge_ordering1, merge_ordering2);
 }
 
 /*****************************************************************************
@@ -116,7 +116,7 @@ equal_sortops_order(Oid *ordering1, Oid *ordering2)
    int         i = 0;
 
    if (ordering1 == NULL || ordering2 == NULL)
-       return (ordering1 == ordering2);
+       return ordering1 == ordering2;
 
    while (ordering1[i] != 0 && ordering2[i] != 0)
    {
@@ -125,5 +125,5 @@ equal_sortops_order(Oid *ordering1, Oid *ordering2)
        i++;
    }
 
-   return (ordering1[i] == 0 && ordering2[i] == 0);
+   return ordering1[i] == 0 && ordering2[i] == 0;
 }
index 6b62ac79d6d22e0a984575d8c3501c87551d9de5..bdd4e4509aa3c1178da41e76b3a5c01ffd8caf15 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.10 1998/08/04 16:44:18 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.11 1998/09/01 03:23:55 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -47,7 +47,7 @@ path_is_cheaper(Path *path1, Path *path2)
    Cost        cost1 = path1->path_cost;
    Cost        cost2 = path2->path_cost;
 
-   return ((bool) (cost1 < cost2));
+   return (bool) (cost1 < cost2);
 }
 
 /*
@@ -82,7 +82,7 @@ set_cheapest(RelOptInfo *parent_rel, List *pathlist)
 
    parent_rel->cheapestpath = cheapest_so_far;
 
-   return (cheapest_so_far);
+   return cheapest_so_far;
 }
 
 /*
@@ -133,7 +133,7 @@ add_pathlist(RelOptInfo *parent_rel, List *unique_paths, List *new_paths)
                                     LispRemove(old_path, unique_paths));
        }
    }
-   return (unique_paths);
+   return unique_paths;
 }
 
 /*
@@ -184,7 +184,7 @@ better_path(Path *new_path, List *unique_paths, bool *noOther)
            retval = old_path;
    }
 
-   return (retval);
+   return retval;
 }
 
 
@@ -233,7 +233,7 @@ create_seqscan_path(RelOptInfo *rel)
            xfunc_get_path_cost(pathnode);
    }
 #endif
-   return (pathnode);
+   return pathnode;
 }
 
 /*
@@ -388,7 +388,7 @@ create_index_path(Query *root,
        /* XXX Can this divide the selectivities in a better way? */
        set_clause_selectivities(restriction_clauses, clausesel);
    }
-   return (pathnode);
+   return pathnode;
 }
 
 /*
@@ -458,7 +458,7 @@ create_nestloop_path(RelOptInfo *joinrel,
    if (XfuncMode != XFUNC_OFF)
        pathnode->path_cost += xfunc_get_path_cost((Path *) pathnode);
 #endif
-   return (pathnode);
+   return pathnode;
 }
 
 /*
@@ -525,7 +525,7 @@ create_mergejoin_path(RelOptInfo *joinrel,
            xfunc_get_path_cost((Path *) pathnode);
    }
 #endif
-   return (pathnode);
+   return pathnode;
 }
 
 /*
@@ -592,5 +592,5 @@ create_hashjoin_path(RelOptInfo *joinrel,
            xfunc_get_path_cost((Path *) pathnode);
    }
 #endif
-   return (pathnode);
+   return pathnode;
 }
index e46205523ccab42f057d980ea7271cff0ba3cd8e..b04efb5a3626de29a5433e513555ffaf0b024e1e 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.19 1998/08/19 02:02:16 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.20 1998/09/01 03:23:56 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -42,8 +42,8 @@
 
 static void
 IndexSelectivity(Oid indexrelid, Oid indrelid, int32 nIndexKeys,
-             Oid AccessMethodOperatorClasses[], Oid operatorObjectIds[],
-   int32 varAttributeNumbers[], char *constValues[], int32 constFlags[],
+             Oid *AccessMethodOperatorClasses, Oid *operatorObjectIds,
+   int32 *varAttributeNumbers, char **constValues, int32 *constFlags,
                 float *idxPages, float *idxSelec);
 
 
@@ -106,7 +106,7 @@ index_info(Query *root, bool first, int relid, IdxInfoRetval *info)
    int         i;
    HeapTuple   indexTuple,
                amopTuple;
-   IndexTupleForm index;
+   Form_pg_index index;
    Relation    indexRelation;
    uint16      amstrategy;
    Oid         relam;
@@ -160,11 +160,11 @@ index_info(Query *root, bool first, int relid, IdxInfoRetval *info)
        heap_close(relation);
        scan = (HeapScanDesc) NULL;
        relation = (Relation) NULL;
-       return (0);
+       return 0;
    }
 
    /* Extract info from the index tuple */
-   index = (IndexTupleForm) GETSTRUCT(indexTuple);
+   index = (Form_pg_index) GETSTRUCT(indexTuple);
    info->relid = index->indexrelid;    /* index relation */
    for (i = 0; i < 8; i++)
        info->indexkeys[i] = index->indkey[i];
@@ -223,7 +223,7 @@ index_info(Query *root, bool first, int relid, IdxInfoRetval *info)
        info->orderOprs[i] =
            ((Form_pg_amop) GETSTRUCT(amopTuple))->amopopr;
    }
-   return (TRUE);
+   return TRUE;
 }
 
 /*
@@ -347,7 +347,7 @@ restriction_selectivity(Oid functionObjectId,
        elog(ERROR, "RestrictionClauseSelectivity: bad value %lf",
             *result);
 
-   return ((Cost) *result);
+   return (Cost) *result;
 }
 
 /*
@@ -386,7 +386,7 @@ join_selectivity(Oid functionObjectId,
        elog(ERROR, "JoinClauseSelectivity: bad value %lf",
             *result);
 
-   return ((Cost) *result);
+   return (Cost) *result;
 }
 
 /*
@@ -416,12 +416,12 @@ find_inheritance_children(Oid inhparent)
    scan = heap_beginscan(relation, 0, SnapshotNow, 1, key);
    while (HeapTupleIsValid(inheritsTuple = heap_getnext(scan, 0)))
    {
-       inhrelid = ((InheritsTupleForm) GETSTRUCT(inheritsTuple))->inhrel;
+       inhrelid = ((Form_pg_inherits) GETSTRUCT(inheritsTuple))->inhrel;
        list = lappendi(list, inhrelid);
    }
    heap_endscan(scan);
    heap_close(relation);
-   return (list);
+   return list;
 }
 
 /*
@@ -450,7 +450,7 @@ VersionGetParents(Oid verrelid)
    scan = heap_beginscan(relation, 0, SnapshotNow, 1, key);
    while (HeapTupleIsValid(versionTuple = heap_getnext(scan, 0)))
    {
-       verbaseid = ((VersionTupleForm)
+       verbaseid = ((Form_pg_version)
                     GETSTRUCT(versionTuple))->verbaseid;
 
        list = lconsi(verbaseid, list);
@@ -460,7 +460,7 @@ VersionGetParents(Oid verrelid)
    }
    heap_endscan(scan);
    heap_close(relation);
-   return (list);
+   return list;
 }
 
 /*****************************************************************************
@@ -492,11 +492,11 @@ static void
 IndexSelectivity(Oid indexrelid,
                 Oid indrelid,
                 int32 nIndexKeys,
-                Oid AccessMethodOperatorClasses[],     /* XXX not used? */
-                Oid operatorObjectIds[],
-                int32 varAttributeNumbers[],
-                char *constValues[],
-                int32 constFlags[],
+                Oid *AccessMethodOperatorClasses,      /* XXX not used? */
+                Oid *operatorObjectIds,
+                int32 *varAttributeNumbers,
+                char **constValues,
+                int32 *constFlags,
                 float *idxPages,
                 float *idxSelec)
 {
@@ -505,7 +505,7 @@ IndexSelectivity(Oid indexrelid,
    HeapTuple   indexTuple,
                amopTuple,
                indRel;
-   IndexTupleForm index;
+   Form_pg_index index;
    Form_pg_amop amop;
    Oid         indclass;
    float64data npages,
@@ -530,7 +530,7 @@ IndexSelectivity(Oid indexrelid,
    if (!HeapTupleIsValid(indexTuple))
        elog(ERROR, "IndexSelectivity: index %d not found",
             indexrelid);
-   index = (IndexTupleForm) GETSTRUCT(indexTuple);
+   index = (Form_pg_index) GETSTRUCT(indexTuple);
 
    /*
     * Hack for non-functional btree npages estimation: npages =
index 756ca8570ef76520299b925f4a633cca5ee1f5a3..869b4ff6bd445d6d90f14ef11bfe8438630bfe23 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/optimizer/util/relnode.c,v 1.7 1998/08/10 02:26:32 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/optimizer/util/relnode.c,v 1.8 1998/09/01 03:23:58 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -124,8 +124,8 @@ rel_member(List *relid, List *rels)
        {
            temprelid = ((RelOptInfo *) lfirst(temp))->relids;
            if (same(temprelid, relid))
-               return ((RelOptInfo *) (lfirst(temp)));
+               return (RelOptInfo *) (lfirst(temp));
        }
    }
-   return (NULL);
+   return NULL;
 }
index d7a74f3184522bd4b04abe50ca2f17c6a3017d70..8aee7a164569f45371a3a9b47ede565fed69279f 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.16 1998/07/20 21:18:34 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.17 1998/09/01 03:23:59 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -54,10 +54,10 @@ tlistentry_member(Var *var, List *targetlist)
        {
            if (var_equal(var,
                          get_expr(lfirst(temp))))
-               return ((TargetEntry *) lfirst(temp));
+               return (TargetEntry *) lfirst(temp);
        }
    }
-   return (NULL);
+   return NULL;
 }
 
 /*
@@ -75,9 +75,9 @@ matching_tlvar(Var *var, List *targetlist)
 
    tlentry = tlistentry_member(var, targetlist);
    if (tlentry)
-       return ((Expr *) get_expr(tlentry));
+       return (Expr *) get_expr(tlentry);
 
-   return ((Expr *) NULL);
+   return (Expr *) NULL;
 }
 
 /*
@@ -163,7 +163,7 @@ get_actual_tlist(List *tlist)
    if (tlist == NULL)
    {
        elog(DEBUG, "calling get_actual_tlist with empty tlist");
-       return (NIL);
+       return NIL;
    }
 
    /*
@@ -175,7 +175,7 @@ get_actual_tlist(List *tlist)
    foreach(element, tlist)
        result = lappend(result, lfirst((List *) lfirst(element)));
 
-   return (result);
+   return result;
 #endif
    return tlist;
 }
@@ -216,11 +216,11 @@ tlist_member(Var *var, List *tlist)
        }
 
        if (tl_elt != NULL)
-           return (tl_elt->resdom);
+           return tl_elt->resdom;
        else
-           return ((Resdom *) NULL);
+           return (Resdom *) NULL;
    }
-   return ((Resdom *) NULL);
+   return (Resdom *) NULL;
 }
 
 /*
@@ -239,9 +239,9 @@ tlist_resdom(List *tlist, Resdom *resnode)
        resdom = temp_tle->resdom;
        /* Since resnos are supposed to be unique */
        if (resnode->resno == resdom->resno)
-           return (resdom);
+           return resdom;
    }
-   return ((Resdom *) NULL);
+   return (Resdom *) NULL;
 }
 
 
@@ -291,11 +291,11 @@ match_varid(Var *test_var, List *tlist)
        {
 
            if (tlvar->vartype == type_var)
-               return (entry);
+               return entry;
        }
    }
 
-   return (NULL);
+   return NULL;
 }
 
 
@@ -322,7 +322,7 @@ new_unsorted_tlist(List *targetlist)
        tle->resdom->reskey = 0;
        tle->resdom->reskeyop = (Oid) 0;
    }
-   return (new_targetlist);
+   return new_targetlist;
 }
 
 /*
@@ -352,7 +352,7 @@ copy_vars(List *target, List *source)
 
        result = lappend(result, temp);
    }
-   return (result);
+   return result;
 }
 
 /*
@@ -436,7 +436,7 @@ flatten_tlist_vars(List *full_tlist, List *flat_tlist)
                                               flat_tlist)));
    }
 
-   return (result);
+   return result;
 }
 
 /*
@@ -546,7 +546,7 @@ get_expr(TargetEntry *tle)
    Assert(tle != NULL);
    Assert(tle->expr != NULL);
 
-   return ((Var *) tle->expr);
+   return (Var *) tle->expr;
 }
 
 
index 7fa3281afa12e4c25e4d37f373f892712f0018a8..4f7b0b41b4d24430b4f4f179367ca005b44708d9 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/optimizer/util/var.c,v 1.12 1998/06/15 19:28:50 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/optimizer/util/var.c,v 1.13 1998/09/01 03:24:00 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -42,7 +42,7 @@ pull_varnos(Node *me)
               *result = NIL;
 
    if (me == NULL)
-       return (NIL);
+       return NIL;
 
    switch (nodeTag(me))
    {
@@ -63,7 +63,7 @@ pull_varnos(Node *me)
        default:
            break;
    }
-   return (result);
+   return result;
 }
 
 /*
@@ -154,7 +154,7 @@ pull_var_clause(Node *clause)
    List       *retval = NIL;
 
    if (clause == NULL)
-       return (NIL);
+       return NIL;
    else if (IsA(clause, Var))
        retval = lcons(clause, NIL);
    else if (IsA(clause, Iter))
@@ -202,7 +202,7 @@ pull_var_clause(Node *clause)
    else
        retval = NIL;
 
-   return (retval);
+   return retval;
 }
 
 /*
@@ -221,8 +221,8 @@ var_equal(Var *var1, Var *var2)
        (((Var *) var1)->varattno == ((Var *) var2)->varattno))
    {
        Assert(((Var *) var1)->varlevelsup == 0);
-       return (true);
+       return true;
    }
    else
-       return (false);
+       return false;
 }
index 89696d96e577d6af5424078906879d625911fa9d..f7486c546c0d67db5100bbc5626c5ba9c5663e85 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.83 1998/08/26 05:22:40 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.84 1998/09/01 03:24:02 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -264,7 +264,7 @@ transformInsertStmt(ParseState *pstate, InsertStmt *stmt)
        pstate->p_target_relation->rd_att->constr &&
        pstate->p_target_relation->rd_att->constr->num_defval > 0)
    {
-       AttributeTupleForm *att = pstate->p_target_relation->rd_att->attrs;
+       Form_pg_attribute *att = pstate->p_target_relation->rd_att->attrs;
        AttrDefault *defval = pstate->p_target_relation->rd_att->constr->defval;
        int         ndef = pstate->p_target_relation->rd_att->constr->num_defval;
 
@@ -390,7 +390,7 @@ makeTableName(void *elem,...)
    {
        /* not enough room for next part? then return nothing */
        if ((strlen(buf) + strlen(name)) >= (sizeof(buf) - 1))
-           return (NULL);
+           return NULL;
 
        if (strlen(buf) > 0)
            strcat(buf, "_");
@@ -404,7 +404,7 @@ makeTableName(void *elem,...)
    name = palloc(strlen(buf) + 1);
    strcpy(name, buf);
 
-   return (name);
+   return name;
 }
 
 static char *
@@ -445,7 +445,7 @@ CreateIndexName(char *table_name, char *column_name, char *label, List *indices)
        sprintf(name2, "%s_%d", column_name, (pass + 1));
    }
 
-   return (iname);
+   return iname;
 }
 
 /*
index 5206df9637672232a52c48e87cc69e0b44cabf70..0f93d9c800b3b7a0fd79e9b7451c242c4d57f732 100644 (file)
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/parser/Attic/gram.c,v 2.31 1998/08/26 16:43:43 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/parser/Attic/gram.c,v 2.32 1998/09/01 03:24:04 momjian Exp $
  *
  * HISTORY
  *   AUTHOR            DATE            MAJOR EVENT
@@ -10153,7 +10153,7 @@ FlattenStringList(List *list)
    elog(DEBUG, "flattened string is \"%s\"\n", s);
 #endif
 
-   return (s);
+   return s;
 } /* FlattenStringList() */
 
 
@@ -10204,7 +10204,7 @@ makeConstantList( A_Const *n)
    elog(DEBUG, "AexprConst argument is \"%s\"\n", defval);
 #endif
 
-   return (result);
+   return result;
 } /* makeConstantList() */
 
 
@@ -10234,7 +10234,7 @@ fmtId(char *rawid)
     ((cp == rawid)? "do not ": ""), rawid, cp);
 #endif
 
-   return (cp);
+   return cp;
 }
 
 /*
index b2e9d29044891db54d7b4ed8cc298b41b7729145..db6bbab8ea8f54f8f4e8cc13afec536a9e1a703f 100644 (file)
@@ -10,7 +10,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.27 1998/08/26 05:22:49 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.28 1998/09/01 03:24:08 momjian Exp $
  *
  * HISTORY
  *   AUTHOR            DATE            MAJOR EVENT
@@ -4915,7 +4915,7 @@ FlattenStringList(List *list)
    elog(DEBUG, "flattened string is \"%s\"\n", s);
 #endif
 
-   return (s);
+   return s;
 } /* FlattenStringList() */
 
 
@@ -4966,7 +4966,7 @@ makeConstantList( A_Const *n)
    elog(DEBUG, "AexprConst argument is \"%s\"\n", defval);
 #endif
 
-   return (result);
+   return result;
 } /* makeConstantList() */
 
 
@@ -4996,7 +4996,7 @@ fmtId(char *rawid)
     ((cp == rawid)? "do not ": ""), rawid, cp);
 #endif
 
-   return (cp);
+   return cp;
 }
 
 /*
index 2d343fe70ea446c2641a0e70abb15909f8894b80..d218b11655255729e9796d0b0d07acd270758577 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/parser/keywords.c,v 1.42 1998/08/25 21:36:55 scrappy Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/parser/keywords.c,v 1.43 1998/09/01 03:24:10 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -242,12 +242,12 @@ ScanKeywordLookup(char *text)
        middle = low + (high - low) / 2;
        difference = strcmp(middle->name, text);
        if (difference == 0)
-           return (middle);
+           return middle;
        else if (difference < 0)
            low = middle + 1;
        else
            high = middle - 1;
    }
 
-   return (NULL);
+   return NULL;
 }
index acdf0439c47cf8238d237a83bb07d7a026dd7d9c..f8ecc866868bc43058982707c7b651770d5bb489 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.4 1998/08/14 16:06:52 thomas Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.5 1998/09/01 03:24:11 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -306,7 +306,7 @@ TypeCategory(Oid inType)
            result = USER_TYPE;
            break;
    }
-   return (result);
+   return result;
 } /* TypeCategory() */
 
 
@@ -316,7 +316,7 @@ TypeCategory(Oid inType)
 bool
 IsPreferredType(CATEGORY category, Oid type)
 {
-   return (type == PreferredType(category, type));
+   return type == PreferredType(category, type);
 } /* IsPreferredType() */
 
 
@@ -365,7 +365,7 @@ PreferredType(CATEGORY category, Oid type)
 #ifdef PARSEDEBUG
 printf("PreferredType- (%d) preferred type is %s\n", category, typeidTypeName(result));
 #endif
-   return (result);
+   return result;
 } /* PreferredType() */
 
 
@@ -417,7 +417,7 @@ PromoteTypeToNext(Oid inType)
            result = inType;
            break;
    }
-   return (result);
+   return result;
 } /* PromoteTypeToNext() */
 
 
@@ -437,7 +437,7 @@ DemoteType(Oid inType)
            result = inType;
            break;
    }
-   return (result);
+   return result;
 } /* DemoteType() */
 
 
@@ -451,7 +451,7 @@ PromoteLesserType(Oid inType1, Oid inType2, Oid *newType1, Oid *newType2)
        result = PromoteTypeToNext(inType1);
        inType1 = result;
        *arg2 = result;
-       return (result);
+       return result;
    }
 
    kind1 = ClassifyType(inType1);
@@ -505,12 +505,12 @@ PromoteLesserType(Oid inType1, Oid inType2, Oid *newType1, Oid *newType2)
        if ((promotedType = PromoteBuiltInType(*arg1)) != *arg1)
        {
            *arg1 = promotedType;
-           return (promotedType);
+           return promotedType;
        }
        else if (CanCoerceType(*arg1, *arg2))
        {
            *arg1 = *arg2;
-           return (*arg2);
+           return *arg2;
        }
    }
    else if (!isBuiltIn1 && isBuiltIn2)
@@ -518,12 +518,12 @@ PromoteLesserType(Oid inType1, Oid inType2, Oid *newType1, Oid *newType2)
        if ((promotedType = PromoteBuiltInType(*arg2)) != *arg2)
        {
            *arg2 = promotedType;
-           return (promotedType);
+           return promotedType;
        }
        else if (CanCoerceType(*arg2, *arg1))
        {
            *arg2 = *arg1;
-           return (*arg1);
+           return *arg1;
        }
    }
 
index 5a12754425c7315f25ebe150bea5eedfa57ef198..80726e26953e397ecec3987eee844a831c95a7e3 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.32 1998/07/12 21:29:18 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.33 1998/09/01 03:24:12 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -597,7 +597,7 @@ parser_typecast2(Node *expr, Oid exprType, Type tp, int32 atttypmod)
                        false,  /* was omitted */
                        false,  /* not a set */
                        true /* is cast */ );
-       return ((Node *) adt);
+       return (Node *) adt;
    }
 
    cp = stringTypeString(tp, const_string, atttypmod);
@@ -638,5 +638,5 @@ parser_typecast2(Node *expr, Oid exprType, Type tp, int32 atttypmod)
    if (string_palloced)
        pfree(const_string);
 
-   return ((Node *) adt);
+   return (Node *) adt;
 }
index 88871fa3eeff0c3fe55055c24d31b132c3e5d52e..d2eef80ea322c0424dbe7a3dbd109c0725892db8 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.26 1998/08/25 21:25:42 scrappy Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.27 1998/09/01 03:24:13 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -128,7 +128,7 @@ ParseNestedFuncOrColumn(ParseState *pstate, Attr *attr, int *curr_resno, int pre
                                   precedence);
    }
 
-   return (retval);
+   return retval;
 }
 
 /*
@@ -483,7 +483,7 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs,
        retval = (Node *) iter;
    }
 
-   return (retval);
+   return retval;
 }
 
 static Oid
@@ -502,7 +502,7 @@ funcid_get_rettype(Oid funcid)
    funcrettype = (Oid)
        ((Form_pg_proc) GETSTRUCT(func_tuple))->prorettype;
 
-   return (funcrettype);
+   return funcrettype;
 }
 
 
@@ -672,7 +672,7 @@ func_select_candidate(int nargs,
        }
 
        if ((nmatch + nident) == nargs)
-           return (current_candidate->args);
+           return current_candidate->args;
 
 #ifdef PARSEDEBUG
 printf("func_select_candidate- candidate has %d matches\n", nmatch);
@@ -789,9 +789,9 @@ printf("func_select_candidate- column #%d input type is %s\n",
    }
 
    if (ncandidates == 1)
-       return (candidates->args);
+       return candidates->args;
 
-   return (NULL);
+   return NULL;
 } /* func_select_candidate() */
 
 
@@ -920,11 +920,11 @@ func_get_detail(char *funcname,
        *rettype = pform->prorettype;
        *retset = pform->proretset;
 
-       return (true);
+       return true;
    }
 
    /* shouldn't reach here */
-   return (false);
+   return false;
 }  /* func_get_detail() */
 
 /*
@@ -978,7 +978,7 @@ argtype_inherit(int nargs, Oid *oid_array)
    }
 
    /* return an ordered cross-product of the classes involved */
-   return (gen_cross_product(arginh, nargs));
+   return gen_cross_product(arginh, nargs);
 }
 
 static int
@@ -1010,7 +1010,7 @@ find_inheritors(Oid relid, Oid **supervec)
 
    inhrel = heap_openr(InheritsRelationName);
    RelationSetLockForRead(inhrel);
-   inhtupdesc = RelationGetTupleDescriptor(inhrel);
+   inhtupdesc = RelationGetDescr(inhrel);
 
    /*
     * Use queue to do a breadth-first traversal of the inheritance graph
@@ -1094,7 +1094,7 @@ find_inheritors(Oid relid, Oid **supervec)
    else
        *supervec = (Oid *) NULL;
 
-   return (nvisited);
+   return nvisited;
 }
 
 static Oid **
@@ -1130,7 +1130,7 @@ gen_cross_product(InhPaths *arginh, int nargs)
        if (i < 0)
        {
            *iter = NULL;
-           return (result);
+           return result;
        }
 
        /* no, increment this column and zero the ones after it */
@@ -1237,7 +1237,7 @@ setup_tlist(char *attname, Oid relid)
    varnode = makeVar(-1, attno, typeid, type_mod, 0, -1, attno);
 
    tle = makeTargetEntry(resnode, (Node *) varnode);
-   return (lcons(tle, NIL));
+   return lcons(tle, NIL);
 }
 
 /*
@@ -1262,7 +1262,7 @@ setup_base_tlist(Oid typeid)
    varnode = makeVar(-1, 1, typeid, -1, 0, -1, 1);
    tle = makeTargetEntry(resnode, (Node *) varnode);
 
-   return (lcons(tle, NIL));
+   return lcons(tle, NIL);
 }
 
 /*
@@ -1315,7 +1315,7 @@ ParseComplexProjection(ParseState *pstate,
                        func->func_tlist =
                            setup_tlist(funcname, argrelid);
                        iter->itertype = attnumTypeId(rd, attnum);
-                       return ((Node *) iter);
+                       return (Node *) iter;
                    }
                    else
                    {
@@ -1382,7 +1382,7 @@ ParseComplexProjection(ParseState *pstate,
                        newexpr->oper = (Node *) funcnode;
                        newexpr->args = lcons(first_arg, NIL);
 
-                       return ((Node *) newexpr);
+                       return (Node *) newexpr;
                    }
 
                }
@@ -1409,7 +1409,7 @@ ParseComplexProjection(ParseState *pstate,
                    {
                        param->paramtype = attnumTypeId(rd, attnum);
                        param->param_tlist = setup_tlist(funcname, relid);
-                       return ((Node *) param);
+                       return (Node *) param;
                    }
                }
                break;
index 44548398713c5ccb0c5e41e0a73f65d39a8e853f..a02077b8013b5601de6deced362916d382973547 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/parser/parse_node.c,v 1.19 1998/08/19 02:02:23 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/parser/parse_node.c,v 1.20 1998/09/01 03:24:15 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -52,7 +52,7 @@ make_parsestate(ParseState *parentParseState)
    pstate->p_last_resno = 1;
    pstate->parentParseState = parentParseState;
 
-   return (pstate);
+   return pstate;
 }
 
 
@@ -134,7 +134,7 @@ make_op(char *opname, Node *ltree, Node *rtree)
    Oid         ltypeId,
                rtypeId;
    Operator    tup;
-   OperatorTupleForm opform;
+   Form_pg_operator opform;
    Oper       *newop;
    Node       *left,
               *right;
@@ -145,7 +145,7 @@ make_op(char *opname, Node *ltree, Node *rtree)
    {
        ltypeId = (ltree == NULL) ? UNKNOWNOID : exprType(ltree);
        tup = right_oper(opname, ltypeId);
-       opform = (OperatorTupleForm) GETSTRUCT(tup);
+       opform = (Form_pg_operator) GETSTRUCT(tup);
        left = make_operand(opname, ltree, ltypeId, opform->oprleft);
        right = NULL;
 
@@ -159,7 +159,7 @@ make_op(char *opname, Node *ltree, Node *rtree)
 #ifdef PARSEDEBUG
 printf("make_op: returned from left_oper() with structure at %p\n", (void *)tup);
 #endif
-       opform = (OperatorTupleForm) GETSTRUCT(tup);
+       opform = (Form_pg_operator) GETSTRUCT(tup);
 #ifdef PARSEDEBUG
 printf("make_op: calling make_operand()\n");
 #endif
@@ -187,7 +187,7 @@ printf("make_op: calling make_operand()\n");
            /* Won't return from oper_inexact() without a candidate... */
        }
 
-       opform = (OperatorTupleForm) GETSTRUCT(tup);
+       opform = (Form_pg_operator) GETSTRUCT(tup);
        left = make_operand(opname, ltree, ltypeId, opform->oprleft);
        right = make_operand(opname, rtree, rtypeId, opform->oprright);
    }
@@ -258,7 +258,7 @@ make_array_ref(Node *expr,
 {
    Oid         typearray;
    HeapTuple   type_tuple;
-   TypeTupleForm type_struct_array,
+   Form_pg_type type_struct_array,
                type_struct_element;
    ArrayRef   *aref;
    Oid         reftype;
@@ -276,7 +276,7 @@ make_array_ref(Node *expr,
             typearray);
 
    /* get the array type struct from the type tuple */
-   type_struct_array = (TypeTupleForm) GETSTRUCT(type_tuple);
+   type_struct_array = (Form_pg_type) GETSTRUCT(type_tuple);
 
    if (type_struct_array->typelem == InvalidOid)
        elog(ERROR, "make_array_ref: type %s is not an array",
@@ -290,7 +290,7 @@ make_array_ref(Node *expr,
        elog(ERROR, "make_array_ref: Cache lookup failed for type %d\n",
             typearray);
 
-   type_struct_element = (TypeTupleForm) GETSTRUCT(type_tuple);
+   type_struct_element = (Form_pg_type) GETSTRUCT(type_tuple);
 
    while (indirection != NIL)
    {
@@ -342,8 +342,8 @@ make_array_set(Expr *target_expr,
 {
    Oid         typearray;
    HeapTuple   type_tuple;
-   TypeTupleForm type_struct_array;
-   TypeTupleForm type_struct_element;
+   Form_pg_type type_struct_array;
+   Form_pg_type type_struct_element;
    ArrayRef   *aref;
    Oid         reftype;
 
@@ -358,7 +358,7 @@ make_array_set(Expr *target_expr,
             typearray);
 
    /* get the array type struct from the type tuple */
-   type_struct_array = (TypeTupleForm) GETSTRUCT(type_tuple);
+   type_struct_array = (Form_pg_type) GETSTRUCT(type_tuple);
 
    if (type_struct_array->typelem == InvalidOid)
        elog(ERROR, "make_array_ref: type %s is not an array",
@@ -372,7 +372,7 @@ make_array_set(Expr *target_expr,
        elog(ERROR, "make_array_ref: Cache lookup failed for type %d\n",
             typearray);
 
-   type_struct_element = (TypeTupleForm) GETSTRUCT(type_tuple);
+   type_struct_element = (Form_pg_type) GETSTRUCT(type_tuple);
 
    aref = makeNode(ArrayRef);
    aref->refattrlength = type_struct_array->typlen;
@@ -461,5 +461,5 @@ make_const(Value *value)
                    false,      /* not a set */
                    false);
 
-   return (con);
+   return con;
 }
index 689f64a87d3d15a18e7f1344ee20a80e1c9fe431..c57d32a2f4ddf77f3687f4a402a112d36df23b49 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.15 1998/08/19 02:02:24 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.16 1998/09/01 03:24:16 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -65,7 +65,7 @@ any_ordering_op(int restype)
 Oid
 oprid(Operator op)
 {
-   return (op->t_oid);
+   return op->t_oid;
 }
 
 
@@ -85,7 +85,7 @@ binary_oper_get_candidates(char *opname,
    Relation    pg_operator_desc;
    HeapScanDesc pg_operator_scan;
    HeapTuple   tup;
-   OperatorTupleForm oper;
+   Form_pg_operator oper;
    int         nkeys;
    int         ncandidates = 0;
    ScanKeyData opKey[3];
@@ -116,7 +116,7 @@ binary_oper_get_candidates(char *opname,
        current_candidate = (CandidateList) palloc(sizeof(struct _CandidateList));
        current_candidate->args = (Oid *) palloc(2 * sizeof(Oid));
 
-       oper = (OperatorTupleForm) GETSTRUCT(tup);
+       oper = (Form_pg_operator) GETSTRUCT(tup);
        current_candidate->args[0] = oper->oprleft;
        current_candidate->args[1] = oper->oprright;
        current_candidate->next = *candidates;
@@ -250,7 +250,7 @@ printf("oper_select_candidate- reject candidate as possible match\n");
        if (!can_coerce_type(1, &input_typeids[0], &candidates->args[0])
         || !can_coerce_type(1, &input_typeids[1], &candidates->args[1]))
            ncandidates = 0;
-       return ((ncandidates == 1)? candidates->args: NULL);
+       return (ncandidates == 1)? candidates->args: NULL;
    }
 
 /*
@@ -321,7 +321,7 @@ printf("oper_select_candidate- reject candidate as possible match\n");
 printf("oper_select_candidate- unable to coerce preferred candidate\n");
 #endif
        }
-       return ((ncandidates == 1)? candidates->args: NULL);
+       return (ncandidates == 1)? candidates->args: NULL;
    }
 
 /*
@@ -354,7 +354,7 @@ printf("oper_select_candidate- unable to coerce preferred candidate\n");
                    nmatch++;
            }
            if (nmatch == nargs)
-               return (candidates->args);
+               return candidates->args;
        }
    }
 
@@ -436,7 +436,7 @@ printf("oper_select_candidate- column #%d input type is %s\n",
            ncandidates++;
    }
 
-   return ((ncandidates == 1)? candidates->args: NULL);
+   return (ncandidates == 1)? candidates->args: NULL;
 } /* oper_select_candidate() */
 
 
@@ -472,12 +472,12 @@ oper_exact(char *op, Oid arg1, Oid arg2, Node **ltree, Node **rtree, bool noWarn
 
        if (HeapTupleIsValid(tup))
        {
-           OperatorTupleForm opform;
+           Form_pg_operator opform;
 
 #if PARSEDEBUG
 printf("oper_exact: found possible commutative operator candidate\n");
 #endif
-           opform = (OperatorTupleForm) GETSTRUCT(tup);
+           opform = (Form_pg_operator) GETSTRUCT(tup);
            if (opform->oprcom == tup->t_oid)
            {
 #if PARSEDEBUG
@@ -529,7 +529,7 @@ oper_inexact(char *op, Oid arg1, Oid arg2, Node **ltree, Node **rtree, bool noWa
    {
        if (!noWarnings)
            op_error(op, arg1, arg2);
-       return (NULL);
+       return NULL;
    }
 
    /* Or found exactly one? Then proceed... */
@@ -577,10 +577,10 @@ printf("oper_inexact: found candidate\n");
                    "\n\tYou will have to retype this query using an explicit cast",
                    op, typeTypeName(typeidType(arg1)), typeTypeName(typeidType(arg2)));
            }
-           return (NULL);
+           return NULL;
        }
    }
-   return ((Operator) tup);
+   return (Operator) tup;
 } /* oper_inexact() */
 
 
@@ -608,7 +608,7 @@ oper(char *opname, Oid ltypeId, Oid rtypeId, bool noWarnings)
             opname, typeTypeName(typeidType(ltypeId)), typeTypeName(typeidType(rtypeId)));
    }
 
-   return ((Operator) tup);
+   return (Operator) tup;
 } /* oper() */
 
 
@@ -627,7 +627,7 @@ unary_oper_get_candidates(char *op,
    Relation    pg_operator_desc;
    HeapScanDesc pg_operator_scan;
    HeapTuple   tup;
-   OperatorTupleForm oper;
+   Form_pg_operator oper;
    int         ncandidates = 0;
 
    static ScanKeyData opKey[2] = {
@@ -656,7 +656,7 @@ printf("unary_oper_get_candidates: start scan for '%s'\n", op);
        current_candidate = (CandidateList) palloc(sizeof(struct _CandidateList));
        current_candidate->args = (Oid *) palloc(sizeof(Oid));
 
-       oper = (OperatorTupleForm) GETSTRUCT(tup);
+       oper = (Form_pg_operator) GETSTRUCT(tup);
        if (rightleft == 'r')
            current_candidate->args[0] = oper->oprleft;
        else
@@ -702,7 +702,7 @@ right_oper(char *op, Oid arg)
        if (ncandidates == 0)
        {
            elog(ERROR, "Can't find right op '%s' for type %d", op, arg);
-           return (NULL);
+           return NULL;
        }
        else if (ncandidates == 1)
        {
@@ -732,11 +732,11 @@ right_oper(char *op, Oid arg)
            {
                elog(ERROR, "Unable to convert right operator '%s' from type %s to %s",
                     op, typeidTypeName(arg), typeidTypeName(*targetOid));
-               return (NULL);
+               return NULL;
            }
        }
    }
-   return ((Operator) tup);
+   return (Operator) tup;
 } /* right_oper() */
 
 
@@ -762,7 +762,7 @@ left_oper(char *op, Oid arg)
        if (ncandidates == 0)
        {
            elog(ERROR, "Can't find left op '%s' for type %d", op, arg);
-           return (NULL);
+           return NULL;
        }
        else if (ncandidates == 1)
        {
@@ -790,7 +790,7 @@ printf("left_oper: searched cache for single left oper candidate '%s %s'\n",
            {
                elog(ERROR, "Unable to convert left operator '%s' from type %s to %s",
                     op, typeidTypeName(arg), typeidTypeName(*targetOid));
-               return (NULL);
+               return NULL;
            }
 #ifdef PARSEDEBUG
 printf("left_oper: searched cache for best left oper candidate '%s %s'\n",
@@ -798,7 +798,7 @@ printf("left_oper: searched cache for best left oper candidate '%s %s'\n",
 #endif
        }
    }
-   return ((Operator) tup);
+   return (Operator) tup;
 } /* left_oper() */
 
 
index e87476f14b28c3032b4fae7a303d647e09583367..24d5d8733b91ac448be3b6ed4ae92061c646fbe5 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/parser/parse_relation.c,v 1.14 1998/08/19 02:02:25 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/parser/parse_relation.c,v 1.15 1998/09/01 03:24:17 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -291,7 +291,7 @@ expandAll(ParseState *pstate, char *relname, char *refname, int *this_resno)
 
    heap_close(rel);
 
-   return (te_head);
+   return te_head;
 }
 
 /*
@@ -308,11 +308,11 @@ attnameAttNum(Relation rd, char *a)
 
    for (i = 0; i < rd->rd_rel->relnatts; i++)
        if (!namestrcmp(&(rd->rd_att->attrs[i]->attname), a))
-           return (i + 1);
+           return i + 1;
 
    for (i = 0; i < SPECIALS; i++)
        if (!strcmp(special_attr[i].field, a))
-           return (special_attr[i].code);
+           return special_attr[i].code;
 
    /* on failure */
    elog(ERROR, "Relation %s does not have attribute %s",
@@ -340,10 +340,10 @@ attnameIsSet(Relation rd, char *name)
    {
        if (!strcmp(special_attr[i].field, name))
        {
-           return (false);     /* no sys attr is a set */
+           return false;       /* no sys attr is a set */
        }
    }
-   return (get_attisset(RelationGetRelid(rd), name));
+   return get_attisset(RelationGetRelid(rd), name);
 }
 
 /*
@@ -354,7 +354,7 @@ attnameIsSet(Relation rd, char *name)
 int
 attnumAttNelems(Relation rd, int attid)
 {
-   return (rd->rd_att->attrs[attid - 1]->attnelems);
+   return rd->rd_att->attrs[attid - 1]->attnelems;
 }
 
 /* given attribute id, return type of that attribute */
@@ -368,13 +368,13 @@ attnumTypeId(Relation rd, int attid)
 {
 
    if (attid < 0)
-       return (typeTypeId(typenameType(attnum_type[-attid - 1])));
+       return typeTypeId(typenameType(attnum_type[-attid - 1]));
 
    /*
     * -1 because varattno (where attid comes from) returns one more than
     * index
     */
-   return (rd->rd_att->attrs[attid - 1]->atttypid);
+   return rd->rd_att->attrs[attid - 1]->atttypid;
 }
 
 /* handleTargetColname()
index bf73ef452bd213af9d6461f0a4b165f11477bd79..407b923d2e3d37fd1dee7f05532e1d73a9247a81 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.25 1998/08/26 03:17:32 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.26 1998/09/01 03:24:19 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -94,7 +94,7 @@ MakeTargetEntryIdent(ParseState *pstate,
 
        /* this looks strange to me, returning an empty TargetEntry bjm 1998/08/24 */
        if (target_colname == NULL || colname == NULL)
-           return (tent);
+           return tent;
 
        if (refname != NULL)
            rte = refnameRangeTableEntry(pstate, refname);
@@ -183,7 +183,7 @@ printf("MakeTargetEntryIdent- attrtype_target = %d; type_mod = %d\n", attrtype_t
        tent->expr = expr;
    }
 
-   return (tent);
+   return tent;
 } /* MakeTargetEntryIdent() */
 
 
@@ -759,7 +759,7 @@ makeTargetNames(ParseState *pstate, List *cols)
    {
        int         numcol;
        int         i;
-       AttributeTupleForm *attr = pstate->p_target_relation->rd_att->attrs;
+       Form_pg_attribute *attr = pstate->p_target_relation->rd_att->attrs;
 
        numcol = pstate->p_target_relation->rd_rel->relnatts;
        for (i = 0; i < numcol; i++)
index 682b214eed1cfdcca504f8b07aa926d9a4d79310..3a5de42dabfdde0329e22cf243989229e3aff03b 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.14 1998/08/19 02:02:27 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.15 1998/09/01 03:24:20 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -45,16 +45,16 @@ char *
 typeidTypeName(Oid id)
 {
    HeapTuple   tup;
-   TypeTupleForm typetuple;
+   Form_pg_type typetuple;
 
    if (!(tup = SearchSysCacheTuple(TYPOID,
                                    ObjectIdGetDatum(id),
                                    0, 0, 0)))
    {
        elog(ERROR, "type id lookup of %u failed", id);
-       return (NULL);
+       return NULL;
    }
-   typetuple = (TypeTupleForm) GETSTRUCT(tup);
+   typetuple = (Form_pg_type) GETSTRUCT(tup);
    return (typetuple->typname).data;
 }
 
@@ -69,9 +69,9 @@ typeidType(Oid id)
                                    0, 0, 0)))
    {
        elog(ERROR, "type id lookup of %u failed", id);
-       return (NULL);
+       return NULL;
    }
-   return ((Type) tup);
+   return (Type) tup;
 }
 
 /* return a Type structure, given type name */
@@ -87,7 +87,7 @@ typenameType(char *s)
                                    PointerGetDatum(s),
                                    0, 0, 0)))
        elog(ERROR, "type name lookup of %s failed", s);
-   return ((Type) tup);
+   return (Type) tup;
 }
 
 /* given type, return the type OID */
@@ -96,36 +96,36 @@ typeTypeId(Type tp)
 {
    if (tp == NULL)
        elog(ERROR, "typeTypeId() called with NULL type struct");
-   return (tp->t_oid);
+   return tp->t_oid;
 }
 
 /* given type (as type struct), return the length of type */
 int16
 typeLen(Type t)
 {
-   TypeTupleForm typ;
+   Form_pg_type typ;
 
-   typ = (TypeTupleForm) GETSTRUCT(t);
-   return (typ->typlen);
+   typ = (Form_pg_type) GETSTRUCT(t);
+   return typ->typlen;
 }
 
 /* given type (as type struct), return the value of its 'byval' attribute.*/
 bool
 typeByVal(Type t)
 {
-   TypeTupleForm typ;
+   Form_pg_type typ;
 
-   typ = (TypeTupleForm) GETSTRUCT(t);
-   return (typ->typbyval);
+   typ = (Form_pg_type) GETSTRUCT(t);
+   return typ->typbyval;
 }
 
 /* given type (as type struct), return the name of type */
 char *
 typeTypeName(Type t)
 {
-   TypeTupleForm typ;
+   Form_pg_type typ;
 
-   typ = (TypeTupleForm) GETSTRUCT(t);
+   typ = (Form_pg_type) GETSTRUCT(t);
    return (typ->typname).data;
 }
 
@@ -133,10 +133,10 @@ typeTypeName(Type t)
 char
 typeTypeFlag(Type t)
 {
-   TypeTupleForm typ;
+   Form_pg_type typ;
 
-   typ = (TypeTupleForm) GETSTRUCT(t);
-   return (typ->typtype);
+   typ = (Form_pg_type) GETSTRUCT(t);
+   return typ->typtype;
 }
 
 /* Given a type structure and a string, returns the internal form of
@@ -147,10 +147,10 @@ stringTypeString(Type tp, char *string, int32 atttypmod)
    Oid         op;
    Oid         typelem;
 
-   op = ((TypeTupleForm) GETSTRUCT(tp))->typinput;
-   typelem = ((TypeTupleForm) GETSTRUCT(tp))->typelem; /* XXX - used for
+   op = ((Form_pg_type) GETSTRUCT(tp))->typinput;
+   typelem = ((Form_pg_type) GETSTRUCT(tp))->typelem; /* XXX - used for
                                                         * array_in */
-   return ((char *) fmgr(op, string, typelem, atttypmod));
+   return (char *) fmgr(op, string, typelem, atttypmod);
 }
 
 /* Given a type id, returns the out-conversion function of the type */
@@ -158,7 +158,7 @@ Oid
 typeidOutfunc(Oid type_id)
 {
    HeapTuple   typeTuple;
-   TypeTupleForm type;
+   Form_pg_type type;
    Oid         outfunc;
 
    typeTuple = SearchSysCacheTuple(TYPOID,
@@ -167,16 +167,16 @@ typeidOutfunc(Oid type_id)
    if (!HeapTupleIsValid(typeTuple))
        elog(ERROR, "typeidOutfunc: Invalid type - oid = %u", type_id);
 
-   type = (TypeTupleForm) GETSTRUCT(typeTuple);
+   type = (Form_pg_type) GETSTRUCT(typeTuple);
    outfunc = type->typoutput;
-   return (outfunc);
+   return outfunc;
 }
 
 Oid
 typeidTypeRelid(Oid type_id)
 {
    HeapTuple   typeTuple;
-   TypeTupleForm type;
+   Form_pg_type type;
    Oid         infunc;
 
    typeTuple = SearchSysCacheTuple(TYPOID,
@@ -185,34 +185,34 @@ typeidTypeRelid(Oid type_id)
    if (!HeapTupleIsValid(typeTuple))
        elog(ERROR, "typeidTypeRelid: Invalid type - oid = %u", type_id);
 
-   type = (TypeTupleForm) GETSTRUCT(typeTuple);
+   type = (Form_pg_type) GETSTRUCT(typeTuple);
    infunc = type->typrelid;
-   return (infunc);
+   return infunc;
 }
 
 Oid
 typeTypeRelid(Type typ)
 {
-   TypeTupleForm typtup;
+   Form_pg_type typtup;
 
-   typtup = (TypeTupleForm) GETSTRUCT(typ);
+   typtup = (Form_pg_type) GETSTRUCT(typ);
 
-   return (typtup->typrelid);
+   return typtup->typrelid;
 }
 
 Oid
 typeidTypElem(Oid type_id)
 {
    HeapTuple   typeTuple;
-   TypeTupleForm type;
+   Form_pg_type type;
 
    if (!(typeTuple = SearchSysCacheTuple(TYPOID,
                                          ObjectIdGetDatum(type_id),
                                          0, 0, 0)))
        elog(ERROR, "type id lookup of %u failed", type_id);
-   type = (TypeTupleForm) GETSTRUCT(typeTuple);
+   type = (Form_pg_type) GETSTRUCT(typeTuple);
 
-   return (type->typelem);
+   return type->typelem;
 }
 
 /* Given the attribute type of an array return the arrtribute type of
@@ -222,7 +222,7 @@ Oid
 GetArrayElementType(Oid typearray)
 {
    HeapTuple   type_tuple;
-   TypeTupleForm type_struct_array;
+   Form_pg_type type_struct_array;
 
    type_tuple = SearchSysCacheTuple(TYPOID,
                                     ObjectIdGetDatum(typearray),
@@ -233,7 +233,7 @@ GetArrayElementType(Oid typearray)
             typearray);
 
    /* get the array type struct from the type tuple */
-   type_struct_array = (TypeTupleForm) GETSTRUCT(type_tuple);
+   type_struct_array = (Form_pg_type) GETSTRUCT(type_tuple);
 
    if (type_struct_array->typelem == InvalidOid)
    {
@@ -241,7 +241,7 @@ GetArrayElementType(Oid typearray)
             type_struct_array->typname);
    }
 
-   return (type_struct_array->typelem);
+   return type_struct_array->typelem;
 }
 
 /* Given a type id, returns the in-conversion function of the type */
@@ -249,7 +249,7 @@ Oid
 typeidInfunc(Oid type_id)
 {
    HeapTuple   typeTuple;
-   TypeTupleForm type;
+   Form_pg_type type;
    Oid         infunc;
 
    typeTuple = SearchSysCacheTuple(TYPOID,
@@ -258,7 +258,7 @@ typeidInfunc(Oid type_id)
    if (!HeapTupleIsValid(typeTuple))
        elog(ERROR, "typeidInfunc: Invalid type - oid = %u", type_id);
 
-   type = (TypeTupleForm) GETSTRUCT(typeTuple);
+   type = (Form_pg_type) GETSTRUCT(typeTuple);
    infunc = type->typinput;
-   return (infunc);
+   return infunc;
 }
index efd3268fe499aa07aaca92a4cd72d7d2b854a968..db1c747f6810ad632332ac94f0eed5b8eb9326da 100644 (file)
@@ -6,7 +6,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/parser/parser.c,v 1.34 1998/06/15 19:28:56 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/parser/parser.c,v 1.35 1998/09/01 03:24:21 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -59,7 +59,7 @@ parser(char *str, Oid *typev, int nargs)
    clearerr(stdin);
 
    if (yyresult)               /* error */
-       return ((QueryTreeList *) NULL);
+       return (QueryTreeList *) NULL;
 
    queryList = parse_analyze(parsetree, NULL);
 
index f7c3eb80b98b059a8fd3ec6d5acddab3e2a5a292..8724dfe3edc5f213554f97a5e22eeb03a1f5ddfe 100644 (file)
@@ -1,7 +1,7 @@
 /* A lexical scanner generated by flex */
 
 /* Scanner skeleton version:
- * $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.25 1998/08/30 23:25:56 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.26 1998/09/01 03:24:22 momjian Exp $
  */
 
 #define FLEX_SCANNER
@@ -555,7 +555,7 @@ char *yytext;
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.25 1998/08/30 23:25:56 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.26 1998/09/01 03:24:22 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -974,7 +974,7 @@ YY_RULE_SETUP
                    yylval.ival = strtol((char *)literal,&endptr,2);
                    if (*endptr != '\0' || errno == ERANGE)
                        elog(ERROR,"Bad binary integer input '%s'",literal);
-                   return (ICONST);
+                   return ICONST;
                }
    YY_BREAK
 case 9:
@@ -1017,7 +1017,7 @@ YY_RULE_SETUP
                    yylval.ival = strtol((char *)literal,&endptr,16);
                    if (*endptr != '\0' || errno == ERANGE)
                        elog(ERROR,"Bad hexadecimal integer input '%s'",literal);
-                   return (ICONST);
+                   return ICONST;
                }
    YY_BREAK
 case 15:
@@ -1035,7 +1035,7 @@ YY_RULE_SETUP
 {
                    BEGIN(INITIAL);
                    yylval.str = pstrdup(scanstr(literal));
-                   return (SCONST);
+                   return SCONST;
                }
    YY_BREAK
 case 17:
@@ -1092,7 +1092,7 @@ YY_RULE_SETUP
 {
                    BEGIN(INITIAL);
                    yylval.str = pstrdup(literal);
-                   return (IDENT);
+                   return IDENT;
                }
    YY_BREAK
 case 24:
@@ -1115,7 +1115,7 @@ YY_RULE_SETUP
 #line 287 "scan.l"
 {
                    BEGIN(INITIAL);
-                   return (yytext[0]);
+                   return yytext[0];
                }
    YY_BREAK
 case 27:
@@ -1131,13 +1131,14 @@ YY_RULE_SETUP
 #line 295 "scan.l"
 {
                    BEGIN(xm);
-                   return (yytext[0]);
+                   return yytext[0];
                }
    YY_BREAK
 case 29:
 YY_RULE_SETUP
 #line 299 "scan.l"
-{  return (yytext[0]); }
+{  return yytext[0]; }
+{  return yytext[0]; }
    YY_BREAK
 case 30:
 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
@@ -1147,7 +1148,7 @@ YY_RULE_SETUP
 #line 300 "scan.l"
 {
                    yylval.str = pstrdup((char*)yytext);
-                   return (Op);
+                   return Op;
                }
    YY_BREAK
 case 31:
@@ -1158,7 +1159,7 @@ YY_RULE_SETUP
                        yylval.str = pstrdup("<>"); /* compatability */
                    else
                        yylval.str = pstrdup((char*)yytext);
-                   return (Op);
+                   return Op;
                }
    YY_BREAK
 case 32:
@@ -1166,7 +1167,7 @@ YY_RULE_SETUP
 #line 311 "scan.l"
 {
                    yylval.ival = atoi((char*)&yytext[1]);
-                   return (PARAM);
+                   return PARAM;
                }
    YY_BREAK
 case 33:
@@ -1186,12 +1187,12 @@ YY_RULE_SETUP
 
                    keyword = ScanKeywordLookup((char*)yytext);
                    if (keyword != NULL) {
-                       return (keyword->value);
+                       return keyword->value;
                    }
                    else
                    {
                        yylval.str = pstrdup((char*)yytext);
-                       return (IDENT);
+                       return IDENT;
                    }
                }
    YY_BREAK
@@ -1212,9 +1213,9 @@ YY_RULE_SETUP
                            elog(ERROR,"Bad integer input '%s'",yytext);
                        CheckFloat8Val(yylval.dval);
                        elog(NOTICE,"Integer input '%s' is out of range; promoted to float", yytext);
-                       return (FCONST);
+                       return FCONST;
                    }
-                   return (ICONST);
+                   return ICONST;
                }
    YY_BREAK
 case 35:
@@ -1229,7 +1230,7 @@ YY_RULE_SETUP
                    if (*endptr != '\0' || errno == ERANGE)
                        elog(ERROR,"Bad float8 input '%s'",yytext);
                    CheckFloat8Val(yylval.dval);
-                   return (FCONST);
+                   return FCONST;
                }
    YY_BREAK
 case 36:
@@ -1248,9 +1249,9 @@ YY_RULE_SETUP
                            elog(ERROR,"Bad integer input '%s'",yytext);
                        CheckFloat8Val(yylval.dval);
                        elog(NOTICE,"Integer input '%s' is out of range; promoted to float", yytext);
-                       return (FCONST);
+                       return FCONST;
                    }
-                   return (ICONST);
+                   return ICONST;
                }
    YY_BREAK
 case 37:
@@ -1264,7 +1265,7 @@ YY_RULE_SETUP
                    if (*endptr != '\0' || errno == ERANGE)
                        elog(ERROR,"Bad float input '%s'",yytext);
                    CheckFloat8Val(yylval.dval);
-                   return (FCONST);
+                   return FCONST;
                }
    YY_BREAK
 case 38:
@@ -1283,12 +1284,12 @@ YY_RULE_SETUP
 
                    keyword = ScanKeywordLookup((char*)yytext);
                    if (keyword != NULL) {
-                       return (keyword->value);
+                       return keyword->value;
                    }
                    else
                    {
                        yylval.str = pstrdup((char*)yytext);
-                       return (IDENT);
+                       return IDENT;
                    }
                }
    YY_BREAK
index 26ff2ec84478f35841c7cf8bb57554a61dbdc9f1..4c0b7fbd0e173a27e79134570f913a501f6168ea 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.42 1998/08/29 05:27:17 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.43 1998/09/01 03:24:23 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -201,7 +201,7 @@ other           .
                    yylval.ival = strtol((char *)literal,&endptr,2);
                    if (*endptr != '\0' || errno == ERANGE)
                        elog(ERROR,"Bad binary integer input '%s'",literal);
-                   return (ICONST);
+                   return ICONST;
                }
 {xhinside} |
 {xbinside} {
@@ -227,7 +227,7 @@ other           .
                    yylval.ival = strtol((char *)literal,&endptr,16);
                    if (*endptr != '\0' || errno == ERANGE)
                        elog(ERROR,"Bad hexadecimal integer input '%s'",literal);
-                   return (ICONST);
+                   return ICONST;
                }
 
 {xqstart}      {
@@ -238,7 +238,7 @@ other           .
 {xqstop}   {
                    BEGIN(INITIAL);
                    yylval.str = pstrdup(scanstr(literal));
-                   return (SCONST);
+                   return SCONST;
                }
 {xqdouble} |
 {xqinside} {
@@ -273,7 +273,7 @@ other           .
 {xdstop}   {
                    BEGIN(INITIAL);
                    yylval.str = pstrdup(literal);
-                   return (IDENT);
+                   return IDENT;
                }
 {xdinside} {
                    if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1))
@@ -286,7 +286,7 @@ other           .
 {space}*   { /* ignore */ }
 {xmstop}   {
                    BEGIN(INITIAL);
-                   return (yytext[0]);
+                   return yytext[0];
                }
 
 
@@ -294,23 +294,24 @@ other         .
 
 {self}/{space}*-[\.0-9]    {
                    BEGIN(xm);
-                   return (yytext[0]);
+                   return yytext[0];
                }
-{self}         {   return (yytext[0]); }
+{self}         {   return yytext[0]; }
+{self}         {   return yytext[0]; }
 {operator}/-[\.0-9]    {
                    yylval.str = pstrdup((char*)yytext);
-                   return (Op);
+                   return Op;
                }
 {operator}     {
                    if (strcmp((char*)yytext,"!=") == 0)
                        yylval.str = pstrdup("<>"); /* compatability */
                    else
                        yylval.str = pstrdup((char*)yytext);
-                   return (Op);
+                   return Op;
                }
 {param}            {
                    yylval.ival = atoi((char*)&yytext[1]);
-                   return (PARAM);
+                   return PARAM;
                }
 
 
@@ -328,12 +329,12 @@ other         .
 
                    keyword = ScanKeywordLookup((char*)yytext);
                    if (keyword != NULL) {
-                       return (keyword->value);
+                       return keyword->value;
                    }
                    else
                    {
                        yylval.str = pstrdup((char*)yytext);
-                       return (IDENT);
+                       return IDENT;
                    }
                }
 {integer}/{space}*-{number}    {
@@ -350,9 +351,9 @@ other           .
                            elog(ERROR,"Bad integer input '%s'",yytext);
                        CheckFloat8Val(yylval.dval);
                        elog(NOTICE,"Integer input '%s' is out of range; promoted to float", yytext);
-                       return (FCONST);
+                       return FCONST;
                    }
-                   return (ICONST);
+                   return ICONST;
                }
 {real}/{space}*-{number} {
                    char* endptr;
@@ -363,7 +364,7 @@ other           .
                    if (*endptr != '\0' || errno == ERANGE)
                        elog(ERROR,"Bad float8 input '%s'",yytext);
                    CheckFloat8Val(yylval.dval);
-                   return (FCONST);
+                   return FCONST;
                }
 {integer}      {
                    char* endptr;
@@ -378,9 +379,9 @@ other           .
                            elog(ERROR,"Bad integer input '%s'",yytext);
                        CheckFloat8Val(yylval.dval);
                        elog(NOTICE,"Integer input '%s' is out of range; promoted to float", yytext);
-                       return (FCONST);
+                       return FCONST;
                    }
-                   return (ICONST);
+                   return ICONST;
                }
 {real}         {
                    char* endptr;
@@ -390,7 +391,7 @@ other           .
                    if (*endptr != '\0' || errno == ERANGE)
                        elog(ERROR,"Bad float input '%s'",yytext);
                    CheckFloat8Val(yylval.dval);
-                   return (FCONST);
+                   return FCONST;
                }
 
 
@@ -407,17 +408,17 @@ other         .
 
                    keyword = ScanKeywordLookup((char*)yytext);
                    if (keyword != NULL) {
-                       return (keyword->value);
+                       return keyword->value;
                    }
                    else
                    {
                        yylval.str = pstrdup((char*)yytext);
-                       return (IDENT);
+                       return IDENT;
                    }
                }
 {space}            { /* ignore */ }
 
-{other}            { return (yytext[0]); }
+{other}            { return yytext[0]; }
 
 %%
 
index 4d679731ea1f292cf890b41efd7116afee6d1c5c..92412c07d666f8b2b449e05545ce9f43d821a782 100644 (file)
@@ -55,7 +55,7 @@ BSD44_derived_dlerror(void)
 
    strcpy(ret, error_message);
    error_message[0] = 0;
-   return ((ret[0] == 0) ? (char *) NULL : ret);
+   return (ret[0] == 0) ? (char *) NULL : ret;
 }
 
 void *
@@ -69,7 +69,7 @@ BSD44_derived_dlopen(const char *file, int num)
 
    if ((vp = dlopen((char *) file, num)) == (void *) NULL)
        sprintf(error_message, "dlopen (%s) failed", file);
-   return (vp);
+   return vp;
 #endif
 }
 
@@ -90,7 +90,7 @@ BSD44_derived_dlsym(void *handle, const char *name)
    }
    if ((vp = dlsym(handle, (char *) name)) == (void *) NULL)
        sprintf(error_message, "dlsym (%s) failed", name);
-   return (vp);
+   return vp;
 #endif
 }
 
index f01c16071b5a99e38615b92f8bd8c981b9914218..1e62b58ad68e2bbb2e238c0e1988cc05b2b0f15a 100644 (file)
@@ -22,7 +22,7 @@
 #include "utils/elog.h"
 #include "fmgr.h"
 
-extern char pg_pathname[];
+extern char *pg_pathname;
 
 void *
 pg_dlopen(char *filename)
index 948faea34f46f4fa1a9e899b07d878240d608851..4e8f252bce8f4671bc7a43ae364adffa83918c0e 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/port/dynloader/hpux.c,v 1.4 1998/06/15 19:28:59 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/port/dynloader/hpux.c,v 1.5 1998/09/01 03:24:39 momjian Exp $
  *
  * NOTES
  *     all functions are defined here -- it's impossible to trace the
@@ -29,7 +29,7 @@ pg_dlopen(char *filename)
 {
    shl_t       handle = shl_load(filename, BIND_DEFERRED, 0);
 
-   return ((void *) handle);
+   return (void *) handle;
 }
 
 func_ptr
@@ -39,7 +39,7 @@ pg_dlsym(void *handle, char *funcname)
 
    if (shl_findsym((shl_t *) & handle, funcname, TYPE_PROCEDURE, &f) == -1)
        f = (func_ptr) NULL;
-   return (f);
+   return f;
 }
 
 void
index aa13f09a19b94935d7552c2f0d60ab33ec132dc6..c7480e0be981d6a9b7f5d6ae7c85b1a0725c2de5 100644 (file)
@@ -10,7 +10,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/port/dynloader/linux.c,v 1.8 1998/06/15 19:28:59 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/port/dynloader/linux.c,v 1.9 1998/09/01 03:24:40 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
 #include "fmgr.h"
 
 #if FALSE
-extern char pg_pathname[];
+extern char *pg_pathname;
 
 void *
 pg_dlopen(char *filename)
 {
 #ifndef HAVE_DLD_H
    elog(ERROR, "dynamic load not supported");
-   return (NULL);
+   return NULL;
 #else
    static int  dl_initialized = 0;
 
@@ -106,7 +106,7 @@ char *
 pg_dlerror()
 {
 #ifndef HAVE_DLD_H
-   return ("dynaloader unspported");
+   return "dynaloader unspported";
 #else
    return dld_strerror(dld_errno);
 #endif
index 9ddda044ff9b1c28b897550cc5cc5427d5e29ea2..51abd4bb4aa4ccc7e2cd06c01c94c9b1b9cd494f 100644 (file)
@@ -9,7 +9,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/port/dynloader/ultrix4.c,v 1.2 1998/06/15 19:28:59 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/port/dynloader/ultrix4.c,v 1.3 1998/09/01 03:24:41 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -22,7 +22,7 @@
 #include "port-protos.h"
 #include "utils/elog.h"
 
-extern char pg_pathname[];
+extern char *pg_pathname;
 
 void *
 pg_dlopen(char *filename)
index 66449d8524b2edd4de5812afb2fa0bc246e732f1..be7046e7c0e4126c89efb1978628f3dcbead8c31 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: gethostname.c,v 1.3 1998/01/15 20:54:34 scrappy Exp $ */
+/* $Id: gethostname.c,v 1.4 1998/09/01 03:24:25 momjian Exp $ */
 
 #include 
 #include 
@@ -20,5 +20,5 @@ gethostname(char *name, int namelen)
    }
    strncpy(name, mname.nodename, (SYS_NMLN < namelen ? SYS_NMLN : namelen));
 
-   return (0);
+   return 0;
 }
index 3e533bdb814d2b5c80827a01dfd262e0c8a965c6..3a0597573cdb3ad238d1804aa3344fb667f3441d 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: getrusage.c,v 1.9 1998/07/13 16:39:07 momjian Exp $ */
+/* $Id: getrusage.c,v 1.10 1998/09/01 03:24:26 momjian Exp $ */
 
 #include 
 #include "rusagestub.h"
@@ -26,12 +26,12 @@ getrusage(int who, struct rusage * rusage)
    if (rusage == (struct rusage *) NULL)
    {
        errno = EFAULT;
-       return (-1);
+       return -1;
    }
    if (times(&tms) < 0)
    {
        /* errno set by times */
-       return (-1);
+       return -1;
    }
    switch (who)
    {
@@ -45,7 +45,7 @@ getrusage(int who, struct rusage * rusage)
            break;
        default:
            errno = EINVAL;
-           return (-1);
+           return -1;
    }
 #define TICK_TO_SEC(T, RATE)   ((T)/(RATE))
 #define TICK_TO_USEC(T,RATE)   (((T)%(RATE)*1000000)/RATE)
@@ -53,5 +53,5 @@ getrusage(int who, struct rusage * rusage)
    rusage->ru_utime.tv_usec = TICK_TO_USEC(u, tick_rate);
    rusage->ru_stime.tv_sec = TICK_TO_SEC(s, tick_rate);
    rusage->ru_stime.tv_usec = TICK_TO_USEC(u, tick_rate);
-   return (0);
+   return 0;
 }
index 0cf6e15dae5208f99ef513ecb5373ed6a8e97511..ae954887c266de51f8f2790f80a1479fee89eab9 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: inet_aton.c,v 1.14 1998/02/26 04:34:04 momjian Exp $
+/* $Id: inet_aton.c,v 1.15 1998/09/01 03:24:28 momjian Exp $
  *
  * This inet_aton() function was taken from the GNU C library and
  * incorporated into Postgres for those systems which do not have this
@@ -104,7 +104,7 @@ inet_aton(const char *cp, struct in_addr * addr)
             * 16-bits) a.b     (with b treated as 24 bits)
             */
            if (pp >= parts + 3 || val > 0xff)
-               return (0);
+               return 0;
            *pp++ = val, cp++;
        }
        else
@@ -115,7 +115,7 @@ inet_aton(const char *cp, struct in_addr * addr)
     * Check for trailing characters.
     */
    if (*cp && (!isascii(*cp) || !isspace(*cp)))
-       return (0);
+       return 0;
 
    /*
     * Concoct the address according to the number of parts specified.
@@ -129,23 +129,23 @@ inet_aton(const char *cp, struct in_addr * addr)
 
        case 2:         /* a.b -- 8.24 bits */
            if (val > 0xffffff)
-               return (0);
+               return 0;
            val |= parts[0] << 24;
            break;
 
        case 3:         /* a.b.c -- 8.8.16 bits */
            if (val > 0xffff)
-               return (0);
+               return 0;
            val |= (parts[0] << 24) | (parts[1] << 16);
            break;
 
        case 4:         /* a.b.c.d -- 8.8.8.8 bits */
            if (val > 0xff)
-               return (0);
+               return 0;
            val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8);
            break;
    }
    if (addr)
        addr->s_addr = htonl(val);
-   return (1);
+   return 1;
 }
index c6395612aa78f5d6a2b09d34116e4e9891daf35f..1980578cd8ee331f34a33406fa47815c5f5979c3 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: isinf.c,v 1.5 1998/03/01 04:53:54 scrappy Exp $ */
+/* $Id: isinf.c,v 1.6 1998/09/01 03:24:29 momjian Exp $ */
 
 #include 
 #include "config.h"
@@ -16,11 +16,11 @@ isinf(double d)
    {
        case FP_NINF:
        case FP_PINF:
-           return (1);
+           return 1;
        default:
            break;
    }
-   return (0);
+   return 0;
 }
 
 #else
@@ -42,10 +42,10 @@ double      x;
 #endif
 
    if (fpclass == FP_POS_INF)
-       return (1);
+       return 1;
    if (fpclass == FP_NEG_INF)
-       return (-1);
-   return (0);
+       return -1;
+   return 0;
 }
 
 #endif
@@ -58,10 +58,10 @@ isinf(double x)
    int         fpclass = class(x);
 
    if (fpclass == FP_PLUS_INF)
-       return (1);
+       return 1;
    if (fpclass == FP_MINUS_INF)
-       return (-1);
-   return (0);
+       return -1;
+   return 0;
 }
 
 #endif
index 0b3db95ed06a9788aa06a20dfded4683dc5bbd4e..6e83e25d7187b29b01cd42c798a6c7c9a3833eef 100644 (file)
@@ -47,7 +47,7 @@ sigaddset(int *set, int signo)
 int
 sigemptyset(int *set)
 {
-   return (*set = 0);
+   return *set = 0;
 }
 
 char *
index 30be3a86073d16a50460ea0241e97c501ba4731a..dc74986781a0509ddc8a32c94e84f89f7c3695a0 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: random.c,v 1.4 1998/02/26 04:34:11 momjian Exp $ */
+/* $Id: random.c,v 1.5 1998/09/01 03:24:30 momjian Exp $ */
 
 #include               /* for pow() prototype */
 
@@ -8,5 +8,5 @@
 long
 random()
 {
-   return (lrand48());
+   return lrand48();
 }
index a896f7f28c408ef77bd380b04dfc79474937bde8..cc003e9b9b123dfe75ffa7896a89ec5087d34824 100644 (file)
@@ -39,7 +39,7 @@
 static char sccsid[] = "@(#)snprintf.c 8.1 (Berkeley) 6/4/93";
 #endif
 static const char rcsid[] =
-       "$Id: snprintf.c,v 1.1 1998/08/01 19:30:28 scrappy Exp $";
+       "$Id: snprintf.c,v 1.2 1998/09/01 03:24:31 momjian Exp $";
 #endif /* LIBC_SCCS and not lint */
 
 #include 
@@ -85,5 +85,5 @@ snprintf(str, n, fmt, va_alist)
    if (on > 0)
        *f._p = '\0';
    va_end(ap);
-   return (ret);
+   return ret;
 }
index 220b68cbfa5f01dc101a2768f1912df9faaa323f..84176c9930cdd7c4c2cd45de58f1d7b68a0c184a 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: strerror.c,v 1.4 1997/12/19 13:34:32 scrappy Exp $ */
+/* $Id: strerror.c,v 1.5 1998/09/01 03:24:33 momjian Exp $ */
 
 /*
  * strerror - map error number to descriptive string
@@ -24,8 +24,8 @@ strerror(int errnum)
    if (errnum < 0 || errnum > sys_nerr)
    {
        sprintf(buf, "unknown error %d", errnum);
-       return (buf);
+       return buf;
    }
 
-   return (sys_errlist[errnum]);
+   return sys_errlist[errnum];
 }
index ab2d1108106a908f40727c8d466344a42abe3a37..9d49dcad258768b295a327a578ff32329ddc4533 100644 (file)
@@ -136,5 +136,5 @@ int         base;
        acc = -acc;
    if (endptr != 0)
        *endptr = any ? s - 1 : (char *) nptr;
-   return (acc);
+   return acc;
 }
index 550cea7133106256e988c9b11e91c32a27ace8ba..7f7f429f0b387ce16c4e34f3926c53833c5fb44c 100644 (file)
@@ -116,5 +116,5 @@ register int base;
        acc = -acc;
    if (endptr != 0)
        *endptr = (char *) (any ? s - 1 : nptr);
-   return (acc);
+   return acc;
 }
index 6ef32523e79de7d132cb9b8fc9c0e798d6daa348..256e0d4c39d53118588705593aac6aeaea0e8ea8 100644 (file)
@@ -10,7 +10,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.95 1998/08/25 21:33:59 scrappy Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.96 1998/09/01 03:24:45 momjian Exp $
  *
  * NOTES
  *
@@ -646,7 +646,7 @@ ServerLoop(void)
                continue;
            fprintf(stderr, "%s: ServerLoop: select failed\n",
                    progname);
-           return (STATUS_ERROR);
+           return STATUS_ERROR;
        }
 
        /*
@@ -811,7 +811,7 @@ initMasks(fd_set *rmask, fd_set *wmask)
            nsocks = ServerSock_INET;
    }
 
-   return (nsocks + 1);
+   return nsocks + 1;
 }
 
 
@@ -1303,7 +1303,7 @@ BackendStartup(Port *port)
    {
        fprintf(stderr, "%s: BackendStartup: fork failed\n",
                progname);
-       return (STATUS_ERROR);
+       return STATUS_ERROR;
    }
 
    if (DebugLvl)
@@ -1332,7 +1332,7 @@ BackendStartup(Port *port)
 
    ActiveBackends = TRUE;
 
-   return (STATUS_OK);
+   return STATUS_OK;
 }
 
 /*
@@ -1565,14 +1565,14 @@ CharRemap(long int ch)
 
    ch = ch % 62;
    if (ch < 26)
-       return ('A' + ch);
+       return 'A' + ch;
 
    ch -= 26;
    if (ch < 26)
-       return ('a' + ch);
+       return 'a' + ch;
 
    ch -= 26;
-   return ('0' + ch);
+   return '0' + ch;
 }
 
 /*
index 4c51fa5addca7dd7f9ec829714488b0b59be9af3..91d88f185fa23152a5023199ec1ce3f3f1d83c22 100644 (file)
@@ -94,7 +94,7 @@ extern        "C"
 /* === engine.c === */
    static int
                matcher(struct re_guts * g, pg_wchar *string, size_t nmatch,
-                                   regmatch_t pmatch[], int eflags);
+                                   regmatch_t *pmatch, int eflags);
    static pg_wchar *
                dissect(struct match * m, pg_wchar *start, pg_wchar *stop,
                                    sopno startst, sopno stopst);
@@ -158,14 +158,14 @@ extern        "C"
 /*
  - matcher - the actual matching engine
  == static int matcher(struct re_guts *g, pg_wchar *string, \
- ==        size_t nmatch, regmatch_t pmatch[], int eflags);
+ ==        size_t nmatch, regmatch_t *pmatch, int eflags);
  */
 static int                     /* 0 success, REG_NOMATCH failure */
 matcher(g, string, nmatch, pmatch, eflags)
 struct re_guts *g;
 pg_wchar      *string;
 size_t     nmatch;
-regmatch_t pmatch[];
+regmatch_t *pmatch;
 int            eflags;
 {
    pg_wchar       *endp;
@@ -196,7 +196,7 @@ int         eflags;
 #endif
    }
    if (stop < start)
-       return (REG_INVARG);
+       return REG_INVARG;
 
    /* prescreening; this does wonders for this rather slow code */
    if (g->must != NULL)
@@ -210,7 +210,7 @@ int         eflags;
 #endif
                break;
        if (dp == stop)         /* we didn't find g->must */
-           return (REG_NOMATCH);
+           return REG_NOMATCH;
    }
 
    /* match struct setup */
@@ -235,7 +235,7 @@ int         eflags;
        if (endp == NULL)
        {                       /* a miss */
            STATETEARDOWN(m);
-           return (REG_NOMATCH);
+           return REG_NOMATCH;
        }
        if (nmatch == 0 && !g->backrefs)
            break;              /* no further info needed */
@@ -261,7 +261,7 @@ int         eflags;
        if (m->pmatch == NULL)
        {
            STATETEARDOWN(m);
-           return (REG_ESPACE);
+           return REG_ESPACE;
        }
        for (i = 1; i <= m->g->nsub; i++)
            m->pmatch[i].rm_so = m->pmatch[i].rm_eo = -1;
@@ -279,7 +279,7 @@ int         eflags;
            {
                free(m->pmatch);
                STATETEARDOWN(m);
-               return (REG_ESPACE);
+               return REG_ESPACE;
            }
            NOTE("backref dissect");
            dp = backref(m, m->coldp, endp, gf, gl, (sopno) 0);
@@ -343,7 +343,7 @@ int         eflags;
    if (m->lastpos != NULL)
        free((pg_wchar *) m->lastpos);
    STATETEARDOWN(m);
-   return (0);
+   return 0;
 }
 
 /*
@@ -543,7 +543,7 @@ sopno       stopst;
    }
 
    assert(sp == stop);
-   return (sp);
+   return sp;
 }
 
 /*
@@ -583,17 +583,17 @@ sopno     lev;                /* PLUS nesting level */
        {
            case OCHAR:
                if (sp == stop || *sp++ != (pg_wchar) OPND(s))
-                   return (NULL);
+                   return NULL;
                break;
            case OANY:
                if (sp == stop)
-                   return (NULL);
+                   return NULL;
                sp++;
                break;
            case OANYOF:
                cs = &m->g->sets[OPND(s)];
                if (sp == stop || !CHIN(cs, *sp++))
-                   return (NULL);
+                   return NULL;
                break;
            case OBOL:
                if ((sp == m->beginp && !(m->eflags & REG_NOTBOL)) ||
@@ -602,7 +602,7 @@ sopno       lev;                /* PLUS nesting level */
                {               /* yes */
                }
                else
-                   return (NULL);
+                   return NULL;
                break;
            case OEOL:
                if ((sp == m->endp && !(m->eflags & REG_NOTEOL)) ||
@@ -611,7 +611,7 @@ sopno       lev;                /* PLUS nesting level */
                {               /* yes */
                }
                else
-                   return (NULL);
+                   return NULL;
                break;
            case OBOW:
                if (((sp == m->beginp && !(m->eflags & REG_NOTBOL)) ||
@@ -623,7 +623,7 @@ sopno       lev;                /* PLUS nesting level */
                {               /* yes */
                }
                else
-                   return (NULL);
+                   return NULL;
                break;
            case OEOW:
                if (((sp == m->endp && !(m->eflags & REG_NOTEOL)) ||
@@ -634,7 +634,7 @@ sopno       lev;                /* PLUS nesting level */
                {               /* yes */
                }
                else
-                   return (NULL);
+                   return NULL;
                break;
            case O_QUEST:
                break;
@@ -655,8 +655,8 @@ sopno       lev;                /* PLUS nesting level */
    if (!hard)
    {                           /* that was it! */
        if (sp != stop)
-           return (NULL);
-       return (sp);
+           return NULL;
+       return sp;
    }
    ss--;                       /* adjust for the for's final increment */
 
@@ -669,41 +669,41 @@ sopno     lev;                /* PLUS nesting level */
            i = OPND(s);
            assert(0 < i && i <= m->g->nsub);
            if (m->pmatch[i].rm_eo == -1)
-               return (NULL);
+               return NULL;
            assert(m->pmatch[i].rm_so != -1);
            len = m->pmatch[i].rm_eo - m->pmatch[i].rm_so;
            assert(stop - m->beginp >= len);
            if (sp > stop - len)
-               return (NULL);  /* not enough left to match */
+               return NULL;    /* not enough left to match */
            ssp = m->offp + m->pmatch[i].rm_so;
            if (memcmp(sp, ssp, len) != 0)
-               return (NULL);
+               return NULL;
            while (m->g->strip[ss] != SOP(O_BACK, i))
                ss++;
-           return (backref(m, sp + len, stop, ss + 1, stopst, lev));
+           return backref(m, sp + len, stop, ss + 1, stopst, lev);
            break;
        case OQUEST_:           /* to null or not */
            dp = backref(m, sp, stop, ss + 1, stopst, lev);
            if (dp != NULL)
-               return (dp);    /* not */
-           return (backref(m, sp, stop, ss + OPND(s) + 1, stopst, lev));
+               return dp;  /* not */
+           return backref(m, sp, stop, ss + OPND(s) + 1, stopst, lev);
            break;
        case OPLUS_:
            assert(m->lastpos != NULL);
            assert(lev + 1 <= m->g->nplus);
            m->lastpos[lev + 1] = sp;
-           return (backref(m, sp, stop, ss + 1, stopst, lev + 1));
+           return backref(m, sp, stop, ss + 1, stopst, lev + 1);
            break;
        case O_PLUS:
            if (sp == m->lastpos[lev])  /* last pass matched null */
-               return (backref(m, sp, stop, ss + 1, stopst, lev - 1));
+               return backref(m, sp, stop, ss + 1, stopst, lev - 1);
            /* try another pass */
            m->lastpos[lev] = sp;
            dp = backref(m, sp, stop, ss - OPND(s) + 1, stopst, lev);
            if (dp == NULL)
-               return (backref(m, sp, stop, ss + 1, stopst, lev - 1));
+               return backref(m, sp, stop, ss + 1, stopst, lev - 1);
            else
-               return (dp);
+               return dp;
            break;
        case OCH_:              /* find the right one, if any */
            ssub = ss + 1;
@@ -713,10 +713,10 @@ sopno     lev;                /* PLUS nesting level */
            {                   /* find first matching branch */
                dp = backref(m, sp, stop, ssub, esub, lev);
                if (dp != NULL)
-                   return (dp);
+                   return dp;
                /* that one missed, try next one */
                if (OP(m->g->strip[esub]) == O_CH)
-                   return (NULL);      /* there is none */
+                   return NULL;        /* there is none */
                esub++;
                assert(OP(m->g->strip[esub]) == OOR2);
                ssub = esub + 1;
@@ -734,9 +734,9 @@ sopno       lev;                /* PLUS nesting level */
            m->pmatch[i].rm_so = sp - m->offp;
            dp = backref(m, sp, stop, ss + 1, stopst, lev);
            if (dp != NULL)
-               return (dp);
+               return dp;
            m->pmatch[i].rm_so = offsave;
-           return (NULL);
+           return NULL;
            break;
        case ORPAREN:           /* must undo assignment if rest fails */
            i = OPND(s);
@@ -745,9 +745,9 @@ sopno       lev;                /* PLUS nesting level */
            m->pmatch[i].rm_eo = sp - m->offp;
            dp = backref(m, sp, stop, ss + 1, stopst, lev);
            if (dp != NULL)
-               return (dp);
+               return dp;
            m->pmatch[i].rm_eo = offsave;
-           return (NULL);
+           return NULL;
            break;
        default:                /* uh oh */
            assert(nope);
@@ -850,9 +850,9 @@ sopno       stopst;
    assert(coldp != NULL);
    m->coldp = coldp;
    if (ISSET(st, stopst))
-       return (p + 1);
+       return p + 1;
    else
-       return (NULL);
+       return NULL;
 }
 
 /*
@@ -941,7 +941,7 @@ sopno       stopst;
        p++;
    }
 
-   return (matchp);
+   return matchp;
 }
 
 
@@ -1075,7 +1075,7 @@ states        aft;                /* states already known reachable after */
        }
    }
 
-   return (aft);
+   return aft;
 }
 
 #ifdef REDEBUG
@@ -1171,7 +1171,7 @@ int           ch;
        sprintf(pbuf, "%c", ch);
    else
        sprintf(pbuf, "\\%o", ch);
-   return (pbuf);
+   return pbuf;
 }
 
 #endif
index cc6a7613fd44322b1b69eee4b097949e70d9d66e..268ef354614e8616b2be8ed14fa791b5eb221ab6 100644 (file)
@@ -206,18 +206,18 @@ int           cflags;
 
    cflags = GOODFLAGS(cflags);
    if ((cflags & REG_EXTENDED) && (cflags & REG_NOSPEC))
-       return (REG_INVARG);
+       return REG_INVARG;
 
    if (cflags & REG_PEND)
    {
 #ifdef MULTIBYTE
            wcp = preg->patsave;
        if (preg->re_endp < wcp)
-           return (REG_INVARG);
+           return REG_INVARG;
        len = preg->re_endp - wcp;
 #else
        if (preg->re_endp < pattern)
-           return (REG_INVARG);
+           return REG_INVARG;
        len = preg->re_endp - pattern;
 #endif
    }
@@ -225,7 +225,7 @@ int         cflags;
 #ifdef MULTIBYTE
      wcp = (pg_wchar *)malloc((strlen(pattern)+1) * sizeof(pg_wchar));
      if (wcp == NULL) {
-       return (REG_ESPACE);
+       return REG_ESPACE;
      }
      preg->patsave = wcp;
      (void)pg_mb2wchar((unsigned char *)pattern,wcp);
@@ -240,7 +240,7 @@ int         cflags;
    g = (struct re_guts *) malloc(sizeof(struct re_guts) +
                                  (NC - 1) * sizeof(cat_t));
    if (g == NULL)
-       return (REG_ESPACE);
+       return REG_ESPACE;
    p->ssize = len / (size_t) 2 *(size_t) 3 + (size_t) 1;       /* ugh */
 
    p->strip = (sop *) malloc(p->ssize * sizeof(sop));
@@ -248,7 +248,7 @@ int         cflags;
    if (p->strip == NULL)
    {
        free((char *) g);
-       return (REG_ESPACE);
+       return REG_ESPACE;
    }
 
    /* set things up */
@@ -312,7 +312,7 @@ int         cflags;
    /* win or lose, we're done */
    if (p->error != 0)          /* lose */
        pg95_regfree(preg);
-   return (p->error);
+   return p->error;
 }
 
 /*
@@ -716,9 +716,9 @@ int         starordinary;       /* is a leading * an ordinary character? */
        }
    }
    else if (c == (unsigned char) '$')  /* $ (but not \$) ends it */
-       return (1);
+       return 1;
 
-   return (0);
+   return 0;
 }
 
 /*
@@ -739,7 +739,7 @@ struct parse *p;
    }
 
    REQUIRE(ndigits > 0 && count <= DUPMAX, REG_BADBR);
-   return (count);
+   return count;
 }
 
 /*
@@ -982,12 +982,12 @@ struct parse *p;
 
    REQUIRE(MORE(), REG_EBRACK);
    if (!EATTWO('[', '.'))
-       return (GETNEXT());
+       return GETNEXT();
 
    /* collating symbol */
    value = p_b_coll_elem(p, '.');
    REQUIRE(EATTWO('.', ']'), REG_ECOLLATE);
-   return (value);
+   return value;
 }
 
 /*
@@ -1008,7 +1008,7 @@ int           endc;               /* name ended by endc,']' */
    if (!MORE())
    {
        SETERROR(REG_EBRACK);
-       return (0);
+       return 0;
    }
    len = p->next - sp;
    for (cp = cnames; cp->name != NULL; cp++)
@@ -1017,11 +1017,11 @@ int         endc;               /* name ended by endc,']' */
 #else
        if (strncmp(cp->name, sp, len) == 0 && cp->name[len] == '\0')
 #endif
-           return (cp->code);  /* known name */
+           return cp->code;    /* known name */
    if (len == 1)
-       return (*sp);           /* single character */
+       return *sp;         /* single character */
    SETERROR(REG_ECOLLATE);     /* neither */
-   return (0);
+   return 0;
 }
 
 /*
@@ -1034,12 +1034,12 @@ int         ch;
 {
    assert(pg_isalpha(ch));
    if (pg_isupper(ch))
-       return (tolower(ch));
+       return tolower(ch);
    else if (pg_islower(ch))
-       return (toupper(ch));
+       return toupper(ch);
    else
 /* peculiar, but could happen */
-       return (ch);
+       return ch;
 }
 
 /*
@@ -1208,7 +1208,7 @@ int           e;
        p->error = e;
    p->next = nuls;             /* try to bring things to a halt */
    p->end = nuls;
-   return (0);                 /* make the return value well-defined */
+   return 0;                   /* make the return value well-defined */
 }
 
 /*
@@ -1266,7 +1266,7 @@ struct parse *p;
    cs->smultis = 0;
    cs->multis = NULL;
 
-   return (cs);
+   return cs;
 }
 
 /*
@@ -1327,7 +1327,7 @@ cset     *cs;
        cs = cs2;
    }
 
-   return ((int) (cs - p->g->sets));
+   return (int) (cs - p->g->sets);
 }
 
 /*
@@ -1344,9 +1344,9 @@ cset     *cs;
 
    for (i = 0; i < css; i++)
        if (CHIN(cs, i))
-           return (i);
+           return i;
    assert(never);
-   return (0);                 /* arbitrary */
+   return 0;                   /* arbitrary */
 }
 
 /*
@@ -1365,7 +1365,7 @@ cset     *cs;
    for (i = 0; i < css; i++)
        if (CHIN(cs, i))
            n++;
-   return (n);
+   return n;
 }
 
 /*
@@ -1505,8 +1505,8 @@ int           c;
 
    for (i = 0, col = g->setbits; i < ncols; i++, col += g->csetsize)
        if (col[uc] != 0)
-           return (1);
-   return (0);
+           return 1;
+   return 0;
 }
 
 /*
@@ -1527,8 +1527,8 @@ int           c2;
 
    for (i = 0, col = g->setbits; i < ncols; i++, col += g->csetsize)
        if (col[uc1] != col[uc2])
-           return (0);
-   return (1);
+           return 0;
+   return 1;
 }
 
 /*
@@ -1575,13 +1575,13 @@ sopno       finish;             /* to this less one */
 
    assert(finish >= start);
    if (len == 0)
-       return (ret);
+       return ret;
    enlarge(p, p->ssize + len); /* this many unexpected additions */
    assert(p->ssize >= p->slen + len);
    memcpy((char *) (p->strip + p->slen),
           (char *) (p->strip + start), (size_t) len * sizeof(sop));
    p->slen += len;
-   return (ret);
+   return ret;
 }
 
 /*
@@ -1826,7 +1826,7 @@ struct re_guts *g;
    sopno       maxnest = 0;
 
    if (p->error != 0)
-       return (0);             /* there may not be an OEND */
+       return 0;               /* there may not be an OEND */
 
    scan = g->strip + 1;
    do
@@ -1846,7 +1846,7 @@ struct re_guts *g;
    } while (OP(s) != OEND);
    if (plusnest != 0)
        g->iflags |= BAD;
-   return (maxnest);
+   return maxnest;
 }
 
 /*
index f71ff9757e3537b1242703e78834a5f594dac03c..15d78325e6336fe1dbbe29e6768c856028bfc97f 100644 (file)
@@ -200,7 +200,7 @@ size_t      errbuf_size;
        }
    }
 
-   return (len);
+   return len;
 }
 
 /*
@@ -222,8 +222,8 @@ char       *localbuf;
 #endif
            break;
    if (r->code == 0)
-       return ("0");
+       return "0";
 
    sprintf(localbuf, "%d", r->code);
-   return (localbuf);
+   return localbuf;
 }
index 7fbcbf81c803874d97e58c6c070592174c42ec07..0aab1923bca3a2f0202c1a5e84dba5d73a983395 100644 (file)
@@ -159,7 +159,7 @@ pg95_regexec(preg, string, nmatch, pmatch, eflags)
 const regex_t *preg;
 const char *string;
 size_t     nmatch;
-regmatch_t pmatch[];
+regmatch_t *pmatch;
 int            eflags;
 {
    struct re_guts *g = preg->re_g;
@@ -176,10 +176,10 @@ int           eflags;
 #endif
 
    if (preg->re_magic != MAGIC1 || g->magic != MAGIC2)
-       return (REG_BADPAT);
+       return REG_BADPAT;
    assert(!(g->iflags & BAD));
    if (g->iflags & BAD)        /* backstop for no-debug case */
-       return (REG_BADPAT);
+       return REG_BADPAT;
    eflags = GOODFLAGS(eflags);
 
 #ifdef MULTIBYTE
@@ -198,8 +198,8 @@ int         eflags;
 #  else
 
    if (g->nstates <= CHAR_BIT * sizeof(states1) && !(eflags & REG_LARGE))
-       return (smatcher(g, (pg_wchar *) string, nmatch, pmatch, eflags));
+       return smatcher(g, (pg_wchar *) string, nmatch, pmatch, eflags);
    else
-       return (lmatcher(g, (pg_wchar *) string, nmatch, pmatch, eflags));
+       return lmatcher(g, (pg_wchar *) string, nmatch, pmatch, eflags);
 #endif
 }
index 46727d94c6e8f6e337b98c68cee3e1bcdc169d9b..0d438a3ddcdf6a20f0f495ed5477cc31c2d0cc8d 100644 (file)
@@ -6,7 +6,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/rewrite/Attic/locks.c,v 1.11 1998/08/24 01:37:56 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/rewrite/Attic/locks.c,v 1.12 1998/09/01 03:24:53 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -100,7 +100,7 @@ nodeThisLockWasTriggered(Node *node, int varno, AttrNumber attnum,
        default:
            break;
    }
-   return (FALSE);
+   return FALSE;
 }
 
 /*
@@ -145,7 +145,7 @@ matchLocks(CmdType event,
    if (parsetree->commandType != CMD_SELECT)
    {
        if (parsetree->resultRelation != varno)
-           return (NULL);
+           return NULL;
    }
 
    nlocks = rulelocks->numLocks;
@@ -166,7 +166,7 @@ matchLocks(CmdType event,
 
    checkLockPerms(real_locks, parsetree, varno);
 
-   return (real_locks);
+   return real_locks;
 }
 
 
index c5c3b887867802a401dc3efb01c49414d4ac5453..c055b47dd1ae85eef9890c6cad5034b55dbd9c59 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.19 1998/08/24 01:37:58 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.20 1998/09/01 03:24:54 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -133,7 +133,7 @@ InsertRule(char *rulname,
 
    pg_exec_query_acl_override(rulebuf);
 
-   return (LastOidProcessed);
+   return LastOidProcessed;
 }
 
 /*
index 7606698afdf63214e86f0223e40d9968727c979e..83b6c9f5c57c1617db31def0ab7c58d389b4a987 100644 (file)
@@ -6,7 +6,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteManip.c,v 1.15 1998/07/19 05:49:24 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteManip.c,v 1.16 1998/09/01 03:24:56 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -288,7 +288,7 @@ FindMatchingNew(List *tlist, int attno)
        TargetEntry *tle = lfirst(i);
 
        if (tle->resdom->resno == attno)
-           return (tle->expr);
+           return tle->expr;
    }
    return NULL;
 }
@@ -305,7 +305,7 @@ FindMatchingTLEntry(List *tlist, char *e_attname)
 
        resname = tle->resdom->resname;
        if (!strcmp(e_attname, resname))
-           return (tle->expr);
+           return tle->expr;
    }
    return NULL;
 }
index e9d3e791fb1a7f9de34a2ae98c62d91b23f24ccd..eaa4e0112cc0d3953ca6285930315d7475843af1 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteRemove.c,v 1.16 1998/08/19 02:02:32 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteRemove.c,v 1.17 1998/09/01 03:24:57 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -103,7 +103,7 @@ RemoveRewriteRule(char *ruleName)
    ruleId = tuple->t_oid;
    eventRelationOidDatum = heap_getattr(tuple,
                                 Anum_pg_rewrite_ev_class,
-                                RelationGetTupleDescriptor(RewriteRelation),
+                                RelationGetDescr(RewriteRelation),
                                 &isNull);
    if (isNull)
    {
index 4c17cccb7f74f0864e480a6d2eff32d82b9e4c6d..035c92f52feef2ffc8a58bce4aa94c9ab47bf0d2 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteSupport.c,v 1.26 1998/08/24 01:38:01 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteSupport.c,v 1.27 1998/09/01 03:24:59 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -51,7 +51,7 @@ RuleIdGetActionInfo(Oid ruleoid, bool *instead_flag, Query **parseTrees)
    Node       *rule_evqual = NULL;
 
    ruleRelation = heap_openr(RewriteRelationName);
-   ruleTupdesc = RelationGetTupleDescriptor(ruleRelation);
+   ruleTupdesc = RelationGetDescr(ruleRelation);
    ruletuple = SearchSysCacheTuple(RULOID,
                                    ObjectIdGetDatum(ruleoid),
                                    0, 0, 0);
@@ -105,7 +105,7 @@ IsDefinedRewriteRule(char *ruleName)
     * return whether or not the rewrite rule existed
     */
    heap_close(RewriteRelation);
-   return (HeapTupleIsValid(tuple));
+   return HeapTupleIsValid(tuple);
 }
 
 static void
index d5e576b119ed54f8a270863b235060ef9d2662a4..2a932c6452e90e74ebac39650f46f802c5c1c787 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_table.c,v 1.12 1998/06/30 19:09:57 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_table.c,v 1.13 1998/09/01 03:25:00 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -80,7 +80,7 @@ BufTableLookup(BufferTag *tagPtr)
    bool        found;
 
    if (tagPtr->blockNum == P_NEW)
-       return (NULL);
+       return NULL;
 
    result = (LookupEnt *)
        hash_search(SharedBufHash, (char *) tagPtr, HASH_FIND, &found);
@@ -88,11 +88,11 @@ BufTableLookup(BufferTag *tagPtr)
    if (!result)
    {
        elog(ERROR, "BufTableLookup: BufferLookup table corrupted");
-       return (NULL);
+       return NULL;
    }
    if (!found)
-       return (NULL);
-   return (&(BufferDescriptors[result->id]));
+       return NULL;
+   return &(BufferDescriptors[result->id]);
 }
 
 /*
@@ -109,7 +109,7 @@ BufTableDelete(BufferDesc *buf)
     * BM_DELETED keeps us from removing buffer twice.
     */
    if (buf->flags & BM_DELETED)
-       return (TRUE);
+       return TRUE;
 
    buf->flags |= BM_DELETED;
 
@@ -119,10 +119,10 @@ BufTableDelete(BufferDesc *buf)
    if (!(result && found))
    {
        elog(ERROR, "BufTableDelete: BufferLookup table corrupted");
-       return (FALSE);
+       return FALSE;
    }
 
-   return (TRUE);
+   return TRUE;
 }
 
 bool
@@ -142,18 +142,18 @@ BufTableInsert(BufferDesc *buf)
    {
        Assert(0);
        elog(ERROR, "BufTableInsert: BufferLookup table corrupted");
-       return (FALSE);
+       return FALSE;
    }
    /* found something else in the table ! */
    if (found)
    {
        Assert(0);
        elog(ERROR, "BufTableInsert: BufferLookup table corrupted");
-       return (FALSE);
+       return FALSE;
    }
 
    result->id = buf->buf_id;
-   return (TRUE);
+   return TRUE;
 }
 
 /* prints out collision stats for the buf table */
index 77efdf3538aec0044540bb09afa13de65ac69776..837b02dbf12b59fc5c4f61d3db7184dccfac22fb 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.41 1998/08/19 02:02:35 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.42 1998/09/01 03:25:02 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -128,19 +128,19 @@ RelationGetBufferWithBuffer(Relation relation,
                bufHdr->tag.relId.dbId == lrelId->dbId)
            {
                SpinRelease(BufMgrLock);
-               return (buffer);
+               return buffer;
            }
-           return (ReadBufferWithBufferLock(relation, blockNumber, true));
+           return ReadBufferWithBufferLock(relation, blockNumber, true);
        }
        else
        {
            bufHdr = &LocalBufferDescriptors[-buffer - 1];
            if (bufHdr->tag.relId.relId == RelationGetRelid(relation) &&
                bufHdr->tag.blockNum == blockNumber)
-               return (buffer);
+               return buffer;
        }
    }
-   return (ReadBuffer(relation, blockNumber));
+   return ReadBuffer(relation, blockNumber);
 }
 
 /*
@@ -256,7 +256,7 @@ ReadBufferWithBufferLock(Relation reln,
    }
 
    if (!bufHdr)
-       return (InvalidBuffer);
+       return InvalidBuffer;
 
    /* if its already in the buffer pool, we're done */
    if (found)
@@ -274,7 +274,7 @@ ReadBufferWithBufferLock(Relation reln,
            smgrextend(DEFAULT_SMGR, reln,
                       (char *) MAKE_PTR(bufHdr->data));
        }
-       return (BufferDescriptorGetBuffer(bufHdr));
+       return BufferDescriptorGetBuffer(bufHdr);
 
    }
 
@@ -296,7 +296,7 @@ ReadBufferWithBufferLock(Relation reln,
    }
 
    if (isLocalBuf)
-       return (BufferDescriptorGetBuffer(bufHdr));
+       return BufferDescriptorGetBuffer(bufHdr);
 
    /* lock buffer manager again to update IO IN PROGRESS */
    SpinAcquire(BufMgrLock);
@@ -338,9 +338,9 @@ ReadBufferWithBufferLock(Relation reln,
    SpinRelease(BufMgrLock);
 
    if (status == SM_FAIL)
-       return (InvalidBuffer);
+       return InvalidBuffer;
 
-   return (BufferDescriptorGetBuffer(bufHdr));
+   return BufferDescriptorGetBuffer(bufHdr);
 }
 
 /*
@@ -421,7 +421,7 @@ BufferAlloc(Relation reln,
 
        SpinRelease(BufMgrLock);
 
-       return (buf);
+       return buf;
    }
 
    *foundPtr = FALSE;
@@ -444,7 +444,7 @@ BufferAlloc(Relation reln,
         * again.
         */
        if (buf == NULL)
-           return (NULL);
+           return NULL;
 
        /*
         * There should be exactly one pin on the buffer after it is
@@ -606,7 +606,7 @@ BufferAlloc(Relation reln,
 
                SpinRelease(BufMgrLock);
 
-               return (buf2);
+               return buf2;
            }
        }
    }
@@ -665,7 +665,7 @@ BufferAlloc(Relation reln,
 
    SpinRelease(BufMgrLock);
 
-   return (buf);
+   return buf;
 }
 
 /*
@@ -689,7 +689,7 @@ WriteBuffer(Buffer buffer)
    BufferDesc *bufHdr;
 
    if (WriteMode == BUFFER_FLUSH_WRITE)
-       return (FlushBuffer(buffer, TRUE));
+       return FlushBuffer(buffer, TRUE);
    else
    {
 
@@ -697,7 +697,7 @@ WriteBuffer(Buffer buffer)
            return WriteLocalBuffer(buffer, TRUE);
 
        if (BAD_BUFFER_ID(buffer))
-           return (FALSE);
+           return FALSE;
 
        bufHdr = &BufferDescriptors[buffer - 1];
 
@@ -708,7 +708,7 @@ WriteBuffer(Buffer buffer)
        SpinRelease(BufMgrLock);
        CommitInfoNeedsSave[buffer - 1] = 0;
    }
-   return (TRUE);
+   return TRUE;
 }
 
 #ifdef NOT_USED
@@ -803,7 +803,7 @@ FlushBuffer(Buffer buffer, bool release)
        return FlushLocalBuffer(buffer, release);
 
    if (BAD_BUFFER_ID(buffer))
-       return (STATUS_ERROR);
+       return STATUS_ERROR;
 
    bufHdr = &BufferDescriptors[buffer - 1];
    bufdb = bufHdr->tag.relId.dbId;
@@ -826,7 +826,7 @@ FlushBuffer(Buffer buffer, bool release)
    {
        elog(ERROR, "FlushBuffer: cannot flush block %u of the relation %s",
             bufHdr->tag.blockNum, bufHdr->sb_relname);
-       return (STATUS_ERROR);
+       return STATUS_ERROR;
    }
    BufferFlushCount++;
 
@@ -848,7 +848,7 @@ FlushBuffer(Buffer buffer, bool release)
    SpinRelease(BufMgrLock);
    CommitInfoNeedsSave[buffer - 1] = 0;
 
-   return (STATUS_OK);
+   return STATUS_OK;
 }
 
 /*
@@ -865,7 +865,7 @@ WriteNoReleaseBuffer(Buffer buffer)
    BufferDesc *bufHdr;
 
    if (WriteMode == BUFFER_FLUSH_WRITE)
-       return (FlushBuffer(buffer, FALSE));
+       return FlushBuffer(buffer, FALSE);
    else
    {
 
@@ -873,7 +873,7 @@ WriteNoReleaseBuffer(Buffer buffer)
            return WriteLocalBuffer(buffer, FALSE);
 
        if (BAD_BUFFER_ID(buffer))
-           return (STATUS_ERROR);
+           return STATUS_ERROR;
 
        bufHdr = &BufferDescriptors[buffer - 1];
 
@@ -882,7 +882,7 @@ WriteNoReleaseBuffer(Buffer buffer)
        SpinRelease(BufMgrLock);
        CommitInfoNeedsSave[buffer - 1] = 0;
    }
-   return (STATUS_OK);
+   return STATUS_OK;
 }
 
 
@@ -938,7 +938,7 @@ ReleaseAndReadBuffer(Buffer buffer,
        }
    }
 
-   return (ReadBuffer(relation, blockNum));
+   return ReadBuffer(relation, blockNum);
 }
 
 /*
@@ -1224,9 +1224,9 @@ BufferPoolCheckLeak()
    if (error)
    {
        PrintBufferDescs();
-       return (1);
+       return 1;
    }
-   return (0);
+   return 0;
 }
 
 /* ------------------------------------------------
@@ -1260,9 +1260,9 @@ BufferGetBlockNumber(Buffer buffer)
 
    /* XXX should be a critical section */
    if (BufferIsLocal(buffer))
-       return (LocalBufferDescriptors[-buffer - 1].tag.blockNum);
+       return LocalBufferDescriptors[-buffer - 1].tag.blockNum;
    else
-       return (BufferDescriptors[buffer - 1].tag.blockNum);
+       return BufferDescriptors[buffer - 1].tag.blockNum;
 }
 
 /*
@@ -1297,7 +1297,7 @@ BufferGetRelation(Buffer buffer)
        RelationIncrementReferenceCount(relation);
    }
 
-   return (relation);
+   return relation;
 }
 
 /*
@@ -1354,11 +1354,11 @@ BufferReplace(BufferDesc *bufHdr, bool bufferLockHeld)
        RelationDecrementReferenceCount(reln);
 
    if (status == SM_FAIL)
-       return (FALSE);
+       return FALSE;
 
    BufferFlushCount++;
 
-   return (TRUE);
+   return TRUE;
 }
 
 /*
@@ -1576,19 +1576,19 @@ BlowawayRelationBuffers(Relation rel, BlockNumber block)
                {
                    elog(NOTICE, "BlowawayRelationBuffers(%s (local), %u): block %u is dirty",
                         rel->rd_rel->relname.data, block, buf->tag.blockNum);
-                   return (-1);
+                   return -1;
                }
                if (LocalRefCount[i] > 0)
                {
                    elog(NOTICE, "BlowawayRelationBuffers(%s (local), %u): block %u is referenced (%d)",
                         rel->rd_rel->relname.data, block,
                         buf->tag.blockNum, LocalRefCount[i]);
-                   return (-2);
+                   return -2;
                }
                buf->tag.relId.relId = InvalidOid;
            }
        }
-       return (0);
+       return 0;
    }
 
    SpinAcquire(BufMgrLock);
@@ -1605,7 +1605,7 @@ BlowawayRelationBuffers(Relation rel, BlockNumber block)
                     buf->sb_relname, block, buf->tag.blockNum,
                     PrivateRefCount[i], LastRefCount[i], buf->refcount);
                SpinRelease(BufMgrLock);
-               return (-1);
+               return -1;
            }
            if (!(buf->flags & BM_FREE))
            {
@@ -1613,13 +1613,13 @@ BlowawayRelationBuffers(Relation rel, BlockNumber block)
                     buf->sb_relname, block, buf->tag.blockNum,
                     PrivateRefCount[i], LastRefCount[i], buf->refcount);
                SpinRelease(BufMgrLock);
-               return (-2);
+               return -2;
            }
            BufTableDelete(buf);
        }
    }
    SpinRelease(BufMgrLock);
-   return (0);
+   return 0;
 }
 
 #undef ReleaseBuffer
@@ -1638,11 +1638,11 @@ ReleaseBuffer(Buffer buffer)
    {
        Assert(LocalRefCount[-buffer - 1] > 0);
        LocalRefCount[-buffer - 1]--;
-       return (STATUS_OK);
+       return STATUS_OK;
    }
 
    if (BAD_BUFFER_ID(buffer))
-       return (STATUS_ERROR);
+       return STATUS_ERROR;
 
    bufHdr = &BufferDescriptors[buffer - 1];
 
@@ -1670,7 +1670,7 @@ ReleaseBuffer(Buffer buffer)
        SpinRelease(BufMgrLock);
    }
 
-   return (STATUS_OK);
+   return STATUS_OK;
 }
 
 #ifdef NOT_USED
@@ -1923,7 +1923,7 @@ SetBufferWriteMode(int mode)
 
    old = WriteMode;
    WriteMode = mode;
-   return (old);
+   return old;
 }
 
 void
index d5c0272a8a6c2a3c8b06f4a3cd0dd29efd197eb3..421bce86e2489d9c6e300f34285f32cad12554ea 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/storage/buffer/freelist.c,v 1.11 1998/06/15 19:29:10 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/storage/buffer/freelist.c,v 1.12 1998/09/01 03:25:03 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -192,7 +192,7 @@ GetFreeBuffer()
 
        /* queue is empty. All buffers in the buffer pool are pinned. */
        elog(ERROR, "out of free buffers: time to abort !\n");
-       return (NULL);
+       return NULL;
    }
    buf = &(BufferDescriptors[SharedFreeList->freeNext]);
 
@@ -203,7 +203,7 @@ GetFreeBuffer()
 
    buf->flags &= ~(BM_FREE);
 
-   return (buf);
+   return buf;
 }
 
 /*
index 6493b947dbff93b403c8d1d1d1f28b1b3996af17..88288c9a5ef5f2084612c4f9ec402dc3743d13f3 100644 (file)
@@ -6,7 +6,7 @@
  * Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *   $Id: fd.c,v 1.32 1998/06/15 19:29:11 momjian Exp $
+ *   $Id: fd.c,v 1.33 1998/09/01 03:25:06 momjian Exp $
  *
  * NOTES:
  *
@@ -336,7 +336,7 @@ tryAgain:
        {
            DO_DB(elog(DEBUG, "RE_OPEN FAILED: %d",
                       errno));
-           return (vfdP->fd);
+           return vfdP->fd;
        }
        else
        {
@@ -363,7 +363,7 @@ tryAgain:
 
    Insert(file);
 
-   return (0);
+   return 0;
 }
 
 static void
@@ -484,7 +484,7 @@ filepath(char *filename)
    printf("filepath: path is %s\n", buf);
 #endif
 
-   return (buf);
+   return buf;
 }
 
 static int
@@ -521,7 +521,7 @@ FileAccess(File file)
        Insert(file);
    }
 
-   return (0);
+   return 0;
 }
 
 /*
@@ -604,7 +604,7 @@ FileNameOpenFile(FileName fileName, int fileFlags, int fileMode)
    fname = filepath(fileName);
    fd = fileNameOpenFile(fname, fileFlags, fileMode);
    pfree(fname);
-   return (fd);
+   return fd;
 }
 
 /*
@@ -613,7 +613,7 @@ FileNameOpenFile(FileName fileName, int fileFlags, int fileMode)
 File
 PathNameOpenFile(FileName fileName, int fileFlags, int fileMode)
 {
-   return (fileNameOpenFile(fileName, fileFlags, fileMode));
+   return fileNameOpenFile(fileName, fileFlags, fileMode);
 }
 
 void
@@ -766,7 +766,7 @@ FileSeek(File file, long offset, int whence)
        return returnCode;
    }
    /* NOTREACHED */
-   return (-1L);
+   return -1L;
 }
 
 /*
@@ -794,7 +794,7 @@ FileTruncate(File file, int offset)
    FileSync(file);
    FileAccess(file);
    returnCode = ftruncate(VfdCache[file].fd, offset);
-   return (returnCode);
+   return returnCode;
 }
 
 int
@@ -828,7 +828,7 @@ FileNameUnlink(char *filename)
    fname = filepath(filename);
    retval = unlink(fname);
    pfree(fname);
-   return (retval);
+   return retval;
 }
 
 /*
index a9c56cf728f624b166f5f9fcca4e0c70ba17eb79..48ccd13fba99b0992a3d42e389c0b0d621cb7532 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.31 1998/08/25 21:34:01 scrappy Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.32 1998/09/01 03:25:08 momjian Exp $
  *
  * NOTES
  *
@@ -88,13 +88,13 @@ PrivateMemoryCreate(IpcMemoryKey memKey,
        elog(ERROR, "PrivateMemoryCreate: not enough memory to malloc");
    MemSet(IpcPrivateMem[memid].memptr, 0, size);       /* XXX PURIFY */
 
-   return (memid++);
+   return memid++;
 }
 
 static char *
 PrivateMemoryAttach(IpcMemoryId memid)
 {
-   return (IpcPrivateMem[memid].memptr);
+   return IpcPrivateMem[memid].memptr;
 }
 
 
@@ -205,14 +205,14 @@ int
 on_proc_exit(void (*function) (), caddr_t arg)
 {
    if (on_proc_exit_index >= MAX_ON_EXITS)
-       return (-1);
+       return -1;
 
    on_proc_exit_list[on_proc_exit_index].function = function;
    on_proc_exit_list[on_proc_exit_index].arg = arg;
 
    ++on_proc_exit_index;
 
-   return (0);
+   return 0;
 }
 
 /* ----------------------------------------------------------------
@@ -226,14 +226,14 @@ int
 on_shmem_exit(void (*function) (), caddr_t arg)
 {
    if (on_shmem_exit_index >= MAX_ON_EXITS)
-       return (-1);
+       return -1;
 
    on_shmem_exit_list[on_shmem_exit_index].function = function;
    on_shmem_exit_list[on_shmem_exit_index].arg = arg;
 
    ++on_shmem_exit_index;
 
-   return (0);
+   return 0;
 }
 
 /* ----------------------------------------------------------------
@@ -327,7 +327,7 @@ IpcSemaphoreCreate(IpcSemaphoreKey semKey,
    if (semNum > IPC_NMAXSEM || semNum <= 0)
    {
        *status = IpcInvalidArgument;
-       return (2);             /* returns the number of the invalid
+       return 2;               /* returns the number of the invalid
                                 * argument   */
    }
 
@@ -378,7 +378,7 @@ IpcSemaphoreCreate(IpcSemaphoreKey semKey,
    fflush(stdout);
    fflush(stderr);
 #endif
-   return (semId);
+   return semId;
 }
 
 
@@ -560,13 +560,13 @@ IpcMemoryCreate(IpcMemoryKey memKey, uint32 size, int permission)
        EPRINTF("IpcMemoryCreate: shmget failed (%s) "
                "key=%d, size=%d, permission=%o",
                strerror(errno), memKey, size, permission);
-       return (IpcMemCreationFailed);
+       return IpcMemCreationFailed;
    }
 
    /* if (memKey == PrivateIPCKey) */
    on_shmem_exit(IPCPrivateMemoryKill, (caddr_t) shmid);
 
-   return (shmid);
+   return shmid;
 }
 
 /****************************************************************************/
@@ -585,10 +585,10 @@ IpcMemoryIdGet(IpcMemoryKey memKey, uint32 size)
        EPRINTF("IpcMemoryIdGet: shmget failed (%s) "
                "key=%d, size=%d, permission=%o",
                strerror(errno), memKey, size, 0);
-       return (IpcMemIdGetFailed);
+       return IpcMemIdGetFailed;
    }
 
-   return (shmid);
+   return shmid;
 }
 
 /****************************************************************************/
@@ -625,13 +625,13 @@ IpcMemoryAttach(IpcMemoryId memId)
    {
        EPRINTF("IpcMemoryAttach: shmat failed (%s) id=%d",
                strerror(errno), memId);
-       return (IpcMemAttachFailed);
+       return IpcMemAttachFailed;
    }
 
    if (!UsePrivateMemory)
        on_shmem_exit(IpcMemoryDetach, (caddr_t) memAddress);
 
-   return ((char *) memAddress);
+   return (char *) memAddress;
 }
 
 
@@ -729,7 +729,7 @@ AttachSLockMemory(IPCKey key)
 bool
 LockIsFree(int lockid)
 {
-   return (SLockArray[lockid].flag == NOLOCK);
+   return SLockArray[lockid].flag == NOLOCK;
 }
 
 #endif
index 330b52731648c618d339471d35cde356977b0ab6..f6ce9eda241a6cbbc57a2e80de0e663db88741cb 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipci.c,v 1.15 1998/06/27 15:47:44 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipci.c,v 1.16 1998/09/01 03:25:10 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -34,7 +34,7 @@ SystemPortAddressCreateIPCKey(SystemPortAddress address)
 {
    Assert(address < 32768);    /* XXX */
 
-   return (SystemPortAddressGetIPCKey(address));
+   return SystemPortAddressGetIPCKey(address);
 }
 
 /*
index 4c74c836aeff3244d67956178f76749117a7189d..f8f45aa4364b53cc561399a8ab834e3dcab222b3 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.29 1998/07/27 19:38:10 vadim Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.30 1998/09/01 03:25:11 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -171,7 +171,7 @@ InitShmem(unsigned int key, unsigned int size)
    if (sharedRegion == NULL)
    {
        elog(FATAL, "AttachSharedRegion: couldn't attach to shmem\n");
-       return (FALSE);
+       return FALSE;
    }
 
    /* get pointers to the dimensions of shared memory */
@@ -195,7 +195,7 @@ InitShmem(unsigned int key, unsigned int size)
     * allocator and shmem index.
     */
    if (!InitSpinLocks(ShmemBootstrap, IPCKeyGetSpinLockSemaphoreKey(key)))
-       return (FALSE);
+       return FALSE;
 
    /*
     * We have just allocated additional space for two spinlocks. Now
@@ -223,7 +223,7 @@ InitShmem(unsigned int key, unsigned int size)
    if (!ShmemIndex)
    {
        elog(FATAL, "InitShmem: couldn't initialize Shmem Index");
-       return (FALSE);
+       return FALSE;
    }
 
    /*
@@ -241,7 +241,7 @@ InitShmem(unsigned int key, unsigned int size)
    if (!result)
    {
        elog(FATAL, "InitShmem: corrupted shmem index");
-       return (FALSE);
+       return FALSE;
    }
 
    if (!found)
@@ -267,7 +267,7 @@ InitShmem(unsigned int key, unsigned int size)
 
    Assert(result->location == MAKE_OFFSET(ShmemIndex->hctl));
 
-   return (TRUE);
+   return TRUE;
 }
 
 /*
@@ -312,7 +312,7 @@ ShmemAlloc(unsigned long size)
 
    if (!newSpace)
        elog(NOTICE, "ShmemAlloc: out of memory ");
-   return (newSpace);
+   return newSpace;
 }
 
 /*
@@ -323,7 +323,7 @@ ShmemAlloc(unsigned long size)
 int
 ShmemIsValid(unsigned long addr)
 {
-   return ((addr < ShmemEnd) && (addr >= ShmemBase));
+   return (addr < ShmemEnd) && (addr >= ShmemBase);
 }
 
 /*
@@ -366,7 +366,7 @@ ShmemInitHash(char *name,       /* table string name for shmem index */
     * message since they have more information
     */
    if (location == NULL)
-       return (0);
+       return 0;
 
    /*
     * it already exists, attach to it rather than allocate and initialize
@@ -381,7 +381,7 @@ ShmemInitHash(char *name,       /* table string name for shmem index */
    /* directory for hash lookup */
    infoP->dir = (long *) (location + sizeof(HHDR));
 
-   return (hash_create(init_size, infoP, hash_flags));;
+   return hash_create(init_size, infoP, hash_flags);;
 }
 
 /*
@@ -414,7 +414,7 @@ ShmemPIDLookup(int pid, SHMEM_OFFSET *locationPtr)
 
        SpinRelease(ShmemIndexLock);
        elog(ERROR, "ShmemInitPID: ShmemIndex corrupted");
-       return (FALSE);
+       return FALSE;
 
    }
 
@@ -424,7 +424,7 @@ ShmemPIDLookup(int pid, SHMEM_OFFSET *locationPtr)
        result->location = *locationPtr;
 
    SpinRelease(ShmemIndexLock);
-   return (TRUE);
+   return TRUE;
 }
 
 /*
@@ -461,14 +461,14 @@ ShmemPIDDestroy(int pid)
    {
 
        elog(ERROR, "ShmemPIDDestroy: PID table corrupted");
-       return (INVALID_OFFSET);
+       return INVALID_OFFSET;
 
    }
 
    if (found)
-       return (location);
+       return location;
    else
-       return (INVALID_OFFSET);
+       return INVALID_OFFSET;
 }
 
 /*
@@ -516,14 +516,14 @@ ShmemInitStruct(char *name, unsigned long size, bool *foundPtr)
            /* in POSTMASTER/Single process */
 
            *foundPtr = FALSE;
-           return ((long *) ShmemAlloc(size));
+           return (long *) ShmemAlloc(size);
        }
        else
        {
            Assert(ShmemIndexOffset);
 
            *foundPtr = TRUE;
-           return ((long *) MAKE_PTR(*ShmemIndexOffset));
+           return (long *) MAKE_PTR(*ShmemIndexOffset);
        }
 
 
@@ -540,7 +540,7 @@ ShmemInitStruct(char *name, unsigned long size, bool *foundPtr)
        SpinRelease(ShmemIndexLock);
 
        elog(ERROR, "ShmemInitStruct: Shmem Index corrupted");
-       return (NULL);
+       return NULL;
 
    }
    else if (*foundPtr)
@@ -556,7 +556,7 @@ ShmemInitStruct(char *name, unsigned long size, bool *foundPtr)
 
            elog(NOTICE, "ShmemInitStruct: ShmemIndex entry size is wrong");
            /* let caller print its message too */
-           return (NULL);
+           return NULL;
        }
        structPtr = (long *) MAKE_PTR(result->location);
    }
@@ -574,7 +574,7 @@ ShmemInitStruct(char *name, unsigned long size, bool *foundPtr)
 
            elog(NOTICE, "ShmemInitStruct: cannot allocate '%s'",
                 name);
-           return (NULL);
+           return NULL;
        }
        result->size = size;
        result->location = MAKE_OFFSET(structPtr);
@@ -582,7 +582,7 @@ ShmemInitStruct(char *name, unsigned long size, bool *foundPtr)
    Assert(ShmemIsValid((unsigned long) structPtr));
 
    SpinRelease(ShmemIndexLock);
-   return (structPtr);
+   return structPtr;
 }
 
 /*
@@ -607,7 +607,7 @@ TransactionIdIsInProgress(TransactionId xid)
        if (result == (ShmemIndexEnt *) TRUE)
        {
            SpinRelease(ShmemIndexLock);
-           return (false);
+           return false;
        }
        if (result->location == INVALID_OFFSET ||
            strncmp(result->key, "PID ", 4) != 0)
@@ -616,13 +616,13 @@ TransactionIdIsInProgress(TransactionId xid)
        if (proc->xid == xid)
        {
            SpinRelease(ShmemIndexLock);
-           return (true);
+           return true;
        }
    }
 
    SpinRelease(ShmemIndexLock);
    elog(ERROR, "TransactionIdIsInProgress: ShmemIndex corrupted");
-   return (false);
+   return false;
 }
 
 #ifdef LowLevelLocking
@@ -665,7 +665,7 @@ GetSnapshotData(bool serialized)
                MyProc->xmin = snapshot->xmin;
            SpinRelease(ShmemIndexLock);
            snapshot->xip[count] = InvalidTransactionId;
-           return (snapshot);
+           return snapshot;
        }
        if (result->location == INVALID_OFFSET ||
            strncmp(result->key, "PID ", 4) != 0)
@@ -693,6 +693,6 @@ GetSnapshotData(bool serialized)
    free(snapshot->xip);
    free(snapshot);
    elog(ERROR, "GetSnapshotData: ShmemIndex corrupted");
-   return (NULL);
+   return NULL;
 }
 #endif
index c3156fbb35b10a48ef20c1eb5b531d3cf9f89898..95ebfd01360672393e758d33118c8205cb00cbd6 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmqueue.c,v 1.7 1998/07/20 16:56:54 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmqueue.c,v 1.8 1998/09/01 03:25:13 momjian Exp $
  *
  * NOTES
  *
@@ -54,7 +54,7 @@ bool
 SHMQueueIsDetached(SHM_QUEUE *queue)
 {
    Assert(SHM_PTR_VALID(queue));
-   return ((queue)->prev == INVALID_OFFSET);
+   return (queue)->prev == INVALID_OFFSET;
 }
 
 #endif
@@ -250,7 +250,7 @@ SHMQueueEmpty(SHM_QUEUE *queue)
    if (queue->prev == MAKE_OFFSET(queue))
    {
        Assert(queue->next = MAKE_OFFSET(queue));
-       return (TRUE);
+       return TRUE;
    }
-   return (FALSE);
+   return FALSE;
 }
index 5ddaf3725b193b5ace3086156699d53c27cf46a6..adfa1757d9b066c8c3c45766a1b50041022c7236 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinvaladt.c,v 1.13 1998/08/25 21:31:18 scrappy Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinvaladt.c,v 1.14 1998/09/01 03:25:14 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -170,7 +170,7 @@ SIAssignBackendId(SISeg *segInOutP, BackendTag backendTag)
 
    stateP->tag = backendTag;
 
-   return (1 + stateP - &segInOutP->procState[0]);
+   return 1 + stateP - &segInOutP->procState[0];
 }
 
 
@@ -232,7 +232,7 @@ SIComputeSize(int *segSize)
    oP->startSegment = A;
    oP->offsetToFirstEntry = a; /* relatiove to A */
    oP->offsetToEndOfSegemnt = totalSize;       /* relative to A */
-   return (oP);
+   return oP;
 }
 
 
@@ -251,7 +251,7 @@ SISetStartEntrySection(SISeg *segP, Offset offset)
 static Offset
 SIGetStartEntrySection(SISeg *segP)
 {
-   return (segP->startEntrySection);
+   return segP->startEntrySection;
 }
 
 
@@ -279,7 +279,7 @@ SISetEndEntryChain(SISeg *segP, Offset offset)
 static Offset
 SIGetEndEntryChain(SISeg *segP)
 {
-   return (segP->endEntryChain);
+   return segP->endEntryChain;
 }
 
 /************************************************************************/
@@ -297,7 +297,7 @@ SISetStartEntryChain(SISeg *segP, Offset offset)
 static Offset
 SIGetStartEntryChain(SISeg *segP)
 {
-   return (segP->startEntryChain);
+   return segP->startEntryChain;
 }
 
 /************************************************************************/
@@ -309,11 +309,11 @@ SISetNumEntries(SISeg *segP, int num)
    if (num <= MAXNUMMESSAGES)
    {
        segP->numEntries = num;
-       return (true);
+       return true;
    }
    else
    {
-       return (false);         /* table full */
+       return false;           /* table full */
    }
 }
 
@@ -323,7 +323,7 @@ SISetNumEntries(SISeg *segP, int num)
 static int
 SIGetNumEntries(SISeg *segP)
 {
-   return (segP->numEntries);
+   return segP->numEntries;
 }
 
 
@@ -336,11 +336,11 @@ SISetMaxNumEntries(SISeg *segP, int num)
    if (num <= MAXNUMMESSAGES)
    {
        segP->maxNumEntries = num;
-       return (true);
+       return true;
    }
    else
    {
-       return (false);         /* wrong number */
+       return false;           /* wrong number */
    }
 }
 
@@ -351,7 +351,7 @@ SISetMaxNumEntries(SISeg *segP, int num)
 static int
 SIGetProcStateLimit(SISeg *segP, int i)
 {
-   return (segP->procState[i].limit);
+   return segP->procState[i].limit;
 }
 
 /************************************************************************/
@@ -376,11 +376,11 @@ SIIncNumEntries(SISeg *segP, int num)
    if ((segP->numEntries + num) <= MAXNUMMESSAGES)
    {
        segP->numEntries = segP->numEntries + num;
-       return (true);
+       return true;
    }
    else
    {
-       return (false);         /* table full */
+       return false;           /* table full */
    }
 }
 
@@ -393,11 +393,11 @@ SIDecNumEntries(SISeg *segP, int num)
    if ((segP->numEntries - num) >= 0)
    {
        segP->numEntries = segP->numEntries - num;
-       return (true);
+       return true;
    }
    else
    {
-       return (false);         /* not enough entries in table */
+       return false;           /* not enough entries in table */
    }
 }
 
@@ -416,7 +416,7 @@ SISetStartFreeSpace(SISeg *segP, Offset offset)
 static Offset
 SIGetStartFreeSpace(SISeg *segP)
 {
-   return (segP->startFreeSpace);
+   return segP->startFreeSpace;
 }
 
 
@@ -433,12 +433,12 @@ SIGetFirstDataEntry(SISeg *segP)
    startChain = SIGetStartEntryChain(segP);
 
    if (startChain == InvalidOffset)
-       return (NULL);
+       return NULL;
 
    eP = (SISegEntry *) ((Pointer) segP +
                         SIGetStartEntrySection(segP) +
                         startChain);
-   return (eP);
+   return eP;
 }
 
 
@@ -454,12 +454,12 @@ SIGetLastDataEntry(SISeg *segP)
    endChain = SIGetEndEntryChain(segP);
 
    if (endChain == InvalidOffset)
-       return (NULL);
+       return NULL;
 
    eP = (SISegEntry *) ((Pointer) segP +
                         SIGetStartEntrySection(segP) +
                         endChain);
-   return (eP);
+   return eP;
 }
 
 /************************************************************************/
@@ -471,12 +471,12 @@ SIGetNextDataEntry(SISeg *segP, Offset offset)
    SISegEntry *eP;
 
    if (offset == InvalidOffset)
-       return (NULL);
+       return NULL;
 
    eP = (SISegEntry *) ((Pointer) segP +
                         SIGetStartEntrySection(segP) +
                         offset);
-   return (eP);
+   return eP;
 }
 
 
@@ -491,7 +491,7 @@ SIGetNthDataEntry(SISeg *segP,
    int         i;
 
    if (n <= 0)
-       return (NULL);
+       return NULL;
 
    eP = SIGetFirstDataEntry(segP);
    for (i = 1; i < n; i++)
@@ -500,7 +500,7 @@ SIGetNthDataEntry(SISeg *segP,
        eP = SIGetNextDataEntry(segP, eP->next);
    }
 
-   return (eP);
+   return eP;
 }
 
 /************************************************************************/
@@ -527,7 +527,7 @@ SISetDataEntry(SISeg *segP, SharedInvalidData *data)
               *lastP;
 
    if (!SIIncNumEntries(segP, 1))
-       return (false);         /* no space */
+       return false;           /* no space */
 
    /* get a free entry */
    offsetToNewData = SIGetStartFreeSpace(segP);
@@ -551,7 +551,7 @@ SISetDataEntry(SISeg *segP, SharedInvalidData *data)
        lastP->next = SIEntryOffset(segP, eP);
    }
    SISetEndEntryChain(segP, SIEntryOffset(segP, eP));
-   return (true);
+   return true;
 }
 
 
@@ -591,7 +591,7 @@ SIDelDataEntry(SISeg *segP)
    if (!SIDecNumEntries(segP, 1))
    {
        /* no entries in buffer */
-       return (false);
+       return false;
    }
 
    e1P = SIGetFirstDataEntry(segP);
@@ -606,7 +606,7 @@ SIDelDataEntry(SISeg *segP)
    e1P->next = SIGetStartFreeSpace(segP);
    SISetStartFreeSpace(segP, SIEntryOffset(segP, e1P));
    SIDecProcLimit(segP, 1);
-   return (true);
+   return true;
 }
 
 
@@ -794,7 +794,7 @@ SISegmentGet(int key,           /* the corresponding key for the segment */
        shmid = IpcMemoryCreate(key, size, IPCProtection);
    else
        shmid = IpcMemoryIdGet(key, size);
-   return (shmid);
+   return shmid;
 }
 
 /************************************************************************/
@@ -844,7 +844,7 @@ SISegmentInit(bool killExistingSegment, IPCKey key)
        if (shmId < 0)
        {
            perror("SISegmentGet: failed");
-           return (-1);        /* an error */
+           return -1;      /* an error */
        }
 
        /* Attach the shared cache invalidation  segment */
@@ -862,10 +862,10 @@ SISegmentInit(bool killExistingSegment, IPCKey key)
        if (shmId < 0)
        {
            perror("SISegmentGet: getting an existent segment failed");
-           return (-1);        /* an error */
+           return -1;      /* an error */
        }
        /* Attach the shared cache invalidation segment */
        SISegmentAttach(shmId);
    }
-   return (1);
+   return 1;
 }
index 7f8986e411a873571c30702b7153640c1726b37e..398815fe188d999e8775a9cca8ec60e726c1dc1a 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/spin.c,v 1.15 1998/08/25 21:34:03 scrappy Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/spin.c,v 1.16 1998/09/01 03:25:15 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -47,7 +47,7 @@ bool
 CreateSpinlocks(IPCKey key)
 {
    /* the spin lock shared memory must have been created by now */
-   return (TRUE);
+   return TRUE;
 }
 
 bool
@@ -78,7 +78,7 @@ InitSpinLocks(int init, IPCKey key)
    MMCacheLock = (SPINLOCK) MMCACHELOCKID;
 #endif
 
-   return (TRUE);
+   return TRUE;
 }
 
 #ifdef LOCKDEBUG
@@ -217,7 +217,7 @@ SpinIsLocked(SPINLOCK lock)
    int         semval;
 
    semval = IpcSemaphoreGetValue(SpinLockId, lock);
-   return (semval < IpcSemaphoreDefaultStartValue);
+   return semval < IpcSemaphoreDefaultStartValue;
 }
 
 /*
@@ -245,11 +245,11 @@ CreateSpinlocks(IPCKey key)
    if (semid >= 0)
    {
        SpinLockId = semid;
-       return (TRUE);
+       return TRUE;
    }
    /* cannot create spinlocks */
    elog(FATAL, "CreateSpinlocks: cannot create spin locks");
-   return (FALSE);
+   return FALSE;
 }
 
 /*
@@ -270,10 +270,10 @@ AttachSpinLocks(IPCKey key)
        }
        /* cannot create spinlocks */
        elog(FATAL, "AttachSpinlocks: cannot create spin locks");
-       return (FALSE);
+       return FALSE;
    }
    SpinLockId = id;
-   return (TRUE);
+   return TRUE;
 }
 
 /*
@@ -314,7 +314,7 @@ InitSpinLocks(int init, IPCKey key)
        if (!AttachSpinLocks(key))
        {
            elog(FATAL, "InitSpinLocks: couldnt attach spin locks");
-           return (FALSE);
+           return FALSE;
        }
    }
 
@@ -331,7 +331,7 @@ InitSpinLocks(int init, IPCKey key)
    MMCacheLock = (SPINLOCK) MMCACHELOCKID;
 #endif
 
-   return (TRUE);
+   return TRUE;
 }
 
 #endif                         /* HAS_TEST_AND_SET */
index 392fe5b0985888722932a20f0bafd77015f107f8..91f3f9e21f843dc7de43a1093bcd5578e4339444 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.36 1998/08/27 01:04:22 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.37 1998/09/01 03:25:17 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -197,8 +197,8 @@ inv_create(int flags)
    retval->heap_r = r;
    retval->index_r = indr;
    retval->iscan = (IndexScanDesc) NULL;
-   retval->hdesc = RelationGetTupleDescriptor(r);
-   retval->idesc = RelationGetTupleDescriptor(indr);
+   retval->hdesc = RelationGetDescr(r);
+   retval->idesc = RelationGetDescr(indr);
    retval->offset = retval->lowbyte =
        retval->highbyte = 0;
    ItemPointerSetInvalid(&(retval->htid));
@@ -215,7 +215,7 @@ inv_create(int flags)
    }
    retval->flags |= IFS_ATEOF;
 
-   return (retval);
+   return retval;
 }
 
 LargeObjectDesc *
@@ -229,7 +229,7 @@ inv_open(Oid lobjId, int flags)
    r = heap_open(lobjId);
 
    if (!RelationIsValid(r))
-       return ((LargeObjectDesc *) NULL);
+       return (LargeObjectDesc *) NULL;
 
    indname = pstrdup((r->rd_rel->relname).data);
 
@@ -242,15 +242,15 @@ inv_open(Oid lobjId, int flags)
    indrel = index_openr(indname);
 
    if (!RelationIsValid(indrel))
-       return ((LargeObjectDesc *) NULL);
+       return (LargeObjectDesc *) NULL;
 
    retval = (LargeObjectDesc *) palloc(sizeof(LargeObjectDesc));
 
    retval->heap_r = r;
    retval->index_r = indrel;
    retval->iscan = (IndexScanDesc) NULL;
-   retval->hdesc = RelationGetTupleDescriptor(r);
-   retval->idesc = RelationGetTupleDescriptor(indrel);
+   retval->hdesc = RelationGetDescr(r);
+   retval->idesc = RelationGetDescr(indrel);
    retval->offset = retval->lowbyte = retval->highbyte = 0;
    ItemPointerSetInvalid(&(retval->htid));
 
@@ -265,7 +265,7 @@ inv_open(Oid lobjId, int flags)
        retval->flags = IFS_RDLOCK;
    }
 
-   return (retval);
+   return retval;
 }
 
 /*
@@ -348,7 +348,7 @@ inv_stat(LargeObjectDesc *obj_desc, struct pgstat * stbuf)
    /* we have no good way of computing access times right now */
    stbuf->st_atime_s = stbuf->st_mtime_s = stbuf->st_ctime_s = 0;
 
-   return (0);
+   return 0;
 }
 
 #endif
@@ -365,7 +365,7 @@ inv_seek(LargeObjectDesc *obj_desc, int offset, int whence)
    if (whence == SEEK_CUR)
    {
        offset += obj_desc->offset;     /* calculate absolute position */
-       return (inv_seek(obj_desc, offset, SEEK_SET));
+       return inv_seek(obj_desc, offset, SEEK_SET);
    }
 
    /*
@@ -383,7 +383,7 @@ inv_seek(LargeObjectDesc *obj_desc, int offset, int whence)
        offset += _inv_getsize(obj_desc->heap_r,
                               obj_desc->hdesc,
                               obj_desc->index_r);
-       return (inv_seek(obj_desc, offset, SEEK_SET));
+       return inv_seek(obj_desc, offset, SEEK_SET);
    }
 
    /*
@@ -400,7 +400,7 @@ inv_seek(LargeObjectDesc *obj_desc, int offset, int whence)
        && offset <= obj_desc->highbyte
        && oldOffset <= obj_desc->highbyte
        && obj_desc->iscan != (IndexScanDesc) NULL)
-       return (offset);
+       return offset;
 
    /*
     * To do a seek on an inversion file, we start an index scan that will
@@ -427,7 +427,7 @@ inv_seek(LargeObjectDesc *obj_desc, int offset, int whence)
                                          &skey);
    }
 
-   return (offset);
+   return offset;
 }
 
 int
@@ -435,7 +435,7 @@ inv_tell(LargeObjectDesc *obj_desc)
 {
    Assert(PointerIsValid(obj_desc));
 
-   return (obj_desc->offset);
+   return obj_desc->offset;
 }
 
 int
@@ -454,7 +454,7 @@ inv_read(LargeObjectDesc *obj_desc, char *buf, int nbytes)
 
    /* if we're already at EOF, we don't need to do any work here */
    if (obj_desc->flags & IFS_ATEOF)
-       return (0);
+       return 0;
 
    /* make sure we obey two-phase locking */
    if (!(obj_desc->flags & IFS_RDLOCK))
@@ -497,7 +497,7 @@ inv_read(LargeObjectDesc *obj_desc, char *buf, int nbytes)
        obj_desc->offset += ncopy;
    }
 
-   return (nread);
+   return nread;
 }
 
 int
@@ -560,7 +560,7 @@ inv_write(LargeObjectDesc *obj_desc, char *buf, int nbytes)
    }
 
    /* that's it */
-   return (nwritten);
+   return nwritten;
 }
 
 /*
@@ -650,7 +650,7 @@ inv_fetchtup(LargeObjectDesc *obj_desc, Buffer *buffer)
            if (res == (RetrieveIndexResult) NULL)
            {
                ItemPointerSetInvalid(&(obj_desc->htid));
-               return ((HeapTuple) NULL);
+               return (HeapTuple) NULL;
            }
 
            /*
@@ -791,7 +791,7 @@ inv_wrnew(LargeObjectDesc *obj_desc, char *buf, int nbytes)
    /* new tuple is inserted */
    WriteBuffer(buffer);
 
-   return (nwritten);
+   return nwritten;
 }
 
 static int
@@ -836,7 +836,7 @@ inv_wrold(LargeObjectDesc *obj_desc,
        && obj_desc->lowbyte + nbytes >= obj_desc->highbyte)
    {
        WriteBuffer(buffer);
-       return (inv_wrnew(obj_desc, dbuf, nbytes));
+       return inv_wrnew(obj_desc, dbuf, nbytes);
    }
 
    /*
@@ -974,7 +974,7 @@ inv_wrold(LargeObjectDesc *obj_desc,
        WriteBuffer(newbuf);
 
    /* done */
-   return (nwritten);
+   return nwritten;
 }
 
 static HeapTuple
@@ -1092,7 +1092,7 @@ inv_newtuple(LargeObjectDesc *obj_desc,
    obj_desc->highbyte = obj_desc->offset + nwrite - 1;
 
    /* new tuple is filled -- return it */
-   return (ntup);
+   return ntup;
 }
 
 static void
@@ -1199,7 +1199,7 @@ ItemPointerFormExternal(ItemPointer pointer)
                    ItemPointerGetOffsetNumber(pointer));
        }
 
-       return (itemPointerString);
+       return itemPointerString;
 }
 */
 
@@ -1230,7 +1230,7 @@ _inv_getsize(Relation hreln, TupleDesc hdesc, Relation ireln)
        {
            index_endscan(iscan);
            pfree(iscan);
-           return (0);
+           return 0;
        }
 
        /*
@@ -1251,5 +1251,5 @@ _inv_getsize(Relation hreln, TupleDesc hdesc, Relation ireln)
    size = DatumGetInt32(d) + 1;
    ReleaseBuffer(buffer);
    
-   return (size);
+   return size;
 }
index 52ddd635832e6a2ebc044044225b9234545ddd34..2456b2a668376ba4c81417b19e1c7a394836dd27 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.34 1998/08/28 12:08:03 scrappy Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.35 1998/09/01 03:25:19 momjian Exp $
  *
  * NOTES
  *   Outside modules can create a lock table and acquire/release
@@ -275,7 +275,7 @@ LockMethodTableInit(char *tabName,
    {
        elog(NOTICE, "LockMethodTableInit: too many lock types %d greater than %d",
             numModes, MAX_LOCKMODES);
-       return (INVALID_LOCKMETHOD);
+       return INVALID_LOCKMETHOD;
    }
 
    /* allocate a string for the shmem index table lookup */
@@ -283,7 +283,7 @@ LockMethodTableInit(char *tabName,
    if (!shmemName)
    {
        elog(NOTICE, "LockMethodTableInit: couldn't malloc string %s \n", tabName);
-       return (INVALID_LOCKMETHOD);
+       return INVALID_LOCKMETHOD;
    }
 
    /* each lock table has a non-shared header */
@@ -292,7 +292,7 @@ LockMethodTableInit(char *tabName,
    {
        elog(NOTICE, "LockMethodTableInit: couldn't malloc lock table %s\n", tabName);
        pfree(shmemName);
-       return (INVALID_LOCKMETHOD);
+       return INVALID_LOCKMETHOD;
    }
 
    /* ------------------------
@@ -393,9 +393,9 @@ LockMethodTableInit(char *tabName,
    pfree(shmemName);
 
    if (status)
-       return (lockMethodTable->ctl->lockmethod);
+       return lockMethodTable->ctl->lockmethod;
    else
-       return (INVALID_LOCKMETHOD);
+       return INVALID_LOCKMETHOD;
 }
 
 /*
@@ -417,16 +417,16 @@ LockMethodTableRename(LOCKMETHOD lockmethod)
    LOCKMETHOD newLockMethod;
 
    if (NumLockMethods >= MAX_LOCK_METHODS)
-       return (INVALID_LOCKMETHOD);
+       return INVALID_LOCKMETHOD;
    if (LockMethodTable[lockmethod] == INVALID_LOCKMETHOD)
-       return (INVALID_LOCKMETHOD);
+       return INVALID_LOCKMETHOD;
 
    /* other modules refer to the lock table by a lockmethod */
    newLockMethod = NumLockMethods;
    NumLockMethods++;
 
    LockMethodTable[newLockMethod] = LockMethodTable[lockmethod];
-   return (newLockMethod);
+   return newLockMethod;
 }
 
 /*
@@ -522,11 +522,11 @@ LockAcquire(LOCKMETHOD lockmethod, LOCKTAG *locktag, LOCKMODE lockmode)
    if (!lockMethodTable)
    {
        elog(NOTICE, "LockAcquire: bad lock table %d", lockmethod);
-       return (FALSE);
+       return FALSE;
    }
 
    if (LockingIsDisabled)
-       return (TRUE);
+       return TRUE;
 
    masterLock = lockMethodTable->ctl->masterLock;
 
@@ -542,7 +542,7 @@ LockAcquire(LOCKMETHOD lockmethod, LOCKTAG *locktag, LOCKMODE lockmode)
    {
        SpinRelease(masterLock);
        elog(FATAL, "LockAcquire: lock table %d is corrupted", lockmethod);
-       return (FALSE);
+       return FALSE;
    }
 
    /* --------------------
@@ -606,7 +606,7 @@ LockAcquire(LOCKMETHOD lockmethod, LOCKTAG *locktag, LOCKMODE lockmode)
    if (!result)
    {
        elog(NOTICE, "LockAcquire: xid table corrupted");
-       return (STATUS_ERROR);
+       return STATUS_ERROR;
    }
 
    /*
@@ -649,7 +649,7 @@ LockAcquire(LOCKMETHOD lockmethod, LOCKTAG *locktag, LOCKMODE lockmode)
        Assert((result->nHolding > 0) && (result->holders[lockmode] > 0));
        GrantLock(lock, lockmode);
        SpinRelease(masterLock);
-       return (TRUE);
+       return TRUE;
    }
 
    status = LockResolveConflicts(lockmethod, lock, lockmode, xid, result);
@@ -682,7 +682,7 @@ LockAcquire(LOCKMETHOD lockmethod, LOCKTAG *locktag, LOCKMODE lockmode)
            Assert((lock->nHolding > 0) && (lock->holders[lockmode] >= 0));
            Assert(lock->nActive <= lock->nHolding);
            SpinRelease(masterLock);
-           return (FALSE);
+           return FALSE;
        }
 #endif
        status = WaitOnLock(lockmethod, lock, lockmode, xid);
@@ -694,7 +694,7 @@ LockAcquire(LOCKMETHOD lockmethod, LOCKTAG *locktag, LOCKMODE lockmode)
            XID_PRINT_AUX("LockAcquire: INCONSISTENT ", result);
            LOCK_PRINT_AUX("LockAcquire: INCONSISTENT ", lock, lockmode);
            /* Should we retry ? */
-           return (FALSE);
+           return FALSE;
        }
        XID_PRINT("LockAcquire: granted", result);
        LOCK_PRINT("LockAcquire: granted", lock, lockmode);
@@ -702,7 +702,7 @@ LockAcquire(LOCKMETHOD lockmethod, LOCKTAG *locktag, LOCKMODE lockmode)
 
    SpinRelease(masterLock);
 
-   return (status == STATUS_OK);
+   return status == STATUS_OK;
 }
 
 /* ----------------------------
@@ -784,7 +784,7 @@ LockResolveConflicts(LOCKMETHOD lockmethod,
        if (!result)
        {
            elog(NOTICE, "LockResolveConflicts: xid table corrupted");
-           return (STATUS_ERROR);
+           return STATUS_ERROR;
        }
 
        /*
@@ -845,7 +845,7 @@ LockResolveConflicts(LOCKMETHOD lockmethod,
        result->nHolding++;
        XID_PRINT("LockResolveConflicts: no conflict", result);
        Assert((result->nHolding > 0) && (result->holders[lockmode] > 0));
-       return (STATUS_OK);
+       return STATUS_OK;
    }
 
    /* ------------------------
@@ -877,11 +877,11 @@ LockResolveConflicts(LOCKMETHOD lockmethod,
        result->nHolding++;
        XID_PRINT("LockResolveConflicts: resolved", result);
        Assert((result->nHolding > 0) && (result->holders[lockmode] > 0));
-       return (STATUS_OK);
+       return STATUS_OK;
    }
 
    XID_PRINT("LockResolveConflicts: conflicting", result);
-   return (STATUS_FOUND);
+   return STATUS_FOUND;
 }
 
 /*
@@ -951,7 +951,7 @@ WaitOnLock(LOCKMETHOD lockmethod, LOCK *lock, LOCKMODE lockmode,
 
    PS_SET_STATUS(old_status);
    LOCK_PRINT_AUX("WaitOnLock: wakeup on lock", lock, lockmode);
-   return (STATUS_OK);
+   return STATUS_OK;
 }
 
 /*
@@ -1007,11 +1007,11 @@ LockRelease(LOCKMETHOD lockmethod, LOCKTAG *locktag, LOCKMODE lockmode)
    if (!lockMethodTable)
    {
        elog(NOTICE, "lockMethodTable is null in LockRelease");
-       return (FALSE);
+       return FALSE;
    }
 
    if (LockingIsDisabled)
-       return (TRUE);
+       return TRUE;
 
    masterLock = lockMethodTable->ctl->masterLock;
    SpinAcquire(masterLock);
@@ -1030,7 +1030,7 @@ LockRelease(LOCKMETHOD lockmethod, LOCKTAG *locktag, LOCKMODE lockmode)
    {
        SpinRelease(masterLock);
        elog(NOTICE, "LockRelease: locktable corrupted");
-       return (FALSE);
+       return FALSE;
    }
 
    if (!found)
@@ -1039,11 +1039,11 @@ LockRelease(LOCKMETHOD lockmethod, LOCKTAG *locktag, LOCKMODE lockmode)
 #ifdef USER_LOCKS
        if (is_user_lock) {
            TPRINTF(TRACE_USERLOCKS, "LockRelease: no lock with this tag");
-           return (FALSE);
+           return FALSE;
        }
 #endif
        elog(NOTICE, "LockRelease: locktable lookup failed, no lock");
-       return (FALSE);
+       return FALSE;
    }
    LOCK_PRINT("LockRelease: found", lock, lockmode);
    Assert((lock->nHolding > 0) && (lock->holders[lockmode] >= 0));
@@ -1089,7 +1089,7 @@ LockRelease(LOCKMETHOD lockmethod, LOCKTAG *locktag, LOCKMODE lockmode)
        } else
 #endif
        elog(NOTICE, "LockReplace: xid table corrupted");
-       return (FALSE);
+       return FALSE;
    }
    XID_PRINT("LockRelease: found", result);
    Assert(result->tag.lock == MAKE_OFFSET(lock));
@@ -1104,7 +1104,7 @@ LockRelease(LOCKMETHOD lockmethod, LOCKTAG *locktag, LOCKMODE lockmode)
        elog(NOTICE, "LockRelease: you don't own a lock of type %s",
             lock_types[lockmode]);
        Assert(result->holders[lockmode] >= 0);
-       return (FALSE);
+       return FALSE;
    }
    Assert(result->nHolding > 0);
 
@@ -1184,7 +1184,7 @@ LockRelease(LOCKMETHOD lockmethod, LOCKTAG *locktag, LOCKMODE lockmode)
        {
            SpinRelease(masterLock);
            elog(NOTICE, "LockRelease: remove xid, table corrupted");
-           return (FALSE);
+           return FALSE;
        }
    }
 
@@ -1204,7 +1204,7 @@ LockRelease(LOCKMETHOD lockmethod, LOCKTAG *locktag, LOCKMODE lockmode)
    }
 
    SpinRelease(masterLock);
-   return (TRUE);
+   return TRUE;
 }
 
 /*
@@ -1247,7 +1247,7 @@ LockReleaseAll(LOCKMETHOD lockmethod, SHM_QUEUE *lockQueue)
    lockMethodTable = LockMethodTable[lockmethod];
    if (!lockMethodTable) {
        elog(NOTICE, "LockAcquire: bad lockmethod %d", lockmethod);
-       return (FALSE);
+       return FALSE;
    }
 
    if (SHMQueueEmpty(lockQueue))
@@ -1406,7 +1406,7 @@ LockReleaseAll(LOCKMETHOD lockmethod, SHM_QUEUE *lockQueue)
        {
            SpinRelease(masterLock);
            elog(NOTICE, "LockReleaseAll: xid table corrupted");
-           return (FALSE);
+           return FALSE;
        }
 
        if (!lock->nHolding)
@@ -1425,7 +1425,7 @@ LockReleaseAll(LOCKMETHOD lockmethod, SHM_QUEUE *lockQueue)
            {
                SpinRelease(masterLock);
                elog(NOTICE, "LockReleaseAll: cannot remove lock from HTAB");
-               return (FALSE);
+               return FALSE;
            }
        }
        else
@@ -1736,12 +1736,12 @@ LockOwners(LOCKMETHOD lockmethod, LOCKTAG *locktag)
    if (!lockMethodTable)
    {
        elog(NOTICE, "lockMethodTable is null in LockOwners");
-       return ((ArrayType *) &empty_array);
+       return (ArrayType *) &empty_array;
    }
 
    if (LockingIsDisabled)
    {
-       return ((ArrayType *) &empty_array);
+       return (ArrayType *) &empty_array;
    }
 
    masterLock = lockMethodTable->ctl->masterLock;
@@ -1761,7 +1761,7 @@ LockOwners(LOCKMETHOD lockmethod, LOCKTAG *locktag)
    {
        SpinRelease(masterLock);
        elog(NOTICE, "LockOwners: locktable corrupted");
-       return ((ArrayType *) &empty_array);
+       return (ArrayType *) &empty_array;
    }
 
    if (!found)
@@ -1770,11 +1770,11 @@ LockOwners(LOCKMETHOD lockmethod, LOCKTAG *locktag)
 #ifdef USER_LOCKS
        if (is_user_lock) {
            TPRINTF(TRACE_USERLOCKS, "LockOwners: no lock with this tag");
-           return ((ArrayType *) &empty_array);
+           return (ArrayType *) &empty_array;
        }
 #endif
        elog(NOTICE, "LockOwners: locktable lookup failed, no lock");
-       return ((ArrayType *) &empty_array);
+       return (ArrayType *) &empty_array;
    }
    LOCK_PRINT("LockOwners: found", lock, 0);
    Assert((lock->nHolding > 0) && (lock->nActive > 0));
@@ -1864,7 +1864,7 @@ LockOwners(LOCKMETHOD lockmethod, LOCKTAG *locktag)
    memmove((char *) array, (char *) &size, sizeof(int));
    memmove((char *) ARR_DIMS(array), (char *) hbounds, ndims * sizeof(int));
 
-   return (array);
+   return array;
 }
 
 #ifdef DEADLOCK_DEBUG
index 3887a8e37d16b7051cb739a8342b511d15db13d2..01d1a0f5fe173119945737c30657f257947a5fd7 100644 (file)
@@ -12,7 +12,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Attic/multi.c,v 1.23 1998/08/25 21:20:28 scrappy Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Attic/multi.c,v 1.24 1998/09/01 03:25:23 momjian Exp $
  *
  * NOTES:
  *  (1) The lock.c module assumes that the caller here is doing
@@ -188,7 +188,7 @@ MultiLockReln(LockInfo lockinfo, LOCKMODE lockmode)
    MemSet(&tag, 0, sizeof(tag));
    tag.relId = lockinfo->lockRelId.relId;
    tag.dbId = lockinfo->lockRelId.dbId;
-   return (MultiAcquire(MultiTableId, &tag, lockmode, RELN_LEVEL));
+   return MultiAcquire(MultiTableId, &tag, lockmode, RELN_LEVEL);
 }
 
 /*
@@ -215,7 +215,7 @@ MultiLockTuple(LockInfo lockinfo, ItemPointer tidPtr, LOCKMODE lockmode)
 
    /* not locking any valid Tuple, just the page */
    tag.tupleId = *tidPtr;
-   return (MultiAcquire(MultiTableId, &tag, lockmode, TUPLE_LEVEL));
+   return MultiAcquire(MultiTableId, &tag, lockmode, TUPLE_LEVEL);
 }
 
 /*
@@ -245,7 +245,7 @@ MultiLockPage(LockInfo lockinfo, ItemPointer tidPtr, LOCKMODE lockmode)
    tag.relId = lockinfo->lockRelId.relId;
    tag.dbId = lockinfo->lockRelId.dbId;
    BlockIdCopy(&(tag.tupleId.ip_blkid), &(tidPtr->ip_blkid));
-   return (MultiAcquire(MultiTableId, &tag, lockmode, PAGE_LEVEL));
+   return MultiAcquire(MultiTableId, &tag, lockmode, PAGE_LEVEL);
 }
 
 /*
@@ -295,7 +295,7 @@ MultiAcquire(LOCKMETHOD lockmethod,
            break;
        default:
            elog(ERROR, "MultiAcquire: bad lock level");
-           return (FALSE);
+           return FALSE;
    }
 
    /*
@@ -357,7 +357,7 @@ MultiAcquire(LOCKMETHOD lockmethod,
            }
        }
    }
-   return (retStatus);
+   return retStatus;
 }
 
 /* ------------------
@@ -382,7 +382,7 @@ MultiReleasePage(LockInfo lockinfo, ItemPointer tidPtr, LOCKMODE lockmode)
    tag.dbId = lockinfo->lockRelId.dbId;
    BlockIdCopy(&(tag.tupleId.ip_blkid), &(tidPtr->ip_blkid));
 
-   return (MultiRelease(MultiTableId, &tag, lockmode, PAGE_LEVEL));
+   return MultiRelease(MultiTableId, &tag, lockmode, PAGE_LEVEL);
 }
 
 #endif
@@ -406,7 +406,7 @@ MultiReleaseReln(LockInfo lockinfo, LOCKMODE lockmode)
    tag.relId = lockinfo->lockRelId.relId;
    tag.dbId = lockinfo->lockRelId.dbId;
 
-   return (MultiRelease(MultiTableId, &tag, lockmode, RELN_LEVEL));
+   return MultiRelease(MultiTableId, &tag, lockmode, RELN_LEVEL);
 }
 
 /*
index 4cd9602a8b51dae5ecf3beb29407761da02427fb..3fc242603159fea9d78cf5fda5813269b01c2787 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.41 1998/08/25 21:20:29 scrappy Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.42 1998/09/01 03:25:24 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -46,7 +46,7 @@
  *     This is so that we can support more backends. (system-wide semaphore
  *     sets run out pretty fast.)                -ay 4/95
  *
- * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.41 1998/08/25 21:20:29 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.42 1998/09/01 03:25:24 momjian Exp $
  */
 #include 
 #include 
@@ -312,7 +312,7 @@ ProcRemove(int pid)
 
    location = ShmemPIDDestroy(pid);
    if (location == INVALID_OFFSET)
-       return (FALSE);
+       return FALSE;
    proc = (PROC *) MAKE_PTR(location);
 
    SpinAcquire(ProcStructLock);
@@ -324,7 +324,7 @@ ProcRemove(int pid)
 
    SpinRelease(ProcStructLock);
 
-   return (TRUE);
+   return TRUE;
 }
 
 /*
@@ -407,10 +407,10 @@ ProcQueueAlloc(char *name)
    ShmemInitStruct(name, (unsigned) sizeof(PROC_QUEUE), &found);
 
    if (!queue)
-       return (NULL);
+       return NULL;
    if (!found)
        ProcQueueInit(queue);
-   return (queue);
+   return queue;
 }
 
 #endif
@@ -564,7 +564,7 @@ ProcSleep(PROC_QUEUE *waitQueue,        /* lock->waitProcs */
    MyProc->waitLock = (LOCK *)NULL;
 #endif
 
-   return (MyProc->errType);
+   return MyProc->errType;
 }
 
 
@@ -583,7 +583,7 @@ ProcWakeup(PROC *proc, int errType)
 
    if (proc->links.prev == INVALID_OFFSET ||
        proc->links.next == INVALID_OFFSET)
-       return ((PROC *) NULL);
+       return (PROC *) NULL;
 
    retProc = (PROC *) MAKE_PTR(proc->links.prev);
 
@@ -614,7 +614,7 @@ ProcLockWakeup(PROC_QUEUE *queue, LOCKMETHOD lockmethod, LOCK *lock)
    Assert(queue->size >= 0);
 
    if (!queue->size)
-       return (STATUS_NOT_FOUND);
+       return STATUS_NOT_FOUND;
 
    proc = (PROC *) MAKE_PTR(queue->links.prev);
    count = 0;
@@ -662,7 +662,7 @@ ProcLockWakeup(PROC_QUEUE *queue, LOCKMETHOD lockmethod, LOCK *lock)
    Assert(queue->size >= 0);
 
    if (count)
-       return (STATUS_OK);
+       return STATUS_OK;
    else {
        /* Something is still blocking us.  May have deadlocked. */
        trace_flag = (lock->tag.lockmethod == USER_LOCKMETHOD) ? \
@@ -674,7 +674,7 @@ ProcLockWakeup(PROC_QUEUE *queue, LOCKMETHOD lockmethod, LOCK *lock)
        if (pg_options[trace_flag] >= 2)
            DumpAllLocks();
 #endif
-       return (STATUS_NOT_FOUND);
+       return STATUS_NOT_FOUND;
    }
 }
 
index 7d1876640d99c7fd9f91c42fe22494eb529f398f..faf6a576df3a9dcab4ba878a485febde54c3cb59 100644 (file)
@@ -13,7 +13,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Attic/single.c,v 1.8 1998/07/13 16:34:52 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Attic/single.c,v 1.9 1998/09/01 03:25:26 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -47,9 +47,9 @@ SingleLockReln(LockInfo lockinfo, LOCKMODE lockmode, int action)
    tag.tupleId.ip_posid = InvalidOffsetNumber;
 
    if (action == UNLOCK)
-       return (LockRelease(MultiTableId, &tag, lockmode));
+       return LockRelease(MultiTableId, &tag, lockmode);
    else
-       return (LockAcquire(MultiTableId, &tag, lockmode));
+       return LockAcquire(MultiTableId, &tag, lockmode);
 }
 
 /*
@@ -80,7 +80,7 @@ SingleLockPage(LockInfo lockinfo,
 
 
    if (action == UNLOCK)
-       return (LockRelease(MultiTableId, &tag, lockmode));
+       return LockRelease(MultiTableId, &tag, lockmode);
    else
-       return (LockAcquire(MultiTableId, &tag, lockmode));
+       return LockAcquire(MultiTableId, &tag, lockmode);
 }
index e330cc05973b3b94e3644b918d7b435f937d1e2f..bd90d7a29d85fe492af97c48c28fa30715f1ee37 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/storage/page/bufpage.c,v 1.18 1998/06/15 19:29:21 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/storage/page/bufpage.c,v 1.19 1998/09/01 03:25:27 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -133,7 +133,7 @@ PageAddItem(Page page,
                ((*itemId).lp_len != 0))
            {
                elog(ERROR, "PageAddItem: tried overwrite of used ItemId");
-               return (InvalidOffsetNumber);
+               return InvalidOffsetNumber;
            }
        }
    }
@@ -161,7 +161,7 @@ PageAddItem(Page page,
    upper = ((PageHeader) page)->pd_upper - alignedSize;
 
    if (lower > upper)
-       return (InvalidOffsetNumber);
+       return InvalidOffsetNumber;
 
    itemId = &((PageHeader) page)->pd_linp[offsetNumber - 1];
    (*itemId).lp_off = upper;
@@ -171,7 +171,7 @@ PageAddItem(Page page,
    ((PageHeader) page)->pd_lower = lower;
    ((PageHeader) page)->pd_upper = upper;
 
-   return (offsetNumber);
+   return offsetNumber;
 }
 
 /*
@@ -204,7 +204,7 @@ PageGetTempPage(Page page, Size specialSize)
    thdr->pd_lower = sizeof(PageHeaderData) - sizeof(ItemIdData);
    thdr->pd_upper = pageSize - DOUBLEALIGN(specialSize);
 
-   return (temp);
+   return temp;
 }
 
 /*
@@ -238,12 +238,12 @@ itemidcompare(const void *itemidp1, const void *itemidp2)
 {
    if (((struct itemIdSortData *) itemidp1)->itemiddata.lp_off ==
        ((struct itemIdSortData *) itemidp2)->itemiddata.lp_off)
-       return (0);
+       return 0;
    else if (((struct itemIdSortData *) itemidp1)->itemiddata.lp_off <
             ((struct itemIdSortData *) itemidp2)->itemiddata.lp_off)
-       return (1);
+       return 1;
    else
-       return (-1);
+       return -1;
 }
 
 /*
@@ -340,10 +340,10 @@ PageGetFreeSpace(Page page)
    space = ((PageHeader) page)->pd_upper - ((PageHeader) page)->pd_lower;
 
    if (space < sizeof(ItemIdData))
-       return (0);
+       return 0;
    space -= sizeof(ItemIdData);/* XXX not always true */
 
-   return (space);
+   return space;
 }
 
 /*
index 25daebab23ce8bd18b55939c41dffc080d5f5cb3..f967566a49f26102b9c1b79731348a50354b26e4 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/storage/page/itemptr.c,v 1.3 1997/09/07 04:49:07 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/storage/page/itemptr.c,v 1.4 1998/09/01 03:25:29 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -33,7 +33,7 @@ ItemPointerEquals(ItemPointer pointer1, ItemPointer pointer2)
        ItemPointerGetBlockNumber(pointer2) &&
        ItemPointerGetOffsetNumber(pointer1) ==
        ItemPointerGetOffsetNumber(pointer2))
-       return (true);
+       return true;
    else
-       return (false);
+       return false;
 }
index c753b583d85cf646acd82ee6190b613cb483f0a3..fb421636215bc5f728050ecd1fecdaed72a1782a 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.37 1998/08/24 01:13:48 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.38 1998/09/01 03:25:32 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -109,14 +109,14 @@ mdinit()
 
    MdCxt = (MemoryContext) CreateGlobalMemory("MdSmgr");
    if (MdCxt == (MemoryContext) NULL)
-       return (SM_FAIL);
+       return SM_FAIL;
 
    oldcxt = MemoryContextSwitchTo(MdCxt);
    Md_fdvec = (MdfdVec *) palloc(Nfds * sizeof(MdfdVec));
    MemoryContextSwitchTo(oldcxt);
 
    if (Md_fdvec == (MdfdVec *) NULL)
-       return (SM_FAIL);
+       return SM_FAIL;
 
    MemSet(Md_fdvec, 0, Nfds * sizeof(MdfdVec));
 
@@ -129,7 +129,7 @@ mdinit()
    Md_Free = 0;
    Md_fdvec[Nfds - 1].mdfd_nextFree = -1;
 
-   return (SM_SUCCESS);
+   return SM_SUCCESS;
 }
 
 int
@@ -156,15 +156,15 @@ mdcreate(Relation reln)
    if (fd < 0)
    {
        if (!IsBootstrapProcessingMode())
-           return (-1);
+           return -1;
        fd = FileNameOpenFile(path, O_RDWR, 0600);      /* Bootstrap */
        if (fd < 0)
-           return (-1);
+           return -1;
    }
 
    vfd = _fdvec_alloc();
    if (vfd < 0)
-       return (-1);
+       return -1;
 
    Md_fdvec[vfd].mdfd_vfd = fd;
    Md_fdvec[vfd].mdfd_flags = (uint16) 0;
@@ -173,7 +173,7 @@ mdcreate(Relation reln)
 #endif
    Md_fdvec[vfd].mdfd_lstbcnt = 0;
 
-   return (vfd);
+   return vfd;
 }
 
 /*
@@ -199,7 +199,7 @@ mdunlink(Relation reln)
    StrNCpy(fname, RelationGetRelationName(reln)->data, NAMEDATALEN);
 
    if (FileNameUnlink(fname) < 0)
-       return (SM_FAIL);
+       return SM_FAIL;
 
    /* unlink all the overflow files for large relations */
    for (i = 1;; i++)
@@ -233,7 +233,7 @@ mdunlink(Relation reln)
 
    _fdvec_free(fd);
 
-   return (SM_SUCCESS);
+   return SM_SUCCESS;
 }
 
 /*
@@ -253,10 +253,10 @@ mdextend(Relation reln, char *buffer)
    v = _mdfd_getseg(reln, nblocks, O_CREAT);
 
    if ((pos = FileSeek(v->mdfd_vfd, 0L, SEEK_END)) < 0)
-       return (SM_FAIL);
+       return SM_FAIL;
 
    if (FileWrite(v->mdfd_vfd, buffer, BLCKSZ) != BLCKSZ)
-       return (SM_FAIL);
+       return SM_FAIL;
 
    /* remember that we did a write, so we can sync at xact commit */
    v->mdfd_flags |= MDFD_DIRTY;
@@ -275,7 +275,7 @@ mdextend(Relation reln, char *buffer)
    v->mdfd_lstbcnt = ++nblocks;
 #endif
 
-   return (SM_SUCCESS);
+   return SM_SUCCESS;
 }
 
 /*
@@ -298,7 +298,7 @@ mdopen(Relation reln)
 
    vfd = _fdvec_alloc();
    if (vfd < 0)
-       return (-1);
+       return -1;
 
    Md_fdvec[vfd].mdfd_vfd = fd;
    Md_fdvec[vfd].mdfd_flags = (uint16) 0;
@@ -312,7 +312,7 @@ mdopen(Relation reln)
 #endif
 #endif
 
-   return (vfd);
+   return vfd;
 }
 
 /*
@@ -384,7 +384,7 @@ mdclose(Relation reln)
 
    _fdvec_free(fd);
 
-   return (SM_SUCCESS);
+   return SM_SUCCESS;
 }
 
 /*
@@ -414,7 +414,7 @@ mdread(Relation reln, BlockNumber blocknum, char *buffer)
 #endif
 
    if (FileSeek(v->mdfd_vfd, seekpos, SEEK_SET) != seekpos)
-       return (SM_FAIL);
+       return SM_FAIL;
 
    status = SM_SUCCESS;
    if ((nbytes = FileRead(v->mdfd_vfd, buffer, BLCKSZ)) != BLCKSZ)
@@ -425,7 +425,7 @@ mdread(Relation reln, BlockNumber blocknum, char *buffer)
            status = SM_FAIL;
    }
 
-   return (status);
+   return status;
 }
 
 /*
@@ -453,7 +453,7 @@ mdwrite(Relation reln, BlockNumber blocknum, char *buffer)
 #endif
 
    if (FileSeek(v->mdfd_vfd, seekpos, SEEK_SET) != seekpos)
-       return (SM_FAIL);
+       return SM_FAIL;
 
    status = SM_SUCCESS;
    if (FileWrite(v->mdfd_vfd, buffer, BLCKSZ) != BLCKSZ)
@@ -461,7 +461,7 @@ mdwrite(Relation reln, BlockNumber blocknum, char *buffer)
 
    v->mdfd_flags |= MDFD_DIRTY;
 
-   return (status);
+   return status;
 }
 
 /*
@@ -490,7 +490,7 @@ mdflush(Relation reln, BlockNumber blocknum, char *buffer)
 #endif
 
    if (FileSeek(v->mdfd_vfd, seekpos, SEEK_SET) != seekpos)
-       return (SM_FAIL);
+       return SM_FAIL;
 
    /* write and sync the block */
    status = SM_SUCCESS;
@@ -506,7 +506,7 @@ mdflush(Relation reln, BlockNumber blocknum, char *buffer)
 
    v->mdfd_flags &= ~MDFD_DIRTY;
 
-   return (status);
+   return status;
 }
 
 /*
@@ -623,7 +623,7 @@ mdblindwrt(char *dbstr,
 #endif
 
    if ((fd = open(path, O_RDWR, 0600)) < 0)
-       return (SM_FAIL);
+       return SM_FAIL;
 
    /* seek to the right spot */
 #ifndef LET_OS_MANAGE_FILESIZE
@@ -635,7 +635,7 @@ mdblindwrt(char *dbstr,
    if (lseek(fd, seekpos, SEEK_SET) != seekpos)
    {
        close(fd);
-       return (SM_FAIL);
+       return SM_FAIL;
    }
 
    status = SM_SUCCESS;
@@ -649,7 +649,7 @@ mdblindwrt(char *dbstr,
 
    pfree(path);
 
-   return (status);
+   return status;
 }
 
 /*
@@ -695,10 +695,10 @@ mdnblocks(Relation reln)
            v = v->mdfd_chain;
        }
        else
-           return ((segno * RELSEG_SIZE) + nblocks);
+           return (segno * RELSEG_SIZE) + nblocks;
    }
 #else
-   return (_mdnblocks(v->mdfd_vfd, BLCKSZ));
+   return _mdnblocks(v->mdfd_vfd, BLCKSZ);
 #endif
 }
 
@@ -721,7 +721,7 @@ mdtruncate(Relation reln, int nblocks)
    {
        elog(NOTICE, "Can't truncate multi-segments relation %s",
             reln->rd_rel->relname.data);
-       return (curnblk);
+       return curnblk;
    }
 #endif
 
@@ -729,9 +729,9 @@ mdtruncate(Relation reln, int nblocks)
    v = &Md_fdvec[fd];
 
    if (FileTruncate(v->mdfd_vfd, nblocks * BLCKSZ) < 0)
-       return (-1);
+       return -1;
 
-   return (nblocks);
+   return nblocks;
 
 }  /* mdtruncate */
 
@@ -763,14 +763,14 @@ mdcommit()
            if (v->mdfd_flags & MDFD_DIRTY)
            {
                if (FileSync(v->mdfd_vfd) < 0)
-                   return (SM_FAIL);
+                   return SM_FAIL;
 
                v->mdfd_flags &= ~MDFD_DIRTY;
            }
        }
    }
 
-   return (SM_SUCCESS);
+   return SM_SUCCESS;
 }
 
 /*
@@ -796,7 +796,7 @@ mdabort()
            v->mdfd_flags &= ~MDFD_DIRTY;
    }
 
-   return (SM_SUCCESS);
+   return SM_SUCCESS;
 }
 
 /*
@@ -823,7 +823,7 @@ _fdvec_alloc()
            Assert(fdvec == CurFd);
            CurFd++;
        }
-       return (fdvec);
+       return fdvec;
    }
 
    /* Must allocate more room */
@@ -857,7 +857,7 @@ _fdvec_alloc()
    CurFd++;
    Md_fdvec[fdvec].mdfd_flags = 0;
 
-   return (fdvec);
+   return fdvec;
 }
 
 /*
@@ -906,7 +906,7 @@ _mdfd_openseg(Relation reln, int segno, int oflags)
        pfree(fullpath);
 
    if (fd < 0)
-       return ((MdfdVec *) NULL);
+       return (MdfdVec *) NULL;
 
    /* allocate an mdfdvec entry for it */
    oldcxt = MemoryContextSwitchTo(MdCxt);
@@ -927,7 +927,7 @@ _mdfd_openseg(Relation reln, int segno, int oflags)
 #endif
 
    /* all done */
-   return (v);
+   return v;
 }
 
 static MdfdVec *
@@ -967,7 +967,7 @@ _mdfd_getseg(Relation reln, int blkno, int oflag)
    v = &Md_fdvec[fd];
 #endif
 
-   return (v);
+   return v;
 }
 
 static BlockNumber
@@ -976,5 +976,5 @@ _mdnblocks(File file, Size blcksz)
    long        len;
 
    len = FileSeek(file, 0L, SEEK_END) - 1;
-   return ((BlockNumber) ((len < 0) ? 0 : 1 + len / blcksz));
+   return (BlockNumber) ((len < 0) ? 0 : 1 + len / blcksz);
 }
index 2f5b57a45167ed19181551cdd8bce7bf76620989..4b9c9e885a22f40c55f17160cb8bbb8c9597790b 100644 (file)
@@ -10,7 +10,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/storage/smgr/Attic/mm.c,v 1.10 1998/08/19 02:02:46 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/storage/smgr/Attic/mm.c,v 1.11 1998/09/01 03:25:34 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -107,7 +107,7 @@ mminit()
    if (mmcacheblk == (char *) NULL)
    {
        SpinRelease(MMCacheLock);
-       return (SM_FAIL);
+       return SM_FAIL;
    }
 
    info.keysize = sizeof(MMCacheTag);
@@ -121,7 +121,7 @@ mminit()
    if (MMCacheHT == (HTAB *) NULL)
    {
        SpinRelease(MMCacheLock);
-       return (SM_FAIL);
+       return SM_FAIL;
    }
 
    info.keysize = sizeof(MMRelTag);
@@ -135,14 +135,14 @@ mminit()
    if (MMRelCacheHT == (HTAB *) NULL)
    {
        SpinRelease(MMCacheLock);
-       return (SM_FAIL);
+       return SM_FAIL;
    }
 
    if (IsUnderPostmaster) /* was IsPostmaster bjm */
    {
        MemSet(mmcacheblk, 0, mmsize);
        SpinRelease(MMCacheLock);
-       return (SM_SUCCESS);
+       return SM_SUCCESS;
    }
 
    SpinRelease(MMCacheLock);
@@ -155,13 +155,13 @@ mminit()
    mmcacheblk += (MMNBUFFERS * sizeof(MMCacheTag));
    MMBlockCache = mmcacheblk;
 
-   return (SM_SUCCESS);
+   return SM_SUCCESS;
 }
 
 int
 mmshutdown()
 {
-   return (SM_SUCCESS);
+   return SM_SUCCESS;
 }
 
 int
@@ -176,7 +176,7 @@ mmcreate(Relation reln)
    if (*MMCurRelno == MMNRELATIONS)
    {
        SpinRelease(MMCacheLock);
-       return (SM_FAIL);
+       return SM_FAIL;
    }
 
    (*MMCurRelno)++;
@@ -200,14 +200,14 @@ mmcreate(Relation reln)
    {
        /* already exists */
        SpinRelease(MMCacheLock);
-       return (SM_FAIL);
+       return SM_FAIL;
    }
 
    entry->mmrhe_nblocks = 0;
 
    SpinRelease(MMCacheLock);
 
-   return (SM_SUCCESS);
+   return SM_SUCCESS;
 }
 
 /*
@@ -305,7 +305,7 @@ mmextend(Relation reln, char *buffer)
        if (i == MMNBUFFERS)
        {
            SpinRelease(MMCacheLock);
-           return (SM_FAIL);
+           return SM_FAIL;
        }
    }
    else
@@ -346,7 +346,7 @@ mmextend(Relation reln, char *buffer)
 
    SpinRelease(MMCacheLock);
 
-   return (SM_SUCCESS);
+   return SM_SUCCESS;
 }
 
 /*
@@ -356,7 +356,7 @@ int
 mmopen(Relation reln)
 {
    /* automatically successful */
-   return (0);
+   return 0;
 }
 
 /*
@@ -368,7 +368,7 @@ int
 mmclose(Relation reln)
 {
    /* automatically successful */
-   return (SM_SUCCESS);
+   return SM_SUCCESS;
 }
 
 /*
@@ -407,7 +407,7 @@ mmread(Relation reln, BlockNumber blocknum, char *buffer)
        /* reading nonexistent pages is defined to fill them with zeroes */
        SpinRelease(MMCacheLock);
        MemSet(buffer, 0, BLCKSZ);
-       return (SM_SUCCESS);
+       return SM_SUCCESS;
    }
 
    offset = (entry->mmhe_bufno * BLCKSZ);
@@ -415,7 +415,7 @@ mmread(Relation reln, BlockNumber blocknum, char *buffer)
 
    SpinRelease(MMCacheLock);
 
-   return (SM_SUCCESS);
+   return SM_SUCCESS;
 }
 
 /*
@@ -460,7 +460,7 @@ mmwrite(Relation reln, BlockNumber blocknum, char *buffer)
 
    SpinRelease(MMCacheLock);
 
-   return (SM_SUCCESS);
+   return SM_SUCCESS;
 }
 
 /*
@@ -471,7 +471,7 @@ mmwrite(Relation reln, BlockNumber blocknum, char *buffer)
 int
 mmflush(Relation reln, BlockNumber blocknum, char *buffer)
 {
-   return (mmwrite(reln, blocknum, buffer));
+   return mmwrite(reln, blocknum, buffer);
 }
 
 /*
@@ -488,7 +488,7 @@ mmblindwrt(char *dbstr,
           BlockNumber blkno,
           char *buffer)
 {
-   return (SM_FAIL);
+   return SM_FAIL;
 }
 
 /*
@@ -529,7 +529,7 @@ mmnblocks(Relation reln)
 
    SpinRelease(MMCacheLock);
 
-   return (nblocks);
+   return nblocks;
 }
 
 /*
@@ -540,7 +540,7 @@ mmnblocks(Relation reln)
 int
 mmcommit()
 {
-   return (SM_SUCCESS);
+   return SM_SUCCESS;
 }
 
 /*
@@ -550,7 +550,7 @@ mmcommit()
 int
 mmabort()
 {
-   return (SM_SUCCESS);
+   return SM_SUCCESS;
 }
 
 /*
@@ -605,7 +605,7 @@ MMShmemSize()
    size += MAXALIGN(sizeof(*MMCurRelno));
    size += MAXALIGN(MMNBUFFERS * sizeof(MMCacheTag));
 
-   return (size);
+   return size;
 }
 
 #endif                         /* STABLE_MEMORY_STORAGE */
index 0adc16ed78e7ae0d7315325429479fe09e59ecfb..75ea2297efa157562d14f854f3304705cd3114d5 100644 (file)
@@ -10,7 +10,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.18 1998/07/20 16:14:15 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.19 1998/09/01 03:25:35 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -102,7 +102,7 @@ smgrinit()
    /* register the shutdown proc */
    on_proc_exit(smgrshutdown, NULL);
 
-   return (SM_SUCCESS);
+   return SM_SUCCESS;
 }
 
 static void
@@ -134,7 +134,7 @@ smgrcreate(int16 which, Relation reln)
    if ((fd = (*(smgrsw[which].smgr_create)) (reln)) < 0)
        elog(ERROR, "cannot create %s", reln->rd_rel->relname.data);
 
-   return (fd);
+   return fd;
 }
 
 /*
@@ -150,7 +150,7 @@ smgrunlink(int16 which, Relation reln)
    if ((status = (*(smgrsw[which].smgr_unlink)) (reln)) == SM_FAIL)
        elog(ERROR, "cannot unlink %s", reln->rd_rel->relname.data);
 
-   return (status);
+   return status;
 }
 
 /*
@@ -169,7 +169,7 @@ smgrextend(int16 which, Relation reln, char *buffer)
    if (status == SM_FAIL)
        elog(ERROR, "%s: cannot extend", reln->rd_rel->relname.data);
 
-   return (status);
+   return status;
 }
 
 /*
@@ -186,7 +186,7 @@ smgropen(int16 which, Relation reln)
    if ((fd = (*(smgrsw[which].smgr_open)) (reln)) < 0)
        elog(ERROR, "cannot open %s", reln->rd_rel->relname.data);
 
-   return (fd);
+   return fd;
 }
 
 /*
@@ -207,7 +207,7 @@ smgrclose(int16 which, Relation reln)
    if ((*(smgrsw[which].smgr_close)) (reln) == SM_FAIL)
        elog(ERROR, "cannot close %s", reln->rd_rel->relname.data);
 
-   return (SM_SUCCESS);
+   return SM_SUCCESS;
 }
 
 /*
@@ -231,7 +231,7 @@ smgrread(int16 which, Relation reln, BlockNumber blocknum, char *buffer)
        elog(ERROR, "cannot read block %d of %s",
             blocknum, reln->rd_rel->relname.data);
 
-   return (status);
+   return status;
 }
 
 /*
@@ -253,7 +253,7 @@ smgrwrite(int16 which, Relation reln, BlockNumber blocknum, char *buffer)
        elog(ERROR, "cannot write block %d of %s",
            blocknum, reln->rd_rel->relname.data);
 
-   return (status);
+   return status;
 }
 
 /*
@@ -270,7 +270,7 @@ smgrflush(int16 which, Relation reln, BlockNumber blocknum, char *buffer)
        elog(ERROR, "cannot flush block %d of %s to stable store",
             blocknum, reln->rd_rel->relname.data);
 
-   return (status);
+   return status;
 }
 
 /*
@@ -311,7 +311,7 @@ smgrblindwrt(int16 which,
    pfree(dbstr);
    pfree(relstr);
 
-   return (status);
+   return status;
 }
 
 /*
@@ -329,7 +329,7 @@ smgrnblocks(int16 which, Relation reln)
    if ((nblocks = (*(smgrsw[which].smgr_nblocks)) (reln)) < 0)
        elog(ERROR, "cannot count blocks for %s", reln->rd_rel->relname.data);
 
-   return (nblocks);
+   return nblocks;
 }
 
 /*
@@ -352,7 +352,7 @@ smgrtruncate(int16 which, Relation reln, int nblocks)
                reln->rd_rel->relname.data, nblocks);
    }
 
-   return (newblks);
+   return newblks;
 }
 
 /*
@@ -373,7 +373,7 @@ smgrcommit()
        }
    }
 
-   return (SM_SUCCESS);
+   return SM_SUCCESS;
 }
 
 #ifdef NOT_USED
@@ -391,7 +391,7 @@ smgrabort()
        }
    }
 
-   return (SM_SUCCESS);
+   return SM_SUCCESS;
 }
 
 #endif
@@ -402,5 +402,5 @@ smgriswo(int16 smgrno)
    if (smgrno < 0 || smgrno >= NSmgr)
        elog(ERROR, "illegal storage manager number %d", smgrno);
 
-   return (smgrwo[smgrno]);
+   return smgrwo[smgrno];
 }
index f4ea40013239f39271b3633dcaeaa6de28c3a7b4..2e30f5baa1b3649a27105018e0fadf6c7fffbe14 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgrtype.c,v 1.9 1998/06/23 15:35:45 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgrtype.c,v 1.10 1998/09/01 03:25:37 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -47,7 +47,7 @@ smgrin(char *s)
    for (i = 0; i < NStorageManagers; i++)
    {
        if (strcmp(s, StorageManager[i].smgr_name) == 0)
-           return ((int2) i);
+           return (int2) i;
    }
    elog(ERROR, "smgrin: illegal storage manager name %s", s);
    return 0;
@@ -63,21 +63,21 @@ smgrout(int2 i)
 
    s = (char *) palloc(strlen(StorageManager[i].smgr_name) + 1);
    strcpy(s, StorageManager[i].smgr_name);
-   return (s);
+   return s;
 }
 
 bool
 smgreq(int2 a, int2 b)
 {
    if (a == b)
-       return (true);
-   return (false);
+       return true;
+   return false;
 }
 
 bool
 smgrne(int2 a, int2 b)
 {
    if (a == b)
-       return (false);
-   return (true);
+       return false;
+   return true;
 }
index da1c40db8c12f24a7e2420f0d268c3866201cb17..11ba43f2e5d4970bf2a3a40b64e876bdf4f86237 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/tcop/dest.c,v 1.21 1998/07/20 16:56:57 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/tcop/dest.c,v 1.22 1998/09/01 03:25:38 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -238,7 +238,7 @@ BeginCommand(char *pname,
             CommandDest dest)
 {
    PortalEntry *entry;
-   AttributeTupleForm *attrs = tupdesc->attrs;
+   Form_pg_attribute *attrs = tupdesc->attrs;
    int         natts = tupdesc->natts;
    int         i;
    char       *p;
index adcdd063d16d8f93a293c8f1a65693b132767bdc..37c56d92007df3144577efdb1ea5c16212cced07 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.19 1998/08/19 02:02:48 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.20 1998/09/01 03:25:40 momjian Exp $
  *
  * NOTES
  *   This cruft is the server side of PQfn.
@@ -187,7 +187,7 @@ update_fp_info(Oid func_id, struct fp_info * fip)
    Oid         rettype;
    HeapTuple   func_htp,
                type_htp;
-   TypeTupleForm tp;
+   Form_pg_type tp;
    Form_pg_proc pp;
    int         i;
 
@@ -229,7 +229,7 @@ update_fp_info(Oid func_id, struct fp_info * fip)
                elog(ERROR, "update_fp_info: bad argument type %d for %d",
                     argtypes[i], func_id);
            }
-           tp = (TypeTupleForm) GETSTRUCT(type_htp);
+           tp = (Form_pg_type) GETSTRUCT(type_htp);
            fip->argbyval[i] = tp->typbyval;
            fip->arglen[i] = tp->typlen;
        }                       /* else it had better be VAR_LENGTH_ARG */
@@ -245,7 +245,7 @@ update_fp_info(Oid func_id, struct fp_info * fip)
            elog(ERROR, "update_fp_info: bad return type %d for %d",
                 rettype, func_id);
        }
-       tp = (TypeTupleForm) GETSTRUCT(type_htp);
+       tp = (Form_pg_type) GETSTRUCT(type_htp);
        fip->retbyval = tp->typbyval;
        fip->retlen = tp->typlen;
    }                           /* else it had better by VAR_LENGTH_RESULT */
@@ -375,5 +375,5 @@ HandleFunctionRequest()
 
 
 
-   return (0);
+   return 0;
 }
index 6366d18717ec0cc91571f5c931d4f5409c21b167..9839901d4dc49882ee2e12098bfdf25815d4f65b 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.87 1998/08/30 21:05:27 scrappy Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.88 1998/09/01 03:25:41 momjian Exp $
  *
  * NOTES
  *   this is the "main" module of the postgres backend and
@@ -296,7 +296,7 @@ InteractiveBackend(char *inBuf)
    if (EchoQuery)
        printf("query: %s\n", inBuf);
 
-   return ('Q');
+   return 'Q';
 }
 
 /* ----------------
@@ -661,7 +661,7 @@ pg_parse_and_plan(char *query_string,   /* string to execute */
    if (queryListP)
        *queryListP = querytree_list;
 
-   return (plan_list);
+   return plan_list;
 }
 
 /* ----------------------------------------------------------------
@@ -1521,7 +1521,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
    if (!IsUnderPostmaster)
    {
        puts("\nPOSTGRES backend interactive interface");
-       puts("$Revision: 1.87 $ $Date: 1998/08/30 21:05:27 $");
+       puts("$Revision: 1.88 $ $Date: 1998/09/01 03:25:41 $");
    }
 
    /* ----------------
index aa0f1014692ecc332007e62a810526912345e5a6..db5ea074c811eaac4e9d0258fdf44f23ff953bee 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.29 1998/08/19 02:02:53 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.30 1998/09/01 03:25:43 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -62,7 +62,7 @@ getid(char *s, char *n)
    n[len] = '\0';
    while (isspace(*s))
        ++s;
-   return (s);
+   return s;
 }
 
 /*
@@ -169,7 +169,7 @@ aclparse(char *s, AclItem *aip, unsigned *modechg)
    elog(DEBUG, "aclparse: correctly read [%x %d %x], modechg=%x",
         aip->ai_idtype, aip->ai_id, aip->ai_mode, *modechg);
 #endif
-   return (s);
+   return s;
 }
 
 /*
@@ -196,7 +196,7 @@ makeacl(int n)
    new_acl->flags = 0;
    ARR_LBOUND(new_acl)[0] = 0;
    ARR_DIMS(new_acl)[0] = n;
-   return (new_acl);
+   return new_acl;
 }
 
 /*
@@ -226,7 +226,7 @@ aclitemin(char *s)
        ++s;
    if (*s)
        elog(ERROR, "aclitemin: extra garbage at end of specification");
-   return (aip);
+   return aip;
 }
 
 /*
@@ -307,7 +307,7 @@ aclitemout(AclItem *aip)
            *p++ = ACL_MODE_STR[i];
    *p = '\0';
 
-   return (out);
+   return out;
 }
 
 /*
@@ -324,19 +324,19 @@ static int32
 aclitemeq(AclItem *a1, AclItem *a2)
 {
    if (!a1 && !a2)
-       return (1);
+       return 1;
    if (!a1 || !a2)
-       return (0);
-   return (a1->ai_idtype == a2->ai_idtype && a1->ai_id == a2->ai_id);
+       return 0;
+   return a1->ai_idtype == a2->ai_idtype && a1->ai_id == a2->ai_id;
 }
 
 static int32
 aclitemgt(AclItem *a1, AclItem *a2)
 {
    if (a1 && !a2)
-       return (1);
+       return 1;
    if (!a1 || !a2)
-       return (0);
+       return 0;
    return ((a1->ai_idtype > a2->ai_idtype) ||
            (a1->ai_idtype == a2->ai_idtype && a1->ai_id > a2->ai_id));
 }
@@ -355,7 +355,7 @@ aclownerdefault(char *relname, AclId ownerid)
    aip[1].ai_idtype = ACL_IDTYPE_UID;
    aip[1].ai_id = ownerid;
    aip[1].ai_mode = ACL_OWNER_DEFAULT;
-   return (acl);
+   return acl;
 }
 
 Acl *
@@ -369,7 +369,7 @@ acldefault(char *relname)
    aip[0].ai_idtype = ACL_IDTYPE_WORLD;
    aip[0].ai_id = ACL_ID_WORLD;
    aip[0].ai_mode = IsSystemRelationName(relname) ? ACL_RD : ACL_WORLD_DEFAULT;
-   return (acl);
+   return acl;
 }
 
 Acl *
@@ -385,13 +385,13 @@ aclinsert3(Acl *old_acl, AclItem *mod_aip, unsigned modechg)
    if (!old_acl || ACL_NUM(old_acl) < 1)
    {
        new_acl = makeacl(0);
-       return (new_acl);
+       return new_acl;
    }
    if (!mod_aip)
    {
        new_acl = makeacl(ACL_NUM(old_acl));
        memmove((char *) new_acl, (char *) old_acl, ACL_SIZE(old_acl));
-       return (new_acl);
+       return new_acl;
    }
 
    num = ACL_NUM(old_acl);
@@ -482,7 +482,7 @@ aclinsert3(Acl *old_acl, AclItem *mod_aip, unsigned modechg)
        }
    }
 
-   return (new_acl);
+   return new_acl;
 }
 
 /*
@@ -492,7 +492,7 @@ aclinsert3(Acl *old_acl, AclItem *mod_aip, unsigned modechg)
 Acl *
 aclinsert(Acl *old_acl, AclItem *mod_aip)
 {
-   return (aclinsert3(old_acl, mod_aip, ACL_MODECHG_EQL));
+   return aclinsert3(old_acl, mod_aip, ACL_MODECHG_EQL);
 }
 
 Acl *
@@ -508,13 +508,13 @@ aclremove(Acl *old_acl, AclItem *mod_aip)
    if (!old_acl || ACL_NUM(old_acl) < 1)
    {
        new_acl = makeacl(0);
-       return (new_acl);
+       return new_acl;
    }
    if (!mod_aip)
    {
        new_acl = makeacl(ACL_NUM(old_acl));
        memmove((char *) new_acl, (char *) old_acl, ACL_SIZE(old_acl));
-       return (new_acl);
+       return new_acl;
    }
 
    old_num = ACL_NUM(old_acl);
@@ -552,7 +552,7 @@ aclremove(Acl *old_acl, AclItem *mod_aip)
                    (new_num - dst) * sizeof(AclItem));
        }
    }
-   return (new_acl);
+   return new_acl;
 }
 
 int32
@@ -563,12 +563,12 @@ aclcontains(Acl *acl, AclItem *aip)
    AclItem    *aidat;
 
    if (!acl || !aip || ((num = ACL_NUM(acl)) < 1))
-       return (0);
+       return 0;
    aidat = ACL_DAT(acl);
    for (i = 0; i < num; ++i)
        if (aclitemeq(aip, aidat + i))
-           return (1);
-   return (0);
+           return 1;
+   return 0;
 }
 
 /* parser support routines */
index cf76efabf3b0c9a647528efb0baa096ce95d0423..cb604baa0ff662b2574aab563d5512d248cf1646 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.32 1998/08/19 02:02:55 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.33 1998/09/01 03:25:45 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -42,9 +42,9 @@
  */
 
 /*-=-=--=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-*/
-static int _ArrayCount(char *str, int dim[], int typdelim);
+static int _ArrayCount(char *str, int *dim, int typdelim);
 static char *
-_ReadArrayStr(char *arrayStr, int nitems, int ndim, int dim[],
+_ReadArrayStr(char *arrayStr, int nitems, int ndim, int *dim,
              FmgrInfo *inputproc, Oid typelem, int32 typmod,
              char typdelim, int typlen, bool typbyval,
              char typalign, int *nbytes);
@@ -52,7 +52,7 @@ _ReadArrayStr(char *arrayStr, int nitems, int ndim, int dim[],
 #ifdef LOARRAY
 static char *
 _ReadLOArray(char *str, int *nbytes, int *fd, bool *chunkFlag,
-            int ndim, int dim[], int baseSize);
+            int ndim, int *dim, int baseSize);
 
 #endif
 static void
@@ -69,17 +69,17 @@ static char *_AdvanceBy1word(char *str, char **word);
 
 #endif
 static void
-_ArrayRange(int st[], int endp[], int bsize, char *destPtr,
+_ArrayRange(int *st, int *endp, int bsize, char *destPtr,
            ArrayType *array, int from);
-static int _ArrayClipCount(int stI[], int endpI[], ArrayType *array);
+static int _ArrayClipCount(int *stI, int *endpI, ArrayType *array);
 static void
-_LOArrayRange(int st[], int endp[], int bsize, int srcfd,
+_LOArrayRange(int *st, int *endp, int bsize, int srcfd,
              int destfd, ArrayType *array, int isSrcLO, bool *isNull);
 static void
-_ReadArray(int st[], int endp[], int bsize, int srcfd, int destfd,
+_ReadArray(int *st, int *endp, int bsize, int srcfd, int destfd,
           ArrayType *array, int isDestLO, bool *isNull);
 static int  ArrayCastAndSet(char *src, bool typbyval, int typlen, char *dest);
-static int  SanityCheckInput(int ndim, int n, int dim[], int lb[], int indx[]);
+static int  SanityCheckInput(int ndim, int n, int *dim, int *lb, int *indx);
 static int array_read(char *destptr, int eltsize, int nitems, char *srcptr);
 static char *array_seek(char *ptr, int eltsize, int nitems);
 
@@ -248,17 +248,17 @@ array_in(char *string,            /* input array in external form */
        elog(ERROR, "large object arrays not supported");
    }
    pfree(string_save);
-   return ((char *) retval);
+   return (char *) retval;
 }
 
 /*-----------------------------------------------------------------------------
  * _ArrayCount --
- *  Counts the number of dimensions and the dim[] array for an array string.
+ *  Counts the number of dimensions and the *dim array for an array string.
  *      The syntax for array input is C-like nested curly braces
  *-----------------------------------------------------------------------------
  */
 static int
-_ArrayCount(char *str, int dim[], int typdelim)
+_ArrayCount(char *str, int *dim, int typdelim)
 {
    int         nest_level = 0,
                i;
@@ -272,7 +272,7 @@ _ArrayCount(char *str, int dim[], int typdelim)
        temp[i] = dim[i] = 0;
 
    if (strncmp(str, "{}", 2) == 0)
-       return (0);
+       return 0;
 
    q = str;
    while (eoArray != true)
@@ -337,7 +337,7 @@ _ArrayCount(char *str, int dim[], int typdelim)
    for (i = 0; i < ndim; ++i)
        dim[i] = temp[i];
 
-   return (ndim);
+   return ndim;
 }
 
 /*---------------------------------------------------------------------------
@@ -356,7 +356,7 @@ static char *
 _ReadArrayStr(char *arrayStr,
              int nitems,
              int ndim,
-             int dim[],
+             int *dim,
              FmgrInfo *inputproc,      /* function used for the
                                         * conversion */
              Oid typelem,
@@ -495,7 +495,7 @@ _ReadArrayStr(char *arrayStr,
            }
        }
    }
-   return ((char *) values);
+   return (char *) values;
 }
 
 
@@ -510,7 +510,7 @@ _ReadLOArray(char *str,
             int *fd,
             bool *chunkFlag,
             int ndim,
-            int dim[],
+            int *dim,
             int baseSize)
 {
    char       *inputfile,
@@ -564,7 +564,7 @@ _ReadLOArray(char *str,
                             chunkfile);
        FreeFile(afd);
    }
-   return (retStr);
+   return retStr;
 }
 
 #endif
@@ -624,7 +624,7 @@ array_out(ArrayType *v, Oid element_type)
               *dim;
 
    if (v == (ArrayType *) NULL)
-       return ((char *) NULL);
+       return (char *) NULL;
 
    if (ARR_IS_LO(v) == true)
    {
@@ -642,7 +642,7 @@ array_out(ArrayType *v, Oid element_type)
        strcat(save_p, ASSGN);
        strcat(save_p, ARR_DATA_PTR(v));
        pfree(p);
-       return (save_p);
+       return save_p;
    }
 
    system_cache_lookup(element_type, false, &typlen, &typbyval,
@@ -756,7 +756,7 @@ array_out(ArrayType *v, Oid element_type)
    } while (j != -1);
 
    pfree(values);
-   return (retval);
+   return retval;
 }
 
 /*-----------------------------------------------------------------------------
@@ -793,7 +793,7 @@ array_dims(ArrayType *v, bool *isNull)
    }
    nbytes = strlen(save_p + VARHDRSZ) + VARHDRSZ;
    memmove(save_p, &nbytes, VARHDRSZ);
-   return (save_p);
+   return save_p;
 }
 
 /*---------------------------------------------------------------------------
@@ -806,7 +806,7 @@ array_dims(ArrayType *v, bool *isNull)
 Datum
 array_ref(ArrayType *array,
          int n,
-         int indx[],
+         int *indx,
          int reftype,
          int elmlen,
          int arraylen,
@@ -927,8 +927,8 @@ array_ref(ArrayType *array,
 Datum
 array_clip(ArrayType *array,
           int n,
-          int upperIndx[],
-          int lowerIndx[],
+          int *upperIndx,
+          int *lowerIndx,
           int reftype,
           int len,
           bool *isNull)
@@ -1036,7 +1036,7 @@ array_clip(ArrayType *array,
            newArr = NULL;
        }
        /* timer_end(); */
-       return ((Datum) newArr);
+       return (Datum) newArr;
    }
 
    if (len > 0)
@@ -1069,7 +1069,7 @@ array_clip(ArrayType *array,
 char *
 array_set(ArrayType *array,
          int n,
-         int indx[],
+         int *indx,
          char *dataPtr,
          int reftype,
          int elmlen,
@@ -1095,7 +1095,7 @@ array_set(ArrayType *array,
            elog(ERROR, "array_ref: array bound exceeded");
        pos = (char *) array + indx[0] * elmlen;
        ArrayCastAndSet(dataPtr, (bool) reftype, elmlen, pos);
-       return ((char *) array);
+       return (char *) array;
    }
    dim = ARR_DIMS(array);
    lb = ARR_LBOUND(array);
@@ -1105,7 +1105,7 @@ array_set(ArrayType *array,
    if (!SanityCheckInput(ndim, n, dim, lb, indx))
    {
        elog(ERROR, "array_set: array bound exceeded");
-       return ((char *) array);
+       return (char *) array;
    }
    offset = GetOffset(n, dim, lb, indx);
 
@@ -1121,10 +1121,10 @@ array_set(ArrayType *array,
 
        lo_name = ARR_DATA_PTR(array);
        if ((fd = LOopen(lo_name, ARR_IS_INV(array) ? INV_WRITE : O_WRONLY)) < 0)
-           return ((char *) array);
+           return (char *) array;
 #endif
        if (lo_lseek(fd, offset, SEEK_SET) < 0)
-           return ((char *) array);
+           return (char *) array;
        v = (struct varlena *) palloc(elmlen + VARHDRSZ);
        VARSIZE(v) = elmlen + VARHDRSZ;
        ArrayCastAndSet(dataPtr, (bool) reftype, elmlen, VARDATA(v));
@@ -1137,14 +1137,14 @@ array_set(ArrayType *array,
         */
        pfree(v);
        lo_close(fd);
-       return ((char *) array);
+       return (char *) array;
    }
    if (elmlen > 0)
    {
        offset = offset * elmlen;
        /* off the end of the array */
        if (nbytes - offset < 1)
-           return ((char *) array);
+           return (char *) array;
        pos = ARR_DATA_PTR(array) + offset;
    }
    else
@@ -1167,7 +1167,7 @@ array_set(ArrayType *array,
        {
            /* new element with same size, overwrite old data */
            ArrayCastAndSet(dataPtr, (bool) reftype, elmlen, elt_ptr);
-           return ((char *) array);
+           return (char *) array;
        }
 
        /* new element with different size, reallocate the array */
@@ -1186,10 +1186,10 @@ array_set(ArrayType *array,
                (char *) array + lth0 + lth1 + oldlen, lth2);
 
        /* ??? who should free this storage ??? */
-       return ((char *) newarray);
+       return (char *) newarray;
    }
    ArrayCastAndSet(dataPtr, (bool) reftype, elmlen, pos);
-   return ((char *) array);
+   return (char *) array;
 }
 
 /*----------------------------------------------------------------------------
@@ -1204,8 +1204,8 @@ array_set(ArrayType *array,
 char *
 array_assgn(ArrayType *array,
            int n,
-           int upperIndx[],
-           int lowerIndx[],
+           int *upperIndx,
+           int *lowerIndx,
            ArrayType *newArr,
            int reftype,
            int len,
@@ -1227,7 +1227,7 @@ array_assgn(ArrayType *array,
 
    if (!SanityCheckInput(ndim, n, dim, lb, upperIndx) ||
        !SanityCheckInput(ndim, n, dim, lb, lowerIndx))
-       return ((char *) array);
+       return (char *) array;
 
    for (i = 0; i < n; i++)
        if (lowerIndx[i] > upperIndx[i])
@@ -1243,14 +1243,14 @@ array_assgn(ArrayType *array,
 
        lo_name = (char *) ARR_DATA_PTR(array);
        if ((fd = LOopen(lo_name, ARR_IS_INV(array) ? INV_WRITE : O_WRONLY)) < 0)
-           return ((char *) array);
+           return (char *) array;
 #endif
        if (ARR_IS_LO(newArr))
        {
 #ifdef LOARRAY
            lo_name = (char *) ARR_DATA_PTR(newArr);
            if ((newfd = LOopen(lo_name, ARR_IS_INV(newArr) ? INV_READ : O_RDONLY)) < 0)
-               return ((char *) array);
+               return (char *) array;
 #endif
            _LOArrayRange(lowerIndx, upperIndx, len, fd, newfd, array, 1, isNull);
            lo_close(newfd);
@@ -1261,7 +1261,7 @@ array_assgn(ArrayType *array,
                          array, 0, isNull);
        }
        lo_close(fd);
-       return ((char *) array);
+       return (char *) array;
    }
    _ArrayRange(lowerIndx, upperIndx, len, ARR_DATA_PTR(newArr), array, 0);
    return (char *) array;
@@ -1278,12 +1278,12 @@ int
 array_eq(ArrayType *array1, ArrayType *array2)
 {
    if ((array1 == NULL) || (array2 == NULL))
-       return (0);
+       return 0;
    if (*(int *) array1 != *(int *) array2)
-       return (0);
+       return 0;
    if (memcmp(array1, array2, *(int *) array1))
-       return (0);
-   return (1);
+       return 0;
+   return 1;
 }
 
 /***************************************************************************/
@@ -1300,7 +1300,7 @@ system_cache_lookup(Oid element_type,
                    char *typalign)
 {
    HeapTuple   typeTuple;
-   TypeTupleForm typeStruct;
+   Form_pg_type typeStruct;
 
    typeTuple = SearchSysCacheTuple(TYPOID,
                                    ObjectIdGetDatum(element_type),
@@ -1312,7 +1312,7 @@ system_cache_lookup(Oid element_type,
             element_type);
        return;
    }
-   typeStruct = (TypeTupleForm) GETSTRUCT(typeTuple);
+   typeStruct = (Form_pg_type) GETSTRUCT(typeTuple);
    *typlen = typeStruct->typlen;
    *typbyval = typeStruct->typbyval;
    *typdelim = typeStruct->typdelim;
@@ -1332,12 +1332,12 @@ _ArrayCast(char *value, bool byval, int len)
        switch (len)
        {
                case 1:
-               return ((Datum) *value);
+               return (Datum) *value;
            case 2:
-               return ((Datum) *(int16 *) value);
+               return (Datum) *(int16 *) value;
            case 3:
            case 4:
-               return ((Datum) *(int32 *) value);
+               return (Datum) *(int32 *) value;
            default:
                elog(ERROR, "array_ref: byval and elt len > 4!");
                break;
@@ -1383,7 +1383,7 @@ ArrayCastAndSet(char *src,
        memmove(dest, src, *(int32 *) src);
        inc = (INTALIGN(*(int32 *) src));
    }
-   return (inc);
+   return inc;
 }
 
 #ifdef LOARRAY
@@ -1412,7 +1412,7 @@ _AdvanceBy1word(char *str, char **word)
 #endif
 
 static int
-SanityCheckInput(int ndim, int n, int dim[], int lb[], int indx[])
+SanityCheckInput(int ndim, int n, int *dim, int *lb, int *indx)
 {
    int         i;
 
@@ -1426,8 +1426,8 @@ SanityCheckInput(int ndim, int n, int dim[], int lb[], int indx[])
 }
 
 static void
-_ArrayRange(int st[],
-           int endp[],
+_ArrayRange(int *st,
+           int *endp,
            int bsize,
            char *destPtr,
            ArrayType *array,
@@ -1472,7 +1472,7 @@ _ArrayRange(int st[],
 }
 
 static int
-_ArrayClipCount(int stI[], int endpI[], ArrayType *array)
+_ArrayClipCount(int *stI, int *endpI, ArrayType *array)
 {
    int         n,
               *dim,
@@ -1518,10 +1518,10 @@ array_seek(char *ptr, int eltsize, int nitems)
    int         i;
 
    if (eltsize > 0)
-       return (ptr + eltsize * nitems);
+       return ptr + eltsize * nitems;
    for (i = 0; i < nitems; i++)
        ptr += INTALIGN(*(int32 *) ptr);
-   return (ptr);
+   return ptr;
 }
 
 static int
@@ -1534,7 +1534,7 @@ array_read(char *destptr, int eltsize, int nitems, char *srcptr)
    if (eltsize > 0)
    {
        memmove(destptr, srcptr, eltsize * nitems);
-       return (eltsize * nitems);
+       return eltsize * nitems;
    }
    for (i = inc = 0; i < nitems; i++)
    {
@@ -1544,12 +1544,12 @@ array_read(char *destptr, int eltsize, int nitems, char *srcptr)
        destptr += tmp;
        inc += tmp;
    }
-   return (inc);
+   return inc;
 }
 
 static void
-_LOArrayRange(int st[],
-             int endp[],
+_LOArrayRange(int *st,
+             int *endp,
              int bsize,
              int srcfd,
              int destfd,
@@ -1602,8 +1602,8 @@ _LOArrayRange(int st[],
 
 
 static void
-_ReadArray(int st[],
-          int endp[],
+_ReadArray(int *st,
+          int *endp,
           int bsize,
           int srcfd,
           int destfd,
@@ -1680,7 +1680,7 @@ _LOtransfer(char **destfd,
            if (VARSIZE(v) - VARHDRSZ < inc)
            {
                pfree(v);
-               return (-1);
+               return -1;
            }
            tmp += LOwrite((int) *destfd, v);
 #endif
@@ -1704,7 +1704,7 @@ _LOtransfer(char **destfd,
        *srcfd += inc;
        *destfd += inc;
    }
-   return (tmp);
+   return tmp;
 #undef MAX_READ
 }
 
@@ -1721,5 +1721,5 @@ _array_newLO(int *fd, int flag)
    if ((*fd = LOcreat(saveName, 0600, flag)) < 0)
        elog(ERROR, "Large object create failed");
 #endif
-   return (p);
+   return p;
 }
index 898a6049629646d4dfe8c8379b1e3e2057ef8ded..a4253f983fc354e383f4c67834666fc35e71bd1e 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayutils.c,v 1.5 1997/09/08 02:30:23 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayutils.c,v 1.6 1998/09/01 03:25:47 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -19,7 +19,7 @@
 #include "utils/array.h"
 
 int
-GetOffset(int n, int dim[], int lb[], int indx[])
+GetOffset(int n, int *dim, int *lb, int *indx)
 {
    int         i,
                scale,
@@ -31,7 +31,7 @@ GetOffset(int n, int dim[], int lb[], int indx[])
 }
 
 int
-getNitems(int n, int a[])
+getNitems(int n, int *a)
 {
    int         i,
                ret;
@@ -43,7 +43,7 @@ getNitems(int n, int a[])
 }
 
 int
-compute_size(int st[], int endp[], int n, int base)
+compute_size(int *st, int *endp, int n, int base)
 {
    int         i,
                ret;
@@ -54,7 +54,7 @@ compute_size(int st[], int endp[], int n, int base)
 }
 
 void
-mda_get_offset_values(int n, int dist[], int PC[], int span[])
+mda_get_offset_values(int n, int *dist, int *PC, int *span)
 {
    int         i,
                j;
@@ -65,7 +65,7 @@ mda_get_offset_values(int n, int dist[], int PC[], int span[])
 }
 
 void
-mda_get_range(int n, int span[], int st[], int endp[])
+mda_get_range(int n, int *span, int *st, int *endp)
 {
    int         i;
 
@@ -74,7 +74,7 @@ mda_get_range(int n, int span[], int st[], int endp[])
 }
 
 void
-mda_get_prod(int n, int range[], int P[])
+mda_get_prod(int n, int *range, int *P)
 {
    int         i;
 
@@ -83,7 +83,7 @@ mda_get_prod(int n, int range[], int P[])
 }
 
 int
-tuple2linear(int n, int tup[], int scale[])
+tuple2linear(int n, int *tup, int *scale)
 {
    int         i,
                lin;
@@ -94,7 +94,7 @@ tuple2linear(int n, int tup[], int scale[])
 }
 
 void
-array2chunk_coord(int n, int C[], int a_coord[], int c_coord[])
+array2chunk_coord(int n, int *C, int *a_coord, int *c_coord)
 {
    int         i;
 
@@ -110,19 +110,19 @@ array2chunk_coord(int n, int C[], int a_coord[], int c_coord[])
   1   otherwise
   -----------------------------------------------------------------------------*/
 int
-next_tuple(int n, int curr[], int span[])
+next_tuple(int n, int *curr, int *span)
 {
    int         i;
 
    if (!n)
-       return (-1);
+       return -1;
    curr[n - 1] = (curr[n - 1] + 1) % span[n - 1];
    for (i = n - 1; i * (!curr[i]); i--)
        curr[i - 1] = (curr[i - 1] + 1) % span[i - 1];
 
    if (i)
-       return (i);
+       return i;
    if (curr[0])
-       return (0);
-   return (-1);
+       return 0;
+   return -1;
 }
index e781dbe59f171a9dd9fd2f78e1ce8f5a9a88d133..822d4cfad9e027fa5b5ce62149b1f0364f7cc754 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/adt/bool.c,v 1.14 1998/02/26 04:36:51 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/adt/bool.c,v 1.15 1998/09/01 03:25:48 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -38,35 +38,35 @@ boolin(char *b)
            case 't':
            case 'T':
            if (strncasecmp(b, "true", strlen(b)) == 0)
-               return (TRUE);
+               return TRUE;
            break;
 
        case 'f':
        case 'F':
            if (strncasecmp(b, "false", strlen(b)) == 0)
-               return (FALSE);
+               return FALSE;
            break;
 
        case 'y':
        case 'Y':
            if (strncasecmp(b, "yes", strlen(b)) == 0)
-               return (TRUE);
+               return TRUE;
            break;
 
        case '1':
            if (strncasecmp(b, "1", strlen(b)) == 0)
-               return (TRUE);
+               return TRUE;
            break;
 
        case 'n':
        case 'N':
            if (strncasecmp(b, "no", strlen(b)) == 0)
-               return (FALSE);
+               return FALSE;
            break;
 
        case '0':
            if (strncasecmp(b, "0", strlen(b)) == 0)
-               return (FALSE);
+               return FALSE;
            break;
 
        default:
@@ -75,7 +75,7 @@ boolin(char *b)
 
    elog(ERROR, "Bad boolean external representation '%s'", b);
    /* not reached */
-   return (FALSE);
+   return FALSE;
 }  /* boolin() */
 
 /*
@@ -88,7 +88,7 @@ boolout(bool b)
 
    *result = (b) ? 't' : 'f';
    result[1] = '\0';
-   return (result);
+   return result;
 }  /* boolout() */
 
 
@@ -99,35 +99,35 @@ boolout(bool b)
 bool
 booleq(bool arg1, bool arg2)
 {
-   return (arg1 == arg2);
+   return arg1 == arg2;
 }
 
 bool
 boolne(bool arg1, bool arg2)
 {
-   return (arg1 != arg2);
+   return arg1 != arg2;
 }
 
 bool
 boollt(bool arg1, bool arg2)
 {
-   return (arg1 < arg2);
+   return arg1 < arg2;
 }
 
 bool
 boolgt(bool arg1, bool arg2)
 {
-   return (arg1 > arg2);
+   return arg1 > arg2;
 }
 
 bool
 istrue(bool arg1)
 {
-   return (arg1 == TRUE);
+   return arg1 == TRUE;
 }  /* istrue() */
 
 bool
 isfalse(bool arg1)
 {
-   return (arg1 != TRUE);
+   return arg1 != TRUE;
 }  /* isfalse() */
index d57c362afc62df7b5114ffc5611a094e940f0edf..dde1eb2f2c61a62d4c2cd0e0d69f2864dce80778 100644 (file)
@@ -9,7 +9,7 @@
  * workings can be found in the book "Software Solutions in C" by
  * Dale Schumacher, Academic Press, ISBN: 0-12-632360-7.
  *
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/cash.c,v 1.24 1998/06/15 19:29:32 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/cash.c,v 1.25 1998/09/01 03:25:49 momjian Exp $
  */
 
 #include 
@@ -187,7 +187,7 @@ printf( "cashin- string is '%s'\n", s);
 printf( "cashin- result is %d\n", *result);
 #endif
 
-   return (result);
+   return result;
 }  /* cash_in() */
 
 
@@ -301,7 +301,7 @@ cash_out(Cash *in_value)
        strcpy(result, buf + count);
    }
 
-   return (result);
+   return result;
 }  /* cash_out() */
 
 
@@ -309,54 +309,54 @@ bool
 cash_eq(Cash *c1, Cash *c2)
 {
    if (!PointerIsValid(c1) || !PointerIsValid(c2))
-       return (FALSE);
+       return FALSE;
 
-   return (*c1 == *c2);
+   return *c1 == *c2;
 }  /* cash_eq() */
 
 bool
 cash_ne(Cash *c1, Cash *c2)
 {
    if (!PointerIsValid(c1) || !PointerIsValid(c2))
-       return (FALSE);
+       return FALSE;
 
-   return (*c1 != *c2);
+   return *c1 != *c2;
 }  /* cash_ne() */
 
 bool
 cash_lt(Cash *c1, Cash *c2)
 {
    if (!PointerIsValid(c1) || !PointerIsValid(c2))
-       return (FALSE);
+       return FALSE;
 
-   return (*c1 < *c2);
+   return *c1 < *c2;
 }  /* cash_lt() */
 
 bool
 cash_le(Cash *c1, Cash *c2)
 {
    if (!PointerIsValid(c1) || !PointerIsValid(c2))
-       return (FALSE);
+       return FALSE;
 
-   return (*c1 <= *c2);
+   return *c1 <= *c2;
 }  /* cash_le() */
 
 bool
 cash_gt(Cash *c1, Cash *c2)
 {
    if (!PointerIsValid(c1) || !PointerIsValid(c2))
-       return (FALSE);
+       return FALSE;
 
-   return (*c1 > *c2);
+   return *c1 > *c2;
 }  /* cash_gt() */
 
 bool
 cash_ge(Cash *c1, Cash *c2)
 {
    if (!PointerIsValid(c1) || !PointerIsValid(c2))
-       return (FALSE);
+       return FALSE;
 
-   return (*c1 >= *c2);
+   return *c1 >= *c2;
 }  /* cash_ge() */
 
 
@@ -369,14 +369,14 @@ cash_pl(Cash *c1, Cash *c2)
    Cash       *result;
 
    if (!PointerIsValid(c1) || !PointerIsValid(c2))
-       return (NULL);
+       return NULL;
 
    if (!PointerIsValid(result = palloc(sizeof(Cash))))
        elog(ERROR, "Memory allocation failed, can't add cash", NULL);
 
    *result = (*c1 + *c2);
 
-   return (result);
+   return result;
 }  /* cash_pl() */
 
 
@@ -389,14 +389,14 @@ cash_mi(Cash *c1, Cash *c2)
    Cash       *result;
 
    if (!PointerIsValid(c1) || !PointerIsValid(c2))
-       return (NULL);
+       return NULL;
 
    if (!PointerIsValid(result = palloc(sizeof(Cash))))
        elog(ERROR, "Memory allocation failed, can't subtract cash", NULL);
 
    *result = (*c1 - *c2);
 
-   return (result);
+   return result;
 }  /* cash_mi() */
 
 
@@ -409,14 +409,14 @@ cash_mul_flt8(Cash *c, float8 *f)
    Cash       *result;
 
    if (!PointerIsValid(f) || !PointerIsValid(c))
-       return (NULL);
+       return NULL;
 
    if (!PointerIsValid(result = palloc(sizeof(Cash))))
        elog(ERROR, "Memory allocation failed, can't multiply cash", NULL);
 
    *result = ((*f) * (*c));
 
-   return (result);
+   return result;
 }  /* cash_mul_flt8() */
 
 
@@ -426,7 +426,7 @@ cash_mul_flt8(Cash *c, float8 *f)
 Cash *
 flt8_mul_cash(float8 *f, Cash *c)
 {
-   return (cash_mul_flt8(c, f));
+   return cash_mul_flt8(c, f);
 }  /* flt8_mul_cash() */
 
 
@@ -442,7 +442,7 @@ cash_div_flt8(Cash *c, float8 *f)
    Cash       *result;
 
    if (!PointerIsValid(f) || !PointerIsValid(c))
-       return (NULL);
+       return NULL;
 
    if (!PointerIsValid(result = palloc(sizeof(Cash))))
        elog(ERROR, "Memory allocation failed, can't divide cash", NULL);
@@ -452,7 +452,7 @@ cash_div_flt8(Cash *c, float8 *f)
 
    *result = rint(*c / *f);
 
-   return (result);
+   return result;
 }  /* cash_div_flt8() */
 
 /* cash_mul_flt4()
@@ -464,14 +464,14 @@ cash_mul_flt4(Cash *c, float4 *f)
    Cash       *result;
 
    if (!PointerIsValid(f) || !PointerIsValid(c))
-       return (NULL);
+       return NULL;
 
    if (!PointerIsValid(result = palloc(sizeof(Cash))))
        elog(ERROR, "Memory allocation failed, can't multiply cash", NULL);
 
    *result = ((*f) * (*c));
 
-   return (result);
+   return result;
 }  /* cash_mul_flt4() */
 
 
@@ -481,7 +481,7 @@ cash_mul_flt4(Cash *c, float4 *f)
 Cash *
 flt4_mul_cash(float4 *f, Cash *c)
 {
-   return (cash_mul_flt4(c, f));
+   return cash_mul_flt4(c, f);
 }  /* flt4_mul_cash() */
 
 
@@ -497,7 +497,7 @@ cash_div_flt4(Cash *c, float4 *f)
    Cash       *result;
 
    if (!PointerIsValid(f) || !PointerIsValid(c))
-       return (NULL);
+       return NULL;
 
    if (!PointerIsValid(result = palloc(sizeof(Cash))))
        elog(ERROR, "Memory allocation failed, can't divide cash", NULL);
@@ -507,7 +507,7 @@ cash_div_flt4(Cash *c, float4 *f)
 
    *result = rint(*c / *f);
 
-   return (result);
+   return result;
 }  /* cash_div_flt4() */
 
 
@@ -520,14 +520,14 @@ cash_mul_int4(Cash *c, int4 i)
    Cash       *result;
 
    if (!PointerIsValid(c))
-       return (NULL);
+       return NULL;
 
    if (!PointerIsValid(result = palloc(sizeof(Cash))))
        elog(ERROR, "Memory allocation failed, can't multiply cash", NULL);
 
    *result = ((i) * (*c));
 
-   return (result);
+   return result;
 }  /* cash_mul_int4() */
 
 
@@ -537,7 +537,7 @@ cash_mul_int4(Cash *c, int4 i)
 Cash *
 int4_mul_cash(int4 i, Cash *c)
 {
-   return (cash_mul_int4(c, i));
+   return cash_mul_int4(c, i);
 }  /* int4_mul_cash() */
 
 
@@ -553,7 +553,7 @@ cash_div_int4(Cash *c, int4 i)
    Cash       *result;
 
    if (!PointerIsValid(c))
-       return (NULL);
+       return NULL;
 
    if (!PointerIsValid(result = palloc(sizeof(Cash))))
        elog(ERROR, "Memory allocation failed, can't divide cash", NULL);
@@ -563,7 +563,7 @@ cash_div_int4(Cash *c, int4 i)
 
    *result = rint(*c / i);
 
-   return (result);
+   return result;
 }  /* cash_div_int4() */
 
 
@@ -576,14 +576,14 @@ cash_mul_int2(Cash *c, int2 s)
    Cash       *result;
 
    if (!PointerIsValid(c))
-       return (NULL);
+       return NULL;
 
    if (!PointerIsValid(result = palloc(sizeof(Cash))))
        elog(ERROR, "Memory allocation failed, can't multiply cash", NULL);
 
    *result = ((s) * (*c));
 
-   return (result);
+   return result;
 }  /* cash_mul_int2() */
 
 
@@ -593,7 +593,7 @@ cash_mul_int2(Cash *c, int2 s)
 Cash *
 int2_mul_cash(int2 s, Cash *c)
 {
-   return (cash_mul_int2(c, s));
+   return cash_mul_int2(c, s);
 }  /* int2_mul_cash() */
 
 
@@ -609,7 +609,7 @@ cash_div_int2(Cash *c, int2 s)
    Cash       *result;
 
    if (!PointerIsValid(c))
-       return (NULL);
+       return NULL;
 
    if (!PointerIsValid(result = palloc(sizeof(Cash))))
        elog(ERROR, "Memory allocation failed, can't divide cash", NULL);
@@ -619,7 +619,7 @@ cash_div_int2(Cash *c, int2 s)
 
    *result = rint(*c / s);
 
-   return (result);
+   return result;
 }  /* cash_div_int2() */
 
 
@@ -632,14 +632,14 @@ cashlarger(Cash *c1, Cash *c2)
    Cash       *result;
 
    if (!PointerIsValid(c1) || !PointerIsValid(c2))
-       return (NULL);
+       return NULL;
 
    if (!PointerIsValid(result = palloc(sizeof(Cash))))
        elog(ERROR, "Memory allocation failed, can't return larger cash", NULL);
 
    *result = ((*c1 > *c2) ? *c1 : *c2);
 
-   return (result);
+   return result;
 }  /* cashlarger() */
 
 
@@ -652,14 +652,14 @@ cashsmaller(Cash *c1, Cash *c2)
    Cash       *result;
 
    if (!PointerIsValid(c1) || !PointerIsValid(c2))
-       return (NULL);
+       return NULL;
 
    if (!PointerIsValid(result = palloc(sizeof(Cash))))
        elog(ERROR, "Memory allocation failed, can't return smaller cash", NULL);
 
    *result = ((*c1 < *c2) ? *c1 : *c2);
 
-   return (result);
+   return result;
 }  /* cashsmaller() */
 
 
@@ -714,7 +714,7 @@ cash_words_out(Cash *value)
    strcat(buf, num_word(m0));
    strcat(buf, m0 == 1 ? " cent" : " cents");
    *buf = toupper(*buf);
-   return (buf);
+   return buf;
 }  /* cash_words_out() */
 
 
@@ -737,13 +737,13 @@ num_word(Cash value)
 
    /* deal with the simple cases first */
    if (value <= 20)
-       return (small[value]);
+       return small[value];
 
    /* is it an even multiple of 100? */
    if (!tu)
    {
        sprintf(buf, "%s hundred", small[value / 100]);
-       return (buf);
+       return buf;
    }
 
    /* more than 99? */
@@ -772,5 +772,5 @@ num_word(Cash value)
            sprintf(buf, "%s %s", big[tu / 10], small[tu % 10]);
    }
 
-   return (buf);
+   return buf;
 }  /* num_word() */
index 466eeb0c2a78accfabec352dfbc7ab8cb716f46c..aec4bf8b192f94ad96850b44c0bab97b4d9faa7c 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/adt/char.c,v 1.18 1998/04/26 04:07:28 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/adt/char.c,v 1.19 1998/09/01 03:25:50 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -29,8 +29,8 @@ int32
 charin(char *ch)
 {
    if (ch == NULL)
-       return ((int32) NULL);
-   return ((int32) *ch);
+       return (int32) NULL;
+   return (int32) *ch;
 }
 
 /*
@@ -43,7 +43,7 @@ charout(int32 ch)
 
    result[0] = (char) ch;
    result[1] = '\0';
-   return (result);
+   return result;
 }
 
 /*
@@ -62,7 +62,7 @@ cidin(char *s)
    else
        c = atoi(s);
 
-   return ((int32) c);
+   return (int32) c;
 }
 
 /*
@@ -80,7 +80,7 @@ cidout(int32 c)
    result = palloc(12);
    c2 = (CommandId) c;
    sprintf(result, "%u", (unsigned) (c2));
-   return (result);
+   return result;
 }
 
 
@@ -91,65 +91,65 @@ cidout(int32 c)
 bool
 chareq(int8 arg1, int8 arg2)
 {
-   return (arg1 == arg2);
+   return arg1 == arg2;
 }
 
 bool
 charne(int8 arg1, int8 arg2)
 {
-   return (arg1 != arg2);
+   return arg1 != arg2;
 }
 
 bool
 charlt(int8 arg1, int8 arg2)
 {
-   return ((uint8) arg1 < (uint8) arg2);
+   return (uint8) arg1 < (uint8) arg2;
 }
 
 bool
 charle(int8 arg1, int8 arg2)
 {
-   return ((uint8) arg1 <= (uint8) arg2);
+   return (uint8) arg1 <= (uint8) arg2;
 }
 
 bool
 chargt(int8 arg1, int8 arg2)
 {
-   return ((uint8) arg1 > (uint8) arg2);
+   return (uint8) arg1 > (uint8) arg2;
 }
 
 bool
 charge(int8 arg1, int8 arg2)
 {
-   return ((uint8) arg1 >= (uint8) arg2);
+   return (uint8) arg1 >= (uint8) arg2;
 }
 
 int8
 charpl(int8 arg1, int8 arg2)
 {
-   return (arg1 + arg2);
+   return arg1 + arg2;
 }
 
 int8
 charmi(int8 arg1, int8 arg2)
 {
-   return (arg1 - arg2);
+   return arg1 - arg2;
 }
 
 int8
 charmul(int8 arg1, int8 arg2)
 {
-   return (arg1 * arg2);
+   return arg1 * arg2;
 }
 
 int8
 chardiv(int8 arg1, int8 arg2)
 {
-   return (arg1 / arg2);
+   return arg1 / arg2;
 }
 
 bool
 cideq(int8 arg1, int8 arg2)
 {
-   return (arg1 == arg2);
+   return arg1 == arg2;
 }
index 2eeebfb12d70c7c1e1dc9e472097a99d7b6352f4..05d9a52bc54d0557d4ebdd483117ea8811b048be 100644 (file)
@@ -6,7 +6,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/chunk.c,v 1.16 1998/02/26 04:36:56 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/chunk.c,v 1.17 1998/09/01 03:25:52 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -41,20 +41,20 @@ static CHUNK_INFO cInfo;
 
 /* non-export function prototypes */
 static int
-_FindBestChunk(int size, int dmax[], int dbest[], int dim,
+_FindBestChunk(int size, int *dmax, int *dbest, int dim,
               int A[MAXPAT][MAXDIM + 1], int N);
-static int get_next(int d[], int k, int C, int dmax[]);
-static void initialize_info(CHUNK_INFO *A, int ndim, int dim[], int chunk[]);
+static int get_next(int *d, int k, int C, int *dmax);
+static void initialize_info(CHUNK_INFO *A, int ndim, int *dim, int *chunk);
 
 #ifdef LOARRAY
 static void
-_ConvertToChunkFile(int n, int baseSize, int dim[], int C[],
+_ConvertToChunkFile(int n, int baseSize, int *dim, int *C,
                    int srcfd, int destfd);
 static void
-read_chunk(int chunk_no[], int C[], char a_chunk[], int srcfd,
-          int n, int baseSize, int PX[], int dist[]);
+read_chunk(int *chunk_no, int *C, char *a_chunk, int srcfd,
+          int n, int baseSize, int *PX, int *dist);
 static int write_chunk(struct varlena * a_chunk, int ofile);
-static int seek_and_read(int pos, int size, char buff[], int fp, int from);
+static int seek_and_read(int pos, int size, char *buff, int fp, int from);
 
 #endif
 static int
@@ -74,7 +74,7 @@ char *
 _ChunkArray(int fd,
            FILE *afd,
            int ndim,
-           int dim[],
+           int *dim,
            int baseSize,
            int *nbytes,
            char *chunkfile)
@@ -172,8 +172,8 @@ GetChunkSize(FILE *fd,
  */
 static int
 _FindBestChunk(int size,
-              int dmax[],
-              int dbest[],
+              int *dmax,
+              int *dbest,
               int dim,
               int A[MAXPAT][MAXDIM + 1],
               int N)
@@ -188,8 +188,8 @@ _FindBestChunk(int size,
    {
 
        /*
-        * compute the number of page fetches for a given chunk size (d[])
-        * and access pattern (A[][])
+        * compute the number of page fetches for a given chunk size (*d)
+        * and access pattern (**A)
         */
        int         i,
                    j,
@@ -213,7 +213,7 @@ _FindBestChunk(int size,
                ;
        }
    }
-   return (mintc);
+   return mintc;
 }
 
 /*----------------------------------------------------------------------
@@ -222,7 +222,7 @@ _FindBestChunk(int size,
  *---------------------------------------------------------------------
  */
 static int
-get_next(int d[], int k, int C, int dmax[])
+get_next(int *d, int k, int C, int *dmax)
 {
    int         i,
                j,
@@ -236,7 +236,7 @@ get_next(int d[], int k, int C, int dmax[])
            d[j] = min(temp, dmax[j]);
            temp = max(1, temp / d[j]);
        }
-       return (1);
+       return 1;
    }
 
    for (j = 0, temp = 1; j < k; j++)
@@ -249,7 +249,7 @@ get_next(int d[], int k, int C, int dmax[])
            break;
    }
    if (i < 0)
-       return (0);
+       return 0;
 
    d[i]++;
    j = C / temp;
@@ -262,7 +262,7 @@ get_next(int d[], int k, int C, int dmax[])
        d[j] = min(temp, dmax[j]);
        temp = max(1, temp / d[j]);
    }
-   return (1);
+   return 1;
 }
 
 #ifdef LOARRAY
@@ -272,7 +272,7 @@ static char a_chunk[BLCKSZ + VARHDRSZ]; /* VARHDRSZ since a_chunk is in
 #endif
 
 static void
-initialize_info(CHUNK_INFO *A, int ndim, int dim[], int chunk[])
+initialize_info(CHUNK_INFO *A, int ndim, int *dim, int *chunk)
 {
    int         i;
 
@@ -295,8 +295,8 @@ initialize_info(CHUNK_INFO *A, int ndim, int dim[], int chunk[])
 static void
 _ConvertToChunkFile(int n,
                    int baseSize,
-                   int dim[],
-                   int C[],
+                   int *dim,
+                   int *C,
                    int srcfd,
                    int destfd)
 {
@@ -335,14 +335,14 @@ _ConvertToChunkFile(int n,
  *--------------------------------------------------------------------------
  */
 static void
-read_chunk(int chunk_no[],
-          int C[],
-          char a_chunk[],
+read_chunk(int *chunk_no,
+          int *C,
+          char *a_chunk,
           int srcfd,
           int n,
           int baseSize,
-          int PX[],
-          int dist[])
+          int *PX,
+          int *dist)
 {
    int         i,
                j,
@@ -392,7 +392,7 @@ write_chunk(struct varlena * a_chunk, int ofile)
 #ifdef LOARRAY
    got_n = LOwrite(ofile, a_chunk);
 #endif
-   return (got_n);
+   return got_n;
 }
 
 /*--------------------------------------------------------------------------
@@ -403,7 +403,7 @@ write_chunk(struct varlena * a_chunk, int ofile)
  *--------------------------------------------------------------------------
  */
 static int
-seek_and_read(int pos, int size, char buff[], int fp, int from)
+seek_and_read(int pos, int size, char *buff, int fp, int from)
 {
    struct varlena *v = NULL;
 
@@ -417,7 +417,7 @@ seek_and_read(int pos, int size, char buff[], int fp, int from)
        elog(ERROR, "File read error");
    memmove(buff, VARDATA(v), size);
    pfree(v);
-   return (1);
+   return 1;
 
 }
 
@@ -430,8 +430,8 @@ seek_and_read(int pos, int size, char buff[], int fp, int from)
  *---------------------------------------------------------------------------
  */
 int
-_ReadChunkArray(int st[],
-               int endp[],
+_ReadChunkArray(int *st,
+               int *endp,
                int bsize,
                int fp,
                char *destfp,
@@ -576,7 +576,7 @@ _ReadChunkArray(int st[],
            block_seek += (to_read / bsize);
 
            /*
-            * compute next tuple in range[]
+            * compute next tuple in *range
             */
            {
                int         x;
@@ -620,7 +620,7 @@ _ReadChunkArray(int st[],
            range_end[i] = min((chunk_st[i] + chunk_off[i]) * C[i] + C[i] - 1, endp[i]);
        }
    } while (jj != -1);
-   return (words_read);
+   return words_read;
 }
 
 /*------------------------------------------------------------------------
@@ -630,7 +630,7 @@ _ReadChunkArray(int st[],
  *-------------------------------------------------------------------------
  */
 struct varlena *
-_ReadChunkArray1El(int st[],
+_ReadChunkArray1El(int *st,
                   int bsize,
                   int fp,
                   ArrayType *array,
index 0edd618656b9f00079b7b35879845bed4b5b0ac6..720178c400562757b1a9814a4e0d930f82a271a1 100644 (file)
@@ -9,7 +9,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.25 1998/06/15 18:39:34 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.26 1998/09/01 03:25:53 momjian Exp $
  *
  * NOTES
  *  This code is actually (almost) unused.
@@ -97,8 +97,8 @@ static int    sec_tab[] = {
 static void reltime2tm(int32 time, struct tm * tm);
 
 #if FALSE
-static int correct_unit(char unit[], int *unptr);
-static int correct_dir(char direction[], int *signptr);
+static int correct_unit(char *unit, int *unptr);
+static int correct_dir(char *direction, int *signptr);
 
 #endif
 
@@ -147,14 +147,14 @@ reltimein(char *str)
        case DTK_DELTA:
            result = ((((tm->tm_hour * 60) + tm->tm_min) * 60) + tm->tm_sec);
            result += (((tm->tm_year * 365) + (tm->tm_mon * 30) + tm->tm_mday) * (24 * 60 * 60));
-           return (result);
+           return result;
 
        default:
-           return (INVALID_RELTIME);
+           return INVALID_RELTIME;
    }
 
    elog(ERROR, "Bad reltime (internal coding error) '%s'", str);
-   return (INVALID_RELTIME);
+   return INVALID_RELTIME;
 }  /* reltimein() */
 
 
@@ -183,7 +183,7 @@ reltimeout(int32 time)
    result = palloc(strlen(buf) + 1);
    strcpy(result, buf);
 
-   return (result);
+   return result;
 }  /* reltimeout() */
 
 
@@ -217,7 +217,7 @@ timestring = (char *) palloc(Max(strlen(INVALID_RELTIME_STR),
 if (timevalue == INVALID_RELTIME)
 {
    strcpy(timestring, INVALID_RELTIME_STR);
-   return (timestring);
+   return timestring;
 }
 
 if (timevalue == 0)
@@ -236,7 +236,7 @@ if (quantity >= 0)
 else
    sprintf(timestring, "%c %lu %s %s", RELTIME_LABEL,
            (quantity * -1), unit_tab[unitnr], RELTIME_PAST);
-return (timestring);
+return timestring;
 }
 
 #endif
@@ -269,7 +269,7 @@ tintervalin(char *intervalstr)
        interval->data[1] = i_end;
        interval->status = T_INTERVAL_VALID;
    }
-   return (interval);
+   return interval;
 }
 
 
@@ -298,7 +298,7 @@ tintervalout(TimeInterval interval)
        pfree(p);
    }
    strcat(i_str, "\"]\0");
-   return (i_str);
+   return i_str;
 }
 
 
@@ -352,7 +352,7 @@ timespan_reltime(TimeSpan *timespan)
        time = (((span > INT_MIN) && (span < INT_MAX)) ? span : INVALID_RELTIME);
    }
 
-   return (time);
+   return time;
 }  /* timespan_reltime() */
 
 
@@ -380,7 +380,7 @@ reltime_timespan(RelativeTime reltime)
            result->month = ((12 * year) + month);
    }
 
-   return (result);
+   return result;
 }  /* reltime_timespan() */
 
 
@@ -427,9 +427,9 @@ timepl(AbsoluteTime t1, RelativeTime t2)
        RelativeTimeIsValid(t2) &&
        ((t2 > 0) ? (t1 < NOEND_ABSTIME - t2)
         : (t1 > NOSTART_ABSTIME - t2)))        /* prevent overflow */
-       return (t1 + t2);
+       return t1 + t2;
 
-   return (INVALID_ABSTIME);
+   return INVALID_ABSTIME;
 }
 
 
@@ -446,9 +446,9 @@ timemi(AbsoluteTime t1, RelativeTime t2)
        RelativeTimeIsValid(t2) &&
        ((t2 > 0) ? (t1 > NOSTART_ABSTIME + t2)
         : (t1 < NOEND_ABSTIME + t2)))  /* prevent overflow */
-       return (t1 - t2);
+       return t1 - t2;
 
-   return (INVALID_ABSTIME);
+   return INVALID_ABSTIME;
 }
 
 
@@ -465,9 +465,9 @@ abstimemi(AbsoluteTime t1, AbsoluteTime t2)
 
    if (AbsoluteTimeIsReal(t1) &&
        AbsoluteTimeIsReal(t2))
-       return (t1 - t2);
+       return t1 - t2;
 
-   return (INVALID_RELTIME);
+   return INVALID_RELTIME;
 }
 
 
@@ -480,7 +480,7 @@ ininterval(AbsoluteTime t, TimeInterval interval)
    if (interval->status == T_INTERVAL_VALID && t != INVALID_ABSTIME)
        return (abstimege(t, interval->data[0]) &&
                abstimele(t, interval->data[1]));
-   return (0);
+   return 0;
 }
 
 /*
@@ -490,9 +490,9 @@ RelativeTime
 intervalrel(TimeInterval interval)
 {
    if (interval->status == T_INTERVAL_VALID)
-       return (abstimemi(interval->data[1], interval->data[0]));
+       return abstimemi(interval->data[1], interval->data[0]);
    else
-       return (INVALID_RELTIME);
+       return INVALID_RELTIME;
 }
 
 /*
@@ -506,8 +506,8 @@ timenow()
    time_t      sec;
 
    if (time(&sec) < 0)
-       return (INVALID_ABSTIME);
-   return ((AbsoluteTime) sec);
+       return INVALID_ABSTIME;
+   return (AbsoluteTime) sec;
 }
 
 /*
@@ -523,7 +523,7 @@ reltimeeq(RelativeTime t1, RelativeTime t2)
 {
    if (t1 == INVALID_RELTIME || t2 == INVALID_RELTIME)
        return 0;
-   return (t1 == t2);
+   return t1 == t2;
 }
 
 bool
@@ -531,7 +531,7 @@ reltimene(RelativeTime t1, RelativeTime t2)
 {
    if (t1 == INVALID_RELTIME || t2 == INVALID_RELTIME)
        return 0;
-   return (t1 != t2);
+   return t1 != t2;
 }
 
 bool
@@ -539,7 +539,7 @@ reltimelt(RelativeTime t1, RelativeTime t2)
 {
    if (t1 == INVALID_RELTIME || t2 == INVALID_RELTIME)
        return 0;
-   return (t1 < t2);
+   return t1 < t2;
 }
 
 bool
@@ -547,7 +547,7 @@ reltimegt(RelativeTime t1, RelativeTime t2)
 {
    if (t1 == INVALID_RELTIME || t2 == INVALID_RELTIME)
        return 0;
-   return (t1 > t2);
+   return t1 > t2;
 }
 
 bool
@@ -555,7 +555,7 @@ reltimele(RelativeTime t1, RelativeTime t2)
 {
    if (t1 == INVALID_RELTIME || t2 == INVALID_RELTIME)
        return 0;
-   return (t1 <= t2);
+   return t1 <= t2;
 }
 
 bool
@@ -563,7 +563,7 @@ reltimege(RelativeTime t1, RelativeTime t2)
 {
    if (t1 == INVALID_RELTIME || t2 == INVALID_RELTIME)
        return 0;
-   return (t1 >= t2);
+   return t1 >= t2;
 }
 
 
@@ -575,7 +575,7 @@ bool
 intervalsame(TimeInterval i1, TimeInterval i2)
 {
    if (i1->status == T_INTERVAL_INVAL || i2->status == T_INTERVAL_INVAL)
-       return (FALSE);         /* invalid interval */
+       return FALSE;           /* invalid interval */
    return (abstimeeq(i1->data[0], i2->data[0]) &&
            abstimeeq(i1->data[1], i2->data[1]));
 }  /* intervalsame() */
@@ -594,7 +594,7 @@ intervaleq(TimeInterval i1, TimeInterval i2)
                t21;
 
    if (i1->status == T_INTERVAL_INVAL || i2->status == T_INTERVAL_INVAL)
-       return (FALSE);         /* invalid interval */
+       return FALSE;           /* invalid interval */
 
    t10 = i1->data[0];
    t11 = i1->data[1];
@@ -603,7 +603,7 @@ intervaleq(TimeInterval i1, TimeInterval i2)
 
    if ((t10 == INVALID_ABSTIME) || (t20 == INVALID_ABSTIME)
        || (t20 == INVALID_ABSTIME) || (t21 == INVALID_ABSTIME))
-       return (FALSE);
+       return FALSE;
 
    if (t10 == CURRENT_ABSTIME)
        t10 = GetCurrentTransactionStartTime();
@@ -614,7 +614,7 @@ intervaleq(TimeInterval i1, TimeInterval i2)
    if (t21 == CURRENT_ABSTIME)
        t21 = GetCurrentTransactionStartTime();
 
-   return ((t11 - t10) == (t21 - t20));
+   return (t11 - t10) == (t21 - t20);
 }  /* intervaleq() */
 
 /*
@@ -630,7 +630,7 @@ intervalne(TimeInterval i1, TimeInterval i2)
                t21;
 
    if (i1->status == T_INTERVAL_INVAL || i2->status == T_INTERVAL_INVAL)
-       return (FALSE);         /* invalid interval */
+       return FALSE;           /* invalid interval */
 
    t10 = i1->data[0];
    t11 = i1->data[1];
@@ -639,7 +639,7 @@ intervalne(TimeInterval i1, TimeInterval i2)
 
    if ((t10 == INVALID_ABSTIME) || (t20 == INVALID_ABSTIME)
        || (t20 == INVALID_ABSTIME) || (t21 == INVALID_ABSTIME))
-       return (FALSE);
+       return FALSE;
 
    if (t10 == CURRENT_ABSTIME)
        t10 = GetCurrentTransactionStartTime();
@@ -650,7 +650,7 @@ intervalne(TimeInterval i1, TimeInterval i2)
    if (t21 == CURRENT_ABSTIME)
        t21 = GetCurrentTransactionStartTime();
 
-   return ((t11 - t10) != (t21 - t20));
+   return (t11 - t10) != (t21 - t20);
 }  /* intervalne() */
 
 /*
@@ -666,7 +666,7 @@ intervallt(TimeInterval i1, TimeInterval i2)
                t21;
 
    if (i1->status == T_INTERVAL_INVAL || i2->status == T_INTERVAL_INVAL)
-       return (FALSE);         /* invalid interval */
+       return FALSE;           /* invalid interval */
 
    t10 = i1->data[0];
    t11 = i1->data[1];
@@ -675,7 +675,7 @@ intervallt(TimeInterval i1, TimeInterval i2)
 
    if ((t10 == INVALID_ABSTIME) || (t20 == INVALID_ABSTIME)
        || (t20 == INVALID_ABSTIME) || (t21 == INVALID_ABSTIME))
-       return (FALSE);
+       return FALSE;
 
    if (t10 == CURRENT_ABSTIME)
        t10 = GetCurrentTransactionStartTime();
@@ -686,7 +686,7 @@ intervallt(TimeInterval i1, TimeInterval i2)
    if (t21 == CURRENT_ABSTIME)
        t21 = GetCurrentTransactionStartTime();
 
-   return ((t11 - t10) < (t21 - t20));
+   return (t11 - t10) < (t21 - t20);
 }  /* intervallt() */
 
 /*
@@ -702,7 +702,7 @@ intervalle(TimeInterval i1, TimeInterval i2)
                t21;
 
    if (i1->status == T_INTERVAL_INVAL || i2->status == T_INTERVAL_INVAL)
-       return (FALSE);         /* invalid interval */
+       return FALSE;           /* invalid interval */
 
    t10 = i1->data[0];
    t11 = i1->data[1];
@@ -711,7 +711,7 @@ intervalle(TimeInterval i1, TimeInterval i2)
 
    if ((t10 == INVALID_ABSTIME) || (t20 == INVALID_ABSTIME)
        || (t20 == INVALID_ABSTIME) || (t21 == INVALID_ABSTIME))
-       return (FALSE);
+       return FALSE;
 
    if (t10 == CURRENT_ABSTIME)
        t10 = GetCurrentTransactionStartTime();
@@ -722,7 +722,7 @@ intervalle(TimeInterval i1, TimeInterval i2)
    if (t21 == CURRENT_ABSTIME)
        t21 = GetCurrentTransactionStartTime();
 
-   return ((t11 - t10) <= (t21 - t20));
+   return (t11 - t10) <= (t21 - t20);
 }  /* intervalle() */
 
 /*
@@ -738,7 +738,7 @@ intervalgt(TimeInterval i1, TimeInterval i2)
                t21;
 
    if (i1->status == T_INTERVAL_INVAL || i2->status == T_INTERVAL_INVAL)
-       return (FALSE);         /* invalid interval */
+       return FALSE;           /* invalid interval */
 
    t10 = i1->data[0];
    t11 = i1->data[1];
@@ -747,7 +747,7 @@ intervalgt(TimeInterval i1, TimeInterval i2)
 
    if ((t10 == INVALID_ABSTIME) || (t20 == INVALID_ABSTIME)
        || (t20 == INVALID_ABSTIME) || (t21 == INVALID_ABSTIME))
-       return (FALSE);
+       return FALSE;
 
    if (t10 == CURRENT_ABSTIME)
        t10 = GetCurrentTransactionStartTime();
@@ -758,7 +758,7 @@ intervalgt(TimeInterval i1, TimeInterval i2)
    if (t21 == CURRENT_ABSTIME)
        t21 = GetCurrentTransactionStartTime();
 
-   return ((t11 - t10) > (t21 - t20));
+   return (t11 - t10) > (t21 - t20);
 }  /* intervalgt() */
 
 /*
@@ -774,7 +774,7 @@ intervalge(TimeInterval i1, TimeInterval i2)
                t21;
 
    if (i1->status == T_INTERVAL_INVAL || i2->status == T_INTERVAL_INVAL)
-       return (FALSE);         /* invalid interval */
+       return FALSE;           /* invalid interval */
 
    t10 = i1->data[0];
    t11 = i1->data[1];
@@ -783,7 +783,7 @@ intervalge(TimeInterval i1, TimeInterval i2)
 
    if ((t10 == INVALID_ABSTIME) || (t20 == INVALID_ABSTIME)
        || (t20 == INVALID_ABSTIME) || (t21 == INVALID_ABSTIME))
-       return (FALSE);
+       return FALSE;
 
    if (t10 == CURRENT_ABSTIME)
        t10 = GetCurrentTransactionStartTime();
@@ -794,7 +794,7 @@ intervalge(TimeInterval i1, TimeInterval i2)
    if (t21 == CURRENT_ABSTIME)
        t21 = GetCurrentTransactionStartTime();
 
-   return ((t11 - t10) >= (t21 - t20));
+   return (t11 - t10) >= (t21 - t20);
 }  /* intervalge() */
 
 
@@ -808,9 +808,9 @@ intervalleneq(TimeInterval i, RelativeTime t)
    RelativeTime rt;
 
    if ((i->status == T_INTERVAL_INVAL) || (t == INVALID_RELTIME))
-       return (0);
+       return 0;
    rt = intervalrel(i);
-   return (rt != INVALID_RELTIME && rt == t);
+   return rt != INVALID_RELTIME && rt == t;
 }
 
 /*
@@ -823,9 +823,9 @@ intervallenne(TimeInterval i, RelativeTime t)
    RelativeTime rt;
 
    if ((i->status == T_INTERVAL_INVAL) || (t == INVALID_RELTIME))
-       return (0);
+       return 0;
    rt = intervalrel(i);
-   return (rt != INVALID_RELTIME && rt != t);
+   return rt != INVALID_RELTIME && rt != t;
 }
 
 /*
@@ -838,9 +838,9 @@ intervallenlt(TimeInterval i, RelativeTime t)
    RelativeTime rt;
 
    if ((i->status == T_INTERVAL_INVAL) || (t == INVALID_RELTIME))
-       return (0);
+       return 0;
    rt = intervalrel(i);
-   return (rt != INVALID_RELTIME && rt < t);
+   return rt != INVALID_RELTIME && rt < t;
 }
 
 /*
@@ -853,9 +853,9 @@ intervallengt(TimeInterval i, RelativeTime t)
    RelativeTime rt;
 
    if ((i->status == T_INTERVAL_INVAL) || (t == INVALID_RELTIME))
-       return (0);
+       return 0;
    rt = intervalrel(i);
-   return (rt != INVALID_RELTIME && rt > t);
+   return rt != INVALID_RELTIME && rt > t;
 }
 
 /*
@@ -868,9 +868,9 @@ intervallenle(TimeInterval i, RelativeTime t)
    RelativeTime rt;
 
    if ((i->status == T_INTERVAL_INVAL) || (t == INVALID_RELTIME))
-       return (0);
+       return 0;
    rt = intervalrel(i);
-   return (rt != INVALID_RELTIME && rt <= t);
+   return rt != INVALID_RELTIME && rt <= t;
 }
 
 /*
@@ -883,9 +883,9 @@ intervallenge(TimeInterval i, RelativeTime t)
    RelativeTime rt;
 
    if ((i->status == T_INTERVAL_INVAL) || (t == INVALID_RELTIME))
-       return (0);
+       return 0;
    rt = intervalrel(i);
-   return (rt != INVALID_RELTIME && rt >= t);
+   return rt != INVALID_RELTIME && rt >= t;
 }
 
 /*
@@ -895,7 +895,7 @@ bool
 intervalct(TimeInterval i1, TimeInterval i2)
 {
    if (i1->status == T_INTERVAL_INVAL || i2->status == T_INTERVAL_INVAL)
-       return (0);
+       return 0;
    return (abstimele(i1->data[0], i2->data[0]) &&
            abstimege(i1->data[1], i2->data[1]));
 }
@@ -907,7 +907,7 @@ bool
 intervalov(TimeInterval i1, TimeInterval i2)
 {
    if (i1->status == T_INTERVAL_INVAL || i2->status == T_INTERVAL_INVAL)
-       return (0);
+       return 0;
    return (!(abstimelt(i1->data[1], i2->data[0]) ||
              abstimegt(i1->data[0], i2->data[1])));
 }
@@ -920,7 +920,7 @@ intervalstart(TimeInterval i)
 {
    if (i->status == T_INTERVAL_INVAL)
        return INVALID_ABSTIME;
-   return (i->data[0]);
+   return i->data[0];
 }
 
 /*
@@ -931,7 +931,7 @@ intervalend(TimeInterval i)
 {
    if (i->status == T_INTERVAL_INVAL)
        return INVALID_ABSTIME;
-   return (i->data[1]);
+   return i->data[1];
 }
 
 
@@ -971,7 +971,7 @@ isreltime(char *str)
    switch (dtype)
    {
        case (DTK_DELTA):
-           return ((abs(tm->tm_year) <= 68) ? 1 : 0);
+           return (abs(tm->tm_year) <= 68) ? 1 : 0;
            break;
 
        case (DTK_INVALID):
@@ -1024,14 +1024,14 @@ while ((c = *p) != '\0')
 
  /* Test whether 'invalid time' identifier or not */
 if (!strncmp(INVALID_RELTIME_STR, p, strlen(INVALID_RELTIME_STR) + 1))
-   return (2);                 /* correct 'invalid time' identifier found */
+   return 2;                   /* correct 'invalid time' identifier found */
 
  /* handle label of relative time */
 if (c != RELTIME_LABEL)
-   return (0);                 /* syntax error */
+   return 0;                   /* syntax error */
 c = *++p;
 if (c != ' ')
-   return (0);                 /* syntax error */
+   return 0;                   /* syntax error */
 p++;
  /* handle the quantity */
 *quantity = 0;
@@ -1048,7 +1048,7 @@ for (;;)
        if (c == ' ')
            break;              /* correct quantity found */
        else
-           return (0);         /* syntax error */
+           return 0;           /* syntax error */
    }
 }
 
@@ -1070,7 +1070,7 @@ for (;;)
            && correct_unit(unit, unitnr))
            break;              /* correct unit found */
        else
-           return (0);         /* syntax error */
+           return 0;           /* syntax error */
    }
 }
 
@@ -1102,11 +1102,11 @@ for (;;)
            break;              /* correct direction found */
        }
        else
-           return (0);         /* syntax error */
+           return 0;           /* syntax error */
    }
 }
 
-return (1);
+return 1;
 }
 
 /*
@@ -1117,7 +1117,7 @@ return (1);
  *                    (see function isreltime())
  */
 static int
-correct_unit(char unit[], int *unptr)
+correct_unit(char *unit, int *unptr)
 {
    int         j = 0;
 
@@ -1126,11 +1126,11 @@ correct_unit(char unit[], int *unptr)
        if (strncmp(unit, unit_tab[j], strlen(unit_tab[j])) == 0)
        {
            *unptr = j;
-           return (1);
+           return 1;
        }
        j++;
    }
-   return (0);                 /* invalid unit descriptor */
+   return 0;                   /* invalid unit descriptor */
 }
 
 /*
@@ -1141,16 +1141,16 @@ correct_unit(char unit[], int *unptr)
  *                      else  to 1
  */
 static int
-correct_dir(char direction[], int *signptr)
+correct_dir(char *direction, int *signptr)
 {
    *signptr = 1;
    if (strncmp(RELTIME_PAST, direction, strlen(RELTIME_PAST) + 1) == 0)
    {
        *signptr = -1;
-       return (1);
+       return 1;
    }
    else
-       return (0);             /* invalid direction descriptor */
+       return 0;               /* invalid direction descriptor */
 }
 
 #endif
@@ -1188,7 +1188,7 @@ istinterval(char *i_string,
        if (IsSpace(c))
            p++;
        else if (c != '[')
-           return (0);         /* syntax error */
+           return 0;           /* syntax error */
        else
            break;
    }
@@ -1199,13 +1199,13 @@ istinterval(char *i_string,
        if (IsSpace(c))
            p++;
        else if (c != '"')
-           return (0);         /* syntax error */
+           return 0;           /* syntax error */
        else
            break;
    }
    p++;
    if (strncmp(INVALID_INTERVAL_STR, p, strlen(INVALID_INTERVAL_STR)) == 0)
-       return (0);             /* undefined range, handled like a syntax
+       return 0;               /* undefined range, handled like a syntax
                                 * err. */
    /* search for the end of the first date and change it to a NULL */
    p1 = p;
@@ -1229,7 +1229,7 @@ istinterval(char *i_string,
        if (IsSpace(c))
            p++;
        else if (c != '"')
-           return (0);         /* syntax error */
+           return 0;           /* syntax error */
        else
            break;
    }
@@ -1256,16 +1256,16 @@ istinterval(char *i_string,
        if (IsSpace(c))
            p++;
        else if (c != ']')
-           return (0);         /* syntax error */
+           return 0;           /* syntax error */
        else
            break;
    }
    p++;
    c = *p;
    if (c != '\0')
-       return (0);             /* syntax error */
+       return 0;               /* syntax error */
    /* it seems to be a valid interval */
-   return (1);
+   return 1;
 }
 
 
index beb0e719dd6c71566579c0e9566799f8c049a7fd..9b612ea4cf8bbe18c9b89db03149c6ac615949cf 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.24 1998/08/19 02:02:56 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.25 1998/09/01 03:25:54 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -109,7 +109,7 @@ date_in(char *str)
 
    date = (date2j(tm->tm_year, tm->tm_mon, tm->tm_mday) - date2j(2000, 1, 1));
 
-   return (date);
+   return date;
 }  /* date_in() */
 
 /* date_out()
@@ -132,43 +132,43 @@ date_out(DateADT date)
 
    strcpy(result, buf);
 
-   return (result);
+   return result;
 }  /* date_out() */
 
 bool
 date_eq(DateADT dateVal1, DateADT dateVal2)
 {
-   return (dateVal1 == dateVal2);
+   return dateVal1 == dateVal2;
 }
 
 bool
 date_ne(DateADT dateVal1, DateADT dateVal2)
 {
-   return (dateVal1 != dateVal2);
+   return dateVal1 != dateVal2;
 }
 
 bool
 date_lt(DateADT dateVal1, DateADT dateVal2)
 {
-   return (dateVal1 < dateVal2);
+   return dateVal1 < dateVal2;
 }  /* date_lt() */
 
 bool
 date_le(DateADT dateVal1, DateADT dateVal2)
 {
-   return (dateVal1 <= dateVal2);
+   return dateVal1 <= dateVal2;
 }  /* date_le() */
 
 bool
 date_gt(DateADT dateVal1, DateADT dateVal2)
 {
-   return (dateVal1 > dateVal2);
+   return dateVal1 > dateVal2;
 }  /* date_gt() */
 
 bool
 date_ge(DateADT dateVal1, DateADT dateVal2)
 {
-   return (dateVal1 >= dateVal2);
+   return dateVal1 >= dateVal2;
 }  /* date_ge() */
 
 int
@@ -184,13 +184,13 @@ date_cmp(DateADT dateVal1, DateADT dateVal2)
 DateADT
 date_larger(DateADT dateVal1, DateADT dateVal2)
 {
-   return (date_gt(dateVal1, dateVal2) ? dateVal1 : dateVal2);
+   return date_gt(dateVal1, dateVal2) ? dateVal1 : dateVal2;
 }  /* date_larger() */
 
 DateADT
 date_smaller(DateADT dateVal1, DateADT dateVal2)
 {
-   return (date_lt(dateVal1, dateVal2) ? dateVal1 : dateVal2);
+   return date_lt(dateVal1, dateVal2) ? dateVal1 : dateVal2;
 }  /* date_smaller() */
 
 /* Compute difference between two dates in days.
@@ -198,7 +198,7 @@ date_smaller(DateADT dateVal1, DateADT dateVal2)
 int4
 date_mi(DateADT dateVal1, DateADT dateVal2)
 {
-   return (dateVal1 - dateVal2);
+   return dateVal1 - dateVal2;
 }  /* date_mi() */
 
 /* Add a number of days to a date, giving a new date.
@@ -207,7 +207,7 @@ date_mi(DateADT dateVal1, DateADT dateVal2)
 DateADT
 date_pli(DateADT dateVal, int4 days)
 {
-   return (dateVal + days);
+   return dateVal + days;
 }  /* date_pli() */
 
 /* Subtract a number of days from a date, giving a new date.
@@ -215,7 +215,7 @@ date_pli(DateADT dateVal, int4 days)
 DateADT
 date_mii(DateADT dateVal, int4 days)
 {
-   return (date_pli(dateVal, -days));
+   return date_pli(dateVal, -days);
 }  /* date_mii() */
 
 
@@ -245,7 +245,7 @@ date_datetime(DateADT dateVal)
    if (tm2datetime(tm, fsec, &tz, result) != 0)
        elog(ERROR, "Datetime out of range", NULL);
 
-   return (result);
+   return result;
 }  /* date_datetime() */
 
 
@@ -286,7 +286,7 @@ datetime_date(DateTime *datetime)
 
    result = (date2j(tm->tm_year, tm->tm_mon, tm->tm_mday) - date2j(2000, 1, 1));
 
-   return (result);
+   return result;
 }  /* datetime_date() */
 
 
@@ -328,7 +328,7 @@ abstime_date(AbsoluteTime abstime)
            break;
    }
 
-   return (result);
+   return result;
 }  /* abstime_date() */
 
 
@@ -453,7 +453,7 @@ time_in(char *str)
 
    *time = ((((tm->tm_hour * 60) + tm->tm_min) * 60) + tm->tm_sec + fsec);
 
-   return (time);
+   return time;
 }  /* time_in() */
 
 
@@ -482,7 +482,7 @@ time_out(TimeADT *time)
 
    strcpy(result, buf);
 
-   return (result);
+   return result;
 }  /* time_out() */
 
 
@@ -490,60 +490,60 @@ bool
 time_eq(TimeADT *time1, TimeADT *time2)
 {
    if (!PointerIsValid(time1) || !PointerIsValid(time2))
-       return (FALSE);
+       return FALSE;
 
-   return (*time1 == *time2);
+   return *time1 == *time2;
 }  /* time_eq() */
 
 bool
 time_ne(TimeADT *time1, TimeADT *time2)
 {
    if (!PointerIsValid(time1) || !PointerIsValid(time2))
-       return (FALSE);
+       return FALSE;
 
-   return (*time1 != *time2);
+   return *time1 != *time2;
 }  /* time_eq() */
 
 bool
 time_lt(TimeADT *time1, TimeADT *time2)
 {
    if (!PointerIsValid(time1) || !PointerIsValid(time2))
-       return (FALSE);
+       return FALSE;
 
-   return (*time1 < *time2);
+   return *time1 < *time2;
 }  /* time_eq() */
 
 bool
 time_le(TimeADT *time1, TimeADT *time2)
 {
    if (!PointerIsValid(time1) || !PointerIsValid(time2))
-       return (FALSE);
+       return FALSE;
 
-   return (*time1 <= *time2);
+   return *time1 <= *time2;
 }  /* time_eq() */
 
 bool
 time_gt(TimeADT *time1, TimeADT *time2)
 {
    if (!PointerIsValid(time1) || !PointerIsValid(time2))
-       return (FALSE);
+       return FALSE;
 
-   return (*time1 > *time2);
+   return *time1 > *time2;
 }  /* time_eq() */
 
 bool
 time_ge(TimeADT *time1, TimeADT *time2)
 {
    if (!PointerIsValid(time1) || !PointerIsValid(time2))
-       return (FALSE);
+       return FALSE;
 
-   return (*time1 >= *time2);
+   return *time1 >= *time2;
 }  /* time_eq() */
 
 int
 time_cmp(TimeADT *time1, TimeADT *time2)
 {
-   return ((*time1 < *time2) ? -1 : (((*time1 > *time2) ? 1 : 0)));
+   return (*time1 < *time2) ? -1 : (((*time1 > *time2) ? 1 : 0));
 }  /* time_cmp() */
 
 
@@ -586,7 +586,7 @@ datetime_time(DateTime *datetime)
 
    *result = ((((tm->tm_hour * 60) + tm->tm_min) * 60) + tm->tm_sec + fsec);
 
-   return (result);
+   return result;
 }  /* datetime_time() */
 
 
@@ -609,12 +609,12 @@ datetime_datetime(DateADT date, TimeADT *time)
        *result += *time;
    }
 
-   return (result);
+   return result;
 }  /* datetime_datetime() */
 
 
 int32                          /* RelativeTime */
 int4reltime(int32 timevalue)
 {
-   return (timevalue);
+   return timevalue;
 }
index c3c93d5eca065449c5b255e64cff89508c5ff34e..5b8fad492bc113f26e6c91d6dcfd4bb256fd35c0 100644 (file)
@@ -6,7 +6,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/adt/datum.c,v 1.10 1998/06/15 19:29:34 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/adt/datum.c,v 1.11 1998/09/01 03:25:55 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -91,7 +91,7 @@ datumGetSize(Datum value, Oid type, bool byVal, Size len)
        }
    }
 
-   return (size);
+   return size;
 }
 
 /*-------------------------------------------------------------------------
@@ -118,7 +118,7 @@ datumCopy(Datum value, Oid type, bool byVal, Size len)
    else
    {
        if (value == 0)
-           return ((Datum) NULL);
+           return (Datum) NULL;
        realSize = datumGetSize(value, type, byVal, len);
 
        /*
@@ -131,7 +131,7 @@ datumCopy(Datum value, Oid type, bool byVal, Size len)
        memmove(s, DatumGetPointer(value), realSize);
        res = (Datum) s;
    }
-   return (res);
+   return res;
 }
 
 /*-------------------------------------------------------------------------
@@ -196,9 +196,9 @@ datumIsEqual(Datum value1, Datum value2, Oid type, bool byVal, Size len)
         * are aligned inside the "Datum".
         */
        if (value1 == value2)
-           return (true);
+           return true;
        else
-           return (false);
+           return false;
    }
    else
    {
@@ -210,12 +210,12 @@ datumIsEqual(Datum value1, Datum value2, Oid type, bool byVal, Size len)
        size1 = datumGetSize(value1, type, byVal, len);
        size2 = datumGetSize(value2, type, byVal, len);
        if (size1 != size2)
-           return (false);
+           return false;
        s1 = (char *) DatumGetPointer(value1);
        s2 = (char *) DatumGetPointer(value2);
        if (!memcmp(s1, s2, size1))
-           return (true);
+           return true;
        else
-           return (false);
+           return false;
    }
 }
index 89f92e2e0fc8d1d96955a5bcf424f333efda621b..fa6854fdc92484459b72fccf2a97238db7bec11c 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.55 1998/06/15 19:29:34 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.56 1998/09/01 03:25:57 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -157,7 +157,7 @@ datetime_in(char *str)
            elog(ERROR, "Internal coding error, can't input datetime '%s'", str);
    }
 
-   return (result);
+   return result;
 }  /* datetime_in() */
 
 /* datetime_out()
@@ -175,7 +175,7 @@ datetime_out(DateTime *dt)
    char        buf[MAXDATELEN + 1];
 
    if (!PointerIsValid(dt))
-       return (NULL);
+       return NULL;
 
    if (DATETIME_IS_RESERVED(*dt))
    {
@@ -194,7 +194,7 @@ datetime_out(DateTime *dt)
 
    strcpy(result, buf);
 
-   return (result);
+   return result;
 }  /* datetime_out() */
 
 
@@ -251,7 +251,7 @@ timespan_in(char *str)
            elog(ERROR, "Internal coding error, can't input timespan '%s'", str);
    }
 
-   return (span);
+   return span;
 }  /* timespan_in() */
 
 /* timespan_out()
@@ -268,10 +268,10 @@ timespan_out(TimeSpan *span)
    char        buf[MAXDATELEN + 1];
 
    if (!PointerIsValid(span))
-       return (NULL);
+       return NULL;
 
    if (timespan2tm(*span, tm, &fsec) != 0)
-       return (NULL);
+       return NULL;
 
    if (EncodeTimeSpan(tm, fsec, DateStyle, buf) != 0)
        elog(ERROR, "Unable to format timespan", NULL);
@@ -279,7 +279,7 @@ timespan_out(TimeSpan *span)
    result = palloc(strlen(buf) + 1);
 
    strcpy(result, buf);
-   return (result);
+   return result;
 }  /* timespan_out() */
 
 
@@ -294,7 +294,7 @@ datetime_finite(DateTime *datetime)
    if (!PointerIsValid(datetime))
        return FALSE;
 
-   return (!DATETIME_NOT_FINITE(*datetime));
+   return !DATETIME_NOT_FINITE(*datetime);
 }  /* datetime_finite() */
 
 bool
@@ -303,7 +303,7 @@ timespan_finite(TimeSpan *timespan)
    if (!PointerIsValid(timespan))
        return FALSE;
 
-   return (!TIMESPAN_NOT_FINITE(*timespan));
+   return !TIMESPAN_NOT_FINITE(*timespan);
 }  /* timespan_finite() */
 
 
@@ -362,7 +362,7 @@ SetDateTime(DateTime dt)
 #endif
    }
 
-   return (dt);
+   return dt;
 }  /* SetDateTime() */
 
 /*     datetime_relop  - is datetime1 relop datetime2
@@ -387,7 +387,7 @@ datetime_eq(DateTime *datetime1, DateTime *datetime2)
    if (DATETIME_IS_RELATIVE(dt2))
        dt2 = SetDateTime(dt2);
 
-   return (dt1 == dt2);
+   return dt1 == dt2;
 }  /* datetime_eq() */
 
 bool
@@ -410,7 +410,7 @@ datetime_ne(DateTime *datetime1, DateTime *datetime2)
    if (DATETIME_IS_RELATIVE(dt2))
        dt2 = SetDateTime(dt2);
 
-   return (dt1 != dt2);
+   return dt1 != dt2;
 }  /* datetime_ne() */
 
 bool
@@ -433,7 +433,7 @@ datetime_lt(DateTime *datetime1, DateTime *datetime2)
    if (DATETIME_IS_RELATIVE(dt2))
        dt2 = SetDateTime(dt2);
 
-   return (dt1 < dt2);
+   return dt1 < dt2;
 }  /* datetime_lt() */
 
 bool
@@ -459,7 +459,7 @@ datetime_gt(DateTime *datetime1, DateTime *datetime2)
 #ifdef DATEDEBUG
    printf("datetime_gt- %f %s greater than %f\n", dt1, ((dt1 > dt2) ? "is" : "is not"), dt2);
 #endif
-   return (dt1 > dt2);
+   return dt1 > dt2;
 }  /* datetime_gt() */
 
 bool
@@ -482,7 +482,7 @@ datetime_le(DateTime *datetime1, DateTime *datetime2)
    if (DATETIME_IS_RELATIVE(dt2))
        dt2 = SetDateTime(dt2);
 
-   return (dt1 <= dt2);
+   return dt1 <= dt2;
 }  /* datetime_le() */
 
 bool
@@ -505,7 +505,7 @@ datetime_ge(DateTime *datetime1, DateTime *datetime2)
    if (DATETIME_IS_RELATIVE(dt2))
        dt2 = SetDateTime(dt2);
 
-   return (dt1 >= dt2);
+   return dt1 >= dt2;
 }  /* datetime_ge() */
 
 
@@ -526,12 +526,12 @@ datetime_cmp(DateTime *datetime1, DateTime *datetime2)
 
    if (DATETIME_IS_INVALID(dt1))
    {
-       return ((DATETIME_IS_INVALID(dt2) ? 0 : 1));
+       return (DATETIME_IS_INVALID(dt2) ? 0 : 1);
 
    }
    else if (DATETIME_IS_INVALID(dt2))
    {
-       return (-1);
+       return -1;
 
    }
    else
@@ -542,7 +542,7 @@ datetime_cmp(DateTime *datetime1, DateTime *datetime2)
            dt2 = SetDateTime(dt2);
    }
 
-   return (((dt1 < dt2) ? -1 : ((dt1 > dt2) ? 1 : 0)));
+   return ((dt1 < dt2) ? -1 : ((dt1 > dt2) ? 1 : 0));
 }  /* datetime_cmp() */
 
 
@@ -593,7 +593,7 @@ timespan_lt(TimeSpan *timespan1, TimeSpan *timespan2)
    if (timespan2->month != 0)
        span2 += (timespan2->month * (30.0 * 86400));
 
-   return (span1 < span2);
+   return span1 < span2;
 }  /* timespan_lt() */
 
 bool
@@ -615,7 +615,7 @@ timespan_gt(TimeSpan *timespan1, TimeSpan *timespan2)
    if (timespan2->month != 0)
        span2 += (timespan2->month * (30.0 * 86400));
 
-   return (span1 > span2);
+   return span1 > span2;
 }  /* timespan_gt() */
 
 bool
@@ -637,7 +637,7 @@ timespan_le(TimeSpan *timespan1, TimeSpan *timespan2)
    if (timespan2->month != 0)
        span2 += (timespan2->month * (30.0 * 86400));
 
-   return (span1 <= span2);
+   return span1 <= span2;
 }  /* timespan_le() */
 
 bool
@@ -659,7 +659,7 @@ timespan_ge(TimeSpan *timespan1, TimeSpan *timespan2)
    if (timespan2->month != 0)
        span2 += (timespan2->month * (30.0 * 86400));
 
-   return (span1 >= span2);
+   return span1 >= span2;
 }  /* timespan_ge() */
 
 
@@ -676,11 +676,11 @@ timespan_cmp(TimeSpan *timespan1, TimeSpan *timespan2)
 
    if (TIMESPAN_IS_INVALID(*timespan1))
    {
-       return (TIMESPAN_IS_INVALID(*timespan2) ? 0 : 1);
+       return TIMESPAN_IS_INVALID(*timespan2) ? 0 : 1;
 
    }
    else if (TIMESPAN_IS_INVALID(*timespan2))
-       return (-1);
+       return -1;
 
    span1 = timespan1->time;
    if (timespan1->month != 0)
@@ -689,7 +689,7 @@ timespan_cmp(TimeSpan *timespan1, TimeSpan *timespan2)
    if (timespan2->month != 0)
        span2 += (timespan2->month * (30.0 * 86400));
 
-   return ((span1 < span2) ? -1 : (span1 > span2) ? 1 : 0);
+   return (span1 < span2) ? -1 : (span1 > span2) ? 1 : 0;
 }  /* timespan_cmp() */
 
 
@@ -729,7 +729,7 @@ datetime_smaller(DateTime *datetime1, DateTime *datetime2)
    else
        *result = ((dt2 < dt1) ? dt2 : dt1);
 
-   return (result);
+   return result;
 }  /* datetime_smaller() */
 
 DateTime   *
@@ -760,7 +760,7 @@ datetime_larger(DateTime *datetime1, DateTime *datetime2)
    else
        *result = ((dt2 > dt1) ? dt2 : dt1);
 
-   return (result);
+   return result;
 }  /* datetime_larger() */
 
 
@@ -799,7 +799,7 @@ datetime_mi(DateTime *datetime1, DateTime *datetime2)
        result->time = JROUND(dt1 - dt2);
    result->month = 0;
 
-   return (result);
+   return result;
 }  /* datetime_mi() */
 
 
@@ -896,7 +896,7 @@ datetime_pl_span(DateTime *datetime, TimeSpan *span)
        *result = dt;
    }
 
-   return (result);
+   return result;
 }  /* datetime_pl_span() */
 
 DateTime   *
@@ -913,7 +913,7 @@ datetime_mi_span(DateTime *datetime, TimeSpan *span)
 
    result = datetime_pl_span(datetime, &tspan);
 
-   return (result);
+   return result;
 }  /* datetime_mi_span() */
 
 
@@ -930,7 +930,7 @@ timespan_um(TimeSpan *timespan)
    result->time = -(timespan->time);
    result->month = -(timespan->month);
 
-   return (result);
+   return result;
 }  /* timespan_um() */
 
 
@@ -986,7 +986,7 @@ timespan_smaller(TimeSpan *timespan1, TimeSpan *timespan2)
        }
    }
 
-   return (result);
+   return result;
 }  /* timespan_smaller() */
 
 TimeSpan   *
@@ -1041,7 +1041,7 @@ timespan_larger(TimeSpan *timespan1, TimeSpan *timespan2)
        }
    }
 
-   return (result);
+   return result;
 }  /* timespan_larger() */
 
 
@@ -1058,7 +1058,7 @@ timespan_pl(TimeSpan *span1, TimeSpan *span2)
    result->month = (span1->month + span2->month);
    result->time = JROUND(span1->time + span2->time);
 
-   return (result);
+   return result;
 }  /* timespan_pl() */
 
 TimeSpan   *
@@ -1074,7 +1074,7 @@ timespan_mi(TimeSpan *span1, TimeSpan *span2)
    result->month = (span1->month - span2->month);
    result->time = JROUND(span1->time - span2->time);
 
-   return (result);
+   return result;
 }  /* timespan_mi() */
 
 TimeSpan   *
@@ -1094,7 +1094,7 @@ timespan_div(TimeSpan *span1, float8 *arg2)
    result->month = rint(span1->month / *arg2);
    result->time = JROUND(span1->time / *arg2);
 
-   return (result);
+   return result;
 }  /* timespan_div() */
 
 /* datetime_age()
@@ -1223,7 +1223,7 @@ datetime_age(DateTime *datetime1, DateTime *datetime2)
    else
        elog(ERROR, "Unable to decode datetime", NULL);
 
-   return (result);
+   return result;
 }  /* datetime_age() */
 
 
@@ -1259,7 +1259,7 @@ datetime_text(DateTime *datetime)
 
    pfree(str);
 
-   return (result);
+   return result;
 }  /* datetime_text() */
 
 
@@ -1288,7 +1288,7 @@ text_datetime(text *str)
 
    result = datetime_in(dstr);
 
-   return (result);
+   return result;
 }  /* text_datetime() */
 
 
@@ -1319,7 +1319,7 @@ timespan_text(TimeSpan *timespan)
 
    pfree(str);
 
-   return (result);
+   return result;
 }  /* timespan_text() */
 
 
@@ -1348,7 +1348,7 @@ text_timespan(text *str)
 
    result = timespan_in(dstr);
 
-   return (result);
+   return result;
 }  /* text_timespan() */
 
 /* datetime_trunc()
@@ -1490,7 +1490,7 @@ datetime_trunc(text *units, DateTime *datetime)
        }
    }
 
-   return (result);
+   return result;
 }  /* datetime_trunc() */
 
 /* timespan_trunc()
@@ -1609,7 +1609,7 @@ timespan_trunc(text *units, TimeSpan *timespan)
        result = NULL;
    }
 
-   return (result);
+   return result;
 }  /* timespan_trunc() */
 
 
@@ -1778,7 +1778,7 @@ datetime_part(text *units, DateTime *datetime)
        }
    }
 
-   return (result);
+   return result;
 }  /* datetime_part() */
 
 
@@ -1913,7 +1913,7 @@ timespan_part(text *units, TimeSpan *timespan)
        *result = 0;
    }
 
-   return (result);
+   return result;
 }  /* timespan_part() */
 
 
@@ -2003,7 +2003,7 @@ datetime_zone(text *zone, DateTime *datetime)
        result = NULL;
    }
 
-   return (result);
+   return result;
 }  /* datetime_zone() */
 
 
@@ -2339,7 +2339,7 @@ j2day(int date)
 
    day = (date + 1) % 7;
 
-   return (day);
+   return day;
 }  /* j2day() */
 
 
@@ -2513,7 +2513,7 @@ tm2datetime(struct tm * tm, double fsec, int *tzp, DateTime *result)
 
    /* Julian day routines are not correct for negative Julian days */
    if (!IS_VALID_JULIAN(tm->tm_year, tm->tm_mon, tm->tm_mday))
-       return (-1);
+       return -1;
 
    date = date2j(tm->tm_year, tm->tm_mon, tm->tm_mday) - date2j(2000, 1, 1);
    time = time2t(tm->tm_hour, tm->tm_min, (tm->tm_sec + fsec));
@@ -2590,13 +2590,13 @@ dt2local(DateTime dt, int tz)
 {
    dt -= tz;
    dt = JROUND(dt);
-   return (dt);
+   return dt;
 }  /* dt2local() */
 
 double
 time2t(const int hour, const int min, const double sec)
 {
-   return ((((hour * 60) + min) * 60) + sec);
+   return (((hour * 60) + min) * 60) + sec;
 }  /* time2t() */
 
 static void
@@ -2627,7 +2627,7 @@ dt2time(DateTime jd, int *hour, int *min, double *sec)
  */
 int
 ParseDateTime(char *timestr, char *lowstr,
-             char *field[], int ftype[], int maxfields, int *numfields)
+             char **field, int *ftype, int maxfields, int *numfields)
 {
    int         nf = 0;
    char       *cp = timestr;
@@ -2776,7 +2776,7 @@ ParseDateTime(char *timestr, char *lowstr,
  * then assume GMT time zone. - tgl 97/05/27
  */
 int
-DecodeDateTime(char *field[], int ftype[], int nf,
+DecodeDateTime(char **field, int *ftype, int nf,
               int *dtype, struct tm * tm, double *fsec, int *tzp)
 {
    int         fmask = 0,
@@ -3010,7 +3010,7 @@ DecodeDateTime(char *field[], int ftype[], int nf,
 #endif
 
    if ((*dtype == DTK_DATE) && ((fmask & DTK_DATE_M) != DTK_DATE_M))
-       return (((fmask & DTK_TIME_M) == DTK_TIME_M) ? 1 : -1);
+       return ((fmask & DTK_TIME_M) == DTK_TIME_M) ? 1 : -1;
 
    /* timezone not specified? then find local timezone if possible */
    if ((*dtype == DTK_DATE) && ((fmask & DTK_DATE_M) == DTK_DATE_M)
@@ -3060,7 +3060,7 @@ DecodeDateTime(char *field[], int ftype[], int nf,
  * Interpret parsed string as time fields only.
  */
 int
-DecodeTimeOnly(char *field[], int ftype[], int nf, int *dtype, struct tm * tm, double *fsec)
+DecodeTimeOnly(char **field, int *ftype, int nf, int *dtype, struct tm * tm, double *fsec)
 {
    int         fmask,
                tmask,
@@ -3584,7 +3584,7 @@ DecodeTimezone(char *str, int *tzp)
        tz = -tz;
 
    *tzp = -tz;
-   return (*cp != '\0');
+   return *cp != '\0';
 }  /* DecodeTimezone() */
 
 
@@ -3633,7 +3633,7 @@ DecodeSpecial(int field, char *lowtoken, int *val)
        }
    }
 
-   return (type);
+   return type;
 }  /* DecodeSpecial() */
 
 
@@ -3648,7 +3648,7 @@ DecodeSpecial(int field, char *lowtoken, int *val)
  *  preceeding an hh:mm:ss field. - thomas 1998-04-30
  */
 int
-DecodeDateDelta(char *field[], int ftype[], int nf, int *dtype, struct tm * tm, double *fsec)
+DecodeDateDelta(char **field, int *ftype, int nf, int *dtype, struct tm * tm, double *fsec)
 {
    int         is_before = FALSE;
 
@@ -3867,7 +3867,7 @@ DecodeDateDelta(char *field[], int ftype[], int nf, int *dtype, struct tm * tm,
 #endif
 
    /* ensure that at least one time field has been found */
-   return ((fmask != 0) ? 0 : -1);
+   return (fmask != 0) ? 0 : -1;
 }  /* DecodeDateDelta() */
 
 
@@ -3907,7 +3907,7 @@ DecodeUnits(int field, char *lowtoken, int *val)
            *val = tp->value;
    }
 
-   return (type);
+   return type;
 }  /* DecodeUnits() */
 
 
@@ -3981,10 +3981,10 @@ EncodeSpecialDateTime(DateTime dt, char *str)
 #endif
            strcpy(str, INVALID);
        }
-       return (TRUE);
+       return TRUE;
    }
 
-   return (FALSE);
+   return FALSE;
 }  /* EncodeSpecialDateTime() */
 
 
@@ -4048,7 +4048,7 @@ EncodeDateOnly(struct tm * tm, int style, char *str)
    printf("EncodeDateOnly- date result is %s\n", str);
 #endif
 
-   return (TRUE);
+   return TRUE;
 }  /* EncodeDateOnly() */
 
 
@@ -4072,7 +4072,7 @@ EncodeTimeOnly(struct tm * tm, double fsec, int style, char *str)
    printf("EncodeTimeOnly- time result is %s\n", str);
 #endif
 
-   return (TRUE);
+   return TRUE;
 }  /* EncodeTimeOnly() */
 
 
@@ -4249,7 +4249,7 @@ EncodeDateTime(struct tm * tm, double fsec, int *tzp, char **tzn, int style, cha
    printf("EncodeDateTime- date result is %s\n", str);
 #endif
 
-   return (TRUE);
+   return TRUE;
 }  /* EncodeDateTime() */
 
 
@@ -4420,7 +4420,7 @@ datetime_is_epoch(double j)
    u.c[0] = 0x80;              /* sign bit */
    u.c[1] = 0x10;              /* DBL_MIN */
 
-   return (j == u.epoch);
+   return j == u.epoch;
 }
 int
 datetime_is_current(double j)
@@ -4433,7 +4433,7 @@ datetime_is_current(double j)
 
    u.c[1] = 0x10;              /* DBL_MIN */
 
-   return (j == u.current);
+   return j == u.current;
 }
 
 #endif
index b1fc58f9fb079c05f2f91336a5f3a651fae61da1..3f40ece5e5ab3b157f59f444e6d14115342d8141 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/filename.c,v 1.15 1998/06/15 19:29:34 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/filename.c,v 1.16 1998/09/01 03:25:58 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -116,7 +116,7 @@ filename_in(char *file)
    else
        ind = 0;
    strcat(str, file + ind);
-   return (str);
+   return str;
 }
 
 char *
@@ -125,9 +125,9 @@ filename_out(char *s)
    char       *ret;
 
    if (!s)
-       return ((char *) NULL);
+       return (char *) NULL;
    ret = (char *) palloc(strlen(s) + 1);
    if (!ret)
        elog(ERROR, "filename_out: palloc failed");
-   return (strcpy(ret, s));
+   return strcpy(ret, s);
 }
index b5c79d304b3297a268f7bdf425b6fa9290c4921a..69cd1a42018079802205e4c7a49b8423d7cc4a00 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.31 1998/04/27 14:43:38 scrappy Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.32 1998/09/01 03:25:59 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -229,7 +229,7 @@ float4out(float32 num)
        return strcpy(ascii, "(null)");
 
    sprintf(ascii, "%.*g", FLT_DIG, *num);
-   return (ascii);
+   return ascii;
 }
 
 
@@ -254,7 +254,7 @@ float8in(char *num)
 
    CheckFloat8Val(val);
    *result = val;
-   return (result);
+   return result;
 }
 
 
@@ -276,7 +276,7 @@ float8out(float64 num)
        return strcpy(ascii, "Infinity");
 
    sprintf(ascii, "%.*g", DBL_DIG, *num);
-   return (ascii);
+   return ascii;
 }
 
 /* ========== PUBLIC ROUTINES ========== */
@@ -306,7 +306,7 @@ float4abs(float32 arg1)
 
    result = (float32) palloc(sizeof(float32data));
    *result = val;
-   return (result);
+   return result;
 }
 
 /*
@@ -326,7 +326,7 @@ float4um(float32 arg1)
 
    result = (float32) palloc(sizeof(float32data));
    *result = val;
-   return (result);
+   return result;
 }
 
 float32
@@ -380,7 +380,7 @@ float8abs(float64 arg1)
    val = fabs(*arg1);
    CheckFloat8Val(val);
    *result = val;
-   return (result);
+   return result;
 }
 
 
@@ -401,7 +401,7 @@ float8um(float64 arg1)
    CheckFloat8Val(val);
    result = (float64) palloc(sizeof(float64data));
    *result = val;
-   return (result);
+   return result;
 }
 
 float64
@@ -461,7 +461,7 @@ float4pl(float32 arg1, float32 arg2)
    result = (float32) palloc(sizeof(float32data));
    *result = val;
 
-   return (result);
+   return result;
 }
 
 float32
@@ -478,7 +478,7 @@ float4mi(float32 arg1, float32 arg2)
    CheckFloat4Val(val);
    result = (float32) palloc(sizeof(float32data));
    *result = val;
-   return (result);
+   return result;
 }
 
 float32
@@ -495,7 +495,7 @@ float4mul(float32 arg1, float32 arg2)
    CheckFloat4Val(val);
    result = (float32) palloc(sizeof(float32data));
    *result = val;
-   return (result);
+   return result;
 }
 
 float32
@@ -515,7 +515,7 @@ float4div(float32 arg1, float32 arg2)
    CheckFloat4Val(val);
    result = (float32) palloc(sizeof(float32data));
    *result = *arg1 / *arg2;
-   return (result);
+   return result;
 }
 
 float32
@@ -553,7 +553,7 @@ float8pl(float64 arg1, float64 arg2)
    val = *arg1 + *arg2;
    CheckFloat8Val(val);
    *result = val;
-   return (result);
+   return result;
 }
 
 float64
@@ -570,7 +570,7 @@ float8mi(float64 arg1, float64 arg2)
    val = *arg1 - *arg2;
    CheckFloat8Val(val);
    *result = val;
-   return (result);
+   return result;
 }
 
 float64
@@ -587,7 +587,7 @@ float8mul(float64 arg1, float64 arg2)
    val = *arg1 * *arg2;
    CheckFloat8Val(val);
    *result = val;
-   return (result);
+   return result;
 }
 
 float64
@@ -607,7 +607,7 @@ float8div(float64 arg1, float64 arg2)
    val = *arg1 / *arg2;
    CheckFloat8Val(val);
    *result = val;
-   return (result);
+   return result;
 }
 
 float64
@@ -621,7 +621,7 @@ float8inc(float64 arg1)
    val = *arg1 + (float64data) 1.0;
    CheckFloat8Val(val);
    *arg1 = val;
-   return (arg1);
+   return arg1;
 }
 
 
@@ -640,7 +640,7 @@ float4eq(float32 arg1, float32 arg2)
    if (!arg1 || !arg2)
        return 0;
 
-   return (*arg1 == *arg2);
+   return *arg1 == *arg2;
 }
 
 bool
@@ -649,7 +649,7 @@ float4ne(float32 arg1, float32 arg2)
    if (!arg1 || !arg2)
        return 0;
 
-   return (*arg1 != *arg2);
+   return *arg1 != *arg2;
 }
 
 bool
@@ -658,7 +658,7 @@ float4lt(float32 arg1, float32 arg2)
    if (!arg1 || !arg2)
        return 0;
 
-   return (*arg1 < *arg2);
+   return *arg1 < *arg2;
 }
 
 bool
@@ -667,7 +667,7 @@ float4le(float32 arg1, float32 arg2)
    if (!arg1 || !arg2)
        return 0;
 
-   return (*arg1 <= *arg2);
+   return *arg1 <= *arg2;
 }
 
 bool
@@ -676,7 +676,7 @@ float4gt(float32 arg1, float32 arg2)
    if (!arg1 || !arg2)
        return 0;
 
-   return (*arg1 > *arg2);
+   return *arg1 > *arg2;
 }
 
 bool
@@ -685,7 +685,7 @@ float4ge(float32 arg1, float32 arg2)
    if (!arg1 || !arg2)
        return 0;
 
-   return (*arg1 >= *arg2);
+   return *arg1 >= *arg2;
 }
 
 /*
@@ -697,7 +697,7 @@ float8eq(float64 arg1, float64 arg2)
    if (!arg1 || !arg2)
        return 0;
 
-   return (*arg1 == *arg2);
+   return *arg1 == *arg2;
 }
 
 bool
@@ -706,7 +706,7 @@ float8ne(float64 arg1, float64 arg2)
    if (!arg1 || !arg2)
        return 0;
 
-   return (*arg1 != *arg2);
+   return *arg1 != *arg2;
 }
 
 bool
@@ -715,7 +715,7 @@ float8lt(float64 arg1, float64 arg2)
    if (!arg1 || !arg2)
        return 0;
 
-   return (*arg1 < *arg2);
+   return *arg1 < *arg2;
 }
 
 bool
@@ -724,7 +724,7 @@ float8le(float64 arg1, float64 arg2)
    if (!arg1 || !arg2)
        return 0;
 
-   return (*arg1 <= *arg2);
+   return *arg1 <= *arg2;
 }
 
 bool
@@ -733,7 +733,7 @@ float8gt(float64 arg1, float64 arg2)
    if (!arg1 || !arg2)
        return 0;
 
-   return (*arg1 > *arg2);
+   return *arg1 > *arg2;
 }
 
 bool
@@ -742,7 +742,7 @@ float8ge(float64 arg1, float64 arg2)
    if (!arg1 || !arg2)
        return 0;
 
-   return (*arg1 >= *arg2);
+   return *arg1 >= *arg2;
 }
 
 
@@ -766,7 +766,7 @@ ftod(float32 num)
    result = (float64) palloc(sizeof(float64data));
 
    *result = *num;
-   return (result);
+   return result;
 }
 
 
@@ -786,7 +786,7 @@ dtof(float64 num)
    result = (float32) palloc(sizeof(float32data));
 
    *result = *num;
-   return (result);
+   return result;
 }
 
 
@@ -805,7 +805,7 @@ dtoi4(float64 num)
        elog(ERROR, "dtoi4: integer out of range", NULL);
 
    result = rint(*num);
-   return (result);
+   return result;
 }
 
 
@@ -824,7 +824,7 @@ dtoi2(float64 num)
        elog(ERROR, "dtoi2: integer out of range", NULL);
 
    result = rint(*num);
-   return (result);
+   return result;
 }
 
 
@@ -839,7 +839,7 @@ i4tod(int32 num)
    result = (float64) palloc(sizeof(float64data));
 
    *result = num;
-   return (result);
+   return result;
 }
 
 
@@ -854,7 +854,7 @@ i2tod(int16 num)
    result = (float64) palloc(sizeof(float64data));
 
    *result = num;
-   return (result);
+   return result;
 }
 
 
@@ -873,7 +873,7 @@ ftoi4(float32 num)
        elog(ERROR, "ftoi4: integer out of range", NULL);
 
    result = rint(*num);
-   return (result);
+   return result;
 }
 
 
@@ -892,7 +892,7 @@ ftoi2(float32 num)
        elog(ERROR, "ftoi2: integer out of range", NULL);
 
    result = rint(*num);
-   return (result);
+   return result;
 }
 
 
@@ -907,7 +907,7 @@ i4tof(int32 num)
    result = (float32) palloc(sizeof(float32data));
 
    *result = num;
-   return (result);
+   return result;
 }
 
 
@@ -922,7 +922,7 @@ i2tof(int16 num)
    result = (float32) palloc(sizeof(float32data));
 
    *result = num;
-   return (result);
+   return result;
 }
 
 
@@ -948,7 +948,7 @@ dround(float64 arg1)
 
    tmp = *arg1;
    *result = (float64data) rint(tmp);
-   return (result);
+   return result;
 }
 
 
@@ -975,7 +975,7 @@ dtrunc(float64 arg1)
        *result = (float64data) floor(tmp);
    else
        *result = (float64data) -(floor(-tmp));
-   return (result);
+   return result;
 }
 
 
@@ -995,7 +995,7 @@ dsqrt(float64 arg1)
 
    tmp = *arg1;
    *result = (float64data) sqrt(tmp);
-   return (result);
+   return result;
 }
 
 
@@ -1015,7 +1015,7 @@ dcbrt(float64 arg1)
 
    tmp = *arg1;
    *result = (float64data) cbrt(tmp);
-   return (result);
+   return result;
 }
 
 
@@ -1048,7 +1048,7 @@ dpow(float64 arg1, float64 arg2)
        elog(ERROR, "pow() result is out of range");
 
    CheckFloat8Val(*result);
-   return (result);
+   return result;
 }
 
 
@@ -1079,7 +1079,7 @@ dexp(float64 arg1)
        elog(ERROR, "exp() result is out of range");
 
    CheckFloat8Val(*result);
-   return (result);
+   return result;
 }
 
 
@@ -1106,7 +1106,7 @@ dlog1(float64 arg1)
    *result = (float64data) log(tmp);
 
    CheckFloat8Val(*result);
-   return (result);
+   return result;
 }
 
 
@@ -1134,7 +1134,7 @@ float48pl(float32 arg1, float64 arg2)
 
    *result = *arg1 + *arg2;
    CheckFloat8Val(*result);
-   return (result);
+   return result;
 }
 
 float64
@@ -1149,7 +1149,7 @@ float48mi(float32 arg1, float64 arg2)
 
    *result = *arg1 - *arg2;
    CheckFloat8Val(*result);
-   return (result);
+   return result;
 }
 
 float64
@@ -1164,7 +1164,7 @@ float48mul(float32 arg1, float64 arg2)
 
    *result = *arg1 * *arg2;
    CheckFloat8Val(*result);
-   return (result);
+   return result;
 }
 
 float64
@@ -1182,7 +1182,7 @@ float48div(float32 arg1, float64 arg2)
 
    *result = *arg1 / *arg2;
    CheckFloat8Val(*result);
-   return (result);
+   return result;
 }
 
 /*
@@ -1203,7 +1203,7 @@ float84pl(float64 arg1, float32 arg2)
 
    *result = *arg1 + *arg2;
    CheckFloat8Val(*result);
-   return (result);
+   return result;
 }
 
 float64
@@ -1218,7 +1218,7 @@ float84mi(float64 arg1, float32 arg2)
 
    *result = *arg1 - *arg2;
    CheckFloat8Val(*result);
-   return (result);
+   return result;
 }
 
 float64
@@ -1234,7 +1234,7 @@ float84mul(float64 arg1, float32 arg2)
 
    *result = *arg1 * *arg2;
    CheckFloat8Val(*result);
-   return (result);
+   return result;
 }
 
 float64
@@ -1252,7 +1252,7 @@ float84div(float64 arg1, float32 arg2)
 
    *result = *arg1 / *arg2;
    CheckFloat8Val(*result);
-   return (result);
+   return result;
 }
 
 /*
@@ -1270,7 +1270,7 @@ float48eq(float32 arg1, float64 arg2)
    if (!arg1 || !arg2)
        return 0;
 
-   return (*arg1 == (float) *arg2);
+   return *arg1 == (float) *arg2;
 }
 
 bool
@@ -1279,7 +1279,7 @@ float48ne(float32 arg1, float64 arg2)
    if (!arg1 || !arg2)
        return 0;
 
-   return (*arg1 != (float) *arg2);
+   return *arg1 != (float) *arg2;
 }
 
 bool
@@ -1288,7 +1288,7 @@ float48lt(float32 arg1, float64 arg2)
    if (!arg1 || !arg2)
        return 0;
 
-   return (*arg1 < (float) *arg2);
+   return *arg1 < (float) *arg2;
 }
 
 bool
@@ -1297,7 +1297,7 @@ float48le(float32 arg1, float64 arg2)
    if (!arg1 || !arg2)
        return 0;
 
-   return (*arg1 <= (float) *arg2);
+   return *arg1 <= (float) *arg2;
 }
 
 bool
@@ -1306,7 +1306,7 @@ float48gt(float32 arg1, float64 arg2)
    if (!arg1 || !arg2)
        return 0;
 
-   return (*arg1 > (float) *arg2);
+   return *arg1 > (float) *arg2;
 }
 
 bool
@@ -1315,7 +1315,7 @@ float48ge(float32 arg1, float64 arg2)
    if (!arg1 || !arg2)
        return 0;
 
-   return (*arg1 >= (float) *arg2);
+   return *arg1 >= (float) *arg2;
 }
 
 /*
@@ -1327,7 +1327,7 @@ float84eq(float64 arg1, float32 arg2)
    if (!arg1 || !arg2)
        return 0;
 
-   return ((float) *arg1 == *arg2);
+   return (float) *arg1 == *arg2;
 }
 
 bool
@@ -1336,7 +1336,7 @@ float84ne(float64 arg1, float32 arg2)
    if (!arg1 || !arg2)
        return 0;
 
-   return ((float) *arg1 != *arg2);
+   return (float) *arg1 != *arg2;
 }
 
 bool
@@ -1345,7 +1345,7 @@ float84lt(float64 arg1, float32 arg2)
    if (!arg1 || !arg2)
        return 0;
 
-   return ((float) *arg1 < *arg2);
+   return (float) *arg1 < *arg2;
 }
 
 bool
@@ -1354,7 +1354,7 @@ float84le(float64 arg1, float32 arg2)
    if (!arg1 || !arg2)
        return 0;
 
-   return ((float) *arg1 <= *arg2);
+   return (float) *arg1 <= *arg2;
 }
 
 bool
@@ -1363,7 +1363,7 @@ float84gt(float64 arg1, float32 arg2)
    if (!arg1 || !arg2)
        return 0;
 
-   return ((float) *arg1 > *arg2);
+   return (float) *arg1 > *arg2;
 }
 
 bool
@@ -1372,7 +1372,7 @@ float84ge(float64 arg1, float32 arg2)
    if (!arg1 || !arg2)
        return 0;
 
-   return ((float) *arg1 >= *arg2);
+   return (float) *arg1 >= *arg2;
 }
 
 /* ========== PRIVATE ROUTINES ========== */
@@ -1503,7 +1503,7 @@ double        x;
    int         isneg = (x < 0.0);
    double      tmpres = pow(fabs(x), (double) 1.0 / (double) 3.0);
 
-   return (isneg ? -tmpres : tmpres);
+   return isneg ? -tmpres : tmpres;
 }
 
 #endif                         /* !HAVE_CBRT */
index 48d358b9c7091e87556cca866de1021bd7b17466..2775f6b5fc98b63839e45b0c73b1c1440397dbe6 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.35 1998/08/16 04:06:55 thomas Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.36 1998/09/01 03:26:01 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -32,7 +32,7 @@
  * Internal routines
  */
 
-static int point_inside(Point *p, int npts, Point plist[]);
+static int point_inside(Point *p, int npts, Point *plist);
 static int lseg_crossing(double x, double y, double px, double py);
 static BOX *box_construct(double x1, double x2, double y1, double y2);
 static BOX *box_copy(BOX *box);
@@ -45,7 +45,7 @@ static LINE *line_construct_pm(Point *pt, double m);
 static double lseg_dt(LSEG *l1, LSEG *l2);
 static void make_bound_box(POLYGON *poly);
 static PATH *path_copy(PATH *path);
-static bool plist_same(int npts, Point p1[], Point p2[]);
+static bool plist_same(int npts, Point *p1, Point *p2);
 static Point *point_construct(double x, double y);
 static Point *point_copy(Point *pt);
 static int single_decode(char *str, float8 *x, char **ss);
@@ -112,7 +112,7 @@ single_decode(char *str, float8 *x, char **s)
    char       *cp;
 
    if (!PointerIsValid(str))
-       return (FALSE);
+       return FALSE;
 
    while (isspace(*str))
        str++;
@@ -121,21 +121,21 @@ single_decode(char *str, float8 *x, char **s)
    fprintf(stderr, "single_decode- (%x) try decoding %s to %g\n", (cp - str), str, *x);
 #endif
    if (cp <= str)
-       return (FALSE);
+       return FALSE;
    while (isspace(*cp))
        cp++;
 
    if (s != NULL)
        *s = cp;
 
-   return (TRUE);
+   return TRUE;
 }  /* single_decode() */
 
 static int
 single_encode(float8 x, char *str)
 {
    sprintf(str, "%.*g", digits8, x);
-   return (TRUE);
+   return TRUE;
 }  /* single_encode() */
 
 static int
@@ -145,7 +145,7 @@ pair_decode(char *str, float8 *x, float8 *y, char **s)
    char       *cp;
 
    if (!PointerIsValid(str))
-       return (FALSE);
+       return FALSE;
 
    while (isspace(*str))
        str++;
@@ -156,22 +156,22 @@ pair_decode(char *str, float8 *x, float8 *y, char **s)
        str++;
    *x = strtod(str, &cp);
    if (cp <= str)
-       return (FALSE);
+       return FALSE;
    while (isspace(*cp))
        cp++;
    if (*cp++ != DELIM)
-       return (FALSE);
+       return FALSE;
    while (isspace(*cp))
        cp++;
    *y = strtod(cp, &str);
    if (str <= cp)
-       return (FALSE);
+       return FALSE;
    while (isspace(*str))
        str++;
    if (has_delim)
    {
        if (*str != RDELIM)
-           return (FALSE);
+           return FALSE;
        str++;
        while (isspace(*str))
            str++;
@@ -179,14 +179,14 @@ pair_decode(char *str, float8 *x, float8 *y, char **s)
    if (s != NULL)
        *s = str;
 
-   return (TRUE);
+   return TRUE;
 }
 
 static int
 pair_encode(float8 x, float8 y, char *str)
 {
    sprintf(str, "%.*g,%.*g", digits8, x, digits8, y);
-   return (TRUE);
+   return TRUE;
 }
 
 static int
@@ -204,7 +204,7 @@ path_decode(int opentype, int npts, char *str, int *isopen, char **ss, Point *p)
    {
        /* no open delimiter allowed? */
        if (!opentype)
-           return (FALSE);
+           return FALSE;
        depth++;
        s++;
        while (isspace(*s))
@@ -221,7 +221,7 @@ path_decode(int opentype, int npts, char *str, int *isopen, char **ss, Point *p)
 #if FALSE
            /* nested delimiters with only one point? */
            if (npts <= 1)
-               return (FALSE);
+               return FALSE;
 #endif
            depth++;
            s = cp;
@@ -236,7 +236,7 @@ path_decode(int opentype, int npts, char *str, int *isopen, char **ss, Point *p)
    for (i = 0; i < npts; i++)
    {
        if (!pair_decode(s, &(p->x), &(p->y), &s))
-           return (FALSE);
+           return FALSE;
 
        if (*s == DELIM)
            s++;
@@ -254,11 +254,11 @@ path_decode(int opentype, int npts, char *str, int *isopen, char **ss, Point *p)
                s++;
        }
        else
-           return (FALSE);
+           return FALSE;
    }
    *ss = s;
 
-   return (TRUE);
+   return TRUE;
 }  /* path_decode() */
 
 static char *
@@ -306,7 +306,7 @@ path_encode(bool closed, int npts, Point *pt)
    }
    *cp = '\0';
 
-   return (result);
+   return result;
 }  /* path_encode() */
 
 /*-------------------------------------------------------------
@@ -326,7 +326,7 @@ pair_count(char *s, char delim)
        ndelim++;
        s++;
    }
-   return ((ndelim % 2) ? ((ndelim + 1) / 2) : -1);
+   return (ndelim % 2) ? ((ndelim + 1) / 2) : -1;
 }
 
 /***********************************************************************
@@ -376,7 +376,7 @@ box_in(char *str)
        box->low.y = y;
    }
 
-   return (box);
+   return box;
 }  /* box_in() */
 
 /*     box_out -       convert a box to external form.
@@ -385,9 +385,9 @@ char *
 box_out(BOX *box)
 {
    if (!PointerIsValid(box))
-       return (NULL);
+       return NULL;
 
-   return (path_encode(-1, 2, (Point *) &(box->high)));
+   return path_encode(-1, 2, (Point *) &(box->high));
 }  /* box_out() */
 
 
@@ -398,7 +398,7 @@ box_construct(double x1, double x2, double y1, double y2)
 {
    BOX        *result = palloc(sizeof(BOX));
 
-   return (box_fill(result, x1, x2, y1, y2));
+   return box_fill(result, x1, x2, y1, y2);
 }
 
 
@@ -428,7 +428,7 @@ box_fill(BOX *result, double x1, double x2, double y1, double y2)
        result->low.y = y1;
    }
 
-   return (result);
+   return result;
 }
 
 
@@ -441,7 +441,7 @@ box_copy(BOX *box)
 
    memmove((char *) result, (char *) box, sizeof(BOX));
 
-   return (result);
+   return result;
 }
 
 
@@ -479,7 +479,7 @@ box_overlap(BOX *box1, BOX *box2)
 bool
 box_overleft(BOX *box1, BOX *box2)
 {
-   return (FPle(box1->high.x, box2->high.x));
+   return FPle(box1->high.x, box2->high.x);
 }
 
 /*     box_left        -       is box1 strictly left of box2?
@@ -487,7 +487,7 @@ box_overleft(BOX *box1, BOX *box2)
 bool
 box_left(BOX *box1, BOX *box2)
 {
-   return (FPlt(box1->high.x, box2->low.x));
+   return FPlt(box1->high.x, box2->low.x);
 }
 
 /*     box_right       -       is box1 strictly right of box2?
@@ -495,7 +495,7 @@ box_left(BOX *box1, BOX *box2)
 bool
 box_right(BOX *box1, BOX *box2)
 {
-   return (FPgt(box1->low.x, box2->high.x));
+   return FPgt(box1->low.x, box2->high.x);
 }
 
 /*     box_overright   -       is the left edge of box1 to the right of
@@ -507,7 +507,7 @@ box_right(BOX *box1, BOX *box2)
 bool
 box_overright(BOX *box1, BOX *box2)
 {
-   return (box1->low.x >= box2->low.x);
+   return box1->low.x >= box2->low.x;
 }
 
 /*     box_contained   -       is box1 contained by box2?
@@ -535,13 +535,13 @@ box_contain(BOX *box1, BOX *box2)
 bool
 box_below(BOX *box1, BOX *box2)
 {
-   return (FPle(box1->high.y, box2->low.y));
+   return FPle(box1->high.y, box2->low.y);
 }
 
 bool
 box_above(BOX *box1, BOX *box2)
 {
-   return (FPge(box1->low.y, box2->high.y));
+   return FPge(box1->low.y, box2->high.y);
 }
 
 
@@ -551,31 +551,31 @@ box_above(BOX *box1, BOX *box2)
 bool
 box_lt(BOX *box1, BOX *box2)
 {
-   return (FPlt(box_ar(box1), box_ar(box2)));
+   return FPlt(box_ar(box1), box_ar(box2));
 }
 
 bool
 box_gt(BOX *box1, BOX *box2)
 {
-   return (FPgt(box_ar(box1), box_ar(box2)));
+   return FPgt(box_ar(box1), box_ar(box2));
 }
 
 bool
 box_eq(BOX *box1, BOX *box2)
 {
-   return (FPeq(box_ar(box1), box_ar(box2)));
+   return FPeq(box_ar(box1), box_ar(box2));
 }
 
 bool
 box_le(BOX *box1, BOX *box2)
 {
-   return (FPle(box_ar(box1), box_ar(box2)));
+   return FPle(box_ar(box1), box_ar(box2));
 }
 
 bool
 box_ge(BOX *box1, BOX *box2)
 {
-   return (FPge(box_ar(box1), box_ar(box2)));
+   return FPge(box_ar(box1), box_ar(box2));
 }
 
 
@@ -597,7 +597,7 @@ box_area(BOX *box)
 
    *result = box_wd(box) * box_ht(box);
 
-   return (result);
+   return result;
 }
 
 
@@ -611,7 +611,7 @@ box_width(BOX *box)
 
    *result = box->high.x - box->low.x;
 
-   return (result);
+   return result;
 }  /* box_width() */
 
 
@@ -625,7 +625,7 @@ box_height(BOX *box)
 
    *result = box->high.y - box->low.y;
 
-   return (result);
+   return result;
 }
 
 
@@ -645,7 +645,7 @@ box_distance(BOX *box1, BOX *box2)
 
    pfree(a);
    pfree(b);
-   return (result);
+   return result;
 }
 
 
@@ -659,7 +659,7 @@ box_center(BOX *box)
    result->x = (box->high.x + box->low.x) / 2.0;
    result->y = (box->high.y + box->low.y) / 2.0;
 
-   return (result);
+   return result;
 }
 
 
@@ -668,7 +668,7 @@ box_center(BOX *box)
 static double
 box_ar(BOX *box)
 {
-   return (box_wd(box) * box_ht(box));
+   return box_wd(box) * box_ht(box);
 }
 
 
@@ -678,7 +678,7 @@ box_ar(BOX *box)
 static double
 box_wd(BOX *box)
 {
-   return (box->high.x - box->low.x);
+   return box->high.x - box->low.x;
 }
 
 
@@ -688,7 +688,7 @@ box_wd(BOX *box)
 static double
 box_ht(BOX *box)
 {
-   return (box->high.y - box->low.y);
+   return box->high.y - box->low.y;
 }
 
 
@@ -709,7 +709,7 @@ box_dt(BOX *box1, BOX *box2)
 
    pfree(a);
    pfree(b);
-   return (result);
+   return result;
 }
 
 #endif
@@ -728,7 +728,7 @@ box_intersect(BOX *box1, BOX *box2)
    BOX        *result;
 
    if (!box_overlap(box1, box2))
-       return (NULL);
+       return NULL;
 
    result = palloc(sizeof(BOX));
 
@@ -737,7 +737,7 @@ box_intersect(BOX *box1, BOX *box2)
    result->high.y = Min(box1->high.y, box2->high.y);
    result->low.y = Max(box1->low.y, box2->low.y);
 
-   return (result);
+   return result;
 }
 
 
@@ -756,7 +756,7 @@ box_diagonal(BOX *box)
    p1.y = box->high.y;
    p2.x = box->low.x;
    p2.y = box->low.y;
-   return (lseg_construct(&p1, &p2));
+   return lseg_construct(&p1, &p2);
 }
 
 /***********************************************************************
@@ -793,7 +793,7 @@ line_in(char *str)
    line = NULL;
 #endif
 
-   return (line);
+   return line;
 }  /* line_in() */
 
 
@@ -806,7 +806,7 @@ line_out(LINE *line)
 #endif
 
    if (!PointerIsValid(line))
-       return (NULL);
+       return NULL;
 
 #ifdef ENABLE_LINE_TYPE
    if (FPzero(line->B))
@@ -851,13 +851,13 @@ line_out(LINE *line)
    {
    }
 
-   return (path_encode(TRUE, 2, (Point *) &(ls->p[0])));
+   return path_encode(TRUE, 2, (Point *) &(ls->p[0]));
 #else
    elog(ERROR, "line not yet implemented");
    result = NULL;
 #endif
 
-   return (result);
+   return result;
 }  /* line_out() */
 
 
@@ -883,7 +883,7 @@ line_construct_pm(Point *pt, double m)
    result->m = m;
 #endif
 
-   return (result);
+   return result;
 }  /* line_construct_pm() */
 
 
@@ -940,7 +940,7 @@ line_construct_pp(Point *pt1, Point *pt2)
        result->m = result->A;
 #endif
    }
-   return (result);
+   return result;
 }  /* line_construct_pp() */
 
 
@@ -951,19 +951,19 @@ line_construct_pp(Point *pt1, Point *pt2)
 bool
 line_intersect(LINE *l1, LINE *l2)
 {
-   return (!line_parallel(l1, l2));
+   return !line_parallel(l1, l2);
 }
 
 bool
 line_parallel(LINE *l1, LINE *l2)
 {
 #if FALSE
-   return (FPeq(l1->m, l2->m));
+   return FPeq(l1->m, l2->m);
 #endif
    if (FPzero(l1->B))
-       return (FPzero(l2->B));
+       return FPzero(l2->B);
 
-   return (FPeq(l2->A, l1->A * (l2->B / l1->B)));
+   return FPeq(l2->A, l1->A * (l2->B / l1->B));
 }  /* line_parallel() */
 
 bool
@@ -971,34 +971,34 @@ line_perp(LINE *l1, LINE *l2)
 {
 #if FALSE
    if (l1->m)
-       return (FPeq(l2->m / l1->m, -1.0));
+       return FPeq(l2->m / l1->m, -1.0);
    else if (l2->m)
-       return (FPeq(l1->m / l2->m, -1.0));
+       return FPeq(l1->m / l2->m, -1.0);
 #endif
    if (FPzero(l1->A))
-       return (FPzero(l2->B));
+       return FPzero(l2->B);
    else if (FPzero(l1->B))
-       return (FPzero(l2->A));
+       return FPzero(l2->A);
 
-   return (FPeq(((l1->A * l2->B) / (l1->B * l2->A)), -1.0));
+   return FPeq(((l1->A * l2->B) / (l1->B * l2->A)), -1.0);
 }  /* line_perp() */
 
 bool
 line_vertical(LINE *line)
 {
 #if FALSE
-   return (FPeq(line->A, -1.0) && FPzero(line->B));
+   return FPeq(line->A, -1.0) && FPzero(line->B);
 #endif
-   return (FPzero(line->B));
+   return FPzero(line->B);
 }  /* line_vertical() */
 
 bool
 line_horizontal(LINE *line)
 {
 #if FALSE
-   return (FPzero(line->m));
+   return FPzero(line->m);
 #endif
-   return (FPzero(line->A));
+   return FPzero(line->A);
 }  /* line_horizontal() */
 
 bool
@@ -1037,7 +1037,7 @@ line_distance(LINE *l1, LINE *l2)
    if (line_intersect(l1, l2))
    {
        *result = 0.0;
-       return (result);
+       return result;
    }
    if (line_vertical(l1))
        *result = fabs(l1->C - l2->C);
@@ -1047,7 +1047,7 @@ line_distance(LINE *l1, LINE *l2)
        result = dist_pl(tmp, l2);
        pfree(tmp);
    }
-   return (result);
+   return result;
 }
 
 /* line_interpt()
@@ -1061,7 +1061,7 @@ line_interpt(LINE *l1, LINE *l2)
                y;
 
    if (line_parallel(l1, l2))
-       return (NULL);
+       return NULL;
 #if FALSE
    if (line_vertical(l1))
        result = point_construct(l2->m * l1->C + l2->C, l1->C);
@@ -1110,7 +1110,7 @@ line_interpt(LINE *l1, LINE *l2)
           digits8, l1->A, digits8, l1->B, digits8, l1->C, digits8, l2->A, digits8, l2->B, digits8, l2->C);
    printf("line_interpt- lines intersect at (%.*g,%.*g)\n", digits8, x, digits8, y);
 #endif
-   return (result);
+   return result;
 }  /* line_interpt() */
 
 
@@ -1176,7 +1176,7 @@ path_in(char *str)
 
    path->closed = (!isopen);
 
-   return (path);
+   return path;
 }  /* path_in() */
 
 
@@ -1186,7 +1186,7 @@ path_out(PATH *path)
    if (!PointerIsValid(path))
        return NULL;
 
-   return (path_encode(path->closed, path->npts, (Point *) &(path->p[0])));
+   return path_encode(path->closed, path->npts, (Point *) &(path->p[0]));
 }  /* path_out() */
 
 
@@ -1201,31 +1201,31 @@ path_out(PATH *path)
 bool
 path_n_lt(PATH *p1, PATH *p2)
 {
-   return ((p1->npts < p2->npts));
+   return (p1->npts < p2->npts);
 }
 
 bool
 path_n_gt(PATH *p1, PATH *p2)
 {
-   return ((p1->npts > p2->npts));
+   return (p1->npts > p2->npts);
 }
 
 bool
 path_n_eq(PATH *p1, PATH *p2)
 {
-   return ((p1->npts == p2->npts));
+   return (p1->npts == p2->npts);
 }
 
 bool
 path_n_le(PATH *p1, PATH *p2)
 {
-   return ((p1->npts <= p2->npts));
+   return (p1->npts <= p2->npts);
 }
 
 bool
 path_n_ge(PATH *p1, PATH *p2)
 {
-   return ((p1->npts >= p2->npts));
+   return (p1->npts >= p2->npts);
 }
 
 
@@ -1239,7 +1239,7 @@ path_isclosed(PATH *path)
    if (!PointerIsValid(path))
        return FALSE;
 
-   return (path->closed);
+   return path->closed;
 }  /* path_isclosed() */
 
 bool
@@ -1248,7 +1248,7 @@ path_isopen(PATH *path)
    if (!PointerIsValid(path))
        return FALSE;
 
-   return (!path->closed);
+   return !path->closed;
 }  /* path_isopen() */
 
 
@@ -1258,7 +1258,7 @@ path_npoints(PATH *path)
    if (!PointerIsValid(path))
        return 0;
 
-   return (path->npts);
+   return path->npts;
 }  /* path_npoints() */
 
 PATH *
@@ -1267,12 +1267,12 @@ path_close(PATH *path)
    PATH       *result;
 
    if (!PointerIsValid(path))
-       return (NULL);
+       return NULL;
 
    result = path_copy(path);
    result->closed = TRUE;
 
-   return (result);
+   return result;
 }  /* path_close() */
 
 
@@ -1282,12 +1282,12 @@ path_open(PATH *path)
    PATH       *result;
 
    if (!PointerIsValid(path))
-       return (NULL);
+       return NULL;
 
    result = path_copy(path);
    result->closed = FALSE;
 
-   return (result);
+   return result;
 }  /* path_open() */
 
 
@@ -1301,7 +1301,7 @@ path_copy(PATH *path)
    result = palloc(size);
 
    memmove((char *) result, (char *) path, size);
-   return (result);
+   return result;
 }  /* path_copy() */
 
 
@@ -1339,7 +1339,7 @@ path_inter(PATH *p1, PATH *p2)
        b2.low.y = Min(p2->p[i].y, b2.low.y);
    }
    if (!box_overlap(&b1, &b2))
-       return (FALSE);
+       return FALSE;
 
    /* pairwise check lseg intersections */
    for (i = 0; i < p1->npts - 1; i++)
@@ -1349,12 +1349,12 @@ path_inter(PATH *p1, PATH *p2)
            statlseg_construct(&seg1, &p1->p[i], &p1->p[i + 1]);
            statlseg_construct(&seg2, &p2->p[j], &p2->p[j + 1]);
            if (lseg_intersect(&seg1, &seg2))
-               return (TRUE);
+               return TRUE;
        }
    }
 
    /* if we dropped through, no two segs intersected */
-   return (FALSE);
+   return FALSE;
 }  /* path_inter() */
 
 /* path_distance()
@@ -1394,7 +1394,7 @@ path_distance(PATH *p1, PATH *p2)
                pfree(tmp);
        }
 
-   return (min);
+   return min;
 }  /* path_distance() */
 
 
@@ -1414,7 +1414,7 @@ path_length(PATH *path)
    for (i = 0; i < (path->npts - 1); i++)
        *result += point_dt(&path->p[i], &path->p[i + 1]);
 
-   return (result);
+   return result;
 }  /* path_length() */
 
 
@@ -1429,7 +1429,7 @@ path_ln(PATH *path)
    for (i = 0; i < (path->npts - 1); i++)
        result += point_dt(&path->p[i], &path->p[i + 1]);
 
-   return (result);
+   return result;
 }  /* path_ln() */
 
 #endif
@@ -1467,16 +1467,16 @@ point_in(char *str)
    point->x = x;
    point->y = y;
 
-   return (point);
+   return point;
 }  /* point_in() */
 
 char *
 point_out(Point *pt)
 {
    if (!PointerIsValid(pt))
-       return (NULL);
+       return NULL;
 
-   return (path_encode(-1, 1, pt));
+   return path_encode(-1, 1, pt);
 }  /* point_out() */
 
 
@@ -1487,7 +1487,7 @@ point_construct(double x, double y)
 
    result->x = x;
    result->y = y;
-   return (result);
+   return result;
 }
 
 
@@ -1497,13 +1497,13 @@ point_copy(Point *pt)
    Point      *result;
 
    if (!PointerIsValid(pt))
-       return (NULL);
+       return NULL;
 
    result = palloc(sizeof(Point));
 
    result->x = pt->x;
    result->y = pt->y;
-   return (result);
+   return result;
 }
 
 
@@ -1519,49 +1519,49 @@ point_copy(Point *pt)
 bool
 point_left(Point *pt1, Point *pt2)
 {
-   return (FPlt(pt1->x, pt2->x));
+   return FPlt(pt1->x, pt2->x);
 }
 
 bool
 point_right(Point *pt1, Point *pt2)
 {
-   return (FPgt(pt1->x, pt2->x));
+   return FPgt(pt1->x, pt2->x);
 }
 
 bool
 point_above(Point *pt1, Point *pt2)
 {
-   return (FPgt(pt1->y, pt2->y));
+   return FPgt(pt1->y, pt2->y);
 }
 
 bool
 point_below(Point *pt1, Point *pt2)
 {
-   return (FPlt(pt1->y, pt2->y));
+   return FPlt(pt1->y, pt2->y);
 }
 
 bool
 point_vert(Point *pt1, Point *pt2)
 {
-   return (FPeq(pt1->x, pt2->x));
+   return FPeq(pt1->x, pt2->x);
 }
 
 bool
 point_horiz(Point *pt1, Point *pt2)
 {
-   return (FPeq(pt1->y, pt2->y));
+   return FPeq(pt1->y, pt2->y);
 }
 
 bool
 point_eq(Point *pt1, Point *pt2)
 {
-   return (point_horiz(pt1, pt2) && point_vert(pt1, pt2));
+   return point_horiz(pt1, pt2) && point_vert(pt1, pt2);
 }
 
 bool
 point_ne(Point *pt1, Point *pt2)
 {
-   return (!point_eq(pt1, pt2));
+   return !point_eq(pt1, pt2);
 }
 
 /*----------------------------------------------------------
@@ -1574,7 +1574,7 @@ pointdist(Point *p1, Point *p2)
    int32       result;
 
    result = point_dt(p1, p2);
-   return (result);
+   return result;
 }
 
 double *
@@ -1583,7 +1583,7 @@ point_distance(Point *pt1, Point *pt2)
    double     *result = palloc(sizeof(double));
 
    *result = HYPOT(pt1->x - pt2->x, pt1->y - pt2->y);
-   return (result);
+   return result;
 }
 
 
@@ -1594,7 +1594,7 @@ point_dt(Point *pt1, Point *pt2)
    printf("point_dt- segment (%f,%f),(%f,%f) length is %f\n",
           pt1->x, pt1->y, pt2->x, pt2->y, HYPOT(pt1->x - pt2->x, pt1->y - pt2->y));
 #endif
-   return (HYPOT(pt1->x - pt2->x, pt1->y - pt2->y));
+   return HYPOT(pt1->x - pt2->x, pt1->y - pt2->y);
 }
 
 double *
@@ -1606,7 +1606,7 @@ point_slope(Point *pt1, Point *pt2)
        *result = (double) DBL_MAX;
    else
        *result = (pt1->y - pt2->y) / (pt1->x - pt1->x);
-   return (result);
+   return result;
 }
 
 
@@ -1655,7 +1655,7 @@ lseg_in(char *str)
    lseg->m = point_sl(&lseg->p[0], &lseg->p[1]);
 #endif
 
-   return (lseg);
+   return lseg;
 }  /* lseg_in() */
 
 
@@ -1663,9 +1663,9 @@ char *
 lseg_out(LSEG *ls)
 {
    if (!PointerIsValid(ls))
-       return (NULL);
+       return NULL;
 
-   return (path_encode(FALSE, 2, (Point *) &(ls->p[0])));
+   return path_encode(FALSE, 2, (Point *) &(ls->p[0]));
 }  /* lseg_out() */
 
 
@@ -1686,7 +1686,7 @@ lseg_construct(Point *pt1, Point *pt2)
    result->m = point_sl(pt1, pt2);
 #endif
 
-   return (result);
+   return result;
 }
 
 /* like lseg_construct, but assume space already allocated */
@@ -1709,11 +1709,11 @@ lseg_length(LSEG *lseg)
    double     *result;
 
    if (!PointerIsValid(lseg))
-       return (NULL);
+       return NULL;
 
    result = point_distance(&lseg->p[0], &lseg->p[1]);
 
-   return (result);
+   return result;
 }  /* lseg_length() */
 
 /*----------------------------------------------------------
@@ -1741,14 +1741,14 @@ lseg_intersect(LSEG *l1, LSEG *l2)
    if (interpt != NULL)
        pfree(interpt);
    pfree(ln);
-   return (retval);
+   return retval;
 }
 
 bool
 lseg_parallel(LSEG *l1, LSEG *l2)
 {
 #if FALSE
-   return (FPeq(l1->m, l2->m));
+   return FPeq(l1->m, l2->m);
 #endif
    return (FPeq(point_sl(&(l1->p[0]), &(l1->p[1])),
                 point_sl(&(l2->p[0]), &(l2->p[1]))));
@@ -1776,23 +1776,23 @@ lseg_perp(LSEG *l1, LSEG *l2)
    printf("lseg_perp- slopes are %g and %g\n", m1, m2);
 #endif
    if (FPzero(m1))
-       return (FPeq(m2, DBL_MAX));
+       return FPeq(m2, DBL_MAX);
    else if (FPzero(m2))
-       return (FPeq(m1, DBL_MAX));
+       return FPeq(m1, DBL_MAX);
 
-   return (FPeq(m1 / m2, -1.0));
+   return FPeq(m1 / m2, -1.0);
 }  /* lseg_perp() */
 
 bool
 lseg_vertical(LSEG *lseg)
 {
-   return (FPeq(lseg->p[0].x, lseg->p[1].x));
+   return FPeq(lseg->p[0].x, lseg->p[1].x);
 }
 
 bool
 lseg_horizontal(LSEG *lseg)
 {
-   return (FPeq(lseg->p[0].y, lseg->p[1].y));
+   return FPeq(lseg->p[0].y, lseg->p[1].y);
 }
 
 
@@ -1817,25 +1817,25 @@ lseg_ne(LSEG *l1, LSEG *l2)
 bool
 lseg_lt(LSEG *l1, LSEG *l2)
 {
-   return (FPlt(point_dt(&l1->p[0], &l1->p[1]), point_dt(&l2->p[0], &l2->p[1])));
+   return FPlt(point_dt(&l1->p[0], &l1->p[1]), point_dt(&l2->p[0], &l2->p[1]));
 }  /* lseg_lt() */
 
 bool
 lseg_le(LSEG *l1, LSEG *l2)
 {
-   return (FPle(point_dt(&l1->p[0], &l1->p[1]), point_dt(&l2->p[0], &l2->p[1])));
+   return FPle(point_dt(&l1->p[0], &l1->p[1]), point_dt(&l2->p[0], &l2->p[1]));
 }  /* lseg_le() */
 
 bool
 lseg_gt(LSEG *l1, LSEG *l2)
 {
-   return (FPgt(point_dt(&l1->p[0], &l1->p[1]), point_dt(&l2->p[0], &l2->p[1])));
+   return FPgt(point_dt(&l1->p[0], &l1->p[1]), point_dt(&l2->p[0], &l2->p[1]));
 }  /* lseg_gt() */
 
 bool
 lseg_ge(LSEG *l1, LSEG *l2)
 {
-   return (FPge(point_dt(&l1->p[0], &l1->p[1]), point_dt(&l2->p[0], &l2->p[1])));
+   return FPge(point_dt(&l1->p[0], &l1->p[1]), point_dt(&l2->p[0], &l2->p[1]));
 }  /* lseg_ge() */
 
 
@@ -1855,7 +1855,7 @@ lseg_distance(LSEG *l1, LSEG *l2)
 
    *result = lseg_dt(l1, l2);
 
-   return (result);
+   return result;
 }
 
 /* lseg_dt()
@@ -1870,7 +1870,7 @@ lseg_dt(LSEG *l1, LSEG *l2)
                result;
 
    if (lseg_intersect(l1, l2))
-       return (0.0);
+       return 0.0;
 
    d = dist_ps(&l1->p[0], l2);
    result = *d;
@@ -1885,7 +1885,7 @@ lseg_dt(LSEG *l1, LSEG *l2)
    result = Min(result, *d);
    pfree(d);
 
-   return (result);
+   return result;
 }  /* lseg_dt() */
 
 
@@ -1895,14 +1895,14 @@ lseg_center(LSEG *lseg)
    Point      *result;
 
    if (!PointerIsValid(lseg))
-       return (NULL);
+       return NULL;
 
    result = palloc(sizeof(Point));
 
    result->x = (lseg->p[0].x - lseg->p[1].x) / 2;
    result->y = (lseg->p[0].y - lseg->p[1].y) / 2;
 
-   return (result);
+   return result;
 }  /* lseg_center() */
 
 
@@ -1923,7 +1923,7 @@ lseg_interpt(LSEG *l1, LSEG *l2)
               *tmp2;
 
    if (!PointerIsValid(l1) || !PointerIsValid(l2))
-       return (NULL);
+       return NULL;
 
    tmp1 = line_construct_pp(&l1->p[0], &l1->p[1]);
    tmp2 = line_construct_pp(&l2->p[0], &l2->p[1]);
@@ -1955,7 +1955,7 @@ lseg_interpt(LSEG *l1, LSEG *l2)
    pfree(tmp1);
    pfree(tmp2);
 
-   return (result);
+   return result;
 }  /* lseg_interpt() */
 
 /***********************************************************************
@@ -1983,7 +1983,7 @@ dist_pl(Point *pt, LINE *line)
    *result = (line->A * pt->x + line->B * pt->y + line->C) /
        HYPOT(line->A, line->B);
 
-   return (result);
+   return result;
 }
 
 double *
@@ -2048,7 +2048,7 @@ dist_ps(Point *pt, LSEG *lseg)
    if (ip != NULL)
        pfree(ip);
    pfree(ln);
-   return (result);
+   return result;
 }
 
 
@@ -2092,7 +2092,7 @@ dist_ppath(Point *pt, PATH *path)
            }
            break;
    }
-   return (result);
+   return result;
 }
 
 double *
@@ -2105,7 +2105,7 @@ dist_pb(Point *pt, BOX *box)
    result = point_distance(tmp, pt);
    pfree(tmp);
 
-   return (result);
+   return result;
 }
 
 
@@ -2134,7 +2134,7 @@ dist_sl(LSEG *lseg, LINE *line)
            pfree(d2);
    }
 
-   return (result);
+   return result;
 }
 
 
@@ -2156,7 +2156,7 @@ dist_sb(LSEG *lseg, BOX *box)
        pfree(tmp);
    }
 
-   return (result);
+   return result;
 }
 
 
@@ -2178,7 +2178,7 @@ dist_lb(LINE *line, BOX *box)
        pfree(tmp);
    }
 
-   return (result);
+   return result;
 }
 
 
@@ -2201,7 +2201,7 @@ dist_cpoly(CIRCLE *circle, POLYGON *poly)
        result = palloc(sizeof(double));
 
        *result = 0;
-       return (result);
+       return result;
    }
 
    /* initialize distance with segment between first and last points */
@@ -2234,7 +2234,7 @@ dist_cpoly(CIRCLE *circle, POLYGON *poly)
    if (*result < 0)
        *result = 0;
 
-   return (result);
+   return result;
 }  /* dist_cpoly() */
 
 
@@ -2279,7 +2279,7 @@ interpt_sl(LSEG *lseg, LINE *line)
    }
 
    pfree(tmp);
-   return (p);
+   return p;
 }
 
 
@@ -2309,7 +2309,7 @@ close_pl(Point *pt, LINE *line)
    {
        result->x = line->C;
        result->y = pt->y;
-       return (result);
+       return result;
 
 #if FALSE
    }
@@ -2321,7 +2321,7 @@ close_pl(Point *pt, LINE *line)
    {
        result->x = pt->x;
        result->y = line->C;
-       return (result);
+       return result;
    }
    /* drop a perpendicular and find the intersection point */
 #if FALSE
@@ -2331,7 +2331,7 @@ close_pl(Point *pt, LINE *line)
    invm = line->B / line->A;
    tmp = line_construct_pm(pt, invm);
    result = line_interpt(tmp, line);
-   return (result);
+   return result;
 }  /* close_pl() */
 
 
@@ -2376,14 +2376,14 @@ close_ps(Point *pt, LSEG *lseg)
        else if (pt->y > lseg->p[yh].y)
          result = point_copy(&lseg->p[yh]); /* above the lseg */
        if (result != NULL)
-         return (result);
+         return result;
 
        /* point lines along (to left or right) of the vertical lseg. */
        
        result = palloc(sizeof(*result));
        result->x = lseg->p[0].x;
        result->y = pt->y;
-       return (result);
+       return result;
    }
    else if (lseg_horizontal(lseg))
    {
@@ -2396,13 +2396,13 @@ close_ps(Point *pt, LSEG *lseg)
        else if (pt->x > lseg->p[xh].x)
          result = point_copy(&lseg->p[xh]); /* right of the lseg */
        if (result != NULL)
-         return (result);
+         return result;
 
        /* point lines along (at top or below) the horiz. lseg. */
        result = palloc(sizeof(*result));
        result->x = pt->x;
        result->y = lseg->p[0].y;
-       return (result);
+       return result;
    }
 
    /* vert. and horiz. cases are down, now check if the closest
@@ -2430,7 +2430,7 @@ close_ps(Point *pt, LSEG *lseg)
 /*     fprintf(stderr,"tmp A %f  B %f   C %f    m %f\n",tmp->A,tmp->B,tmp->C, tmp->m); */
    result = interpt_sl(lseg, tmp);
 /*     fprintf(stderr,"result.x %f  result.y %f\n", result->x, result->y); */
-   return (result);
+   return result;
 }  /* close_ps() */
 
 
@@ -2484,7 +2484,7 @@ close_lseg(LSEG *l1, LSEG *l2)
        memcpy(result, &point, sizeof(*result));
    }
 
-   return (result);
+   return result;
 }  /* close_lseg() */
 
 /* close_pb()
@@ -2500,7 +2500,7 @@ close_pb(Point *pt, BOX *box)
               *d;
 
    if (on_pb(pt, box))
-       return (pt);
+       return pt;
 
    /* pairwise check lseg distances */
    point.x = box->low.x;
@@ -2535,7 +2535,7 @@ close_pb(Point *pt, BOX *box)
    }
    pfree(d);
 
-   return (close_ps(pt, &lseg));
+   return close_ps(pt, &lseg);
 }  /* close_pb() */
 
 /* close_sl()
@@ -2556,7 +2556,7 @@ close_sl(LSEG *lseg, LINE *line)
 
    result = interpt_sl(lseg, line);
    if (result)
-       return (result);
+       return result;
 
    d1 = dist_pl(&lseg->p[0], line);
    d2 = dist_pl(&lseg->p[1], line);
@@ -2567,7 +2567,7 @@ close_sl(LSEG *lseg, LINE *line)
 
    pfree(d1);
    pfree(d2);
-   return (result);
+   return result;
 }
 
 /* close_ls()
@@ -2582,7 +2582,7 @@ close_ls(LINE *line, LSEG *lseg)
 
    result = interpt_sl(lseg, line);
    if (result)
-       return (result);
+       return result;
 
    d1 = dist_pl(&lseg->p[0], line);
    d2 = dist_pl(&lseg->p[1], line);
@@ -2593,7 +2593,7 @@ close_ls(LINE *line, LSEG *lseg)
 
    pfree(d1);
    pfree(d2);
-   return (result);
+   return result;
 }  /* close_ls() */
 
 /* close_sb()
@@ -2617,7 +2617,7 @@ close_sb(LSEG *lseg, BOX *box)
        pt = box_center(box);
        result = close_ps(pt, lseg);
        pfree(pt);
-       return (result);
+       return result;
    }
 
    /* pairwise check lseg distances */
@@ -2650,7 +2650,7 @@ close_sb(LSEG *lseg, BOX *box)
    }
 
    /* OK, we now have the closest line segment on the box boundary */
-   return (close_lseg(lseg, &bseg));
+   return close_lseg(lseg, &bseg);
 }  /* close_sb() */
 
 Point *
@@ -2659,7 +2659,7 @@ close_lb(LINE *line, BOX *box)
    /* think about this one for a while */
    elog(ERROR, "close_lb not implemented", NULL);
 
-   return (NULL);
+   return NULL;
 }
 
 /*---------------------------------------------------------------------
@@ -2674,9 +2674,9 @@ bool
 on_pl(Point *pt, LINE *line)
 {
    if (!PointerIsValid(pt) || !PointerIsValid(line))
-       return (FALSE);
+       return FALSE;
 
-   return (FPzero(line->A * pt->x + line->B * pt->y + line->C));
+   return FPzero(line->A * pt->x + line->B * pt->y + line->C);
 }
 
 
@@ -2688,7 +2688,7 @@ bool
 on_ps(Point *pt, LSEG *lseg)
 {
    if (!PointerIsValid(pt) || !PointerIsValid(lseg))
-       return (FALSE);
+       return FALSE;
 
    return (FPeq(point_dt(pt, &lseg->p[0]) + point_dt(pt, &lseg->p[1]),
                 point_dt(&lseg->p[0], &lseg->p[1])));
@@ -2698,7 +2698,7 @@ bool
 on_pb(Point *pt, BOX *box)
 {
    if (!PointerIsValid(pt) || !PointerIsValid(box))
-       return (FALSE);
+       return FALSE;
 
    return (pt->x <= box->high.x && pt->x >= box->low.x &&
            pt->y <= box->high.y && pt->y >= box->low.y);
@@ -2738,7 +2738,7 @@ on_ppath(Point *pt, PATH *path)
                b;
 
    if (!PointerIsValid(pt) || !PointerIsValid(path))
-       return (FALSE);
+       return FALSE;
 
    if (!path->closed)
    {                           /*-- OPEN --*/
@@ -2749,13 +2749,13 @@ on_ppath(Point *pt, PATH *path)
            b = point_dt(pt, &path->p[i + 1]);
            if (FPeq(a + b,
                     point_dt(&path->p[i], &path->p[i + 1])))
-               return (TRUE);
+               return TRUE;
            a = b;
        }
-       return (FALSE);
+       return FALSE;
    }
 
-   return (point_inside(pt, path->npts, path->p));
+   return point_inside(pt, path->npts, path->p);
 #if FALSE
    inter = 0;                  /*-- CLOSED --*/
    above = FPgt(path->p[0].y, pt->y) ? ABOVE :
@@ -2779,7 +2779,7 @@ on_ppath(Point *pt, PATH *path)
        if (FPeq(yh, yl))       /* horizontal seg? */
            if (FPge(pt->x, xl) && FPle(pt->x, xh) &&
                FPeq(pt->y, yh))
-               return (TRUE);  /* pt lies on seg */
+               return TRUE;    /* pt lies on seg */
            else
                continue;       /* skip other hz segs */
        if (FPlt(yh, pt->y) ||  /* pt is strictly below seg */
@@ -2795,7 +2795,7 @@ on_ppath(Point *pt, PATH *path)
                     &path->p[NEXT(i)]) +
            path->p[i].x;
        if (FPeq(x, pt->x))     /* pt lies on this seg */
-           return (TRUE);
+           return TRUE;
 
        /* does the seg actually cross the ray? */
 
@@ -2814,18 +2814,18 @@ bool
 on_sl(LSEG *lseg, LINE *line)
 {
    if (!PointerIsValid(lseg) || !PointerIsValid(line))
-       return (FALSE);
+       return FALSE;
 
-   return (on_pl(&lseg->p[0], line) && on_pl(&lseg->p[1], line));
+   return on_pl(&lseg->p[0], line) && on_pl(&lseg->p[1], line);
 }  /* on_sl() */
 
 bool
 on_sb(LSEG *lseg, BOX *box)
 {
    if (!PointerIsValid(lseg) || !PointerIsValid(box))
-       return (FALSE);
+       return FALSE;
 
-   return (on_pb(&lseg->p[0], box) && on_pb(&lseg->p[1], box));
+   return on_pb(&lseg->p[0], box) && on_pb(&lseg->p[1], box);
 }  /* on_sb() */
 
 /*---------------------------------------------------------------------
@@ -2839,15 +2839,15 @@ inter_sl(LSEG *lseg, LINE *line)
    Point      *tmp;
 
    if (!PointerIsValid(lseg) || !PointerIsValid(line))
-       return (FALSE);
+       return FALSE;
 
    tmp = interpt_sl(lseg, line);
    if (tmp)
    {
        pfree(tmp);
-       return (TRUE);
+       return TRUE;
    }
-   return (FALSE);
+   return FALSE;
 }
 
 /* inter_sb()
@@ -2868,7 +2868,7 @@ inter_sb(LSEG *lseg, BOX *box)
    Point       point;
 
    if (!PointerIsValid(lseg) || !PointerIsValid(box))
-       return (FALSE);
+       return FALSE;
 
    lbox.low.x = Min(lseg->p[0].x, lseg->p[1].x);
    lbox.low.y = Min(lseg->p[0].y, lseg->p[1].y);
@@ -2877,35 +2877,35 @@ inter_sb(LSEG *lseg, BOX *box)
 
    /* nothing close to overlap? then not going to intersect */
    if (!box_overlap(&lbox, box))
-       return (FALSE);
+       return FALSE;
 
    /* an endpoint of segment is inside box? then clearly intersects */
    if (on_pb(&lseg->p[0], box) || on_pb(&lseg->p[1], box))
-       return (TRUE);
+       return TRUE;
 
    /* pairwise check lseg intersections */
    point.x = box->low.x;
    point.y = box->high.y;
    statlseg_construct(&bseg, &box->low, &point);
    if (lseg_intersect(&bseg, lseg))
-       return (TRUE);
+       return TRUE;
 
    statlseg_construct(&bseg, &box->high, &point);
    if (lseg_intersect(&bseg, lseg))
-       return (TRUE);
+       return TRUE;
 
    point.x = box->high.x;
    point.y = box->low.y;
    statlseg_construct(&bseg, &box->low, &point);
    if (lseg_intersect(&bseg, lseg))
-       return (TRUE);
+       return TRUE;
 
    statlseg_construct(&bseg, &box->high, &point);
    if (lseg_intersect(&bseg, lseg))
-       return (TRUE);
+       return TRUE;
 
    /* if we dropped through, no two segs intersected */
-   return (FALSE);
+   return FALSE;
 }  /* inter_sb() */
 
 /* inter_lb()
@@ -2919,7 +2919,7 @@ inter_lb(LINE *line, BOX *box)
                p2;
 
    if (!PointerIsValid(line) || !PointerIsValid(box))
-       return (FALSE);
+       return FALSE;
 
    /* pairwise check lseg intersections */
    p1.x = box->low.x;
@@ -2928,25 +2928,25 @@ inter_lb(LINE *line, BOX *box)
    p2.y = box->high.y;
    statlseg_construct(&bseg, &p1, &p2);
    if (inter_sl(&bseg, line))
-       return (TRUE);
+       return TRUE;
    p1.x = box->high.x;
    p1.y = box->high.y;
    statlseg_construct(&bseg, &p1, &p2);
    if (inter_sl(&bseg, line))
-       return (TRUE);
+       return TRUE;
    p2.x = box->high.x;
    p2.y = box->low.y;
    statlseg_construct(&bseg, &p1, &p2);
    if (inter_sl(&bseg, line))
-       return (TRUE);
+       return TRUE;
    p1.x = box->low.x;
    p1.y = box->low.y;
    statlseg_construct(&bseg, &p1, &p2);
    if (inter_sl(&bseg, line))
-       return (TRUE);
+       return TRUE;
 
    /* if we dropped through, no intersection */
-   return (FALSE);
+   return FALSE;
 }
 
 /*------------------------------------------------------------------
@@ -3027,7 +3027,7 @@ poly_in(char *str)
 
    make_bound_box(poly);
 
-   return (poly);
+   return poly;
 }  /* poly_in() */
 
 /*---------------------------------------------------------------
@@ -3041,7 +3041,7 @@ poly_out(POLYGON *poly)
    if (!PointerIsValid(poly))
        return NULL;
 
-   return (path_encode(TRUE, poly->npts, &(poly->p[0])));
+   return path_encode(TRUE, poly->npts, &(poly->p[0]));
 }  /* poly_out() */
 
 
@@ -3053,7 +3053,7 @@ poly_out(POLYGON *poly)
 bool
 poly_left(POLYGON *polya, POLYGON *polyb)
 {
-   return (polya->boundbox.high.x < polyb->boundbox.low.x);
+   return polya->boundbox.high.x < polyb->boundbox.low.x;
 }
 
 /*-------------------------------------------------------
@@ -3064,7 +3064,7 @@ poly_left(POLYGON *polya, POLYGON *polyb)
 bool
 poly_overleft(POLYGON *polya, POLYGON *polyb)
 {
-   return (polya->boundbox.low.x <= polyb->boundbox.high.x);
+   return polya->boundbox.low.x <= polyb->boundbox.high.x;
 }
 
 /*-------------------------------------------------------
@@ -3075,7 +3075,7 @@ poly_overleft(POLYGON *polya, POLYGON *polyb)
 bool
 poly_right(POLYGON *polya, POLYGON *polyb)
 {
-   return (polya->boundbox.low.x > polyb->boundbox.high.x);
+   return polya->boundbox.low.x > polyb->boundbox.high.x;
 }
 
 /*-------------------------------------------------------
@@ -3086,7 +3086,7 @@ poly_right(POLYGON *polya, POLYGON *polyb)
 bool
 poly_overright(POLYGON *polya, POLYGON *polyb)
 {
-   return (polya->boundbox.high.x > polyb->boundbox.low.x);
+   return polya->boundbox.high.x > polyb->boundbox.low.x;
 }
 
 /*-------------------------------------------------------
@@ -3105,7 +3105,7 @@ poly_same(POLYGON *polya, POLYGON *polyb)
    if (polya->npts != polyb->npts)
        return FALSE;
 
-   return (plist_same(polya->npts, polya->p, polyb->p));
+   return plist_same(polya->npts, polya->p, polyb->p);
 
 #if FALSE
    for (i = 0; i < polya->npts; i++)
@@ -3148,7 +3148,7 @@ poly_contain(POLYGON *polya, POLYGON *polyb)
    int         i;
 
    if (!PointerIsValid(polya) || !PointerIsValid(polyb))
-       return (FALSE);
+       return FALSE;
 
    if (box_contain(&(polya->boundbox), &(polyb->boundbox)))
    {
@@ -3159,7 +3159,7 @@ poly_contain(POLYGON *polya, POLYGON *polyb)
 #if GEODEBUG
                printf("poly_contain- point (%f,%f) not in polygon\n", polyb->p[i].x, polyb->p[i].y);
 #endif
-               return (FALSE);
+               return FALSE;
            }
        }
        for (i = 0; i < polya->npts; i++)
@@ -3169,17 +3169,17 @@ poly_contain(POLYGON *polya, POLYGON *polyb)
 #if GEODEBUG
                printf("poly_contain- point (%f,%f) in polygon\n", polya->p[i].x, polya->p[i].y);
 #endif
-               return (FALSE);
+               return FALSE;
            }
        }
-       return (TRUE);
+       return TRUE;
    }
 #if GEODEBUG
    printf("poly_contain- bound box ((%f,%f),(%f,%f)) not inside ((%f,%f),(%f,%f))\n",
           polyb->boundbox.low.x, polyb->boundbox.low.y, polyb->boundbox.high.x, polyb->boundbox.high.y,
           polya->boundbox.low.x, polya->boundbox.low.y, polya->boundbox.high.x, polya->boundbox.high.y);
 #endif
-   return (FALSE);
+   return FALSE;
 }  /* poly_contain() */
 
 
@@ -3191,7 +3191,7 @@ poly_contain(POLYGON *polya, POLYGON *polyb)
 bool
 poly_contained(POLYGON *polya, POLYGON *polyb)
 {
-   return (box_contained(&(polya->boundbox), &(polyb->boundbox)));
+   return box_contained(&(polya->boundbox), &(polyb->boundbox));
 }
 
 #endif
@@ -3199,7 +3199,7 @@ poly_contained(POLYGON *polya, POLYGON *polyb)
 bool
 poly_contained(POLYGON *polya, POLYGON *polyb)
 {
-   return (poly_contain(polyb, polya));
+   return poly_contain(polyb, polya);
 }  /* poly_contained() */
 
 
@@ -3217,18 +3217,18 @@ bool
 poly_contain_pt(POLYGON *poly, Point *p)
 {
    if (!PointerIsValid(poly) || !PointerIsValid(p))
-       return (FALSE);
+       return FALSE;
 
-   return (point_inside(p, poly->npts, &(poly->p[0])) != 0);
+   return point_inside(p, poly->npts, &(poly->p[0])) != 0;
 }  /* poly_contain_pt() */
 
 bool
 pt_contained_poly(Point *p, POLYGON *poly)
 {
    if (!PointerIsValid(p) || !PointerIsValid(poly))
-       return (FALSE);
+       return FALSE;
 
-   return (poly_contain_pt(poly, p));
+   return poly_contain_pt(poly, p);
 }  /* pt_contained_poly() */
 
 
@@ -3238,13 +3238,13 @@ poly_distance(POLYGON *polya, POLYGON *polyb)
    double     *result;
 
    if (!PointerIsValid(polya) || !PointerIsValid(polyb))
-       return (NULL);
+       return NULL;
 
    result = palloc(sizeof(double));
 
    *result = 0;
 
-   return (result);
+   return result;
 }  /* poly_distance() */
 
 
@@ -3258,9 +3258,9 @@ Point *
 point(float8 *x, float8 *y)
 {
    if (!(PointerIsValid(x) && PointerIsValid(y)))
-       return (NULL);
+       return NULL;
 
-   return (point_construct(*x, *y));
+   return point_construct(*x, *y);
 }  /* point() */
 
 
@@ -3270,14 +3270,14 @@ point_add(Point *p1, Point *p2)
    Point      *result;
 
    if (!(PointerIsValid(p1) && PointerIsValid(p2)))
-       return (NULL);
+       return NULL;
 
    result = palloc(sizeof(Point));
 
    result->x = (p1->x + p2->x);
    result->y = (p1->y + p2->y);
 
-   return (result);
+   return result;
 }  /* point_add() */
 
 Point *
@@ -3286,14 +3286,14 @@ point_sub(Point *p1, Point *p2)
    Point      *result;
 
    if (!(PointerIsValid(p1) && PointerIsValid(p2)))
-       return (NULL);
+       return NULL;
 
    result = palloc(sizeof(Point));
 
    result->x = (p1->x - p2->x);
    result->y = (p1->y - p2->y);
 
-   return (result);
+   return result;
 }  /* point_sub() */
 
 Point *
@@ -3302,14 +3302,14 @@ point_mul(Point *p1, Point *p2)
    Point      *result;
 
    if (!(PointerIsValid(p1) && PointerIsValid(p2)))
-       return (NULL);
+       return NULL;
 
    result = palloc(sizeof(Point));
 
    result->x = (p1->x * p2->x) - (p1->y * p2->y);
    result->y = (p1->x * p2->y) + (p1->y * p2->x);
 
-   return (result);
+   return result;
 }  /* point_mul() */
 
 Point *
@@ -3319,7 +3319,7 @@ point_div(Point *p1, Point *p2)
    double      div;
 
    if (!(PointerIsValid(p1) && PointerIsValid(p2)))
-       return (NULL);
+       return NULL;
 
    result = palloc(sizeof(Point));
 
@@ -3331,7 +3331,7 @@ point_div(Point *p1, Point *p2)
    result->x = ((p1->x * p2->x) + (p1->y * p2->y)) / div;
    result->y = ((p2->x * p1->y) - (p2->y * p1->x)) / div;
 
-   return (result);
+   return result;
 }  /* point_div() */
 
 
@@ -3347,11 +3347,11 @@ box(Point *p1, Point *p2)
    BOX        *result;
 
    if (!(PointerIsValid(p1) && PointerIsValid(p2)))
-       return (NULL);
+       return NULL;
 
    result = box_construct(p1->x, p2->x, p1->y, p2->y);
 
-   return (result);
+   return result;
 }  /* box() */
 
 BOX *
@@ -3360,12 +3360,12 @@ box_add(BOX *box, Point *p)
    BOX        *result;
 
    if (!(PointerIsValid(box) && PointerIsValid(p)))
-       return (NULL);
+       return NULL;
 
    result = box_construct((box->high.x + p->x), (box->low.x + p->x),
                           (box->high.y + p->y), (box->low.y + p->y));
 
-   return (result);
+   return result;
 }  /* box_add() */
 
 BOX *
@@ -3374,12 +3374,12 @@ box_sub(BOX *box, Point *p)
    BOX        *result;
 
    if (!(PointerIsValid(box) && PointerIsValid(p)))
-       return (NULL);
+       return NULL;
 
    result = box_construct((box->high.x - p->x), (box->low.x - p->x),
                           (box->high.y - p->y), (box->low.y - p->y));
 
-   return (result);
+   return result;
 }  /* box_sub() */
 
 BOX *
@@ -3390,7 +3390,7 @@ box_mul(BOX *box, Point *p)
               *low;
 
    if (!(PointerIsValid(box) && PointerIsValid(p)))
-       return (NULL);
+       return NULL;
 
    high = point_mul(&box->high, p);
    low = point_mul(&box->low, p);
@@ -3399,7 +3399,7 @@ box_mul(BOX *box, Point *p)
    pfree(high);
    pfree(low);
 
-   return (result);
+   return result;
 }  /* box_mul() */
 
 BOX *
@@ -3410,7 +3410,7 @@ box_div(BOX *box, Point *p)
               *low;
 
    if (!(PointerIsValid(box) && PointerIsValid(p)))
-       return (NULL);
+       return NULL;
 
    high = point_div(&box->high, p);
    low = point_div(&box->low, p);
@@ -3419,7 +3419,7 @@ box_div(BOX *box, Point *p)
    pfree(high);
    pfree(low);
 
-   return (result);
+   return result;
 }  /* box_div() */
 
 
@@ -3441,7 +3441,7 @@ path_add(PATH *p1, PATH *p2)
 
    if (!(PointerIsValid(p1) && PointerIsValid(p2))
        || p1->closed || p2->closed)
-       return (NULL);
+       return NULL;
 
    size = offsetof(PATH, p[0]) +(sizeof(p1->p[0]) * (p1->npts + p2->npts));
    result = palloc(size);
@@ -3461,7 +3461,7 @@ path_add(PATH *p1, PATH *p2)
        result->p[i + p1->npts].y = p2->p[i].y;
    }
 
-   return (result);
+   return result;
 }  /* path_add() */
 
 /* path_add_pt()
@@ -3474,7 +3474,7 @@ path_add_pt(PATH *path, Point *point)
    int         i;
 
    if ((!PointerIsValid(path)) || (!PointerIsValid(point)))
-       return (NULL);
+       return NULL;
 
    result = path_copy(path);
 
@@ -3484,7 +3484,7 @@ path_add_pt(PATH *path, Point *point)
        result->p[i].y += point->y;
    }
 
-   return (result);
+   return result;
 }  /* path_add_pt() */
 
 PATH *
@@ -3494,7 +3494,7 @@ path_sub_pt(PATH *path, Point *point)
    int         i;
 
    if ((!PointerIsValid(path)) || (!PointerIsValid(point)))
-       return (NULL);
+       return NULL;
 
    result = path_copy(path);
 
@@ -3504,7 +3504,7 @@ path_sub_pt(PATH *path, Point *point)
        result->p[i].y -= point->y;
    }
 
-   return (result);
+   return result;
 }  /* path_sub_pt() */
 
 
@@ -3519,7 +3519,7 @@ path_mul_pt(PATH *path, Point *point)
    int         i;
 
    if ((!PointerIsValid(path)) || (!PointerIsValid(point)))
-       return (NULL);
+       return NULL;
 
    result = path_copy(path);
 
@@ -3531,7 +3531,7 @@ path_mul_pt(PATH *path, Point *point)
        pfree(p);
    }
 
-   return (result);
+   return result;
 }  /* path_mul_pt() */
 
 PATH *
@@ -3542,7 +3542,7 @@ path_div_pt(PATH *path, Point *point)
    int         i;
 
    if ((!PointerIsValid(path)) || (!PointerIsValid(point)))
-       return (NULL);
+       return NULL;
 
    result = path_copy(path);
 
@@ -3554,7 +3554,7 @@ path_div_pt(PATH *path, Point *point)
        pfree(p);
    }
 
-   return (result);
+   return result;
 }  /* path_div_pt() */
 
 
@@ -3562,18 +3562,18 @@ bool
 path_contain_pt(PATH *path, Point *p)
 {
    if (!PointerIsValid(path) || !PointerIsValid(p))
-       return (FALSE);
+       return FALSE;
 
-   return ((path->closed ? (point_inside(p, path->npts, &(path->p[0])) != 0) : FALSE));
+   return (path->closed ? (point_inside(p, path->npts, &(path->p[0])) != 0) : FALSE);
 }  /* path_contain_pt() */
 
 bool
 pt_contained_path(Point *p, PATH *path)
 {
    if (!PointerIsValid(p) || !PointerIsValid(path))
-       return (FALSE);
+       return FALSE;
 
-   return (path_contain_pt(path, p));
+   return path_contain_pt(path, p);
 }  /* pt_contained_path() */
 
 
@@ -3583,14 +3583,14 @@ path_center(PATH *path)
    Point      *result;
 
    if (!PointerIsValid(path))
-       return (NULL);
+       return NULL;
 
    elog(ERROR, "path_center not implemented", NULL);
 
    result = palloc(sizeof(Point));
    result = NULL;
 
-   return (result);
+   return result;
 }  /* path_center() */
 
 POLYGON    *
@@ -3601,7 +3601,7 @@ path_poly(PATH *path)
    int         i;
 
    if (!PointerIsValid(path))
-       return (NULL);
+       return NULL;
 
    if (!path->closed)
        elog(ERROR, "Open path cannot be converted to polygon", NULL);
@@ -3620,7 +3620,7 @@ path_poly(PATH *path)
 
    make_bound_box(poly);
 
-   return (poly);
+   return poly;
 }  /* path_polygon() */
 
 
@@ -3640,7 +3640,7 @@ upgradepath(PATH *path)
    int         i;
 
    if (!PointerIsValid(path) || (path->npts < 2))
-       return (NULL);
+       return NULL;
 
    if (!isoldpath(path))
        elog(ERROR, "upgradepath: path already upgraded?", NULL);
@@ -3660,16 +3660,16 @@ upgradepath(PATH *path)
        result->p[i].y = path->p[i + 1].y;
    }
 
-   return (result);
+   return result;
 }  /* upgradepath() */
 
 bool
 isoldpath(PATH *path)
 {
    if (!PointerIsValid(path) || (path->npts < 2))
-       return (FALSE);
+       return FALSE;
 
-   return (path->npts == (path->p[0].y + 1));
+   return path->npts == (path->p[0].y + 1);
 }  /* isoldpath() */
 
 
@@ -3683,9 +3683,9 @@ int4
 poly_npoints(POLYGON *poly)
 {
    if (!PointerIsValid(poly))
-       return (FALSE);
+       return FALSE;
 
-   return (poly->npts);
+   return poly->npts;
 }  /* poly_npoints() */
 
 
@@ -3696,7 +3696,7 @@ poly_center(POLYGON *poly)
    CIRCLE     *circle;
 
    if (!PointerIsValid(poly))
-       return (NULL);
+       return NULL;
 
    if (PointerIsValid(circle = poly_circle(poly)))
    {
@@ -3707,7 +3707,7 @@ poly_center(POLYGON *poly)
    else
        result = NULL;
 
-   return (result);
+   return result;
 }  /* poly_center() */
 
 
@@ -3717,11 +3717,11 @@ poly_box(POLYGON *poly)
    BOX        *box;
 
    if (!PointerIsValid(poly) || (poly->npts < 1))
-       return (NULL);
+       return NULL;
 
    box = box_copy(&poly->boundbox);
 
-   return (box);
+   return box;
 }  /* poly_box() */
 
 
@@ -3735,7 +3735,7 @@ box_poly(BOX *box)
    int         size;
 
    if (!PointerIsValid(box))
-       return (NULL);
+       return NULL;
 
    /* map four corners of the box to a polygon */
    size = offsetof(POLYGON, p[0]) +(sizeof(poly->p[0]) * 4);
@@ -3755,7 +3755,7 @@ box_poly(BOX *box)
 
    box_fill(&poly->boundbox, box->high.x, box->low.x, box->high.y, box->low.y);
 
-   return (poly);
+   return poly;
 }  /* box_poly() */
 
 
@@ -3767,7 +3767,7 @@ poly_path(POLYGON *poly)
    int         i;
 
    if (!PointerIsValid(poly) || (poly->npts < 0))
-       return (NULL);
+       return NULL;
 
    size = offsetof(PATH, p[0]) +(sizeof(path->p[0]) * poly->npts);
    path = palloc(size);
@@ -3782,7 +3782,7 @@ poly_path(POLYGON *poly)
        path->p[i].y = poly->p[i].y;
    }
 
-   return (path);
+   return path;
 }  /* poly_path() */
 
 
@@ -3801,7 +3801,7 @@ upgradepoly(POLYGON *poly)
                ii;
 
    if (!PointerIsValid(poly) || (poly->npts < 1))
-       return (NULL);
+       return NULL;
 
    size = offsetof(POLYGON, p[0]) +(sizeof(poly->p[0]) * poly->npts);
    result = palloc(size);
@@ -3831,7 +3831,7 @@ upgradepoly(POLYGON *poly)
        result->p[2 * i + ii + 1].y = poly->p[i + n2 + ii].y;   /* odd (+offset) indices */
    }
 
-   return (result);
+   return result;
 }  /* upgradepoly() */
 
 /* revertpoly()
@@ -3847,7 +3847,7 @@ revertpoly(POLYGON *poly)
                ii;
 
    if (!PointerIsValid(poly) || (poly->npts < 1))
-       return (NULL);
+       return NULL;
 
    size = offsetof(POLYGON, p[0]) +(sizeof(poly->p[0]) * poly->npts);
    result = palloc(size);
@@ -3877,7 +3877,7 @@ revertpoly(POLYGON *poly)
        result->p[i + n2 + ii].y = poly->p[2 * i + ii + 1].y;   /* odd (+offset) indices */
    }
 
-   return (result);
+   return result;
 }  /* revertpoly() */
 
 
@@ -3952,7 +3952,7 @@ circle_in(char *str)
    if (*s != '\0')
        elog(ERROR, "Bad circle external representation '%s'", str);
 
-   return (circle);
+   return circle;
 }  /* circle_in() */
 
 /*     circle_out      -       convert a circle to external form.
@@ -3964,7 +3964,7 @@ circle_out(CIRCLE *circle)
    char       *cp;
 
    if (!PointerIsValid(circle))
-       return (NULL);
+       return NULL;
 
    result = palloc(3 * (P_MAXLEN + 1) + 3);
 
@@ -3984,7 +3984,7 @@ circle_out(CIRCLE *circle)
    *cp++ = RDELIM_C;
    *cp = '\0';
 
-   return (result);
+   return result;
 }  /* circle_out() */
 
 
@@ -4008,7 +4008,7 @@ circle_same(CIRCLE *circle1, CIRCLE *circle2)
 bool
 circle_overlap(CIRCLE *circle1, CIRCLE *circle2)
 {
-   return (FPle(point_dt(&circle1->center, &circle2->center), (circle1->radius + circle2->radius)));
+   return FPle(point_dt(&circle1->center, &circle2->center), (circle1->radius + circle2->radius));
 }
 
 /*     circle_overleft -       is the right edge of circle1 to the left of
@@ -4017,7 +4017,7 @@ circle_overlap(CIRCLE *circle1, CIRCLE *circle2)
 bool
 circle_overleft(CIRCLE *circle1, CIRCLE *circle2)
 {
-   return (FPle((circle1->center.x + circle1->radius), (circle2->center.x + circle2->radius)));
+   return FPle((circle1->center.x + circle1->radius), (circle2->center.x + circle2->radius));
 }
 
 /*     circle_left     -       is circle1 strictly left of circle2?
@@ -4025,7 +4025,7 @@ circle_overleft(CIRCLE *circle1, CIRCLE *circle2)
 bool
 circle_left(CIRCLE *circle1, CIRCLE *circle2)
 {
-   return (FPle((circle1->center.x + circle1->radius), (circle2->center.x - circle2->radius)));
+   return FPle((circle1->center.x + circle1->radius), (circle2->center.x - circle2->radius));
 }
 
 /*     circle_right    -       is circle1 strictly right of circle2?
@@ -4033,7 +4033,7 @@ circle_left(CIRCLE *circle1, CIRCLE *circle2)
 bool
 circle_right(CIRCLE *circle1, CIRCLE *circle2)
 {
-   return (FPge((circle1->center.x - circle1->radius), (circle2->center.x + circle2->radius)));
+   return FPge((circle1->center.x - circle1->radius), (circle2->center.x + circle2->radius));
 }
 
 /*     circle_overright        -       is the left edge of circle1 to the right of
@@ -4042,7 +4042,7 @@ circle_right(CIRCLE *circle1, CIRCLE *circle2)
 bool
 circle_overright(CIRCLE *circle1, CIRCLE *circle2)
 {
-   return (FPge((circle1->center.x - circle1->radius), (circle2->center.x - circle2->radius)));
+   return FPge((circle1->center.x - circle1->radius), (circle2->center.x - circle2->radius));
 }
 
 /*     circle_contained        -       is circle1 contained by circle2?
@@ -4050,7 +4050,7 @@ circle_overright(CIRCLE *circle1, CIRCLE *circle2)
 bool
 circle_contained(CIRCLE *circle1, CIRCLE *circle2)
 {
-   return (FPle((point_dt(&circle1->center, &circle2->center) + circle1->radius), circle2->radius));
+   return FPle((point_dt(&circle1->center, &circle2->center) + circle1->radius), circle2->radius);
 }
 
 /*     circle_contain  -       does circle1 contain circle2?
@@ -4058,7 +4058,7 @@ circle_contained(CIRCLE *circle1, CIRCLE *circle2)
 bool
 circle_contain(CIRCLE *circle1, CIRCLE *circle2)
 {
-   return (FPle((point_dt(&circle1->center, &circle2->center) + circle2->radius), circle1->radius));
+   return FPle((point_dt(&circle1->center, &circle2->center) + circle2->radius), circle1->radius);
 }
 
 
@@ -4068,13 +4068,13 @@ circle_contain(CIRCLE *circle1, CIRCLE *circle2)
 bool
 circle_below(CIRCLE *circle1, CIRCLE *circle2)
 {
-   return (FPle((circle1->center.y + circle1->radius), (circle2->center.y - circle2->radius)));
+   return FPle((circle1->center.y + circle1->radius), (circle2->center.y - circle2->radius));
 }
 
 bool
 circle_above(CIRCLE *circle1, CIRCLE *circle2)
 {
-   return (FPge((circle1->center.y - circle1->radius), (circle2->center.y + circle2->radius)));
+   return FPge((circle1->center.y - circle1->radius), (circle2->center.y + circle2->radius));
 }
 
 
@@ -4084,37 +4084,37 @@ circle_above(CIRCLE *circle1, CIRCLE *circle2)
 bool
 circle_eq(CIRCLE *circle1, CIRCLE *circle2)
 {
-   return (FPeq(circle_ar(circle1), circle_ar(circle2)));
+   return FPeq(circle_ar(circle1), circle_ar(circle2));
 }  /* circle_eq() */
 
 bool
 circle_ne(CIRCLE *circle1, CIRCLE *circle2)
 {
-   return (!circle_eq(circle1, circle2));
+   return !circle_eq(circle1, circle2);
 }  /* circle_ne() */
 
 bool
 circle_lt(CIRCLE *circle1, CIRCLE *circle2)
 {
-   return (FPlt(circle_ar(circle1), circle_ar(circle2)));
+   return FPlt(circle_ar(circle1), circle_ar(circle2));
 }  /* circle_lt() */
 
 bool
 circle_gt(CIRCLE *circle1, CIRCLE *circle2)
 {
-   return (FPgt(circle_ar(circle1), circle_ar(circle2)));
+   return FPgt(circle_ar(circle1), circle_ar(circle2));
 }  /* circle_gt() */
 
 bool
 circle_le(CIRCLE *circle1, CIRCLE *circle2)
 {
-   return (FPle(circle_ar(circle1), circle_ar(circle2)));
+   return FPle(circle_ar(circle1), circle_ar(circle2));
 }  /* circle_le() */
 
 bool
 circle_ge(CIRCLE *circle1, CIRCLE *circle2)
 {
-   return (FPge(circle_ar(circle1), circle_ar(circle2)));
+   return FPge(circle_ar(circle1), circle_ar(circle2));
 }  /* circle_ge() */
 
 
@@ -4137,7 +4137,7 @@ circle_copy(CIRCLE *circle)
    result = palloc(sizeof(CIRCLE));
 
    memmove((char *) result, (char *) circle, sizeof(CIRCLE));
-   return (result);
+   return result;
 }  /* circle_copy() */
 
 
@@ -4150,14 +4150,14 @@ circle_add_pt(CIRCLE *circle, Point *point)
    CIRCLE     *result;
 
    if (!PointerIsValid(circle) || !PointerIsValid(point))
-       return (NULL);
+       return NULL;
 
    result = circle_copy(circle);
 
    result->center.x += point->x;
    result->center.y += point->y;
 
-   return (result);
+   return result;
 }  /* circle_add_pt() */
 
 CIRCLE *
@@ -4166,14 +4166,14 @@ circle_sub_pt(CIRCLE *circle, Point *point)
    CIRCLE     *result;
 
    if (!PointerIsValid(circle) || !PointerIsValid(point))
-       return (NULL);
+       return NULL;
 
    result = circle_copy(circle);
 
    result->center.x -= point->x;
    result->center.y -= point->y;
 
-   return (result);
+   return result;
 }  /* circle_sub_pt() */
 
 
@@ -4187,7 +4187,7 @@ circle_mul_pt(CIRCLE *circle, Point *point)
    Point      *p;
 
    if (!PointerIsValid(circle) || !PointerIsValid(point))
-       return (NULL);
+       return NULL;
 
    result = circle_copy(circle);
 
@@ -4197,7 +4197,7 @@ circle_mul_pt(CIRCLE *circle, Point *point)
    pfree(p);
    result->radius *= HYPOT(point->x, point->y);
 
-   return (result);
+   return result;
 }  /* circle_mul_pt() */
 
 CIRCLE *
@@ -4207,7 +4207,7 @@ circle_div_pt(CIRCLE *circle, Point *point)
    Point      *p;
 
    if (!PointerIsValid(circle) || !PointerIsValid(point))
-       return (NULL);
+       return NULL;
 
    result = circle_copy(circle);
 
@@ -4217,7 +4217,7 @@ circle_div_pt(CIRCLE *circle, Point *point)
    pfree(p);
    result->radius /= HYPOT(point->x, point->y);
 
-   return (result);
+   return result;
 }  /* circle_div_pt() */
 
 
@@ -4231,7 +4231,7 @@ circle_area(CIRCLE *circle)
    result = palloc(sizeof(double));
    *result = circle_ar(circle);
 
-   return (result);
+   return result;
 }
 
 
@@ -4245,7 +4245,7 @@ circle_diameter(CIRCLE *circle)
    result = palloc(sizeof(double));
    *result = (2 * circle->radius);
 
-   return (result);
+   return result;
 }
 
 
@@ -4259,7 +4259,7 @@ circle_radius(CIRCLE *circle)
    result = palloc(sizeof(double));
    *result = circle->radius;
 
-   return (result);
+   return result;
 }
 
 
@@ -4277,7 +4277,7 @@ circle_distance(CIRCLE *circle1, CIRCLE *circle2)
    if (*result < 0)
        *result = 0;
 
-   return (result);
+   return result;
 }  /* circle_distance() */
 
 
@@ -4288,20 +4288,20 @@ circle_contain_pt(CIRCLE *circle, Point *point)
    double     *d;
 
    if (!PointerIsValid(circle) || !PointerIsValid(point))
-       return (FALSE);
+       return FALSE;
 
    d = point_distance(&(circle->center), point);
    within = (*d <= circle->radius);
    pfree(d);
 
-   return (within);
+   return within;
 }  /* circle_contain_pt() */
 
 
 bool
 pt_contained_circle(Point *point, CIRCLE *circle)
 {
-   return (circle_contain_pt(circle, point));
+   return circle_contain_pt(circle, point);
 }  /* circle_contain_pt() */
 
 
@@ -4319,7 +4319,7 @@ dist_pc(Point *point, CIRCLE *circle)
    if (*result < 0)
        *result = 0;
 
-   return (result);
+   return result;
 }  /* dist_pc() */
 
 
@@ -4334,7 +4334,7 @@ circle_center(CIRCLE *circle)
    result->x = circle->center.x;
    result->y = circle->center.y;
 
-   return (result);
+   return result;
 }
 
 
@@ -4343,7 +4343,7 @@ circle_center(CIRCLE *circle)
 static double
 circle_ar(CIRCLE *circle)
 {
-   return (PI * (circle->radius * circle->radius));
+   return PI * (circle->radius * circle->radius);
 }
 
 
@@ -4358,7 +4358,7 @@ circle_dt(CIRCLE *circle1, CIRCLE *circle2)
 
    result = point_dt(&circle1->center, &circle2->center);
 
-   return (result);
+   return result;
 }
 
 #endif
@@ -4373,7 +4373,7 @@ circle(Point *center, float8 *radius)
    CIRCLE     *result;
 
    if (!(PointerIsValid(center) && PointerIsValid(radius)))
-       return (NULL);
+       return NULL;
 
    result = palloc(sizeof(CIRCLE));
 
@@ -4381,7 +4381,7 @@ circle(Point *center, float8 *radius)
    result->center.y = center->y;
    result->radius = *radius;
 
-   return (result);
+   return result;
 }
 
 
@@ -4392,7 +4392,7 @@ circle_box(CIRCLE *circle)
    double      delta;
 
    if (!PointerIsValid(circle))
-       return (NULL);
+       return NULL;
 
    box = palloc(sizeof(BOX));
 
@@ -4403,7 +4403,7 @@ circle_box(CIRCLE *circle)
    box->high.y = circle->center.y + delta;
    box->low.y = circle->center.y - delta;
 
-   return (box);
+   return box;
 }  /* circle_box() */
 
 /* box_circle()
@@ -4415,7 +4415,7 @@ box_circle(BOX *box)
    CIRCLE     *circle;
 
    if (!PointerIsValid(box))
-       return (NULL);
+       return NULL;
 
    circle = palloc(sizeof(CIRCLE));
 
@@ -4424,7 +4424,7 @@ box_circle(BOX *box)
 
    circle->radius = point_dt(&circle->center, &box->high);
 
-   return (circle);
+   return circle;
 }  /* box_circle() */
 
 
@@ -4437,7 +4437,7 @@ circle_poly(int npts, CIRCLE *circle)
    double      angle;
 
    if (!PointerIsValid(circle))
-       return (NULL);
+       return NULL;
 
    if (FPzero(circle->radius) || (npts < 2))
        elog(ERROR, "Unable to convert circle to polygon", NULL);
@@ -4458,7 +4458,7 @@ circle_poly(int npts, CIRCLE *circle)
 
    make_bound_box(poly);
 
-   return (poly);
+   return poly;
 }
 
 /*     poly_circle     - convert polygon to circle
@@ -4473,7 +4473,7 @@ poly_circle(POLYGON *poly)
    int         i;
 
    if (!PointerIsValid(poly))
-       return (NULL);
+       return NULL;
 
    if (poly->npts < 2)
        elog(ERROR, "Unable to convert polygon to circle", NULL);
@@ -4499,7 +4499,7 @@ poly_circle(POLYGON *poly)
    if (FPzero(circle->radius))
        elog(ERROR, "Unable to convert polygon to circle", NULL);
 
-   return (circle);
+   return circle;
 }  /* poly_circle() */
 
 
@@ -4512,7 +4512,7 @@ poly_circle(POLYGON *poly)
 #define HIT_IT INT_MAX
 
 static int
-point_inside(Point *p, int npts, Point plist[])
+point_inside(Point *p, int npts, Point *plist)
 {
    double      x0,
                y0;
@@ -4585,51 +4585,51 @@ lseg_crossing(double x, double y, double px, double py)
    {
        if (FPzero(x))
        {
-           return (HIT_IT);
+           return HIT_IT;
 
        }
        else if (FPgt(x, 0))
        {
            if (FPzero(py))
-               return (FPgt(px, 0) ? 0 : HIT_IT);
-           return (FPlt(py, 0) ? 1 : -1);
+               return FPgt(px, 0) ? 0 : HIT_IT;
+           return FPlt(py, 0) ? 1 : -1;
 
        }
        else
        {                       /* x < 0 */
            if (FPzero(py))
-               return (FPlt(px, 0) ? 0 : HIT_IT);
-           return (0);
+               return FPlt(px, 0) ? 0 : HIT_IT;
+           return 0;
        }
    }
 
    /* Now we know y != 0;  set sgn to sign of y */
    sgn = (FPgt(y, 0) ? 1 : -1);
    if (FPzero(py))
-       return (FPlt(px, 0) ? 0 : sgn);
+       return FPlt(px, 0) ? 0 : sgn;
 
    if (FPgt((sgn * py), 0))
    {                           /* y and py have same sign */
-       return (0);
+       return 0;
 
    }
    else
    {                           /* y and py have opposite signs */
        if (FPge(x, 0) && FPgt(px, 0))
-           return (2 * sgn);
+           return 2 * sgn;
        if (FPlt(x, 0) && FPle(px, 0))
-           return (0);
+           return 0;
 
        z = (x - px) * y - (y - py) * x;
        if (FPzero(z))
-           return (HIT_IT);
-       return (FPgt((sgn * z), 0) ? 0 : 2 * sgn);
+           return HIT_IT;
+       return FPgt((sgn * z), 0) ? 0 : 2 * sgn;
    }
 }  /* lseg_crossing() */
 
 
 static bool
-plist_same(int npts, Point p1[], Point p2[])
+plist_same(int npts, Point *p1, Point *p2)
 {
    int         i,
                ii,
@@ -4660,7 +4660,7 @@ plist_same(int npts, Point p1[], Point p2[])
            printf("plist_same- ii = %d/%d after forward match\n", ii, npts);
 #endif
            if (ii == npts)
-               return (TRUE);
+               return TRUE;
 
            /* match not found forwards? then look backwards */
            for (ii = 1, j = i - 1; ii < npts; ii++, j--)
@@ -4680,9 +4680,9 @@ plist_same(int npts, Point p1[], Point p2[])
            printf("plist_same- ii = %d/%d after reverse match\n", ii, npts);
 #endif
            if (ii == npts)
-               return (TRUE);
+               return TRUE;
        }
    }
 
-   return (FALSE);
+   return FALSE;
 }  /* plist_same() */
index d07230e41f7565ded1ef239a58b83ebe5b8c8b47..9d011cdbb206164332b6f9c7cc811969ded26ea6 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_selfuncs.c,v 1.5 1997/09/08 02:30:44 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_selfuncs.c,v 1.6 1998/09/01 03:26:02 momjian Exp $
  *
  *     XXX These are totally bogus.
  *
@@ -32,7 +32,7 @@ areasel(Oid opid,
 
    result = (float64) palloc(sizeof(float64data));
    *result = 1.0 / 4.0;
-   return (result);
+   return result;
 }
 
 float64
@@ -46,7 +46,7 @@ areajoinsel(Oid opid,
 
    result = (float64) palloc(sizeof(float64data));
    *result = 1.0 / 4.0;
-   return (result);
+   return result;
 }
 
 /*
@@ -77,7 +77,7 @@ leftsel(Oid opid,
 
    result = (float64) palloc(sizeof(float64data));
    *result = 1.0 / 6.0;
-   return (result);
+   return result;
 }
 
 #endif
@@ -94,7 +94,7 @@ leftjoinsel(Oid opid,
 
    result = (float64) palloc(sizeof(float64data));
    *result = 1.0 / 6.0;
-   return (result);
+   return result;
 }
 
 #endif
@@ -114,7 +114,7 @@ contsel(Oid opid,
 
    result = (float64) palloc(sizeof(float64data));
    *result = 1.0 / 10.0;
-   return (result);
+   return result;
 }
 
 #endif
@@ -131,7 +131,7 @@ contjoinsel(Oid opid,
 
    result = (float64) palloc(sizeof(float64data));
    *result = 1.0 / 10.0;
-   return (result);
+   return result;
 }
 
 #endif
index 2bf1fdf80f3ca952157aa2dc1e2eacca49332012..d1e1a062dc2ace1158ca721484bdb5b66f63a225 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.15 1998/02/26 04:37:10 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.16 1998/09/01 03:26:03 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -55,7 +55,7 @@
 int32
 int2in(char *num)
 {
-   return ((int32) pg_atoi(num, sizeof(int16), '\0'));
+   return (int32) pg_atoi(num, sizeof(int16), '\0');
 }
 
 /*
@@ -68,7 +68,7 @@ int2out(int16 sh)
 
    result = (char *) palloc(7);/* assumes sign, 5 digits, '\0' */
    itoa((int) sh, result);
-   return (result);
+   return result;
 }
 
 /*
@@ -80,12 +80,12 @@ int2out(int16 sh)
 int16 *
 int28in(char *shs)
 {
-   int16       (*result)[];
+   int16       **result;
    int         nums;
 
    if (shs == NULL)
-       return (NULL);
-   result = (int16 (*)[]) palloc(sizeof(int16[8]));
+       return NULL;
+   result = (int16 **) palloc(sizeof(int16[8]));
    if ((nums = sscanf(shs, "%hd%hd%hd%hd%hd%hd%hd%hd",
                       *result,
                       *result + 1,
@@ -100,14 +100,14 @@ int28in(char *shs)
            (*result)[nums++] = 0;
        while (nums < 8);
    }
-   return ((int16 *) result);
+   return (int16 *) result;
 }
 
 /*
  *     int28out        - converts internal form to "num num ..."
  */
 char *
-int28out(int16 (*shs)[])
+int28out(int16 **shs)
 {
    int         num;
    int16      *sp;
@@ -119,7 +119,7 @@ int28out(int16 (*shs)[])
        result = (char *) palloc(2);
        result[0] = '-';
        result[1] = '\0';
-       return (result);
+       return result;
    }
    rp = result = (char *) palloc(8 * 7);       /* assumes sign, 5 digits,
                                                 * ' ' */
@@ -132,7 +132,7 @@ int28out(int16 (*shs)[])
        *rp++ = ' ';
    }
    *--rp = '\0';
-   return (result);
+   return result;
 }
 
 /*
@@ -156,14 +156,14 @@ int44in(char *input_string)
    while (i < 4)
        foo[i++] = 0;
 
-   return (foo);
+   return foo;
 }
 
 /*
  *     int28out        - converts internal form to "num num ..."
  */
 char *
-int44out(int32 an_array[])
+int44out(int32 *an_array)
 {
    int         temp = 4;
    char       *output_string = NULL;
@@ -185,7 +185,7 @@ int44out(int32 an_array[])
        }
        *--walk = '\0';
    }
-   return (output_string);
+   return output_string;
 }
 
 
@@ -199,7 +199,7 @@ int44out(int32 an_array[])
 int32
 int4in(char *num)
 {
-   return (pg_atoi(num, sizeof(int32), '\0'));
+   return pg_atoi(num, sizeof(int32), '\0');
 }
 
 /*
@@ -212,7 +212,7 @@ int4out(int32 l)
 
    result = (char *) palloc(12);       /* assumes sign, 10 digits, '\0' */
    ltoa(l, result);
-   return (result);
+   return result;
 }
 
 
@@ -225,7 +225,7 @@ int4out(int32 l)
 int32
 i2toi4(int16 arg1)
 {
-   return ((int32) arg1);
+   return (int32) arg1;
 }
 
 int16
@@ -236,7 +236,7 @@ i4toi2(int32 arg1)
    if (arg1 > SHRT_MAX)
        elog(ERROR, "i4toi2: '%d' causes int2 overflow", arg1);
 
-   return ((int16) arg1);
+   return (int16) arg1;
 }
 
 text *
@@ -257,7 +257,7 @@ int2_text(int16 arg1)
 
    pfree(str);
 
-   return (result);
+   return result;
 }  /* int2_text() */
 
 int16
@@ -277,7 +277,7 @@ text_int2(text *string)
    result = int2in(str);
    pfree(str);
 
-   return (result);
+   return result;
 }  /* text_int2() */
 
 text *
@@ -298,7 +298,7 @@ int4_text(int32 arg1)
 
    pfree(str);
 
-   return (result);
+   return result;
 }  /* int4_text() */
 
 int32
@@ -318,7 +318,7 @@ text_int4(text *string)
    result = int4in(str);
    pfree(str);
 
-   return (result);
+   return result;
 }  /* text_int4() */
 
 
@@ -339,152 +339,152 @@ text_int4(text *string)
 bool
 int4eq(int32 arg1, int32 arg2)
 {
-   return (arg1 == arg2);
+   return arg1 == arg2;
 }
 
 bool
 int4ne(int32 arg1, int32 arg2)
 {
-   return (arg1 != arg2);
+   return arg1 != arg2;
 }
 
 bool
 int4lt(int32 arg1, int32 arg2)
 {
-   return (arg1 < arg2);
+   return arg1 < arg2;
 }
 
 bool
 int4le(int32 arg1, int32 arg2)
 {
-   return (arg1 <= arg2);
+   return arg1 <= arg2;
 }
 
 bool
 int4gt(int32 arg1, int32 arg2)
 {
-   return (arg1 > arg2);
+   return arg1 > arg2;
 }
 
 bool
 int4ge(int32 arg1, int32 arg2)
 {
-   return (arg1 >= arg2);
+   return arg1 >= arg2;
 }
 
 bool
 int2eq(int16 arg1, int16 arg2)
 {
-   return (arg1 == arg2);
+   return arg1 == arg2;
 }
 
 bool
 int2ne(int16 arg1, int16 arg2)
 {
-   return (arg1 != arg2);
+   return arg1 != arg2;
 }
 
 bool
 int2lt(int16 arg1, int16 arg2)
 {
-   return (arg1 < arg2);
+   return arg1 < arg2;
 }
 
 bool
 int2le(int16 arg1, int16 arg2)
 {
-   return (arg1 <= arg2);
+   return arg1 <= arg2;
 }
 
 bool
 int2gt(int16 arg1, int16 arg2)
 {
-   return (arg1 > arg2);
+   return arg1 > arg2;
 }
 
 bool
 int2ge(int16 arg1, int16 arg2)
 {
-   return (arg1 >= arg2);
+   return arg1 >= arg2;
 }
 
 bool
 int24eq(int32 arg1, int32 arg2)
 {
-   return (arg1 == arg2);
+   return arg1 == arg2;
 }
 
 bool
 int24ne(int32 arg1, int32 arg2)
 {
-   return (arg1 != arg2);
+   return arg1 != arg2;
 }
 
 bool
 int24lt(int32 arg1, int32 arg2)
 {
-   return (arg1 < arg2);
+   return arg1 < arg2;
 }
 
 bool
 int24le(int32 arg1, int32 arg2)
 {
-   return (arg1 <= arg2);
+   return arg1 <= arg2;
 }
 
 bool
 int24gt(int32 arg1, int32 arg2)
 {
-   return (arg1 > arg2);
+   return arg1 > arg2;
 }
 
 bool
 int24ge(int32 arg1, int32 arg2)
 {
-   return (arg1 >= arg2);
+   return arg1 >= arg2;
 }
 
 bool
 int42eq(int32 arg1, int32 arg2)
 {
-   return (arg1 == arg2);
+   return arg1 == arg2;
 }
 
 bool
 int42ne(int32 arg1, int32 arg2)
 {
-   return (arg1 != arg2);
+   return arg1 != arg2;
 }
 
 bool
 int42lt(int32 arg1, int32 arg2)
 {
-   return (arg1 < arg2);
+   return arg1 < arg2;
 }
 
 bool
 int42le(int32 arg1, int32 arg2)
 {
-   return (arg1 <= arg2);
+   return arg1 <= arg2;
 }
 
 bool
 int42gt(int32 arg1, int32 arg2)
 {
-   return (arg1 > arg2);
+   return arg1 > arg2;
 }
 
 bool
 int42ge(int32 arg1, int32 arg2)
 {
-   return (arg1 >= arg2);
+   return arg1 >= arg2;
 }
 
 
 bool
 keyfirsteq(int16 *arg1, int16 arg2)
 {
-   return (*arg1 == arg2);
+   return *arg1 == arg2;
 }
 
 /*
@@ -496,121 +496,121 @@ keyfirsteq(int16 *arg1, int16 arg2)
 int32
 int4um(int32 arg)
 {
-   return (-arg);
+   return -arg;
 }
 
 int32
 int4pl(int32 arg1, int32 arg2)
 {
-   return (arg1 + arg2);
+   return arg1 + arg2;
 }
 
 int32
 int4mi(int32 arg1, int32 arg2)
 {
-   return (arg1 - arg2);
+   return arg1 - arg2;
 }
 
 int32
 int4mul(int32 arg1, int32 arg2)
 {
-   return (arg1 * arg2);
+   return arg1 * arg2;
 }
 
 int32
 int4div(int32 arg1, int32 arg2)
 {
-   return (arg1 / arg2);
+   return arg1 / arg2;
 }
 
 int32
 int4inc(int32 arg)
 {
-   return (arg + (int32) 1);
+   return arg + (int32) 1;
 }
 
 int16
 int2um(int16 arg)
 {
-   return (-arg);
+   return -arg;
 }
 
 int16
 int2pl(int16 arg1, int16 arg2)
 {
-   return (arg1 + arg2);
+   return arg1 + arg2;
 }
 
 int16
 int2mi(int16 arg1, int16 arg2)
 {
-   return (arg1 - arg2);
+   return arg1 - arg2;
 }
 
 int16
 int2mul(int16 arg1, int16 arg2)
 {
-   return (arg1 * arg2);
+   return arg1 * arg2;
 }
 
 int16
 int2div(int16 arg1, int16 arg2)
 {
-   return (arg1 / arg2);
+   return arg1 / arg2;
 }
 
 int16
 int2inc(int16 arg)
 {
-   return (arg + (int16) 1);
+   return arg + (int16) 1;
 }
 
 int32
 int24pl(int32 arg1, int32 arg2)
 {
-   return (arg1 + arg2);
+   return arg1 + arg2;
 }
 
 int32
 int24mi(int32 arg1, int32 arg2)
 {
-   return (arg1 - arg2);
+   return arg1 - arg2;
 }
 
 int32
 int24mul(int32 arg1, int32 arg2)
 {
-   return (arg1 * arg2);
+   return arg1 * arg2;
 }
 
 int32
 int24div(int32 arg1, int32 arg2)
 {
-   return (arg1 / arg2);
+   return arg1 / arg2;
 }
 
 int32
 int42pl(int32 arg1, int32 arg2)
 {
-   return (arg1 + arg2);
+   return arg1 + arg2;
 }
 
 int32
 int42mi(int32 arg1, int32 arg2)
 {
-   return (arg1 - arg2);
+   return arg1 - arg2;
 }
 
 int32
 int42mul(int32 arg1, int32 arg2)
 {
-   return (arg1 * arg2);
+   return arg1 * arg2;
 }
 
 int32
 int42div(int32 arg1, int32 arg2)
 {
-   return (arg1 / arg2);
+   return arg1 / arg2;
 }
 
 /*
@@ -619,25 +619,25 @@ int42div(int32 arg1, int32 arg2)
 int32
 int4mod(int32 arg1, int32 arg2)
 {
-   return (arg1 % arg2);
+   return arg1 % arg2;
 }
 
 int32
 int2mod(int16 arg1, int16 arg2)
 {
-   return (arg1 % arg2);
+   return arg1 % arg2;
 }
 
 int32
 int24mod(int32 arg1, int32 arg2)
 {
-   return (arg1 % arg2);
+   return arg1 % arg2;
 }
 
 int32
 int42mod(int32 arg1, int32 arg2)
 {
-   return (arg1 % arg2);
+   return arg1 % arg2;
 }
 
 /*
@@ -653,7 +653,7 @@ int4fac(int32 arg1)
    else
        for (result = 1; arg1 > 0; --arg1)
            result *= arg1;
-   return (result);
+   return result;
 }
 
 int32
@@ -666,29 +666,29 @@ int2fac(int16 arg1)
    else
        for (result = 1; arg1 > 0; --arg1)
            result *= arg1;
-   return (result);
+   return result;
 }
 
 int16
 int2larger(int16 arg1, int16 arg2)
 {
-   return ((arg1 > arg2) ? arg1 : arg2);
+   return (arg1 > arg2) ? arg1 : arg2;
 }
 
 int16
 int2smaller(int16 arg1, int16 arg2)
 {
-   return ((arg1 < arg2) ? arg1 : arg2);
+   return (arg1 < arg2) ? arg1 : arg2;
 }
 
 int32
 int4larger(int32 arg1, int32 arg2)
 {
-   return ((arg1 > arg2) ? arg1 : arg2);
+   return (arg1 > arg2) ? arg1 : arg2;
 }
 
 int32
 int4smaller(int32 arg1, int32 arg2)
 {
-   return ((arg1 < arg2) ? arg1 : arg2);
+   return (arg1 < arg2) ? arg1 : arg2;
 }
index 1e0cc5f6480343b5982c988a658abfe5ec6d7ed7..f2ebad62a6115ebd110e51811aee537b42978eff 100644 (file)
@@ -49,7 +49,7 @@ int8in(char *str)
    result = NULL;
 #endif
 
-   return (result);
+   return result;
 }  /* int8in() */
 
 
@@ -64,7 +64,7 @@ int8out(int64 * val)
    char        buf[MAXINT8LEN + 1];
 
    if (!PointerIsValid(val))
-       return (NULL);
+       return NULL;
 
    if ((len = snprintf(buf, MAXINT8LEN, INT64_FORMAT, *val)) < 0)
        elog(ERROR, "Unable to format int8", NULL);
@@ -73,7 +73,7 @@ int8out(int64 * val)
 
    strcpy(result, buf);
 
-   return (result);
+   return result;
 }  /* int8out() */
 
 
@@ -87,37 +87,37 @@ int8out(int64 * val)
 bool
 int8eq(int64 * val1, int64 * val2)
 {
-   return (*val1 == *val2);
+   return *val1 == *val2;
 }  /* int8eq() */
 
 bool
 int8ne(int64 * val1, int64 * val2)
 {
-   return (*val1 != *val2);
+   return *val1 != *val2;
 }  /* int8ne() */
 
 bool
 int8lt(int64 * val1, int64 * val2)
 {
-   return (*val1 < *val2);
+   return *val1 < *val2;
 }  /* int8lt() */
 
 bool
 int8gt(int64 * val1, int64 * val2)
 {
-   return (*val1 > *val2);
+   return *val1 > *val2;
 }  /* int8gt() */
 
 bool
 int8le(int64 * val1, int64 * val2)
 {
-   return (*val1 <= *val2);
+   return *val1 <= *val2;
 }  /* int8le() */
 
 bool
 int8ge(int64 * val1, int64 * val2)
 {
-   return (*val1 >= *val2);
+   return *val1 >= *val2;
 }  /* int8ge() */
 
 
@@ -127,37 +127,37 @@ int8ge(int64 * val1, int64 * val2)
 bool
 int84eq(int64 * val1, int32 val2)
 {
-   return (*val1 == val2);
+   return *val1 == val2;
 }  /* int84eq() */
 
 bool
 int84ne(int64 * val1, int32 val2)
 {
-   return (*val1 != val2);
+   return *val1 != val2;
 }  /* int84ne() */
 
 bool
 int84lt(int64 * val1, int32 val2)
 {
-   return (*val1 < val2);
+   return *val1 < val2;
 }  /* int84lt() */
 
 bool
 int84gt(int64 * val1, int32 val2)
 {
-   return (*val1 > val2);
+   return *val1 > val2;
 }  /* int84gt() */
 
 bool
 int84le(int64 * val1, int32 val2)
 {
-   return (*val1 <= val2);
+   return *val1 <= val2;
 }  /* int84le() */
 
 bool
 int84ge(int64 * val1, int32 val2)
 {
-   return (*val1 >= val2);
+   return *val1 >= val2;
 }  /* int84ge() */
 
 
@@ -167,37 +167,37 @@ int84ge(int64 * val1, int32 val2)
 bool
 int48eq(int32 val1, int64 * val2)
 {
-   return (val1 == *val2);
+   return val1 == *val2;
 }  /* int48eq() */
 
 bool
 int48ne(int32 val1, int64 * val2)
 {
-   return (val1 != *val2);
+   return val1 != *val2;
 }  /* int48ne() */
 
 bool
 int48lt(int32 val1, int64 * val2)
 {
-   return (val1 < *val2);
+   return val1 < *val2;
 }  /* int48lt() */
 
 bool
 int48gt(int32 val1, int64 * val2)
 {
-   return (val1 > *val2);
+   return val1 > *val2;
 }  /* int48gt() */
 
 bool
 int48le(int32 val1, int64 * val2)
 {
-   return (val1 <= *val2);
+   return val1 <= *val2;
 }  /* int48le() */
 
 bool
 int48ge(int32 val1, int64 * val2)
 {
-   return (val1 >= *val2);
+   return val1 >= *val2;
 }  /* int48ge() */
 
 
@@ -220,7 +220,7 @@ int8um(int64 * val)
     result = int8mi(&temp, val);
 #endif
 
-   return (result);
+   return result;
 }  /* int8um() */
 
 
@@ -234,7 +234,7 @@ int8pl(int64 * val1, int64 * val2)
 
    *result = *val1 + *val2;
 
-   return (result);
+   return result;
 }  /* int8pl() */
 
 int64 *
@@ -247,7 +247,7 @@ int8mi(int64 * val1, int64 * val2)
 
    *result = *val1 - *val2;
 
-   return (result);
+   return result;
 }  /* int8mi() */
 
 int64 *
@@ -260,7 +260,7 @@ int8mul(int64 * val1, int64 * val2)
 
    *result = *val1 * *val2;
 
-   return (result);
+   return result;
 }  /* int8mul() */
 
 int64 *
@@ -273,7 +273,7 @@ int8div(int64 * val1, int64 * val2)
 
    *result = *val1 / *val2;
 
-   return (result);
+   return result;
 }  /* int8div() */
 
 int64 *
@@ -289,9 +289,9 @@ int8larger(int64 * val1, int64 * val2)
 #if FALSE
    *result = ((*val1 > *val2)? *val1: *val2);
 
-   return (result);
+   return result;
 #endif
-   return ((*val1 > *val2)? val1: val2);
+   return (*val1 > *val2)? val1: val2;
 }  /* int8larger() */
 
 int64 *
@@ -307,9 +307,9 @@ int8smaller(int64 * val1, int64 * val2)
 #if FALSE
    *result = ((*val1 < *val2)? *val1: *val2);
 
-   return (result);
+   return result;
 #endif
-   return ((*val1 < *val2)? val1: val2);
+   return (*val1 < *val2)? val1: val2;
 }  /* int8smaller() */
 
 
@@ -323,7 +323,7 @@ int84pl(int64 * val1, int32 val2)
 
    *result = *val1 + (int64) val2;
 
-   return (result);
+   return result;
 }  /* int84pl() */
 
 int64 *
@@ -336,7 +336,7 @@ int84mi(int64 * val1, int32 val2)
 
    *result = *val1 - (int64) val2;
 
-   return (result);
+   return result;
 }  /* int84mi() */
 
 int64 *
@@ -349,7 +349,7 @@ int84mul(int64 * val1, int32 val2)
 
    *result = *val1 * (int64) val2;
 
-   return (result);
+   return result;
 }  /* int84mul() */
 
 int64 *
@@ -362,7 +362,7 @@ int84div(int64 * val1, int32 val2)
 
    *result = *val1 / (int64) val2;
 
-   return (result);
+   return result;
 }  /* int84div() */
 
 
@@ -376,7 +376,7 @@ int48pl(int32 val1, int64 * val2)
 
    *result = (int64) val1 + *val2;
 
-   return (result);
+   return result;
 }  /* int48pl() */
 
 int64 *
@@ -389,7 +389,7 @@ int48mi(int32 val1, int64 * val2)
 
    *result = (int64) val1 - *val2;
 
-   return (result);
+   return result;
 }  /* int48mi() */
 
 int64 *
@@ -402,7 +402,7 @@ int48mul(int32 val1, int64 * val2)
 
    *result = (int64) val1 * *val2;
 
-   return (result);
+   return result;
 }  /* int48mul() */
 
 int64 *
@@ -415,7 +415,7 @@ int48div(int32 val1, int64 * val2)
 
    *result = (int64) val1 / *val2;
 
-   return (result);
+   return result;
 }  /* int48div() */
 
 
@@ -430,7 +430,7 @@ int48(int32 val)
 
    *result = val;
 
-   return (result);
+   return result;
 }  /* int48() */
 
 int32
@@ -453,7 +453,7 @@ int84(int64 * val)
 
    result = *val;
 
-   return (result);
+   return result;
 }  /* int84() */
 
 #if FALSE
@@ -466,7 +466,7 @@ int28       (int16 val)
 
    *result = val;
 
-   return (result);
+   return result;
 }  /* int28() */
 
 int16
@@ -482,7 +482,7 @@ int82(int64 * val)
 
    result = *val;
 
-   return (result);
+   return result;
 }  /* int82() */
 
 #endif
@@ -494,7 +494,7 @@ i8tod(int64 * val)
 
    *result = *val;
 
-   return (result);
+   return result;
 }  /* i8tod() */
 
 /* dtoi8()
@@ -517,5 +517,5 @@ dtoi8(float64 val)
 
    *result = *val;
 
-   return (result);
+   return result;
 }  /* dtoi8() */
index 0cfaff9edfb3d61f7044bcbc9bed982873b1e9d0..bae7ae062e140ae9c4ddcd418cee35aa8a57fc46 100644 (file)
@@ -79,7 +79,7 @@ fixedlen_like(char *s, struct varlena * p, int charlen)
    pfree(sterm);
    pfree(pterm);
 
-   return ((bool) result);
+   return (bool) result;
 }
 
 bool
@@ -87,13 +87,13 @@ namelike(NameData *n, struct varlena * p)
 {
    if (!n)
        return FALSE;
-   return (fixedlen_like(n->data, p, NAMEDATALEN));
+   return fixedlen_like(n->data, p, NAMEDATALEN);
 }
 
 bool
 namenlike(NameData *s, struct varlena * p)
 {
-   return (!namelike(s, p));
+   return !namelike(s, p);
 }
 
 bool
@@ -101,17 +101,17 @@ textlike(struct varlena * s, struct varlena * p)
 {
    if (!s)
        return FALSE;
-   return (fixedlen_like(VARDATA(s), p, VARSIZE(s) - VARHDRSZ));
+   return fixedlen_like(VARDATA(s), p, VARSIZE(s) - VARHDRSZ);
 }
 
 bool
 textnlike(struct varlena * s, struct varlena * p)
 {
-   return (!textlike(s, p));
+   return !textlike(s, p);
 }
 
 
-/* $Revision: 1.18 $
+/* $Revision: 1.19 $
 ** "like.c" A first attempt at a LIKE operator for Postgres95.
 **
 ** Originally written by Rich $alz, mirror!rs, Wed Nov 26 19:03:17 EST 1986.
@@ -193,5 +193,5 @@ like(pg_wchar *text, pg_wchar *p)
 {
    if (p[0] == '%' && p[1] == '\0')
        return TRUE;
-   return (DoMatch(text, p) == LIKE_TRUE);
+   return DoMatch(text, p) == LIKE_TRUE;
 }
index d91ea44e9517c700b88e06b8dd774ec9fb3a7ae9..83632d70ca2ef27ef85d2cfad4365a41d16bb8fa 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/adt/misc.c,v 1.13 1998/06/09 19:20:59 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/adt/misc.c,v 1.14 1998/09/01 03:26:07 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -28,9 +28,9 @@ nullvalue(Datum value, bool *isNull)
    if (*isNull)
    {
        *isNull = false;
-       return (true);
+       return true;
    }
-   return (false);
+   return false;
 
 }
 
@@ -43,9 +43,9 @@ nonnullvalue(Datum value, bool *isNull)
    if (*isNull)
    {
        *isNull = false;
-       return (false);
+       return false;
    }
-   return (true);
+   return true;
 
 }
 
@@ -105,5 +105,5 @@ oidsrand(int32 X)
 int32
 userfntest(int i)
 {
-   return (i);
+   return i;
 }
index 56cd519f55df970292373b2d7e38a13e65d39f36..e5dd3c0316cbdbfcb25238574ff542951eca3a89 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.44 1998/07/19 10:08:15 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.45 1998/09/01 03:26:08 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -96,7 +96,7 @@ GetCurrentAbsoluteTime(void)
           CTZName, CTimeZone);
 #endif
 
-   return ((AbsoluteTime) now);
+   return (AbsoluteTime) now;
 }  /* GetCurrentAbsoluteTime() */
 
 
@@ -202,13 +202,13 @@ tm2abstime(struct tm * tm, int tz)
        || tm->tm_hour < 0 || tm->tm_hour >= 24
        || tm->tm_min < 0 || tm->tm_min > 59
        || tm->tm_sec < 0 || tm->tm_sec > 59)
-       return (INVALID_ABSTIME);
+       return INVALID_ABSTIME;
 
    day = (date2j(tm->tm_year, tm->tm_mon, tm->tm_mday) - date2j(1970, 1, 1));
 
    /* check for time out of range */
    if ((day < MIN_DAYNUM) || (day > MAX_DAYNUM))
-       return (INVALID_ABSTIME);
+       return INVALID_ABSTIME;
 
    /* convert to seconds */
    sec = tm->tm_sec + tz + (tm->tm_min + (day * 24 + tm->tm_hour) * 60) * 60;
@@ -216,13 +216,13 @@ tm2abstime(struct tm * tm, int tz)
    /* check for overflow */
    if ((day == MAX_DAYNUM && sec < 0) ||
        (day == MIN_DAYNUM && sec > 0))
-       return (INVALID_ABSTIME);
+       return INVALID_ABSTIME;
 
    /* check for reserved values (e.g. "current" on edge of usual range */
    if (!AbsoluteTimeIsReal(sec))
-       return (INVALID_ABSTIME);
+       return INVALID_ABSTIME;
 
-   return (sec);
+   return sec;
 }  /* tm2abstime() */
 
 
@@ -338,7 +338,7 @@ nabstimeout(AbsoluteTime time)
    result = palloc(strlen(buf) + 1);
    strcpy(result, buf);
 
-   return (result);
+   return result;
 }  /* nabstimeout() */
 
 
@@ -358,7 +358,7 @@ AbsoluteTimeIsBefore(AbsoluteTime time1, AbsoluteTime time2)
    if (time2 == CURRENT_ABSTIME)
        time2 = GetCurrentTransactionStartTime();
 
-   return (time1 < time2);
+   return time1 < time2;
 }
 
 bool
@@ -373,7 +373,7 @@ AbsoluteTimeIsAfter(AbsoluteTime time1, AbsoluteTime time2)
    if (time2 == CURRENT_ABSTIME)
        time2 = GetCurrentTransactionStartTime();
 
-   return (time1 > time2);
+   return time1 > time2;
 }
 
 
@@ -399,78 +399,78 @@ bool
 abstimeeq(AbsoluteTime t1, AbsoluteTime t2)
 {
    if (t1 == INVALID_ABSTIME || t2 == INVALID_ABSTIME)
-       return (FALSE);
+       return FALSE;
    if (t1 == CURRENT_ABSTIME)
        t1 = GetCurrentTransactionStartTime();
    if (t2 == CURRENT_ABSTIME)
        t2 = GetCurrentTransactionStartTime();
 
-   return (t1 == t2);
+   return t1 == t2;
 }
 
 bool
 abstimene(AbsoluteTime t1, AbsoluteTime t2)
 {
    if (t1 == INVALID_ABSTIME || t2 == INVALID_ABSTIME)
-       return (FALSE);
+       return FALSE;
    if (t1 == CURRENT_ABSTIME)
        t1 = GetCurrentTransactionStartTime();
    if (t2 == CURRENT_ABSTIME)
        t2 = GetCurrentTransactionStartTime();
 
-   return (t1 != t2);
+   return t1 != t2;
 }
 
 bool
 abstimelt(AbsoluteTime t1, AbsoluteTime t2)
 {
    if (t1 == INVALID_ABSTIME || t2 == INVALID_ABSTIME)
-       return (FALSE);
+       return FALSE;
    if (t1 == CURRENT_ABSTIME)
        t1 = GetCurrentTransactionStartTime();
    if (t2 == CURRENT_ABSTIME)
        t2 = GetCurrentTransactionStartTime();
 
-   return (t1 < t2);
+   return t1 < t2;
 }
 
 bool
 abstimegt(AbsoluteTime t1, AbsoluteTime t2)
 {
    if (t1 == INVALID_ABSTIME || t2 == INVALID_ABSTIME)
-       return (FALSE);
+       return FALSE;
    if (t1 == CURRENT_ABSTIME)
        t1 = GetCurrentTransactionStartTime();
    if (t2 == CURRENT_ABSTIME)
        t2 = GetCurrentTransactionStartTime();
 
-   return (t1 > t2);
+   return t1 > t2;
 }
 
 bool
 abstimele(AbsoluteTime t1, AbsoluteTime t2)
 {
    if (t1 == INVALID_ABSTIME || t2 == INVALID_ABSTIME)
-       return (FALSE);
+       return FALSE;
    if (t1 == CURRENT_ABSTIME)
        t1 = GetCurrentTransactionStartTime();
    if (t2 == CURRENT_ABSTIME)
        t2 = GetCurrentTransactionStartTime();
 
-   return (t1 <= t2);
+   return t1 <= t2;
 }
 
 bool
 abstimege(AbsoluteTime t1, AbsoluteTime t2)
 {
    if (t1 == INVALID_ABSTIME || t2 == INVALID_ABSTIME)
-       return (FALSE);
+       return FALSE;
    if (t1 == CURRENT_ABSTIME)
        t1 = GetCurrentTransactionStartTime();
    if (t2 == CURRENT_ABSTIME)
        t2 = GetCurrentTransactionStartTime();
 
-   return (t1 >= t2);
+   return t1 >= t2;
 }
 
 
@@ -525,7 +525,7 @@ datetime_abstime(DateTime *datetime)
        };
    };
 
-   return (result);
+   return result;
 }  /* datetime_abstime() */
 
 /* abstime_datetime()
@@ -566,5 +566,5 @@ abstime_datetime(AbsoluteTime abstime)
            break;
    };
 
-   return (result);
+   return result;
 }  /* abstime_datetime() */
index 679dadbe45c73c41312161738f74c8a4b2103877..ad37559bd03dd00ed61b1fd50a8d17ad4bdd14ff 100644 (file)
@@ -11,7 +11,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/adt/name.c,v 1.13 1998/06/15 19:29:35 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/adt/name.c,v 1.14 1998/09/01 03:26:10 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -39,7 +39,7 @@ namein(char *s)
    int         len;
 
    if (s == NULL)
-       return (NULL);
+       return NULL;
    result = (NameData *) palloc(NAMEDATALEN);
    /* always keep it null-padded */
    StrNCpy(result->data, s, NAMEDATALEN);
@@ -49,7 +49,7 @@ namein(char *s)
        *(result->data + len) = '\0';
        len++;
    }
-   return (result);
+   return result;
 }
 
 /*
@@ -89,49 +89,49 @@ nameeq(NameData *arg1, NameData *arg2)
    if (!arg1 || !arg2)
        return 0;
    else
-       return ((bool) strncmp(arg1->data, arg2->data, NAMEDATALEN) == 0);
+       return (bool) strncmp(arg1->data, arg2->data, NAMEDATALEN) == 0;
 }
 
 bool
 namene(NameData *arg1, NameData *arg2)
 {
    if (arg1 == NULL || arg2 == NULL)
-       return ((bool) 0);
-   return ((bool) (strncmp(arg1->data, arg2->data, NAMEDATALEN) != 0));
+       return (bool) 0;
+   return (bool) (strncmp(arg1->data, arg2->data, NAMEDATALEN) != 0);
 }
 
 bool
 namelt(NameData *arg1, NameData *arg2)
 {
    if (arg1 == NULL || arg2 == NULL)
-       return ((bool) 0);
-   return ((bool) (strncmp(arg1->data, arg2->data, NAMEDATALEN) < 0));
+       return (bool) 0;
+   return (bool) (strncmp(arg1->data, arg2->data, NAMEDATALEN) < 0);
 }
 
 bool
 namele(NameData *arg1, NameData *arg2)
 {
    if (arg1 == NULL || arg2 == NULL)
-       return ((bool) 0);
-   return ((bool) (strncmp(arg1->data, arg2->data, NAMEDATALEN) <= 0));
+       return (bool) 0;
+   return (bool) (strncmp(arg1->data, arg2->data, NAMEDATALEN) <= 0);
 }
 
 bool
 namegt(NameData *arg1, NameData *arg2)
 {
    if (arg1 == NULL || arg2 == NULL)
-       return ((bool) 0);
+       return (bool) 0;
 
-   return ((bool) (strncmp(arg1->data, arg2->data, NAMEDATALEN) > 0));
+   return (bool) (strncmp(arg1->data, arg2->data, NAMEDATALEN) > 0);
 }
 
 bool
 namege(NameData *arg1, NameData *arg2)
 {
    if (arg1 == NULL || arg2 == NULL)
-       return ((bool) 0);
+       return (bool) 0;
 
-   return ((bool) (strncmp(arg1->data, arg2->data, NAMEDATALEN) >= 0));
+   return (bool) (strncmp(arg1->data, arg2->data, NAMEDATALEN) >= 0);
 }
 
 
@@ -141,16 +141,16 @@ int
 namecpy(Name n1, Name n2)
 {
    if (!n1 || !n2)
-       return (-1);
+       return -1;
    strncpy(n1->data, n2->data, NAMEDATALEN);
-   return (0);
+   return 0;
 }
 
 #ifdef NOT_USED
 int
 namecat(Name n1, Name n2)
 {
-   return (namestrcat(n1, n2->data));  /* n2 can't be any longer than n1 */
+   return namestrcat(n1, n2->data);    /* n2 can't be any longer than n1 */
 }
 
 #endif
@@ -158,16 +158,16 @@ namecat(Name n1, Name n2)
 int
 namecmp(Name n1, Name n2)
 {
-   return (strncmp(n1->data, n2->data, NAMEDATALEN));
+   return strncmp(n1->data, n2->data, NAMEDATALEN);
 }
 
 int
 namestrcpy(Name name, char *str)
 {
    if (!name || !str)
-       return (-1);
+       return -1;
    StrNCpy(name->data, str, NAMEDATALEN);
-   return (0);
+   return 0;
 }
 
 #ifdef NOT_USED
@@ -179,7 +179,7 @@ namestrcat(Name name, char *str)
               *q;
 
    if (!name || !str)
-       return (-1);
+       return -1;
    for (i = 0, p = name->data; i < NAMEDATALEN && *p; ++i, ++p)
        ;
    for (q = str; i < NAMEDATALEN; ++i, ++p, ++q)
@@ -188,7 +188,7 @@ namestrcat(Name name, char *str)
        if (!*q)
            break;
    }
-   return (0);
+   return 0;
 }
 
 #endif
@@ -197,12 +197,12 @@ int
 namestrcmp(Name name, char *str)
 {
    if (!name && !str)
-       return (0);
+       return 0;
    if (!name)
-       return (-1);            /* NULL < anything */
+       return -1;          /* NULL < anything */
    if (!str)
-       return (1);             /* NULL < anything */
-   return (strncmp(name->data, str, NAMEDATALEN));
+       return 1;               /* NULL < anything */
+   return strncmp(name->data, str, NAMEDATALEN);
 }
 
 /*****************************************************************************
index 4658d29b499fdeacaac2040dc29b95b6f589df7c..0bb9412e0e5299d658ffc3be9e1ca92c91e5fcb9 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/not_in.c,v 1.11 1998/08/19 02:02:57 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/not_in.c,v 1.12 1998/09/01 03:26:11 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -83,7 +83,7 @@ int4notin(int16 not_in_arg, char *relation_and_attr)
    {
        value = heap_getattr(current_tuple,
                             (AttrNumber) attrid,
-                            RelationGetTupleDescriptor(relation_to_scan),
+                            RelationGetDescr(relation_to_scan),
                             &dummy);
 
        integer_value = DatumGetInt16(value);
@@ -93,7 +93,7 @@ int4notin(int16 not_in_arg, char *relation_and_attr)
 
    /* close the relation */
    heap_close(relation_to_scan);
-   return (retval);
+   return retval;
 }
 
 bool
@@ -101,7 +101,7 @@ oidnotin(Oid the_oid, char *compare)
 {
    if (the_oid == InvalidOid)
        return false;
-   return (int4notin(the_oid, compare));
+   return int4notin(the_oid, compare);
 }
 
 /*
@@ -117,7 +117,7 @@ my_varattno(Relation rd, char *a)
    for (i = 0; i < rd->rd_rel->relnatts; i++)
    {
        if (!namestrcmp(&rd->rd_att->attrs[i]->attname, a))
-           return (i + 1);
+           return i + 1;
    }
-   return (-1);
+   return -1;
 }
index 5a60a6707929571b0fb31e4e12f9c7a907a55d44..86a999709f4f63a789681c142ee85eab6731390b 100644 (file)
@@ -10,7 +10,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.24 1998/06/15 19:29:36 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.25 1998/09/01 03:26:12 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -106,7 +106,7 @@ pg_atoi(char *s, int size, int c)
        default:
            elog(ERROR, "pg_atoi: invalid result size: %d", size);
    }
-   return ((int32) l);
+   return (int32) l;
 }
 
 /*
@@ -177,10 +177,10 @@ ftoa(double value, char *ascii, int width, int prec1, char format)
    {
        MemSet(ascii, '*', width - 2);
        ascii[width] = 0;
-       return (0);
+       return 0;
    }
    strcpy(ascii, out);
-   return (ret);
+   return ret;
 #else
    auto int    expon;
    auto int    sign;
@@ -271,7 +271,7 @@ ftoa(double value, char *ascii, int width, int prec1, char format)
        for (avail = width; avail > 0; avail--)
            *a++ = '*';
        *a = 0;
-       return (0);
+       return 0;
    }
 
    /* it fits; output the number */
@@ -330,7 +330,7 @@ frac_out:
    /* finally, we can return */
    *a = 0;
    avail = a - ascii;
-   return (avail);
+   return avail;
 #endif
 }
 
@@ -455,14 +455,14 @@ atof1(char *str, double *val)
    {
        /* if no exponent, then nothing */
        if (c != 0)
-           return (-1);
+           return -1;
    }
 
    /* store the result and exit */
    if (minus)
        v = -v;
    *val = v;
-   return (0);
+   return 0;
 }
 
 #endif
index 3e1097f0e08a21800309052d0dbcdb37a9906ac2..153e80854aa32a24a43c134c4754aa377242ee60 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/adt/oid.c,v 1.16 1998/08/19 02:02:59 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/adt/oid.c,v 1.17 1998/09/01 03:26:13 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
 Oid *
 oid8in(char *oidString)
 {
-   Oid         (*result)[];
+   Oid         **result;
    int         nums;
 
    if (oidString == NULL)
-       return (NULL);
-   result = (Oid (*)[]) palloc(sizeof(Oid[8]));
+       return NULL;
+   result = (Oid **) palloc(sizeof(Oid[8]));
    if ((nums = sscanf(oidString, "%d%d%d%d%d%d%d%d",
                       &(*result)[0],
                       &(*result)[1],
@@ -51,14 +51,14 @@ oid8in(char *oidString)
            (*result)[nums++] = 0;
        while (nums < 8);
    }
-   return ((Oid *) result);
+   return (Oid *) result;
 }
 
 /*
  *     oid8out - converts internal form to "num num ..."
  */
 char *
-oid8out(Oid (*oidArray)[])
+oid8out(Oid **oidArray)
 {
    int         num;
    Oid        *sp;
@@ -70,7 +70,7 @@ oid8out(Oid (*oidArray)[])
        result = (char *) palloc(2);
        result[0] = '-';
        result[1] = '\0';
-       return (result);
+       return result;
    }
 
    /* assumes sign, 10 digits, ' ' */
@@ -84,19 +84,19 @@ oid8out(Oid (*oidArray)[])
        *rp++ = ' ';
    }
    *--rp = '\0';
-   return (result);
+   return result;
 }
 
 Oid
 oidin(char *s)
 {
-   return (int4in(s));
+   return int4in(s);
 }
 
 char *
 oidout(Oid o)
 {
-   return (int4out(o));
+   return int4out(o);
 }
 
 /*****************************************************************************
@@ -110,23 +110,23 @@ oidout(Oid o)
 bool
 oideq(Oid arg1, Oid arg2)
 {
-   return (arg1 == arg2);
+   return arg1 == arg2;
 }
 
 bool
 oidne(Oid arg1, Oid arg2)
 {
-   return (arg1 != arg2);
+   return arg1 != arg2;
 }
 
 bool
-oid8eq(Oid arg1[], Oid arg2[])
+oid8eq(Oid *arg1, Oid *arg2)
 {
    return (bool) (memcmp(arg1, arg2, 8 * sizeof(Oid)) == 0);
 }
 
 bool
-oid8lt(Oid arg1[], Oid arg2[])
+oid8lt(Oid *arg1, Oid *arg2)
 {
    int i;
    for (i=0; i < 8; i++)
@@ -136,7 +136,7 @@ oid8lt(Oid arg1[], Oid arg2[])
 }
 
 bool
-oid8le(Oid arg1[], Oid arg2[])
+oid8le(Oid *arg1, Oid *arg2)
 {
    int i;
    for (i=0; i < 8; i++)
@@ -146,7 +146,7 @@ oid8le(Oid arg1[], Oid arg2[])
 }
 
 bool
-oid8ge(Oid arg1[], Oid arg2[])
+oid8ge(Oid *arg1, Oid *arg2)
 {
    int i;
    for (i=0; i < 8; i++)
@@ -156,7 +156,7 @@ oid8ge(Oid arg1[], Oid arg2[])
 }
 
 bool
-oid8gt(Oid arg1[], Oid arg2[])
+oid8gt(Oid *arg1, Oid *arg2)
 {
    int i;
    for (i=0; i < 8; i++)
@@ -169,14 +169,14 @@ bool
 oideqint4(Oid arg1, int32 arg2)
 {
 /* oid is unsigned, but int4 is signed */
-   return (arg2 >= 0 && arg1 == arg2);
+   return arg2 >= 0 && arg1 == arg2;
 }
 
 bool
 int4eqoid(int32 arg1, Oid arg2)
 {
 /* oid is unsigned, but int4 is signed */
-   return (arg1 >= 0 && arg1 == arg2);
+   return arg1 >= 0 && arg1 == arg2;
 }
 
 text *
@@ -196,7 +196,7 @@ oid_text(Oid oid)
    memmove(VARDATA(result), str, (len - VARHDRSZ));
    pfree(str);
 
-   return (result);
+   return result;
 }  /* oid_text() */
 
 Oid
@@ -216,5 +216,5 @@ text_oid(text *string)
    result = oidin(str);
    pfree(str);
 
-   return (result);
+   return result;
 }  /* oid_text() */
index abf6cfb608b1baf0a1c011e6fa3b71cc8be2af55..377c3285d9acda7b9579b4ef54400e4e450e7b7b 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/adt/regexp.c,v 1.18 1998/06/15 19:29:36 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/adt/regexp.c,v 1.19 1998/09/01 03:26:14 momjian Exp $
  *
  *     Alistair Crooks added the code for the regex caching
  *     agc - cached the regular expressions used - there's a good chance
@@ -155,7 +155,7 @@ RE_compile_and_execute(struct varlena * text_re, char *text, int cflags)
    }
 
    /* not reached */
-   return (0);
+   return 0;
 }
 
 
@@ -189,7 +189,7 @@ fixedlen_regexeq(char *s, struct varlena * p, int charlen, int cflags)
 
    pfree(sterm);
 
-   return ((bool) result);
+   return (bool) result;
 
 }
 
@@ -202,27 +202,27 @@ nameregexeq(NameData *n, struct varlena * p)
 {
    if (!n)
        return FALSE;
-   return (fixedlen_regexeq(n->data, p, NAMEDATALEN, REG_EXTENDED));
+   return fixedlen_regexeq(n->data, p, NAMEDATALEN, REG_EXTENDED);
 }
 
 bool
 nameregexne(NameData *s, struct varlena * p)
 {
-   return (!nameregexeq(s, p));
+   return !nameregexeq(s, p);
 }
 
 bool
 textregexeq(struct varlena * s, struct varlena * p)
 {
    if (!s)
-       return (FALSE);
-   return (fixedlen_regexeq(VARDATA(s), p, VARSIZE(s) - VARHDRSZ, REG_EXTENDED));
+       return FALSE;
+   return fixedlen_regexeq(VARDATA(s), p, VARSIZE(s) - VARHDRSZ, REG_EXTENDED);
 }
 
 bool
 textregexne(struct varlena * s, struct varlena * p)
 {
-   return (!textregexeq(s, p));
+   return !textregexeq(s, p);
 }
 
 
@@ -242,7 +242,7 @@ texticregexeq(struct varlena * s, struct varlena * p)
 bool
 texticregexne(struct varlena * s, struct varlena * p)
 {
-   return (!texticregexeq(s, p));
+   return !texticregexeq(s, p);
 }
 
 bool
@@ -257,5 +257,5 @@ nameicregexeq(NameData *n, struct varlena * p)
 bool
 nameicregexne(NameData *s, struct varlena * p)
 {
-   return (!nameicregexeq(s, p));
+   return !nameicregexeq(s, p);
 }
index 6000d2a6a383abaaabbc0dfdf2999dba612cec3d..4a9f1a0bc0a7bce43664974d3c8ff4e6f8341909 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.24 1998/08/31 07:55:48 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.25 1998/09/01 03:26:16 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -41,7 +41,7 @@ regprocin(char *pro_name_and_oid)
    RegProcedure result = (Oid) 0;
 
    if (pro_name_and_oid == NULL)
-       return (0);
+       return 0;
 
 
    if (!IsBootstrapProcessingMode())
@@ -80,7 +80,7 @@ regprocin(char *pro_name_and_oid)
        {
            elog(ERROR, "regprocin: could not open %s",
                 ProcedureRelationName);
-           return (0);
+           return 0;
        }
        ScanKeyEntryInitialize(&key,
                               (bits16) 0,
@@ -94,14 +94,14 @@ regprocin(char *pro_name_and_oid)
            heap_close(proc);
            elog(ERROR, "regprocin: could not being scan of %s",
                 ProcedureRelationName);
-           return (0);
+           return 0;
        }
        proctup = heap_getnext(procscan, 0);
        if (HeapTupleIsValid(proctup))
        {
                result = (RegProcedure) heap_getattr(proctup,
                                                     ObjectIdAttributeNumber,
-                                           RelationGetTupleDescriptor(proc),
+                                           RelationGetDescr(proc),
                                                     &isnull);
                if (isnull)
                    elog(FATAL, "regprocin: null procedure %s", pro_name_and_oid);
@@ -160,7 +160,7 @@ regprocout(RegProcedure proid)
        {
            elog(ERROR, "regprocout: could not open %s",
                 ProcedureRelationName);
-           return (0);
+           return 0;
        }
        ScanKeyEntryInitialize(&key,
                               (bits16) 0,
@@ -174,7 +174,7 @@ regprocout(RegProcedure proid)
            heap_close(proc);
            elog(ERROR, "regprocout: could not being scan of %s",
                 ProcedureRelationName);
-           return (0);
+           return 0;
        }
        proctup = heap_getnext(procscan, 0);
        if (HeapTupleIsValid(proctup))
@@ -183,7 +183,7 @@ regprocout(RegProcedure proid)
            bool        isnull;
 
            s = (char *) heap_getattr(proctup, 1,
-                             RelationGetTupleDescriptor(proc), &isnull);
+                             RelationGetDescr(proc), &isnull);
            if (!isnull)
                StrNCpy(result, s, NAMEDATALEN);
            else
@@ -196,20 +196,20 @@ regprocout(RegProcedure proid)
        }
        heap_endscan(procscan);
        heap_close(proc);
-       return (result);
+       return result;
    }
 
 #ifdef EBUG
            elog(DEBUG, "regprocout: no such procedure %d", proid);
 #endif                         /* defined(EBUG) */
-   return (result);
+   return result;
 }
 
 /*
  *     int8typeout         - converts int8 type oids to "typname" list
  */
 text *
-oid8types(Oid (*oidArray)[])
+oid8types(Oid **oidArray)
 {
    HeapTuple   typetup;
    text       *result;
@@ -220,7 +220,7 @@ oid8types(Oid (*oidArray)[])
    {
        result = (text *) palloc(VARHDRSZ);
        VARSIZE(result) = 0;
-       return (result);
+       return result;
    }
 
    result = (text *) palloc(NAMEDATALEN * 8 + 8 + VARHDRSZ);
@@ -238,7 +238,7 @@ oid8types(Oid (*oidArray)[])
            {
                char       *s;
 
-               s = ((TypeTupleForm) GETSTRUCT(typetup))->typname.data;
+               s = ((Form_pg_type) GETSTRUCT(typetup))->typname.data;
                StrNCpy(VARDATA(result) + strlen(VARDATA(result)), s,
                            NAMEDATALEN);
                strcat(VARDATA(result), " ");
@@ -246,7 +246,7 @@ oid8types(Oid (*oidArray)[])
        }
    }
    VARSIZE(result) = strlen(VARDATA(result)) + VARHDRSZ;
-   return (result);
+   return result;
 }
 
 
index 3b7c3e98fa26772a91214754bbb9ebe716355bca..593d670d374be27948f737aefed053c8eecccfc5 100644 (file)
@@ -3,7 +3,7 @@
  *           out of it's tuple
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.1 1998/08/24 01:38:05 momjian Exp $
+ *    $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.2 1998/09/01 03:26:17 momjian Exp $
  *
  *    This software is copyrighted by Jan Wieck - Hamburg.
  *
@@ -1213,7 +1213,7 @@ char *
 get_const_expr(Const *constval)
 {
     HeapTuple      typetup;
-    TypeTupleForm  typeStruct;
+    Form_pg_type   typeStruct;
     FmgrInfo       finfo_output;
     char       *extval;
     bool       isnull = FALSE;
@@ -1227,7 +1227,7 @@ get_const_expr(Const *constval)
     if (!HeapTupleIsValid(typetup))
    elog(ERROR, "cache lookup of type %d failed", constval->consttype);
 
-    typeStruct = (TypeTupleForm) GETSTRUCT(typetup);
+    typeStruct = (Form_pg_type) GETSTRUCT(typetup);
 
     fmgr_info(typeStruct->typoutput, &finfo_output);
     extval = (char *)(*fmgr_faddr(&finfo_output))(constval->constvalue,
@@ -1267,7 +1267,7 @@ static char *
 get_attribute_name(Oid relid, int2 attnum)
 {
     HeapTuple      atttup;
-    AttributeTupleForm attStruct;
+    Form_pg_attribute  attStruct;
 
     atttup = SearchSysCacheTuple(ATTNUM,
            ObjectIdGetDatum(relid), (Datum)attnum, 0, 0);
@@ -1275,7 +1275,7 @@ get_attribute_name(Oid relid, int2 attnum)
        elog(ERROR, "cache lookup of attribute %d in relation %d failed", 
            attnum, relid);
 
-    attStruct = (AttributeTupleForm) GETSTRUCT(atttup);
+    attStruct = (Form_pg_attribute) GETSTRUCT(atttup);
     return nameout(&(attStruct->attname));
 }
 
@@ -1329,7 +1329,7 @@ check_if_rte_used(int rt_index, Node *node, int sup)
    case T_Var:
        {
            Var     *var = (Var *)node;
-           return (var->varno == rt_index && var->varlevelsup == sup);
+           return var->varno == rt_index && var->varlevelsup == sup;
        }
        break;
 
index a5a0b86e4a4f6d50e96d96f1ef6819a665ae9ccf..6389dc4b0d8ab00b7442efa705d8d663f1ab7f84 100644 (file)
@@ -12,7 +12,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.21 1998/08/19 02:03:05 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.22 1998/09/01 03:26:18 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -63,7 +63,7 @@ eqsel(Oid opid,
        *result = 0.1;
    else
        *result = (float64data) getattdisbursion(relid, (int) attno);
-   return (result);
+   return result;
 }
 
 /*
@@ -80,7 +80,7 @@ neqsel(Oid opid,
 
    result = eqsel(opid, relid, attno, value, flag);
    *result = 1.0 - *result;
-   return (result);
+   return result;
 }
 
 /*
@@ -114,7 +114,7 @@ intltsel(Oid opid,
        if (*highchar == 'n' || *lowchar == 'n')
        {
            *result = 1.0 / 3.0;
-           return (result);
+           return result;
        }
        high = atol(highchar);
        low = atol(lowchar);
@@ -152,7 +152,7 @@ intltsel(Oid opid,
            }
        }
    }
-   return (result);
+   return result;
 }
 
 /*
@@ -174,7 +174,7 @@ intgtsel(Oid opid,
    else
        notflag = flag | SEL_RIGHT;
    result = intltsel(opid, relid, attno, value, (int32) notflag);
-   return (result);
+   return result;
 }
 
 /*
@@ -206,7 +206,7 @@ eqjoinsel(Oid opid,
        else
            *result = (float64data) max;
    }
-   return (result);
+   return result;
 }
 
 /*
@@ -223,7 +223,7 @@ neqjoinsel(Oid opid,
 
    result = eqjoinsel(opid, relid1, attno1, relid2, attno2);
    *result = 1.0 - *result;
-   return (result);
+   return result;
 }
 
 /*
@@ -240,7 +240,7 @@ intltjoinsel(Oid opid,
 
    result = (float64) palloc(sizeof(float64data));
    *result = 1.0 / 3.0;
-   return (result);
+   return result;
 }
 
 /*
@@ -257,7 +257,7 @@ intgtjoinsel(Oid opid,
 
    result = (float64) palloc(sizeof(float64data));
    *result = 1.0 / 3.0;
-   return (result);
+   return result;
 }
 
 /*
@@ -289,11 +289,11 @@ getattdisbursion(Oid relid, AttrNumber attnum)
    {
        elog(ERROR, "getattdisbursion: no attribute tuple %d %d",
             relid, attnum);
-       return (0);
+       return 0;
    }
-   nvals = ((AttributeTupleForm) GETSTRUCT(atp))->attdisbursion;
+   nvals = ((Form_pg_attribute) GETSTRUCT(atp))->attdisbursion;
    if (nvals > 0)
-       return (nvals);
+       return nvals;
 
    atp = SearchSysCacheTuple(RELOID,
                              ObjectIdGetDatum(relid),
@@ -306,14 +306,14 @@ getattdisbursion(Oid relid, AttrNumber attnum)
    if (!HeapTupleIsValid(atp))
    {
        elog(ERROR, "getattdisbursion: no relation tuple %d", relid);
-       return (0);
+       return 0;
    }
    ntuples = ((Form_pg_class) GETSTRUCT(atp))->reltuples;
    /* Look above how nvals is used.    - vadim 04/09/97 */
    if (ntuples > 0)
        nvals = 1.0 / ntuples;
 
-   return (nvals);
+   return nvals;
 }
 
 /*
@@ -366,14 +366,14 @@ gethilokey(Oid relid,
    *high = textout((struct varlena *)
                    heap_getattr(tuple,
                                 Anum_pg_statistic_stahikey,
-                                RelationGetTupleDescriptor(rel),
+                                RelationGetDescr(rel),
                                 &isnull));
    if (isnull)
        elog(DEBUG, "gethilokey: high key is null");
    *low = textout((struct varlena *)
                   heap_getattr(tuple,
                                Anum_pg_statistic_stalokey,
-                               RelationGetTupleDescriptor(rel),
+                               RelationGetDescr(rel),
                                &isnull));
    if (isnull)
        elog(DEBUG, "gethilokey: low key is null");
@@ -420,7 +420,7 @@ btreesel(Oid operatorObjectId,
    if (*result < 0.0 || *result > 1.0)
        elog(ERROR, "Btree Selectivity: bad value %lf", *result);
 
-   return (result);
+   return result;
 }
 
 float64
@@ -465,13 +465,13 @@ btreenpage(Oid operatorObjectId,
    if (!HeapTupleIsValid(atp))
    {
        elog(ERROR, "btreenpage: no index tuple %d", indexrelid);
-       return (0);
+       return 0;
    }
 
    npage = ((Form_pg_class) GETSTRUCT(atp))->relpages;
    result = (float64) palloc(sizeof(float64data));
    *result = *temp * npage;
-   return (result);
+   return result;
 }
 
 float64
@@ -504,7 +504,7 @@ hashsel(Oid operatorObjectId,
        if (!HeapTupleIsValid(atp))
        {
            elog(ERROR, "hashsel: no index tuple %d", indexrelid);
-           return (0);
+           return 0;
        }
        ntuples = ((Form_pg_class) GETSTRUCT(atp))->reltuples;
        if (ntuples > 0)
@@ -530,7 +530,7 @@ hashsel(Oid operatorObjectId,
    if (*result < 0.0 || *result > 1.0)
        elog(ERROR, "Hash Table Selectivity: bad value %lf", *result);
 
-   return (result);
+   return result;
 
 
 }
@@ -557,7 +557,7 @@ hashnpage(Oid operatorObjectId,
    if (!HeapTupleIsValid(atp))
    {
        elog(ERROR, "hashsel: no index tuple %d", indexrelid);
-       return (0);
+       return 0;
    }
 
 
@@ -592,7 +592,7 @@ hashnpage(Oid operatorObjectId,
    npage = ((Form_pg_class) GETSTRUCT(atp))->relpages;
    result = (float64) palloc(sizeof(float64data));
    *result = *temp * npage;
-   return (result);
+   return result;
 }
 
 
index 1d150805ce941d6534eabee0dfce4c410004a49c..588876dadde927a1232df6ea99e529c44ae1ba5d 100644 (file)
@@ -9,7 +9,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/sets.c,v 1.16 1998/08/19 02:03:06 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/sets.c,v 1.17 1998/09/01 03:26:19 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -131,7 +131,7 @@ SetDefine(char *querystr, char *typename)
        else
            elog(ERROR, "setin: could not find new set oid tuple");
 
-       if (RelationGetRelationTupleForm(procrel)->relhasindex)
+       if (RelationGetForm(procrel)->relhasindex)
        {
            Relation    idescs[Num_pg_proc_indices];
 
index 8d468765866cd20ca2d82f9a8b2e900c8fe21404..3c67ab854e2cac7d40e4ec20ea1fd806fecf3ccb 100644 (file)
@@ -63,53 +63,53 @@ now(void)
    time_t      sec;
 
    sec = GetCurrentTransactionStartTime();
-   return (sec);
+   return sec;
 }
 
 bool
 timestampeq(time_t t1, time_t t2)
 {
-   return (abstimeeq(t1, t2));
+   return abstimeeq(t1, t2);
 }
 
 bool
 timestampne(time_t t1, time_t t2)
 {
-   return (abstimene(t1, t2));
+   return abstimene(t1, t2);
 }
 
 bool
 timestamplt(time_t t1, time_t t2)
 {
-   return (abstimelt(t1, t2));
+   return abstimelt(t1, t2);
 }
 
 bool
 timestampgt(time_t t1, time_t t2)
 {
-   return (abstimegt(t1, t2));
+   return abstimegt(t1, t2);
 }
 
 bool
 timestample(time_t t1, time_t t2)
 {
-   return (abstimele(t1, t2));
+   return abstimele(t1, t2);
 }
 
 bool
 timestampge(time_t t1, time_t t2)
 {
-   return (abstimege(t1, t2));
+   return abstimege(t1, t2);
 }
 
 DateTime   *
 timestamp_datetime(time_t timestamp)
 {
-   return (abstime_datetime((AbsoluteTime) timestamp));
+   return abstime_datetime((AbsoluteTime) timestamp);
 }  /* timestamp_datetime() */
 
 time_t
 datetime_timestamp(DateTime *datetime)
 {
-   return ((AbsoluteTime) datetime_abstime(datetime));
+   return (AbsoluteTime) datetime_abstime(datetime);
 }  /* datetime_timestamp() */
index bb64722176e4b415667e2ed8600ce39ceb379134..9f76c7c61a7d043fa3421cefe4bc569819b909d1 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.37 1998/07/24 03:31:42 scrappy Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.38 1998/09/01 03:26:22 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -65,7 +65,7 @@ bpcharin(char *s, int dummy, int32 atttypmod)
    int         i;
 
    if (s == NULL)
-       return ((char *) NULL);
+       return (char *) NULL;
 
    if (atttypmod == -1)
    {
@@ -99,7 +99,7 @@ bpcharin(char *s, int dummy, int32 atttypmod)
    /* blank pad the string if necessary */
    for (; i < len; i++)
        *r++ = ' ';
-   return (result);
+   return result;
 }
 
 char *
@@ -125,7 +125,7 @@ bpcharout(char *s)
    convertstr(result, len, 1);
 #endif
 
-   return (result);
+   return result;
 }
 
 /* bpchar()
@@ -141,10 +141,10 @@ bpchar(char *s, int32 len)
    int         i;
 
    if (s == NULL)
-       return ((char *) NULL);
+       return (char *) NULL;
 
    if ((len == -1) || (len == VARSIZE(s)))
-       return (s);
+       return s;
 
    rlen = len - VARHDRSZ;
 
@@ -186,7 +186,7 @@ printf("'\n");
    for (; i < rlen; i++)
        *r++ = ' ';
 
-   return (result);
+   return result;
 } /* bpchar() */
 
 
@@ -196,7 +196,7 @@ printf("'\n");
 int32
 bpchar_char(char *s)
 {
-   return ((int32) *VARDATA(s));
+   return (int32) *VARDATA(s);
 } /* bpchar_char() */
 
 /* char_bpchar()
@@ -226,7 +226,7 @@ bpchar_name(char *s)
    int         len;
 
    if (s == NULL)
-       return (NULL);
+       return NULL;
 
    len = VARSIZE(s) - VARHDRSZ;
    if (len > NAMEDATALEN) len = NAMEDATALEN;
@@ -250,7 +250,7 @@ printf("bpchar- convert string length %d (%d) ->%d\n",
        len++;
    }
 
-   return (result);
+   return result;
 } /* bpchar_name() */
 
 /* name_bpchar()
@@ -263,7 +263,7 @@ name_bpchar(NameData *s)
    int         len;
 
    if (s == NULL)
-       return (NULL);
+       return NULL;
 
    len = strlen(s->data);
 
@@ -276,7 +276,7 @@ printf("bpchar- convert string length %d (%d) ->%d\n",
    strncpy(VARDATA(result), s->data, len);
    VARSIZE(result) = len + VARHDRSZ;
 
-   return (result);
+   return result;
 } /* name_bpchar() */
 
 
@@ -297,7 +297,7 @@ varcharin(char *s, int dummy, int32 atttypmod)
    int         len;
 
    if (s == NULL)
-       return ((char *) NULL);
+       return (char *) NULL;
 
    len = strlen(s) + VARHDRSZ;
    if (atttypmod != -1 && len > atttypmod)
@@ -314,7 +314,7 @@ varcharin(char *s, int dummy, int32 atttypmod)
    convertstr(result + VARHDRSZ, len, 0);
 #endif
 
-   return (result);
+   return result;
 }
 
 char *
@@ -340,7 +340,7 @@ varcharout(char *s)
    convertstr(result, len, 1);
 #endif
 
-   return (result);
+   return result;
 }
 
 /* varchar()
@@ -354,11 +354,11 @@ varchar(char *s, int32 slen)
    int         len;
 
    if (s == NULL)
-       return ((char *) NULL);
+       return (char *) NULL;
 
    len = VARSIZE(s);
    if ((slen == -1) || (len <= slen))
-       return ((char *) s);
+       return (char *) s;
 
    /* only reach here if we need to truncate string... */
 
@@ -371,7 +371,7 @@ varchar(char *s, int32 slen)
    VARSIZE(result) = slen;
    strncpy(VARDATA(result), VARDATA(s), len);
 
-   return (result);
+   return result;
 } /* varchar() */
 
 
@@ -392,7 +392,7 @@ bcTruelen(char *arg)
        if (s[i] != ' ')
            break;
    }
-   return (i + 1);
+   return i + 1;
 }
 
 int32
@@ -416,7 +416,7 @@ bpcharlen(char *arg)
    }
    return(len);
 #else
-   return (bcTruelen(arg));
+   return bcTruelen(arg);
 #endif
 }
 
@@ -426,7 +426,7 @@ bpcharoctetlen(char *arg)
    if (!PointerIsValid(arg))
        elog(ERROR, "Bad (null) char() external representation", NULL);
 
-   return (bcTruelen(arg));
+   return bcTruelen(arg);
 }
 
 bool
@@ -436,14 +436,14 @@ bpchareq(char *arg1, char *arg2)
                len2;
 
    if (arg1 == NULL || arg2 == NULL)
-       return ((bool) 0);
+       return (bool) 0;
    len1 = bcTruelen(arg1);
    len2 = bcTruelen(arg2);
 
    if (len1 != len2)
        return 0;
 
-   return (strncmp(VARDATA(arg1), VARDATA(arg2), len1) == 0);
+   return strncmp(VARDATA(arg1), VARDATA(arg2), len1) == 0;
 }
 
 bool
@@ -453,14 +453,14 @@ bpcharne(char *arg1, char *arg2)
                len2;
 
    if (arg1 == NULL || arg2 == NULL)
-       return ((bool) 0);
+       return (bool) 0;
    len1 = bcTruelen(arg1);
    len2 = bcTruelen(arg2);
 
    if (len1 != len2)
        return 1;
 
-   return (strncmp(VARDATA(arg1), VARDATA(arg2), len1) != 0);
+   return strncmp(VARDATA(arg1), VARDATA(arg2), len1) != 0;
 }
 
 bool
@@ -471,15 +471,15 @@ bpcharlt(char *arg1, char *arg2)
    int         cmp;
 
    if (arg1 == NULL || arg2 == NULL)
-       return ((bool) 0);
+       return (bool) 0;
    len1 = bcTruelen(arg1);
    len2 = bcTruelen(arg2);
 
    cmp = varstr_cmp(VARDATA(arg1), len1, VARDATA(arg2), len2);
    if (cmp == 0)
-       return (len1 < len2);
+       return len1 < len2;
    else
-       return (cmp < 0);
+       return cmp < 0;
 }
 
 bool
@@ -490,7 +490,7 @@ bpcharle(char *arg1, char *arg2)
    int         cmp;
 
    if (arg1 == NULL || arg2 == NULL)
-       return ((bool) 0);
+       return (bool) 0;
    len1 = bcTruelen(arg1);
    len2 = bcTruelen(arg2);
 
@@ -509,15 +509,15 @@ bpchargt(char *arg1, char *arg2)
    int         cmp;
 
    if (arg1 == NULL || arg2 == NULL)
-       return ((bool) 0);
+       return (bool) 0;
    len1 = bcTruelen(arg1);
    len2 = bcTruelen(arg2);
 
    cmp = varstr_cmp(VARDATA(arg1), len1, VARDATA(arg2), len2);
    if (cmp == 0)
-       return (len1 > len2);
+       return len1 > len2;
    else
-       return (cmp > 0);
+       return cmp > 0;
 }
 
 bool
@@ -528,7 +528,7 @@ bpcharge(char *arg1, char *arg2)
    int         cmp;
 
    if (arg1 == NULL || arg2 == NULL)
-       return ((bool) 0);
+       return (bool) 0;
    len1 = bcTruelen(arg1);
    len2 = bcTruelen(arg2);
 
@@ -582,7 +582,7 @@ varcharlen(char *arg)
    }
    return(len);
 #else
-   return (VARSIZE(arg) - VARHDRSZ);
+   return VARSIZE(arg) - VARHDRSZ;
 #endif
 }
 
@@ -591,7 +591,7 @@ varcharoctetlen(char *arg)
 {
    if (!PointerIsValid(arg))
        elog(ERROR, "Bad (null) varchar() external representation", NULL);
-   return (VARSIZE(arg) - VARHDRSZ);
+   return VARSIZE(arg) - VARHDRSZ;
 }
 
 bool
@@ -601,7 +601,7 @@ varchareq(char *arg1, char *arg2)
                len2;
 
    if (arg1 == NULL || arg2 == NULL)
-       return ((bool) 0);
+       return (bool) 0;
 
    len1 = VARSIZE(arg1) - VARHDRSZ;
    len2 = VARSIZE(arg2) - VARHDRSZ;
@@ -609,7 +609,7 @@ varchareq(char *arg1, char *arg2)
    if (len1 != len2)
        return 0;
 
-   return (strncmp(VARDATA(arg1), VARDATA(arg2), len1) == 0);
+   return strncmp(VARDATA(arg1), VARDATA(arg2), len1) == 0;
 }
 
 bool
@@ -619,14 +619,14 @@ varcharne(char *arg1, char *arg2)
                len2;
 
    if (arg1 == NULL || arg2 == NULL)
-       return ((bool) 0);
+       return (bool) 0;
    len1 = VARSIZE(arg1) - VARHDRSZ;
    len2 = VARSIZE(arg2) - VARHDRSZ;
 
    if (len1 != len2)
        return 1;
 
-   return (strncmp(VARDATA(arg1), VARDATA(arg2), len1) != 0);
+   return strncmp(VARDATA(arg1), VARDATA(arg2), len1) != 0;
 }
 
 bool
@@ -637,15 +637,15 @@ varcharlt(char *arg1, char *arg2)
    int         cmp;
 
    if (arg1 == NULL || arg2 == NULL)
-       return ((bool) 0);
+       return (bool) 0;
    len1 = VARSIZE(arg1) - VARHDRSZ;
    len2 = VARSIZE(arg2) - VARHDRSZ;
 
    cmp = varstr_cmp(VARDATA(arg1), len1, VARDATA(arg2), len2);
    if (cmp == 0)
-       return (len1 < len2);
+       return len1 < len2;
    else
-       return (cmp < 0);
+       return cmp < 0;
 }
 
 bool
@@ -656,7 +656,7 @@ varcharle(char *arg1, char *arg2)
    int         cmp;
 
    if (arg1 == NULL || arg2 == NULL)
-       return ((bool) 0);
+       return (bool) 0;
    len1 = VARSIZE(arg1) - VARHDRSZ;
    len2 = VARSIZE(arg2) - VARHDRSZ;
 
@@ -675,15 +675,15 @@ varchargt(char *arg1, char *arg2)
    int         cmp;
 
    if (arg1 == NULL || arg2 == NULL)
-       return ((bool) 0);
+       return (bool) 0;
    len1 = VARSIZE(arg1) - VARHDRSZ;
    len2 = VARSIZE(arg2) - VARHDRSZ;
 
    cmp = varstr_cmp(VARDATA(arg1), len1, VARDATA(arg2), len2);
    if (cmp == 0)
-       return (len1 > len2);
+       return len1 > len2;
    else
-       return (cmp > 0);
+       return cmp > 0;
 }
 
 bool
@@ -694,7 +694,7 @@ varcharge(char *arg1, char *arg2)
    int         cmp;
 
    if (arg1 == NULL || arg2 == NULL)
-       return ((bool) 0);
+       return (bool) 0;
    len1 = VARSIZE(arg1) - VARHDRSZ;
    len2 = VARSIZE(arg2) - VARHDRSZ;
 
@@ -767,7 +767,7 @@ hashbpchar(struct varlena * key)
                } while (--loop);
        }
    }
-   return (n);
+   return n;
 }
 
 uint32
@@ -811,5 +811,5 @@ hashvarchar(struct varlena * key)
                } while (--loop);
        }
    }
-   return (n);
+   return n;
 }
index cbb50f7eb4abdebcbae43fd11cb83fbbb11ee10b..22e0e981240ecf917a8a679dbe75391b0a3c538a 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.40 1998/08/29 04:09:27 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.41 1998/09/01 03:26:23 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -76,7 +76,7 @@ byteain(char *inputText)
            byte <<= 3;
            *rp++ = byte + VAL(*tp++);
        }
-   return (result);
+   return result;
 }
 
 /*
@@ -103,7 +103,7 @@ byteaout(text *vlena)
        result = (char *) palloc(2);
        result[0] = '-';
        result[1] = '\0';
-       return (result);
+       return result;
    }
    vp = vlena->vl_dat;
    len = 1;                    /* empty string has 1 char */
@@ -138,7 +138,7 @@ byteaout(text *vlena)
            rp += 3;
        }
    *rp = '\0';
-   return (result);
+   return result;
 }
 
 
@@ -152,7 +152,7 @@ textin(char *inputText)
    int         len;
 
    if (inputText == NULL)
-       return (NULL);
+       return NULL;
 
    len = strlen(inputText) + VARHDRSZ;
    result = (text *) palloc(len);
@@ -164,7 +164,7 @@ textin(char *inputText)
    convertstr(VARDATA(result), len - VARHDRSZ, 0);
 #endif
 
-   return (result);
+   return result;
 }
 
 /*
@@ -181,7 +181,7 @@ textout(text *vlena)
        result = (char *) palloc(2);
        result[0] = '-';
        result[1] = '\0';
-       return (result);
+       return result;
    }
    len = VARSIZE(vlena) - VARHDRSZ;
    result = (char *) palloc(len + 1);
@@ -192,7 +192,7 @@ textout(text *vlena)
    convertstr(result, len, 1);
 #endif
 
-   return (result);
+   return result;
 }
 
 
@@ -226,7 +226,7 @@ textlen(text *t)
    }
    return(len);
 #else
-   return (VARSIZE(t) - VARHDRSZ);
+   return VARSIZE(t) - VARHDRSZ;
 #endif
    
 }  /* textlen() */
@@ -242,7 +242,7 @@ textoctetlen(text *t)
    if (!PointerIsValid(t))
        elog(ERROR, "Null input to textoctetlen");
 
-   return (VARSIZE(t) - VARHDRSZ);
+   return VARSIZE(t) - VARHDRSZ;
 
 }  /* textoctetlen() */
 
@@ -266,7 +266,7 @@ textcat(text *t1, text *t2)
    text       *result;
 
    if (!PointerIsValid(t1) || !PointerIsValid(t2))
-       return (NULL);
+       return NULL;
 
    len1 = (VARSIZE(t1) - VARHDRSZ);
    if (len1 < 0)
@@ -293,7 +293,7 @@ textcat(text *t1, text *t2)
    if (len2 > 0)
        memcpy(ptr + len1, VARDATA(t2), len2);
 
-   return (result);
+   return result;
 }  /* textcat() */
 
 /*
@@ -392,10 +392,10 @@ textpos(text *t1, text *t2)
 #endif
 
    if (!PointerIsValid(t1) || !PointerIsValid(t2))
-       return (0);
+       return 0;
 
    if (VARSIZE(t2) <= 0)
-       return (1);
+       return 1;
 
    len1 = (VARSIZE(t1) - VARHDRSZ);
    len2 = (VARSIZE(t2) - VARHDRSZ);
@@ -429,7 +429,7 @@ textpos(text *t1, text *t2)
    pfree(ps1);
    pfree(ps2);
 #endif
-   return (pos);
+   return pos;
 }  /* textpos() */
 
 /*
@@ -444,9 +444,9 @@ texteq(text *arg1, text *arg2)
               *a2p;
 
    if (arg1 == NULL || arg2 == NULL)
-       return ((bool) NULL);
+       return (bool) NULL;
    if ((len = arg1->vl_len) != arg2->vl_len)
-       return ((bool) 0);
+       return (bool) 0;
    a1p = arg1->vl_dat;
    a2p = arg2->vl_dat;
 
@@ -458,14 +458,14 @@ texteq(text *arg1, text *arg2)
    len -= VARHDRSZ;
    while (len-- != 0)
        if (*a1p++ != *a2p++)
-           return ((bool) 0);
-   return ((bool) 1);
+           return (bool) 0;
+   return (bool) 1;
 }  /* texteq() */
 
 bool
 textne(text *arg1, text *arg2)
 {
-   return ((bool) !texteq(arg1, arg2));
+   return (bool) !texteq(arg1, arg2);
 }
 
 /* varstr_cmp()
@@ -504,7 +504,7 @@ varstr_cmp(char *arg1, int len1, char *arg2, int len2)
        result = (len1 < len2) ? -1 : 1;
 #endif
 
-   return (result);
+   return result;
 }  /* varstr_cmp() */
 
 /* text_cmp()
@@ -522,7 +522,7 @@ text_cmp(text *arg1, text *arg2)
    int     len1, len2;
 
    if (arg1 == NULL || arg2 == NULL)
-       return ((bool) FALSE);
+       return (bool) FALSE;
 
    a1p = VARDATA(arg1);
    a2p = VARDATA(arg2);
@@ -554,13 +554,13 @@ text_le(text *arg1, text *arg2)
 bool
 text_gt(text *arg1, text *arg2)
 {
-   return ((bool) !text_le(arg1, arg2));
+   return (bool) !text_le(arg1, arg2);
 }
 
 bool
 text_ge(text *arg1, text *arg2)
 {
-   return ((bool) !text_lt(arg1, arg2));
+   return (bool) !text_lt(arg1, arg2);
 }
 
 /*-------------------------------------------------------------
@@ -576,7 +576,7 @@ byteaGetSize(text *v)
 
    len = v->vl_len - sizeof(v->vl_len);
 
-   return (len);
+   return len;
 }
 
 /*-------------------------------------------------------------
@@ -603,7 +603,7 @@ byteaGetByte(text *v, int32 n)
 
    byte = (unsigned char) (v->vl_dat[n]);
 
-   return ((int32) byte);
+   return (int32) byte;
 }
 
 /*-------------------------------------------------------------
@@ -628,9 +628,9 @@ byteaGetBit(text *v, int32 n)
    byte = byteaGetByte(v, byteNo);
 
    if (byte & (1 << bitNo))
-       return ((int32) 1);
+       return (int32) 1;
    else
-       return ((int32) 0);
+       return (int32) 0;
 }
 
 /*-------------------------------------------------------------
@@ -672,7 +672,7 @@ byteaSetByte(text *v, int32 n, int32 newByte)
     */
    res->vl_dat[n] = newByte;
 
-   return (res);
+   return res;
 }
 
 /*-------------------------------------------------------------
@@ -718,7 +718,7 @@ byteaSetBit(text *v, int32 n, int32 newBit)
     */
    res = byteaSetByte(v, byteNo, newByte);
 
-   return (res);
+   return res;
 }
 
 
@@ -732,7 +732,7 @@ text_name(text *s)
    int         len;
 
    if (s == NULL)
-       return (NULL);
+       return NULL;
 
    len = VARSIZE(s) - VARHDRSZ;
    if (len > NAMEDATALEN) len = NAMEDATALEN;
@@ -751,7 +751,7 @@ printf("text- convert string length %d (%d) ->%d\n",
        len++;
    }
 
-   return (result);
+   return result;
 } /* text_name() */
 
 /* name_text()
@@ -764,7 +764,7 @@ name_text(NameData *s)
    int         len;
 
    if (s == NULL)
-       return (NULL);
+       return NULL;
 
    len = strlen(s->data);
 
@@ -777,5 +777,5 @@ printf("text- convert string length %d (%d) ->%d\n",
    strncpy(VARDATA(result), s->data, len);
    VARSIZE(result) = len + VARHDRSZ;
 
-   return (result);
+   return result;
 } /* name_text() */
index 4820eff22247656da6ce15b7c55772bd89b0e50f..ebc263d8a2c52386fe8b1c0c5f44ff60abf07526 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.32 1998/08/19 02:03:08 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.33 1998/09/01 03:26:25 momjian Exp $
  *
  * Notes:
  *     XXX This needs to use exception.h to handle recovery when
@@ -181,7 +181,7 @@ CatalogCacheInitializeCache(struct catcache * cache,
     */
    Assert(RelationIsValid(relation));
    cache->relationId = RelationGetRelid(relation);
-   tupdesc = cache->cc_tupdesc = RelationGetTupleDescriptor(relation);
+   tupdesc = cache->cc_tupdesc = RelationGetDescr(relation);
 
    CACHE3_elog(DEBUG, "CatalogCacheInitializeCache: relid %d, %d keys",
                cache->relationId, cache->cc_nkeys);
@@ -240,7 +240,7 @@ CatalogCacheInitializeCache(struct catcache * cache,
     */
    if (cache->cc_indname != NULL && cache->indexId == InvalidOid)
    {
-       if (RelationGetRelationTupleForm(relation)->relhasindex)
+       if (RelationGetForm(relation)->relhasindex)
        {
 
            /*
@@ -301,7 +301,7 @@ comphash(long l, char *v)
        case 1:
        case 2:
        case 4:
-           return ((long) v);
+           return (long) v;
    }
 
    if (l == NAMEDATALEN)
@@ -322,7 +322,7 @@ comphash(long l, char *v)
    i = 0;
    while (l--)
        i += *v++;
-   return (i);
+   return i;
 }
 
 /* --------------------------------
@@ -365,7 +365,7 @@ CatalogCacheComputeHashIndex(struct catcache * cacheInP)
            break;
    }
    hashIndex %= cacheInP->cc_size;
-   return (hashIndex);
+   return hashIndex;
 }
 
 /* --------------------------------
@@ -389,7 +389,7 @@ CatalogCacheComputeTupleHashIndex(struct catcache * cacheInOutP,
                ? (Datum) tuple->t_oid
                : fastgetattr(tuple,
                              cacheInOutP->cc_key[3],
-                             RelationGetTupleDescriptor(relation),
+                             RelationGetDescr(relation),
                              &isNull);
            Assert(!isNull);
            /* FALLTHROUGH */
@@ -399,7 +399,7 @@ CatalogCacheComputeTupleHashIndex(struct catcache * cacheInOutP,
                ? (Datum) tuple->t_oid
                : fastgetattr(tuple,
                              cacheInOutP->cc_key[2],
-                             RelationGetTupleDescriptor(relation),
+                             RelationGetDescr(relation),
                              &isNull);
            Assert(!isNull);
            /* FALLTHROUGH */
@@ -409,7 +409,7 @@ CatalogCacheComputeTupleHashIndex(struct catcache * cacheInOutP,
                ? (Datum) tuple->t_oid
                : fastgetattr(tuple,
                              cacheInOutP->cc_key[1],
-                             RelationGetTupleDescriptor(relation),
+                             RelationGetDescr(relation),
                              &isNull);
            Assert(!isNull);
            /* FALLTHROUGH */
@@ -419,7 +419,7 @@ CatalogCacheComputeTupleHashIndex(struct catcache * cacheInOutP,
                ? (Datum) tuple->t_oid
                : fastgetattr(tuple,
                              cacheInOutP->cc_key[0],
-                             RelationGetTupleDescriptor(relation),
+                             RelationGetDescr(relation),
                              &isNull);
            Assert(!isNull);
            break;
@@ -675,7 +675,7 @@ InitSysCache(char *relname,
             char *iname,
             int id,
             int nkeys,
-            int key[],
+            int *key,
             HeapTuple (*iScanfuncP) ())
 {
    CatCache   *cp;
@@ -801,7 +801,7 @@ InitSysCache(char *relname,
     * ----------------
     */
    MemoryContextSwitchTo(oldcxt);
-   return (cp);
+   return cp;
 }
 
 
@@ -896,7 +896,7 @@ SearchSysCache(struct catcache * cache,
        heap_close(relation);
 #endif                         /* CACHEDEBUG */
 
-       return (ct->ct_tup);
+       return ct->ct_tup;
    }
 
    /* ----------------
@@ -913,7 +913,7 @@ SearchSysCache(struct catcache * cache,
    if (DisableCache)
    {
        elog(ERROR, "SearchSysCache: Called while cache disabled");
-       return ((HeapTuple) NULL);
+       return (HeapTuple) NULL;
    }
 
    /* ----------------
@@ -943,7 +943,7 @@ SearchSysCache(struct catcache * cache,
    CACHE2_elog(DEBUG, "SearchSysCache: performing scan (override==%d)",
                heapisoverride());
 
-   if ((RelationGetRelationTupleForm(relation))->relhasindex
+   if ((RelationGetForm(relation))->relhasindex
        && !IsBootstrapProcessingMode())
    {
        /* ----------
index 89351db8c828a43a80da5dad712a3f7fb92bdca3..8933c664412da7c96c3f409fa3c502ca43ff6be8 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/fcache.c,v 1.16 1998/08/24 01:13:54 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/fcache.c,v 1.17 1998/09/01 03:26:27 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -87,7 +87,7 @@ init_fcache(Oid foid,
    HeapTuple   procedureTuple;
    HeapTuple   typeTuple;
    Form_pg_proc procedureStruct;
-   TypeTupleForm typeStruct;
+   Form_pg_type typeStruct;
    FunctionCachePtr retval;
    text       *tmp;
    int         nargs;
@@ -140,7 +140,7 @@ init_fcache(Oid foid,
     *   save the information in our one element cache.
     * ----------------
     */
-   typeStruct = (TypeTupleForm) GETSTRUCT(typeTuple);
+   typeStruct = (Form_pg_type) GETSTRUCT(typeTuple);
 
    retval->typlen = (typeStruct)->typlen;
    if ((typeStruct)->typrelid == InvalidOid)
@@ -292,7 +292,7 @@ init_fcache(Oid foid,
        retval->func.fn_addr = (func_ptr) NULL;
 
 
-   return (retval);
+   return retval;
 }
 
 void
index cd327632a870ee791dd40d04aae7cd015e77a334..631fc2a18c95b8d2d49ea511cdc102dde77ac1be 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/cache/inval.c,v 1.14 1998/08/20 22:07:43 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/cache/inval.c,v 1.15 1998/09/01 03:26:29 momjian Exp $
  *
  * Note - this code is real crufty...
  *
@@ -103,7 +103,7 @@ InvalidationEntryAllocate(uint16 size)
    entryDataP = (InvalidationEntryData *)
        malloc(sizeof(char *) + size);  /* XXX alignment */
    entryDataP->nextP = NULL;
-   return ((Pointer) &entryDataP->userData);
+   return (Pointer) &entryDataP->userData;
 }
 
 /* --------------------------------
@@ -120,7 +120,7 @@ LocalInvalidRegister(LocalInvalid invalid,
    ((InvalidationUserData *) entry)->dataP[-1] =
        (InvalidationUserData *) invalid;
 
-   return (entry);
+   return entry;
 }
 
 /* --------------------------------
@@ -485,7 +485,7 @@ RelationInvalidateRelationCache(Relation relation,
    if (relationId == MyRelationRelationId)
        objectId = tuple->t_oid;
    else if (relationId == MyAttributeRelationId)
-       objectId = ((AttributeTupleForm) GETSTRUCT(tuple))->attrelid;
+       objectId = ((Form_pg_attribute) GETSTRUCT(tuple))->attrelid;
    else if (relationId == MyAMRelationId)
        objectId = tuple->t_oid;
    else if (relationId == MyAMOPRelationId)
@@ -621,7 +621,7 @@ RelationInvalidateHeapTuple(Relation relation, HeapTuple tuple)
     *  this only works for system relations now
     * ----------------
     */
-   if (!IsSystemRelationName(RelationGetRelationTupleForm(relation)->relname.data))
+   if (!IsSystemRelationName(RelationGetForm(relation)->relname.data))
        return;
 
    /* ----------------
index 38c29fd2749aa62686d74ff577964cdd64c7dca1..7189f16c6e3a244761de97279829a85e5834e320 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.20 1998/08/19 02:03:12 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.21 1998/09/01 03:26:30 momjian Exp $
  *
  * NOTES
  *   Eventually, the index information should go through here, too.
@@ -111,7 +111,7 @@ get_attnum(Oid relid, char *attname)
 Oid
 get_atttype(Oid relid, AttrNumber attnum)
 {
-   AttributeTupleForm att_tup = (AttributeTupleForm) palloc(sizeof(*att_tup));
+   Form_pg_attribute att_tup = (Form_pg_attribute) palloc(sizeof(*att_tup));
 
    if (SearchSysCacheStruct(ATTNUM, (char *) att_tup,
                             ObjectIdGetDatum(relid),
@@ -131,7 +131,7 @@ get_attisset(Oid relid, char *attname)
 {
    HeapTuple   tuple;
    AttrNumber  attno;
-   AttributeTupleForm att_tup;
+   Form_pg_attribute att_tup;
 
    attno = get_attnum(relid, attname);
 
@@ -146,7 +146,7 @@ get_attisset(Oid relid, char *attname)
        return false;
    else
    {
-       att_tup = (AttributeTupleForm) GETSTRUCT(tuple);
+       att_tup = (Form_pg_attribute) GETSTRUCT(tuple);
        return att_tup->attisset;
    }
 }
@@ -415,7 +415,7 @@ get_rel_name(Oid relid)
 int16
 get_typlen(Oid typid)
 {
-   TypeTupleFormData typtup;
+   FormData_pg_type typtup;
 
    if (SearchSysCacheStruct(TYPOID, (char *) &typtup,
                             ObjectIdGetDatum(typid),
@@ -435,7 +435,7 @@ get_typlen(Oid typid)
 bool
 get_typbyval(Oid typid)
 {
-   TypeTupleFormData typtup;
+   FormData_pg_type typtup;
 
    if (SearchSysCacheStruct(TYPOID, (char *) &typtup,
                             ObjectIdGetDatum(typid),
@@ -456,7 +456,7 @@ get_typbyval(Oid typid)
 char
 get_typalign(Oid typid)
 {
-   TypeTupleFormData typtup;
+   FormData_pg_type typtup;
 
    if (SearchSysCacheStruct(TYPOID, (char *) &typtup,
                             ObjectIdGetDatum(typid),
@@ -495,7 +495,7 @@ get_typdefault(Oid typid)
 char
 get_typtype(Oid typid)
 {
-   TypeTupleFormData typtup;
+   FormData_pg_type typtup;
 
    if (SearchSysCacheStruct(TYPOID, (char *) &typtup,
                             ObjectIdGetDatum(typid),
index 5d30836a41f8de30b21f18e4a9a0bd49673e9559..078f532c959e17549872a5eca08468b9e14ce945 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.48 1998/08/28 03:36:28 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.49 1998/09/01 03:26:32 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -235,7 +235,7 @@ do { \
 /* non-export function prototypes */
 static void
 formrdesc(char *relationName, u_int natts,
-         FormData_pg_attribute att[]);
+         FormData_pg_attribute *att);
 
 #if 0                          /* See comments at line 1304 */
 static void RelationFlushIndexes(Relation *r, Oid accessMethodId);
@@ -324,9 +324,9 @@ ScanPgRelation(RelationBuildDescInfo buildinfo)
     */
 
    if (IsBootstrapProcessingMode())
-       return (scan_pg_rel_seq(buildinfo));
+       return scan_pg_rel_seq(buildinfo);
    else
-       return (scan_pg_rel_ind(buildinfo));
+       return scan_pg_rel_ind(buildinfo);
 }
 
 static HeapTuple
@@ -454,16 +454,16 @@ AllocateRelationDesc(u_int natts, Form_pg_class relp)
 {
    Relation    relation;
    Size        len;
-   Form_pg_class relationTupleForm;
+   Form_pg_class relationForm;
 
    /* ----------------
     *  allocate space for the relation tuple form
     * ----------------
     */
-   relationTupleForm = (Form_pg_class)
+   relationForm = (Form_pg_class)
        palloc((Size) (sizeof(FormData_pg_class)));
 
-   memmove((char *) relationTupleForm, (char *) relp, CLASS_TUPLE_SIZE);
+   memmove((char *) relationForm, (char *) relp, CLASS_TUPLE_SIZE);
 
    /* ----------------
     *  allocate space for new relation descriptor
@@ -482,7 +482,7 @@ AllocateRelationDesc(u_int natts, Form_pg_class relp)
    relation->rd_att = CreateTemplateTupleDesc(natts);
 
    /* and initialize relation tuple form */
-   relation->rd_rel = relationTupleForm;
+   relation->rd_rel = relationForm;
 
    return relation;
 }
@@ -520,7 +520,7 @@ build_tupdesc_seq(RelationBuildDescInfo buildinfo,
    HeapTuple   pg_attribute_tuple;
    Relation    pg_attribute_desc;
    HeapScanDesc pg_attribute_scan;
-   AttributeTupleForm attp;
+   Form_pg_attribute attp;
    ScanKeyData key;
    int         need;
 
@@ -549,12 +549,12 @@ build_tupdesc_seq(RelationBuildDescInfo buildinfo,
    pg_attribute_tuple = heap_getnext(pg_attribute_scan, 0);
    while (HeapTupleIsValid(pg_attribute_tuple) && need > 0)
    {
-       attp = (AttributeTupleForm) GETSTRUCT(pg_attribute_tuple);
+       attp = (Form_pg_attribute) GETSTRUCT(pg_attribute_tuple);
 
        if (attp->attnum > 0)
        {
            relation->rd_att->attrs[attp->attnum - 1] =
-               (AttributeTupleForm) palloc(ATTRIBUTE_TUPLE_SIZE);
+               (Form_pg_attribute) palloc(ATTRIBUTE_TUPLE_SIZE);
 
            memmove((char *) (relation->rd_att->attrs[attp->attnum - 1]),
                    (char *) attp,
@@ -583,7 +583,7 @@ build_tupdesc_ind(RelationBuildDescInfo buildinfo,
 {
    Relation    attrel;
    HeapTuple   atttup;
-   AttributeTupleForm attp;
+   Form_pg_attribute attp;
    TupleConstr *constr = (TupleConstr *) palloc(sizeof(TupleConstr));
    AttrDefault *attrdef = NULL;
    int         ndef = 0;
@@ -601,10 +601,10 @@ build_tupdesc_ind(RelationBuildDescInfo buildinfo,
        if (!HeapTupleIsValid(atttup))
            elog(ERROR, "cannot find attribute %d of relation %s", i,
                relation->rd_rel->relname.data);
-       attp = (AttributeTupleForm) GETSTRUCT(atttup);
+       attp = (Form_pg_attribute) GETSTRUCT(atttup);
 
        relation->rd_att->attrs[i - 1] =
-           (AttributeTupleForm) palloc(ATTRIBUTE_TUPLE_SIZE);
+           (Form_pg_attribute) palloc(ATTRIBUTE_TUPLE_SIZE);
 
        memmove((char *) (relation->rd_att->attrs[i - 1]),
                (char *) attp,
@@ -708,7 +708,7 @@ RelationBuildRuleLock(Relation relation)
     */
    pg_rewrite_desc = heap_openr(RewriteRelationName);
    pg_rewrite_scan = heap_beginscan(pg_rewrite_desc, 0, SnapshotNow, 1, &key);
-   pg_rewrite_tupdesc = RelationGetTupleDescriptor(pg_rewrite_desc);
+   pg_rewrite_tupdesc = RelationGetDescr(pg_rewrite_desc);
 
    /* ----------------
     *  add attribute data to relation->rd_att
@@ -880,7 +880,7 @@ RelationBuildDesc(RelationBuildDescInfo buildinfo)
    if (OidIsValid(relam))
    {
        relation->rd_am = (Form_pg_am)
-           AccessMethodObjectIdGetAccessMethodTupleForm(relam);
+           AccessMethodObjectIdGetForm(relam);
    }
 
    /* ----------------
@@ -1000,7 +1000,7 @@ IndexedAccessMethodInitialize(Relation relation)
 static void
 formrdesc(char *relationName,
          u_int natts,
-         FormData_pg_attribute att[])
+         FormData_pg_attribute *att)
 {
    Relation    relation;
    Size        len;
@@ -1072,7 +1072,7 @@ formrdesc(char *relationName,
    for (i = 0; i < natts; i++)
    {
        relation->rd_att->attrs[i] =
-           (AttributeTupleForm) palloc(ATTRIBUTE_TUPLE_SIZE);
+           (Form_pg_attribute) palloc(ATTRIBUTE_TUPLE_SIZE);
 
        MemSet((char *) relation->rd_att->attrs[i], 0,
               ATTRIBUTE_TUPLE_SIZE);
@@ -1138,7 +1138,7 @@ RelationIdCacheGetRelation(Oid relationId)
 
    }
 
-   return (rd);
+   return rd;
 }
 
 /* --------------------------------
@@ -1171,7 +1171,7 @@ RelationNameCacheGetRelation(char *relationName)
 
    }
 
-   return (rd);
+   return rd;
 }
 
 /* --------------------------------
@@ -1337,7 +1337,7 @@ RelationFlushRelation(Relation *relationPtr,
 #endif
 
        pfree(RelationGetLockInfo(relation));
-       pfree(RelationGetRelationTupleForm(relation));
+       pfree(RelationGetForm(relation));
        pfree(relation);
 
        MemoryContextSwitchTo(oldcxt);
@@ -1955,7 +1955,7 @@ init_irels(void)
                return;
            }
 
-           ird->rd_att->attrs[i] = (AttributeTupleForm) palloc(len);
+           ird->rd_att->attrs[i] = (Form_pg_attribute) palloc(len);
 
            if ((nread = FileRead(fd, (char *) ird->rd_att->attrs[i], len)) != len)
            {
index 7b4a411d1721602f5589c6ebf887e1130d14f9d8..cebbe28ac1b826ad8107f7cd10ec6194c9c2ffe3 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.20 1998/08/19 02:03:15 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.21 1998/09/01 03:26:33 momjian Exp $
  *
  * NOTES
  *   These routines allow the parser/planner/executor to perform
@@ -205,7 +205,7 @@ static struct cachedesc cacheinfo[] = {
            0,
            0
        },
-       offsetof(TypeTupleFormData, typalign) +sizeof(char),
+       offsetof(FormData_pg_type, typalign) +sizeof(char),
        TypeNameIndex,
    TypeNameIndexScan},
    {TypeRelationName,          /* TYPOID */
@@ -216,7 +216,7 @@ static struct cachedesc cacheinfo[] = {
            0,
            0
        },
-       offsetof(TypeTupleFormData, typalign) +sizeof(char),
+       offsetof(FormData_pg_type, typalign) +sizeof(char),
        TypeOidIndex,
    TypeOidIndexScan},
    {AccessMethodRelationName,  /* AMNAME */
@@ -484,7 +484,7 @@ SearchSysCacheTuple(int cacheId,/* cache selection code */
    if (cacheId < 0 || cacheId >= SysCacheSize)
    {
        elog(ERROR, "SearchSysCacheTuple: Bad cache id %d", cacheId);
-       return ((HeapTuple) NULL);
+       return (HeapTuple) NULL;
    }
 
    Assert(AMI_OVERRIDE || PointerIsValid(SysCache[cacheId]));
@@ -514,9 +514,9 @@ SearchSysCacheTuple(int cacheId,/* cache selection code */
             cacheinfo[cacheId].name,
             cacheId, key1, key2, key3, key4);
 #endif
-       return ((HeapTuple) NULL);
+       return (HeapTuple) NULL;
    }
-   return (tp);
+   return tp;
 }
 
 /*
@@ -543,13 +543,13 @@ SearchSysCacheStruct(int cacheId,     /* cache selection code */
    if (!PointerIsValid(returnStruct))
    {
        elog(ERROR, "SearchSysCacheStruct: No receiving struct");
-       return (0);
+       return 0;
    }
    tp = SearchSysCacheTuple(cacheId, key1, key2, key3, key4);
    if (!HeapTupleIsValid(tp))
-       return (0);
+       return 0;
    memmove(returnStruct, (char *) GETSTRUCT(tp), cacheinfo[cacheId].size);
-   return (1);
+   return 1;
 }
 
 
@@ -589,7 +589,7 @@ SearchSysCacheGetAttribute(int cacheId,
             "SearchSysCacheGetAttribute: Lookup in %s(%d) failed",
             cacheName, cacheId);
 #endif                         /* defined(CACHEDEBUG) */
-       return (NULL);
+       return NULL;
    }
 
    relation = heap_openr(cacheName);
@@ -613,12 +613,12 @@ SearchSysCacheGetAttribute(int cacheId,
        elog(ERROR,
             "SearchSysCacheGetAttribute: Bad attr # %d in %s(%d)",
             attributeNumber, cacheName, cacheId);
-       return (NULL);
+       return NULL;
    }
 
    attributeValue = heap_getattr(tp,
                                  attributeNumber,
-                                 RelationGetTupleDescriptor(relation),
+                                 RelationGetDescr(relation),
                                  &isNull);
 
    if (isNull)
@@ -627,7 +627,7 @@ SearchSysCacheGetAttribute(int cacheId,
         * Used to be an elog(DEBUG, ...) here and a claim that it should
         * be a FATAL error, I don't think either is warranted -mer 6/9/92
         */
-       return (NULL);
+       return NULL;
    }
 
    if (attributeByValue)
@@ -645,7 +645,7 @@ SearchSysCacheGetAttribute(int cacheId,
    }
 
    heap_close(relation);
-   return (returnValue);
+   return returnValue;
 }
 
 /*
@@ -665,7 +665,7 @@ void *
 TypeDefaultRetrieve(Oid typId)
 {
    HeapTuple   typeTuple;
-   TypeTupleForm type;
+   Form_pg_type type;
    int32       typByVal,
                typLen;
    struct varlena *typDefault;
@@ -682,10 +682,10 @@ TypeDefaultRetrieve(Oid typId)
        elog(DEBUG, "TypeDefaultRetrieve: Lookup in %s(%d) failed",
             cacheinfo[TYPOID].name, TYPOID);
 #endif                         /* defined(CACHEDEBUG) */
-       return (NULL);
+       return NULL;
    }
 
-   type = (TypeTupleForm) GETSTRUCT(typeTuple);
+   type = (Form_pg_type) GETSTRUCT(typeTuple);
    typByVal = type->typbyval;
    typLen = type->typlen;
 
@@ -701,7 +701,7 @@ TypeDefaultRetrieve(Oid typId)
        elog(DEBUG, "TypeDefaultRetrieve: No extractable typdefault in %s(%d)",
             cacheinfo[TYPOID].name, TYPOID);
 #endif                         /* defined(CACHEDEBUG) */
-       return (NULL);
+       return NULL;
    }
 
    dataSize = VARSIZE(typDefault) - VARHDRSZ;
@@ -746,5 +746,5 @@ TypeDefaultRetrieve(Oid typId)
        }
    }
 
-   return (returnValue);
+   return returnValue;
 }
index af36729582822003c40f1639fd702dc94faebd72..b923028b5faa62471db0145536ac78c48a40d8f8 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/error/assert.c,v 1.10 1998/08/25 21:34:06 scrappy Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/error/assert.c,v 1.11 1998/09/01 03:26:35 momjian Exp $
  *
  * NOTE
  *   This should eventually work with elog(), dlog(), etc.
@@ -72,5 +72,5 @@ ExceptionalCondition(char *conditionName,
 
    /* XXX FIXME: detail is lost */
    ExcRaise(exceptionP, (ExcDetail) 0, (ExcData) NULL, conditionName);
-   return (0);
+   return 0;
 }
index ec300acdab8b512dcea61742dd8b9e03cedef8bc..79ae7e81379071d390d570ed4c9b0f4e5fcc3d76 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.33 1998/08/31 04:48:36 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.34 1998/09/01 03:26:37 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -52,8 +52,6 @@ static int    Debugfile = -1;
 static int Err_file = -1;
 static int ElogDebugIndentLevel = 0;
 
-extern char OutputFileName[];
-
 /*
  * elog --
  *     Old error logging function.
@@ -287,7 +285,7 @@ DebugFileOpen(void)
            elog(FATAL, "DebugFileOpen: %s reopen as stderr: %m",
                 OutputFileName);
        Err_file = Debugfile = fileno(stderr);
-       return (Debugfile);
+       return Debugfile;
    }
 
    /*
@@ -305,7 +303,7 @@ DebugFileOpen(void)
        elog(FATAL, "DebugFileOpen: could not open debugging file");
 
    Err_file = Debugfile = fd;
-   return (Debugfile);
+   return Debugfile;
 }
 
 #endif
index 70af54af12777ca7dfff80f1bad9643868365278..3061edcc3174e65097340ee81298ab2221de8733 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/exc.c,v 1.21 1998/06/27 04:53:45 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/exc.c,v 1.22 1998/09/01 03:26:38 momjian Exp $
  *
  * NOTE
  *   XXX this code needs improvement--check for state violations and
@@ -144,7 +144,7 @@ ExcPrint(Exception *excP,
 ExcProc    *
 ExcGetUnCaught(void)
 {
-   return (ExcUnCaughtP);
+   return ExcUnCaughtP;
 }
 
 #endif
@@ -157,7 +157,7 @@ ExcSetUnCaught(ExcProc *newP)
 
    ExcUnCaughtP = newP;
 
-   return (oldP);
+   return oldP;
 }
 
 #endif
index e76f78cbca980bf48af6eb77be80c21a3a7fc20d..7c3661da4bd0fd595645c0432093f7b50903fc88 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/format.c,v 1.6 1998/02/26 04:37:36 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/format.c,v 1.7 1998/09/01 03:26:40 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -36,5 +36,5 @@ form(const char *fmt,...)
 
    va_end(args);
 
-   return (FormBuf);
+   return FormBuf;
 }
index d506ac1f57ac77f12fda7f8e72bade5cd5e32890..fa91249b1050230dd9605324f569ac1564de6619 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.19 1998/08/19 02:03:16 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.20 1998/09/01 03:26:42 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -64,7 +64,7 @@ fmgr_dynamic(Oid procedureId, int *pronargs)
    if (procedureId == procedureId_save)
    {
        *pronargs = pronargs_save;
-       return (user_fn_save);
+       return user_fn_save;
    }
 
    /*
@@ -78,7 +78,7 @@ fmgr_dynamic(Oid procedureId, int *pronargs)
    {
        elog(ERROR, "fmgr: Cache lookup failed for procedure %d\n",
             procedureId);
-       return ((func_ptr) NULL);
+       return (func_ptr) NULL;
    }
 
    procedureStruct = (Form_pg_proc) GETSTRUCT(procedureTuple);
@@ -98,17 +98,17 @@ fmgr_dynamic(Oid procedureId, int *pronargs)
    {
        elog(ERROR, "fmgr: Could not open relation %s",
             ProcedureRelationName);
-       return ((func_ptr) NULL);
+       return (func_ptr) NULL;
    }
    probinattr = heap_getattr(procedureTuple,
                              Anum_pg_proc_probin,
-                             RelationGetTupleDescriptor(rel), &isnull);
+                             RelationGetDescr(rel), &isnull);
    if (!PointerIsValid(probinattr) /* || isnull */ )
    {
        heap_close(rel);
        elog(ERROR, "fmgr: Could not extract probin for %d from %s",
             procedureId, ProcedureRelationName);
-       return ((func_ptr) NULL);
+       return (func_ptr) NULL;
    }
    probinstring = textout((struct varlena *) probinattr);
 
@@ -117,7 +117,7 @@ fmgr_dynamic(Oid procedureId, int *pronargs)
    procedureId_save = procedureId;
    user_fn_save = user_fn;
 
-   return (user_fn);
+   return user_fn;
 }
 
 static func_ptr
@@ -213,7 +213,7 @@ handle_load(char *filename, char *funcname)
        file_tail = file_scanner;
 
        if (funcname == (char *) NULL)
-           return ((func_ptr) NULL);
+           return (func_ptr) NULL;
    }
 
    retval = (func_ptr) pg_dlsym(file_scanner->handle, funcname);
@@ -221,7 +221,7 @@ handle_load(char *filename, char *funcname)
    if (retval == (func_ptr) NULL)
        elog(ERROR, "Can't find function %s in file %s", funcname, filename);
 
-   return (retval);
+   return retval;
 }
 
 /*
@@ -286,5 +286,5 @@ trigger_dynamic(char *filename, char *funcname)
 
    trigger_fn = handle_load(filename, funcname);
 
-   return (trigger_fn);
+   return trigger_fn;
 }
index 217aa39a2b1b2e3dc0dab9f9e2552d3f60686245..27c2bd213d18dd86e8f0606183df3d757f15bb12 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v 1.18 1998/08/19 02:03:18 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v 1.19 1998/09/01 03:26:43 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -152,7 +152,7 @@ fmgr_c(FmgrInfo *finfo,
                 finfo->fn_oid, n_arguments, MAXFMGRARGS);
            break;
    }
-   return (returnValue);
+   return returnValue;
 }
 
 void
@@ -283,7 +283,7 @@ fmgr(Oid procedureId,...)
    va_end(pvar);
 
    /* XXX see WAY_COOL_ORTHOGONAL_FUNCTIONS */
-   return (fmgr_c(&finfo, &values, &isNull));
+   return fmgr_c(&finfo, &values, &isNull);
 }
 
 /*
@@ -323,7 +323,7 @@ fmgr_ptr(FmgrInfo *finfo,...)
    va_end(pvar);
 
    /* XXX see WAY_COOL_ORTHOGONAL_FUNCTIONS */
-   return (fmgr_c(&local_finfo, &values, &isNull));
+   return fmgr_c(&local_finfo, &values, &isNull);
 }
 
 #endif
index 07afdc3954ea53a1636e939186ef1ca923f0f51a..42de36b39b17651647e1a49b54f3a32fdfc79530 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/hash/dynahash.c,v 1.14 1998/06/15 19:29:46 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/hash/dynahash.c,v 1.15 1998/09/01 03:26:45 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -183,7 +183,7 @@ hash_create(int nelem, HASHCTL *info, int flags)
 
        /* hash table already exists, we're just attaching to it */
        if (flags & HASH_ATTACH)
-           return (hashp);
+           return hashp;
 
    }
    else
@@ -200,11 +200,11 @@ hash_create(int nelem, HASHCTL *info, int flags)
    {
        hashp->hctl = (HHDR *) hashp->alloc((unsigned long) sizeof(HHDR));
        if (!hashp->hctl)
-           return (0);
+           return 0;
    }
 
    if (!hdefault(hashp))
-       return (0);
+       return 0;
    hctl = hashp->hctl;
 #ifdef HASH_STATISTICS
    hctl->accesses = hctl->collisions = 0;
@@ -248,9 +248,9 @@ hash_create(int nelem, HASHCTL *info, int flags)
    if (init_htab(hashp, nelem))
    {
        hash_destroy(hashp);
-       return (0);
+       return 0;
    }
-   return (hashp);
+   return hashp;
 }
 
 /*
@@ -285,7 +285,7 @@ hdefault(HTAB *hashp)
    /* garbage collection for HASH_REMOVE */
    hctl->freeBucketIndex = INVALID_INDEX;
 
-   return (1);
+   return 1;
 }
 
 
@@ -332,7 +332,7 @@ init_htab(HTAB *hashp, int nelem)
        hashp->dir =
            (SEG_OFFSET *) hashp->alloc(hctl->dsize * sizeof(SEG_OFFSET));
        if (!hashp->dir)
-           return (-1);
+           return -1;
    }
 
    /* Allocate initial segments */
@@ -342,7 +342,7 @@ init_htab(HTAB *hashp, int nelem)
        if (*segp == (SEG_OFFSET) 0)
        {
            hash_destroy(hashp);
-           return (0);
+           return 0;
        }
    }
 
@@ -362,7 +362,7 @@ init_htab(HTAB *hashp, int nelem)
            "NSEGS           ", hctl->nsegs,
            "NKEYS           ", hctl->nkeys);
 #endif
-   return (0);
+   return 0;
 }
 
 /********************** DESTROY ROUTINES ************************/
@@ -442,7 +442,7 @@ call_hash(HTAB *hashp, char *k, int len)
    if (bucket > hctl->max_bucket)
        bucket = bucket & hctl->low_mask;
 
-   return (bucket);
+   return bucket;
 }
 
 /*
@@ -539,7 +539,7 @@ hash_search(HTAB *hashp,
    {
        case HASH_ENTER:
            if (currIndex != INVALID_INDEX)
-               return (&(curr->key));
+               return &(curr->key);
            break;
        case HASH_REMOVE:
        case HASH_REMOVE_SAVED:
@@ -558,25 +558,25 @@ hash_search(HTAB *hashp,
                 * element, because someone else is going to reuse it the
                 * next time something is added to the table
                 */
-               return (&(curr->key));
+               return &(curr->key);
            }
-           return ((long *) TRUE);
+           return (long *) TRUE;
        case HASH_FIND:
            if (currIndex != INVALID_INDEX)
-               return (&(curr->key));
-           return ((long *) TRUE);
+               return &(curr->key);
+           return (long *) TRUE;
        case HASH_FIND_SAVE:
            if (currIndex != INVALID_INDEX)
            {
                saveState.currElem = curr;
                saveState.prevIndex = prevIndexPtr;
                saveState.currIndex = currIndex;
-               return (&(curr->key));
+               return &(curr->key);
            }
-           return ((long *) TRUE);
+           return (long *) TRUE;
        default:
            /* can't get here */
-           return (NULL);
+           return NULL;
    }
 
    /*
@@ -592,7 +592,7 @@ hash_search(HTAB *hashp,
 
        /* no free elements.  allocate another chunk of buckets */
        if (!bucket_alloc(hashp))
-           return (NULL);
+           return NULL;
        currIndex = hctl->freeBucketIndex;
    }
    Assert(currIndex != INVALID_INDEX);
@@ -624,9 +624,9 @@ hash_search(HTAB *hashp,
         * hash_stats("expanded table",hashp);
         */
        if (!expand_table(hashp))
-           return (NULL);
+           return NULL;
    }
-   return (&(curr->key));
+   return &(curr->key);
 }
 
 /*
@@ -654,7 +654,7 @@ hash_seq(HTAB *hashp)
         */
        curBucket = 0;
        curIndex = INVALID_INDEX;
-       return ((long *) NULL);
+       return (long *) NULL;
    }
 
    hctl = hashp->hctl;
@@ -666,7 +666,7 @@ hash_seq(HTAB *hashp)
            curIndex = curElem->next;
            if (curIndex == INVALID_INDEX)      /* end of this bucket */
                ++curBucket;
-           return (&(curElem->key));
+           return &(curElem->key);
        }
 
        /*
@@ -681,7 +681,7 @@ hash_seq(HTAB *hashp)
        segp = GET_SEG(hashp, segment_num);
        if (segp == NULL)
            /* this is probably an error */
-           return ((long *) NULL);
+           return (long *) NULL;
 
        /*
         * now find the right index into the segment for the first item in
@@ -697,7 +697,7 @@ hash_seq(HTAB *hashp)
            ++curBucket;
    }
 
-   return ((long *) TRUE);     /* out of buckets */
+   return (long *) TRUE;       /* out of buckets */
 }
 
 
@@ -738,7 +738,7 @@ expand_table(HTAB *hashp)
        if (new_segnum >= hctl->dsize)
            dir_realloc(hashp);
        if (!(hashp->dir[new_segnum] = seg_alloc(hashp)))
-           return (0);
+           return 0;
        hctl->nsegs++;
    }
 
@@ -782,7 +782,7 @@ expand_table(HTAB *hashp)
        }
        chain->next = INVALID_INDEX;
    }
-   return (1);
+   return 1;
 }
 
 
@@ -796,7 +796,7 @@ dir_realloc(HTAB *hashp)
 
 
    if (hashp->hctl->max_dsize != NO_MAX_DSIZE)
-       return (0);
+       return 0;
 
    /* Reallocate directory */
    old_dirsize = hashp->hctl->dsize * sizeof(SEGMENT *);
@@ -811,9 +811,9 @@ dir_realloc(HTAB *hashp)
        free((char *) *p_ptr);
        *p_ptr = p;
        hashp->hctl->dsize = new_dirsize;
-       return (1);
+       return 1;
    }
-   return (0);
+   return 0;
 
 }
 
@@ -829,13 +829,13 @@ seg_alloc(HTAB *hashp)
                                  sizeof(SEGMENT) * hashp->hctl->ssize);
 
    if (!segp)
-       return (0);
+       return 0;
 
    MemSet((char *) segp, 0,
           (long) sizeof(SEGMENT) * hashp->hctl->ssize);
 
    segOffset = MAKE_HASHOFFSET(hashp, segp);
-   return (segOffset);
+   return segOffset;
 }
 
 /*
@@ -863,7 +863,7 @@ bucket_alloc(HTAB *hashp)
        hashp->alloc((unsigned long) BUCKET_ALLOC_INCR * bucketSize);
 
    if (!tmpBucket)
-       return (0);
+       return 0;
 
    tmpIndex = MAKE_HASHOFFSET(hashp, tmpBucket);
 
@@ -885,7 +885,7 @@ bucket_alloc(HTAB *hashp)
     */
    tmpBucket->next = lastIndex;
 
-   return (1);
+   return 1;
 }
 
 /* calculate the log base 2 of num */
@@ -896,5 +896,5 @@ my_log2(long num)
    int         limit;
 
    for (i = 0, limit = 1; limit < num; limit = 2 * limit, i++);
-   return (i);
+   return i;
 }
index 6cf11d22bf62a429d5c198c3866923f06b2f58e8..3f3549b1656750e07af6aaf27d33a127dc86b1a0 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/hash/hashfn.c,v 1.7 1998/02/26 04:37:51 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/hash/hashfn.c,v 1.8 1998/09/01 03:26:47 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -36,7 +36,7 @@ string_hash(char *key, int keysize)
        h = h * PRIME1 ^ (*k++ - ' ');
    h %= PRIME2;
 
-   return (h);
+   return h;
 }
 
 
@@ -114,7 +114,7 @@ tag_hash(int *key, int keysize)
    }
 
    h %= PRIME2;
-   return (h);
+   return h;
 }
 
 /*
@@ -165,7 +165,7 @@ disk_hash(char *key)
        }
 
    }
-   return (n);
+   return n;
 }
 
 #endif
index 1c27a0dc48990d86fcf6a4a98d820afe42de4b30..7312c4fa7087f1ebb17307761ce32cf4d549f717 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/enbl.c,v 1.3 1998/08/25 21:04:40 scrappy Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/enbl.c,v 1.4 1998/09/01 03:26:49 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -35,12 +35,12 @@ BypassEnable(int *enableCountInOutP, bool on)
    if (on)
    {
        *enableCountInOutP += 1;
-       return ((bool) (*enableCountInOutP >= 2));
+       return (bool) (*enableCountInOutP >= 2);
    }
 
    AssertState(*enableCountInOutP >= 1);
 
    *enableCountInOutP -= 1;
 
-   return ((bool) (*enableCountInOutP >= 1));
+   return (bool) (*enableCountInOutP >= 1);
 }
index 06d6c7a5ef17348ffffc2e190eb6ce89ff8c2b53..115c21e2f7dd3fa2d4c79dc5db8ed2a6249519a6 100644 (file)
@@ -6,7 +6,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/findbe.c,v 1.10 1998/06/15 19:29:47 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/findbe.c,v 1.11 1998/09/01 03:26:51 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -63,7 +63,7 @@ ValidateBinary(char *path)
        if (DebugLvl > 1)
            fprintf(stderr, "ValidateBinary: pathname \"%s\" is too long\n",
                    path);
-       return (-1);
+       return -1;
    }
 
    if (stat(path, &buf) < 0)
@@ -71,14 +71,14 @@ ValidateBinary(char *path)
        if (DebugLvl > 1)
            fprintf(stderr, "ValidateBinary: can't stat \"%s\"\n",
                    path);
-       return (-1);
+       return -1;
    }
    if (!(buf.st_mode & S_IFREG))
    {
        if (DebugLvl > 1)
            fprintf(stderr, "ValidateBinary: \"%s\" is not a regular file\n",
                    path);
-       return (-1);
+       return -1;
    }
 
    /*
@@ -104,7 +104,7 @@ ValidateBinary(char *path)
        if (DebugLvl > 1 && !(is_r && is_x))
            fprintf(stderr, "ValidateBinary: \"%s\" is not user read/execute\n",
                    path);
-       return (is_x ? (is_r ? 0 : -2) : -1);
+       return is_x ? (is_r ? 0 : -2) : -1;
    }
    pwp = getpwuid(euid);
    if (pwp)
@@ -130,7 +130,7 @@ ValidateBinary(char *path)
            if (DebugLvl > 1 && !(is_r && is_x))
                fprintf(stderr, "ValidateBinary: \"%s\" is not group read/execute\n",
                        path);
-           return (is_x ? (is_r ? 0 : -2) : -1);
+           return is_x ? (is_r ? 0 : -2) : -1;
        }
    }
    is_r = buf.st_mode & S_IROTH;
@@ -138,7 +138,7 @@ ValidateBinary(char *path)
    if (DebugLvl > 1 && !(is_r && is_x))
        fprintf(stderr, "ValidateBinary: \"%s\" is not other read/execute\n",
                path);
-   return (is_x ? (is_r ? 0 : -2) : -1);
+   return is_x ? (is_r ? 0 : -2) : -1;
 }
 
 /*
@@ -189,11 +189,11 @@ FindExec(char *full_path, char *argv0, char *binary_name)
            if (DebugLvl)
                fprintf(stderr, "FindExec: found \"%s\" using argv[0]\n",
                        full_path);
-           return (0);
+           return 0;
        }
        fprintf(stderr, "FindExec: invalid binary \"%s\"\n",
                buf);
-       return (-1);
+       return -1;
    }
 
    /*
@@ -228,14 +228,14 @@ FindExec(char *full_path, char *argv0, char *binary_name)
                        fprintf(stderr, "FindExec: found \"%s\" using PATH\n",
                                full_path);
                    free(path);
-                   return (0);
+                   return 0;
                case -1:        /* wasn't even a candidate, keep looking */
                    break;
                case -2:        /* found but disqualified */
                    fprintf(stderr, "FindExec: could not read binary \"%s\"\n",
                            buf);
                    free(path);
-                   return (-1);
+                   return -1;
            }
            if (!endp)          /* last one */
                break;
@@ -244,5 +244,5 @@ FindExec(char *full_path, char *argv0, char *binary_name)
    }
 
    fprintf(stderr, "FindExec: could not find a %s to execute...\n", binary_name);
-   return (-1);
+   return -1;
 }
index 1a3d4bc8506156da284b0733324ce702062fdaa9..5910655515765cf7a12419f5119c16b8c60c3d05 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.20 1998/08/19 02:03:19 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.21 1998/09/01 03:26:53 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -152,7 +152,7 @@ static ProcessingMode Mode = NoProcessing;
 bool
 IsNoProcessingMode()
 {
-   return ((bool) (Mode == NoProcessing));
+   return (bool) (Mode == NoProcessing);
 }
 
 /*
@@ -162,7 +162,7 @@ IsNoProcessingMode()
 bool
 IsBootstrapProcessingMode()
 {
-   return ((bool) (Mode == BootstrapProcessing));
+   return (bool) (Mode == BootstrapProcessing);
 }
 
 /*
@@ -172,7 +172,7 @@ IsBootstrapProcessingMode()
 bool
 IsInitProcessingMode()
 {
-   return ((bool) (Mode == InitProcessing));
+   return (bool) (Mode == InitProcessing);
 }
 
 /*
@@ -182,7 +182,7 @@ IsInitProcessingMode()
 bool
 IsNormalProcessingMode()
 {
-   return ((bool) (Mode == NormalProcessing));
+   return (bool) (Mode == NormalProcessing);
 }
 
 /*
@@ -207,7 +207,7 @@ SetProcessingMode(ProcessingMode mode)
 ProcessingMode
 GetProcessingMode()
 {
-   return (Mode);
+   return Mode;
 }
 
 /* ----------------------------------------------------------------
@@ -255,7 +255,7 @@ getdatabaseencoding()
 static bool
 isblank(const char c)
 {
-   return (c == ' ' || c == 9 /* tab */ );
+   return c == ' ' || c == 9 /* tab */ ;
 }
 
 static void
@@ -446,7 +446,7 @@ int
 GetUserId()
 {
    Assert(OidIsValid(UserId));
-   return (UserId);
+   return UserId;
 }
 
 void
index e1ff89d3c04e066a889111382fa178e4859c81ce..fe2967876f032d87e4baad120659e97f8f6b652d 100644 (file)
@@ -43,6 +43,6 @@ pg_char_and_wchar_strcmp(s1, s2)
 {
    while ((pg_wchar)*s1 == *s2++)
        if (*s1++ == 0)
-           return (0);
-   return (*(const unsigned char *)s1 - *(const pg_wchar *)(s2 - 1));
+           return 0;
+   return *(const unsigned char *)s1 - *(const pg_wchar *)(s2 - 1);
 }
index 6c42a7604d8204ca9b87dd0e3d4134293e65595b..368e39b52e5f093c9224b1754bada226d33cdaad 100644 (file)
@@ -42,7 +42,7 @@ pg_wchar_strncmp(s1, s2, n)
 {
 
    if (n == 0)
-       return (0);
+       return 0;
    do {
        if (*s1 != *s2++)
            return (*(const pg_wchar *)s1 -
@@ -50,7 +50,7 @@ pg_wchar_strncmp(s1, s2, n)
        if (*s1++ == 0)
            break;
    } while (--n != 0);
-   return (0);
+   return 0;
 }
 
 int
@@ -61,7 +61,7 @@ pg_char_and_wchar_strncmp(s1, s2, n)
 {
 
    if (n == 0)
-       return (0);
+       return 0;
    do {
        if ((pg_wchar )*s1 != *s2++)
            return (*(const pg_wchar *)s1 -
@@ -69,7 +69,7 @@ pg_char_and_wchar_strncmp(s1, s2, n)
        if (*s1++ == 0)
            break;
    } while (--n != 0);
-   return (0);
+   return 0;
 }
 
 size_t
index 192737c20192f5206c6be529ca848cdb656f53f0..3dd61b8e9c497391d7f1e671ec021980ec5ae62d 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/misc/Attic/database.c,v 1.17 1998/08/24 01:14:02 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/misc/Attic/database.c,v 1.18 1998/09/01 03:26:58 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -85,13 +85,13 @@ GetDatabaseInfo(char *name, int4 *owner, char *path)
 
    dbowner = (Oid) heap_getattr(dbtup,
                                 Anum_pg_database_datdba,
-                                RelationGetTupleDescriptor(dbrel),
+                                RelationGetDescr(dbrel),
                                 (char *) NULL);
    dbid = dbtup->t_oid;
 
    dbtext = (text *) heap_getattr(dbtup,
                                   Anum_pg_database_datpath,
-                                  RelationGetTupleDescriptor(dbrel),
+                                  RelationGetDescr(dbrel),
                                   (char *) NULL);
 
    memcpy(dbpath, VARDATA(dbtext), (VARSIZE(dbtext) - VARHDRSZ));
index 5de78307f665c1beaa242a39f1dee0cbe36207c9..aa735d05b5375382d5f8823f212a8f5401c785b9 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/mmgr/aset.c,v 1.9 1998/06/15 19:29:51 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/mmgr/aset.c,v 1.10 1998/09/01 03:27:02 momjian Exp $
  *
  * NOTE
  *   XXX This is a preliminary implementation which lacks fail-fast
@@ -193,7 +193,7 @@ AllocSetAlloc(AllocSet set, Size size)
    /* set size */
    alloc->size = size;
 
-   return (AllocElemGetAllocPointer(alloc));
+   return AllocElemGetAllocPointer(alloc);
 }
 
 /*
@@ -262,7 +262,7 @@ AllocSetRealloc(AllocSet set, AllocPointer pointer, Size size)
    /* free old pointer */
    AllocSetFree(set, pointer);
 
-   return (newPointer);
+   return newPointer;
 }
 
 /*
@@ -296,7 +296,7 @@ AllocSetIterate(AllocSet set,
        count += 1;
    }
 
-   return (count);
+   return count;
 }
 
 #ifdef NOT_USED
@@ -336,9 +336,9 @@ AllocSetGetFirst(AllocSet set)
    alloc = (AllocElem) OrderedSetGetHead(&set->setData);
 
    if (!AllocElemIsValid(alloc))
-       return (NULL);
+       return NULL;
 
-   return (AllocElemGetAllocPointer(alloc));
+   return AllocElemGetAllocPointer(alloc);
 }
 
 /*
@@ -357,9 +357,9 @@ AllocPointerGetNext(AllocPointer pointer)
        OrderedElemGetSuccessor(&AllocPointerGetAllocElem(pointer)->elemData);
 
    if (!AllocElemIsValid(alloc))
-       return (NULL);
+       return NULL;
 
-   return (AllocElemGetAllocPointer(alloc));
+   return AllocElemGetAllocPointer(alloc);
 }
 
 
index dbe9b65fb916d125ea52b82ff65acd2871bc3b69..d8ee25627b9047c926d07a3cef869af2fb6d7400 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/mmgr/mcxt.c,v 1.8 1998/06/15 19:29:52 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/mmgr/mcxt.c,v 1.9 1998/09/01 03:27:03 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -227,7 +227,7 @@ MemoryContextAlloc(MemoryContext context, Size size)
    LogTrap(!AllocSizeIsValid(size), BadAllocSize,
            ("size=%d [0x%x]", size, size));
 
-   return (context->method->alloc(context, size));
+   return context->method->alloc(context, size);
 }
 
 /*
@@ -274,7 +274,7 @@ MemoryContextRealloc(MemoryContext context,
    LogTrap(!AllocSizeIsValid(size), BadAllocSize,
            ("size=%d [0x%x]", size, size));
 
-   return (context->method->realloc(context, pointer, size));
+   return context->method->realloc(context, pointer, size);
 }
 
 /*
@@ -295,7 +295,7 @@ MemoryContextGetName(MemoryContext context)
    AssertState(MemoryContextEnabled);
    AssertArg(MemoryContextIsValid(context));
 
-   return (context->method->getName(context));
+   return context->method->getName(context);
 }
 
 #endif
@@ -318,7 +318,7 @@ PointerGetAllocSize(Pointer pointer)
    AssertState(MemoryContextEnabled);
    AssertArg(PointerIsValid(pointer));
 
-   return (PSIZE(pointer));
+   return PSIZE(pointer);
 }
 
 #endif
@@ -344,7 +344,7 @@ MemoryContextSwitchTo(MemoryContext context)
 
    old = CurrentMemoryContext;
    CurrentMemoryContext = context;
-   return (old);
+   return old;
 }
 
 /*
@@ -381,7 +381,7 @@ CreateGlobalMemory(char *name)  /* XXX MemoryContextName */
    OrderedElemPushInto(&context->elemData, ActiveGlobalMemorySet);
 
    MemoryContextSwitchTo(savecxt);
-   return (context);
+   return context;
 }
 
 /*
@@ -422,7 +422,7 @@ GlobalMemoryDestroy(GlobalMemory context)
 static Pointer
 GlobalMemoryAlloc(GlobalMemory this, Size size)
 {
-   return (AllocSetAlloc(&this->setData, size));
+   return AllocSetAlloc(&this->setData, size);
 }
 
 /*
@@ -457,7 +457,7 @@ GlobalMemoryRealloc(GlobalMemory this,
                    Pointer pointer,
                    Size size)
 {
-   return (AllocSetRealloc(&this->setData, pointer, size));
+   return AllocSetRealloc(&this->setData, pointer, size);
 }
 
 /*
@@ -470,7 +470,7 @@ GlobalMemoryRealloc(GlobalMemory this,
 static char *
 GlobalMemoryGetName(GlobalMemory this)
 {
-   return (this->name);
+   return this->name;
 }
 
 /*
index 810964e94dd337cb608beb091811cb7b27be64bd..79c7dbe4f1473f95e8167d94f16f401fd6a07347 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/mmgr/Attic/oset.c,v 1.8 1998/06/15 19:29:53 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/mmgr/Attic/oset.c,v 1.9 1998/09/01 03:27:05 momjian Exp $
  *
  * NOTE
  *   XXX This is a preliminary implementation which lacks fail-fast
@@ -33,7 +33,7 @@ OrderedElemGetBase(OrderedElem elem)
    if (elem == (OrderedElem) NULL)
        return (Pointer) NULL;
 
-   return ((Pointer) ((char *) (elem) - (elem)->set->offset));
+   return (Pointer) ((char *) (elem) - (elem)->set->offset);
 }
 
 /*
@@ -55,7 +55,7 @@ OrderedSetInit(OrderedSet set, Offset offset)
 bool
 OrderedSetContains(OrderedSet set, OrderedElem elem)
 {
-   return ((bool) (elem->set == set && (elem->next || elem->prev)));
+   return (bool) (elem->set == set && (elem->next || elem->prev));
 }
 
 /*
@@ -68,8 +68,8 @@ OrderedSetGetHead(OrderedSet set)
 
    elem = set->head;
    if (elem->next)
-       return (OrderedElemGetBase(elem));
-   return (NULL);
+       return OrderedElemGetBase(elem);
+   return NULL;
 }
 
 /*
@@ -83,8 +83,8 @@ OrderedSetGetTail(OrderedSet set)
 
    elem = set->tail;
    if (elem->prev)
-       return (OrderedElemGetBase(elem));
-   return (NULL);
+       return OrderedElemGetBase(elem);
+   return NULL;
 }
 
 #endif
@@ -97,8 +97,8 @@ OrderedElemGetPredecessor(OrderedElem elem)
 {
    elem = elem->prev;
    if (elem->prev)
-       return (OrderedElemGetBase(elem));
-   return (NULL);
+       return OrderedElemGetBase(elem);
+   return NULL;
 }
 
 /*
@@ -109,8 +109,8 @@ OrderedElemGetSuccessor(OrderedElem elem)
 {
    elem = elem->next;
    if (elem->next)
-       return (OrderedElemGetBase(elem));
-   return (NULL);
+       return OrderedElemGetBase(elem);
+   return NULL;
 }
 
 /*
index e4d822156f2c6b068c786e79dced831d264b9a51..7a9aff1353bc364dc03aca0e8370e1f558aecec4 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/mmgr/Attic/palloc.c,v 1.6 1998/02/26 04:38:22 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/mmgr/Attic/palloc.c,v 1.7 1998/09/01 03:27:06 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -66,7 +66,7 @@ palloc(Size size)
 #ifdef PALLOC_IS_MALLOC
    return malloc(size);
 #else
-   return (MemoryContextAlloc(CurrentMemoryContext, size));
+   return MemoryContextAlloc(CurrentMemoryContext, size);
 #endif                         /* PALLOC_IS_MALLOC */
 }
 
@@ -100,7 +100,7 @@ repalloc(void *pointer, Size size)
 #ifdef PALLOC_IS_MALLOC
    return realloc(pointer, size);
 #else
-   return (MemoryContextRealloc(CurrentMemoryContext, pointer, size));
+   return MemoryContextRealloc(CurrentMemoryContext, pointer, size);
 #endif
 }
 
index b910696ea469c73f10827918ff7be1d4e50dde0e..cad7cb498776d759f22b54c766520db54a182b16 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.12 1998/06/15 19:29:53 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.13 1998/09/01 03:27:08 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -201,7 +201,7 @@ static Pointer
 PortalVariableMemoryAlloc(PortalVariableMemory this,
                          Size size)
 {
-   return (AllocSetAlloc(&this->setData, size));
+   return AllocSetAlloc(&this->setData, size);
 }
 
 /* ----------------
@@ -224,7 +224,7 @@ PortalVariableMemoryRealloc(PortalVariableMemory this,
                            Pointer pointer,
                            Size size)
 {
-   return (AllocSetRealloc(&this->setData, pointer, size));
+   return AllocSetRealloc(&this->setData, pointer, size);
 }
 
 /* ----------------
@@ -234,7 +234,7 @@ PortalVariableMemoryRealloc(PortalVariableMemory this,
 static char *
 PortalVariableMemoryGetName(PortalVariableMemory this)
 {
-   return (form("%s-var", PortalVariableMemoryGetPortal(this)->name));
+   return form("%s-var", PortalVariableMemoryGetPortal(this)->name);
 }
 
 /* ----------------
@@ -261,7 +261,7 @@ PortalHeapMemoryAlloc(PortalHeapMemory this,
 
    AssertState(PointerIsValid(block));
 
-   return (AllocSetAlloc(&block->setData, size));
+   return AllocSetAlloc(&block->setData, size);
 }
 
 /* ----------------
@@ -302,7 +302,7 @@ PortalHeapMemoryRealloc(PortalHeapMemory this,
 
    AssertState(PointerIsValid(block));
 
-   return (AllocSetRealloc(&block->setData, pointer, size));
+   return AllocSetRealloc(&block->setData, pointer, size);
 }
 
 /* ----------------
@@ -312,7 +312,7 @@ PortalHeapMemoryRealloc(PortalHeapMemory this,
 static char *
 PortalHeapMemoryGetName(PortalHeapMemory this)
 {
-   return (form("%s-heap", PortalHeapMemoryGetPortal(this)->name));
+   return form("%s-heap", PortalHeapMemoryGetPortal(this)->name);
 }
 
 /* ----------------
@@ -602,7 +602,7 @@ GetPortalByName(char *name)
        portal = BlankPortal;
    }
 
-   return (portal);
+   return portal;
 }
 
 /*
@@ -632,7 +632,7 @@ BlankPortalAssignName(char *name)       /* XXX PortalName */
    if (PortalIsValid(portal))
    {
        elog(NOTICE, "BlankPortalAssignName: portal %s already exists", name);
-       return (portal);
+       return portal;
    }
 
    /*
@@ -655,7 +655,7 @@ BlankPortalAssignName(char *name)       /* XXX PortalName */
     */
    PortalHashTableInsert(portal);
 
-   return (portal);
+   return portal;
 }
 
 /*
@@ -699,7 +699,7 @@ PortalGetQueryDesc(Portal portal)
    AssertState(PortalManagerEnabled);
    AssertArg(PortalIsValid(portal));
 
-   return (portal->queryDesc);
+   return portal->queryDesc;
 }
 
 /*
@@ -716,7 +716,7 @@ PortalGetState(Portal portal)
    AssertState(PortalManagerEnabled);
    AssertArg(PortalIsValid(portal));
 
-   return (portal->state);
+   return portal->state;
 }
 
 /*
@@ -745,7 +745,7 @@ CreatePortal(char *name)        /* XXX PortalName */
    if (PortalIsValid(portal))
    {
        elog(NOTICE, "CreatePortal: portal %s already exists", name);
-       return (portal);
+       return portal;
    }
 
    /* make new portal structure */
@@ -780,7 +780,7 @@ CreatePortal(char *name)        /* XXX PortalName */
    PortalHashTableInsert(portal);
 
    /* Trap(PointerIsValid(name), Unimplemented); */
-   return (portal);
+   return portal;
 }
 
 /*
@@ -936,7 +936,7 @@ EndPortalAllocMode()
 PortalVariableMemory
 PortalGetVariableMemory(Portal portal)
 {
-   return (&portal->variable);
+   return &portal->variable;
 }
 
 /*
@@ -950,7 +950,7 @@ PortalGetVariableMemory(Portal portal)
 PortalHeapMemory
 PortalGetHeapMemory(Portal portal)
 {
-   return (&portal->heap);
+   return &portal->heap;
 }
 
 /*
@@ -964,7 +964,7 @@ PortalGetHeapMemory(Portal portal)
 static Portal
 PortalVariableMemoryGetPortal(PortalVariableMemory context)
 {
-   return ((Portal) ((char *) context - offsetof(PortalD, variable)));
+   return (Portal) ((char *) context - offsetof(PortalD, variable));
 }
 
 /*
@@ -978,7 +978,7 @@ PortalVariableMemoryGetPortal(PortalVariableMemory context)
 static Portal
 PortalHeapMemoryGetPortal(PortalHeapMemory context)
 {
-   return ((Portal) ((char *) context - offsetof(PortalD, heap)));
+   return (Portal) ((char *) context - offsetof(PortalD, heap));
 }
 
 /*
index 527ecd198f94d51ff8f8989e1121aeadd9db546d..40caaf3631e00fccc7e7ac3bdadec259daa567b5 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/sort/Attic/lselect.c,v 1.13 1998/02/26 04:38:25 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/sort/Attic/lselect.c,v 1.14 1998/09/01 03:27:11 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -70,7 +70,7 @@ lmerge(struct leftist * pt, struct leftist * qt, LeftistContext context)
            root->lt_right = majorLeftist;
        }
    }
-   return (root);
+   return root;
 }
 
 static struct leftist *
@@ -82,7 +82,7 @@ linsert(struct leftist * root, struct leftist * new1, LeftistContext context)
    if (!tuplecmp(root->lt_tuple, new1->lt_tuple, context))
    {
        new1->lt_left = root;
-       return (new1);
+       return new1;
    }
    left = root->lt_left;
    right = root->lt_right;
@@ -95,7 +95,7 @@ linsert(struct leftist * root, struct leftist * new1, LeftistContext context)
            root->lt_right = new1;
            root->lt_dist = 2;
        }
-       return (root);
+       return root;
    }
    right = linsert(right, new1, context);
    if (right->lt_dist < left->lt_dist)
@@ -109,7 +109,7 @@ linsert(struct leftist * root, struct leftist * new1, LeftistContext context)
        root->lt_dist = 1 + right->lt_dist;
        root->lt_right = right;
    }
-   return (root);
+   return root;
 }
 
 /*
@@ -141,7 +141,7 @@ gettuple(struct leftist ** treep,
        *treep = lmerge(tp->lt_left, tp->lt_right, context);
 
    pfree(tp);
-   return (tup);
+   return tup;
 }
 
 /*
@@ -193,22 +193,22 @@ tuplecmp(HeapTuple ltup, HeapTuple rtup, LeftistContext context)
    bool        isnull;
 
    if (ltup == (HeapTuple) NULL)
-       return (0);
+       return 0;
    if (rtup == (HeapTuple) NULL)
-       return (1);
+       return 1;
    while (nkey < context->nKeys && !result)
    {
        lattr = heap_getattr(ltup,
                             context->scanKeys[nkey].sk_attno,
                             context->tupDesc, &isnull);
        if (isnull)
-           return (0);
+           return 0;
        rattr = heap_getattr(rtup,
                             context->scanKeys[nkey].sk_attno,
                             context->tupDesc,
                             &isnull);
        if (isnull)
-           return (1);
+           return 1;
        if (context->scanKeys[nkey].sk_flags & SK_COMMUTE)
        {
            if (!(result =
@@ -222,7 +222,7 @@ tuplecmp(HeapTuple ltup, HeapTuple rtup, LeftistContext context)
                -(long) (*fmgr_faddr(&context->scanKeys[nkey].sk_func)) (rattr, lattr);
        nkey++;
    }
-   return (result == 1);
+   return result == 1;
 }
 
 #ifdef EBUG
@@ -286,7 +286,7 @@ checktreer(struct leftist * tree, int level, LeftistContext context)
    int         error = 0;
 
    if (tree == NULL)
-       return (0);
+       return 0;
    lnodes = checktreer(tree->lt_left, level + 1, context);
    rnodes = checktreer(tree->lt_right, level + 1, context);
    if (lnodes < 0)
@@ -347,8 +347,8 @@ checktreer(struct leftist * tree, int level, LeftistContext context)
            printf("%d:\tRight child < parent.\n");
        }
    if (error)
-       return (-1 + -lnodes + -rnodes);
-   return (1 + lnodes + rnodes);
+       return -1 + -lnodes + -rnodes;
+   return 1 + lnodes + rnodes;
 }
 
 #endif
index 88890556bed44ef9cfb8f990be3c839074f10bac..9a1271ea5096ae3d4a50bb7ccd405690cd140238 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/sort/Attic/psort.c,v 1.41 1998/06/15 19:29:54 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/sort/Attic/psort.c,v 1.42 1998/09/01 03:27:13 momjian Exp $
  *
  * NOTES
  *     Sorts the first relation into the second relation.
@@ -428,7 +428,7 @@ createfirstrun(Sort *node)
    {
        Assert(foundeor);
        pfree(memtuples);
-       return (false);
+       return false;
    }
    t_last++;
    PS(node)->tupcount = t_last;
@@ -456,7 +456,7 @@ createfirstrun(Sort *node)
        PS(node)->memtuples = memtuples;
    }
 
-   return (!foundeor);
+   return !foundeor;
 }
 
 /*
@@ -574,7 +574,7 @@ createrun(Sort *node, FILE *file)
 
    pfree(memtuples);
 
-   return (!foundeor);
+   return !foundeor;
 }
 
 /*
@@ -590,11 +590,11 @@ tuplecopy(HeapTuple tup)
 
    if (!HeapTupleIsValid(tup))
    {
-       return (NULL);          /* just in case */
+       return NULL;            /* just in case */
    }
    rettup = (HeapTuple) palloc(tup->t_len);
    memmove((char *) rettup, (char *) tup, tup->t_len); /* XXX */
-   return (rettup);
+   return rettup;
 }
 
 /*
@@ -624,7 +624,7 @@ mergeruns(Sort *node)
        merge(node, tp);
        rewind(tp->tp_file);
    }
-   return (tp->tp_file);
+   return tp->tp_file;
 }
 
 /*
@@ -875,7 +875,7 @@ psort_grabtuple(Sort *node, bool *should_free)
        if (ScanDirectionIsForward(node->plan.state->es_direction))
        {
            if (PS(node)->psort_current < PS(node)->tupcount)
-               return (PS(node)->memtuples[PS(node)->psort_current++]);
+               return PS(node)->memtuples[PS(node)->psort_current++];
            else
            {
                PS(node)->all_fetched = true;
@@ -898,7 +898,7 @@ psort_grabtuple(Sort *node, bool *should_free)
            if (PS(node)->psort_current <= 0)
                return NULL;
        }
-       return (PS(node)->memtuples[PS(node)->psort_current - 1]);
+       return PS(node)->memtuples[PS(node)->psort_current - 1];
    }
 }
 
@@ -1049,7 +1049,7 @@ gettape()
    tp->tl_fd = fileno(file);
    tp->tl_next = Tapes;
    Tapes = tp;
-   return (file);
+   return file;
 }
 
 /*
@@ -1159,5 +1159,5 @@ _psort_cmp(HeapTuple *ltup, HeapTuple *rtup)
        else if (!(result = -(long) (*fmgr_faddr(&PsortKeys[nkey].sk_func)) (lattr, rattr)))
            result = (long) (*fmgr_faddr(&PsortKeys[nkey].sk_func)) (rattr, lattr);
    }
-   return (result);
+   return result;
 }
index 6c08bd355f12433bb2dbb828ea52b15a8ec4b2ba..1724ad2de5376490b6249fa3c738ac403d85090b 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/time/tqual.c,v 1.17 1998/08/19 02:03:28 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/time/tqual.c,v 1.18 1998/09/01 03:27:16 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -82,21 +82,21 @@ HeapTupleSatisfiesItself(HeapTuple tuple)
    {
        if (tuple->t_infomask & HEAP_XMIN_INVALID)      /* xid invalid or
                                                         * aborted */
-           return (false);
+           return false;
 
        if (TransactionIdIsCurrentTransactionId(tuple->t_xmin))
        {
            if (tuple->t_infomask & HEAP_XMAX_INVALID)  /* xid invalid */
-               return (true);
+               return true;
            else
-               return (false);
+               return false;
        }
 
        if (!TransactionIdDidCommit(tuple->t_xmin))
        {
            if (TransactionIdDidAbort(tuple->t_xmin))
                tuple->t_infomask |= HEAP_XMIN_INVALID; /* aborted */
-           return (false);
+           return false;
        }
 
        tuple->t_infomask |= HEAP_XMIN_COMMITTED;
@@ -104,25 +104,25 @@ HeapTupleSatisfiesItself(HeapTuple tuple)
    /* the tuple was inserted validly */
 
    if (tuple->t_infomask & HEAP_XMAX_INVALID)  /* xid invalid or aborted */
-       return (true);
+       return true;
 
    if (tuple->t_infomask & HEAP_XMAX_COMMITTED)
-       return (false);
+       return false;
 
    if (TransactionIdIsCurrentTransactionId(tuple->t_xmax))
-       return (false);
+       return false;
 
    if (!TransactionIdDidCommit(tuple->t_xmax))
    {
        if (TransactionIdDidAbort(tuple->t_xmax))
            tuple->t_infomask |= HEAP_XMAX_INVALID;     /* aborted */
-       return (true);
+       return true;
    }
 
    /* by here, deleting transaction has committed */
    tuple->t_infomask |= HEAP_XMAX_COMMITTED;
 
-   return (false);
+   return false;
 }
 
 /*
@@ -191,22 +191,22 @@ HeapTupleSatisfiesNow(HeapTuple tuple)
    {
        if (tuple->t_infomask & HEAP_XMIN_INVALID)      /* xid invalid or
                                                         * aborted */
-           return (false);
+           return false;
 
        if (TransactionIdIsCurrentTransactionId(tuple->t_xmin))
        {
            if (CommandIdGEScanCommandId(tuple->t_cmin))
-               return (false); /* inserted after scan started */
+               return false; /* inserted after scan started */
 
            if (tuple->t_infomask & HEAP_XMAX_INVALID)  /* xid invalid */
-               return (true);
+               return true;
 
            Assert(TransactionIdIsCurrentTransactionId(tuple->t_xmax));
 
            if (CommandIdGEScanCommandId(tuple->t_cmax))
-               return (true);  /* deleted after scan started */
+               return true;    /* deleted after scan started */
            else
-               return (false); /* deleted before scan started */
+               return false; /* deleted before scan started */
        }
 
        /*
@@ -217,7 +217,7 @@ HeapTupleSatisfiesNow(HeapTuple tuple)
        {
            if (TransactionIdDidAbort(tuple->t_xmin))
                tuple->t_infomask |= HEAP_XMIN_INVALID; /* aborted */
-           return (false);
+           return false;
        }
 
        tuple->t_infomask |= HEAP_XMIN_COMMITTED;
@@ -226,28 +226,28 @@ HeapTupleSatisfiesNow(HeapTuple tuple)
    /* by here, the inserting transaction has committed */
 
    if (tuple->t_infomask & HEAP_XMAX_INVALID)  /* xid invalid or aborted */
-       return (true);
+       return true;
 
    if (tuple->t_infomask & HEAP_XMAX_COMMITTED)
-       return (false);
+       return false;
 
    if (TransactionIdIsCurrentTransactionId(tuple->t_xmax))
    {
        if (CommandIdGEScanCommandId(tuple->t_cmax))
-           return (true);      /* deleted after scan started */
+           return true;        /* deleted after scan started */
        else
-           return (false);     /* deleted before scan started */
+           return false;       /* deleted before scan started */
    }
 
    if (!TransactionIdDidCommit(tuple->t_xmax))
    {
        if (TransactionIdDidAbort(tuple->t_xmax))
            tuple->t_infomask |= HEAP_XMAX_INVALID;     /* aborted */
-       return (true);
+       return true;
    }
 
    /* xmax transaction committed */
    tuple->t_infomask |= HEAP_XMAX_COMMITTED;
 
-   return (false);
+   return false;
 }
index d84ac0aa5ecbbcddbdac2c40baef7e378cf596b1..2797ce766188f7632bfcb172a7417300e862583d 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.22 1998/06/19 02:55:13 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.23 1998/09/01 03:27:19 momjian Exp $
  *
  * Modifications - 6/12/96 - [email protected] - version 1.13.dhb.2
  *
@@ -490,5 +490,5 @@ fmtId(const char *rawid)
    }
    else
        cp = rawid;
-   return (cp);
+   return cp;
 }  /* fmtId() */
index e6b448feaeffcd1a3c3ead524e8c40b7da2e184f..5d29197c7ba1e8998591d76ec59b649f59cb53e0 100644 (file)
@@ -21,7 +21,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.81 1998/08/29 18:06:57 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.82 1998/09/01 03:27:21 momjian Exp $
  *
  * Modifications - 6/10/96 - [email protected] - version 1.13.dhb
  *
@@ -409,7 +409,7 @@ dumpClasses_dumpData(FILE *fout, const char *classname,
  *   dump the contents of all the classes.
  */
 static void
-dumpClasses(const TableInfo tblinfo[], const int numTables, FILE *fout,
+dumpClasses(const TableInfo *tblinfo, const int numTables, FILE *fout,
            const char *onlytable, const bool oids)
 {
 
@@ -2270,12 +2270,12 @@ AddAcl(char *s, const char *add)
    char       *t;
 
    if (s == (char *) NULL)
-       return (strdup(add));
+       return strdup(add);
 
    t = (char *) calloc((strlen(s) + strlen(add) + 1), sizeof(char));
    sprintf(t, "%s,%s", s, add);
 
-   return (t);
+   return t;
 }
 
 /*
@@ -2294,7 +2294,7 @@ GetPrivledges(char *s)
    /* RULE          == R   */
 
    if (strstr(s, "arwR"))
-       return (strdup("ALL"));
+       return strdup("ALL");
 
    if (strchr(s, 'a'))
        acls = AddAcl(acls, "INSERT");
@@ -2308,7 +2308,7 @@ GetPrivledges(char *s)
    if (strchr(s, 'R'))
        acls = AddAcl(acls, "RULES");
 
-   return (acls);
+   return acls;
 }
 
 /* This will parse the acl string of TableInfo
@@ -2373,7 +2373,7 @@ ParseACL(const char *acls, int *count)
    }
 
    *count = NumAcls;
-   return (ParsedAcl);
+   return ParsedAcl;
 }
 /*
  * dumpACL:
index 541995ffcadc993ffba228aff407a6da9bdd87a0..c2ef7491f79093a4b315b6002a80419e6b65dbeb 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/bin/pg_version/Attic/pg_version.c,v 1.9 1998/03/30 16:47:35 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/bin/pg_version/Attic/pg_version.c,v 1.10 1998/09/01 03:27:25 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -41,5 +41,5 @@ main(int argc, char **argv)
    }
    else
        retcode = 0;
-   return (retcode);
+   return retcode;
 }
index 1494665b33e2cacda62de65212b7fd7a58515569..7885d1cd0d9086835bbea9c7c8de74809b17a5ea 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: genam.h,v 1.14 1998/08/19 02:03:35 momjian Exp $
+ * $Id: genam.h,v 1.15 1998/09/01 03:27:29 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -46,7 +46,7 @@ index_getprocid(Relation irel, AttrNumber attnum,
                uint16 procnum);
 extern Datum
 GetIndexValue(HeapTuple tuple, TupleDesc hTupDesc,
-             int attOff, AttrNumber attrNums[], FuncIndexInfo *fInfo,
+             int attOff, AttrNumber *attrNums, FuncIndexInfo *fInfo,
              bool *attNull);
 
 /* in genam.c */
index 4c21adde10ec5df0c843986aea974b029d196278..bbc34dbb810c193e458f694097410dacb094c341 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: hash.h,v 1.17 1998/08/19 02:03:37 momjian Exp $
+ * $Id: hash.h,v 1.18 1998/09/01 03:27:31 momjian Exp $
  *
  * NOTES
  *     modeled after Margo Seltzer's hash implementation for unix.
@@ -271,7 +271,7 @@ extern uint32 hashint4(uint32 key);
 extern uint32 hashfloat4(float32 keyp);
 extern uint32 hashfloat8(float64 keyp);
 extern uint32 hashoid(Oid key);
-extern uint32 hashoid8(Oid key[]);
+extern uint32 hashoid8(Oid *key);
 extern uint32 hashchar(char key);
 extern uint32 hashtext(struct varlena * key);
 extern uint32 hashname(NameData *n);
index 777f1acbe3e7fccc915caea3af9579062e8c07f4..f8e05b60cf6bbe7cb8f5572283216d45af23a648 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: heapam.h,v 1.35 1998/08/19 02:03:39 momjian Exp $
+ * $Id: heapam.h,v 1.36 1998/09/01 03:27:32 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -262,10 +262,10 @@ extern void heap_markpos(HeapScanDesc scan);
 extern void heap_restrpos(HeapScanDesc scan);
 
 /* in common/heaptuple.c */
-extern Size ComputeDataSize(TupleDesc tupleDesc, Datum value[], char nulls[]);
+extern Size ComputeDataSize(TupleDesc tupleDesc, Datum *value, char *nulls);
 extern void
 DataFill(char *data, TupleDesc tupleDesc,
-        Datum value[], char nulls[], uint16 *infomask,
+        Datum *value, char *nulls, uint16 *infomask,
         bits8 *bit);
 extern int heap_attisnull(HeapTuple tup, int attnum);
 extern int heap_sysattrlen(AttrNumber attno);
@@ -277,10 +277,10 @@ nocachegetattr(HeapTuple tup, int attnum,
 extern HeapTuple heap_copytuple(HeapTuple tuple);
 extern HeapTuple
 heap_formtuple(TupleDesc tupleDescriptor,
-              Datum value[], char nulls[]);
+              Datum *value, char *nulls);
 extern HeapTuple
 heap_modifytuple(HeapTuple tuple,
-       Relation relation, Datum replValue[], char replNull[], char repl[]);
+       Relation relation, Datum *replValue, char *replNull, char *repl);
 HeapTuple  heap_addheader(uint32 natts, int structlen, char *structure);
 
 /* in common/heap/stats.c */
index 40d26f3feb17ace4756c60015672b7d0ae33c35b..9b02b6a937f8d55b5057c3c7497cd66ec58ecc94 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: itup.h,v 1.14 1998/06/15 18:39:54 momjian Exp $
+ * $Id: itup.h,v 1.15 1998/09/01 03:27:34 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -162,7 +162,7 @@ typedef struct PredInfo
 /* indextuple.h */
 extern IndexTuple
 index_formtuple(TupleDesc tupleDescriptor,
-               Datum value[], char null[]);
+               Datum *value, char *null);
 extern Datum
 nocache_index_getattr(IndexTuple tup, int attnum,
                      TupleDesc tupleDesc, bool *isnull);
index 402bab9229d08cbf7caca92342c3b2c6b5390461..050fba81f5d9ce7150578a5e8d651f6252620a8b 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: tupdesc.h,v 1.18 1998/08/19 02:03:40 momjian Exp $
+ * $Id: tupdesc.h,v 1.19 1998/09/01 03:27:35 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -50,14 +50,14 @@ typedef struct tupleDesc
 {
    int         natts;
    /* Number of attributes in the tuple */
-   AttributeTupleForm *attrs;
+   Form_pg_attribute *attrs;
    /* attrs[N] is a pointer to the description of Attribute Number N+1.  */
    TupleConstr *constr;
 } *TupleDesc;
 
 extern TupleDesc CreateTemplateTupleDesc(int natts);
 
-extern TupleDesc CreateTupleDesc(int natts, AttributeTupleForm *attrs);
+extern TupleDesc CreateTupleDesc(int natts, Form_pg_attribute *attrs);
 
 extern TupleDesc CreateTupleDescCopy(TupleDesc tupdesc);
 
index 173ac2cdcbe3517c26f7c8ee333cae190521dd17..f81987f3823d4726756bbaa1799e0db09e7c55dd 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: tupmacs.h,v 1.4 1998/02/26 04:40:31 momjian Exp $
+ * $Id: tupmacs.h,v 1.5 1998/09/01 03:27:37 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -19,7 +19,7 @@
 #define att_isnull(ATT, BITS) (!((BITS)[(ATT) >> 3] & (1 << ((ATT) & 0x07))))
 
 /*
- * given a AttributeTupleForm and a pointer into a tuple's data
+ * given a Form_pg_attribute and a pointer into a tuple's data
  * area, return the correct value or pointer.
  *
  * We return a 4 byte (char *) value in all cases. If the attribute has
index fe8745126942cdfd20f4939bf71b21bfa86b6c56..2eeed643fb74508e127d948c3b9ef62eb4b17841 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: valid.h,v 1.13 1998/01/31 04:39:24 momjian Exp $
+ * $Id: valid.h,v 1.14 1998/09/01 03:27:38 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -130,7 +130,7 @@ do \
        _tuple = (HeapTuple) PageGetItem((Page) (disk_page), (itemId)); \
     \
        if ((key) != NULL) \
-           HeapKeyTest(_tuple, RelationGetTupleDescriptor(relation), \
+           HeapKeyTest(_tuple, RelationGetDescr(relation), \
                               (nKeys), (key), _res); \
        else \
            _res = TRUE; \
index f3546d3f7292d40714b37ca14fc52ebbad43d5ec..e357f9ecc4e57798ee8132165720651ad3c81443 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: bootstrap.h,v 1.11 1998/02/26 04:40:35 momjian Exp $
+ * $Id: bootstrap.h,v 1.12 1998/09/01 03:27:40 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -28,7 +28,7 @@ typedef struct hashnode
 #define EMITPROMPT printf("> ")
 
 extern Relation reldesc;
-extern AttributeTupleForm attrtypes[MAXATTR];
+extern Form_pg_attribute attrtypes[MAXATTR];
 extern int numattr;
 extern int DebugMode;
 
index e0b77b4779dc3164a4d4f01a1b6cde042b35ed64..dfa041f4215ed53a3c1d607bb098788b18c95d77 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: catalog.h,v 1.4 1997/09/08 02:34:39 momjian Exp $
+ * $Id: catalog.h,v 1.5 1998/09/01 03:27:42 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -15,7 +15,7 @@
 
 #include 
 
-extern char *relpath(char relname[]);
+extern char *relpath(char *relname);
 extern bool IsSystemRelationName(char *relname);
 extern bool IsSharedSystemRelationName(char *relname);
 extern Oid newoid(void);
index f3369a3b39a0d7fff18b7c1672d114a9666f6f62..7f0f91df1ee0455e1091096ed2388bcf4627a29a 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: heap.h,v 1.14 1998/08/19 02:03:44 momjian Exp $
+ * $Id: heap.h,v 1.15 1998/09/01 03:27:44 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -20,7 +20,7 @@ extern Relation heap_create(char *relname, TupleDesc att);
 extern Oid heap_create_with_catalog(char *relname,
                                     TupleDesc tupdesc, char relkind);
 
-extern void heap_destroy_with_catalog(char relname[]);
+extern void heap_destroy_with_catalog(char *relname);
 extern void heap_destroy(Relation rel);
 
 extern void InitTempRelList(void);
index 15d3663a5ad43eaecc8aaba977225f9a0692e06f..f4fcce9657960e217439aa1baf07f0418b36e634 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: index.h,v 1.11 1998/08/19 02:03:45 momjian Exp $
+ * $Id: index.h,v 1.12 1998/09/01 03:27:46 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -18,7 +18,7 @@
 #include 
 #include 
 
-extern Form_pg_am AccessMethodObjectIdGetAccessMethodTupleForm(Oid accessMethodObjectId);
+extern Form_pg_am AccessMethodObjectIdGetForm(Oid accessMethodObjectId);
 
 extern void UpdateIndexPredicate(Oid indexoid, Node *oldPred, Node *predicate);
 
@@ -34,8 +34,8 @@ index_create(char *heapRelationName,
             List *attributeList,
             Oid accessMethodObjectId,
             int numatts,
-            AttrNumber attNums[],
-            Oid classObjectId[],
+            AttrNumber *attNums,
+            Oid *classObjectId,
             uint16 parameterCount,
             Datum *parameter,
             Node *predicate,
@@ -46,7 +46,7 @@ extern void index_destroy(Oid indexId);
 
 extern void
 FormIndexDatum(int numberOfAttributes,
-              AttrNumber attributeNumber[], HeapTuple heapTuple,
+              AttrNumber *attributeNumber, HeapTuple heapTuple,
               TupleDesc heapDescriptor, Datum *datum,
               char *nullv, FuncIndexInfoPtr fInfo);
 
@@ -58,7 +58,7 @@ FillDummyExprContext(ExprContext *econtext, TupleTableSlot *slot,
 
 extern void
 index_build(Relation heapRelation, Relation indexRelation,
-           int numberOfAttributes, AttrNumber attributeNumber[],
+           int numberOfAttributes, AttrNumber *attributeNumber,
        uint16 parameterCount, Datum *parameter, FuncIndexInfo *funcInfo,
            PredInfo *predInfo);
 
index 003ae30c0e8ef3ddce806a41af4404bf596f167f..7f0b440a79d37e15e5262ac297526bd6013af55c 100644 (file)
@@ -7,7 +7,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: indexing.h,v 1.16 1998/08/19 02:03:46 momjian Exp $
+ * $Id: indexing.h,v 1.17 1998/09/01 03:27:47 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -64,7 +64,7 @@ extern char *IndexedCatalogNames[];
  *
  * Functions for each index to perform the necessary scan on a cache miss.
  */
-extern void CatalogOpenIndices(int nIndices, char *names[], Relation idescs[]);
+extern void CatalogOpenIndices(int nIndices, char **names, Relation *idescs);
 extern void CatalogCloseIndices(int nIndices, Relation *idescs);
 extern void
 CatalogIndexInsert(Relation *idescs,
index a1edd7774b5dc435b7dab33ae1c28036c3686704..4e4832fe1701f4dfbab34f7775f8a116eb01b732 100644 (file)
@@ -7,7 +7,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: pg_attribute.h,v 1.41 1998/08/27 05:06:56 momjian Exp $
+ * $Id: pg_attribute.h,v 1.42 1998/09/01 03:27:49 momjian Exp $
  *
  * NOTES
  *   the genbki.sh script reads this file and generates .bki
@@ -56,7 +56,7 @@ CATALOG(pg_attribute) BOOTSTRAP
 
    /*
     * attlen is a copy of the typlen field from pg_type for this
-    * attribute.  See atttypid above.  See struct TypeTupleFormData for
+    * attribute.  See atttypid above.  See struct Form_pg_type for
     * definition.
     */
    int2        attnum;
@@ -98,7 +98,7 @@ CATALOG(pg_attribute) BOOTSTRAP
 
    /*
     * attbyval is a copy of the typbyval field from pg_type for this
-    * attribute.  See atttypid above.  See struct TypeTupleFormData for
+    * attribute.  See atttypid above.  See struct Form_pg_type for
     * definition.
     */
    bool        attisset;
@@ -106,7 +106,7 @@ CATALOG(pg_attribute) BOOTSTRAP
 
    /*
     * attalign is a copy of the typalign field from pg_type for this
-    * attribute.  See atttypid above.  See struct TypeTupleFormData for
+    * attribute.  See atttypid above.  See struct Form_pg_type for
     * definition.
     */
    bool        attnotnull;
@@ -129,7 +129,7 @@ CATALOG(pg_attribute) BOOTSTRAP
  *     the format of pg_attribute relation.
  * ----------------
  */
-typedef FormData_pg_attribute *AttributeTupleForm;
+typedef FormData_pg_attribute *Form_pg_attribute;
 
 /* ----------------
  *     compiler constants for pg_attribute
index e849289eef920bf143f2962381d2827064f9a651..ef39b13b7f288fea9cd72f281e0bcff55c2eac86 100644 (file)
@@ -7,7 +7,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: pg_index.h,v 1.6 1997/11/21 18:12:09 momjian Exp $
+ * $Id: pg_index.h,v 1.7 1998/09/01 03:27:51 momjian Exp $
  *
  * NOTES
  *   the genbki.sh script reads this file and generates .bki
@@ -63,7 +63,7 @@ CATALOG(pg_index)
  *     the format of pg_index relation.
  * ----------------
  */
-typedef FormData_pg_index *IndexTupleForm;
+typedef FormData_pg_index *Form_pg_index;
 
 /* ----------------
  *     compiler constants for pg_index
index 7cb1584f5c6199e0fb6719b11a815449089ead32..1ad2b782cbd4a6c129691631404c71000c37a601 100644 (file)
@@ -7,7 +7,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: pg_inherits.h,v 1.4 1997/09/08 02:35:14 momjian Exp $
+ * $Id: pg_inherits.h,v 1.5 1998/09/01 03:27:53 momjian Exp $
  *
  * NOTES
  *   the genbki.sh script reads this file and generates .bki
@@ -42,7 +42,7 @@ CATALOG(pg_inherits)
  *     the format of pg_inherits relation.
  * ----------------
  */
-typedef FormData_pg_inherits *InheritsTupleForm;
+typedef FormData_pg_inherits *Form_pg_inherits;
 
 /* ----------------
  *     compiler constants for pg_inherits
index 9e11a79ed68069975c12a759e019f4fdb6f93cd5..526da0883ac59a39880b7df08d27dcd396e69e5a 100644 (file)
@@ -7,7 +7,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: pg_operator.h,v 1.34 1998/08/19 02:03:53 momjian Exp $
+ * $Id: pg_operator.h,v 1.35 1998/09/01 03:27:55 momjian Exp $
  *
  * NOTES
  *   the genbki.sh script reads this file and generates .bki
@@ -58,7 +58,7 @@ CATALOG(pg_operator)
  *     the format of pg_operator relation.
  * ----------------
  */
-typedef FormData_pg_operator *OperatorTupleForm;
+typedef FormData_pg_operator *Form_pg_operator;
 
 /* ----------------
  *     compiler constants for pg_operator
index c7b64a58ceb50bd2560797ec9265941b2dda3a05..9f204bfec1eb636f3da62826b00a5bb04541adf3 100644 (file)
@@ -7,7 +7,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: pg_type.h,v 1.45 1998/08/27 05:06:57 momjian Exp $
+ * $Id: pg_type.h,v 1.46 1998/09/01 03:27:58 momjian Exp $
  *
  * NOTES
  *   the genbki.sh script reads this file and generates .bki
@@ -106,14 +106,14 @@ CATALOG(pg_type) BOOTSTRAP
     * but I doubt it - BRYANH 96.08).
     */
    text        typdefault;     /* VARIABLE LENGTH FIELD */
-} TypeTupleFormData;
+} FormData_pg_type;
 
 /* ----------------
  *     Form_pg_type corresponds to a pointer to a row with
  *     the format of pg_type relation.
  * ----------------
  */
-typedef TypeTupleFormData *TypeTupleForm;
+typedef FormData_pg_type *Form_pg_type;
 
 /* ----------------
  *     compiler constants for pg_type
index 96b0c2125f1f84bf233d40ceb55bb05eec6b749b..eaf98ffa0ea3fb6071b89a4f6449d05085e46578 100644 (file)
@@ -7,7 +7,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: pg_version.h,v 1.5 1997/09/08 02:35:35 momjian Exp $
+ * $Id: pg_version.h,v 1.6 1998/09/01 03:28:00 momjian Exp $
  *
  * NOTES
  *   the genbki.sh script reads this file and generates .bki
@@ -42,7 +42,7 @@ CATALOG(pg_version)
  *     the format of pg_version relation.
  * ----------------
  */
-typedef FormData_pg_version *VersionTupleForm;
+typedef FormData_pg_version *Form_pg_version;
 
 /* ----------------
  *     compiler constants for pg_version
index 5847d6b3c95cdd707c178db5d58c07598b5879d1..ed89240ae7a02dd6c766655147b1de4e66ad9ce0 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Copyright (c) 1994-5, Regents of the University of California
  *
- * $Id: cluster.h,v 1.4 1997/09/08 02:35:39 momjian Exp $
+ * $Id: cluster.h,v 1.5 1998/09/01 03:28:02 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -22,6 +22,6 @@
 /*
  * functions
  */
-extern void cluster(char oldrelname[], char oldindexname[]);
+extern void cluster(char *oldrelname, char *oldindexname);
 
 #endif                         /* CLUSTER_H */
index 529d652e64f85bea7fe40124505562c089e19dc0..47a818fb4beeff47dcd5682b4f9b2ba13b0936b3 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: vacuum.h,v 1.14 1998/08/19 19:59:49 momjian Exp $
+ * $Id: vacuum.h,v 1.15 1998/09/01 03:28:04 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -53,13 +53,13 @@ typedef struct
 {
    FuncIndexInfo finfo;
    FuncIndexInfo *finfoP;
-   IndexTupleForm tform;
+   Form_pg_index tform;
    int         natts;
 } IndDesc;
 
 typedef struct
 {
-   AttributeTupleForm attr;
+   Form_pg_attribute attr;
    Datum       best,
                guess1,
                guess2,
index b9e63d1e25bd50a3012767eaa4fb2148844ce96b..fea963fc110af94ad88a46ff8637d92c9c969535 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: executor.h,v 1.23 1998/07/27 19:38:32 vadim Exp $
+ * $Id: executor.h,v 1.24 1998/09/01 03:28:06 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -181,7 +181,7 @@ ExecAssignScanType(CommonScanState *csstate,
 extern void
 ExecAssignScanTypeFromOuterPlan(Plan *node,
                                CommonScanState *csstate);
-extern AttributeTupleForm ExecGetTypeInfo(Relation relDesc);
+extern Form_pg_attribute ExecGetTypeInfo(Relation relDesc);
 
 extern void
 ExecOpenIndices(Oid resultRelationOid,
index 322c3e0e51f1bb3635b966ac5dc01eae4049c4ba..f8291ccb1c4f960ca4adc84e642a4e9c9bf73c6f 100644 (file)
@@ -4,7 +4,7 @@
  *   Interface to hba.c
  *
  *
- * $Id: hba.h,v 1.9 1998/06/13 04:27:18 momjian Exp $
+ * $Id: hba.h,v 1.10 1998/09/01 03:28:10 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -55,6 +55,6 @@ hba_getauthmethod(SockAddr *raddr, char *user, char *database,
                  char *auth_arg, UserAuth *auth_method);
 int
 authident(struct sockaddr_in * raddr, struct sockaddr_in * laddr,
-         const char postgres_username[], const char auth_arg[]);
+         const char *postgres_username, const char *auth_arg);
 
 #endif
index 9d1f12852ba6d28b7e629a933433a1570048a186..b7fc3ede877a7586a14f55bf1704775e34ae6c4e 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: nodes.h,v 1.28 1998/08/25 21:37:02 scrappy Exp $
+ * $Id: nodes.h,v 1.29 1998/09/01 03:28:14 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -79,11 +79,11 @@ typedef enum NodeTag
    T_OrderKey,
    T_JoinKey,
    T_MergeOrder,
-   T_CInfo,
+   T_ClauseInfo,
    T_JoinMethod,
    T_HInfo,
    T_MInfo,
-   T_JInfo,
+   T_JoinInfo,
    T_Iter,
    T_Stream,
 
index 11871611445cbbc4184449b62f9d1bb3743657ac..69fb91192118ce20cfd337cef8df7d0c8419209c 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: relation.h,v 1.9 1998/08/04 16:44:26 momjian Exp $
+ * $Id: relation.h,v 1.10 1998/09/01 03:28:16 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -207,7 +207,7 @@ typedef struct JoinKey
  * clause info
  *******/
 
-typedef struct CInfo
+typedef struct ClauseInfo
 {
    NodeTag     type;
    Expr       *clause;         /* should be an OP clause */
@@ -221,7 +221,7 @@ typedef struct CInfo
    /* hashjoin only */
    Oid         hashjoinoperator;
    Relid       cinfojoinid;
-} CInfo;
+} ClauseInfo;
 
 typedef struct JoinMethod
 {
@@ -242,7 +242,7 @@ typedef struct MInfo
    MergeOrder *m_ordering;
 } MInfo;
 
-typedef struct JInfo
+typedef struct JoinInfo
 {
    NodeTag     type;
    List       *otherrels;
@@ -250,7 +250,7 @@ typedef struct JInfo
    bool        mergejoinable;
    bool        hashjoinable;
    bool        inactive;
-} JInfo;
+} JoinInfo;
 
 typedef struct Iter
 {
@@ -285,7 +285,7 @@ typedef struct Stream
 {
    NodeTag     type;
    Path       *pathptr;
-   CInfo      *cinfo;
+   ClauseInfo     *cinfo;
    int        *clausetype;
    struct Stream *upstream;
    struct Stream *downstream;
index db8fffe4d29cbcb82e89088cb94b5f02ed279873..0fa10b2e4904ff32ef6ea1aef67b23f0592534bd 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: clauseinfo.h,v 1.7 1998/02/26 04:42:08 momjian Exp $
+ * $Id: clauseinfo.h,v 1.8 1998/09/01 03:28:17 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -16,7 +16,7 @@
 #include "nodes/pg_list.h"
 #include "nodes/relation.h"
 
-extern bool valid_or_clause(CInfo *clauseinfo);
+extern bool valid_or_clause(ClauseInfo *clauseinfo);
 extern List *get_actual_clauses(List *clauseinfo_list);
 extern void
 get_relattvals(List *clauseinfo_list, List **attnos,
index 57fe535df0cb46e01d824ace0d638c9f67eb0cc1..cbb2893257ecdbdfcbd6cd4ce41aa3af4586af42 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: joininfo.h,v 1.6 1998/07/18 04:22:51 momjian Exp $
+ * $Id: joininfo.h,v 1.7 1998/09/01 03:28:19 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -17,8 +17,8 @@
 #include "nodes/relation.h"
 #include "nodes/primnodes.h"
 
-extern JInfo *joininfo_member(List *join_relids, List *joininfo_list);
-extern JInfo *find_joininfo_node(RelOptInfo *this_rel, List *join_relids);
+extern JoinInfo *joininfo_member(List *join_relids, List *joininfo_list);
+extern JoinInfo *find_joininfo_node(RelOptInfo *this_rel, List *join_relids);
 extern Var *other_join_clause_var(Var *var, Expr *clause);
 
 #endif                         /* JOININFO_H */
index cbc998c7a96927e8cfcc5032c9a988c2ebe0e78e..77146a326d48cce92955d42484cc0f5023804a08 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: xfunc.h,v 1.8 1998/07/18 04:22:52 momjian Exp $
+ * $Id: xfunc.h,v 1.9 1998/09/01 03:28:20 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -52,9 +52,9 @@ extern int    XfuncMode;          /* defined in tcop/postgres.c */
 extern void xfunc_trypullup(RelOptInfo *rel);
 extern int
 xfunc_shouldpull(Path *childpath, JoinPath *parentpath,
-                int whichchild, CInfo *maxcinfopt);
-extern CInfo *
-xfunc_pullup(Path *childpath, JoinPath *parentpath, CInfo *cinfo,
+                int whichchild, ClauseInfo *maxcinfopt);
+extern ClauseInfo *
+xfunc_pullup(Path *childpath, JoinPath *parentpath, ClauseInfo *cinfo,
             int whichchild, int clausetype);
 extern Cost xfunc_rank(Expr *clause);
 extern Cost xfunc_expense(Query *queryInfo, Expr *clause);
index ef1dbbc77f7338f45f11f6575b30d2df35a3d743..5974f765ca9c9203749fbff185c1261308e5b508 100644 (file)
@@ -26,7 +26,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: dest.h,v 1.14 1998/05/06 23:50:49 momjian Exp $
+ * $Id: dest.h,v 1.15 1998/09/01 03:28:23 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -57,7 +57,7 @@ typedef enum
 
 typedef struct AttrInfo {
    int                 numAttr;
-   AttributeTupleForm  *attrs;
+   Form_pg_attribute   *attrs;
 } AttrInfo;
 */
 
index c5b8804151dea35013c88ba2ea3f4216987dea23..fb7beef36a7e23176e2c93c5025332bf89bdb2e7 100644 (file)
@@ -10,7 +10,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: array.h,v 1.12 1998/07/12 21:29:38 momjian Exp $
+ * $Id: array.h,v 1.13 1998/09/01 03:28:26 momjian Exp $
  *
  * NOTES
  *   XXX the data array should be LONGALIGN'd -- notice that the array
@@ -118,17 +118,17 @@ extern char *array_in(char *string, Oid element_type, int32 typmod);
 extern char *array_out(ArrayType *v, Oid element_type);
 extern char *array_dims(ArrayType *v, bool *isNull);
 extern Datum
-array_ref(ArrayType *array, int n, int indx[], int reftype,
+array_ref(ArrayType *array, int n, int *indx, int reftype,
          int elmlen, int arraylen, bool *isNull);
 extern Datum
-array_clip(ArrayType *array, int n, int upperIndx[],
-          int lowerIndx[], int reftype, int len, bool *isNull);
+array_clip(ArrayType *array, int n, int *upperIndx,
+          int *lowerIndx, int reftype, int len, bool *isNull);
 extern char *
-array_set(ArrayType *array, int n, int indx[], char *dataPtr,
+array_set(ArrayType *array, int n, int *indx, char *dataPtr,
          int reftype, int elmlen, int arraylen, bool *isNull);
 extern char *
-array_assgn(ArrayType *array, int n, int upperIndx[],
-           int lowerIndx[], ArrayType *newArr, int reftype,
+array_assgn(ArrayType *array, int n, int *upperIndx,
+           int *lowerIndx, ArrayType *newArr, int reftype,
            int len, bool *isNull);
 extern int array_eq(ArrayType *array1, ArrayType *array2);
 extern int
@@ -143,27 +143,27 @@ extern char *_array_newLO(int *fd, int flag);
  * [these names seem to be too generic. Add prefix for arrays? -- AY]
  */
 
-extern int GetOffset(int n, int dim[], int lb[], int indx[]);
-extern int getNitems(int n, int a[]);
-extern int compute_size(int st[], int endp[], int n, int base);
-extern void mda_get_offset_values(int n, int dist[], int PC[], int span[]);
-extern void mda_get_range(int n, int span[], int st[], int endp[]);
-extern void mda_get_prod(int n, int range[], int P[]);
-extern int tuple2linear(int n, int tup[], int scale[]);
-extern void array2chunk_coord(int n, int C[], int a_coord[], int c_coord[]);
-extern int next_tuple(int n, int curr[], int span[]);
+extern int GetOffset(int n, int *dim, int *lb, int *indx);
+extern int getNitems(int n, int *a);
+extern int compute_size(int *st, int *endp, int n, int base);
+extern void mda_get_offset_values(int n, int *dist, int *PC, int *span);
+extern void mda_get_range(int n, int *span, int *st, int *endp);
+extern void mda_get_prod(int n, int *range, int *P);
+extern int tuple2linear(int n, int *tup, int *scale);
+extern void array2chunk_coord(int n, int *C, int *a_coord, int *c_coord);
+extern int next_tuple(int n, int *curr, int *span);
 
 /*
  * prototypes for functions defined in chunk.c
  */
 extern char *
-_ChunkArray(int fd, FILE *afd, int ndim, int dim[], int baseSize,
+_ChunkArray(int fd, FILE *afd, int ndim, int *dim, int baseSize,
            int *nbytes, char *chunkfile);
 extern int
-_ReadChunkArray(int st[], int endp[], int bsize, int fp,
+_ReadChunkArray(int *st, int *endp, int bsize, int fp,
             char *destfp, ArrayType *array, int isDestLO, bool *isNull);
 extern struct varlena *
-_ReadChunkArray1El(int st[], int bsize, int fp,
+_ReadChunkArray1El(int *st, int bsize, int fp,
                   ArrayType *array, bool *isNull);
 
 
index 53cda4a9a0fe59019bdca9b76b9d79a2015c3cdc..931e17f2bd785f1ca4d39baa9af5110e72d52709 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: builtins.h,v 1.49 1998/08/31 07:55:50 momjian Exp $
+ * $Id: builtins.h,v 1.50 1998/09/01 03:28:28 momjian Exp $
  *
  * NOTES
  *   This should normally only be included by fmgr.h.
@@ -64,9 +64,9 @@ extern bool cideq(int8 arg1, int8 arg2);
 extern int32 int2in(char *num);
 extern char *int2out(int16 sh);
 extern int16 *int28in(char *shs);
-extern char *int28out(int16 (*shs)[]);
+extern char *int28out(int16 **shs);
 extern int32 *int44in(char *input_string);
-extern char *int44out(int32 an_array[]);
+extern char *int44out(int32 *an_array);
 extern int32 int4in(char *num);
 extern char *int4out(int32 l);
 extern int32 i2toi4(int16 arg1);
@@ -165,7 +165,7 @@ extern int32 btint42cmp(int32 a, int16 b);
 extern int32 btfloat4cmp(float32 a, float32 b);
 extern int32 btfloat8cmp(float64 a, float64 b);
 extern int32 btoidcmp(Oid a, Oid b);
-extern int32 btoid8cmp(Oid a[], Oid b[]);
+extern int32 btoid8cmp(Oid *a, Oid *b);
 extern int32 btabstimecmp(AbsoluteTime a, AbsoluteTime b);
 extern int32 btcharcmp(char a, char b);
 extern int32 btnamecmp(NameData *a, NameData *b);
@@ -329,16 +329,16 @@ extern bool oidnotin(Oid the_oid, char *compare);
 
 /* oid.c */
 extern Oid *oid8in(char *oidString);
-extern char *oid8out(Oid (*oidArray)[]);
+extern char *oid8out(Oid **oidArray);
 extern Oid oidin(char *s);
 extern char *oidout(Oid o);
 extern bool oideq(Oid arg1, Oid arg2);
 extern bool oidne(Oid arg1, Oid arg2);
-extern bool oid8eq(Oid arg1[], Oid arg2[]);
-extern bool oid8lt(Oid arg1[], Oid arg2[]);
-extern bool oid8le(Oid arg1[], Oid arg2[]);
-extern bool oid8ge(Oid arg1[], Oid arg2[]);
-extern bool oid8gt(Oid arg1[], Oid arg2[]);
+extern bool oid8eq(Oid *arg1, Oid *arg2);
+extern bool oid8lt(Oid *arg1, Oid *arg2);
+extern bool oid8le(Oid *arg1, Oid *arg2);
+extern bool oid8ge(Oid *arg1, Oid *arg2);
+extern bool oid8gt(Oid *arg1, Oid *arg2);
 extern bool oideqint4(Oid arg1, int32 arg2);
 extern bool int4eqoid(int32 arg1, Oid arg2);
 extern text *oid_text(Oid arg1);
@@ -358,7 +358,7 @@ extern bool texticregexne(struct varlena * s, struct varlena * p);
 /* regproc.c */
 extern int32 regprocin(char *pro_name_and_oid);
 extern char *regprocout(RegProcedure proid);
-extern text *oid8types(Oid (*oidArray)[]);
+extern text *oid8types(Oid **oidArray);
 extern Oid regproctooid(RegProcedure rp);
 
 /* define macro to replace mixed-case function call - tgl 97/04/27 */
index c759416ab099bd3dcb26b4c2214958cb0519f6ba..e955c29f3df342d9e732a5ab59e5d4beb79a4325 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: catcache.h,v 1.11 1998/02/26 04:43:53 momjian Exp $
+ * $Id: catcache.h,v 1.12 1998/09/01 03:28:29 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -70,7 +70,7 @@ extern void ResetSystemCache(void);
 extern void SystemCacheRelationFlushed(Oid relId);
 extern CatCache *
 InitSysCache(char *relname, char *indname, int id, int nkeys,
-            int key[], HeapTuple (*iScanfuncP) ());
+            int *key, HeapTuple (*iScanfuncP) ());
 extern HeapTuple
 SearchSysCache(struct catcache * cache, Datum v1, Datum v2,
               Datum v3, Datum v4);
index b3ccab769688817e71843a1a790120123e269c4a..0e947d63932cd3619b118d00196769524a1cc680 100644 (file)
@@ -8,7 +8,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: dt.h,v 1.30 1998/05/31 17:08:35 thomas Exp $
+ * $Id: dt.h,v 1.31 1998/09/01 03:28:30 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -325,17 +325,17 @@ extern double time2t(const int hour, const int min, const double sec);
 
 extern int
 ParseDateTime(char *timestr, char *lowstr,
-             char *field[], int ftype[], int maxfields, int *numfields);
+             char **field, int *ftype, int maxfields, int *numfields);
 extern int
-DecodeDateTime(char *field[], int ftype[],
+DecodeDateTime(char **field, int *ftype,
             int nf, int *dtype, struct tm * tm, double *fsec, int *tzp);
 
 extern int
-DecodeTimeOnly(char *field[], int ftype[], int nf,
+DecodeTimeOnly(char **field, int *ftype, int nf,
               int *dtype, struct tm * tm, double *fsec);
 
 extern int
-DecodeDateDelta(char *field[], int ftype[],
+DecodeDateDelta(char **field, int *ftype,
                int nf, int *dtype, struct tm * tm, double *fsec);
 
 extern int EncodeDateOnly(struct tm * tm, int style, char *str);
index edfd5d47b8e41716f7ef4b850fbbfebb79b52a61..206c011ba2cb60ad3ec823c46c0c6b461f716c6c 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: rel.h,v 1.18 1998/08/19 02:04:07 momjian Exp $
+ * $Id: rel.h,v 1.19 1998/09/01 03:28:32 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -127,22 +127,13 @@ typedef Relation *RelationPtr;
 #define RelationDecrementReferenceCount(relation) ((relation)->rd_refcnt -= 1)
 
 /*
- * RelationGetAccessMethodTupleForm --
- *     Returns access method attribute values for a relation.
- *
- * Note:
- *     Assumes relation descriptor is valid.
- */
-#define RelationGetAccessMethodTupleForm(relation) ((relation)->rd_am)
-
-/*
- * RelationGetRelationTupleForm --
+ * RelationGetForm --
  *     Returns relation attribute values for a relation.
  *
  * Note:
  *     Assumes relation descriptor is valid.
  */
-#define RelationGetRelationTupleForm(relation) ((relation)->rd_rel)
+#define RelationGetForm(relation) ((relation)->rd_rel)
 
 
 /*
@@ -176,13 +167,13 @@ typedef Relation *RelationPtr;
 #define RelationGetNumberOfAttributes(relation) ((relation)->rd_rel->relnatts)
 
 /*
- * RelationGetTupleDescriptor --
+ * RelationGetDescr --
  *     Returns tuple descriptor for a relation.
  *
  * Note:
  *     Assumes relation descriptor is valid.
  */
-#define RelationGetTupleDescriptor(relation) ((relation)->rd_att)
+#define RelationGetDescr(relation) ((relation)->rd_att)
 
 extern IndexStrategy RelationGetIndexStrategy(Relation relation);
 
index 23abd32a73dc4f7aa8196eca7c36c3660854746a..b2bb9f1415d2696b1a3e3a7401db6739c69a920f 100644 (file)
@@ -863,12 +863,12 @@ ECPGtrans(int lineno, const char * transaction)
    if ((res = PQexec(actual_connection->connection, transaction)) == NULL)
    {
        register_error(ECPG_TRANS, "Error in transaction processing line %d.", lineno);
-       return (FALSE);
+       return FALSE;
    }
    PQclear(res);
    if (strcmp(transaction, "commit") == 0 || strcmp(transaction, "rollback") == 0)
        committed = 1;
-   return (TRUE);
+   return TRUE;
 }
 
 bool
index ed5501b6113de77fded401af05d6428a88255672..d208a406e370362f93fe40db32d6fa668b23395c 100644 (file)
@@ -54,12 +54,12 @@ ScanCKeywordLookup(char *text)
        middle = low + (high - low) / 2;
        difference = strcmp(middle->name, text);
        if (difference == 0)
-           return (middle);
+           return middle;
        else if (difference < 0)
            low = middle + 1;
        else
            high = middle - 1;
    }
 
-   return (NULL);
+   return NULL;
 }
index 3d8624b334aabbb75208146a6192d2901879af06..69b1e650a22fd95dd34de33597886857e20d0d70 100644 (file)
@@ -76,10 +76,10 @@ main(int argc, char *const argv[])
                for (ip = include_paths; ip != NULL; ip = ip->next)
                    fprintf(stderr, " %s\n", ip->path);
                fprintf(stderr, "End of search list.\n");
-               return (OK);
+               return OK;
            default:
                usage(argv[0]);
-               return (ILLEGAL_OPTION);
+               return ILLEGAL_OPTION;
        }
    }
 
@@ -193,5 +193,5 @@ main(int argc, char *const argv[])
            free(input_filename);
        }
    }
-   return (OK);
+   return OK;
 }
index f7aac477d5f60d24d91cd0a2018228ec134ce382..f8faba267093027bdc8e9f0e1bc707e697b3165a 100644 (file)
@@ -55,12 +55,12 @@ ScanECPGKeywordLookup(char *text)
        middle = low + (high - low) / 2;
        difference = strcmp(middle->name, text);
        if (difference == 0)
-           return (middle);
+           return middle;
        else if (difference < 0)
            low = middle + 1;
        else
            high = middle - 1;
    }
 
-   return (NULL);
+   return NULL;
 }
index a17455de3fe6a91be02694bcf0b3deae9d6df02a..79ba20f628e496f0fbb41ea809066c9d435054e4 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.3 1998/08/25 21:37:06 scrappy Exp $
+ *   $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.4 1998/09/01 03:28:41 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -234,12 +234,12 @@ ScanKeywordLookup(char *text)
        middle = low + (high - low) / 2;
        difference = strcmp(middle->name, text);
        if (difference == 0)
-           return (middle);
+           return middle;
        else if (difference < 0)
            low = middle + 1;
        else
            high = middle - 1;
    }
 
-   return (NULL);
+   return NULL;
 }
index 5336d132bf9121ef99690a8b5d31fd34265fc056..57712699c8a770bd5c28357b580c1945944269f9 100644 (file)
@@ -206,7 +206,7 @@ cppline     {space}*#.*(\\{space}*\n)*\n*
                    yylval.ival = strtol((char *)literal,&endptr,2);
                    if (*endptr != '\0' || errno == ERANGE)
                        yyerror("ERROR: Bad binary integer input!");
-                   return (ICONST);
+                   return ICONST;
                }
 {xhinside} |
 {xbinside} {
@@ -232,7 +232,7 @@ cppline     {space}*#.*(\\{space}*\n)*\n*
                    yylval.ival = strtol((char *)literal,&endptr,16);
                    if (*endptr != '\0' || errno == ERANGE)
                        yyerror("ERROR: Bad hexadecimal integer input");
-                   return (ICONST);
+                   return ICONST;
                }
 
 {xqstart}     {
@@ -243,7 +243,7 @@ cppline     {space}*#.*(\\{space}*\n)*\n*
 {xqstop}   {
                    BEGIN(SQL);
                    yylval.str = strdup(scanstr(literal));
-                   return (SCONST);
+                   return SCONST;
                }
 {xqdouble} |
 {xqinside} {
@@ -278,7 +278,7 @@ cppline     {space}*#.*(\\{space}*\n)*\n*
 {xdstop}   {
                    BEGIN(SQL);
                    yylval.str = strdup(literal);
-                   return (CSTRING);
+                   return CSTRING;
                }
 {xdinside} {
                    if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1))
@@ -294,7 +294,7 @@ cppline     {space}*#.*(\\{space}*\n)*\n*
 {xdstop}  {
                    BEGIN(C);
                    yylval.str = strdup(literal);
-                   return (CSTRING);
+                   return CSTRING;
                }
 {xdinside}    {
                    if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1))
@@ -306,30 +306,30 @@ cppline       {space}*#.*(\\{space}*\n)*\n*
 {space}*   { /* ignore */ }
 {xmstop}   {
                    BEGIN(SQL);
-                   return (yytext[0]);
+                   return yytext[0];
                }
 
 
 {typecast}            {   return TYPECAST; }
 {self}/{space}*-[\.0-9]   {
                    BEGIN(xm);
-                   return (yytext[0]);
+                   return yytext[0];
                }
-{self}                {   return (yytext[0]); }
+{self}                {   return yytext[0]; }
 {operator}/-[\.0-9]   {
                    yylval.str = strdup((char*)yytext);
-                   return (Op);
+                   return Op;
                }
 {operator}        {
                    if (strcmp((char*)yytext,"!=") == 0)
                        yylval.str = strdup("<>"); /* compatability */
                    else
                        yylval.str = strdup((char*)yytext);
-                   return (Op);
+                   return Op;
                }
 {param}           {
                    yylval.ival = atoi((char*)&yytext[1]);
-                   return (PARAM);
+                   return PARAM;
                }
 {identifier}/{space}*-{number}    {
                    int i;
@@ -342,13 +342,13 @@ cppline       {space}*#.*(\\{space}*\n)*\n*
 
                    keyword = ScanKeywordLookup((char*)yytext);
                    if (keyword != NULL) {
-                       return (keyword->value);
+                       return keyword->value;
                    }
                    else
                    {
                        keyword = ScanECPGKeywordLookup((char*)yytext);
                        if (keyword != NULL) {
-                           return (keyword->value);
+                           return keyword->value;
                        }
                        else
                        {
@@ -376,7 +376,7 @@ cppline     {space}*#.*(\\{space}*\n)*\n*
                            if (ptr == NULL) 
                            {
                                yylval.str = strdup((char*)yytext);
-                               return (IDENT);
+                               return IDENT;
                            }
                        }
                    }
@@ -394,9 +394,9 @@ cppline     {space}*#.*(\\{space}*\n)*\n*
                        if (*endptr != '\0' || errno == ERANGE)
                            yyerror("ERROR: Bad integer input");
                        yyerror("WARNING: Integer input is out of range; promoted to float");
-                       return (FCONST);
+                       return FCONST;
                    }
-                   return (ICONST);
+                   return ICONST;
                }
 {real}/{space}*-{number} {
                    char* endptr;
@@ -406,7 +406,7 @@ cppline     {space}*#.*(\\{space}*\n)*\n*
                    yylval.dval = strtod(((char *)yytext),&endptr);
                    if (*endptr != '\0' || errno == ERANGE)
                        yyerror("ERROR: Bad float8 input");
-                   return (FCONST);
+                   return FCONST;
                }
 {integer}     {
                    char* endptr;
@@ -420,9 +420,9 @@ cppline     {space}*#.*(\\{space}*\n)*\n*
                        if (*endptr != '\0' || errno == ERANGE)
                            yyerror("ERROR: Bad integer input");
                        yyerror("WARNING: Integer input is out of range; promoted to float");
-                       return (FCONST);
+                       return FCONST;
                    }
-                   return (ICONST);
+                   return ICONST;
                }
 {real}            {
                    char* endptr;
@@ -431,7 +431,7 @@ cppline     {space}*#.*(\\{space}*\n)*\n*
                    yylval.dval = strtod((char *)yytext,&endptr);
                    if (*endptr != '\0' || errno == ERANGE)
                        yyerror("ERROR: Bad float input");
-                   return (FCONST);
+                   return FCONST;
                }
 {integer}/{space}*-{number} {
                    char* endptr;
@@ -446,9 +446,9 @@ cppline     {space}*#.*(\\{space}*\n)*\n*
                        if (*endptr != '\0' || errno == ERANGE)
                            yyerror("ERROR: Bad integer input");
                        yyerror("WARNING: Integer input is out of range; promoted to float");
-                       return (FCONST);
+                       return FCONST;
                    }
-                   return (ICONST);
+                   return ICONST;
                }
 {integer}       {
                    char* endptr;
@@ -462,9 +462,9 @@ cppline     {space}*#.*(\\{space}*\n)*\n*
                        if (*endptr != '\0' || errno == ERANGE)
                            yyerror("ERROR: Bad integer input");
                        yyerror("WARNING: Integer input is out of range; promoted to float");
-                       return (FCONST);
+                       return FCONST;
                    }
-                   return (ICONST);
+                   return ICONST;
                }
 :{identifier}(("->"|\.){identifier})* {
                    yylval.str = strdup((char*)yytext+1);
@@ -480,13 +480,13 @@ cppline       {space}*#.*(\\{space}*\n)*\n*
 
                    keyword = ScanKeywordLookup((char*)yytext);
                    if (keyword != NULL) {
-                       return (keyword->value);
+                       return keyword->value;
                    }
                    else
                    {
                        keyword = ScanECPGKeywordLookup((char*)yytext);
                        if (keyword != NULL) {
-                           return (keyword->value);
+                           return keyword->value;
                        }
                        else
                        {
@@ -514,14 +514,14 @@ cppline       {space}*#.*(\\{space}*\n)*\n*
                            if (ptr == NULL) 
                            {
                                yylval.str = strdup((char*)yytext);
-                               return (IDENT);
+                               return IDENT;
                            }
                        }
                    }
                }
 {space}           { /* ignore */ }
 ";"                   { BEGIN C; return SQL_SEMI; }
-{other}           { return (yytext[0]); }
+{other}           { return yytext[0]; }
 {exec}{space}{sql}      { BEGIN SQL; return SQL_START; }
 {ccomment}          { /* ignore */ } 
 {cppline}           {
@@ -533,7 +533,7 @@ cppline     {space}*#.*(\\{space}*\n)*\n*
 
                    keyword = ScanCKeywordLookup((char*)yytext);
                    if (keyword != NULL) {
-                       return (keyword->value);
+                       return keyword->value;
                    }
                    else
                    {
@@ -561,7 +561,7 @@ cppline     {space}*#.*(\\{space}*\n)*\n*
                        if (ptr == NULL) 
                        {
                            yylval.str = strdup((char*)yytext);
-                           return (IDENT);
+                           return IDENT;
                        }
                    }
                }
@@ -574,7 +574,7 @@ cppline     {space}*#.*(\\{space}*\n)*\n*
 \[          { return('['); }
 \]          { return(']'); }
 \=          { return('='); }
-{other}         { return (S_ANYTHING); }
+{other}         { return S_ANYTHING; }
 {exec}{space}{sql}{space}{define}   {BEGIN(def_ident);}
 {space} {}
 {identifier}    {
index 929ab01ed215b0892686d3083d49e32067d75025..63389405c2d3061d5d1f431ae97286500df98bd7 100644 (file)
@@ -171,9 +171,9 @@ find_struct(char * name, char *next)
     if (c == '-')
     {
    next++;
-   return (find_struct_member(name, next, p->type->u.element->u.members));
+   return find_struct_member(name, next, p->type->u.element->u.members);
     }
-    else return (find_struct_member(name, next, p->type->u.members));
+    else return find_struct_member(name, next, p->type->u.members);
 }
 
 static struct variable *
@@ -333,7 +333,7 @@ make1_str(const char *str)
         char * res_str = (char *)mm_alloc(strlen(str) + 1);
 
    strcpy(res_str, str);
-   return (res_str);
+   return res_str;
 }
 
 static char *
index dd395c80eb94aeee60f610e133297bd271f6d7b6..cf115ea02d524e4c56a1de76ec1f1814b79420cb 100644 (file)
@@ -17,7 +17,7 @@ mm_alloc(size_t size)
        exit(OUT_OF_MEMORY);
    }
 
-   return (ptr);
+   return ptr;
 }
 
 /* duplicate memberlist */
index a619d6206b7b35d10b96a2b1c7a68300cbf27880..b442dfe242baab9555520555a19d9c519bed11ed 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclCmds.c,v 1.29 1998/08/17 03:50:22 scrappy Exp $
+ *   $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclCmds.c,v 1.30 1998/09/01 03:28:47 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -149,7 +149,7 @@ tcl_value(char *value)
    char       *p;
 
    if (!value)
-       return ((char *) NULL);
+       return (char *) NULL;
 
 #ifdef TCL_ARRAYS_DEBUG
    printf("pq_value  = '%s'\n", value);
@@ -218,7 +218,7 @@ tcl_value(char *value)
 #ifdef TCL_ARRAYS_DEBUG
    printf("tcl_value = '%s'\n\n", value);
 #endif
-   return (value);
+   return value;
 }
 
 #endif
index 5d137afe6de2d1810730a833c566361ce008dfec..bd90b2314f7fc0477081705657bbf41e56c96e15 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-auth.c,v 1.22 1998/08/17 03:50:31 scrappy Exp $
+ *   $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-auth.c,v 1.23 1998/09/01 03:28:50 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -149,7 +149,7 @@ pg_krb4_authname(char *PQerrormsg)
    static char name[SNAME_SZ + 1] = "";
 
    if (name[0])
-       return (name);
+       return name;
 
    pg_krb4_init();
 
@@ -160,9 +160,9 @@ pg_krb4_authname(char *PQerrormsg)
        (void) sprintf(PQerrormsg,
                       "pg_krb4_authname: krb_get_tf_fullname: %s\n",
                       krb_err_txt[status]);
-       return ((char *) NULL);
+       return (char *) NULL;
    }
-   return (name);
+   return name;
 }
 
 /*
@@ -218,9 +218,9 @@ pg_krb4_sendauth(const char *PQerrormsg, int sock,
        (void) sprintf(PQerrormsg,
                       "pg_krb4_sendauth: kerberos error: %s\n",
                       krb_err_txt[status]);
-       return (STATUS_ERROR);
+       return STATUS_ERROR;
    }
-   return (STATUS_OK);
+   return STATUS_OK;
 }
 
 #endif                         /* KRB4 */
@@ -253,7 +253,7 @@ pg_an_to_ln(const char *aname)
 
    if ((p = strchr(aname, '/')) || (p = strchr(aname, '@')))
        *p = '\0';
-   return (aname);
+   return aname;
 }
 
 
@@ -276,7 +276,7 @@ pg_krb5_init(void)
    static krb5_ccache ccache = (krb5_ccache) NULL;
 
    if (ccache)
-       return (ccache);
+       return ccache;
 
    /*
     * If the user set PGREALM, then we use a ticket file with a special
@@ -286,7 +286,7 @@ pg_krb5_init(void)
    {
        (void) sprintf(PQerrormsg,
                       "pg_krb5_init: krb5_cc_default_name failed\n");
-       return ((krb5_ccache) NULL);
+       return (krb5_ccache) NULL;
    }
    strcpy(tktbuf, defname);
    if (realm = getenv("PGREALM"))
@@ -301,9 +301,9 @@ pg_krb5_init(void)
                  "pg_krb5_init: Kerberos error %d in krb5_cc_resolve\n",
                       code);
        com_err("pg_krb5_init", code, "in krb5_cc_resolve");
-       return ((krb5_ccache) NULL);
+       return (krb5_ccache) NULL;
    }
-   return (ccache);
+   return ccache;
 }
 
 /*
@@ -321,7 +321,7 @@ pg_krb5_authname(const char *PQerrormsg)
    static char *authname = (char *) NULL;
 
    if (authname)
-       return (authname);
+       return authname;
 
    ccache = pg_krb5_init();    /* don't free this */
 
@@ -331,7 +331,7 @@ pg_krb5_authname(const char *PQerrormsg)
        "pg_krb5_authname: Kerberos error %d in krb5_cc_get_principal\n",
                       code);
        com_err("pg_krb5_authname", code, "in krb5_cc_get_principal");
-       return ((char *) NULL);
+       return (char *) NULL;
    }
    if (code = krb5_unparse_name(principal, &authname))
    {
@@ -340,10 +340,10 @@ pg_krb5_authname(const char *PQerrormsg)
                       code);
        com_err("pg_krb5_authname", code, "in krb5_unparse_name");
        krb5_free_principal(principal);
-       return ((char *) NULL);
+       return (char *) NULL;
    }
    krb5_free_principal(principal);
-   return (pg_an_to_ln(authname));
+   return pg_an_to_ln(authname);
 }
 
 /*
@@ -389,7 +389,7 @@ pg_krb5_sendauth(const char *PQerrormsg, int sock,
        "pg_krb5_sendauth: Kerberos error %d in krb5_cc_get_principal\n",
                       code);
        com_err("pg_krb5_sendauth", code, "in krb5_cc_get_principal");
-       return (STATUS_ERROR);
+       return STATUS_ERROR;
    }
 
    /*
@@ -418,7 +418,7 @@ pg_krb5_sendauth(const char *PQerrormsg, int sock,
                       code);
        com_err("pg_krb5_sendauth", code, "in krb5_parse_name");
        krb5_free_principal(client);
-       return (STATUS_ERROR);
+       return STATUS_ERROR;
    }
 
    /*
@@ -454,7 +454,7 @@ pg_krb5_sendauth(const char *PQerrormsg, int sock,
    }
    krb5_free_principal(client);
    krb5_free_principal(server);
-   return (code ? STATUS_ERROR : STATUS_OK);
+   return code ? STATUS_ERROR : STATUS_OK;
 }
 
 #endif                         /* KRB5 */
@@ -490,13 +490,13 @@ fe_sendauth(AuthRequest areq, PGconn *conn, const char *hostname,
            {
                (void) sprintf(PQerrormsg,
                            "fe_sendauth: krb4 authentication failed\n");
-               return (STATUS_ERROR);
+               return STATUS_ERROR;
            }
            break;
 #else
            (void) sprintf(PQerrormsg,
                     "fe_sendauth: krb4 authentication not supported\n");
-           return (STATUS_ERROR);
+           return STATUS_ERROR;
 #endif
 
        case AUTH_REQ_KRB5:
@@ -507,13 +507,13 @@ fe_sendauth(AuthRequest areq, PGconn *conn, const char *hostname,
            {
                (void) sprintf(PQerrormsg,
                            "fe_sendauth: krb5 authentication failed\n");
-               return (STATUS_ERROR);
+               return STATUS_ERROR;
            }
            break;
 #else
            (void) sprintf(PQerrormsg,
                     "fe_sendauth: krb5 authentication not supported\n");
-           return (STATUS_ERROR);
+           return STATUS_ERROR;
 #endif
 
        case AUTH_REQ_PASSWORD:
@@ -522,13 +522,13 @@ fe_sendauth(AuthRequest areq, PGconn *conn, const char *hostname,
            {
                (void) sprintf(PQerrormsg,
                 "fe_sendauth: no password supplied\n");
-               return (STATUS_ERROR);
+               return STATUS_ERROR;
            }
            if (pg_password_sendauth(conn, password, areq) != STATUS_OK)
            {
                (void) sprintf(PQerrormsg,
                 "fe_sendauth: error sending password authentication\n");
-               return (STATUS_ERROR);
+               return STATUS_ERROR;
            }
 
            break;
@@ -536,10 +536,10 @@ fe_sendauth(AuthRequest areq, PGconn *conn, const char *hostname,
        default:
            (void) sprintf(PQerrormsg,
            "fe_sendauth: authentication type %u not supported\n", areq);
-           return (STATUS_ERROR);
+           return STATUS_ERROR;
    }
 
-   return (STATUS_OK);
+   return STATUS_OK;
 }
 
 /*
@@ -576,7 +576,7 @@ fe_getauthsvc(char *PQerrormsg)
 {
    if (pg_authsvc < 0 || pg_authsvc >= n_authsvcs)
        fe_setauthsvc(DEFAULT_CLIENT_AUTHSVC, PQerrormsg);
-   return (authsvcs[pg_authsvc].msgtype);
+   return authsvcs[pg_authsvc].msgtype;
 }
 
 /*
@@ -629,5 +629,5 @@ fe_getauthname(char *PQerrormsg)
 
    if (name && (authn = (char *) malloc(strlen(name) + 1)))
        strcpy(authn, name);
-   return (authn);
+   return authn;
 }
index 36847863084dee2a85e5d6c55c69c84e45ef6d54..e8a38f6465b486df1ece1820492cd428232b4217 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.63 1998/08/29 02:09:24 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.64 1998/09/01 03:28:51 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -650,7 +650,7 @@ PQisBusy(PGconn *conn)
    parseInput(conn);
 
    /* PQgetResult will return immediately in all states except BUSY. */
-   return (conn->asyncStatus == PGASYNC_BUSY);
+   return conn->asyncStatus == PGASYNC_BUSY;
 }
 
 
@@ -1410,7 +1410,7 @@ PQcmdTuples(PGresult *res)
        }
        p++;
        if (*(res->cmdStatus) != 'I')   /* UPDATE/DELETE */
-           return (p);
+           return p;
        while (*p != ' ' && *p)
            p++;                /* INSERT: skip oid */
        if (*p == 0)
@@ -1421,7 +1421,7 @@ PQcmdTuples(PGresult *res)
            return "";
        }
        p++;
-       return (p);
+       return p;
    }
    return "";
 }
index 4671373090d934337488901e9103a9387f0a163e..6e0a6e3ff4ac20bd743336ebedda32ed2f41b63b 100644 (file)
@@ -9,7 +9,7 @@
  * didn't really belong there.
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-print.c,v 1.10 1998/08/17 03:50:39 scrappy Exp $
+ *   $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-print.c,v 1.11 1998/09/01 03:28:54 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -55,17 +55,17 @@ static struct winsize
 static void
 do_field(PQprintOpt *po, PGresult *res,
         const int i, const int j, char *buf, const int fs_len,
-        char *fields[],
-        const int nFields, char *fieldNames[],
-        unsigned char fieldNotNum[], int fieldMax[],
+        char **fields,
+        const int nFields, char **fieldNames,
+        unsigned char *fieldNotNum, int *fieldMax,
         const int fieldMaxLen, FILE *fout);
 static char *
 do_header(FILE *fout, PQprintOpt *po, const int nFields,
-         int fieldMax[], char *fieldNames[], unsigned char fieldNotNum[],
+         int *fieldMax, char **fieldNames, unsigned char *fieldNotNum,
          const int fs_len, PGresult *res);
 static void
-output_row(FILE *fout, PQprintOpt *po, const int nFields, char *fields[],
-          unsigned char fieldNotNum[], int fieldMax[], char *border,
+output_row(FILE *fout, PQprintOpt *po, const int nFields, char **fields,
+          unsigned char *fieldNotNum, int *fieldMax, char *border,
           const int row_index);
 static void fill(int length, int max, char filler, FILE *fp);
 
@@ -521,9 +521,9 @@ int PQmblen(unsigned char *s)
 static void
 do_field(PQprintOpt *po, PGresult *res,
         const int i, const int j, char *buf, const int fs_len,
-        char *fields[],
-        const int nFields, char *fieldNames[],
-        unsigned char fieldNotNum[], int fieldMax[],
+        char **fields,
+        const int nFields, char **fieldNames,
+        unsigned char *fieldNotNum, int *fieldMax,
         const int fieldMaxLen, FILE *fout)
 {
 
@@ -626,8 +626,8 @@ do_field(PQprintOpt *po, PGresult *res,
 
 
 static char *
-do_header(FILE *fout, PQprintOpt *po, const int nFields, int fieldMax[],
-         char *fieldNames[], unsigned char fieldNotNum[],
+do_header(FILE *fout, PQprintOpt *po, const int nFields, int *fieldMax,
+         char **fieldNames, unsigned char *fieldNotNum,
          const int fs_len, PGresult *res)
 {
 
@@ -714,8 +714,8 @@ do_header(FILE *fout, PQprintOpt *po, const int nFields, int fieldMax[],
 
 
 static void
-output_row(FILE *fout, PQprintOpt *po, const int nFields, char *fields[],
-          unsigned char fieldNotNum[], int fieldMax[], char *border,
+output_row(FILE *fout, PQprintOpt *po, const int nFields, char **fields,
+          unsigned char *fieldNotNum, int *fieldMax, char *border,
           const int row_index)
 {
 
index aa678066577af208f8a3019148db05d7e40fecfb..a72e2289a0daccd71863469babefab41e60e00fe 100644 (file)
@@ -2,5 +2,5 @@
 #include 
 BOOL WINAPI DllMain( HINSTANCE hinstDLL,                      DWORD fdwReason,
                      LPVOID lpReserved ){
-   return (TRUE);
+   return TRUE;
 }
index 58de98b450c93a06ef76aaa83e246c2353c0f48e..8e48a1b94d45cb1d8c43410f5bfb4e8a3c3c068e 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/interfaces/libpq/pqsignal.c,v 1.7 1998/08/17 03:50:43 scrappy Exp $
+ *   $Header: /cvsroot/pgsql/src/interfaces/libpq/pqsignal.c,v 1.8 1998/09/01 03:28:56 momjian Exp $
  *
  * NOTES
  *     This shouldn't be in libpq, but the monitor and some other
@@ -36,7 +36,7 @@ pqsignal(int signo, pqsigfunc func)
    if (signo != SIGALRM)
        act.sa_flags |= SA_RESTART;
    if (sigaction(signo, &act, &oact) < 0)
-       return (SIG_ERR);
-   return (oact.sa_handler);
+       return SIG_ERR;
+   return oact.sa_handler;
 #endif                         /* !USE_POSIX_SIGNALS */
 }
index 41e6e74635104dcd5eef59e92f18597465b50a0e..c13d9969e94cb5f908f4b3f84ef3283cff7f365b 100644 (file)
@@ -80,7 +80,7 @@ char new_field_name[MAX_MESSAGE_LEN+1];
            CI_set_field_info(self, lf, new_field_name, new_adtid, new_adtsize);
    }
 
-   return (SOCK_get_errcode(sock) == 0);
+   return SOCK_get_errcode(sock) == 0;
 }
 
 
index 536f211a2dcdcb260e88f7117b75c836007333b4..2f4f1763bc3c730431a2e2b1ffdc04f68b934394 100644 (file)
@@ -283,7 +283,7 @@ RETCODE SQL_API SQLTransact(
         UWORD   fType)
 {
 char *func = "SQLTransact";
-extern ConnectionClass *conns[];
+extern ConnectionClass **conns;
 ConnectionClass *conn;
 QResultClass *res;
 char ok, *stmt_string;
index 82232104e295e63004fb03233a368b8c6bddbb21..96c11294126df579db3b8147bec1205f527b4c80 100644 (file)
@@ -3,7 +3,7 @@
  *           procedural language
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_comp.c,v 1.1 1998/08/24 19:14:48 momjian Exp $
+ *    $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_comp.c,v 1.2 1998/09/01 03:29:03 momjian Exp $
  *
  *    This software is copyrighted by Jan Wieck - Hamburg.
  *
@@ -107,7 +107,7 @@ PLpgSQL_function *plpgsql_compile(Oid fn_oid, int functype)
     HeapTuple      procTup;
     Form_pg_proc   procStruct;
     HeapTuple      typeTup;
-    TypeTupleForm  typeStruct;
+    Form_pg_type   typeStruct;
     char       *proc_source;
     PLpgSQL_function   *function;
     PLpgSQL_var        *var;
@@ -183,7 +183,7 @@ PLpgSQL_function *plpgsql_compile(Oid fn_oid, int functype)
        elog(ERROR, "cache lookup for return type %d failed",
                procStruct->prorettype);
        }
-       typeStruct = (TypeTupleForm) GETSTRUCT(typeTup);
+       typeStruct = (Form_pg_type) GETSTRUCT(typeTup);
        if (typeStruct->typrelid != InvalidOid) {
        function->fn_retistuple = true;
        } else {
@@ -211,7 +211,7 @@ PLpgSQL_function *plpgsql_compile(Oid fn_oid, int functype)
            elog(ERROR, "cache lookup for argument type %d failed",
                procStruct->proargtypes[i]);
        }
-       typeStruct = (TypeTupleForm) GETSTRUCT(typeTup);
+       typeStruct = (Form_pg_type) GETSTRUCT(typeTup);
 
        if (typeStruct->typrelid != InvalidOid) {
            /* ----------
@@ -522,7 +522,7 @@ int plpgsql_parse_word(char *word)
     PLpgSQL_nsitem     *nse;
     char           *cp;
     HeapTuple          typeTup;
-    TypeTupleForm      typeStruct;
+    Form_pg_type       typeStruct;
     char           *typeXlated;
 
     /* ----------
@@ -597,7 +597,7 @@ int plpgsql_parse_word(char *word)
     if (HeapTupleIsValid(typeTup)) {
    PLpgSQL_type    *typ;
 
-   typeStruct = (TypeTupleForm) GETSTRUCT(typeTup);
+   typeStruct = (Form_pg_type) GETSTRUCT(typeTup);
 
    if (typeStruct->typrelid != InvalidOid) {
        pfree(cp);
@@ -857,7 +857,7 @@ int plpgsql_parse_wordtype(char *word)
     PLpgSQL_nsitem     *nse;
     char           *cp;
     HeapTuple          typeTup;
-    TypeTupleForm      typeStruct;
+    Form_pg_type       typeStruct;
     char           *typeXlated;
     bool           old_nsstate;
 
@@ -901,7 +901,7 @@ int plpgsql_parse_wordtype(char *word)
     if (HeapTupleIsValid(typeTup)) {
    PLpgSQL_type    *typ;
 
-   typeStruct = (TypeTupleForm) GETSTRUCT(typeTup);
+   typeStruct = (Form_pg_type) GETSTRUCT(typeTup);
 
    if (typeStruct->typrelid != InvalidOid) {
        pfree(cp);
@@ -945,9 +945,9 @@ int plpgsql_parse_dblwordtype(char *string)
     HeapTuple      classtup;
     Form_pg_class  classStruct;
     HeapTuple      attrtup;
-    AttributeTupleForm attrStruct;
+    Form_pg_attribute  attrStruct;
     HeapTuple      typetup;
-    TypeTupleForm  typeStruct;
+    Form_pg_type   typeStruct;
     PLpgSQL_type   *typ;
 
 
@@ -1027,7 +1027,7 @@ int plpgsql_parse_dblwordtype(char *string)
    pfree(word1);
    return T_ERROR;
     }
-    attrStruct = (AttributeTupleForm)GETSTRUCT(attrtup);
+    attrStruct = (Form_pg_attribute)GETSTRUCT(attrtup);
 
     typetup = SearchSysCacheTuple(TYPOID,
        ObjectIdGetDatum(attrStruct->atttypid), 0, 0, 0);
@@ -1041,7 +1041,7 @@ int plpgsql_parse_dblwordtype(char *string)
      * Found that - build a compiler type struct and return it
      * ----------
      */
-    typeStruct = (TypeTupleForm)GETSTRUCT(typetup);
+    typeStruct = (Form_pg_type)GETSTRUCT(typetup);
 
     typ = (PLpgSQL_type *)malloc(sizeof(PLpgSQL_type));
 
@@ -1068,9 +1068,9 @@ int plpgsql_parse_wordrowtype(char *string)
     HeapTuple      classtup;
     Form_pg_class  classStruct;
     HeapTuple      typetup;
-    TypeTupleForm  typeStruct;
+    Form_pg_type   typeStruct;
     HeapTuple      attrtup;
-    AttributeTupleForm attrStruct;
+    Form_pg_attribute  attrStruct;
     char       *word1;
     char       *cp;
     int            i;
@@ -1135,7 +1135,7 @@ int plpgsql_parse_wordrowtype(char *string)
        elog(ERROR, "cache lookup for attribute %d of class %s failed",
                i + 1, word1);
    }
-   attrStruct = (AttributeTupleForm)GETSTRUCT(attrtup);
+   attrStruct = (Form_pg_attribute)GETSTRUCT(attrtup);
 
    typetup = SearchSysCacheTuple(TYPOID,
        ObjectIdGetDatum(attrStruct->atttypid), 0, 0, 0);
@@ -1145,7 +1145,7 @@ int plpgsql_parse_wordrowtype(char *string)
                attrStruct->atttypid, word1,
            nameout(&(attrStruct->attname)));
    }
-   typeStruct = (TypeTupleForm)GETSTRUCT(typetup);
+   typeStruct = (Form_pg_type)GETSTRUCT(typetup);
 
    cp = strdup(nameout(&(attrStruct->attname)));
 
index d33b79ef53e1c225765dfe5f3c9a490c04131feb..9c43f90ef5037e4cc59e693358ca498b15c302be 100644 (file)
@@ -3,7 +3,7 @@
  *           procedural language
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.1 1998/08/24 19:14:48 momjian Exp $
+ *    $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.2 1998/09/01 03:29:05 momjian Exp $
  *
  *    This software is copyrighted by Jan Wieck - Hamburg.
  *
@@ -1459,7 +1459,7 @@ static int exec_stmt_return(PLpgSQL_execstate *estate, PLpgSQL_stmt_return *stmt
 static int exec_stmt_raise(PLpgSQL_execstate *estate, PLpgSQL_stmt_raise *stmt)
 {
     HeapTuple      typetup;
-    TypeTupleForm  typeStruct;
+    Form_pg_type   typeStruct;
     FmgrInfo       finfo_output;
     char       *extval;
     int            pidx = 0;
@@ -1505,7 +1505,7 @@ static int exec_stmt_raise(PLpgSQL_execstate *estate, PLpgSQL_stmt_raise *stmt)
            if (!HeapTupleIsValid(typetup)) {
                elog(ERROR, "cache lookup for type %d failed (1)", var->datatype->typoid);
            }
-           typeStruct = (TypeTupleForm) GETSTRUCT(typetup);
+           typeStruct = (Form_pg_type) GETSTRUCT(typetup);
 
            fmgr_info(typeStruct->typoutput, &finfo_output);
            extval = (char *)(*fmgr_faddr(&finfo_output))(var->value, &(var->isnull), var->datatype->atttypmod);
@@ -1794,7 +1794,7 @@ static void exec_assign_value(PLpgSQL_execstate *estate,
     Oid            atttype;
     int4       atttypmod;
     HeapTuple      typetup;
-    TypeTupleForm  typeStruct;
+    Form_pg_type   typeStruct;
     FmgrInfo       finfo_input;
 
     switch (target->dtype) {
@@ -1883,7 +1883,7 @@ static void exec_assign_value(PLpgSQL_execstate *estate,
        if (!HeapTupleIsValid(typetup)) {
            elog(ERROR, "cache lookup for type %d failed", atttype);
        }
-       typeStruct = (TypeTupleForm) GETSTRUCT(typetup);
+       typeStruct = (Form_pg_type) GETSTRUCT(typetup);
        fmgr_info(typeStruct->typinput, &finfo_input);
 
        attisnull = *isNull;
@@ -2203,7 +2203,7 @@ static Datum exec_cast_value(Datum value, Oid valtype,
     */
    if (valtype != reqtype || reqtypmod > 0) {
        HeapTuple       typetup;
-       TypeTupleForm   typeStruct;
+       Form_pg_type    typeStruct;
        FmgrInfo        finfo_output;
        char        *extval;
 
@@ -2212,7 +2212,7 @@ static Datum exec_cast_value(Datum value, Oid valtype,
        if (!HeapTupleIsValid(typetup)) {
        elog(ERROR, "cache lookup for type %d failed", valtype);
        }
-       typeStruct = (TypeTupleForm) GETSTRUCT(typetup);
+       typeStruct = (Form_pg_type) GETSTRUCT(typetup);
 
        fmgr_info(typeStruct->typoutput, &finfo_output);
        extval = (char *)(*fmgr_faddr(&finfo_output))(value, &isnull, -1);
index a0736dbcdac63ee2fd1959e4faf78169bde7b211..6202816afe8fe77d7f676602811d26b507fbd3ad 100644 (file)
@@ -3,7 +3,7 @@
  *           procedural language (PL)
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.4 1998/08/19 02:04:14 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.5 1998/09/01 03:29:08 momjian Exp $
  *
  *   This software is copyrighted by Jan Wieck - Hamburg.
  *
@@ -481,7 +481,7 @@ pltcl_func_handler(FmgrInfo *proinfo,
        HeapTuple   procTup;
        HeapTuple   typeTup;
        Form_pg_proc procStruct;
-       TypeTupleForm typeStruct;
+       Form_pg_type typeStruct;
        Tcl_DString proc_internal_def;
        Tcl_DString proc_internal_body;
        char        proc_internal_args[4096];
@@ -522,7 +522,7 @@ pltcl_func_handler(FmgrInfo *proinfo,
            free(prodesc);
            elog(ERROR, "pltcl: cache lookup for return type failed");
        }
-       typeStruct = (TypeTupleForm) GETSTRUCT(typeTup);
+       typeStruct = (Form_pg_type) GETSTRUCT(typeTup);
 
        if (typeStruct->typrelid != InvalidOid)
        {
@@ -552,7 +552,7 @@ pltcl_func_handler(FmgrInfo *proinfo,
                free(prodesc);
                elog(ERROR, "pltcl: cache lookup for argument type failed");
            }
-           typeStruct = (TypeTupleForm) GETSTRUCT(typeTup);
+           typeStruct = (Form_pg_type) GETSTRUCT(typeTup);
 
            if (typeStruct->typrelid != InvalidOid)
            {
@@ -1147,8 +1147,8 @@ pltcl_trigger_handler(FmgrInfo *proinfo)
                 ret_values[--i],
                 ObjectIdGetDatum(tupdesc->attrs[attnum - 1]->atttypid));
        }
-       typinput = (Oid) (((TypeTupleForm) GETSTRUCT(typeTup))->typinput);
-       typelem = (Oid) (((TypeTupleForm) GETSTRUCT(typeTup))->typelem);
+       typinput = (Oid) (((Form_pg_type) GETSTRUCT(typeTup))->typinput);
+       typelem = (Oid) (((Form_pg_type) GETSTRUCT(typeTup))->typelem);
 
        /************************************************************
         * Set the attribute to NOT NULL and convert the contents
@@ -1616,11 +1616,11 @@ pltcl_SPI_prepare(ClientData cdata, Tcl_Interp * interp,
        if (!HeapTupleIsValid(typeTup))
            elog(ERROR, "pltcl: Cache lookup of type %s failed", args[i]);
        qdesc->argtypes[i] = typeTup->t_oid;
-       fmgr_info(((TypeTupleForm) GETSTRUCT(typeTup))->typinput,
+       fmgr_info(((Form_pg_type) GETSTRUCT(typeTup))->typinput,
                  &(qdesc->arginfuncs[i]));
-       qdesc->argtypelems[i] = ((TypeTupleForm) GETSTRUCT(typeTup))->typelem;
+       qdesc->argtypelems[i] = ((Form_pg_type) GETSTRUCT(typeTup))->typelem;
        qdesc->argvalues[i] = (Datum) NULL;
-       qdesc->arglen[i] = (int) (((TypeTupleForm) GETSTRUCT(typeTup))->typlen);
+       qdesc->arglen[i] = (int) (((Form_pg_type) GETSTRUCT(typeTup))->typlen);
    }
 
    /************************************************************
@@ -2164,8 +2164,8 @@ pltcl_set_tuple_values(Tcl_Interp * interp, char *arrayname,
                 attname, ObjectIdGetDatum(tupdesc->attrs[i]->atttypid));
        }
 
-       typoutput = (Oid) (((TypeTupleForm) GETSTRUCT(typeTup))->typoutput);
-       typelem = (Oid) (((TypeTupleForm) GETSTRUCT(typeTup))->typelem);
+       typoutput = (Oid) (((Form_pg_type) GETSTRUCT(typeTup))->typoutput);
+       typelem = (Oid) (((Form_pg_type) GETSTRUCT(typeTup))->typelem);
 
        /************************************************************
         * If there is a value, set the variable
@@ -2237,8 +2237,8 @@ pltcl_build_tuple_argument(HeapTuple tuple, TupleDesc tupdesc,
                 attname, ObjectIdGetDatum(tupdesc->attrs[i]->atttypid));
        }
 
-       typoutput = (Oid) (((TypeTupleForm) GETSTRUCT(typeTup))->typoutput);
-       typelem = (Oid) (((TypeTupleForm) GETSTRUCT(typeTup))->typelem);
+       typoutput = (Oid) (((Form_pg_type) GETSTRUCT(typeTup))->typoutput);
+       typelem = (Oid) (((Form_pg_type) GETSTRUCT(typeTup))->typelem);
 
        /************************************************************
         * If there is a value, append the attribute name and the
index afc48d7644040d3556cd7ff4cf7f5b659d990829..ac3d4304e1cd3489b4d6ee102e8efe58810cee70 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Header: /cvsroot/pgsql/src/test/regress/regress.c,v 1.27 1998/07/20 16:57:18 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/test/regress/regress.c,v 1.28 1998/09/01 03:29:11 momjian Exp $
  */
 
 #include              /* faked on sunos */
@@ -68,7 +68,7 @@ PATH     *path;
            }
            break;
    }
-   return (result);
+   return result;
 }
 
 /* this essentially does a cartesian product of the lsegs in the
@@ -100,7 +100,7 @@ PATH       *p2;
            pfree(tmp);
        }
 
-   return (min);
+   return min;
 }
 
 PATH *
@@ -121,7 +121,7 @@ POLYGON    *poly;
 
    sprintf(buf, "%c", RDELIM);
    strcat(output, buf);
-   return (path_in(output));
+   return path_in(output);
 }
 
 /* return the point where two paths intersect. Assumes that they do. */
@@ -160,7 +160,7 @@ PATH       *p2;
 #endif
    retval = lseg_interpt(&seg1, &seg2);
 
-   return (retval);
+   return retval;
 }
 
 
@@ -187,7 +187,7 @@ TUPLE       tuple;
    long        salary;
 
    salary = (long) GetAttributeByName(tuple, "salary", &isnull);
-   return (salary > 699);
+   return salary > 699;
 }
 
 /* New type "widget"
@@ -218,12 +218,12 @@ char     *str;
    WIDGET     *result;
 
    if (str == NULL)
-       return (NULL);
+       return NULL;
    for (i = 0, p = str; *p && i < NARGS && *p != RDELIM; p++)
        if (*p == ',' || (*p == LDELIM && !i))
            coord[i++] = p + 1;
    if (i < NARGS - 1)
-       return (NULL);
+       return NULL;
    result = (WIDGET *) palloc(sizeof(WIDGET));
    result->center.x = atof(coord[0]);
    result->center.y = atof(coord[1]);
@@ -231,7 +231,7 @@ char       *str;
 
    sprintf(buf2, "widget_in: read (%f, %f, %f)\n", result->center.x,
            result->center.y, result->radius);
-   return (result);
+   return result;
 }
 
 char *
@@ -241,12 +241,12 @@ WIDGET       *widget;
    char       *result;
 
    if (widget == NULL)
-       return (NULL);
+       return NULL;
 
    result = (char *) palloc(60);
    sprintf(result, "(%g,%g,%g)",
            widget->center.x, widget->center.y, widget->radius);
-   return (result);
+   return result;
 }
 
 int
@@ -256,7 +256,7 @@ WIDGET     *widget;
 {
    extern double point_dt();
 
-   return (point_dt(point, &widget->center) < widget->radius);
+   return point_dt(point, &widget->center) < widget->radius;
 }
 
 #define ABS(X) ((X) > 0 ? (X) : -(X))
@@ -272,7 +272,7 @@ BOX        *box;
 
    width = ABS(box->high.x - box->low.x);
    height = ABS(box->high.y - box->low.y);
-   return (width * height);
+   return width * height;
 }
 
 char *
@@ -286,7 +286,7 @@ char       *string;
    if (!(new_string = palloc(NAMEDATALEN)))
    {
        fprintf(stderr, "reverse_name: palloc failed\n");
-       return (NULL);
+       return NULL;
    }
    MemSet(new_string, 0, NAMEDATALEN);
    for (i = 0; i < NAMEDATALEN && string[i]; ++i)
@@ -296,7 +296,7 @@ char       *string;
    len = i;
    for (; i >= 0; --i)
        new_string[len - i] = string[i];
-   return (new_string);
+   return new_string;
 }
 
 #include "executor/spi.h"      /* this is what you need to work with SPI */
@@ -355,11 +355,11 @@ funny_dup17()
    if (*level == 17)
    {
        *recursion = false;
-       return (tuple);
+       return tuple;
    }
 
    if (!(*recursion))
-       return (tuple);
+       return tuple;
 
    (*level)++;
 
@@ -409,7 +409,7 @@ funny_dup17()
    if (*level == 0)
        *xid = InvalidTransactionId;
 
-   return (tuple);
+   return tuple;
 }
 
 HeapTuple  ttdummy(void);
@@ -465,7 +465,7 @@ ttdummy()
    if (ttoff)                  /* OFF - nothing to do */
    {
        pfree(relname);
-       return ((newtuple != NULL) ? newtuple : trigtuple);
+       return (newtuple != NULL) ? newtuple : trigtuple;
    }
 
    trigger = CurrentTriggerData->tg_trigger;
@@ -514,13 +514,13 @@ ttdummy()
        if (newoff != TTDUMMY_INFINITY)
        {
            pfree(relname);     /* allocated in upper executor context */
-           return (NULL);
+           return NULL;
        }
    }
    else if (oldoff != TTDUMMY_INFINITY)        /* DELETE */
    {
        pfree(relname);
-       return (NULL);
+       return NULL;
    }
 
    {
@@ -614,7 +614,7 @@ ttdummy()
 
    pfree(relname);
 
-   return (rettuple);
+   return rettuple;
 }
 
 int32
@@ -624,20 +624,20 @@ set_ttdummy(int32 on)
    if (ttoff)                  /* OFF currently */
    {
        if (on == 0)
-           return (0);
+           return 0;
 
        /* turn ON */
        ttoff = false;
-       return (0);
+       return 0;
    }
 
    /* ON currently */
    if (on != 0)
-       return (1);
+       return 1;
 
    /* turn OFF */
    ttoff = true;
 
-   return (1);
+   return 1;
 
 }
index bf8b09eb17c082a1ceea7ef42f9beb29f1f7cd08..49317448216df8e605bdfbef2fcd3b8f73a2e56e 100644 (file)
@@ -49,7 +49,7 @@ complex_in(char *str)
    result = (Complex *) palloc(sizeof(Complex));
    result->x = x;
    result->y = y;
-   return (result);
+   return result;
 }
 
 /*
@@ -66,11 +66,11 @@ complex_out(Complex * complex)
    char       *result;
 
    if (complex == NULL)
-       return (NULL);
+       return NULL;
 
    result = (char *) palloc(60);
    sprintf(result, "(%g,%g)", complex->x, complex->y);
-   return (result);
+   return result;
 }
 
 /*****************************************************************************
@@ -85,7 +85,7 @@ complex_add(Complex * a, Complex * b)
    result = (Complex *) palloc(sizeof(Complex));
    result->x = a->x + b->x;
    result->y = a->y + b->y;
-   return (result);
+   return result;
 }
 
 
@@ -101,7 +101,7 @@ complex_abs_lt(Complex * a, Complex * b)
    double      amag = Mag(a),
                bmag = Mag(b);
 
-   return (amag < bmag);
+   return amag < bmag;
 }
 
 bool
@@ -110,7 +110,7 @@ complex_abs_le(Complex * a, Complex * b)
    double      amag = Mag(a),
                bmag = Mag(b);
 
-   return (amag <= bmag);
+   return amag <= bmag;
 }
 
 bool
@@ -119,7 +119,7 @@ complex_abs_eq(Complex * a, Complex * b)
    double      amag = Mag(a),
                bmag = Mag(b);
 
-   return (amag == bmag);
+   return amag == bmag;
 }
 
 bool
@@ -128,7 +128,7 @@ complex_abs_ge(Complex * a, Complex * b)
    double      amag = Mag(a),
                bmag = Mag(b);
 
-   return (amag >= bmag);
+   return amag >= bmag;
 }
 
 bool
@@ -137,7 +137,7 @@ complex_abs_gt(Complex * a, Complex * b)
    double      amag = Mag(a),
                bmag = Mag(b);
 
-   return (amag > bmag);
+   return amag > bmag;
 }
 
 int4
index 71371f5160968fbf7b7378b4062433c60229bed5..42b3a3589efd13ec8f2ebf322a50ace3db015f99 100644 (file)
@@ -30,7 +30,7 @@ c_overpaid(TUPLE t,               /* the current instance of EMP */
 int
 add_one(int arg)
 {
-   return (arg + 1);
+   return arg + 1;
 }
 
 char16 *
@@ -63,7 +63,7 @@ copytext(text *t)
           (void *) VARDATA(t), /* source */
           VARSIZE(t) - VARHDRSZ);      /* how many bytes */
 
-   return (new_t);
+   return new_t;
 }
 
 bool
@@ -76,6 +76,6 @@ c_overpaid(TUPLE t,               /* the current instance of EMP */
    salary = (int4) GetAttributeByName(t, "salary", &isnull);
 
    if (isnull)
-       return (false);
-   return (salary > limit);
+       return false;
+   return salary > limit;
 }
index 5dddf86072a539868cf80d5e1e85803e0e28b8a1..793415c2afe989e9d3c7210dcb6ab5c75ed70907 100644 (file)
@@ -67,12 +67,12 @@ getopt(nargc, nargv, ostr)
        optreset = 0;
        if (optind >= nargc || *(place = nargv[optind]) != '-') {
            place = EMSG;
-           return (-1);
+           return -1;
        }
        if (place[1] && *++place == '-') {  /* found "--" */
            ++optind;
            place = EMSG;
-           return (-1);
+           return -1;
        }
    }                   /* option letter okay? */
    if ((optopt = (int)*place++) == (int)':' ||
@@ -82,13 +82,13 @@ getopt(nargc, nargv, ostr)
         * assume it means -1.
         */
        if (optopt == (int)'-')
-           return (-1);
+           return -1;
        if (!*place)
            ++optind;
        if (opterr && *ostr != ':')
            (void)fprintf(stderr,
                "%s: illegal option -- %c\n", __progname, optopt);
-       return (BADCH);
+       return BADCH;
    }
    if (*++oli != ':') {            /* don't need argument */
        optarg = NULL;
@@ -101,17 +101,17 @@ getopt(nargc, nargv, ostr)
        else if (nargc <= ++optind) {   /* no arg */
            place = EMSG;
            if (*ostr == ':')
-               return (BADARG);
+               return BADARG;
            if (opterr)
                (void)fprintf(stderr,
                    "%s: option requires an argument -- %c\n",
                    __progname, optopt);
-           return (BADCH);
+           return BADCH;
        }
        else                /* white space */
            optarg = nargv[optind];
        place = EMSG;
        ++optind;
    }
-   return (optopt);            /* dump back option letter */
+   return optopt;          /* dump back option letter */
 }