/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1995-2011 AT&T Intellectual Property *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
#ifndef _VDELHDR_H
#include "vdelta01.h"
#if _PACKAGE_ast
#include <ast_std.h>
#else
#if __STD_C
#include <stddef.h>
#else
#endif
#endif
#ifdef DEBUG
extern int abort();
#define DBTOTAL(t,v) ((t) += (v))
#define DBMAX(m,v) ((m) = (m) > (v) ? (m) : (v) )
#else
#define ASSERT(p)
#define DBTOTAL(t,v)
#define DBMAX(m,v)
#endif
/* short-hand notations */
#define reg register
#define uchar unsigned char
#define uint unsigned int
#define ulong unsigned long
/* default window size - Chosen to suit malloc() even on 16-bit machines. */
/* The hash function is s[0]*alpha^3 + s[1]*alpha^2 + s[2]*alpha + s[3] */
#if 0
#else /* fast multiplication using shifts&adds */
#endif
(s)[2] == (t)[2] && (s)[3] == (t)[3] )
/* Every instruction will start with a control byte.
** For portability, only 8 bits of the byte are used.
** The bits are used as follows:
** iiii ssss
** ssss: size of data involved.
** iiii: this defines 16 instruction types:
** 0: an ADD instruction.
** 1,2,3: COPY with K_QUICK addressing scheme.
** 4,5: COPY with K_SELF,K_HERE addressing schemes.
** 6,7,8,9: COPY with K_RECENT addressing scheme.
** For the above types, ssss if not zero codes the size;
** otherwise, the size is coded in subsequent bytes.
** where cc codes the size of COPY and aa codes the size of ADD.
*/
/* The below macros compute the coding for a COPY address.
** There are two caches, a "quick" cache of (K_QTYPE*256) addresses
** and a revolving cache of K_RTYPE "recent" addresses.
** First, we look in the quick cache to see if the address is there.
** If so, we use the cache index as the code.
** Otherwise, we compute from 0, the current location and
** the "recent" cache an address that is closest to the being coded address,
** then code the difference. The type is set accordingly.
**
** An invariance is 2*K_MERGE + K_QTYPE + 1 == 16
*/
}
}
switch(n) \
case 0 : break; \
}
/* Below here is code for a buffered I/O subsystem to speed up I/O */
/* structure to do buffered IO */
typedef struct _vdio_s
int size;
long here;
} Vdio_t;
typedef struct _vdbufio_s
} Vdbufio_t;
extern Vdbufio_t _Vdbufio_01;
#if !_PACKAGE_ast
#endif
#endif /*_VDELHDR_H*/