head     1.6;
branch   ;
access   ;
symbols  Version_2_1:1.5 Version_2:1.4 C_Demo_1:1.4;
locks    ; strict;
comment  @ * @;


1.6
date     91.04.28.09.15.57;  author cimarron;  state Exp;
branches ;
next     1.5;

1.5
date     90.08.17.08.51.09;  author cimarron;  state Exp;
branches ;
next     1.4;

1.4
date     89.09.05.17.11.43;  author mao;  state Version_2;
branches ;
next     1.3;

1.3
date     89.04.12.19.56.05;  author dillon;  state Exp;
branches ;
next     1.2;

1.2
date     89.03.22.17.34.28;  author muir;  state Stab;
branches ;
next     1.1;

1.1
date     89.01.17.05.54.48;  author cimarron;  state Exp;
branches ;
next     ;


desc
@@


1.6
log
@Converted IsValid code into macros and added an improved NodeIsType scheme
@
text
@/*
 * sdir.h --
 *	POSTGRES scan direction definitions.
 *
 * Identification:
 *	$Header: RCS/sdir.h,v 1.5 90/08/17 08:51:09 cimarron Exp Locker: cimarron $
 */

#ifndef	SDirIncluded	/* Include this file only once. */
#define SDirIncluded	1

#include "tmp/c.h"

typedef int8	ScanDirection;

#define BackwardScanDirection	(-1)
#define NoMovementScanDirection	0
#define ForwardScanDirection	1

/*
 * ScanDirectionIsValid --
 *	True iff scan direciton is valid.
 */
#define ScanDirectionIsValid(direction) \
    ((bool) (AsInt8(BackwardScanDirection) <= AsInt8(direction) && \
	     AsInt8(direction) <= AsInt8(ForwardScanDirection)))

/*
 * ScanDirectionIsBackward --
 *	True iff scan direciton is backward.
 *
 * Note:
 *	Assumes scan direction is valid.
 */
#define ScanDirectionIsBackward(direction) \
    ((bool) (AsInt8(direction) == AsInt8(BackwardScanDirection)))

/*
 * ScanDirectionIsNoMovement --
 *	True iff scan direciton indicates no movement.
 *
 * Note:
 *	Assumes scan direction is valid.
 */
#define ScanDirectionIsNoMovement(direction) \
    ((bool) (AsInt8(direction) == AsInt8(NoMovementScanDirection)))

/*
 * ScanDirectionIsForward --
 *	True iff scan direciton is forward.
 *
 * Note:
 *	Assumes scan direction is valid.
 */
#define ScanDirectionIsForward(direction) \
    ((bool) (AsInt8(direction) == AsInt8(ForwardScanDirection)))

#endif	/* !defined(SDirIncluded) */
@


1.5
log
@added pathnames to #include statements
@
text
@d6 1
a6 1
 *	$Header: RCS/sdir.h,v 1.4 89/09/05 17:11:43 mao Version_2 Locker: cimarron $
d24 3
a26 5
extern
bool
ScanDirectionIsValid ARGS((
	ScanDirection	direction
));
d35 2
a36 5
extern
bool
ScanDirectionIsBackward ARGS((
	ScanDirection	direction
));
d45 2
a46 5
extern
bool
ScanDirectionIsNoMovement ARGS((
	ScanDirection	direction
));
d55 2
a56 5
extern
bool
ScanDirectionIsForward ARGS((
	ScanDirection	direction
));
@


1.4
log
@Working version of C-only demo
@
text
@d6 1
a6 1
 *	$Header: /usr6/postgres/mao/postgres/src/lib/H/RCS/sdir.h,v 1.3 89/04/12 19:56:05 dillon Exp $
d12 1
a12 3
#ifndef C_H
#include "c.h"
#endif
@


1.3
log
@c.h
@
text
@d6 1
a6 1
 *	$Header: /usr6/postgres/dillon/ptree/src/lib/H/RCS/sdir.h,v 1.2 89/03/22 17:34:28 muir Stab $
@


1.2
log
@copyright removal
@
text
@d6 1
a6 1
 *	$Header: /usr6/postgres/muir/postgres/src/lib/H/RCS/sdir.h,v 1.1 89/01/17 05:54:48 cimarron Exp $
d12 1
d14 1
@


1.1
log
@Initial revision
@
text
@a0 27

; /*
; * 
; * POSTGRES Data Base Management System
; * 
; * Copyright (c) 1988 Regents of the University of California
; * 
; * Permission to use, copy, modify, and distribute this software and its
; * documentation for educational, research, and non-profit purposes and
; * without fee is hereby granted, provided that the above copyright
; * notice appear in all copies and that both that copyright notice and
; * this permission notice appear in supporting documentation, and that
; * the name of the University of California not be used in advertising
; * or publicity pertaining to distribution of the software without
; * specific, written prior permission.  Permission to incorporate this
; * software into commercial products can be obtained from the Campus
; * Software Office, 295 Evans Hall, University of California, Berkeley,
; * Ca., 94720 provided only that the the requestor give the University
; * of California a free licence to any derived software for educational
; * and research purposes.  The University of California makes no
; * representations about the suitability of this software for any
; * purpose.  It is provided "as is" without express or implied warranty.
; * 
; */



d6 1
a6 1
 *	$Header: sdir.h,v 1.1 88/11/11 16:37:24 postgres Exp $
@
