sexpr.c revision 431a83fb29482c5170b3e4026e59bb14849a6707
/*
* Portions Copyright (C) 2004, 2005, 2007, 2014 Internet Systems Consortium, Inc. ("ISC")
* Portions Copyright (C) 2001 Internet Software Consortium.
*
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC AND NOMINUM DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Portions Copyright (C) 2001 Nominum, Inc.
*
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC AND NOMINUM DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: sexpr.c,v 1.9 2007/08/28 07:20:43 tbox Exp $ */
/*! \file */
#include <config.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <isc/assertions.h>
{
return (NULL);
return (sexpr);
}
isccc_sexpr_tconst(void)
{
return (&sexpr_t);
}
isccc_sexpr_fromstring(const char *str)
{
return (NULL);
return (NULL);
}
return (sexpr);
}
{
unsigned int region_size;
return (NULL);
/*
* We add an extra byte when we malloc so we can NUL terminate
* the binary data. This allows the caller to use it as a C
* string. It's up to the caller to ensure this is safe. We don't
* add 1 to the length of the binary region, because the NUL is
* not part of the binary data.
*/
return (NULL);
}
/*
* NUL terminate.
*/
return (sexpr);
}
void
{
return;
case ISCCC_SEXPRTYPE_STRING:
break;
break;
case ISCCC_SEXPRTYPE_BINARY:
break;
}
}
static isc_boolean_t
{
unsigned char *curr;
return (ISC_FALSE);
curr++;
}
return (ISC_TRUE);
}
void
{
unsigned int size, i;
unsigned char *curr;
return;
}
case ISCCC_SEXPRTYPE_T:
break;
case ISCCC_SEXPRTYPE_STRING:
break;
do {
}
}
break;
case ISCCC_SEXPRTYPE_BINARY:
} else {
for (i = 0; i < size; i++)
}
break;
default:
INSIST(0);
}
}
{
}
{
}
void
{
}
void
{
}
{
return (NULL);
return (elt);
}
/* Nothing */;
return (elt);
}
{
return (ISC_TRUE);
return (ISC_FALSE);
}
{
return (ISC_TRUE);
return (ISC_FALSE);
}
{
return (ISC_TRUE);
return (ISC_FALSE);
}
{
return (ISC_TRUE);
return (ISC_FALSE);
}
char *
{
}
{
}