⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tdef.h

📁 这是一个同样来自贝尔实验室的和UNIX有着渊源的操作系统, 其简洁的设计和实现易于我们学习和理解
💻 H
📖 第 1 页 / 共 2 页
字号:
struct Diver {		/* diversion */	Offset	op;	int	dnl;	int	dimac;	int	ditrap;	int	ditf;	int	alss;	int	blss;	int	nls;	int	mkline;	int	maxl;	int	hnl;	int	curd;};struct Stack {		/* stack frame */	int	nargs;	Stack	*pframe;	Offset	pip;	int	pnchar;	Tchar	prchar;	int	ppendt;	Tchar	pch;	Tchar	*lastpbp;	int	mname;};extern	Stack	s;struct Divsiz {	int dix;	int diy;};struct Contab {		/* command or macro */	unsigned int	rq;	Contab	*link;	void	(*f)(void);	Offset	mx;	Offset	emx;	Divsiz	*divsiz;};#define	C(a,b)	{a, 0, b, 0, 0}		/* how to initialize a contab entry */extern	Contab	contab[NM];struct Numtab {	/* number registers */	unsigned int	r;		/* name */	int	val;	short	fmt;	short	inc;	Numtab	*link;};extern	Numtab	numtab[NN];#define	PN	0#define	NL	1#define	YR	2#define	HP	3#define	CT	4#define	DN	5#define	MO	6#define	DY	7#define	DW	8#define	LN	9#define	DL	10#define	ST	11#define	SB	12#define	CD	13#define	PID	14struct	Wcache {	/* width cache, indexed by character */	short	fontpts;	short	width;};struct	Tbuf {		/* growable Tchar buffer */	Tchar *_bufp;	unsigned int _size;};/* the infamous environment block */#define	ics	envp->_ics#define	sps	envp->_sps#define	spacesz	envp->_spacesz#define	lss	envp->_lss#define	lss1	envp->_lss1#define	ll	envp->_ll#define	ll1	envp->_ll1#define	lt	envp->_lt#define	lt1	envp->_lt1#define	ic	envp->_ic#define	icf	envp->_icf#define	chbits	envp->_chbits#define	spbits	envp->_spbits#define	nmbits	envp->_nmbits#define	apts	envp->_apts#define	apts1	envp->_apts1#define	pts	envp->_pts#define	pts1	envp->_pts1#define	font	envp->_font#define	font1	envp->_font1#define	ls	envp->_ls#define	ls1	envp->_ls1#define	ad	envp->_ad#define	nms	envp->_nms#define	ndf	envp->_ndf#define	nmwid	envp->_nmwid#define	fi	envp->_fi#define	cc	envp->_cc#define	c2	envp->_c2#define	ohc	envp->_ohc#define	tdelim	envp->_tdelim#define	hyf	envp->_hyf#define	hyoff	envp->_hyoff#define	hyphalg	envp->_hyphalg#define	un1	envp->_un1#define	tabc	envp->_tabc#define	dotc	envp->_dotc#define	adsp	envp->_adsp#define	adrem	envp->_adrem#define	lastl	envp->_lastl#define	nel	envp->_nel#define	admod	envp->_admod#define	wordp	envp->_wordp#define	spflg	envp->_spflg#define	linep	envp->_linep#define	wdend	envp->_wdend#define	wdstart	envp->_wdstart#define	wne	envp->_wne#define	ne	envp->_ne#define	nc	envp->_nc#define	nb	envp->_nb#define	lnmod	envp->_lnmod#define	nwd	envp->_nwd#define	nn	envp->_nn#define	ni	envp->_ni#define	ul	envp->_ul#define	cu	envp->_cu#define	ce	envp->_ce#define	in	envp->_in#define	in1	envp->_in1#define	un	envp->_un#define	wch	envp->_wch#define	pendt	envp->_pendt#define	pendw	envp->_pendw#define	pendnf	envp->_pendnf#define	spread	envp->_spread#define	it	envp->_it#define	itmac	envp->_itmac#define	hyptr	envp->_hyptr#define	tabtab	envp->_tabtab#define	line	envp->_line._bufp#define	lnsize	envp->_line._size#define	word	envp->_word._bufp#define wdsize	envp->_word._size#define oline	_oline._bufp#define olnsize	_oline._size/* * Note: * If this structure changes in ni.c, you must change * this as well, and vice versa. */struct Env {	int	_ics;	int	_sps;	int	_spacesz;	int	_lss;	int	_lss1;	int	_ll;	int	_ll1;	int	_lt;	int	_lt1;	Tchar	_ic;	int	_icf;	Tchar	_chbits;	Tchar	_spbits;	Tchar	_nmbits;	int	_apts;	int	_apts1;	int	_pts;	int	_pts1;	int	_font;	int	_font1;	int	_ls;	int	_ls1;	int	_ad;	int	_nms;	int	_ndf;	int	_nmwid;	int	_fi;	int	_cc;	int	_c2;	int	_ohc;	int	_tdelim;	int	_hyf;	int	_hyoff;	int	_hyphalg;	int	_un1;	int	_tabc;	int	_dotc;	int	_adsp;	int	_adrem;	int	_lastl;	int	_nel;	int	_admod;	Tchar	*_wordp;	int	_spflg;	Tchar	*_linep;	Tchar	*_wdend;	Tchar	*_wdstart;	int	_wne;	int	_ne;	int	_nc;	int	_nb;	int	_lnmod;	int	_nwd;	int	_nn;	int	_ni;	int	_ul;	int	_cu;	int	_ce;	int	_in;	int	_in1;	int	_un;	int	_wch;	int	_pendt;	Tchar	*_pendw;	int	_pendnf;	int	_spread;	int	_it;	int	_itmac;	Tchar	*_hyptr[NHYP];	long	_tabtab[NTAB];	Tbuf	_line;	Tbuf	_word;};extern	Env	env[];extern	Env	*envp;enum {	MBchar = 'U', Troffchar = 'C', Number = 'N', Install = 'i', Lookup = 'l' };	/* U => utf, for instance;  C => \(xx, N => \N'...' */struct Chwid {	/* data on one character */	Ushort	num;		/* character number:					0 -> not on this font					>= ALPHABET -> its number among all Cxy's */	Ushort	code;		/* char code for actual device.  used for \N */	char	*str;		/* code string for nroff */	Uchar	wid;		/* width */	Uchar	kern;		/* ascender/descender */};struct Font {	/* characteristics of a font */	int	name;		/* int name, e.g., BI (2 chars) */	char	longname[64];	/* long name of this font (e.g., "Bembo" */	char	*truename;	/* path name of table if not in standard place */	int	nchars;		/* number of width entries for this font */	char	specfont;	/* 1 == special font */	int	spacewidth;	/* width of space on this font */	int	defaultwidth;	/* default width of characters on this font */	Chwid	*wp;		/* widths, etc., of the real characters */	char	ligfont;	/* 1 == ligatures exist on this font */};/* ligatures, ORed into ligfont */#define	LFF	01#define	LFI	02#define	LFL	04#define	LFFI	010#define	LFFL	020/* tracing modes */#define TRNARGS	01		/* trace legality of numeric arguments */#define TRREQ	02		/* trace requests */#define TRMAC	04		/* trace macros */#define RQERR	01		/* processing request/macro *//* typewriter driving table structure */extern	Term	t;struct Term {	int	bset;		/* these bits have to be on */	int	breset;		/* these bits have to be off */	int	Hor;		/* #units in minimum horiz motion */	int	Vert;		/* #units in minimum vert motion */	int	Newline;	/* #units in single line space */	int	Char;		/* #units in character width */	int	Em;		/* ditto */	int	Halfline;	/* half line units */	int	Adj;		/* minimum units for horizontal adjustment */	char	*twinit;	/* initialize terminal */	char	*twrest;	/* reinitialize terminal */	char	*twnl;		/* terminal sequence for newline */	char	*hlr;		/* half-line reverse */	char	*hlf;		/* half-line forward */	char	*flr;		/* full-line reverse */	char	*bdon;		/* turn bold mode on */	char	*bdoff;		/* turn bold mode off */	char	*iton;		/* turn italic mode on */	char	*itoff;		/* turn italic mode off */	char	*ploton;	/* turn plot mode on */	char	*plotoff;	/* turn plot mode off */	char	*up;		/* sequence to move up in plot mode */	char	*down;		/* ditto */	char	*right;		/* ditto */	char	*left;		/* ditto */	Font	tfont;		/* widths and other info, as in a troff font */};extern	Term	t;/* * for error reporting; keep track of escapes/requests with numeric arguments */struct Numerr {	char	type;	/* request or escape? */	char	esc;	/* was escape sequence named esc */	char	escarg;	/* argument of esc's like \D'l' */	unsigned int	req;	/* was request or macro named req */};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -