mirror of
https://github.com/postgres/postgres.git
synced 2025-11-16 15:02:33 +03:00
Renaming cleanup, no pgindent yet.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user