stringlist.h revision 26924
11590Srgrimes/*	$NetBSD: stringlist.h,v 1.2 1997/01/17 06:11:36 lukem Exp $	*/
21590Srgrimes
31590Srgrimes/*
41590Srgrimes * Copyright (c) 1994 Christos Zoulas
51590Srgrimes * All rights reserved.
61590Srgrimes *
71590Srgrimes * Redistribution and use in source and binary forms, with or without
81590Srgrimes * modification, are permitted provided that the following conditions
91590Srgrimes * are met:
101590Srgrimes * 1. Redistributions of source code must retain the above copyright
111590Srgrimes *    notice, this list of conditions and the following disclaimer.
121590Srgrimes * 2. Redistributions in binary form must reproduce the above copyright
131590Srgrimes *    notice, this list of conditions and the following disclaimer in the
141590Srgrimes *    documentation and/or other materials provided with the distribution.
151590Srgrimes * 3. All advertising materials mentioning features or use of this software
161590Srgrimes *    must display the following acknowledgement:
171590Srgrimes *	This product includes software developed by Christos Zoulas.
181590Srgrimes * 4. The name of the author may not be used to endorse or promote products
191590Srgrimes *    derived from this software without specific prior written permission.
201590Srgrimes *
211590Srgrimes * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
221590Srgrimes * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
231590Srgrimes * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
241590Srgrimes * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
251590Srgrimes * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
261590Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
271590Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
281590Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
291590Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
301590Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
311590Srgrimes * SUCH DAMAGE.
321590Srgrimes */
331590Srgrimes
341590Srgrimes#ifndef _STRINGLIST_H
35116390Scharnier#define _STRINGLIST_H
3685632Sschweikh#include <sys/cdefs.h>
371590Srgrimes#include <sys/types.h>
381590Srgrimes
391590Srgrimes/*
4085632Sschweikh * Simple string list
41116390Scharnier */
4299112Sobrientypedef struct _stringlist {
4399112Sobrien	char	**sl_str;
441590Srgrimes	size_t	  sl_max;
451590Srgrimes	size_t	  sl_cur;
461590Srgrimes} StringList;
471590Srgrimes
4885632Sschweikh__BEGIN_DECLS
491590SrgrimesStringList *sl_init	__P((void));
5085632Sschweikhvoid	 sl_add		__P((StringList *, char *));
5185632Sschweikhvoid	 sl_free	__P((StringList *, int));
5285632Sschweikhchar	*sl_find	__P((StringList *, char *));
5385632Sschweikh__END_DECLS
541590Srgrimes
551590Srgrimes#endif /* _STRINGLIST_H */
561590Srgrimes