main(argc, argv)
	int	argc;
	char	*argv[];
int access(file, mode)
	char *file;
char *mktemp(template)
	char *template;
int tread(fd, buf, maxlen)
	int fd;
	char *buf;
	int maxlen;
int twrite(fd, buf, maxlen)
	int fd;
	char *buf;
	int maxlen;
void blkinit()
BLK *blkget(logical)
	int	logical;	/* logical block number to fetch */
void blkflush(this)
	REG struct _blkbuf	*this;	/* the buffer to flush */
void blkdirty(bp)
	BLK	*bp;	/* buffer returned by blkget() */
BLK *blkadd(logical)
	int	logical;	/* where to insert the new block */
void blksync()
void beforedo(forundo)
	int		forundo;	/* boolean: is this for an undo? */
void afterdo()
void abortdo()
int undo()
void cmd_debug(frommark, tomark, cmd, bang, extra)
	MARK	frommark;
	MARK	tomark;
	CMD	cmd;
	int	bang;
	char	*extra;
void cmd_validate(frommark, tomark, cmd, bang, extra)
	MARK	frommark;
	MARK	tomark;
	CMD	cmd;
	int	bang;
	char	*extra;
void cmd_mark(frommark, tomark, cmd, bang, extra)
	MARK	frommark;
	MARK	tomark;
	CMD	cmd;
	int	bang;
	char	*extra;
void cmd_write(frommark, tomark, cmd, bang, extra)
	MARK	frommark;
	MARK	tomark;
	CMD	cmd;
	int	bang;
	char	*extra;
void cmd_shell(frommark, tomark, cmd, bang, extra)
	MARK	frommark, tomark;
	CMD	cmd;
	int	bang;
	char	*extra;
void cmd_global(frommark, tomark, cmd, bang, extra)
	MARK	frommark, tomark;
	CMD	cmd;
	int	bang;
	char	*extra;	/* rest of the command line */
void cmd_file(frommark, tomark, cmd, bang, extra)
	MARK	frommark, tomark;
	CMD	cmd;
	int	bang;
	char	*extra;
void cmd_edit(frommark, tomark, cmd, bang, extra)
	MARK	frommark, tomark;
	CMD	cmd;
	int	bang;
	char	*extra;
void cmd_next(frommark, tomark, cmd, bang, extra)
	MARK	frommark, tomark;
	CMD	cmd;
	int	bang;
	char	*extra;
void cmd_xit(frommark, tomark, cmd, bang, extra)
	MARK	frommark, tomark;
	CMD	cmd;
	int	bang;
	char	*extra;
void cmd_args(frommark, tomark, cmd, bang, extra)
	MARK	frommark, tomark;
	CMD	cmd;
	int	bang;
	char	*extra;
void cmd_cd(frommark, tomark, cmd, bang, extra)
	MARK	frommark, tomark;
	CMD	cmd;
	int	bang;
	char	*extra;
void cmd_map(frommark, tomark, cmd, bang, extra)
	MARK	frommark, tomark;
	CMD	cmd;
	int	bang;
	char	*extra;
void cmd_set(frommark, tomark, cmd, bang, extra)
	MARK	frommark, tomark;
	CMD	cmd;
	int	bang;
	char	*extra;
void cmd_tag(frommark, tomark, cmd, bang, extra)
	MARK	frommark, tomark;
	CMD	cmd;
	int	bang;
	char	*extra;
void cmd_visual(frommark, tomark, cmd, bang, extra)
	MARK	frommark, tomark;
	CMD	cmd;
	int	bang;
	char	*extra;
void cmd_version(frommark, tomark, cmd, bang, extra)
	MARK	frommark;
	MARK	tomark;
	CMD	cmd;
	int	bang;
	char	*extra;
void cmd_mkexrc(frommark, tomark, cmd, bang, extra)
	MARK	frommark;
	MARK	tomark;
	CMD	cmd;
	int	bang;
	char	*extra;
void cmd_digraph(frommark, tomark, cmd, bang, extra)
	MARK	frommark;
	MARK	tomark;
	CMD	cmd;
	int	bang;
	char	*extra;
