item = (IndexTuple) PageGetItem(p, itemid);
if (i == *(v.spl_left)) {
- (void) gistPageAddItem(giststate, r, left, (Item) item,
+ gistPageAddItem(giststate, r, left, (Item) item,
IndexTupleSize(item),
leftoff, LP_USED, &tmpdentry, &newtup);
leftoff = OffsetNumberNext(leftoff);
pfree(newtup);
}
else {
- (void) gistPageAddItem(giststate, r, right, (Item) item,
+ gistPageAddItem(giststate, r, right, (Item) item,
IndexTupleSize(item),
rightoff, LP_USED, &tmpdentry, &newtup);
rightoff = OffsetNumberNext(rightoff);
/* now insert the new index tuple */
if (*(v.spl_left) != FirstOffsetNumber) {
- (void) gistPageAddItem(giststate, r, left, (Item) itup,
+ gistPageAddItem(giststate, r, left, (Item) itup,
IndexTupleSize(itup),
leftoff, LP_USED, &tmpdentry, &newtup);
leftoff = OffsetNumberNext(leftoff);
if (itup != newtup)
pfree(newtup);
} else {
- (void) gistPageAddItem(giststate, r, right, (Item) itup,
+ gistPageAddItem(giststate, r, right, (Item) itup,
IndexTupleSize(itup),
rightoff, LP_USED, &tmpdentry, &newtup);
rightoff = OffsetNumberNext(rightoff);
pfree(res);
gistdoinsert(r, rtup, giststate);
} else {
- (void) gistPageAddItem(giststate, r, p, (Item)ltup,
+ gistPageAddItem(giststate, r, p, (Item)ltup,
IndexTupleSize(ltup), InvalidOffsetNumber,
LP_USED, &tmpentry, &newtup);
WriteBuffer(b);
pfree(tmpentry.pred);
if (ltup != newtup)
pfree(newtup);
- (void)gistentryinsert(r, stk, rtup, giststate);
+ gistentryinsert(r, stk, rtup, giststate);
}
}
b = ReadBuffer(r, GISTP_ROOT);
GISTInitBuffer(b, 0);
p = BufferGetPage(b);
- (void) gistPageAddItem(giststate, r, p, (Item) lt, IndexTupleSize(lt),
+ gistPageAddItem(giststate, r, p, (Item) lt, IndexTupleSize(lt),
FirstOffsetNumber,
LP_USED, &tmpentry, &newtup);
/* be tidy */
pfree(tmpentry.pred);
if (lt != newtup)
pfree(newtup);
- (void) gistPageAddItem(giststate, r, p, (Item) rt, IndexTupleSize(rt),
+ gistPageAddItem(giststate, r, p, (Item) rt, IndexTupleSize(rt),
OffsetNumberNext(FirstOffsetNumber), LP_USED,
&tmpentry, &newtup);
/* be tidy */
memcpy(upper, VARDATA(TRUPPER(r)), VARSIZE(TRUPPER(r)) - VARHDRSZ);
upper[VARSIZE(TRUPPER(r)) - VARHDRSZ] = '\0';
- (void) sprintf(result, "[%s,%s): %d", lower, upper, r->flag);
+ sprintf(result, "[%s,%s): %d", lower, upper, r->flag);
pfree(lower);
pfree(upper);
return(result);
if (r == NULL)
return(NULL);
result = (char *)palloc(80);
- (void) sprintf(result, "[%d,%d): %d",r->lower, r->upper, r->flag);
+ sprintf(result, "[%d,%d): %d",r->lower, r->upper, r->flag);
return(result);
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/hash/hashinsert.c,v 1.7 1996/11/05 09:40:18 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashinsert.c,v 1.8 1997/08/12 22:51:30 momjian Exp $
*
*-------------------------------------------------------------------------
*/
_hash_checkpage(page, LH_BUCKET_PAGE|LH_OVERFLOW_PAGE);
itup_off = OffsetNumberNext(PageGetMaxOffsetNumber(page));
- (void) PageAddItem(page, (Item) hitem, itemsize, itup_off, LP_USED);
+ PageAddItem(page, (Item) hitem, itemsize, itup_off, LP_USED);
/* write the buffer, but hold our lock */
_hash_wrtnorelbuf(rel, buf);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.8 1996/11/05 09:40:20 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.9 1997/08/12 22:51:34 momjian Exp $
*
* NOTES
* Overflow pages look like ordinary relation pages.
nextblkno = ovflopaque->hasho_nextblkno;
prevblkno = ovflopaque->hasho_prevblkno;
bucket = ovflopaque->hasho_bucket;
- (void) memset(ovflpage, 0, BufferGetPageSize(ovflbuf));
+ memset(ovflpage, 0, BufferGetPageSize(ovflbuf));
_hash_wrtbuf(rel, ovflbuf);
/*
/* set all of the bits above 'nbits' to 1 */
clearints = ((nbits - 1) >> INT_TO_BIT) + 1;
clearbytes = clearints << INT_TO_BYTE;
- (void) memset((char *) freep, 0, clearbytes);
- (void) memset(((char *) freep) + clearbytes, 0xFF,
+ memset((char *) freep, 0, clearbytes);
+ memset(((char *) freep) + clearbytes, 0xFF,
BMPGSZ_BYTE(metap) - clearbytes);
freep[clearints - 1] = ALL_SET << (nbits & INT_MASK);
* page.
*/
woffnum = OffsetNumberNext(PageGetMaxOffsetNumber(wpage));
- (void) PageAddItem(wpage, (Item) hitem, itemsz, woffnum, LP_USED);
+ PageAddItem(wpage, (Item) hitem, itemsz, woffnum, LP_USED);
/*
* delete the tuple from the "read" page.
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/hash/hashpage.c,v 1.7 1996/11/05 09:40:21 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashpage.c,v 1.8 1997/08/12 22:51:37 momjian Exp $
*
* NOTES
* Postgres hash pages look like ordinary relation pages. The opaque
}
noffnum = OffsetNumberNext(PageGetMaxOffsetNumber(npage));
- (void) PageAddItem(npage, (Item) hitem, itemsz, noffnum, LP_USED);
+ PageAddItem(npage, (Item) hitem, itemsz, noffnum, LP_USED);
_hash_wrtnorelbuf(rel, nbuf);
/*
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.12 1997/08/06 02:08:39 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.13 1997/08/12 22:51:40 momjian Exp $
*
*
* INTERFACE ROUTINES
IncrHeapAccessStat(local_close);
IncrHeapAccessStat(global_close);
- (void) RelationClose(relation);
+ RelationClose(relation);
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/heap/Attic/stats.c,v 1.9 1996/11/10 02:58:11 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/heap/Attic/stats.c,v 1.10 1997/08/12 22:51:44 momjian Exp $
*
* NOTES
* initam should be moved someplace else.
* return to old memory context
* ----------------
*/
- (void) MemoryContextSwitchTo(oldContext);
+ MemoryContextSwitchTo(oldContext);
heap_access_stats = stats;
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.10 1997/01/10 09:46:25 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.11 1997/08/12 22:51:48 momjian Exp $
*
* INTERFACE ROUTINES
* index_open - open an index relation by relationId
void
index_close(Relation relation)
{
- (void) RelationClose(relation);
+ RelationClose(relation);
}
/* ----------------
RELATION_CHECKS;
GET_REL_PROCEDURE(delete,amdelete);
- (void) fmgr(procedure, relation, indexItem);
+ fmgr(procedure, relation, indexItem);
}
/* ----------------
SCAN_CHECKS;
GET_SCAN_PROCEDURE(rescan,amrescan);
- (void) fmgr(procedure, scan, scanFromEnd, key);
+ fmgr(procedure, scan, scanFromEnd, key);
}
/* ----------------
SCAN_CHECKS;
GET_SCAN_PROCEDURE(endscan,amendscan);
- (void) fmgr(procedure, scan);
+ fmgr(procedure, scan);
RelationUnsetRIntentLock(scan->relation);
}
SCAN_CHECKS;
GET_SCAN_PROCEDURE(markpos,ammarkpos);
- (void) fmgr(procedure, scan);
+ fmgr(procedure, scan);
}
/* ----------------
SCAN_CHECKS;
GET_SCAN_PROCEDURE(restrpos,amrestrpos);
- (void) fmgr(procedure, scan);
+ fmgr(procedure, scan);
}
/* ----------------
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.21 1997/06/10 07:28:50 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.22 1997/08/12 22:51:50 momjian Exp $
*
*-------------------------------------------------------------------------
*/
/* if this is true, the key we just looked at is gone */
if (result > 0)
- (void) _bt_twostep(scan, &buf, ForwardScanDirection);
+ _bt_twostep(scan, &buf, ForwardScanDirection);
}
break;
} while (result >= 0);
if (result < 0)
- (void) _bt_twostep(scan, &buf, BackwardScanDirection);
+ _bt_twostep(scan, &buf, BackwardScanDirection);
}
break;
* No key on this page, but offnum from _bt_binsrch() greater
* maxoff - have to move right. - vadim 12/06/96
*/
- (void) _bt_twostep(scan, &buf, ForwardScanDirection);
+ _bt_twostep(scan, &buf, ForwardScanDirection);
}
}
else if (result < 0)
} while (result < 0);
if (result > 0)
- (void) _bt_twostep(scan, &buf, ForwardScanDirection);
+ _bt_twostep(scan, &buf, ForwardScanDirection);
}
break;
*
*
* IDENTIFICATION
- * $Id: nbtsort.c,v 1.17 1997/06/06 03:11:46 vadim Exp $
+ * $Id: nbtsort.c,v 1.18 1997/08/12 22:51:52 momjian Exp $
*
* NOTES
*
static void
_bt_taperewind(BTTapeBlock *tape)
{
- (void) FileSeek(tape->bttb_fd, 0, SEEK_SET);
+ FileSeek(tape->bttb_fd, 0, SEEK_SET);
}
/*
static void
_bt_tapeadd(BTTapeBlock *tape, BTItem item, int itemsz)
{
- (void) memcpy(tape->bttb_data + tape->bttb_top, item, itemsz);
+ memcpy(tape->bttb_data + tape->bttb_top, item, itemsz);
++tape->bttb_ntup;
tape->bttb_top += DOUBLEALIGN(itemsz);
}
if (btspool == (BTSpool *) NULL || fname == (char *) NULL) {
elog(WARN, "_bt_spoolinit: out of memory");
}
- (void) memset((char *) btspool, 0, sizeof(BTSpool));
+ memset((char *) btspool, 0, sizeof(BTSpool));
btspool->bts_ntapes = ntapes;
btspool->bts_tape = 0;
btspool->isunique = isunique;
{
BTPageState *state = (BTPageState *) palloc(sizeof(BTPageState));
- (void) memset((char *) state, 0, sizeof(BTPageState));
+ memset((char *) state, 0, sizeof(BTPageState));
_bt_blnewpage(index, &(state->btps_buf), &(state->btps_page), flags);
state->btps_firstoff = InvalidOffsetNumber;
state->btps_lastoff = P_HIKEY;
_bt_pagestate(index, 0, state->btps_level + 1, true);
}
nbti = _bt_minitem(opage, BufferGetBlockNumber(obuf), 0);
- (void) _bt_buildadd(index, state->btps_next, nbti, 0);
+ _bt_buildadd(index, state->btps_next, nbti, 0);
pfree((void *) nbti);
}
_bt_metaproot(index, blkno, s->btps_level + 1);
} else {
bti = _bt_minitem(s->btps_page, blkno, 0);
- (void) _bt_buildadd(index, s->btps_next, bti, 0);
+ _bt_buildadd(index, s->btps_next, bti, 0);
pfree((void *) bti);
}
}
* _bt_taperead will return 0 only if the tape is actually
* at EOF.
*/
- (void) memset((char *) &q, 0, sizeof(BTPriQueue));
+ memset((char *) &q, 0, sizeof(BTPriQueue));
goodtapes = 0;
for (t = 0; t < btspool->bts_ntapes; ++t) {
itape = btspool->bts_itape[t];
btisz = BTITEMSZ(bti);
btisz = DOUBLEALIGN(btisz);
if (doleaf) {
- (void) _bt_buildadd(index, state, bti, BTP_LEAF);
+ _bt_buildadd(index, state, bti, BTP_LEAF);
#if defined(FASTBUILD_DEBUG) && defined(FASTBUILD_MERGE)
{
bool isnull;
d, state->btps_level);
}
#endif /* FASTBUILD_DEBUG && FASTBUILD_MERGE */
- (void) _bt_buildadd(index, state, nbti, 0);
+ _bt_buildadd(index, state, nbti, 0);
pfree((void *) nbti);
}
blk = ropaque->btpo_next;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.12 1997/03/14 23:17:46 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.13 1997/08/12 22:51:54 momjian Exp $
*
*-------------------------------------------------------------------------
*/
item = (IndexTuple) PageGetItem(p, itemid);
if (i == *(v.spl_left)) {
- (void) PageAddItem(left, (Item) item, IndexTupleSize(item),
+ PageAddItem(left, (Item) item, IndexTupleSize(item),
leftoff, LP_USED);
leftoff = OffsetNumberNext(leftoff);
v.spl_left++; /* advance in left split vector */
} else {
- (void) PageAddItem(right, (Item) item, IndexTupleSize(item),
+ PageAddItem(right, (Item) item, IndexTupleSize(item),
rightoff, LP_USED);
rightoff = OffsetNumberNext(rightoff);
v.spl_right++; /* advance in right split vector */
/* now insert the new index tuple */
if (*(v.spl_left) != FirstOffsetNumber) {
- (void) PageAddItem(left, (Item) itup, IndexTupleSize(itup),
+ PageAddItem(left, (Item) itup, IndexTupleSize(itup),
leftoff, LP_USED);
leftoff = OffsetNumberNext(leftoff);
ItemPointerSet(&(res->pointerData), lbknum, leftoff);
} else {
- (void) PageAddItem(right, (Item) itup, IndexTupleSize(itup),
+ PageAddItem(right, (Item) itup, IndexTupleSize(itup),
rightoff, LP_USED);
rightoff = OffsetNumberNext(rightoff);
ItemPointerSet(&(res->pointerData), rbknum, rightoff);
WriteBuffer(b); /* don't forget to release buffer! - 01/31/94 */
pfree(res);
} else {
- (void) PageAddItem(p, (Item) rtup, IndexTupleSize(rtup),
+ PageAddItem(p, (Item) rtup, IndexTupleSize(rtup),
PageGetMaxOffsetNumber(p), LP_USED);
WriteBuffer(b);
ldatum = (((char *) ltup) + sizeof(IndexTupleData));
b = ReadBuffer(r, P_ROOT);
RTInitBuffer(b, 0);
p = BufferGetPage(b);
- (void) PageAddItem(p, (Item) lt, IndexTupleSize(lt),
+ PageAddItem(p, (Item) lt, IndexTupleSize(lt),
FirstOffsetNumber, LP_USED);
- (void) PageAddItem(p, (Item) rt, IndexTupleSize(rt),
+ PageAddItem(p, (Item) rt, IndexTupleSize(rt),
OffsetNumberNext(FirstOffsetNumber), LP_USED);
WriteBuffer(b);
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/transsup.c,v 1.7 1996/12/14 05:20:39 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/transsup.c,v 1.8 1997/08/12 22:51:57 momjian Exp $
*
* NOTES
* This file contains support functions for the high
baseXid = blockNumber * TP_NumXidStatusPerBlock;
/* XXX ???? xid won't get returned! - AY '94 */
- (void) TransBlockGetLastTransactionIdStatus(block, baseXid, &xid);
+ TransBlockGetLastTransactionIdStatus(block, baseXid, &xid);
ReleaseBuffer(buffer);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/transam/varsup.c,v 1.7 1997/01/16 07:59:11 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/varsup.c,v 1.8 1997/08/12 22:51:58 momjian Exp $
*
*-------------------------------------------------------------------------
*/
flushmode = SetBufferWriteMode (BUFFER_FLUSH_WRITE);
WriteBuffer(buf);
- (void) SetBufferWriteMode (flushmode);
+ SetBufferWriteMode (flushmode);
}
/* --------------------------------
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.10 1997/04/02 03:38:02 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.11 1997/08/12 22:52:01 momjian Exp $
*
* NOTES
* Transaction aborts can now occur two ways:
* tell system to allocate in the blank portal context
* ----------------
*/
- (void) MemoryContextSwitchTo(portalContext);
+ MemoryContextSwitchTo(portalContext);
StartPortalAllocMode(DefaultAllocMode, 0);
}
* ----------------
*/
EndPortalAllocMode();
- (void) MemoryContextSwitchTo(TopMemoryContext);
+ MemoryContextSwitchTo(TopMemoryContext);
}
/* ----------------------------------------------------------------
* portal memory context (until the next transaction).
* ----------------
*/
- (void) MemoryContextSwitchTo(TopMemoryContext);
+ MemoryContextSwitchTo(TopMemoryContext);
}
/* ----------------------------------------------------------------
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/xid.c,v 1.5 1996/11/10 02:59:19 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/xid.c,v 1.6 1997/08/12 22:52:02 momjian Exp $
*
* OLD COMMENTS
* XXX WARNING
/* maximum 32 bit unsigned integer representation takes 10 chars */
representation = palloc(11);
- (void)sprintf(representation, "%u", transactionId);
+ sprintf(representation, "%u", transactionId);
return (representation);
* Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.18 1997/06/25 21:12:19 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.19 1997/08/12 22:52:04 momjian Exp $
*
*-------------------------------------------------------------------------
*/
ILHead = newind;
- (void) MemoryContextSwitchTo(oldcxt);
+ MemoryContextSwitchTo(oldcxt);
}
void
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.14 1997/06/04 08:59:22 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.15 1997/08/12 22:52:07 momjian Exp $
*
* INTERFACE ROUTINES
* heap_creatr() - Create an uncataloged heap relation
*/
if ( !(rdesc->rd_istemp) || !(rdesc->rd_tmpunlinked) )
{
- (void) smgrunlink(rdesc->rd_rel->relsmgr, rdesc);
+ smgrunlink(rdesc->rd_rel->relsmgr, rdesc);
}
rdesc->rd_tmpunlinked = TRUE;
ReleaseRelationBuffers(rdesc);
if ( !(rdesc->rd_istemp) || !(rdesc->rd_tmpunlinked) )
{
- (void) smgrunlink(rdesc->rd_rel->relsmgr, rdesc);
+ smgrunlink(rdesc->rd_rel->relsmgr, rdesc);
}
rdesc->rd_tmpunlinked = TRUE;
heap_close(rdesc);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.15 1997/04/05 03:36:21 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.16 1997/08/12 22:52:09 momjian Exp $
*
*
* INTERFACE ROUTINES
* initialize null[], replace[] and value[]
* ----------------
*/
- (void) memset(nullv, ' ', Natts_pg_attribute);
- (void) memset(replace, ' ', Natts_pg_attribute);
+ memset(nullv, ' ', Natts_pg_attribute);
+ memset(replace, ' ', Natts_pg_attribute);
/* ----------------
* create the first attribute tuple.
newtup = heap_modifytuple(tuple, buffer, pg_index, values, nulls, replace);
- (void) heap_replace(pg_index, &(newtup->t_ctid), newtup);
+ heap_replace(pg_index, &(newtup->t_ctid), newtup);
heap_close(pg_index);
pfree(predText);
newtup = heap_modifytuple(htup, buffer, pg_class, values,
nulls, replace);
- (void) heap_replace(pg_class, &(newtup->t_ctid), newtup);
+ heap_replace(pg_class, &(newtup->t_ctid), newtup);
CatalogOpenIndices(Num_pg_class_indices, Name_pg_class_indices, idescs);
CatalogIndexInsert(idescs, Num_pg_class_indices, pg_class, newtup);
CatalogCloseIndices(Num_pg_class_indices, idescs);
* ----------------
*/
if (RegProcedureIsValid(procedure))
- (void) fmgr(procedure,
+ fmgr(procedure,
heapRelation,
indexRelation,
numberOfAttributes,
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.9 1997/07/23 17:14:34 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.10 1997/08/12 22:52:11 momjian Exp $
*
* NOTES
* these routines moved here from commands/define.c and somewhat cleaned up.
ItemPointerCopy(&tup->t_ctid, &itemPointerData);
setheapoverride(true);
- (void) heap_replace(pg_operator_desc, &itemPointerData, tup);
+ heap_replace(pg_operator_desc, &itemPointerData, tup);
setheapoverride(false);
} else
elog(WARN, "OperatorDef: no operator %d", other_oid);
ItemPointerCopy(&tup->t_ctid, &itemPointerData);
setheapoverride(true);
- (void) heap_replace(pg_operator_desc, &itemPointerData, tup);
+ heap_replace(pg_operator_desc, &itemPointerData, tup);
setheapoverride(false);
}
ItemPointerCopy(&tup->t_ctid, &itemPointerData);
setheapoverride(true);
- (void) heap_replace(pg_operator_desc, &itemPointerData, tup);
+ heap_replace(pg_operator_desc, &itemPointerData, tup);
setheapoverride(false);
values[ Anum_pg_operator_oprcom - 1 ] = (Datum)NULL;
ItemPointerCopy(&tup->t_ctid, &itemPointerData);
setheapoverride(true);
- (void) heap_replace(pg_operator_desc, &itemPointerData, tup);
+ heap_replace(pg_operator_desc, &itemPointerData, tup);
setheapoverride(false);
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.5 1996/11/30 18:06:06 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.6 1997/08/12 22:52:13 momjian Exp $
*
*-------------------------------------------------------------------------
*/
ItemPointerCopy(&tup->t_ctid, &itemPointerData);
setheapoverride(true);
- (void) heap_replace(pg_type_desc, &itemPointerData, tup);
+ heap_replace(pg_type_desc, &itemPointerData, tup);
setheapoverride(false);
typeObjectId = tup->t_oid;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.15 1997/08/12 20:15:08 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.16 1997/08/12 22:52:15 momjian Exp $
*
*-------------------------------------------------------------------------
*/
tdesc, &isnull);
if (!DatumGetInt32(d)) {
rTuple = heap_modifytuple(lTuple, b, lRel, value, nulls, repl);
- (void) heap_replace(lRel, &lTuple->t_ctid, rTuple);
+ heap_replace(lRel, &lTuple->t_ctid, rTuple);
}
ReleaseBuffer(b);
}
d = (Datum) heap_getattr(lTuple, b, Anum_pg_listener_relname,
tdesc, &isnull);
rTuple = heap_modifytuple(lTuple, b, lRel, value, nulls, repl);
- (void) heap_replace(lRel, &lTuple->t_ctid, rTuple);
+ heap_replace(lRel, &lTuple->t_ctid, rTuple);
/* notifying the front end */
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.7 1997/01/02 06:18:25 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.8 1997/08/12 22:52:18 momjian Exp $
*
* NOTES
* The PortalExecutorHeapMemory crap needs to be eliminated
* switch back to previous context
* ----------------
*/
- (void) MemoryContextSwitchTo(context);
+ MemoryContextSwitchTo(context);
PortalExecutorHeapMemory = (MemoryContext) NULL;
}
* do what is possible across transaction boundries.
* ----------------
*/
- (void) MemoryContextSwitchTo(
+ MemoryContextSwitchTo(
(MemoryContext)PortalGetHeapMemory(GetPortalByName(NULL)));
}
((Form_pg_class) GETSTRUCT(reltup))->relnatts = maxatts;
oldTID = reltup->t_ctid;
- (void) heap_replace(relrdesc, &oldTID, reltup);
+ heap_replace(relrdesc, &oldTID, reltup);
/* keep catalog indices current */
CatalogOpenIndices(Num_pg_class_indices, Name_pg_class_indices, ridescs);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.9 1997/08/12 20:15:10 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.10 1997/08/12 22:52:20 momjian Exp $
*
*-------------------------------------------------------------------------
*/
tuple = heap_formtuple(desc,datum, nullarr);
- (void) heap_insert(relation, tuple);
+ heap_insert(relation, tuple);
pfree(tuple);
seqNumber += 1;
tuple = heap_formtuple( desc, datum, nullarr);
- (void) heap_insert(relation, tuple);
+ heap_insert(relation, tuple);
pfree(tuple);
seqNumber += 1;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.12 1997/08/03 02:35:01 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.13 1997/08/12 22:52:23 momjian Exp $
*
* DESCRIPTION
* The "DefineFoo" routines take the parse tree and pick out the
* now have TypeCreate do all the real work.
* ----------------
*/
- (void) TypeCreate(typeName, /* type name */
+ TypeCreate(typeName, /* type name */
InvalidOid, /* relation oid (n/a here) */
internalLength, /* internal size */
externalLength, /* external size */
*/
shadow_type = makeArrayTypeName(typeName);
- (void) TypeCreate(shadow_type, /* type name */
+ TypeCreate(shadow_type, /* type name */
InvalidOid, /* relation oid (n/a here) */
-1, /* internal size */
-1, /* external size */
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/Attic/purge.c,v 1.5 1997/07/29 16:19:26 thomas Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/purge.c,v 1.6 1997/08/12 22:52:25 momjian Exp $
*
* Note:
* XXX There are many instances of int32 instead of ...Time. These
nulls, replace);
/* XXX How do you detect an insertion error?? */
- (void) heap_replace(relation, &newTuple->t_ctid, newTuple);
+ heap_replace(relation, &newTuple->t_ctid, newTuple);
/* keep the system catalog indices current */
CatalogOpenIndices(Num_pg_class_indices, Name_pg_class_indices, idescs);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/Attic/rename.c,v 1.5 1997/08/12 20:15:12 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/rename.c,v 1.6 1997/08/12 22:52:27 momjian Exp $
*
*-------------------------------------------------------------------------
*/
oldTID = oldatttup->t_ctid;
/* insert "fixed" tuple */
- (void) heap_replace(attrdesc, &oldTID, oldatttup);
+ heap_replace(attrdesc, &oldTID, oldatttup);
/* keep system catalog indices current */
CatalogOpenIndices(Num_pg_attr_indices, Name_pg_attr_indices, idescs);
oldTID = oldreltup->t_ctid;
/* insert fixed rel tuple */
- (void) heap_replace(relrdesc, &oldTID, oldreltup);
+ heap_replace(relrdesc, &oldTID, oldreltup);
/* keep the system catalog indices current */
CatalogOpenIndices(Num_pg_class_indices, Name_pg_class_indices, idescs);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.37 1997/07/28 00:53:40 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.38 1997/08/12 22:52:29 momjian Exp $
*
*-------------------------------------------------------------------------
*/
strcpy (dest, col);
va_cols = lappend (va_cols, dest);
}
- (void) MemoryContextSwitchTo(old);
+ MemoryContextSwitchTo(old);
/* initialize vacuum cleaner */
vc_init();
vc_abort()
{
/* on abort, remove the vacuum cleaner lock file */
- (void) unlink("pg_vlock");
+ unlink("pg_vlock");
VacuumRunning = false;
}
cur->vrl_next = (VRelList) palloc(sizeof(VRelListData));
cur = cur->vrl_next;
}
- (void) MemoryContextSwitchTo(old);
+ MemoryContextSwitchTo(old);
cur->vrl_relid = pgctup->t_oid;
cur->vrl_next = (VRelList) NULL;
pfree(p_vrl);
}
- (void) MemoryContextSwitchTo(old);
+ MemoryContextSwitchTo(old);
}
/*
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.13 1997/05/31 16:52:00 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.14 1997/08/12 22:52:33 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* delete the tuple
* ----------------
*/
- (void) heap_delete(resultRelationDesc, /* relation desc */
+ heap_delete(resultRelationDesc, /* relation desc */
tupleid); /* item pointer to tuple */
IncrDeleted();
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/functions.c,v 1.5 1997/01/22 05:26:37 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/functions.c,v 1.6 1997/08/12 22:52:35 momjian Exp $
*
*-------------------------------------------------------------------------
*/
if (es->status == F_EXEC_START)
{
- (void) postquel_start(es);
+ postquel_start(es);
es->status = F_EXEC_RUN;
}
#ifndef INDEXSCAN_PATCH
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeMergejoin.c,v 1.6 1997/08/06 03:41:29 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeMergejoin.c,v 1.7 1997/08/12 22:52:38 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "executor/nodeMergejoin.h"
#include "executor/execdebug.h"
#include "utils/lsyscache.h"
+#include "utils/psort.h"
/* ----------------------------------------------------------------
* MarkInnerTuple and RestoreInnerTuple macros
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/lib/Attic/hasht.c,v 1.3 1996/11/06 08:27:13 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/lib/Attic/hasht.c,v 1.4 1997/08/12 22:52:42 momjian Exp $
*
*-------------------------------------------------------------------------
*/
int keysize;
keysize = hashtable->hctl->keysize;
- (void)hash_seq((HTAB *)NULL);
+ hash_seq((HTAB *)NULL);
while ((hashent = hash_seq(hashtable)) != (long *) TRUE) {
if (hashent == NULL)
elog(FATAL, "error in HashTableWalk.");
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.12 1997/08/12 20:15:17 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.13 1997/08/12 22:52:45 momjian Exp $
*
*-------------------------------------------------------------------------
*/
key_sched,
version);
if (status != KSUCCESS) {
- (void) sprintf(PQerrormsg,
+ sprintf(PQerrormsg,
"pg_krb4_recvauth: kerberos error: %s\n",
krb_err_txt[status]);
fputs(PQerrormsg, stderr);
return(STATUS_ERROR);
}
if (strncmp(version, PG_KRB4_VERSION, KRB_SENDAUTH_VLEN)) {
- (void) sprintf(PQerrormsg,
+ sprintf(PQerrormsg,
"pg_krb4_recvauth: protocol version != \"%s\"\n",
PG_KRB4_VERSION);
fputs(PQerrormsg, stderr);
}
if (username && *username &&
strncmp(username, auth_data.pname, NAMEDATALEN)) {
- (void) sprintf(PQerrormsg,
+ sprintf(PQerrormsg,
"pg_krb4_recvauth: name \"%s\" != \"%s\"\n",
username,
auth_data.pname);
struct sockaddr_in *raddr,
char *username)
{
- (void) sprintf(PQerrormsg,
+ sprintf(PQerrormsg,
"pg_krb4_recvauth: Kerberos not implemented on this "
"server.\n");
fputs(PQerrormsg, stderr);
if (hostp = strchr(hostp, '.'))
*hostp = '\0';
if (code = krb5_parse_name(servbuf, &server)) {
- (void) sprintf(PQerrormsg,
+ sprintf(PQerrormsg,
"pg_krb5_recvauth: Kerberos error %d in krb5_parse_name\n",
code);
com_err("pg_krb5_recvauth", code, "in krb5_parse_name");
&client,
(krb5_ticket **) NULL,
(krb5_authenticator **) NULL)) {
- (void) sprintf(PQerrormsg,
+ sprintf(PQerrormsg,
"pg_krb5_recvauth: Kerberos error %d in krb5_recvauth\n",
code);
com_err("pg_krb5_recvauth", code, "in krb5_recvauth");
* postmaster startup packet.
*/
if ((code = krb5_unparse_name(client, &kusername))) {
- (void) sprintf(PQerrormsg,
+ sprintf(PQerrormsg,
"pg_krb5_recvauth: Kerberos error %d in krb5_unparse_name\n",
code);
com_err("pg_krb5_recvauth", code, "in krb5_unparse_name");
}
krb5_free_principal(client);
if (!kusername) {
- (void) sprintf(PQerrormsg,
+ sprintf(PQerrormsg,
"pg_krb5_recvauth: could not decode username\n");
fputs(PQerrormsg, stderr);
pqdebug("%s", PQerrormsg);
}
kusername = pg_an_to_ln(kusername);
if (username && strncmp(username, kusername, NAMEDATALEN)) {
- (void) sprintf(PQerrormsg,
+ sprintf(PQerrormsg,
"pg_krb5_recvauth: name \"%s\" != \"%s\"\n",
username, kusername);
fputs(PQerrormsg, stderr);
struct sockaddr_in *raddr,
char *username)
{
- (void) sprintf(PQerrormsg,
+ sprintf(PQerrormsg,
"pg_krb5_recvauth: Kerberos not implemented on this "
"server.\n");
fputs(PQerrormsg, stderr);
if (!username) {
- (void) sprintf(PQerrormsg,
+ sprintf(PQerrormsg,
"be_recvauth: no user name passed\n");
fputs(PQerrormsg, stderr);
pqdebug("%s", PQerrormsg);
return(STATUS_ERROR);
}
if (!port) {
- (void) sprintf(PQerrormsg,
+ sprintf(PQerrormsg,
"be_recvauth: no port structure passed\n");
fputs(PQerrormsg, stderr);
pqdebug("%s", PQerrormsg);
switch (msgtype) {
case STARTUP_KRB4_MSG:
if (!be_getauthsvc(msgtype)) {
- (void) sprintf(PQerrormsg,
+ sprintf(PQerrormsg,
"be_recvauth: krb4 authentication disallowed\n");
fputs(PQerrormsg, stderr);
pqdebug("%s", PQerrormsg);
}
if (pg_krb4_recvauth(port->sock, &port->laddr, &port->raddr,
username) != STATUS_OK) {
- (void) sprintf(PQerrormsg,
+ sprintf(PQerrormsg,
"be_recvauth: krb4 authentication failed\n");
fputs(PQerrormsg, stderr);
pqdebug("%s", PQerrormsg);
break;
case STARTUP_KRB5_MSG:
if (!be_getauthsvc(msgtype)) {
- (void) sprintf(PQerrormsg,
+ sprintf(PQerrormsg,
"be_recvauth: krb5 authentication disallowed\n");
fputs(PQerrormsg, stderr);
pqdebug("%s", PQerrormsg);
}
if (pg_krb5_recvauth(port->sock, &port->laddr, &port->raddr,
username) != STATUS_OK) {
- (void) sprintf(PQerrormsg,
+ sprintf(PQerrormsg,
"be_recvauth: krb5 authentication failed\n");
fputs(PQerrormsg, stderr);
pqdebug("%s", PQerrormsg);
break;
case STARTUP_UNAUTH_MSG:
if (!be_getauthsvc(msgtype)) {
- (void) sprintf(PQerrormsg,
+ sprintf(PQerrormsg,
"be_recvauth: "
"unauthenticated connections disallowed\n");
fputs(PQerrormsg, stderr);
break;
case STARTUP_HBA_MSG:
if (hba_recvauth(port, sp->database, sp->user, DataDir) != STATUS_OK) {
- (void) sprintf(PQerrormsg,
+ sprintf(PQerrormsg,
"be_recvauth: host-based authentication failed\n");
fputs(PQerrormsg, stderr);
pqdebug("%s", PQerrormsg);
}
break;
default:
- (void) sprintf(PQerrormsg,
+ sprintf(PQerrormsg,
"be_recvauth: unrecognized message type: %d\n",
msgtype);
fputs(PQerrormsg, stderr);
break;
}
if (i == n_authsvcs) {
- (void) sprintf(PQerrormsg,
+ sprintf(PQerrormsg,
"be_setauthsvc: invalid name %s, ignoring...\n",
name);
fputs(PQerrormsg, stderr);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.11 1997/08/12 20:15:18 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.12 1997/08/12 22:52:48 momjian Exp $
*
* NOTES
* This should be moved to a more appropriate place. It is here
}
}
- (void) close(fd);
- (void) inv_close(lobj);
+ close(fd);
+ inv_close(lobj);
return lobjOid;
}
oumask = umask((mode_t) 0);
strNcpy(fnamebuf, VARDATA(filename), VARSIZE(filename) - VARHDRSZ);
fd = open(fnamebuf, O_CREAT|O_WRONLY, 0666);
- (void) umask(oumask);
+ umask(oumask);
if (fd < 0) { /* error */
elog(WARN, "lo_export: can't open unix file\"%s\"",
fnamebuf);
}
}
- (void) inv_close(lobj);
- (void) close(fd);
+ inv_close(lobj);
+ close(fd);
return 1;
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.16 1997/03/12 21:17:53 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.17 1997/08/12 22:52:52 momjian Exp $
*
*-------------------------------------------------------------------------
*/
c = getc(fp);
/* Put back the char right after the token (putting back EOF is ok) */
}
- (void) ungetc(c, fp);
+ ungetc(c, fp);
}
*buf = '\0';
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/portal.c,v 1.5 1997/08/12 20:15:22 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/portal.c,v 1.6 1997/08/12 22:52:55 momjian Exp $
*
*-------------------------------------------------------------------------
*/
in_range(char *msg, int value, int min, int max)
{
if (value < min || value >= max) {
- (void) sprintf(PQerrormsg, "FATAL: %s, %d is not in range [%d,%d)\n",
+ sprintf(PQerrormsg, "FATAL: %s, %d is not in range [%d,%d)\n",
msg, value, min, max);
pqdebug("%s", PQerrormsg);
fputs(PQerrormsg, stderr);
valid_pointer(char *msg, void *ptr)
{
if (!ptr) {
- (void) sprintf(PQerrormsg, "FATAL: %s\n", msg);
+ sprintf(PQerrormsg, "FATAL: %s\n", msg);
pqdebug("%s", PQerrormsg);
fputs(PQerrormsg, stderr);
return(0);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.18 1997/08/12 20:15:24 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.19 1997/08/12 22:52:58 momjian Exp $
*
*-------------------------------------------------------------------------
*/
PQputline(char *s)
{
if (Pfout) {
- (void) fputs(s, Pfout);
+ fputs(s, Pfout);
fflush(Pfout);
}
return(0);
if(status)
{
- (void) sprintf(PQerrormsg,
+ sprintf(PQerrormsg,
"FATAL: pq_getint failed: errno=%d\n", errno);
fputs(PQerrormsg, stderr);
pqdebug("%s", PQerrormsg);
{
if(pqPutString(s, Pfout))
{
- (void) sprintf(PQerrormsg,
+ sprintf(PQerrormsg,
"FATAL: pq_putstr: fputs() failed: errno=%d\n", errno);
fputs(PQerrormsg, stderr);
pqdebug("%s", PQerrormsg);
{
if(pqPutNBytes(s, n, Pfout))
{
- (void) sprintf(PQerrormsg,
+ sprintf(PQerrormsg,
"FATAL: pq_putnchar: fputc() failed: errno=%d\n",
errno);
fputs(PQerrormsg, stderr);
if(status)
{
- (void) sprintf(PQerrormsg,
+ sprintf(PQerrormsg,
"FATAL: pq_putint failed: errno=%d\n", errno);
fputs(PQerrormsg, stderr);
pqdebug("%s", PQerrormsg);
return(1);
}
if (hs->h_addrtype != AF_INET) {
- (void) sprintf(PQerrormsg,
+ sprintf(PQerrormsg,
"FATAL: pq_getinaddr: %s not on Internet\n",
host);
fputs(PQerrormsg, stderr);
if (*serv >= '0' && *serv <= '9')
return(pq_getinaddr(sin, host, atoi(serv)));
if (!(ss = getservbyname(serv, NULL))) {
- (void) sprintf(PQerrormsg,
+ sprintf(PQerrormsg,
"FATAL: pq_getinserv: unknown service: %s\n",
serv);
fputs(PQerrormsg, stderr);
#else
fcntl(fd, F_SETOWN, getpid());
#endif /* hpux */
- (void) pqsignal(SIGURG,fptr);
+ pqsignal(SIGURG,fptr);
}
void
memset((char *)&sin, 0, sizeof sin);
if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
- (void) sprintf(PQerrormsg,
+ sprintf(PQerrormsg,
"FATAL: StreamServerPort: socket() failed: errno=%d\n",
errno);
fputs(PQerrormsg, stderr);
if((setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char *)&one,
sizeof(one))) == -1) {
- (void) sprintf(PQerrormsg,
+ sprintf(PQerrormsg,
"FATAL: StreamServerPort: setsockopt (SO_REUSEADDR) failed: errno=%d\n",
errno);
fputs(PQerrormsg, stderr);
sin.sin_port = htons(portName);
if (bind(fd, (struct sockaddr *)&sin, sizeof sin) < 0) {
- (void) sprintf(PQerrormsg,
+ sprintf(PQerrormsg,
"FATAL: StreamServerPort: bind() failed: errno=%d\n",
errno);
pqdebug("%s", PQerrormsg);
* listening port non-blocking. That is not necessary (and
* may tickle kernel bugs).
- (void) fcntl(fd, F_SETFD, 1);
- (void) fcntl(fd, F_SETFL, FNDELAY);
+ fcntl(fd, F_SETFD, 1);
+ fcntl(fd, F_SETFL, FNDELAY);
*/
*fdP = fd;
void
StreamClose(int sock)
{
- (void) close(sock);
+ close(sock);
}
/* ---------------------------
/* set up the server (remote) address */
if (!(hp = gethostbyname(hostName)) || hp->h_addrtype != AF_INET) {
- (void) sprintf(PQerrormsg,
+ sprintf(PQerrormsg,
"FATAL: StreamOpen: unknown hostname: %s\n",
hostName);
fputs(PQerrormsg, stderr);
/* connect to the server */
if ((port->sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
- (void) sprintf(PQerrormsg,
+ sprintf(PQerrormsg,
"FATAL: StreamOpen: socket() failed: errno=%d\n",
errno);
fputs(PQerrormsg, stderr);
}
if (connect(port->sock, (struct sockaddr *)&port->raddr,
sizeof(port->raddr)) < 0) {
- (void) sprintf(PQerrormsg,
+ sprintf(PQerrormsg,
"FATAL: StreamOpen: connect() failed: errno=%d\n",
errno);
fputs(PQerrormsg, stderr);
/* fill in the client address */
if (getsockname(port->sock, (struct sockaddr *) &port->laddr,
&laddrlen) < 0) {
- (void) sprintf(PQerrormsg,
+ sprintf(PQerrormsg,
"FATAL: StreamOpen: getsockname() failed: errno=%d\n",
errno);
fputs(PQerrormsg, stderr);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/pqpacket.c,v 1.4 1997/02/14 04:15:31 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/pqpacket.c,v 1.5 1997/08/12 22:53:00 momjian Exp $
*
*-------------------------------------------------------------------------
*/
(struct sockaddr *)&(port->raddr), addrLen);
if (len < totalLen) {
- (void) sprintf(PQerrormsg,
+ sprintf(PQerrormsg,
"FATAL: PacketSend: couldn't send complete packet: errno=%d\n",
errno);
fputs(PQerrormsg, stderr);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.2 1996/11/08 05:56:48 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.3 1997/08/12 22:53:04 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
{
void *retval;
- (void) lsptok(str, NULL); /* set the string used in lsptok */
+ lsptok(str, NULL); /* set the string used in lsptok */
retval = nodeRead(true); /* start reading */
return retval;
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: geqo_eval.c,v 1.11 1997/06/10 07:53:53 vadim Exp $
+ * $Id: geqo_eval.c,v 1.12 1997/08/12 22:53:07 momjian Exp $
*
*-------------------------------------------------------------------------
*/
static Rel *init_join_rel(Rel *outer_rel, Rel *inner_rel, JInfo *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 add_superrels(Rel *rel, Rel *super_rel);
-static bool nonoverlap_rels(Rel *rel1, Rel *rel2);
-static bool nonoverlap_sets(List *s1, List *s2);
static void geqo_joinrel_size(Rel *joinrel, Rel *outer_rel, Rel *inner_rel);
-
-static void geqo_add_new_joininfos(Query *root, List *joinrels, List *outerrels);
-static List *geqo_final_join_rels(List *join_rel_list);
-
static Rel *geqo_nth(int stop, List *rels);
/*
*
* Copyright (c) 1994, Regents of the University of California
*
-* $Id: geqo_params.c,v 1.3 1997/07/24 20:12:15 momjian Exp $
+* $Id: geqo_params.c,v 1.4 1997/08/12 22:53:09 momjian Exp $
*
*-------------------------------------------------------------------------
*/
while (c == ' ' || c == '\t') c = getc(fp);
/* Put back the char that was non-whitespace (putting back EOF is ok) */
- (void) ungetc(c, fp);
+ ungetc(c, fp);
/* If we ended with a newline, return that, otherwise return 0 */
return (c == '\n' ? '\n' : 0);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.7 1997/03/18 18:39:40 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.8 1997/08/12 22:53:12 momjian Exp $
*
*-------------------------------------------------------------------------
*/
BOOL_TYPEID, /* opresulttype */
0, /* opsize */
NULL); /* op_fcache */
- (void) replace_opid(test_oper);
+ replace_opid(test_oper);
test_expr = make_opclause(test_oper,
copyObject(clause_const),
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.31 1997/08/12 20:15:31 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.32 1997/08/12 22:53:17 momjian Exp $
*
*-------------------------------------------------------------------------
*/
else
foreach(tl, cols)
/* elog on failure */
- (void)varattno(pstate->p_target_relation,((Ident *)lfirst(tl))->name);
+ varattno(pstate->p_target_relation,((Ident *)lfirst(tl))->name);
return cols;
}
BSD44_derived_dlopen(const char *file, int num)
{
#ifdef __mips__
- (void) sprintf(error_message, "dlopen (%s) not supported", file);
+ sprintf(error_message, "dlopen (%s) not supported", file);
return NULL;
#else
void *vp;
if ((vp = dlopen((char *) file, num)) == (void *) NULL) {
- (void) sprintf(error_message, "dlopen (%s) failed", file);
+ sprintf(error_message, "dlopen (%s) failed", file);
}
return(vp);
#endif
BSD44_derived_dlsym(void *handle, const char *name)
{
#ifdef __mips__
- (void) sprintf(error_message, "dlsym (%s) failed", name);
+ sprintf(error_message, "dlsym (%s) failed", name);
return NULL;
#else
void *vp;
char buf[BUFSIZ];
if (*name != '_') {
- (void) sprintf(buf, "_%s", name);
+ sprintf(buf, "_%s", name);
name = buf;
}
if ((vp = dlsym(handle, (char *) name)) == (void *) NULL) {
- (void) sprintf(error_message, "dlsym (%s) failed", name);
+ sprintf(error_message, "dlsym (%s) failed", name);
}
return(vp);
#endif
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.50 1997/08/12 20:15:42 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.51 1997/08/12 22:53:31 momjian Exp $
*
* NOTES
*
IsPostmaster = true;
/* for security, no dir or file created can be group or other accessible */
- (void) umask((mode_t) 0077);
+ umask((mode_t) 0077);
if (!(hostName = getenv("PGHOST"))) {
if (gethostname(hostbuf, MAXHOSTNAMELEN) < 0)
}
#endif
i = open(NULL_DEV, O_RDWR);
- (void) dup2(i, 0);
- (void) dup2(i, 1);
- (void) dup2(i, 2);
- (void) close(i);
+ dup2(i, 0);
+ dup2(i, 1);
+ dup2(i, 2);
+ close(i);
}
static void
(sig == SIGUSR1)
? "SIGUSR1" : "SIGSTOP",
bp->pid);
- (void) kill(bp->pid, sig);
+ kill(bp->pid, sig);
}
ProcRemove(bp->pid);
*/
if (DebugLvl > 1) {
- (void) sprintf(debugbuf, "-d%d", DebugLvl);
+ sprintf(debugbuf, "-d%d", DebugLvl);
av[ac++] = debugbuf;
}
else
av[ac++] = mbbuf;
}
/* Tell the backend the descriptor of the fe/be socket */
- (void) sprintf(portbuf, "-P%d", portFd);
+ sprintf(portbuf, "-P%d", portFd);
av[ac++] = portbuf;
strNcpy(argbuf, packet->options, ARGV_SIZE);
g->nsub = 0;
g->ncategories = 1; /* category 0 is "everything else" */
g->categories = &g->catspace[-(CHAR_MIN)];
- (void) memset((char *)g->catspace, 0, NC*sizeof(cat_t));
+ memset((char *)g->catspace, 0, NC*sizeof(cat_t));
g->backrefs = 0;
/* do it */
assert(p->pbegin[i] != 0);
assert(OP(p->strip[p->pbegin[i]]) == OLPAREN);
assert(OP(p->strip[p->pend[i]]) == ORPAREN);
- (void) dupl(p, p->pbegin[i]+1, p->pend[i]);
+ dupl(p, p->pbegin[i]+1, p->pend[i]);
EMIT(O_BACK, i);
} else
SETERROR(REG_ESUBREG);
p->g->sets[i].ptr = p->g->setbits + css*(i/CHAR_BIT);
}
if (p->g->sets != NULL && p->g->setbits != NULL)
- (void) memset((char *)p->g->setbits + (nbytes - css),
+ memset((char *)p->g->setbits + (nbytes - css),
0, css);
else {
no = 0;
register size_t len = strlen(fp);
assert(fp != NULL);
- (void) memmove(fp, fp + len + 1,
+ memmove(fp, fp + len + 1,
cs->smultis - (fp + len + 1 - cs->multis));
cs->smultis -= len;
return(ret);
enlarge(p, p->ssize + len); /* this many unexpected additions */
assert(p->ssize >= p->slen + len);
- (void) memcpy((char *)(p->strip + p->slen),
+ memcpy((char *)(p->strip + p->slen),
(char *)(p->strip + start), (size_t)len*sizeof(sop));
p->slen += len;
return(ret);
if (errcode®_ITOA) {
if (r->code != 0)
- (void) strcpy(convbuf, r->name);
+ strcpy(convbuf, r->name);
else
sprintf(convbuf, "REG_0x%x", target);
assert(strlen(convbuf) < sizeof(convbuf));
len = strlen(s) + 1;
if (errbuf_size > 0) {
if (errbuf_size > len)
- (void) strcpy(errbuf, s);
+ strcpy(errbuf, s);
else {
- (void) strncpy(errbuf, s, errbuf_size-1);
+ strncpy(errbuf, s, errbuf_size-1);
errbuf[errbuf_size-1] = '\0';
}
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.2 1996/11/24 05:58:57 bryanh Exp $
+ * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.3 1997/08/12 22:53:41 momjian Exp $
*
*-------------------------------------------------------------------------
*/
/* choose rule to fire from list of rules */
if (locks == NIL) {
- (void) ProcessRetrieveQuery(parsetree,
+ ProcessRetrieveQuery(parsetree,
parsetree->rtable,
instead_flag, TRUE);
if (*instead_flag)
*--------------------------------------------------
*/
info->rule_action->rtable = info->rt;
- (void) ProcessRetrieveQuery(info->rule_action, info->rt,
+ ProcessRetrieveQuery(info->rule_action, info->rt,
&orig_instead_flag, TRUE);
/*--------------------------------------------------
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteSupport.c,v 1.5 1996/12/26 17:49:56 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteSupport.c,v 1.6 1997/08/12 22:53:43 momjian Exp $
*
*-------------------------------------------------------------------------
*/
relp = (Form_pg_class) GETSTRUCT(newTuple);
relp->relhasrules = relhasrules;
- (void) heap_replace(relationRelation, &(tuple->t_ctid), newTuple);
+ heap_replace(relationRelation, &(tuple->t_ctid), newTuple);
/* keep the catalog indices up to date */
CatalogOpenIndices(Num_pg_class_indices, Name_pg_class_indices, idescs);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.15 1997/07/28 00:54:43 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.16 1997/08/12 22:53:46 momjian Exp $
*
*-------------------------------------------------------------------------
*/
if (extend) {
/* new buffers are zero-filled */
memset((char *) MAKE_PTR(bufHdr->data), 0, BLCKSZ);
- (void) smgrextend(bufHdr->bufsmgr, reln,
+ smgrextend(bufHdr->bufsmgr, reln,
(char *) MAKE_PTR(bufHdr->data));
}
return (BufferDescriptorGetBuffer(bufHdr));
*/
if (extend) {
/* new buffers are zero-filled */
- (void) memset((char *) MAKE_PTR(bufHdr->data), 0, BLCKSZ);
+ memset((char *) MAKE_PTR(bufHdr->data), 0, BLCKSZ);
status = smgrextend(bufHdr->bufsmgr, reln,
(char *) MAKE_PTR(bufHdr->data));
} else {
break;
}
- (void) fclose(fp);
+ fclose(fp);
kill(getpid(), SIGILL);
}
* Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Id: fd.c,v 1.19 1997/07/28 00:54:52 momjian Exp $
+ * $Id: fd.c,v 1.20 1997/08/12 22:53:51 momjian Exp $
*
* NOTES:
*
DO_DB(elog(DEBUG, "FileTruncate %d (%s)",
file, VfdCache[file].fileName));
- (void) FileSync(file);
- (void) FileAccess(file);
+ FileSync(file);
+ FileAccess(file);
returnCode = ftruncate(VfdCache[file].fd, offset);
return(returnCode);
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/s_lock.c,v 1.15 1997/07/29 14:07:48 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/s_lock.c,v 1.16 1997/08/12 22:53:55 momjian Exp $
*
*-------------------------------------------------------------------------
*/
void
S_UNLOCK(slock_t *lock)
{
- (void)release_lock(lock);
+ release_lock(lock);
}
void
S_INIT_LOCK(slock_t *lock)
{
- (void)init_lock(lock);
+ init_lock(lock);
}
/* S_LOCK_FREE should return 1 if lock is free; 0 if lock is locked */
void
S_UNLOCK(slock_t *lock)
{
- (void) msem_unlock(lock, 0);
+ msem_unlock(lock, 0);
}
void
S_INIT_LOCK(slock_t *lock)
{
- (void) msem_init(lock, MSEM_UNLOCKED);
+ msem_init(lock, MSEM_UNLOCKED);
}
int
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.9 1997/06/06 22:04:04 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.10 1997/08/12 22:53:56 momjian Exp $
*
*-------------------------------------------------------------------------
*/
if (! structPtr) {
/* out of memory */
Assert (BindingTable);
- (void) hash_search(BindingTable,(char *) &item,HASH_REMOVE, foundPtr);
+ hash_search(BindingTable,(char *) &item,HASH_REMOVE, foundPtr);
SpinRelease(BindingLock);
*foundPtr = FALSE;
SpinAcquire(BindingLock);
- (void) hash_seq ((HTAB *)NULL);
+ hash_seq ((HTAB *)NULL);
while ( (result = (BindingEnt *) hash_seq (BindingTable)) != NULL )
{
if ( result == (BindingEnt *) TRUE )
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinval.c,v 1.6 1997/01/08 08:32:04 bryanh Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinval.c,v 1.7 1997/08/12 22:53:58 momjian Exp $
*
*-------------------------------------------------------------------------
*/
}
/* write again */
- (void) SISetDataEntry(shmInvalBuffer, &newInvalid);
+ SISetDataEntry(shmInvalBuffer, &newInvalid);
}
SpinRelease(SInvalLock);
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinvaladt.c,v 1.4 1997/07/24 20:14:15 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinvaladt.c,v 1.5 1997/08/12 22:54:01 momjian Exp $
*
*-------------------------------------------------------------------------
*/
SISetStartFreeSpace(segP, 0);
SISetStartEntryChain(segP, InvalidOffset);
SISetEndEntryChain(segP, InvalidOffset);
- (void) SISetNumEntries(segP, 0);
- (void) SISetMaxNumEntries(segP, MAXNUMMESSAGES);
+ SISetNumEntries(segP, 0);
+ SISetMaxNumEntries(segP, MAXNUMMESSAGES);
for (i = 0; i < MaxBackendId; i++) {
segP->procState[i].limit = -1; /* no backend active !!*/
segP->procState[i].resetState = false;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.11 1997/07/28 00:55:08 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.12 1997/08/12 22:54:04 momjian Exp $
*
*-------------------------------------------------------------------------
*/
/* this is pretty painful... want a tuple descriptor */
tupdesc = CreateTemplateTupleDesc(2);
- (void) TupleDescInitEntry(tupdesc, (AttrNumber) 1,
+ TupleDescInitEntry(tupdesc, (AttrNumber) 1,
"olastbye",
"int4",
0, false);
- (void) TupleDescInitEntry(tupdesc, (AttrNumber) 2,
+ TupleDescInitEntry(tupdesc, (AttrNumber) 2,
"odata",
"bytea",
0, false);
* will be located on whatever storage manager the user requested.
*/
- (void) heap_create(objname,
+ heap_create(objname,
objname,
(int) archchar, smgr,
tupdesc);
*/
if (buf != InvalidBuffer)
- (void) ReleaseBuffer(buf);
+ ReleaseBuffer(buf);
htup = heap_fetch(hreln, NowTimeQual, &(res->heap_iptr), &buf);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.9 1997/03/15 01:23:58 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.10 1997/08/12 22:54:07 momjian Exp $
*
* NOTES
* Outside modules can create a lock table and acquire/release
if (! ltable)
{
elog(NOTICE,"LockTabInit: couldn't malloc lock table %s\n",tabName);
- (void) pfree (shmemName);
+ pfree (shmemName);
return(INVALID_TABLEID);
}
SpinRelease(LockMgrLock);
- (void) pfree (shmemName);
+ pfree (shmemName);
if (status)
return(ltable->ctl->tableId);
* himself.
* --------------------------
*/
- (void) ProcLockWakeup(&(lock->waitProcs), (char *) ltable, (char *) lock);
+ ProcLockWakeup(&(lock->waitProcs), (char *) ltable, (char *) lock);
}
SpinRelease(masterLock);
* --------------------
*/
waitQueue = &(lock->waitProcs);
- (void) ProcLockWakeup(waitQueue, (char *) ltable, (char *) lock);
+ ProcLockWakeup(waitQueue, (char *) ltable, (char *) lock);
}
#ifdef USER_LOCKS
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Attic/multi.c,v 1.2 1996/11/03 05:07:31 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Attic/multi.c,v 1.3 1997/08/12 22:54:09 momjian Exp $
*
* NOTES:
* (1) The lock.c module assumes that the caller here is doing
* the last level lock we successfully acquired
*/
retStatus = FALSE;
- (void) MultiRelease(tableId, tag, lockt, i);
+ MultiRelease(tableId, tag, lockt, i);
/* now leave the loop. Don't try for any more locks */
break;
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.16 1997/08/12 20:15:48 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.17 1997/08/12 22:54:13 momjian Exp $
*
*-------------------------------------------------------------------------
*/
oldcxt = MemoryContextSwitchTo(MdCxt);
Md_fdvec = (MdfdVec *) palloc(Nfds * sizeof(MdfdVec));
- (void) MemoryContextSwitchTo(oldcxt);
+ MemoryContextSwitchTo(oldcxt);
if (Md_fdvec == (MdfdVec *) NULL)
return (SM_FAIL);
pfree(ov);
}
Md_fdvec[fd].mdfd_chain = (MdfdVec *) NULL;
- (void) MemoryContextSwitchTo(oldcxt);
+ MemoryContextSwitchTo(oldcxt);
_fdvec_free (fd);
pfree(ov);
}
- (void) MemoryContextSwitchTo(oldcxt);
+ MemoryContextSwitchTo(oldcxt);
Md_fdvec[fd].mdfd_chain = (MdfdVec *) NULL;
_fdvec_free (fd);
/* seek to the right spot */
seekpos = (long) (BLCKSZ * (blkno % RELSEG_SIZE));
if (lseek(fd, seekpos, SEEK_SET) != seekpos) {
- (void) close(fd);
+ close(fd);
return (SM_FAIL);
}
memmove(nvec, (char *) Md_fdvec, CurFd * sizeof(MdfdVec));
pfree(Md_fdvec);
- (void) MemoryContextSwitchTo(oldcxt);
+ MemoryContextSwitchTo(oldcxt);
Md_fdvec = nvec;
/* allocate an mdfdvec entry for it */
oldcxt = MemoryContextSwitchTo(MdCxt);
v = (MdfdVec *) palloc(sizeof(MdfdVec));
- (void) MemoryContextSwitchTo(oldcxt);
+ MemoryContextSwitchTo(oldcxt);
/* fill the entry */
v->mdfd_vfd = fd;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/tcop/Attic/aclchk.c,v 1.10 1997/05/22 00:15:21 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/tcop/Attic/aclchk.c,v 1.11 1997/08/12 22:54:17 momjian Exp $
*
* NOTES
* See acl.h.
ItemPointerCopy(&htp->t_ctid, &tmp_ipd);
/* XXX handle index on pg_class? */
setheapoverride(true);
- (void) heap_replace(relation, &tmp_ipd, htp);
+ heap_replace(relation, &tmp_ipd, htp);
setheapoverride(false);
heap_endscan(hsdp);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/tcop/dest.c,v 1.5 1997/01/10 20:19:00 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/tcop/dest.c,v 1.6 1997/08/12 22:54:19 momjian Exp $
*
*-------------------------------------------------------------------------
*/
}
pq_flush();
PQcleanNotify(); /* garbage collect */
- (void) MemoryContextSwitchTo(orig);
+ MemoryContextSwitchTo(orig);
#endif
/* ----------------
* tell the fe that the last of the queries has finished
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.12 1997/07/29 15:51:33 thomas Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.13 1997/08/12 22:54:24 momjian Exp $
*
*-------------------------------------------------------------------------
*/
if (*isNull) RETURN_NULL;
if (VARSIZE(v) - 4 < elmlen)
RETURN_NULL;
- (void) lo_close(fd);
+ lo_close(fd);
retval = (char *)_ArrayCast((char *)VARDATA(v), reftype, elmlen);
if ( reftype == 0) { /* not by value */
char * tempdata = palloc (elmlen);
_ReadArray(lowerIndx, upperIndx, len, fd, newfd, array, 1,isNull);
}
#ifdef LOARRAY
- (void) LOclose(fd);
- (void) LOclose(newfd);
+ LOclose(fd);
+ LOclose(newfd);
#endif
if (*isNull) {
pfree(newArr);
RETURN_NULL;
*/
pfree(v);
- (void) lo_close(fd);
+ lo_close(fd);
return((char *)array);
}
if (elmlen > 0) {
return((char *)array);
#endif
_LOArrayRange(lowerIndx, upperIndx, len, fd, newfd, array, 1, isNull);
- (void) lo_close(newfd);
+ lo_close(newfd);
} else {
_LOArrayRange(lowerIndx, upperIndx, len, fd, (int)ARR_DATA_PTR(newArr),
array, 0, isNull);
}
- (void) lo_close(fd);
+ lo_close(fd);
return ((char *) array);
}
_ArrayRange(lowerIndx, upperIndx, len, ARR_DATA_PTR(newArr), array, 0);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.11 1997/08/12 20:15:57 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.12 1997/08/12 22:54:26 momjian Exp $
*
* NOTES
* This code is actually (almost) unused.
if (quantity > 1 || quantity < -1)
unitnr++; /* adjust index for PLURAL of unit */
if (quantity >= 0)
- (void) sprintf( timestring, "%c %lu %s", RELTIME_LABEL,
+ sprintf( timestring, "%c %lu %s", RELTIME_LABEL,
quantity, unit_tab[unitnr]);
else
- (void) sprintf( timestring, "%c %lu %s %s", RELTIME_LABEL,
+ sprintf( timestring, "%c %lu %s %s", RELTIME_LABEL,
(quantity * -1), unit_tab[unitnr], RELTIME_PAST);
return(timestring);
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.13 1997/07/29 16:08:18 thomas Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.14 1997/08/12 22:54:29 momjian Exp $
*
*-------------------------------------------------------------------------
*/
int single_encode(float8 x, char *str)
{
- (void) sprintf(str, "%.*g", digits8, x);
+ sprintf(str, "%.*g", digits8, x);
return(TRUE);
} /* single_encode() */
int pair_encode(float8 x, float8 y, char *str)
{
- (void) sprintf(str, "%.*g,%.*g", digits8, x, digits8, y);
+ sprintf(str, "%.*g,%.*g", digits8, x, digits8, y);
return(TRUE);
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.29 1997/08/12 20:16:00 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.30 1997/08/12 22:54:32 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#else /* ! USE_POSIX_TIME */
struct timeb tb; /* the old V7-ism */
- (void) ftime(&tb);
+ ftime(&tb);
now = tb.time;
#endif
#else /* ! USE_POSIX_TIME */
struct timeb tb; /* the old V7-ism */
- (void) ftime(&tb);
+ ftime(&tb);
#endif
#ifdef USE_POSIX_TIME
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.11 1997/08/12 20:16:02 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.12 1997/08/12 22:54:34 momjian Exp $
*
*-------------------------------------------------------------------------
*/
char fmt[256];
int ret;
- (void) sprintf(fmt, "%%%d.%d%c", width, prec1, format);
- (void) sprintf(out, fmt, value);
+ sprintf(fmt, "%%%d.%d%c", width, prec1, format);
+ sprintf(out, fmt, value);
if ((ret = strlen(out)) > width) {
memset(ascii, '*', width - 2);
ascii[width] = 0;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/regexp.c,v 1.6 1997/08/12 20:16:04 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/regexp.c,v 1.7 1997/08/12 22:54:36 momjian Exp $
*
* Alistair Crooks added the code for the regex caching
* agc - cached the regular expressions used - there's a good chance
/* use malloc/free for the cre_s field because the storage
has to persist across transactions */
rev[oldest].cre_s = (char *) malloc(n + 1);
- (void) memmove(rev[oldest].cre_s, re, n);
+ memmove(rev[oldest].cre_s, re, n);
rev[oldest].cre_s[n] = 0;
rev[oldest].cre_text = text_re;
rev[oldest].cre_lru = ++lru;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/sets.c,v 1.4 1997/01/10 20:19:49 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/sets.c,v 1.5 1997/08/12 22:54:38 momjian Exp $
*
*-------------------------------------------------------------------------
*/
ItemPointerCopy(&tup->t_ctid, &ipdata);
setheapoverride(true);
- (void) heap_replace(procrel, &ipdata, newtup);
+ heap_replace(procrel, &ipdata, newtup);
setheapoverride(false);
setoid = newtup->t_oid;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.11 1997/08/03 02:37:32 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.12 1997/08/12 22:54:41 momjian Exp $
*
*-------------------------------------------------------------------------
*/
return;
}
- (void) FileSeek(fd, 0L, SEEK_SET);
+ FileSeek(fd, 0L, SEEK_SET);
for (relno = 0; relno < Num_indices_bootstrap; relno++) {
/* first read the relation descriptor length*/
if (fd < 0)
elog(FATAL, "cannot create init file %s", INIT_FILENAME);
- (void) FileSeek(fd, 0L, SEEK_SET);
+ FileSeek(fd, 0L, SEEK_SET);
/*
* Build a relation descriptor for pg_attnumind without resort to the
ird->rd_rel = relform;
}
- (void) FileClose(fd);
+ FileClose(fd);
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.16 1997/07/24 20:16:32 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.17 1997/08/12 22:54:44 momjian Exp $
*
*-------------------------------------------------------------------------
*/
elog(FATAL, "DebugFileOpen: open of %s: %m",
OutputFileName);
istty = isatty(fd);
- (void) close(fd);
+ close(fd);
/* If the file is a tty and we're running under the
* postmaster, try to send stdout there as well (if it
* isn't a tty then stderr will block out stdout, so we
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/exc.c,v 1.13 1997/03/26 03:27:04 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/exc.c,v 1.14 1997/08/12 22:54:46 momjian Exp $
*
* NOTE
* XXX this code needs improvement--check for state violations and
data = data;
#endif
- (void) fflush(stdout); /* In case stderr is buffered */
+ fflush(stdout); /* In case stderr is buffered */
#if 0
if (ProgramName != NULL && *ProgramName != '\0')
- (void) fprintf(stderr, "%s: ", ProgramName);
+ fprintf(stderr, "%s: ", ProgramName);
#endif
if (message != NULL)
- (void) fprintf(stderr, "%s", message);
+ fprintf(stderr, "%s", message);
else if (excP->message != NULL)
- (void) fprintf(stderr, "%s", excP->message);
+ fprintf(stderr, "%s", excP->message);
else
#ifdef lint
- (void) fprintf(stderr, "UNNAMED EXCEPTION 0x%lx", excP);
+ fprintf(stderr, "UNNAMED EXCEPTION 0x%lx", excP);
#else
- (void) fprintf(stderr, "UNNAMED EXCEPTION 0x%lx", (long)excP);
+ fprintf(stderr, "UNNAMED EXCEPTION 0x%lx", (long)excP);
#endif
- (void) fprintf(stderr, " (%ld)", detail);
+ fprintf(stderr, " (%ld)", detail);
if (errno > 0 && errno < sys_nerr)
- (void) fprintf(stderr, " [%s]", strerror(errno));
+ fprintf(stderr, " [%s]", strerror(errno));
else if (errno != 0)
- (void) fprintf(stderr, " [Error %d]", errno);
+ fprintf(stderr, " [Error %d]", errno);
- (void) fprintf(stderr, "\n");
+ fprintf(stderr, "\n");
- (void) fflush(stderr);
+ fflush(stderr);
}
ExcProc *
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/format.c,v 1.2 1997/05/17 16:23:06 mergl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/format.c,v 1.3 1997/08/12 22:54:47 momjian Exp $
*
*-------------------------------------------------------------------------
*/
va_start(args, fmt);
- (void) vsprintf(FormBuf, fmt, args);
+ vsprintf(FormBuf, fmt, args);
va_end(args);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/hash/dynahash.c,v 1.6 1996/11/10 03:03:36 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/hash/dynahash.c,v 1.7 1997/08/12 22:54:50 momjian Exp $
*
*-------------------------------------------------------------------------
*/
}
free((char *)segp);
}
- (void) MEM_FREE( (char *) hashp->dir);
- (void) MEM_FREE( (char *) hashp->hctl);
+ MEM_FREE( (char *) hashp->dir);
+ MEM_FREE( (char *) hashp->hctl);
hash_stats("destroy",hashp);
- (void) MEM_FREE( (char *) hashp);
+ MEM_FREE( (char *) hashp);
}
}
if (p != NULL) {
memmove(p, *p_ptr, old_dirsize );
memset ( *p_ptr + old_dirsize, 0, new_dirsize-old_dirsize );
- (void) free( (char *)*p_ptr);
+ free( (char *)*p_ptr);
*p_ptr = p;
hashp->hctl->dsize = new_dirsize;
return(1);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.9 1997/07/24 20:17:34 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.10 1997/08/12 22:54:54 momjian Exp $
*
* NOTES
* InitPostgres() is the function called from PostgresMain
}
done:
- (void) close(dbfd);
+ close(dbfd);
pfree(pg);
if (!OidIsValid(MyDatabaseId))
void
InitStdio()
{
- (void) DebugFileOpen();
+ DebugFileOpen();
}
/* --------------------------------
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.3 1996/11/08 06:00:57 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.4 1997/08/12 22:54:57 momjian Exp $
*
*-------------------------------------------------------------------------
*/
} while (PointerIsValid(context->block));
/* restore context */
- (void) MemoryContextSwitchTo(currentContext);
+ MemoryContextSwitchTo(currentContext);
}
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/sort/Attic/lselect.c,v 1.4 1997/08/06 03:41:47 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/sort/Attic/lselect.c,v 1.5 1997/08/12 22:55:00 momjian Exp $
*
*-------------------------------------------------------------------------
*/
{
register char *lattr, *rattr;
int nkey = 0;
- extern int Nkeys;
- extern ScanKey Key;
int result = 0;
bool isnull;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/sort/Attic/psort.c,v 1.12 1997/08/12 20:16:14 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/sort/Attic/psort.c,v 1.13 1997/08/12 22:55:02 momjian Exp $
*
* NOTES
* Sorts the first relation into the second relation.
*/
#include <stdio.h>
#include <math.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
#include "postgres.h"
createrun(Sort *node, FILE *file, bool *empty)
{
register HeapTuple lasttuple;
- register HeapTuple btup, tup;
+ register HeapTuple tup;
struct leftist *nextrun;
- Buffer b;
bool foundeor;
short junk;
};
static struct tapelst *Tapes = NULL;
-static char Tempfile[MAXPGPATH] = TEMPDIR;
/*
* gettape - returns an open stream for writing/reading
return 0;
}
-yywrap()
+int yywrap()
{
return 1;
};
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/test/examples/testlo.c,v 1.2 1997/07/10 01:15:11 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/test/examples/testlo.c,v 1.3 1997/08/12 22:55:19 momjian Exp $
*
*-------------------------------------------------------------------------
*/
}
}
- (void) close(fd);
- (void) lo_close(conn, lobj_fd);
+ close(fd);
+ lo_close(conn, lobj_fd);
return lobjId;
}
}
}
- (void) lo_close(conn, lobj_fd);
- (void) close(fd);
+ lo_close(conn, lobj_fd);
+ close(fd);
return;
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/test/examples/Attic/testlo2.c,v 1.1.1.1 1996/07/09 06:22:23 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/test/examples/Attic/testlo2.c,v 1.2 1997/08/12 22:55:21 momjian Exp $
*
*-------------------------------------------------------------------------
*/
}
}
- (void) close(fd);
- (void) lo_close(conn, lobj_fd);
+ close(fd);
+ lo_close(conn, lobj_fd);
return lobjId;
}
}
}
- (void) lo_close(conn, lobj_fd);
- (void) close(fd);
+ lo_close(conn, lobj_fd);
+ close(fd);
return;
}
/*
- * $Header: /cvsroot/pgsql/src/test/regress/regress.c,v 1.7 1997/07/29 16:21:12 thomas Exp $
+ * $Header: /cvsroot/pgsql/src/test/regress/regress.c,v 1.8 1997/08/12 22:55:25 momjian Exp $
*/
#include <float.h> /* faked on sunos */
return(NULL);
result = (char *) palloc(60);
- (void) sprintf(result, "(%g,%g,%g)",
+ sprintf(result, "(%g,%g,%g)",
widget->center.x, widget->center.y, widget->radius);
return(result);
}