/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 (c) 2001 by Sun Microsystems, Inc.
* All rights reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/sysmacros.h>
#include <strings.h>
#include <stdlib.h>
#include <stdio.h>
#include "strtab.h"
#include "memory.h"
static void
{
}
void
{
}
void
{
ulong_t i;
for (i = 0; i < sp->str_hashsz; i++) {
}
}
}
static ulong_t
{
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 void
{
while (len != 0) {
b++;
}
str += n;
len -= n;
}
}
{
ulong_t h;
return (0); /* we keep a \0 at offset 0 to simplify things */
/*
* If the string is already in our hash table, just return the offset
* of the existing string element and do not add a duplicate string.
*/
}
/*
* Create a new hash bucket, initialize it, and insert it at the front
* of the hash chain for the appropriate bucket.
*/
/*
* Now copy the string data into our buffer list, and then update
* the global counts of strings and bytes. Return str's byte offset.
*/
}
{
}
{
ulong_t i;
size_t n;
else
break;
}
return (-1);
return (total);
}
void
{
ulong_t i;
for (i = 0; i < sp->str_hashsz; i++) {
buf += n;
}
(void) printf("\"\n");
}
}
}