rshdr.h revision 3f54fd611f536639ec30dd53c48e5ec1897cc7d9
/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1996-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> *
* Glenn Fowler <gsf@research.att.com> *
* *
***********************************************************************/
#ifndef _RSHDR_H
#define _RSHDR_H 1
#if _PACKAGE_ast
#include <ast.h>
#include <recfmt.h>
#endif
#include <vmalloc.h>
/* because of sfio's sfreserve() semantics,
** the below parameter also limits the max size of a record that can be
** processed in rsmerge().
*/
#define _RS_PRIVATE_ \
unsigned long events; /* active events */ \
int n_list; /* number of such contexts */ \
Sfio_t* f; /* current output stream */ \
#include "recsort.h"
/* internal control bits */
#if !_PACKAGE_ast
#if __STD_C
#include <string.h>
#endif
#endif
#ifndef uchar
#define uchar unsigned char
#endif
#ifndef ushort
#define ushort unsigned short
#endif
#ifndef uint
#define uint unsigned int
#endif
#ifndef ulong
#define ulong unsigned long
#endif
#ifndef reg
#define reg register
#endif
#ifndef NIL
#endif
#ifndef UCHAR_MAX
#endif
#ifndef UINT_MAX
#endif
#ifndef INT_MAX
#endif
/* splay tree operations */
/* do quick key comparisons using first 4 bytes */
#if SIZEOF_LONG == 8
{ default : h = ((ulong)k[7]); \
} \
}
#else /* SIZEOF_LONG == 4*/
{ default : h = k[3]; \
} \
}
#endif
else \
for(l -= SIZEOF_LONG;;) \
{ if(l-- <= 0) { cmp = d; break; } \
} \
} \
}
switch(n) \
}
/* merging equivalent records */
#define EQUAL(r,o,t) \
{ if((t = r->equal) ) \
}
#if !_PACKAGE_ast && !__STD_C
#endif
#define rsnotify _rs_notify
#endif /*_RSHDR_H*/