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


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

1.4
date     90.09.25.16.45.56;  author kemnitz;  state Exp;
branches ;
next     1.3;

1.3
date     89.09.05.17.24.53;  author mao;  state C_Demo_1;
branches ;
next     1.2;

1.2
date     89.02.02.15.35.05;  author dillon;  state Stab;
branches ;
next     1.1;

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


desc
@@


1.5
log
@Converted IsValid code into macros and added an improved NodeIsType scheme
@
text
@/*
 * item/internal.h --
 *	Internal definitions.
 *
 * Identification:
 *	$Header: RCS/internal.h,v 1.4 90/09/25 16:45:56 kemnitz Exp Locker: cimarron $
 */

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

#include "tmp/c.h"

#include "storage/part.h"

/*
 * PagePartitionGetNumberOfPageBits --
 *	Returns the number of bits needed to represent a page.
 */
#define PagePartitionGetNumberOfPageBits(partition)	(partition)

/*
 * PagePartitionGetNumberOfOffsetBits --
 *	Returns the number of bits needed to represent a offset.
 */
#define PagePartitionGetNumberOfOffsetBits(partition)\
	(16 - PagePartitionGetNumberOfPageBits(partition))

/*
 * PageNumberMask --
 *	Mask for a page number.
 */
#define PageNumberMask(partition)\
	(0xffff & (0xffff << PagePartitionGetNumberOfOffsetBits(partition)))

/*
 * OffsetNumberMask --
 *	Mask for an offset number.
 */
#define OffsetNumberMask(partition)\
	(0xffff >> PagePartitionGetNumberOfPageBits(partition))

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


1.4
log
@Updating from revision 1.3 to revision 1.4
@
text
@d6 1
a6 1
 *	$Header: RCS/internal.h,v 1.4 90/08/14 16:05:00 cimarron Exp $
a14 2

#define InvalidPagePartition	((PagePartition)0)
@


1.3
log
@Working version of C-only demo
@
text
@d6 1
a6 1
 *	$Header: /usr6/postgres/mao/postgres/src/storage/page/RCS/internal.h,v 1.2 89/02/02 15:35:05 dillon Stab $
d12 1
a12 1
#include "c.h"
d14 1
a14 1
#include "part.h"
@


1.2
log
@Txfer From old tree
@
text
@d6 1
a6 1
 *	$Header: internal.h,v 1.2 88/01/04 18:50:36 dillon Locked $
@


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.
; * 
; */



a1 90
 * bufpage/internal.h --
 *	Internal definitions.
 *
 * Identification:
 *	$Header: internal.h,v 1.1 88/11/11 16:36:05 postgres Exp $
 */

#ifndef	InternalDefined
#define	InternalDefined	1

#include "bufpage.h"

#define MaxInternalFragmentation	((1 << 12) - 1)
typedef struct OpaqueData {
	bits16	pageSize:4,		/* page size */
		fragmentation:12;	/* internal fragmentation */
} OpaqueData;

typedef OpaqueData	*Opaque;

/*
 * OpaqueGetPageSize --
 *	Returns the page size.
 */
extern
PageSize
OpaqueGetPageSize ARGS((
	Opaque	opaque
));

/*
 * OpaqueSetPageSize --
 *	Sets the page size.
 */
extern
void
OpaqueSetPageSize ARGS((
	Opaque	*opaqueInOutP,
	PageSize	pageSize
));

/*
 * OpaqueGetInternalFragmentation --
 *	Returns the internal fragmentation.
 */
extern
InternalFragmentation
OpaqueGetInternalFragmentation ARGS((
	Opaque	opaque
));

/*
 * OpaqueSetInternalFragmentation --
 *	Sets the internal fragmentation.
 */
extern
void
OpaqueSetInternalFragmentation ARGS((
	Opaque	opaque
));

#endif	/* !defined(InternalDefined) */

; /*
; * 
; * 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: internal.h,v 1.1 88/11/11 16:37:41 postgres Exp $
@
