1/*	$NetBSD$	*/
2
3#ifndef _ARGV_H_INCLUDED_
4#define _ARGV_H_INCLUDED_
5
6/*++
7/* NAME
8/*	argv 3h
9/* SUMMARY
10/*	string array utilities
11/* SYNOPSIS
12/*	#include "argv.h"
13/* DESCRIPTION
14/* .nf
15
16 /*
17  * External interface.
18  */
19typedef struct ARGV {
20    ssize_t len;			/* number of array elements */
21    ssize_t argc;			/* array elements in use */
22    char  **argv;			/* string array */
23} ARGV;
24
25extern ARGV *argv_alloc(ssize_t);
26extern void argv_add(ARGV *,...);
27extern void argv_addn(ARGV *,...);
28extern void argv_terminate(ARGV *);
29extern void argv_truncate(ARGV *, ssize_t);
30extern ARGV *argv_free(ARGV *);
31
32extern ARGV *argv_split(const char *, const char *);
33extern ARGV *argv_split_count(const char *, const char *, ssize_t);
34extern ARGV *argv_split_append(ARGV *, const char *, const char *);
35
36#define ARGV_END	((char *) 0)
37
38/* LICENSE
39/* .ad
40/* .fi
41/*	The Secure Mailer license must be distributed with this software.
42/* AUTHOR(S)
43/*	Wietse Venema
44/*	IBM T.J. Watson Research
45/*	P.O. Box 704
46/*	Yorktown Heights, NY 10598, USA
47/*--*/
48
49#endif
50