当前位置: 首页>>代码示例>>C++>>正文


C++ quotefmtinstall函数代码示例

本文整理汇总了C++中quotefmtinstall函数的典型用法代码示例。如果您正苦于以下问题:C++ quotefmtinstall函数的具体用法?C++ quotefmtinstall怎么用?C++ quotefmtinstall使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了quotefmtinstall函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: main

void
main(void)
{
	memset(edata, 0, (ulong)end-(ulong)edata);
	conf.nmach = 1;
	machinit();
	confinit();
	xinit();
	trapinit();
	mmuinit();
	plan9iniinit();
	hwintrinit();
	clockinit();
	timerinit();
	console();
	quotefmtinstall();
	printinit();
	cpuidprint();
	print("\nPlan 9 from Bell Labs\n");
	procinit0();
	initseg();
	timersinit();
	links();
	chandevreset();
	pageinit();
	swapinit();
	sharedseginit();
	fpsave(&initfp);
	initfp.fpscr = 0;
	userinit();
	schedinit();
}
开发者ID:99years,项目名称:plan9,代码行数:32,代码来源:main.c

示例2: threadmain

void
threadmain(int argc, char **argv)
{
	char *net;

//extern long _threaddebuglevel;
//_threaddebuglevel = 1<<20;	/* DBGNOTE */

	rfork(RFNOTEG);
	ARGBEGIN{
	case 'D':
		chatty9p++;
		break;
	case 'n':
		setexecname(EARGF(usage()));
		break;
	}ARGEND

	switch(argc){
	default:
		usage();
	case 0:
		net = "/net";
		break;
	case 1:
		net = argv[0];
		break;
	}

	quotefmtinstall();

	initfs();
	threadpostmountsrv(&fs, nil, net, MBEFORE);
	threadexits(nil);
}
开发者ID:Requaos,项目名称:harvey,代码行数:35,代码来源:main.c

示例3: main

void
main(int argc, char **argv)
{
	RSApriv *key;
	Attr *a;
	char *s;

	fmtinstall('A', _attrfmt);
	fmtinstall('B', mpfmt);
	quotefmtinstall();

	ARGBEGIN{
	default:
		usage();
	}ARGEND

	if(argc > 1)
		usage();

	if((key = getkey(argc, argv, 0, &a)) == nil)
		sysfatal("%r");

	s = smprint("key %A size=%d ek=%lB n=%lB\n",
		a, 
		mpsignif(key->pub.n), key->pub.ek, key->pub.n);
	if(s == nil)
		sysfatal("smprint: %r");
	write(1, s, strlen(s));
	exits(nil);
}
开发者ID:00001,项目名称:plan9port,代码行数:30,代码来源:rsa2pub.c

示例4: main

void
main(int argc, char **argv)
{
	char *patternpath;

	ARGBEGIN {
	case 'd':
		debug++;
		break;
	} ARGEND;

	quotefmtinstall();

	if(argc < 3)
		usage();

	patternpath = argv[1];
	readpatterns(patternpath);
	if(strcmp(argv[0], "add") == 0)
		exits(add(patternpath, argc-2, argv+2));
	else if(strcmp(argv[0], "check") == 0)
		exits(check(argc-2, argv+2));
	else
		usage();
}
开发者ID:AustenConrad,项目名称:plan-9,代码行数:25,代码来源:list.c

示例5: main

void
main(int argc, char **argv)
{
	DSApriv *key;
	Attr *a;
	char *s;

	fmtinstall('A', _attrfmt);
	fmtinstall('B', mpfmt);
	quotefmtinstall();

	ARGBEGIN{
	default:
		usage();
	}ARGEND

	if(argc > 1)
		usage();

	if((key = getdsakey(argc, argv, 0, &a)) == nil)
		sysfatal("%r");

	s = smprint("key %A p=%lB q=%lB alpha=%lB key=%lB\n",
		a, 
		key->pub.p, key->pub.q, key->pub.alpha, key->pub.key);
	if(s == nil)
		sysfatal("smprint: %r");
	write(1, s, strlen(s));
	exits(nil);
}
开发者ID:00001,项目名称:plan9port,代码行数:30,代码来源:dsa2pub.c

