|
|
1.1 ! root 1: /* ! 2: * An editor. ! 3: * External variables. ! 4: */ ! 5: #include <stdio.h> ! 6: #include "ed.h" ! 7: ! 8: int cflag; /* Print character counts */ ! 9: int mflag; /* Allow multiple commands per line */ ! 10: int pflag; /* Editor prompts */ ! 11: int oflag; /* Behaves like old editor */ ! 12: int sflag; /* Match patterns in single case */ ! 13: int tflag; /* Set up for screen editor */ ! 14: int vflag; /* Verbose error messages */ ! 15: int intflag; /* Interrupt has been hit */ ! 16: char *tfn; /* Temp file name */ ! 17: FILE *tmp; /* Temp file pointer */ ! 18: long tmpseek; /* Free space seek ptr in tmp file */ ! 19: int rcurbno; /* Current read block number */ ! 20: int wcurbno; /* Current write block number */ ! 21: LINE *line; /* Pointer to line table */ ! 22: int lnsize; /* Current size of line table */ ! 23: int savechr; /* Character that was ungetx'ed */ ! 24: int lastchr; /* Last character we read */ ! 25: char *gcp; /* Global input pointer */ ! 26: char linebuf[LBSIZE]; /* Line buffer */ ! 27: char codebuf[CBSIZE]; /* Code buffer */ ! 28: char tempbuf[TBSIZE]; /* Temporary buffer */ ! 29: char subsbuf[SBSIZE]; /* Substitute buffer */ ! 30: char globbuf[GBSIZE]; /* Buffer for global command */ ! 31: char rdbcbuf[DBSIZE]; /* Disk buffer cache */ ! 32: char wdbcbuf[DBSIZE]; /* Write buffer cache */ ! 33: BRACE brace[1+BRSIZE]; /* For remembering \( \) */ ! 34: char file[FNSIZE+1]; /* Filename */ ! 35: LINE marklin[MKSIZE]; /* Mark line table */ ! 36: int dotadd; /* Address of the current line */ ! 37: int doladd; /* Address of last line */ ! 38: char vcom; /* Verify command */ ! 39: int saved; /* File saved since last written */ ! 40: FILE *fp; /* File pointer for readfil */ ! 41: long cct; /* Number of chars read in append */ ! 42: long lct; /* Number of lines read in append */ ! 43: int appflag; /* In append mode */ ! 44: int addspec; /* Number of addresses specified */ ! 45: int adderrr; /* Error in computing address */ ! 46: int addpage; /* An ampersand was found */ ! 47: int addques; /* A question mark was found */ ! 48: int subnths; /* Which substitute wanted */ ! 49: int subnewl; /* A newline is being replaced */ ! 50: int subseek; /* Seek position of new line */ ! 51: int suborig; /* Seek position of old line */ ! 52: char *errstr; /* Pointer to last error message */ ! 53: char *keyp; /* Pointer to crypt key */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.