Home | History | Annotate | Line # | Download | only in include
stringlist.h revision 1.2
      1  1.2  lukem /*	$NetBSD: stringlist.h,v 1.2 1997/01/17 06:11:36 lukem Exp $	*/
      2  1.2  lukem 
      3  1.2  lukem /*
      4  1.2  lukem  * Copyright (c) 1994 Christos Zoulas
      5  1.2  lukem  * All rights reserved.
      6  1.2  lukem  *
      7  1.2  lukem  * Redistribution and use in source and binary forms, with or without
      8  1.2  lukem  * modification, are permitted provided that the following conditions
      9  1.2  lukem  * are met:
     10  1.2  lukem  * 1. Redistributions of source code must retain the above copyright
     11  1.2  lukem  *    notice, this list of conditions and the following disclaimer.
     12  1.2  lukem  * 2. Redistributions in binary form must reproduce the above copyright
     13  1.2  lukem  *    notice, this list of conditions and the following disclaimer in the
     14  1.2  lukem  *    documentation and/or other materials provided with the distribution.
     15  1.2  lukem  * 3. All advertising materials mentioning features or use of this software
     16  1.2  lukem  *    must display the following acknowledgement:
     17  1.2  lukem  *	This product includes software developed by Christos Zoulas.
     18  1.2  lukem  * 4. The name of the author may not be used to endorse or promote products
     19  1.2  lukem  *    derived from this software without specific prior written permission.
     20  1.2  lukem  *
     21  1.2  lukem  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
     22  1.2  lukem  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
     23  1.2  lukem  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     24  1.2  lukem  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
     25  1.2  lukem  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     26  1.2  lukem  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     27  1.2  lukem  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     28  1.2  lukem  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     29  1.2  lukem  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     30  1.2  lukem  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     31  1.2  lukem  * SUCH DAMAGE.
     32  1.2  lukem  */
     33  1.2  lukem 
     34  1.2  lukem #ifndef _STRINGLIST_H
     35  1.2  lukem #define _STRINGLIST_H
     36  1.2  lukem #include <sys/cdefs.h>
     37  1.2  lukem #include <sys/types.h>
     38  1.2  lukem 
     39  1.2  lukem /*
     40  1.2  lukem  * Simple string list
     41  1.2  lukem  */
     42  1.2  lukem typedef struct _stringlist {
     43  1.2  lukem 	char	**sl_str;
     44  1.2  lukem 	size_t	  sl_max;
     45  1.2  lukem 	size_t	  sl_cur;
     46  1.2  lukem } StringList;
     47  1.2  lukem 
     48  1.2  lukem __BEGIN_DECLS
     49  1.2  lukem StringList *sl_init	__P((void));
     50  1.2  lukem void	 sl_add		__P((StringList *, char *));
     51  1.2  lukem void	 sl_free	__P((StringList *, int));
     52  1.2  lukem char	*sl_find	__P((StringList *, char *));
     53  1.2  lukem __END_DECLS
     54  1.2  lukem 
     55  1.2  lukem #endif /* _STRINGLIST_H */
     56