void cmd_errlist(frommark, tomark, cmd, bang, extra)
	MARK	frommark, tomark;
	CMD	cmd;
	int	bang;
	char	*extra;
void cmd_make(frommark, tomark, cmd, bang, extra)
	MARK	frommark, tomark;
	CMD	cmd;
	int	bang;
	char	*extra;
void cmd_abbr(frommark, tomark, cmd, bang, extra)
	MARK	frommark, tomark;
	CMD	cmd;
	int	bang;
	char	*extra;
void cmd_substitute(frommark, tomark, cmd, bang, extra)
	MARK	frommark;
	MARK	tomark;
	CMD	cmd;
	int	bang;
	char	*extra;	/* rest of the command line */
void cmd_delete(frommark, tomark, cmd, bang, extra)
	MARK	frommark;
	MARK	tomark;
	CMD	cmd;
	int	bang;
	char	*extra;
void cmd_append(frommark, tomark, cmd, bang, extra)
	MARK	frommark;
	MARK	tomark;
	CMD	cmd;
	int	bang;
	char	*extra;
void cmd_put(frommark, tomark, cmd, bang, extra)
	MARK	frommark;
	MARK	tomark;
	CMD	cmd;
	int	bang;
	char	*extra;
void cmd_join(frommark, tomark, cmd, bang, extra)
	MARK	frommark;
	MARK	tomark;
	CMD	cmd;
	int	bang;
	char	*extra;
void cmd_shift(frommark, tomark, cmd, bang, extra)
	MARK	frommark;
	MARK	tomark;
	CMD	cmd;
	int	bang;
	char	*extra;
void cmd_read(frommark, tomark, cmd, bang, extra)
	MARK	frommark;
	MARK	tomark;
	CMD	cmd;
	int	bang;
	char	*extra;
void cmd_undo(frommark, tomark, cmd, bang, extra)
	MARK	frommark;
	MARK	tomark;
	CMD	cmd;
	int	bang;
	char	*extra;
void cmd_print(frommark, tomark, cmd, bang, extra)
	MARK	frommark;
	MARK	tomark;
	CMD	cmd;
	int	bang;
	char	*extra;
void cmd_move(frommark, tomark, cmd, bang, extra)
	MARK	frommark;
	MARK	tomark;
	CMD	cmd;
	int	bang;
	char	*extra;
void cmd_source(frommark, tomark, cmd, bang, extra)
	MARK	frommark;
	MARK	tomark;
	CMD	cmd;
	int	bang;
	char	*extra;
void cmd_at(frommark, tomark, cmd, bang, extra)
	MARK	frommark;
	MARK	tomark;
	CMD	cmd;
	int	bang;
	char	*extra;
main(argc, argv)
	int	argc;
	char	**argv;
ctags(fp, name, refs)
	FILE	*fp;		/* stream of the file to scan */
	char	*name;		/* name of the file being scanned */
	FILE	*refs;		/* NULL, or where to write refs lines */
void initscr()
void endwin()
void suspend_curses()
void resume_curses(quietly)
	int	quietly;
int getsize(signo)
	int	signo;
int faddch(ch)
	int	ch;
void qaddstr(str)
	char	*str;
void attrset(a)
	int	a;
void insch(ch)
	int	ch;
ttyread(buf, len)
	char *buf;
	int len;
alarm(time)
	int time;
sleep(seconds)
	unsigned seconds;
ttyread(buf, len)
	char *buf;
	int len;
alarm(time)
	int time;
ttywrite(buf, len)
	char *buf;
	int len;
ttyread(buf, len)
	char *buf;
	int len;
alarm(time)
	int time;
int cutneeds(need)
	BLK		*need;	/* this is where we deposit the list */
void cutswitch(tmpname)
	char	*tmpname; /* name of the tmp file */
void cutend()
void cutname(name)
	int	name;	/* a single character */
void cut(from, to)
	MARK	from;		/* start of text to cut */
	MARK	to;		/* end of text to cut */
MARK paste(at, after, retend)
	MARK	at;	/* where to insert the text */
	int	after;	/* boolean: insert after mark? (rather than before) */
	int	retend;	/* boolean: return end of text? (rather than start) */
int cb2str(name, buf, size)
	int	name;	/* the name of a cut-buffer to get: a-z only! */
	char	*buf;	/* where to put the string */
	unsigned size;	/* size of buf */
char	*parseptrn(ptrn)
	REG char	*ptrn;
char *linespec(s, markptr)
	REG char	*s;		/* start of the line specifier */
	MARK		*markptr;	/* where to store the mark's value */
void ex()
void doexcmd(cmdbuf)
	char		*cmdbuf;	/* string containing an ex command */
int doexrc(filename)
	char	*filename;	/* name of a ".exrc" file */
void exstring(buf, len)
	char	*buf;	/* the commands to execute */
	int	len;	/* the length of the string */
char digraph(key1, key2)
	char	key1;	/* the underlying character */
	char	key2;	/* the second character */
void do_digraph(bang, extra)
	int	bang;
	char	extra[];
void savedigs(fd)
	int		fd;
void do_abbr(extra)
	char	*extra;
void saveabbr(fd)
	int	fd;	/* fd to which the :abbr commands should be written */
MARK input(from, to, when)
	MARK	from;	/* where to start inserting text */
	MARK	to;	/* extent of text to delete */
	int	when;	/* either WHEN_VIINP or WHEN_VIREP */
void main(argc, argv)
	int	argc;
	char	*argv[];
int trapint(signo)
	int	signo;
char *fetchline(line)
	long	line;	/* line number of the line to fetch */
void regerror(txt)
	char	*txt;	/* an error message */
void	pfetch(l)
	long	l;	/* line number of line to fetch */
debout(msg, arg1, arg2, arg3, arg4, arg5)
	char	*msg, *arg1, *arg2, *arg3, *arg4, *arg5;
void delete(frommark, tomark)
	MARK		frommark;	/* first char to be deleted */
	MARK		tomark;		/* AFTER last char to be deleted */
void add(atmark, newtext)
	MARK		atmark;		/* where to insert the new text */
	char		*newtext;	/* NUL-terminated string to insert */
void change(frommark, tomark, newtext)
	MARK	frommark, tomark;
	char	*newtext;
MARK	m_updnto(m, cnt, cmd)
	MARK	m;	/* movement is relative to this mark */
	long	cnt;	/* a numeric argument */
MARK	m_right(m, cnt)
	MARK	m;	/* movement is relative to this mark */
	long	cnt;	/* a numeric argument */
MARK	m_left(m, cnt)
	MARK	m;	/* movement is relative to this mark */
	long	cnt;	/* a numeric argument */
MARK	m_tocol(m, cnt)
	MARK	m;	/* movement is relative to this mark */
	long	cnt;	/* a numeric argument */
MARK	m_front(m, cnt)
	MARK	m;	/* movement is relative to this mark */
	long	cnt;	/* a numeric argument (ignored) */
MARK	m_rear(m, cnt)
	MARK	m;	/* movement is relative to this mark */
	long	cnt;	/* a numeric argument (ignored) */
MARK	m_fsentence(m, cnt)
	MARK	m;	/* movement is relative to this mark */
	long	cnt;	/* a numeric argument */
MARK	m_bsentence(m, cnt)
	MARK	m;	/* movement is relative to this mark */
	long	cnt;	/* a numeric argument */
MARK	m_fparagraph(m, cnt)
	MARK	m;	/* movement is relative to this mark */
	long	cnt;	/* a numeric argument */
MARK	m_bparagraph(m, cnt)
	MARK	m;	/* movement is relative to this mark */
	long	cnt;	/* a numeric argument */
MARK	m_fsection(m, cnt, key)
	MARK	m;	/* movement is relative to this mark */
	long	cnt;	/* (ignored) */
	int	key;	/* second key stroke - must be ']' */
MARK	m_bsection(m, cnt, key)
	MARK	m;	/* movement is relative to this mark */
	long	cnt;	/* (ignored) */
	int	key;	/* second key stroke - must be '[' */
MARK	m_match(m, cnt)
	MARK	m;	/* movement is relative to this mark */
	long	cnt;	/* a numeric argument (ignored) */
MARK	m_tomark(m, cnt, key)
	MARK	m;	/* movement is relative to this mark */
	long	cnt;	/* (ignored) */
	int	key;	/* keystroke - the mark to move to */
MARK	m_nsrch(m)
	MARK	m;	/* where to start searching */
MARK	m_Nsrch(m)
	MARK	m;	/* where to start searching */
MARK	m_fsrch(m, ptrn)
	MARK	m;	/* where to start searching */
	char	*ptrn;	/* pattern to search for */
MARK	m_bsrch(m, ptrn)
	MARK	m;	/* where to start searching */
	char	*ptrn;	/* pattern to search for */
MARK	m__ch(m, cnt, cmd)
	MARK	m;	/* current position */
	long	cnt;
	char	cmd;	/* command: either ',' or ';' */
MARK	m_fch(m, cnt, key)
	MARK	m;	/* where to search from */
	long	cnt;
	char	key;	/* what to search for */
MARK	m_Fch(m, cnt, key)
	MARK	m;	/* where to search from */
	long	cnt;
	char	key;	/* what to search for */
MARK	m_tch(m, cnt, key)
	MARK	m;	/* where to search from */
	long	cnt;
	char	key;	/* what to search for */
MARK	m_Tch(m, cnt, key)
	MARK	m;	/* where to search from */
	long	cnt;
	char	key;	/* what to search for */
MARK m_row(m, cnt, key)
	MARK	m;	/* the cursor position */
	long	cnt;	/* the row we'll move to */
	int	key;	/* the keystroke of this move - H/L/M */
MARK m_z(m, cnt, key)
	MARK	m;	/* the cursor */
	long	cnt;	/* the line number we're repositioning */
	int	key;	/* key struck after the z */
MARK m_scroll(m, cnt, key)
	MARK	m;	/* the cursor position */
	long	cnt;	/* for some keys: the number of lines to scroll */
	int	key;	/* keystroke that causes this movement */
MARK	m_fword(m, cnt, cmd)
	MARK	m;	/* movement is relative to this mark */
	long	cnt;	/* a numeric argument */
	int	cmd;	/* either 'w' or 'W' */
MARK	m_bword(m, cnt, cmd)
	MARK	m;	/* movement is relative to this mark */
	long	cnt;	/* a numeric argument */
	int	cmd;	/* either 'b' or 'B' */
MARK	m_eword(m, cnt, cmd)
	MARK	m;	/* movement is relative to this mark */
	long	cnt;	/* a numeric argument */
	int	cmd;	/* either 'e' or 'E' */
void initopts()
void dumpopts(all)
	int	all;	/* boolean: dump all options, or just set ones? */
void saveopts(fd)
	int	fd;	/* file descriptor to write to */
void setopts(assignments)
	char	*assignments;	/* a string containing option assignments */
int fstat(fd, buff)
	  int         fd;
	  struct stat *buff;
int stat(filename, buff)
	  char        *filename;
	  struct stat *buff;
link(from,to)
	char *from,*to;
sig_handler(sig)
	int sig;
procref signal(sig,func)
	int sig;
	int (*func)();
perror(str)
	char *str;
isatty(fd)
	int fd;
void v_up()
void v_cb()
void v_cs()
void v_ce()
void v_cl()
void v_cd()
void v_al()
void v_dl()
void v_sr()
void v_move(x,y)
	int x, y;
int v_put(ch)
	int ch;
int v_cols()
int v_rows()
int switchar()
void garbage()
long allocate()
void redrawrange(after, pre, post)
	long	after;	/* lower bound of redrawafter */
	long	pre;	/* upper bound of preredraw */
	long	post;	/* upper bound of postredraw */
int idx2col(curs, text, inputting)
	MARK		curs;	/* the line# & index# of the cursor */
	REG char	*text;	/* the text of the line, from fetchline */
	int		inputting;	/* boolean: called from input() ? */
