xref: /illumos-gate/usr/src/cmd/vi/port/ex_argv.h (revision 7c478bd9)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23 /*	  All Rights Reserved  	*/
24 
25 
26 /* Copyright (c) 1981 Regents of the University of California */
27 #ident	"%Z%%M%	%I%	%E% SMI"	/* SVr4.0 1.6	*/
28 /*
29  * The current implementation of the argument list is poor,
30  * using an argv even for internally done "next" commands.
31  * It is not hard to see that this is restrictive and a waste of
32  * space.  The statically allocated glob structure could be replaced
33  * by a dynamically allocated argument area space.
34  */
35 var unsigned char	**argv;
36 var unsigned char	**argv0;
37 var unsigned char	*args;
38 var unsigned char	*args0;
39 var short	argc;
40 var short	argc0;
41 var short	morargc;		/* Used with "More files to edit..." */
42 
43 var int	firstln;		/* From +lineno */
44 var unsigned char	*firstpat;		/* From +/pat	*/
45 
46 struct	glob {
47 	short	argc;			/* Index of current file in argv */
48 	short	argc0;			/* Number of arguments in argv */
49 	unsigned char	*argv[NARGS + 1];	/* WHAT A WASTE! */
50 	unsigned char	argspac[NCARGS + sizeof (int)];
51 };
52 var struct	glob frob;
53