head	1.5;
access;
symbols
	perseant-exfatfs-base-20250801:1.5
	perseant-exfatfs-base-20240630:1.5
	perseant-exfatfs:1.5.0.46
	perseant-exfatfs-base:1.5
	cjep_sun2x:1.5.0.44
	cjep_sun2x-base:1.5
	cjep_staticlib_x-base1:1.5
	cjep_staticlib_x:1.5.0.42
	cjep_staticlib_x-base:1.5
	phil-wifi-20200421:1.5
	phil-wifi-20200411:1.5
	phil-wifi-20200406:1.5
	pgoyette-compat-merge-20190127:1.5
	pgoyette-compat-20190127:1.5
	pgoyette-compat-20190118:1.5
	pgoyette-compat-1226:1.5
	pgoyette-compat-1126:1.5
	pgoyette-compat-1020:1.5
	pgoyette-compat-0930:1.5
	pgoyette-compat-0906:1.5
	pgoyette-compat-0728:1.5
	pgoyette-compat-0625:1.5
	pgoyette-compat-0521:1.5
	pgoyette-compat-0502:1.5
	pgoyette-compat-0422:1.5
	pgoyette-compat-0415:1.5
	pgoyette-compat-0407:1.5
	pgoyette-compat-0330:1.5
	pgoyette-compat-0322:1.5
	pgoyette-compat-0315:1.5
	pgoyette-compat:1.5.0.40
	pgoyette-compat-base:1.5
	perseant-stdc-iso10646:1.5.0.38
	perseant-stdc-iso10646-base:1.5
	prg-localcount2-base3:1.5
	prg-localcount2-base2:1.5
	prg-localcount2-base1:1.5
	prg-localcount2:1.5.0.36
	prg-localcount2-base:1.5
	pgoyette-localcount-20170426:1.5
	bouyer-socketcan-base1:1.5
	pgoyette-localcount-20170320:1.5
	bouyer-socketcan:1.5.0.34
	bouyer-socketcan-base:1.5
	pgoyette-localcount-20170107:1.5
	pgoyette-localcount-20161104:1.5
	localcount-20160914:1.5
	pgoyette-localcount-20160806:1.5
	pgoyette-localcount-20160726:1.5
	pgoyette-localcount:1.5.0.32
	pgoyette-localcount-base:1.5
	netbsd-5-2-3-RELEASE:1.5
	netbsd-5-1-5-RELEASE:1.5
	yamt-pagecache-base9:1.5
	yamt-pagecache-tag8:1.5
	tls-earlyentropy:1.5.0.28
	tls-earlyentropy-base:1.5
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.5
	riastradh-drm2-base3:1.5
	netbsd-5-2-2-RELEASE:1.5
	netbsd-5-1-4-RELEASE:1.5
	netbsd-5-2-1-RELEASE:1.5
	netbsd-5-1-3-RELEASE:1.5
	agc-symver:1.5.0.30
	agc-symver-base:1.5
	tls-maxphys-base:1.5
	yamt-pagecache-base8:1.5
	netbsd-5-2:1.5.0.26
	yamt-pagecache-base7:1.5
	netbsd-5-2-RELEASE:1.5
	netbsd-5-2-RC1:1.5
	yamt-pagecache-base6:1.5
	yamt-pagecache-base5:1.5
	yamt-pagecache-base4:1.5
	netbsd-5-1-2-RELEASE:1.5
	netbsd-5-1-1-RELEASE:1.5
	yamt-pagecache-base3:1.5
	yamt-pagecache-base2:1.5
	yamt-pagecache:1.5.0.24
	yamt-pagecache-base:1.5
	bouyer-quota2-nbase:1.5
	bouyer-quota2:1.5.0.22
	bouyer-quota2-base:1.5
	matt-nb5-pq3:1.5.0.20
	matt-nb5-pq3-base:1.5
	netbsd-5-1:1.5.0.18
	netbsd-5-1-RELEASE:1.5
	netbsd-5-1-RC4:1.5
	netbsd-5-1-RC3:1.5
	netbsd-5-1-RC2:1.5
	netbsd-5-1-RC1:1.5
	netbsd-5-0-2-RELEASE:1.5
	netbsd-5-0-1-RELEASE:1.5
	jym-xensuspend-nbase:1.5
	netbsd-5-0:1.5.0.16
	netbsd-5-0-RELEASE:1.5
	netbsd-5-0-RC4:1.5
	netbsd-5-0-RC3:1.5
	netbsd-5-0-RC2:1.5
	jym-xensuspend:1.5.0.14
	jym-xensuspend-base:1.5
	netbsd-5-0-RC1:1.5
	netbsd-5:1.5.0.12
	netbsd-5-base:1.5
	mjf-devfs2:1.5.0.10
	mjf-devfs2-base:1.5
	yamt-pf42-base4:1.5
	yamt-pf42-base3:1.5
	hpcarm-cleanup-nbase:1.5
	yamt-pf42-base2:1.5
	yamt-pf42:1.5.0.8
	yamt-pf42-base:1.5
	keiichi-mipv6-nbase:1.5
	keiichi-mipv6:1.5.0.6
	keiichi-mipv6-base:1.5
	cube-autoconf:1.5.0.4
	cube-autoconf-base:1.5
	hpcarm-cleanup:1.5.0.2
	hpcarm-cleanup-base:1.5
	netbsd-1-1-PATCH001:1.4
	netbsd-1-1-RELEASE:1.4
	netbsd-1-1:1.4.0.4
	netbsd-1-1-base:1.4
	netbsd-1-0-PATCH06:1.4
	netbsd-1-0-PATCH05:1.4
	netbsd-1-0-PATCH04:1.4
	netbsd-1-0-PATCH03:1.4
	netbsd-1-0-PATCH02:1.4
	netbsd-1-0-PATCH1:1.4
	netbsd-1-0-PATCH0:1.4
	netbsd-1-0-RELEASE:1.4
	netbsd-1-0:1.4.0.2
	nvi-1-34b:1.1.1.3
	nvi-1-33b:1.1.1.3
	netbsd-1-0-base:1.3
	nvi-1-11b:1.1.1.2
	nvi-1-03:1.1.1.1
	bostic-nvi:1.1.1;
locks; strict;
comment	@# @;


1.5
date	96.05.20.09.04.27;	author mrg;	state dead;
branches;
next	1.4;

1.4
date	94.08.17.16.36.29;	author cgd;	state Exp;
branches
	1.4.2.1;
next	1.3;

1.3
date	94.03.28.04.30.01;	author cgd;	state Exp;
branches;
next	1.2;

1.2
date	94.01.24.06.40.54;	author cgd;	state Exp;
branches;
next	1.1;

1.1
date	94.01.24.05.53.07;	author cgd;	state Exp;
branches
	1.1.1.1;
next	;

1.4.2.1
date	94.08.17.16.36.29;	author cgd;	state dead;
branches;
next	1.4.2.2;

1.4.2.2
date	94.08.17.16.36.30;	author cgd;	state Exp;
branches;
next	;

1.1.1.1
date	94.01.24.05.53.08;	author cgd;	state Exp;
branches;
next	1.1.1.2;

1.1.1.2
date	94.03.28.02.56.30;	author cgd;	state Exp;
branches;
next	1.1.1.3;

1.1.1.3
date	94.08.17.16.17.13;	author cgd;	state Exp;
branches;
next	;


desc
@@


1.5
log
@these files are either deleted (in nvi) or not necessary
@
text
@/*-
 * Copyright (c) 1992, 1993, 1994
 *	The Regents of the University of California.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. All advertising materials mentioning features or use of this software
 *    must display the following acknowledgement:
 *	This product includes software developed by the University of
 *	California, Berkeley and its contributors.
 * 4. Neither the name of the University nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 *	@@(#)excmd.h.stub	8.73 (Berkeley) 8/9/94
 */

#define	PROMPTCHAR	':'		/* Prompt character. */

/* Ex command structure. */
typedef struct _excmdlist {
	char	*name;			/* Command name. */
					/* Underlying function. */
	int (*fn) __P((SCR *, EXF *, EXCMDARG *));

#define	E_ADDR1		0x0000001	/* One address. */
#define	E_ADDR2		0x0000002	/* Two address. */
#define	E_ADDR2_ALL	0x0000004	/* Zero/two addresses; zero == all. */
#define	E_ADDR2_NONE	0x0000008	/* Zero/two addresses; zero == none. */
#define	E_ADDRDEF	0x0000010	/* Default addresses used. */
#define	E_AUTOPRINT	0x0000020	/* Command always sets autoprint. */
#define	E_BUFFER	0x0000040	/* Buffer name supplied. */
#define	E_COUNT		0x0000080	/* Count supplied. */
#define	E_COUNT_NEG	0x0000100	/* Count was signed negative. */
#define	E_COUNT_POS	0x0000200	/* Count was signed positive. */
#define	E_FORCE		0x0000400	/*  ! */

#define	E_F_CARAT	0x0000800	/*  ^ flag. */
#define	E_F_DASH	0x0001000	/*  - flag. */
#define	E_F_DOT		0x0002000	/*  . flag. */
#define	E_F_EQUAL	0x0004000	/*  = flag. */
#define	E_F_HASH	0x0008000	/*  # flag. */
#define	E_F_LIST	0x0010000	/*  l flag. */
#define	E_F_PLUS	0x0020000	/*  + flag. */
#define	E_F_PRINT	0x0040000	/*  p flag. */

#define	E_F_PRCLEAR	0x0080000	/* Clear the print (#, l, p) flags. */
#define	E_MODIFY	0x0100000	/* File name expansion modified arg. */
#define	E_NOGLOBAL	0x0200000	/* Not in a global. */
#define	E_NOPERM	0x0400000	/* Permission denied for now. */
#define	E_NORC		0x0800000	/* Not from a .exrc or EXINIT. */
#define	E_ZERO		0x1000000	/* 0 is a legal addr1. */
#define	E_ZERODEF	0x2000000	/* 0 is default addr1 of empty files. */
	u_int32_t flags;
	char	 *syntax;		/* Syntax script. */
	char	*usage;			/* Usage line. */
	char	*help;			/* Help line. */
} EXCMDLIST;
#define	MAXCMDNAMELEN	12		/* Longest command name. */
extern EXCMDLIST const cmds[];		/* List of ex commands. */

/*
 * Structure passed around to functions implementing ex commands.
 * There are several commands in vi that build one of these and
 * call ex directly.  See vi/v_ex.c for details.
 */
struct _excmdarg {
	EXCMDLIST const *cmd;	/* Command entry in command table. */
	CHAR_T	  buffer;	/* Named buffer. */
	recno_t	  lineno;	/* Line number. */
	long	  count;	/* Signed, specified count. */
	long	  flagoff;	/* Signed, flag offset parsed by command. */
	int	  addrcnt;	/* Number of addresses (0, 1 or 2). */
	MARK	  addr1;	/* 1st address. */
	MARK	  addr2;	/* 2nd address. */
	ARGS	**argv;		/* Array of arguments. */
	int	  argc;		/* Count of arguments. */
	u_int32_t flags;	/* Selected flags from EXCMDLIST. */
};

/* Global ranges. */
typedef struct _range	RANGE;
struct _range {
	CIRCLEQ_ENTRY(_range) q;	/* Linked list of ranges. */
	recno_t start, stop;		/* Start/stop of the range. */
};

/* Cd paths. */
typedef struct _cdpath	CDPATH;
struct _cdpath {
	TAILQ_ENTRY(_cdpath) q;		/* Linked list of cd paths. */
	char *path;			/* Path. */
};

/* Ex private, per-screen memory. */
typedef struct _ex_private {
	ARGS   **args;			/* Arguments. */
	int	 argscnt;		/* Argument count. */
	int	 argsoff;		/* Offset into arguments. */

	CHAR_T	 at_lbuf;		/* Last executed at buffer's name. */
	int	 at_lbuf_set;		/* If at_lbuf is set. */

	char	*ibp;			/* Line input buffer. */
	size_t	 ibp_len;		/* Line input buffer length. */

	u_int32_t fdef;			/* Default command flags. */

	CHAR_T	*lastbcomm;		/* Last bang command. */

	struct termios leave_term;	/* ex_[sr]leave tty state. */
	/* XXX: Should be struct timespec's, but time_t is more portable. */
	time_t leave_atime;		/* ex_[sr]leave old access time. */
	time_t leave_mtime;		/* ex_[sr]leave old mod time. */

	TAILQ_HEAD(_tagh, _tag) tagq;	/* Tag list (stack). */
	TAILQ_HEAD(_tagfh, _tagf) tagfq;/* Tag file list. */
	char	*tlast;			/* Saved last tag. */

	TAILQ_HEAD(_cdh, _cdpath) cdq;	/* Cd path list. */

					/* Linked list of ranges. */
	CIRCLEQ_HEAD(_rangeh, _range) rangeq;
	recno_t  range_lno;		/* Range set line number. */

#define	EX_ABSMARK	0x01		/* Set the absolute mark. */
#define	EX_AUTOPRINT	0x02		/* Autoprint flag. */
	u_int8_t flags;
} EX_PRIVATE;
#define	EXP(sp)	((EX_PRIVATE *)((sp)->ex_private))

