stak.h revision da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/***********************************************************************
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* This software is part of the ast package *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* Copyright (c) 1985-2007 AT&T Knowledge Ventures *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* and is licensed under the *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* Common Public License, Version 1.0 *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* by AT&T Knowledge Ventures *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* A copy of the License is available at *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* http://www.opensource.org/licenses/cpl1.0.txt *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* Information and Software Systems Research *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* AT&T Research *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* Florham Park NJ *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* Glenn Fowler <gsf@research.att.com> *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* David Korn <dgk@research.att.com> *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* Phong Vo <kpv@research.att.com> *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin***********************************************************************/
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#pragma prototyped
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/*
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * David Korn
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * AT&T Research
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Interface definitions for a stack-like storage library
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#ifndef _STAK_H
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define _STAK_H
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#include <stk.h>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define Stak_t Sfio_t
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define staksp stkstd
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define STAK_SMALL STK_SMALL
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define stakptr(n) stkptr(stkstd,n)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define staktell() stktell(stkstd)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define stakputc(c) sfputc(stkstd,(c))
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define stakwrite(b,n) sfwrite(stkstd,(b),(n))
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define stakputs(s) (sfputr(stkstd,(s),0),--stkstd->_next)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define stakseek(n) stkseek(stkstd,n)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define stakcreate(n) stkopen(n)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define stakinstall(s,f) stkinstall(s,f)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define stakdelete(s) stkclose(s)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define staklink(s) stklink(s)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define stakalloc(n) stkalloc(stkstd,n)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define stakcopy(s) stkcopy(stkstd,s)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define stakset(c,n) stkset(stkstd,c,n)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define stakfreeze(n) stkfreeze(stkstd,n)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif