DataMuseum.dk

Presents historical artifacts from the history of:

Commodore CBM-900

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Commodore CBM-900

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦c46c2d70e⟧ TextFile

    Length: 2173 (0x87d)
    Types: TextFile
    Notes: UNIX file
    Names: »ed0.c«

Derivation

└─⟦f27320a65⟧ Bits:30001972 Commodore 900 hard disk image with partial source code
    └─⟦f4b8d8c84⟧ UNIX V7 Filesystem
        └─ ⟦this⟧ »cmd/ed/ed0.c« 

TextFile

/*
 * 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 */