/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 2000-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> *
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
#pragma prototyped
/*
* prefix table private interface
*
* Glenn Fowler
* AT&T Research
*/
#ifndef _PTPREFIX_PRIVATE_
#define _PTPREFIX_PRIVATE_ \
#include <cdt.h>
#include <error.h>
#include "pt.h"
#define PTSCAN(t,x,b,m,s) \
do \
{ \
Ptprefix_t* _pt_p; \
Ptaddr_t m; \
Ptaddr_t x; \
unsigned int b; \
for (_pt_p = (Ptprefix_t*)dtfirst((t)->dict); _pt_p; _pt_p = (Ptprefix_t*)dtnext((t)->dict, _pt_p)) \
{ \
do \
{ \
x = _pt_min; \
m = 1; \
b = PTBITS; \
while (m && \
{ \
x >>= PTSHIFT; \
m <<= PTSHIFT; \
b -= PTSHIFT; \
} \
x = _pt_min; \
s; \
if (!b || (_pt_min += m) < x) \
break; \
} \
} while (0)
#endif