示例6: main

void
main(int argc, char **argv)
{
	Avlwalk *w;
	Biobuf bout;
	Entry *e;

	quotefmtinstall();
	ARGBEGIN{
	default:
		usage();
	}ARGEND

	if(argc != 1)
		usage();

	Binit(&bout, 1, OWRITE);
	db = opendb(argv[0]);
	w = avlwalk(db->avl);
	while(e = (Entry*)avlnext(w))
		Bprint(&bout, "%q %q %luo %q %q %lud %lld\n",
			e->name, strcmp(e->name, e->d.name)==0 ? "-" : e->d.name, e->d.mode,
			e->d.uid, e->d.gid, e->d.mtime, e->d.length);
	if(Bterm(&bout) < 0)
		sysfatal("writing output: %r");

	exits(nil);
}
开发者ID:99years,项目名称:plan9,代码行数:28,代码来源:compactdb.c

示例7: main

void
main(int argc, char *argv[])
{
	char *opt, *p;
	char *enva[20];
	int envc;

	if(coherence == nil)
		coherence = nofence;
	quotefmtinstall();
	savestartup(argc, argv);
	/* set default root now, so either $EMU or -r can override it later */
	if((p = getenv("INFERNO")) != nil || (p = getenv("ROOT")) != nil)
		strecpy(rootdir, rootdir+sizeof(rootdir), p);
	opt = getenv("EMU");
	if(opt != nil && *opt != '\0') {
		enva[0] = "emu";
		envc = tokenize(opt, &enva[1], sizeof(enva)-1) + 1;
		enva[envc] = 0;
		option(envc, enva, envusage);
	}
	option(argc, argv, usage);
	eve = strdup("inferno");

	opt = "interp";
	if(cflag)
		opt = "compile";

	if(vflag)
		print("Inferno %s main (pid=%d) %s\n", VERSION, getpid(), opt);

	libinit(imod);
}
开发者ID:Mekapaedia,项目名称:inferno-rpi,代码行数:33,代码来源:main.c

示例8: auth_proxy

AuthInfo*
auth_proxy(int fd, AuthGetkey *getkey, char *fmt, ...)
{
	int afd;
	char *p;
	va_list arg;
	AuthInfo *ai;
	AuthRpc *rpc;

	quotefmtinstall();	/* just in case */
	va_start(arg, fmt);
	p = vsmprint(fmt, arg);
	va_end(arg);

	afd = open("/mnt/factotum/rpc", ORDWR);
	if(afd < 0){
		werrstr("opening /mnt/factotum/rpc: %r");
		free(p);
		return nil;
	}

	rpc = auth_allocrpc(afd);
	if(rpc == nil){
		free(p);
		return nil;
	}

	ai = fauth_proxy(fd, rpc, getkey, p);
	free(p);
	auth_freerpc(rpc);
	close(afd);
	return ai;
}
开发者ID:99years,项目名称:plan9,代码行数:33,代码来源:auth_proxy.c

示例9: main

void
main(void)
{
	cgapost(0);
	mach0init();
	options();
	ioinit();
	i8250console();
	quotefmtinstall();
	screeninit();

	print("\nPlan 9\n");

	trapinit0();
	mmuinit0();

	kbdinit();
	i8253init();
	cpuidentify();
	meminit();
	confinit();
	archinit();
	if(!isa20on())
		panic("bootstrap didn't leave a20 address line enabled");
	xinit();
	if(i8237alloc != nil)
		i8237alloc();
	trapinit();
	printinit();
	cpuidprint();
	mmuinit();
	fpsavealloc();
	if(arch->intrinit)	/* launches other processors on an mp */
		arch->intrinit();
	timersinit();
	mathinit();
	kbdenable();
	if(arch->clockenable)
		arch->clockenable();
	procinit0();
	initseg();
	if(delaylink){
		bootlinks();
		pcimatch(0, 0, 0);
	}else
		links();
	conf.monitor = 1;
	chandevreset();
	cgapost(0xcd);

	pageinit();
	i8253link();
	swapinit();
	userinit();
	active.thunderbirdsarego = 1;

	cgapost(0x99);
	schedinit();
}
开发者ID:carriercomm,项目名称:plan9-gpl,代码行数:59,代码来源:main.c

