NetBSD/usr.bin/vi/common/args.h

30 lines
884 B
C
Raw Normal View History

1994-08-17 20:17:19 +04:00
/*-
* Copyright (c) 1993, 1994
* The Regents of the University of California. All rights reserved.
1996-05-20 06:01:36 +04:00
* Copyright (c) 1993, 1994, 1995, 1996
* Keith Bostic. All rights reserved.
1994-08-17 20:17:19 +04:00
*
1996-05-20 06:01:36 +04:00
* See the LICENSE file for redistribution information.
1994-08-17 20:17:19 +04:00
*
1996-05-20 06:01:36 +04:00
* @(#)args.h 10.2 (Berkeley) 3/6/96
1994-08-17 20:17:19 +04:00
*/
/*
* Structure for building "argc/argv" vector of arguments.
*
* !!!
* All arguments are nul terminated as well as having an associated length.
* The argument vector is NOT necessarily NULL terminated. The proper way
* to check the number of arguments is to use the argc value in the EXCMDARG
* structure or to walk the array until an ARGS structure with a length of 0
* is found.
*/
typedef struct _args {
CHAR_T *bp; /* Argument. */
size_t blen; /* Buffer length. */
size_t len; /* Argument length. */
#define A_ALLOCATED 0x01 /* If allocated space. */
u_int8_t flags;
} ARGS;