stringlist.h revision 26924
126924Smsmith/* $NetBSD: stringlist.h,v 1.2 1997/01/17 06:11:36 lukem Exp $ */ 226924Smsmith 326924Smsmith/* 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 * 3. All advertising materials mentioning features or use of this software 1626924Smsmith * must display the following acknowledgement: 1726924Smsmith * This product includes software developed by Christos Zoulas. 1826924Smsmith * 4. The name of the author may not be used to endorse or promote products 1926924Smsmith * derived from this software without specific prior written permission. 2026924Smsmith * 2126924Smsmith * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 2226924Smsmith * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 2326924Smsmith * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2426924Smsmith * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 2526924Smsmith * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2626924Smsmith * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2726924Smsmith * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2826924Smsmith * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2926924Smsmith * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3026924Smsmith * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3126924Smsmith * SUCH DAMAGE. 3226924Smsmith */ 3326924Smsmith 3426924Smsmith#ifndef _STRINGLIST_H 3526924Smsmith#define _STRINGLIST_H 3626924Smsmith#include <sys/cdefs.h> 3726924Smsmith#include <sys/types.h> 3826924Smsmith 3926924Smsmith/* 4026924Smsmith * Simple string list 4126924Smsmith */ 4226924Smsmithtypedef struct _stringlist { 4326924Smsmith char **sl_str; 4426924Smsmith size_t sl_max; 4526924Smsmith size_t sl_cur; 4626924Smsmith} StringList; 4726924Smsmith 4826924Smsmith__BEGIN_DECLS 4926924SmsmithStringList *sl_init __P((void)); 5026924Smsmithvoid sl_add __P((StringList *, char *)); 5126924Smsmithvoid sl_free __P((StringList *, int)); 5226924Smsmithchar *sl_find __P((StringList *, char *)); 5326924Smsmith__END_DECLS 5426924Smsmith 5526924Smsmith#endif /* _STRINGLIST_H */ 56