195c635eGarrett D'Amore/*
295c635eGarrett D'Amore * Copyright (c) 1994 Christos Zoulas
395c635eGarrett D'Amore * All rights reserved.
495c635eGarrett D'Amore *
595c635eGarrett D'Amore * Redistribution and use in source and binary forms, with or without
695c635eGarrett D'Amore * modification, are permitted provided that the following conditions
795c635eGarrett D'Amore * are met:
895c635eGarrett D'Amore * 1. Redistributions of source code must retain the above copyright
995c635eGarrett D'Amore *    notice, this list of conditions and the following disclaimer.
1095c635eGarrett D'Amore * 2. Redistributions in binary form must reproduce the above copyright
1195c635eGarrett D'Amore *    notice, this list of conditions and the following disclaimer in the
1295c635eGarrett D'Amore *    documentation and/or other materials provided with the distribution.
1395c635eGarrett D'Amore * 3. All advertising materials mentioning features or use of this software
1495c635eGarrett D'Amore *    must display the following acknowledgement:
1595c635eGarrett D'Amore *	This product includes software developed by Christos Zoulas.
1695c635eGarrett D'Amore * 4. The name of the author may not be used to endorse or promote products
1795c635eGarrett D'Amore *    derived from this software without specific prior written permission.
1895c635eGarrett D'Amore *
1995c635eGarrett D'Amore * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
2095c635eGarrett D'Amore * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2195c635eGarrett D'Amore * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2295c635eGarrett D'Amore * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
2395c635eGarrett D'Amore * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2495c635eGarrett D'Amore * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2595c635eGarrett D'Amore * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2695c635eGarrett D'Amore * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2795c635eGarrett D'Amore * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2895c635eGarrett D'Amore * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2995c635eGarrett D'Amore * SUCH DAMAGE.
3095c635eGarrett D'Amore */
3195c635eGarrett D'Amore
3295c635eGarrett D'Amore/*
3395c635eGarrett D'Amore * Copyright 2012 Nexenta Systems, Inc. All rights reserved.
3495c635eGarrett D'Amore */
3595c635eGarrett D'Amore
3695c635eGarrett D'Amore#ifndef _STRINGLIST_H_
3795c635eGarrett D'Amore#define	_STRINGLIST_H_
3895c635eGarrett D'Amore
3995c635eGarrett D'Amore#include <sys/types.h>
4095c635eGarrett D'Amore
4195c635eGarrett D'Amoretypedef struct _stringlist {
4295c635eGarrett D'Amore	char	**sl_str;
4395c635eGarrett D'Amore	size_t	sl_max;
4495c635eGarrett D'Amore	size_t	sl_cur;
4595c635eGarrett D'Amore} stringlist;
4695c635eGarrett D'Amore
4795c635eGarrett D'Amorestringlist	*sl_init(void);
4895c635eGarrett D'Amoreint		sl_add(stringlist *, char *);
4995c635eGarrett D'Amorevoid		sl_free(stringlist *, int);
5095c635eGarrett D'Amorechar		*sl_find(stringlist *, char *);
5195c635eGarrett D'Amore
5295c635eGarrett D'Amore#endif	/* _STRINGLIST_H_ */
53