1 /***********************************************************************
2 *                                                                      *
3 *               This software is part of the ast package               *
4 *          Copyright (c) 1985-2012 AT&T Intellectual Property          *
5 *                      and is licensed under the                       *
6 *                 Eclipse Public License, Version 1.0                  *
7 *                    by AT&T Intellectual Property                     *
8 *                                                                      *
9 *                A copy of the License is available at                 *
10 *          http://www.eclipse.org/org/documents/epl-v10.html           *
11 *         (with md5 checksum b35adb5213ca9657e911e9befb180842)         *
12 *                                                                      *
13 *              Information and Software Systems Research               *
14 *                            AT&T Research                             *
15 *                           Florham Park NJ                            *
16 *                                                                      *
17 *                 Glenn Fowler <gsf@research.att.com>                  *
18 *                  David Korn <dgk@research.att.com>                   *
19 *                   Phong Vo <kpv@research.att.com>                    *
20 *                                                                      *
21 ***********************************************************************/
22 #pragma prototyped
23 /*
24  * cmdarg library private definitions
25  */
26 
27 #ifndef _CMDLIB_H
28 #define _CMDLIB_H	1
29 
30 #define _CMDARG_PRIVATE_ \
31 	struct \
32 	{ \
33 	size_t		args;		/* total args			*/ \
34 	size_t		commands;	/* total commands		*/ \
35 	}		total; \
36 	Error_f		errorf;		/* optional error callback	*/ \
37 	Cmdrun_f	runf;		/* exec function		*/ \
38 	int		argcount;	/* current arg count		*/ \
39 	int		argmax;		/* max # args			*/ \
40 	int		echo;		/* just an echo			*/ \
41 	int		flags;		/* CMD_* flags			*/ \
42 	int		insertlen;	/* strlen(insert)		*/ \
43 	int		offset;		/* post arg offset		*/ \
44 	Cmddisc_t*	disc;		/* discipline			*/ \
45 	char**		argv;		/* exec argv			*/ \
46 	char**		firstarg;	/* first argv file arg		*/ \
47 	char**		insertarg;	/* argv before insert		*/ \
48 	char**		postarg;	/* start of post arg list	*/ \
49 	char**		nextarg;	/* next argv file arg		*/ \
50 	char*		nextstr;	/* next string ends before here	*/ \
51 	char*		laststr;	/* last string ends before here	*/ \
52 	char*		insert;		/* replace with current arg	*/ \
53 	char		buf[1];		/* argv and arg buffer		*/
54 
55 #include <cmdarg.h>
56 
57 #endif
58