head	1.3;
access;
symbols
	release_4_2:1.3
	aix_ok:1.3
	Version_2_1:1.3
	C_Demo_1:1.2;
locks; strict;
comment	@ * @;


1.3
date	90.09.25.16.52.55;	author kemnitz;	state Exp;
branches;
next	1.2;

1.2
date	89.09.05.17.28.30;	author mao;	state C_Demo_1;
branches;
next	1.1;

1.1
date	89.06.16.20.17.20;	author hirohama;	state Exp;
branches;
next	;


desc
@@


1.3
log
@Updating from revision 1.2 to revision 1.4
@
text
@/*
 * enbl.c --
 *	POSTGRES module enable and disable support code.
 */

#include "tmp/c.h"

RcsId("$Header: RCS/enbl.c,v 1.4 90/08/18 00:42:35 cimarron Exp $");

#include "utils/module.h"

bool
BypassEnable(enableCountInOutP, on)
	Count	*enableCountInOutP;
	bool	on;
{
	AssertArg(PointerIsValid(enableCountInOutP));
	AssertArg(BoolIsValid(on));

	if (on) {
		*enableCountInOutP += 1;
		return ((bool)(*enableCountInOutP >= 2));
	}

	AssertState(*enableCountInOutP >= 1);

	*enableCountInOutP -= 1;

	return ((bool)(*enableCountInOutP >= 1));
}
@


1.2
log
@Working version of C-only demo
@
text
@d6 1
a6 1
#include "c.h"
d8 1
a8 1
RcsId("$Header: /usr6/postgres/mao/postgres/src/utils/init/RCS/enbl.c,v 1.1 89/06/16 20:17:20 hirohama Exp $");
d10 1
a10 1
#include "enbl.h"
@


1.1
log
@Initial revision
@
text
@d8 1
a8 1
RcsId("$Header$");
@
