/*
* 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 1993-2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "list.h"
#include "proto_list.h"
/* LINTLIBRARY */
int max_list_depth;
void
{
int i;
for (i = 0; i < list->num_of_buckets; i++)
}
#ifdef DEBUG
void
{
int i;
int buck_count;
for (i = 0; i < list->num_of_buckets; i++) {
buck_count = 0;
buck_count++;
(void) printf("bucket[%4d] contains %5d entries\n",
i, buck_count);
}
}
/*
* print all elements of a list
*
* Debugging routine
*/
void
{
int i;
for (i = 0; i < list->num_of_buckets; i++) {
}
}
/*
* print all elements of a list of type 'file_type'
*
* Debugging routine
*/
void
{
int i;
for (i = 0; i < list->num_of_buckets; i++) {
}
}
}
#endif
unsigned int
{
unsigned int i;
for (i = 0; *str != '\0'; )
i += *str++;
return (i);
}
static int
{
int n;
return (n);
else
}
/*
* find_elem:
*
* possible values for flag.
* flag = FOLLOW_LINK
* flag = NO_FOLLOW_LINK
*/
elem *
{
elem *e;
e = e->next) {
if (!name_compare(e, key))
return (e->link_parent);
else
return (e);
}
return (NULL);
}
/*
* find_elem_isa:
*
* flags - same as find_elem()
*/
elem *
{
short orig_arch;
elem *e;
return (e);
}
/*
* find_elem_mach:
*
* flags - same as find_elem()
*/
elem *
{
elem *e;
e = e->next) {
return (e->link_parent);
else
return (e);
}
return (NULL);
}
pkg_list *
{
if (!new)
break;
}
if (!head) {
return (head);
}
if (!cur) {
return (head);
}
return (NULL);
if (!prev) {
return (cur);
}
return (head);
}
void
{
int bucket;
int depth = 0;
depth++;
break;
}
if (last) {
if (depth > max_list_depth)
return;
}
}
/*
* insert at head of list
*/
if (depth > max_list_depth)
}