/***********************************************************************
* *
* 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
/*
* ptv handle operations
*
* Glenn Fowler
* AT&T Research
*/
#include "ptvlib.h"
typedef struct Prefixdisc_s
{
int size;
} Prefixdisc_t;
/*
* order by prefix
*/
static int
{
return -1;
return 1;
return 0;
}
static void*
{
register Ptvprefix_t* b;
{
}
return b;
}
static void
{
free(a);
}
/*
* open a new table
*/
{
Ptv_t* a;
int i;
Prefixdisc_t* p;
{
return 0;
}
p = (Prefixdisc_t*)(a + 1);
{
free(a);
return 0;
}
a->r[0] = (unsigned char*)(p + 1);
for (i = 1; i < PTV_REGISTERS; i++)
a->r[i] = a->r[i-1] + a->size;
return a;
}
/*
* close a table
*/
int
{
if (!a)
return -1;
free(a);
return 0;
}
/*
* insert prefix range min..max into tab
* 0 returned on success
*/
{
{
}
else
pp = 0;
if (xp)
{
return xp;
else
{
do
{
if (!xp)
break;
}
}
}
/*
* delete prefix range min..max from tab
* 0 returned on success
*/
int
{
{
do
{
{
goto bad;
{
goto bad;
break;
}
}
{
goto bad;
}
}
return 0;
bad:
return -1;
}