/*
 * !!!
 * Historically, .exrc files and EXINIT variables could only use ^V
 * as an escape character, neither ^Q or a user specified character
 * worked.  We enforce that here, just in case someone depends on it.
 */
#define	IS_ESCAPE(sp, ch)						\
	(F_ISSET(sp, S_VLITONLY) ?					\
	    (ch) == CH_LITERAL : KEY_VAL(sp, ch) == K_VLNEXT)

/*
 * Filter actions:
 *
 *	FILTER		Filter text through the utility.
 *	FILTER_READ	Read from the utility into the file.
 *	FILTER_WRITE	Write to the utility, display its output.
 */
enum filtertype { FILTER, FILTER_READ, FILTER_WRITE };
int	filtercmd __P((SCR *, EXF *,
	    MARK *, MARK *, MARK *, char *, enum filtertype));

/* Argument expansion routines. */
int	argv_init __P((SCR *, EXF *, EXCMDARG *));
int	argv_exp0 __P((SCR *, EXF *, EXCMDARG *, char *, size_t));
int	argv_exp1 __P((SCR *, EXF *, EXCMDARG *, char *, size_t, int));
int	argv_exp2 __P((SCR *, EXF *, EXCMDARG *, char *, size_t, int));
int	argv_exp3 __P((SCR *, EXF *, EXCMDARG *, char *, size_t));
int	argv_free __P((SCR *));

/* Ex function prototypes. */
int	ex __P((SCR *, EXF *));
int	ex_cfile __P((SCR *, EXF *, char *, int));
int	ex_cmd __P((SCR *, EXF *, char *, size_t, int));
int	ex_cdalloc __P((SCR *, char *));
int	ex_cdfree __P((SCR *));
int	ex_end __P((SCR *));
int	ex_exec_proc __P((SCR *, char *, char *, char *));
int	ex_gb __P((SCR *, EXF *, TEXTH *, int, u_int));
int	ex_getline __P((SCR *, FILE *, size_t *));
int	ex_icmd __P((SCR *, EXF *, char *, size_t, int));
int	ex_init __P((SCR *, EXF *));
int	ex_is_abbrev __P((char *, size_t));
int	ex_is_unmap __P((char *, size_t));
int	ex_ldisplay __P((SCR *, CHAR_T *, size_t, size_t, u_int));
int	ex_ncheck __P((SCR *, int));
int	ex_optchange __P((SCR *, int));
int	ex_print __P((SCR *, EXF *, MARK *, MARK *, int));
int	ex_readfp __P((SCR *, EXF *, char *, FILE *, MARK *, recno_t *, int));
void	ex_refresh __P((SCR *, EXF *));
void	ex_rleave __P((SCR *));
int	ex_screen_copy __P((SCR *, SCR *));
int	ex_screen_end __P((SCR *));
int	ex_sdisplay __P((SCR *, EXF *));
int	ex_sleave __P((SCR *));
int	ex_suspend __P((SCR *));
int	ex_tdisplay __P((SCR *, EXF *));
int	ex_writefp __P((SCR *, EXF *,
	    char *, FILE *, MARK *, MARK *, u_long *, u_long *));
void	global_insdel __P((SCR *, EXF *, enum operation, recno_t));
int	proc_wait __P((SCR *, long, const char *, int));
int	sscr_end __P((SCR *));
int	sscr_exec __P((SCR *, EXF *, recno_t));
int	sscr_input __P((SCR *));

int	abbr_save __P((SCR *, FILE *));
int	map_save __P((SCR *, FILE *));

#define	EXPROTO(name)	int name __P((SCR *, EXF *, EXCMDARG *))
EXPROTO(ex_abbr);
EXPROTO(ex_append);
EXPROTO(ex_args);
EXPROTO(ex_at);
EXPROTO(ex_bang);
EXPROTO(ex_bg);
EXPROTO(ex_cd);
EXPROTO(ex_change);
EXPROTO(ex_color);
EXPROTO(ex_copy);
EXPROTO(ex_debug);
EXPROTO(ex_delete);
EXPROTO(ex_digraph);
EXPROTO(ex_display);
EXPROTO(ex_edit);
EXPROTO(ex_equal);
EXPROTO(ex_fg);
EXPROTO(ex_file);
EXPROTO(ex_global);
EXPROTO(ex_help);
EXPROTO(ex_insert);
EXPROTO(ex_join);
EXPROTO(ex_list);
EXPROTO(ex_map);
EXPROTO(ex_mark);
EXPROTO(ex_mkexrc);
EXPROTO(ex_move);
EXPROTO(ex_next);
EXPROTO(ex_number);
EXPROTO(ex_open);
EXPROTO(ex_pr);
EXPROTO(ex_preserve);
EXPROTO(ex_prev);
EXPROTO(ex_put);
EXPROTO(ex_quit);
EXPROTO(ex_read);
EXPROTO(ex_recover);
EXPROTO(ex_resize);
EXPROTO(ex_rew);
EXPROTO(ex_script);
EXPROTO(ex_set);
EXPROTO(ex_shell);
EXPROTO(ex_shiftl);
EXPROTO(ex_shiftr);
EXPROTO(ex_source);
EXPROTO(ex_split);
EXPROTO(ex_stop);
EXPROTO(ex_subagain);
EXPROTO(ex_substitute);
EXPROTO(ex_subtilde);
EXPROTO(ex_tagpop);
EXPROTO(ex_tagpush);
EXPROTO(ex_tagtop);
EXPROTO(ex_unabbr);
EXPROTO(ex_undo);
EXPROTO(ex_unmap);
EXPROTO(ex_usage);
EXPROTO(ex_validate);
EXPROTO(ex_version);
EXPROTO(ex_vglobal);
EXPROTO(ex_visual);
EXPROTO(ex_viusage);
EXPROTO(ex_wn);
EXPROTO(ex_wq);
EXPROTO(ex_write);
EXPROTO(ex_xit);
EXPROTO(ex_yank);
EXPROTO(ex_z);
@


1.4
log
@clean up import.  still have to hack some things.
@
text
@@