示例10: threadmain

void
threadmain(int argc, char *argv[])
{
	int i, n;
	unsigned char score[VtScoreSize];
	unsigned char *buf;
	VtConn *z;
	char *host;
	VtRoot root;

	fmtinstall('F', vtfcallfmt);
	fmtinstall('V', vtscorefmt);
	quotefmtinstall();

	host = nil;
	ARGBEGIN{
	case 'h':
		host = EARGF(usage());
		break;
	default:
		usage();
		break;
	}ARGEND

	if(argc == 0)
		usage();

	buf = vtmallocz(VtMaxLumpSize);

	z = vtdial(host);
	if(z == nil)
		sysfatal("could not connect to server: %r");

	if(vtconnect(z) < 0)
		sysfatal("vtconnect: %r");

	for(i=0; i<argc; i++){
		if(vtparsescore(argv[i], nil, score) < 0){
			fprint(2, "cannot parse score '%s': %r\n", argv[i]);
			continue;
		}
		n = vtread(z, score, VtRootType, buf, VtMaxLumpSize);
		if(n < 0){
			fprint(2, "could not read block %V: %r\n", score);
			continue;
		}
		if(n != VtRootSize){
			fprint(2, "block %V is wrong size %d != 300\n", score, n);
			continue;
		}
		if(vtrootunpack(&root, buf) < 0){
			fprint(2, "unpacking block %V: %r\n", score);
			continue;
		}
		print("%V: %q %q %V %d %V\n", score, root.name, root.type, root.score, root.blocksize, root.prev);
	}
	vthangup(z);
	threadexitsall(0);
}
开发者ID:aahud,项目名称:harvey,代码行数:59,代码来源:root.c

示例11: main

void
main(int argc, char *argv[]) {
	int i;

	quotefmtinstall();
	for(i = 1; i < argc; i++) {
		print("%q: %ud\n", argv[i], hash(argv[i]));
	}
	exits(nil);
}
开发者ID:captain-spanner,项目名称:rosetta-stoned,代码行数:10,代码来源:hashtest.c

示例12: formatinit

void
formatinit(void)
{
	quotefmtinstall();
//	fmtinstall('Y', Yfmt);	/* print channels */
	fmtinstall('Z', Zfmt);	/* print devices */
	fmtinstall('G', Gfmt);	/* print tags */
	fmtinstall('T', Tfmt);	/* print times */
//	fmtinstall('E', eipfmt);	/* print ether addresses */
	fmtinstall('I', eipfmt);	/* print ip addresses */
}
开发者ID:npe9,项目名称:harvey,代码行数:11,代码来源:sub.c

示例13: main

void
main(int argc, char **argv)
{
	int i, dostdin;
	char *p;
	Rune *r;
	Rune buf[2];
	
	Binit(&bout, 1, OWRITE);
	fmtinstall('L', linefmt);
	quotefmtinstall();
	
	tmacdir = unsharp("#9/tmac");
	dostdin = 0;
	ARGBEGIN{
	case 'i':
		dostdin = 1;
		break;
	case 'm':
		r = erunesmprint("%s/tmac.%s", tmacdir, EARGF(usage()));
		if(queueinputfile(r) < 0)
			fprint(2, "%S: %r\n", r);
		break;
	case 'r':
		p = EARGF(usage());
		p += chartorune(buf, p);
		buf[1] = 0;
		_nr(buf, erunesmprint("%s", p+1));
		break;
	case 'u':
		utf8 = 1;
		break;
	case 'v':
		verbose = 1;
		break;
	default:
		usage();
	}ARGEND

	for(i=0; i<argc; i++){
		if(strcmp(argv[i], "-") == 0)
			queuestdin();
		else
			queueinputfile(erunesmprint("%s", argv[i]));
	}
	if(argc == 0 || dostdin)
		queuestdin();
	
	run();
	Bprint(&bout, "\n");
	Bterm(&bout);
	exits(nil);
}
开发者ID:00001,项目名称:plan9port,代码行数:53,代码来源:main.c

