/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/sysmacros.h>
#include <strings.h>
#include <stdlib.h>
#include <assert.h>
#include <dt_strtab.h>
#include <dt_impl.h>
static int
{
return (-1);
return (-1);
}
return (0);
}
{
return (NULL);
goto err;
goto err;
return (sp);
err:
return (NULL);
}
void
{
ulong_t i;
for (i = 0; i < sp->str_hashsz; i++) {
}
}
}
{
ulong_t g, h = 0;
const char *p;
size_t n = 0;
for (p = key; *p != '\0'; p++, n++) {
h = (h << 4) + *p;
if ((g = (h & 0xf0000000)) != 0) {
h ^= (g >> 24);
h ^= g;
}
}
*len = n;
return (h);
}
static int
{
int rv;
while (len != 0) {
return (rv);
buf += n;
str += n;
len -= n;
}
return (0);
}
static int
{
while (len != 0) {
goto err;
b++;
}
str += n;
len -= n;
}
return (0);
err:
return (-1);
}
{
ulong_t h;
return (0); /* we keep a \0 at offset 0 to simplify things */
}
return (-1);
}
{
ulong_t h;
return (off);
/*
* Create a new hash bucket, initialize it, and insert it at the front
* of the hash chain for the appropriate bucket.
*/
return (-1L);
/*
* Now copy the string data into our buffer list, and then update
* the global counts of strings and bytes. Return str's byte offset.
*/
return (-1L);
}
{
}
{
ulong_t i;
size_t n;
else
break;
}
return (-1);
return (total);
}