126924Smsmith/*	$NetBSD: stringlist.h,v 1.2 1997/01/17 06:11:36 lukem Exp $	*/
226924Smsmith
3331722Seadler/*
426924Smsmith * Copyright (c) 1994 Christos Zoulas
526924Smsmith * All rights reserved.
626924Smsmith *
726924Smsmith * Redistribution and use in source and binary forms, with or without
826924Smsmith * modification, are permitted provided that the following conditions
926924Smsmith * are met:
1026924Smsmith * 1. Redistributions of source code must retain the above copyright
1126924Smsmith *    notice, this list of conditions and the following disclaimer.
1226924Smsmith * 2. Redistributions in binary form must reproduce the above copyright
1326924Smsmith *    notice, this list of conditions and the following disclaimer in the
1426924Smsmith *    documentation and/or other materials provided with the distribution.
1526924Smsmith *
1626924Smsmith * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
1726924Smsmith * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1826924Smsmith * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1926924Smsmith * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
2026924Smsmith * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2126924Smsmith * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2226924Smsmith * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2326924Smsmith * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2426924Smsmith * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2526924Smsmith * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2626924Smsmith * SUCH DAMAGE.
2793032Simp *
2893032Simp * $FreeBSD$
2926924Smsmith */
3026924Smsmith
3126924Smsmith#ifndef _STRINGLIST_H
3226924Smsmith#define _STRINGLIST_H
3326924Smsmith#include <sys/cdefs.h>
3426924Smsmith#include <sys/types.h>
3526924Smsmith
3626924Smsmith/*
3726924Smsmith * Simple string list
3826924Smsmith */
3926924Smsmithtypedef struct _stringlist {
4026924Smsmith	char	**sl_str;
4126924Smsmith	size_t	  sl_max;
4226924Smsmith	size_t	  sl_cur;
4326924Smsmith} StringList;
4426924Smsmith
4526924Smsmith__BEGIN_DECLS
4693032SimpStringList *sl_init(void);
47109508Sobrienint	 sl_add(StringList *, char *);
4893032Simpvoid	 sl_free(StringList *, int);
49249802Seadlerchar	*sl_find(StringList *, const char *);
5026924Smsmith__END_DECLS
5126924Smsmith
5226924Smsmith#endif /* _STRINGLIST_H */
53