int mark2phys(m, text, inputting)
	MARK	m;		/* a mark to convert */
	char	*text;		/* the line that m refers to */
	int	inputting;	/* boolean: caled from input() ? */
void redraw(curs, inputting)
	MARK	curs;		/* where to leave the screen's cursor */
	int	inputting;	/* boolean: being called from input() ? */
main(argc, argv)
	int	argc;
	char	**argv;
int lookinfor(filename, func)
	char	*filename;	/* name of file to look in */
	char	*func;		/* name of function to look for */
desired(line, word)
	char	*line;	/* the line buffer */
	char	*word;	/* the string it should contain */
main(argc, argv)
	int	argc;	/* number of command-line args */
	char	**argv;	/* values of the command line args */
usage()
refont(fp)
	FILE	*fp;
regexp *regcomp(text)
	char		*text;
int match1(re, ch, token)
	regexp		*re;
	REG char	ch;
	REG int		token;
int match(re, str, prog, here)
	regexp		*re;	/* the regular expression */
	char		*str;	/* the string */
	REG char	*prog;	/* a portion of re->program, an compiled RE */
	REG char	*here;	/* a portion of str, the string to compare it to */
int regexec(re, str, bol)
	regexp	*re;	/* the compiled regexp to search for */
	char	*str;	/* the string to search through */
	int	bol;	/* boolean: does str start at the beginning of a line? */
regexp *regcomp(exp)
	char	*exp;
int regexec(prog, string, bolflag)
	struct regexp	*prog;
	char		*string;
	int		bolflag;
void regsub(re, src, dst)
	regexp		*re;
	REG char	*src;
	REG char	*dst;
main(argc, argv)
	int argc;
	char **argv;
execute(buf)
	char *buf;
searchpath(from, to)
	char *from, *to;
try(name)
	char *name;
cmd_exit()
cmd_set(line)
	char *line;
doset(line, value)
	char *line, *value;
script(name)
	char *name;
int system(cmd)
	const char	*cmd;
int rpipe(cmd, in)
	char	*cmd;	/* the filter command to use */
	int	in;	/* the fd to use for stdin */
int rpclose(fd)
	int	fd;
int system(cmd)
	char	*cmd;	/* a command to run */
char *wildcard(names)
	char	*names;
int filter(from, to, cmd)
	MARK	from, to;	/* the range of lines to filter */
	char	*cmd;		/* the filter command */
int tgetent(bp, name)
	char	*bp;	/* buffer for storing the entry -- ignored */
	char	*name;	/* name of the entry */
int tgetnum(id)
	char	*id;
int tgetflag(id)
	char	*id;
char *tgetstr(id, bp)
	char	*id;
	char	**bp;	/* pointer to pointer to buffer - ignored */
char *tgoto(cm, destcol, destrow)
	char	*cm;	/* cursor movement string -- ignored */
	int	destcol;/* destination column, 0 - 79 */
	int	destrow;/* destination row, 0 - 24 */
void tputs(cp, affcnt, outfn)
	char	*cp;		/* the string to output */
	int	affcnt;		/* number of affected lines -- ignored */
	int	(*outfn)();	/* the output function */
int vgets(prompt, buf, bsize)
	char	prompt;	/* the prompt character, or '\0' for none */
	char	*buf;	/* buffer into which the string is read */
	int	bsize;	/* size of the buffer */
