File:  [MW Coherent from dump] / coherent / d / bin / ed / ed0.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Wed May 29 04:56:39 2019 UTC (7 years, 2 months ago) by root
Branches: MarkWilliams, MAIN
CVS tags: relic, HEAD
coherent

/*
 * An editor.
 * External variables.
 */
#include <stdio.h>
#include "ed.h"

int	cflag;				/* Print character counts */
int	mflag;				/* Allow multiple commands per line */
int	pflag;				/* Editor prompts */
int	oflag;				/* Behaves like old editor */
int	sflag;				/* Match patterns in single case */
int	tflag;				/* Set up for screen editor */
int	vflag;				/* Verbose error messages */
int	intflag;			/* Interrupt has been hit */
char	*tfn;				/* Temp file name */
FILE	*tmp;				/* Temp file pointer */
long	tmpseek;			/* Free space seek ptr in tmp file */
int	rcurbno;			/* Current read block number */
int	wcurbno;			/* Current write block number */
LINE	*line;				/* Pointer to line table */
int	lnsize;				/* Current size of line table */
int	savechr;			/* Character that was ungetx'ed */
int	lastchr;			/* Last character we read */
char	*gcp;				/* Global input pointer */
char	linebuf[LBSIZE];		/* Line buffer */
char	codebuf[CBSIZE];		/* Code buffer */
char	tempbuf[TBSIZE];		/* Temporary buffer */
char	subsbuf[SBSIZE];		/* Substitute buffer */
char	globbuf[GBSIZE];		/* Buffer for global command */
char	rdbcbuf[DBSIZE];		/* Disk buffer cache */
char	wdbcbuf[DBSIZE];		/* Write buffer cache */
BRACE	brace[1+BRSIZE];		/* For remembering \( \) */
char	file[FNSIZE+1];			/* Filename */
LINE	marklin[MKSIZE];		/* Mark line table */
int	dotadd;				/* Address of the current line */
int	doladd;				/* Address of last line */
char	vcom;				/* Verify command */
int	saved;				/* File saved since last written */
FILE	*fp;				/* File pointer for readfil */
long	cct;				/* Number of chars read in append */
long	lct;				/* Number of lines read in append */
int	appflag;			/* In append mode */
int	addspec;			/* Number of addresses specified */
int	adderrr;			/* Error in computing address */
int	addpage;			/* An ampersand was found */
int	addques;			/* A question mark was found */
int	subnths;			/* Which substitute wanted */
int	subnewl;			/* A newline is being replaced */
int	subseek;			/* Seek position of new line */
int	suborig;			/* Seek position of old line */
char	*errstr;			/* Pointer to last error message */
char	*keyp;				/* Pointer to crypt key */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.