1.4.2.1
log
@file excmd.h.stub was added on branch netbsd-1-0 on 1994-08-17 16:36:30 +0000
@
text
@d1 285
@


1.4.2.2
log
@clean up import.  still have to hack some things.
@
text
@a0 285
/*-
 * Copyright (c) 1992, 1993, 1994
 *	The Regents of the University of California.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. All advertising materials mentioning features or use of this software
 *    must display the following acknowledgement:
 *	This product includes software developed by the University of
 *	California, Berkeley and its contributors.
 * 4. Neither the name of the University nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 *	@@(#)excmd.h.stub	8.73 (Berkeley) 8/9/94
 */

#define	PROMPTCHAR	':'		/* Prompt character. */

/* Ex command structure. */
typedef struct _excmdlist {
	char	*name;			/* Command name. */
					/* Underlying function. */
	int (*fn) __P((SCR *, EXF *, EXCMDARG *));

#define	E_ADDR1		0x0000001	/* One address. */
#define	E_ADDR2		0x0000002	/* Two address. */
#define	E_ADDR2_ALL	0x0000004	/* Zero/two addresses; zero == all. */
#define	E_ADDR2_NONE	0x0000008	/* Zero/two addresses; zero == none. */
#define	E_ADDRDEF	0x0000010	/* Default addresses used. */
#define	E_AUTOPRINT	0x0000020	/* Command always sets autoprint. */
#define	E_BUFFER	0x0000040	/* Buffer name supplied. */
#define	E_COUNT		0x0000080	/* Count supplied. */
#define	E_COUNT_NEG	0x0000100	/* Count was signed negative. */
#define	E_COUNT_POS	0x0000200	/* Count was signed positive. */
#define	E_FORCE		0x0000400	/*  ! */

#define	E_F_CARAT	0x0000800	/*  ^ flag. */
#define	E_F_DASH	0x0001000	/*  - flag. */
#define	E_F_DOT		0x0002000	/*  . flag. */
#define	E_F_EQUAL	0x0004000	/*  = flag. */
#define	E_F_HASH	0x0008000	/*  # flag. */
#define	E_F_LIST	0x0010000	/*  l flag. */
#define	E_F_PLUS	0x0020000	/*  + flag. */
#define	E_F_PRINT	0x0040000	/*  p flag. */

#define	E_F_PRCLEAR	0x0080000	/* Clear the print (#, l, p) flags. */
#define	E_MODIFY	0x0100000	/* File name expansion modified arg. */
#define	E_NOGLOBAL	0x0200000	/* Not in a global. */
#define	E_NOPERM	0x0400000	/* Permission denied for now. */
#define	E_NORC		0x0800000	/* Not from a .exrc or EXINIT. */
#define	E_ZERO		0x1000000	/* 0 is a legal addr1. */
#define	E_ZERODEF	0x2000000	/* 0 is default addr1 of empty files. */
	u_int32_t flags;
	char	 *syntax;		/* Syntax script. */
	char	*usage;			/* Usage line. */
	char	*help;			/* Help line. */
} EXCMDLIST;
#define	MAXCMDNAMELEN	12		/* Longest command name. */
extern EXCMDLIST const cmds[];		/* List of ex commands. */

/*
 * Structure passed around to functions implementing ex commands.
 * There are several commands in vi that build one of these and
 * call ex directly.  See vi/v_ex.c for details.
 */
struct _excmdarg {
	EXCMDLIST const *cmd;	/* Command entry in command table. */
	CHAR_T	  buffer;	/* Named buffer. */
	recno_t	  lineno;	/* Line number. */
	long	  count;	/* Signed, specified count. */
	long	  flagoff;	/* Signed, flag offset parsed by command. */
	int	  addrcnt;	/* Number of addresses (0, 1 or 2). */
	MARK	  addr1;	/* 1st address. */
	MARK	  addr2;	/* 2nd address. */
	ARGS	**argv;		/* Array of arguments. */
	int	  argc;		/* Count of arguments. */
	u_int32_t flags;	/* Selected flags from EXCMDLIST. */
};

/* Global ranges. */
typedef struct _range	RANGE;
struct _range {
	CIRCLEQ_ENTRY(_range) q;	/* Linked list of ranges. */
	recno_t start, stop;		/* Start/stop of the range. */
};

/* Cd paths. */
typedef struct _cdpath	CDPATH;
struct _cdpath {
	TAILQ_ENTRY(_cdpath) q;		/* Linked list of cd paths. */
	char *path;			/* Path. */
};

/* Ex private, per-screen memory. */
typedef struct _ex_private {
	ARGS   **args;			/* Arguments. */
	int	 argscnt;		/* Argument count. */
	int	 argsoff;		/* Offset into arguments. */

	CHAR_T	 at_lbuf;		/* Last executed at buffer's name. */
	int	 at_lbuf_set;		/* If at_lbuf is set. */

	char	*ibp;			/* Line input buffer. */
	size_t	 ibp_len;		/* Line input buffer length. */

	u_int32_t fdef;			/* Default command flags. */

	CHAR_T	*lastbcomm;		/* Last bang command. */

	struct termios leave_term;	/* ex_[sr]leave tty state. */
	/* XXX: Should be struct timespec's, but time_t is more portable. */
	time_t leave_atime;		/* ex_[sr]leave old access time. */
	time_t leave_mtime;		/* ex_[sr]leave old mod time. */

	TAILQ_HEAD(_tagh, _tag) tagq;	/* Tag list (stack). */
	TAILQ_HEAD(_tagfh, _tagf) tagfq;/* Tag file list. */
	char	*tlast;			/* Saved last tag. */

	TAILQ_HEAD(_cdh, _cdpath) cdq;	/* Cd path list. */

					/* Linked list of ranges. */
	CIRCLEQ_HEAD(_rangeh, _range) rangeq;
	recno_t  range_lno;		/* Range set line number. */

#define	EX_ABSMARK	0x01		/* Set the absolute mark. */
#define	EX_AUTOPRINT	0x02		/* Autoprint flag. */
	u_int8_t flags;
} EX_PRIVATE;
#define	EXP(sp)	((EX_PRIVATE *)((sp)->ex_private))

/*
 * !!!
 * Historically, .exrc files and EXINIT variables could only use ^V
 * as an escape character, neither ^Q or a user specified character
 * worked.  We enforce that here, just in case someone depends on it.
 */
#define	IS_ESCAPE(sp, ch)						\
	(F_ISSET(sp, S_VLITONLY) ?					\
	    (ch) == CH_LITERAL : KEY_VAL(sp, ch) == K_VLNEXT)