void beep()
void endmsgs()
void msg(fmt, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
	char	*fmt;
	long	arg1, arg2, arg3, arg4, arg5, arg6, arg7;
void exrefresh()
int fromcutbuf(cbname)
	int	cbname;
int getkey(when)
	int		when;		/* which bits must be ON? */
void mapkey(rawin, cooked, when, name)
	char	*rawin;	/* the input key sequence, before mapping */
	char	*cooked;/* after mapping */
	short	when;	/* bitmap of when mapping should happen */
	char	*name;	/* name of the key, if any */
void dumpkey(when)
	int	when;	/* WHEN_XXXX of mappings to be dumped */
void savekeys(fd)
	int	fd;	/* file descriptor to save them to */
int tmpstart(filename)
	char		*filename; /* name of the original file */
int tmpsave(filename, bang)
	char	*filename;	/* the name to save it to */
	int	bang;		/* forced write? */
int tmpabort(bang)
	int	bang;
int tmpend(bang)
	int	bang;
sync()
MARK v_quit()
MARK v_redraw()
MARK v_1ex(m, text)
	MARK	m;	/* the current line */
	char	*text;	/* the first command to execute */
MARK v_undo(m)
	MARK	m;	/* (ignored) */
MARK v_xchar(m, cnt, cmd)
	MARK	m;	/* where to start deletions */
	long	cnt;	/* number of chars to delete */
	int	cmd;	/* either 'x' or 'X' */
MARK v_mark(m, count, key)
	MARK	m;	/* where the mark will be */
	long	count;	/* (ignored) */
	int	key;	/* the ASCII label of the mark */
MARK v_ulcase(m, cnt)
	MARK	m;	/* where to make the change */
	long	cnt;	/* number of chars to flip */
MARK v_replace(m, cnt, key)
	MARK	m;	/* first char to be replaced */
	long	cnt;	/* number of chars to replace */
	int	key;	/* what to replace them with */
MARK v_overtype(m)
	MARK		m;	/* where to start overtyping */
MARK v_selcut(m, cnt, key)
	MARK	m;
	long	cnt;
	int	key;
MARK v_paste(m, cnt, cmd)
	MARK	m;	/* where to paste the text */
	long	cnt;	/* (ignored) */
	int	cmd;	/* either 'p' or 'P' */
MARK v_yank(m, n)
	MARK	m, n;	/* range of text to yank */
MARK v_delete(m, n)
	MARK	m, n;	/* range of text to delete */
MARK v_insert(m, cnt, key)
	MARK	m;	/* where to start (sort of) */
	long	cnt;	/* repeat how many times? */
	int	key;	/* what command is this for? {a,A,i,I,o,O} */
MARK v_change(m, n)
	MARK	m, n;	/* the range of text to change */
MARK v_subst(m, cnt)
	MARK	m;	/* where substitutions start */
	long	cnt;	/* number of chars to replace */
MARK v_join(m, cnt)
	MARK	m;	/* the first line to be joined */
	long	cnt;	/* number of other lines to join */
MARK v_lshift(m, n)
	MARK	m, n;	/* range of lines to shift */
MARK v_rshift(m, n)
	MARK	m, n;	/* range of lines to shift */
MARK v_filter(m, n)
	MARK	m, n;	/* range of lines to shift */
MARK v_status()
MARK v_again(m, n)
	MARK	m, n;
MARK v_switch()
MARK v_tag(keyword, m, cnt)
	char	*keyword;
	MARK	m;
	long	cnt;
MARK v_keyword(keyword, m, cnt)
	char	*keyword;
	MARK	m;
	long	cnt;
MARK v_increment(keyword, m, cnt)
	char	*keyword;
	MARK	m;
	long	cnt;
MARK v_xit(m, cnt, key)
	MARK	m;	/* ignored */
	long	cnt;	/* ignored */
	int	key;	/* must be a second 'Z' */
MARK v_undoline(m)
	MARK	m;	/* where we hope to undo the change */
MARK v_errlist(m)
	MARK	m;
MARK v_at(m, cnt, key)
	MARK	m;
	long	cnt;
	int	key;
void vi()
MARK adjmove(old, new, flags)
	MARK		old;	/* the cursor position before the command */
	REG MARK	new;	/* the cursor position after the command */
	int		flags;	/* various flags regarding cursor mvmt */
watch()
main(argc, argv)
	int	argc;
	char	**argv;
void recover(filename)
	char	*filename;
copytext(tmpfd, fp)
	int	tmpfd;	/* fd of the tmp file */
	FILE	*fp;	/* the stream to write it to */
main(argc, argv)
	char **argv;
char **wildexpand(argc, argv)
	int *argc;
	char **argv;
expand(name)
	char *name;
addfile(buf)
	char *buf;
int pstrcmp(a, b)
	char **a, **b;
