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

📄 arc.c

📁 这是一个同样来自贝尔实验室的和UNIX有着渊源的操作系统, 其简洁的设计和实现易于我们学习和理解
💻 C
字号:
#include	"mk.h"Arc *newarc(Node *n, Rule *r, char *stem, Resub *match){	Arc *a;	a = (Arc *)Malloc(sizeof(Arc));	a->n = n;	a->r = r;	a->stem = strdup(stem);	rcopy(a->match, match, NREGEXP);	a->next = 0;	a->flag = 0;	a->prog = r->prog;	return(a);}voiddumpa(char *s, Arc *a){	char buf[1024];	Bprint(&bout, "%sArc@%p: n=%p r=%p flag=0x%x stem='%s'",		s, a, a->n, a->r, a->flag, a->stem);	if(a->prog)		Bprint(&bout, " prog='%s'", a->prog);	Bprint(&bout, "\n");	if(a->n){		snprint(buf, sizeof(buf), "%s    ", (*s == ' ')? s:"");		dumpn(buf, a->n);	}}voidnrep(void){	Symtab *sym;	Word *w;	sym = symlook("NREP", S_VAR, 0);	if(sym){		w = sym->u.ptr;		if (w && w->s && *w->s)			nreps = atoi(w->s);	}	if(nreps < 1)		nreps = 1;	if(DEBUG(D_GRAPH))		Bprint(&bout, "nreps = %d\n", nreps);}

⌨️ 快捷键说明

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