xref: /freebsd/contrib/nvi/common/args.h (revision 0b3105a37d7adcadcb720112fed4dc4e8040be99)
1 /*-
2  * Copyright (c) 1993, 1994
3  *	The Regents of the University of California.  All rights reserved.
4  * Copyright (c) 1993, 1994, 1995, 1996
5  *	Keith Bostic.  All rights reserved.
6  *
7  * See the LICENSE file for redistribution information.
8  *
9  *	$Id: args.h,v 10.2 1996/03/06 19:50:07 bostic Exp $
10  */
11 
12 /*
13  * Structure for building "argc/argv" vector of arguments.
14  *
15  * !!!
16  * All arguments are nul terminated as well as having an associated length.
17  * The argument vector is NOT necessarily NULL terminated.  The proper way
18  * to check the number of arguments is to use the argc value in the EXCMDARG
19  * structure or to walk the array until an ARGS structure with a length of 0
20  * is found.
21  */
22 typedef struct _args {
23 	CHAR_T	*bp;		/* Argument. */
24 	size_t	 blen;		/* Buffer length. */
25 	size_t	 len;		/* Argument length. */
26 
27 #define	A_ALLOCATED	0x01	/* If allocated space. */
28 	u_int8_t flags;
29 } ARGS;
30