/*
 * Filter actions:
 *
 *	FILTER		Filter text through the utility.
 *	FILTER_READ	Read from the utility into the file.
 *	FILTER_WRITE	Write to the utility, display its output.
 */
enum filtertype { FILTER, FILTER_READ, FILTER_WRITE };
int	filtercmd __P((SCR *, EXF *,
	    MARK *, MARK *, MARK *, char *, enum filtertype));

/* Argument expansion routines. */
int	argv_init __P((SCR *, EXF *, EXCMDARG *));
int	argv_exp0 __P((SCR *, EXF *, EXCMDARG *, char *, size_t));
int	argv_exp1 __P((SCR *, EXF *, EXCMDARG *, char *, size_t, int));
int	argv_exp2 __P((SCR *, EXF *, EXCMDARG *, char *, size_t, int));
int	argv_exp3 __P((SCR *, EXF *, EXCMDARG *, char *, size_t));
int	argv_free __P((SCR *));

/* Ex function prototypes. */
int	ex __P((SCR *, EXF *));
int	ex_cfile __P((SCR *, EXF *, char *, int));
int	ex_cmd __P((SCR *, EXF *, char *, size_t, int));
int	ex_cdalloc __P((SCR *, char *));
int	ex_cdfree __P((SCR *));
int	ex_end __P((SCR *));
int	ex_exec_proc __P((SCR *, char *, char *, char *));
int	ex_gb __P((SCR *, EXF *, TEXTH *, int, u_int));
int	ex_getline __P((SCR *, FILE *, size_t *));
int	ex_icmd __P((SCR *, EXF *, char *, size_t, int));
int	ex_init __P((SCR *, EXF *));
int	ex_is_abbrev __P((char *, size_t));
int	ex_is_unmap __P((char *, size_t));
int	ex_ldisplay __P((SCR *, CHAR_T *, size_t, size_t, u_int));
int	ex_ncheck __P((SCR *, int));
int	ex_optchange __P((SCR *, int));
int	ex_print __P((SCR *, EXF *, MARK *, MARK *, int));
int	ex_readfp __P((SCR *, EXF *, char *, FILE *, MARK *, recno_t *, int));
void	ex_refresh __P((SCR *, EXF *));
void	ex_rleave __P((SCR *));
int	ex_screen_copy __P((SCR *, SCR *));
int	ex_screen_end __P((SCR *));
int	ex_sdisplay __P((SCR *, EXF *));
int	ex_sleave __P((SCR *));
int	ex_suspend __P((SCR *));
int	ex_tdisplay __P((SCR *, EXF *));
int	ex_writefp __P((SCR *, EXF *,
	    char *, FILE *, MARK *, MARK *, u_long *, u_long *));
void	global_insdel __P((SCR *, EXF *, enum operation, recno_t));
int	proc_wait __P((SCR *, long, const char *, int));
int	sscr_end __P((SCR *));
int	sscr_exec __P((SCR *, EXF *, recno_t));
int	sscr_input __P((SCR *));

int	abbr_save __P((SCR *, FILE *));
int	map_save __P((SCR *, FILE *));

#define	EXPROTO(name)	int name __P((SCR *, EXF *, EXCMDARG *))
EXPROTO(ex_abbr);
EXPROTO(ex_append);
EXPROTO(ex_args);
EXPROTO(ex_at);
EXPROTO(ex_bang);
EXPROTO(ex_bg);
EXPROTO(ex_cd);
EXPROTO(ex_change);
EXPROTO(ex_color);
EXPROTO(ex_copy);
EXPROTO(ex_debug);
EXPROTO(ex_delete);
EXPROTO(ex_digraph);
EXPROTO(ex_display);
EXPROTO(ex_edit);
EXPROTO(ex_equal);
EXPROTO(ex_fg);
EXPROTO(ex_file);
EXPROTO(ex_global);
EXPROTO(ex_help);
EXPROTO(ex_insert);
EXPROTO(ex_join);
EXPROTO(ex_list);
EXPROTO(ex_map);
EXPROTO(ex_mark);
EXPROTO(ex_mkexrc);
EXPROTO(ex_move);
EXPROTO(ex_next);
EXPROTO(ex_number);
EXPROTO(ex_open);
EXPROTO(ex_pr);
EXPROTO(ex_preserve);
EXPROTO(ex_prev);
EXPROTO(ex_put);
EXPROTO(ex_quit);
EXPROTO(ex_read);
EXPROTO(ex_recover);
EXPROTO(ex_resize);
EXPROTO(ex_rew);
EXPROTO(ex_script);
EXPROTO(ex_set);
EXPROTO(ex_shell);
EXPROTO(ex_shiftl);
EXPROTO(ex_shiftr);
EXPROTO(ex_source);
EXPROTO(ex_split);
EXPROTO(ex_stop);
EXPROTO(ex_subagain);
EXPROTO(ex_substitute);
EXPROTO(ex_subtilde);
EXPROTO(ex_tagpop);
EXPROTO(ex_tagpush);
EXPROTO(ex_tagtop);
EXPROTO(ex_unabbr);
EXPROTO(ex_undo);
EXPROTO(ex_unmap);
EXPROTO(ex_usage);
EXPROTO(ex_validate);
EXPROTO(ex_version);
EXPROTO(ex_vglobal);
EXPROTO(ex_visual);
EXPROTO(ex_viusage);
EXPROTO(ex_wn);
EXPROTO(ex_wq);
EXPROTO(ex_write);
EXPROTO(ex_xit);
EXPROTO(ex_yank);
EXPROTO(ex_z);
@


1.3
log
@nvi 1.11(beta) from bostic.  reconcile conflicts/kill rcsids.
@
text
@d2 1
a2 1
 * Copyright (c) 1992, 1993
