/*
* 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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <strings.h>
#include "pkglib.h"
#include "nhash.h"
#include "pkglocale.h"
#ifndef _KERNEL
#else /* _KERNEL */
#endif /* _KERNEL */
#define VERIFY_HASH_REALLOC
static int
{
}
static int
{
char *cp;
char *np;
int hv = 0;
/* determine starting and ending positions */
/* compute hash over all characters from start to end */
}
/* return computed hash */
}
int
{
return (-1);
}
return (-1);
}
} else {
}
} else {
}
return (0);
}
int
{
/*
* If cp is NULL, then init_cache() wasn't called. Quietly return the
* error code and let the caller deal with it.
*/
return (-1);
} else {
#ifdef VERIFY_HASH_REALLOC
pkg_gt("realloc(%d) bucket=%d\n"),
#endif /* VERIFY_HASH_REALLOC */
if ((titempp =
#ifdef _KERNEL
#else /* !_KERNEL */
#endif /* _KERNEL */
} else
}
pkg_gt("add_cache(): out of memory\n"));
return (-1);
}
}
return (0);
}
Item *
{
int i;
/*
* If cp is NULL, then init_cache() wasn't called. Quietly return the
* error code and let the caller deal with it.
*/
return (Null_Item);
}
}
}
return (Null_Item);
}