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