d33 1
a33 1
 *	@@(#)excmd.h.stub	8.54 (Berkeley) 3/23/94
d36 2
d70 4
a73 5
#define	E_SETLAST	0x1000000	/* Reset last command. */
#define	E_ZERO		0x2000000	/* 0 is a legal addr1. */
#define	E_ZERODEF	0x4000000	/* 0 is default addr1 of empty files. */
	u_long	 flags;
	char	*syntax;		/* Syntax script. */
d80 5
a84 1
/* Structure passed around to functions implementing ex commands. */
d87 10
a96 9
	CHAR_T	buffer;		/* Named buffer. */
	recno_t	lineno;		/* Line number. */
	long	count;		/* Signed, specified count. */
	int	addrcnt;	/* Number of addresses (0, 1 or 2). */
	MARK	addr1;		/* 1st address. */
	MARK	addr2;		/* 2nd address. */
	ARGS  **argv;		/* Array of arguments. */
	int	argc;		/* Count of arguments. */
	u_int	flags;		/* Selected flags from EXCMDLIST. */
d125 1
a125 1
	EXCMDLIST const *lastcmd;	/* Last command. */
a128 1
	struct sigaction leave_act;	/* ex_[sr]leave signal state. */
d142 1
a142 1
	recno_t range_lno;		/* Range set line number. */
d144 3
a146 2
#define	EX_AUTOPRINT	0x01		/* Autoprint flag. */
	u_int	flags;
a149 23
/* Macro to set up a command structure. */
#define	SETCMDARG(s, cmd_id, naddr, lno1, lno2, force, arg) {		\
	ARGS *__ap[2], __a;						\
	memset(&s, 0, sizeof(EXCMDARG));				\
	s.cmd = &cmds[cmd_id];						\
	s.addrcnt = (naddr);						\
	s.addr1.lno = (lno1);						\
	s.addr2.lno = (lno2);						\
	s.addr1.cno = s.addr2.cno = 1;					\
	if (force)							\
		s.flags |= E_FORCE;					\
	if ((__a.bp = arg) == NULL) {					\
		s.argc = 0;						\
		__a.len = 0;						\
	} else {							\
		s.argc = 1;						\
		__a.len = strlen(arg);					\
	}								\
	__ap[0] = &__a;							\
	__ap[1] = NULL;							\
	s.argv = __ap;							\
}

d158 1
a158 25
	    (ch) == LITERAL_CH : term_key_val(sp, ch) == K_VLNEXT)

/*
 * :next, :prev, :rewind, :tag, :tagpush, :tagpop modifications check.
 * If force is set, the autowrite is skipped.
 */
#define	MODIFY_GOTO(sp, ep, force) {					\
	if (F_ISSET((ep), F_MODIFIED))					\
		if (O_ISSET((sp), O_AUTOWRITE)) {			\
			if (!(force) &&					\
			    file_write((sp), (ep), NULL, NULL, NULL,	\
			    FS_ALL | FS_POSSIBLE))			\
				goto modify_err;			\
		} else if (ep->refcnt <= 1 && !(force)) {		\
			msgq(sp, M_ERR,					\
	"Modified since last write; write or use ! to override.");	\
			goto modify_err;				\
		}							\
}
#define	MODIFY_RET(sp, ep, force) {					\
	MODIFY_GOTO(sp, ep, force);					\
	if (0) {							\
modify_err:	return (1);						\
	}								\
}
d181 2
a182 2
int	ex_cfile __P((SCR *, EXF *, char *));
int	ex_cmd __P((SCR *, EXF *, char *, size_t));
d189 1
a189 1
int	ex_icmd __P((SCR *, EXF *, char *, size_t));
d193 2
d214 3
d254 1
a272 1
EXPROTO(ex_undol);
d280 1
@


