/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1985-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 *
* *
* Glenn Fowler <gsf@research.att.com> *
* David Korn <dgk@research.att.com> *
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
#ifndef _CDTLIB_H
** this header is exported to the method libraries
** Written by Kiem-Phong Vo (5/25/96)
*/
#if _PACKAGE_ast
#include <ast.h>
#if !_BLD_cdt
#include <dlldefs.h>
#endif
#endif
#include <cdt.h>
#include <unistd.h>
#include <aso.h>
#include "debug.h"
/* short-hand notations */
#define NIL(t) ((t)0)
#define reg register
/* min #bits for a hash table. (1<<this) is table size */
/* convenient types */
#if !defined(uint)
#define uint unsigned int
#endif
#if !defined(uchar)
#define uchar unsigned char
#endif
/* This struct holds private method data created on DT_OPEN */
struct _dtdata_s
};
/* this structure holds the plugin information */
typedef struct _dtlib_s
{
} Dtlib_t;
#if _BLD_cdt
#if defined(__STDC__)
#else
#endif
#else
#if defined(__STDC__)
#define CDTLIB(m) \
{ \
int i; \
int n; \
if (!type) \
return &cdt_lib_##m; \
type += n; \
return 0; \
} \
unsigned long plugin_version(void) { return CDT_PLUGIN_VERSION; }
#else
#define CDTLIB(m) \
{ \
int i; \
int n; \
if (!type) \
return &cdt_lib_/**/m; \
type += n; \
return 0; \
} \
unsigned long plugin_version() { return CDT_PLUGIN_VERSION; }
#endif
#endif /* _BLD_cdt */
#define DTSETLOCK(dt) (((dt)->data->type&DT_SHARE) ? asolock(&(dt)->data->lock,1,ASO_SPINLOCK) : 0 )
/* announce completion of an operation of type (ty) on some object (ob) in dictionary (dt) */
/* map bits for upward compabitibility */
/* short-hands for fields in Dtlink_t.
** note that __hash is used as a hash value
** or as the position in the parent table.
*/
(t)->_rght = (x), (x) = (t) )
(t)->_left = (x), (x) = (t) )
#if _BLD_cdt && defined(__EXPORT__)
#define extern __EXPORT__
#endif
#undef extern
#if !_PACKAGE_ast
#endif
#endif /* _CDTLIB_H */