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