1.2
log
@more Ids than you'll ever want.
@
text
@d33 1
a33 2
 *	from: @@(#)excmd.h.stub	8.44 (Berkeley) 12/29/93
 *	$Id$
d50 21
a70 19
#define	E_FORCE		0x0000100	/*  ! */

#define	E_F_CARAT	0x0000200	/*  ^ flag. */
#define	E_F_DASH	0x0000400	/*  - flag. */
#define	E_F_DOT		0x0000800	/*  . flag. */
#define	E_F_EQUAL	0x0001000	/*  = flag. */
#define	E_F_HASH	0x0002000	/*  # flag. */
#define	E_F_LIST	0x0004000	/*  l flag. */
#define	E_F_PLUS	0x0008000	/*  + flag. */
#define	E_F_PRINT	0x0010000	/*  p flag. */

#define	E_F_PRCLEAR	0x0020000	/* Clear the print (#, l, p) flags. */
#define	E_MODIFY	0x0040000	/* File name expansion modified arg. */
#define	E_NOGLOBAL	0x0080000	/* Not in a global. */
#define	E_NOPERM	0x0100000	/* Permission denied for now. */
#define	E_NORC		0x0200000	/* Not from a .exrc or EXINIT. */
#define	E_SETLAST	0x0400000	/* Reset last command. */
#define	E_ZERO		0x0800000	/* 0 is a legal addr1. */
#define	E_ZERODEF	0x1000000	/* 0 is default addr1 of empty files. */
d100 7
d123 8
a130 2
	TAILQ_HEAD(_tagh, _tag) tagq;	/* Tag stack. */
	TAILQ_HEAD(_tagfh, _tagf) tagfq;/* Tag stack. */
d133 2
d143 1
a143 1
	
d168 10
d181 1
a181 1
#define	MODIFY_CHECK(sp, ep, force) {					\
d187 1
a187 1
				return (1);				\
d191 1
a191 1
			return (1);					\
d194 6
a199 56

/*
 * Macros to set and restore the terminal values, and note if the screen
 * was modified.  Specific to their uses in ex/filter.c and ex/ex_shell.c.
 *
 * The old terminal values almost certainly turn on VINTR, VQUIT and VSUSP.
 * We don't want to interrupt the parent(s), so we ignore VINTR.  VQUIT is
 * ignored by main() because nvi never wants to catch it.  A VSUSP handler
 * have been installed by the screen code.
 */
#define	EX_LEAVE(sp, isig, act, oact, sb, osb, term)			\
	if (F_ISSET(sp->gp, G_ISFROMTTY)) {				\
		(act).sa_handler = SIG_IGN;				\
		sigemptyset(&(act).sa_mask);				\
		(act).sa_flags = 0;					\
		if ((isig) = !sigaction(SIGINT, &(act), &(oact))) {	\
			if (tcgetattr(STDIN_FILENO, &(term))) {		\
				msgq(sp, M_SYSERR, "tcgetattr");	\
				rval = 1;				\
				goto err;				\
			}						\
			if (tcsetattr(STDIN_FILENO, TCSANOW | TCSASOFT,	\
			    &sp->gp->original_termios)) {		\
				msgq(sp, M_SYSERR, "tcsetattr");	\
				rval = 1;				\
				goto err;				\
			}						\
		}							\
		/*							\
		 * The process may write to the terminal.  Save the	\
		 * access time (read) and modification time (write)	\
		 * of the tty; if they have changed when we restore	\
		 * the modes, will have to refresh the screen.		\
		 */							\
		sb.st_mtime = 1;					\
		osb.st_mtime = 0;					\
		(void)fstat(STDIN_FILENO, &osb);			\
	}

#define	EX_RETURN(sp, isig, act, oact, sb, osb, term)			\
	if (F_ISSET(sp->gp, G_ISFROMTTY) && (isig)) {			\
		if (sigaction(SIGINT, &(oact), NULL)) {			\
			msgq(sp, M_SYSERR, "signal");			\
			rval = 1;					\
		}							\
		if (tcsetattr(STDIN_FILENO,				\
		    TCSANOW | TCSASOFT, &(term))) {			\
			msgq(sp, M_SYSERR, "tcsetattr");		\
			rval = 1;					\
		}							\
		/* If the terminal was used, refresh the screen. */	\
		(void)fstat(STDIN_FILENO, &(sb));			\
		if ((sb).st_mtime != (osb).st_mtime ||			\
		    (sb).st_atime != (osb).st_atime)			\
			F_SET(sp, S_REFRESH);				\
	}
d224 2
d233 1
d238 1
d242 1
d253 68
a320 70
#define	EXPROTO(type, name)						\
	type name __P((SCR *, EXF *, EXCMDARG *))

EXPROTO(int, ex_abbr);
EXPROTO(int, ex_append);
EXPROTO(int, ex_args);
EXPROTO(int, ex_at);
EXPROTO(int, ex_bang);
EXPROTO(int, ex_bg);
EXPROTO(int, ex_cd);
EXPROTO(int, ex_change);
EXPROTO(int, ex_color);
EXPROTO(int, ex_copy);
EXPROTO(int, ex_debug);
EXPROTO(int, ex_delete);
EXPROTO(int, ex_digraph);
EXPROTO(int, ex_display);
EXPROTO(int, ex_edit);
EXPROTO(int, ex_equal);
EXPROTO(int, ex_fg);
EXPROTO(int, ex_file);
EXPROTO(int, ex_global);
EXPROTO(int, ex_help);
EXPROTO(int, ex_insert);
EXPROTO(int, ex_join);
EXPROTO(int, ex_list);
EXPROTO(int, ex_map);
EXPROTO(int, ex_mark);
EXPROTO(int, ex_mkexrc);
EXPROTO(int, ex_move);
EXPROTO(int, ex_next);
EXPROTO(int, ex_number);
EXPROTO(int, ex_open);
EXPROTO(int, ex_pr);
EXPROTO(int, ex_preserve);
EXPROTO(int, ex_prev);
EXPROTO(int, ex_put);
EXPROTO(int, ex_quit);
EXPROTO(int, ex_read);
EXPROTO(int, ex_resize);
EXPROTO(int, ex_rew);
EXPROTO(int, ex_script);
EXPROTO(int, ex_set);
EXPROTO(int, ex_shell);
EXPROTO(int, ex_shiftl);
EXPROTO(int, ex_shiftr);
EXPROTO(int, ex_source);
EXPROTO(int, ex_split);
EXPROTO(int, ex_stop);
EXPROTO(int, ex_subagain);
EXPROTO(int, ex_substitute);
EXPROTO(int, ex_subtilde);
EXPROTO(int, ex_tagpop);
EXPROTO(int, ex_tagpush);
EXPROTO(int, ex_tagtop);
EXPROTO(int, ex_unabbr);
EXPROTO(int, ex_undo);
EXPROTO(int, ex_undol);
EXPROTO(int, ex_unmap);
EXPROTO(int, ex_usage);
EXPROTO(int, ex_validate);
EXPROTO(int, ex_version);
EXPROTO(int, ex_vglobal);
EXPROTO(int, ex_visual);
EXPROTO(int, ex_viusage);
EXPROTO(int, ex_wq);
EXPROTO(int, ex_write);
EXPROTO(int, ex_xit);
EXPROTO(int, ex_yank);
EXPROTO(int, ex_z);
@


1.1
log
@Initial revision
@
text
@d33 2
a34 1
 *	@@(#)excmd.h.stub	8.44 (Berkeley) 12/29/93
@


1.1.1.1
log
@nvi 1.03, from ftp.cs.berkeley.edu, per keith bostic's permission.
@
text
@@


1.1.1.2
log
@nvi/nex 1.11beta from bostic.
@
text
@d33 1
a33 1
 *	@@(#)excmd.h.stub	8.54 (Berkeley) 3/23/94
d50 19
a68 21
#define	E_COUNT_NEG	0x0000100	/* Count was signed negative. */
#define	E_COUNT_POS	0x0000200	/* Count was signed positive. */
#define	E_FORCE		0x0000400	/*  ! */

#define	E_F_CARAT	0x0000800	/*  ^ flag. */
#define	E_F_DASH	0x0001000	/*  - flag. */
#define	E_F_DOT		0x0002000	/*  . flag. */
#define	E_F_EQUAL	0x0004000	/*  = flag. */
#define	E_F_HASH	0x0008000	/*  # flag. */
#define	E_F_LIST	0x0010000	/*  l flag. */
#define	E_F_PLUS	0x0020000	/*  + flag. */
#define	E_F_PRINT	0x0040000	/*  p flag. */

#define	E_F_PRCLEAR	0x0080000	/* Clear the print (#, l, p) flags. */
#define	E_MODIFY	0x0100000	/* File name expansion modified arg. */
#define	E_NOGLOBAL	0x0200000	/* Not in a global. */
#define	E_NOPERM	0x0400000	/* Permission denied for now. */
#define	E_NORC		0x0800000	/* Not from a .exrc or EXINIT. */
#define	E_SETLAST	0x1000000	/* Reset last command. */
#define	E_ZERO		0x2000000	/* 0 is a legal addr1. */
#define	E_ZERODEF	0x4000000	/* 0 is default addr1 of empty files. */
a97 7
/* Cd paths. */
typedef struct _cdpath	CDPATH;
struct _cdpath {
	TAILQ_ENTRY(_cdpath) q;		/* Linked list of cd paths. */
	char *path;			/* Path. */
};

d114 2
a115 8
	struct sigaction leave_act;	/* ex_[sr]leave signal state. */
	struct termios leave_term;	/* ex_[sr]leave tty state. */
	/* XXX: Should be struct timespec's, but time_t is more portable. */
	time_t leave_atime;		/* ex_[sr]leave old access time. */
	time_t leave_mtime;		/* ex_[sr]leave old mod time. */

	TAILQ_HEAD(_tagh, _tag) tagq;	/* Tag list (stack). */
	TAILQ_HEAD(_tagfh, _tagf) tagfq;/* Tag file list. */
a117 2
	TAILQ_HEAD(_cdh, _cdpath) cdq;	/* Cd path list. */

d126 1
a126 1

a150 10
 * !!!
 * Historically, .exrc files and EXINIT variables could only use ^V
 * as an escape character, neither ^Q or a user specified character
 * worked.  We enforce that here, just in case someone depends on it.
 */
#define	IS_ESCAPE(sp, ch)						\
	(F_ISSET(sp, S_VLITONLY) ?					\
	    (ch) == LITERAL_CH : term_key_val(sp, ch) == K_VLNEXT)

/*
d154 1
a154 1
#define	MODIFY_GOTO(sp, ep, force) {					\
d160 1
a160 1
				goto modify_err;			\
d164 1
a164 1
			goto modify_err;				\
d167 56
a222 6
#define	MODIFY_RET(sp, ep, force) {					\
	MODIFY_GOTO(sp, ep, force);					\
	if (0) {							\
modify_err:	return (1);						\
	}								\
}
a246 2
int	ex_cdalloc __P((SCR *, char *));
int	ex_cdfree __P((SCR *));
a253 1
int	ex_is_unmap __P((char *, size_t));
a257 1
void	ex_rleave __P((SCR *));
a260 1
int	ex_sleave __P((SCR *));
d271 70
a340 68
#define	EXPROTO(name)	int name __P((SCR *, EXF *, EXCMDARG *))
EXPROTO(ex_abbr);
EXPROTO(ex_append);
EXPROTO(ex_args);
EXPROTO(ex_at);
EXPROTO(ex_bang);
EXPROTO(ex_bg);
EXPROTO(ex_cd);
EXPROTO(ex_change);
EXPROTO(ex_color);
EXPROTO(ex_copy);
EXPROTO(ex_debug);
EXPROTO(ex_delete);
EXPROTO(ex_digraph);
EXPROTO(ex_display);
EXPROTO(ex_edit);
EXPROTO(ex_equal);
EXPROTO(ex_fg);
EXPROTO(ex_file);
EXPROTO(ex_global);
EXPROTO(ex_help);
EXPROTO(ex_insert);
EXPROTO(ex_join);
EXPROTO(ex_list);
EXPROTO(ex_map);
EXPROTO(ex_mark);
EXPROTO(ex_mkexrc);
EXPROTO(ex_move);
EXPROTO(ex_next);
EXPROTO(ex_number);
EXPROTO(ex_open);
EXPROTO(ex_pr);
EXPROTO(ex_preserve);
EXPROTO(ex_prev);
EXPROTO(ex_put);
EXPROTO(ex_quit);
EXPROTO(ex_read);
EXPROTO(ex_resize);
EXPROTO(ex_rew);
EXPROTO(ex_script);
EXPROTO(ex_set);
EXPROTO(ex_shell);
EXPROTO(ex_shiftl);
EXPROTO(ex_shiftr);
EXPROTO(ex_source);
EXPROTO(ex_split);
EXPROTO(ex_stop);
EXPROTO(ex_subagain);
EXPROTO(ex_substitute);
EXPROTO(ex_subtilde);
EXPROTO(ex_tagpop);
EXPROTO(ex_tagpush);
EXPROTO(ex_tagtop);
EXPROTO(ex_unabbr);
EXPROTO(ex_undo);
EXPROTO(ex_undol);
EXPROTO(ex_unmap);
EXPROTO(ex_usage);
EXPROTO(ex_validate);
EXPROTO(ex_version);
EXPROTO(ex_vglobal);
EXPROTO(ex_visual);
EXPROTO(ex_viusage);
EXPROTO(ex_wq);
EXPROTO(ex_write);
EXPROTO(ex_xit);
EXPROTO(ex_yank);
EXPROTO(ex_z);
@


1.1.1.3
log
@new public version of nvi
@
text
@d2 1
a2 1
 * Copyright (c) 1992, 1993, 1994
d33 1
a33 1
 *	@@(#)excmd.h.stub	8.73 (Berkeley) 8/9/94
a35 2
#define	PROMPTCHAR	':'		/* Prompt character. */

d68 5
a72 4
#define	E_ZERO		0x1000000	/* 0 is a legal addr1. */
#define	E_ZERODEF	0x2000000	/* 0 is default addr1 of empty files. */
	u_int32_t flags;
	char	 *syntax;		/* Syntax script. */
d79 1
a79 5
/*
 * Structure passed around to functions implementing ex commands.
 * There are several commands in vi that build one of these and
 * call ex directly.  See vi/v_ex.c for details.
 */
d82 9
a90 10
	CHAR_T	  buffer;	/* Named buffer. */
	recno_t	  lineno;	/* Line number. */
	long	  count;	/* Signed, specified count. */
	long	  flagoff;	/* Signed, flag offset parsed by command. */
	int	  addrcnt;	/* Number of addresses (0, 1 or 2). */
	MARK	  addr1;	/* 1st address. */
	MARK	  addr2;	/* 2nd address. */
	ARGS	**argv;		/* Array of arguments. */
	int	  argc;		/* Count of arguments. */
	u_int32_t flags;	/* Selected flags from EXCMDLIST. */
d119 1
a119 1
	u_int32_t fdef;			/* Default command flags. */
d123 1
d137 1
a137 1
	recno_t  range_lno;		/* Range set line number. */
d139 2
a140 3
#define	EX_ABSMARK	0x01		/* Set the absolute mark. */
#define	EX_AUTOPRINT	0x02		/* Autoprint flag. */
	u_int8_t flags;
d144 23
d175 25
a199 1
	    (ch) == CH_LITERAL : KEY_VAL(sp, ch) == K_VLNEXT)
d222 2
a223 2
int	ex_cfile __P((SCR *, EXF *, char *, int));
int	ex_cmd __P((SCR *, EXF *, char *, size_t, int));
d230 1
a230 1
int	ex_icmd __P((SCR *, EXF *, char *, size_t, int));
a233 2
int	ex_ldisplay __P((SCR *, CHAR_T *, size_t, size_t, u_int));
int	ex_ncheck __P((SCR *, int));
a252 3
int	abbr_save __P((SCR *, FILE *));
int	map_save __P((SCR *, FILE *));

a289 1
EXPROTO(ex_recover);
d308 1
a315 1
EXPROTO(ex_wn);
@
