diff options
| author | Garrett D'Amore <garrett@damore.org> | 2014-07-14 20:10:37 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2014-07-21 09:20:34 -0700 |
| commit | 95c635efb7c3b86efc493e0447eaec7aecca3f0f (patch) | |
| tree | 3c62b5521fea39ab7bab299052b02576ae802db9 /usr/src/cmd/man/stringlist.h | |
| parent | 81d43577d1b5e76e6016ba642ecc1a76fde43021 (diff) | |
| download | illumos-joyent-95c635efb7c3b86efc493e0447eaec7aecca3f0f.tar.gz | |
5025 import and use mandoc
Reviewed by: Hans Rosenfeld <hans.rosenfeld@nexenta.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Albert Lee <trisk@nexenta.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Diffstat (limited to 'usr/src/cmd/man/stringlist.h')
| -rw-r--r-- | usr/src/cmd/man/stringlist.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/usr/src/cmd/man/stringlist.h b/usr/src/cmd/man/stringlist.h new file mode 100644 index 0000000000..2813a102b0 --- /dev/null +++ b/usr/src/cmd/man/stringlist.h @@ -0,0 +1,52 @@ +/* + * Copyright (c) 1994 Christos Zoulas + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Christos Zoulas. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * Copyright 2012 Nexenta Systems, Inc. All rights reserved. + */ + +#ifndef _STRINGLIST_H_ +#define _STRINGLIST_H_ + +#include <sys/types.h> + +typedef struct _stringlist { + char **sl_str; + size_t sl_max; + size_t sl_cur; +} stringlist; + +stringlist *sl_init(void); +int sl_add(stringlist *, char *); +void sl_free(stringlist *, int); +char *sl_find(stringlist *, char *); + +#endif /* _STRINGLIST_H_ */ |