示例14: pop3mbox

//
// open mailboxes of the form /pop/host/user or /apop/host/user
//
char*
pop3mbox(Mailbox *mb, char *path)
{
	char *f[10];
	int nf, apop, ppop, popssl, apopssl, apoptls, popnotls, apopnotls, poptls;
	Pop *pop;

	quotefmtinstall();
	popssl = strncmp(path, "/pops/", 6) == 0;
	apopssl = strncmp(path, "/apops/", 7) == 0;
	poptls = strncmp(path, "/poptls/", 8) == 0;
	popnotls = strncmp(path, "/popnotls/", 10) == 0;
	ppop = popssl || poptls || popnotls || strncmp(path, "/pop/", 5) == 0;
	apoptls = strncmp(path, "/apoptls/", 9) == 0;
	apopnotls = strncmp(path, "/apopnotls/", 11) == 0;
	apop = apopssl || apoptls || apopnotls || strncmp(path, "/apop/", 6) == 0;

	if(!ppop && !apop)
		return Enotme;

	path = strdup(path);
	if(path == nil)
		return "out of memory";

	nf = getfields(path, f, nelem(f), 0, "/");
	if(nf != 3 && nf != 4) {
		free(path);
		return "bad pop3 path syntax /[a]pop[tls|ssl]/system[/user]";
	}

	pop = emalloc(sizeof(*pop));
	pop->freep = path;
	pop->host = f[2];
	if(nf < 4)
		pop->user = nil;
	else
		pop->user = f[3];
	pop->ppop = ppop;
	pop->needssl = popssl || apopssl;
	pop->needtls = poptls || apoptls;
	pop->refreshtime = 60;
	pop->notls = popnotls || apopnotls;
	pop->thumb = initThumbprints("/sys/lib/tls/mail", "/sys/lib/tls/mail.exclude");

	mb->aux = pop;
	mb->sync = pop3sync;
	mb->close = pop3close;
	mb->ctl = pop3ctl;
	mb->d = emalloc(sizeof(*mb->d));

	return nil;
}
开发者ID:AustenConrad,项目名称:plan-9,代码行数:55,代码来源:pop3.c

示例15: auth_getuserpasswd

UserPasswd*
auth_getuserpasswd(AuthGetkey *getkey, char *fmt, ...)
{
	AuthRpc *rpc;
	char *f[3], *p, *params;
	int fd;
	va_list arg;
	UserPasswd *up;

	up = nil;
	rpc = nil;
	params = nil;

	fd = open("/mnt/factotum/rpc", ORDWR);
	if(fd < 0)
		goto out;
	rpc = auth_allocrpc(fd);
	if(rpc == nil)
		goto out;
	quotefmtinstall();	/* just in case */
	va_start(arg, fmt);
	params = vsmprint(fmt, arg);
	va_end(arg);
	if(params == nil)
		goto out;

	if(dorpc(rpc, "start", params, strlen(params), getkey) != ARok
	|| dorpc(rpc, "read", nil, 0, getkey) != ARok)
		goto out;

	rpc->arg[rpc->narg] = '\0';
	if(tokenize(rpc->arg, f, 2) != 2){
		werrstr("bad answer from factotum");
		goto out;
	}
	up = malloc(sizeof(*up)+rpc->narg+1);
	if(up == nil)
		goto out;
	p = (char*)&up[1];
	strcpy(p, f[0]);
	up->user = p;
	p += strlen(p)+1;
	strcpy(p, f[1]);
	up->passwd = p;

out:
	free(params);
	auth_freerpc(rpc);
	close(fd);
	return up;
}
开发者ID:AustenConrad,项目名称:plan-9,代码行数:51,代码来源:auth_getuserpasswd.c


注:本文中的quotefmtinstall函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。