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