亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ptx.c

?? unix v7是最后一個廣泛發布的研究型UNIX版本
?? C
字號:
#/*	permuted title index	ptx [-t] [-i ignore] [-o only] [-w num] [-f] [input] [output]	Ptx reads the input file and permutes on words in it.	It excludes all words in the ignore file.	Alternately it includes words in the only file.	if neither is given it excludes the words in /usr/lib/eign.	The width of the output line can be changed to num	characters.  If omitted 72 is default unless troff than 100.	the -f flag tells the program to fold the output	the -t flag says the output is for troff and the	output is then wider.	make: cc ptx.c -lS	*/#include <stdio.h>#include <ctype.h>#include <signal.h>#define DEFLTX "/usr/lib/eign"#define TILDE 0177#define SORT "/bin/sort"#define	N 30#define	MAX	N*BUFSIZ#define LMAX	200#define MAXT	2048#define MASK	03777#define SET	1#define isabreak(c) (btable[c])extern char *calloc(), *mktemp();extern char *getline();int status;char *hasht[MAXT];char line[LMAX];char btable[128];int ignore;int only;int llen = 72;int gap = 3;int gutter = 3;int mlen = LMAX;int wlen;int rflag;int halflen;char *strtbufp, *endbufp;char *empty = "";char *infile;FILE *inptr = stdin;char *outfile;FILE *outptr = stdout;char *sortfile;	/* output of sort program */char nofold[] = {'-', 'd', 't', TILDE, 0};char fold[] = {'-', 'd', 'f', 't', TILDE, 0};char *sortopt = nofold;FILE *sortptr;char *bfile;	/*contains user supplied break chars */FILE *bptr;main(argc,argv)int argc;char **argv;{	register int c;	register char *bufp;	int pid;	char *pend;	extern onintr();	char *xfile;	FILE *xptr;	if(signal(SIGHUP,onintr)==SIG_IGN)		signal(SIGHUP,SIG_IGN);	if(signal(SIGINT,onintr)==SIG_IGN)		signal(SIGINT,SIG_IGN);	signal(SIGPIPE,onintr);	signal(SIGTERM,onintr);/*	argument decoding	*/	xfile = DEFLTX;	argv++;	while(argc>1 && **argv == '-') {		switch (*++*argv){		case 'r':			rflag++;			break;		case 'f':			sortopt = fold;			break;		case 'w':			if(argc >= 2) {				argc--;				wlen++;				llen = atoi(*++argv);				if(llen == 0)					diag("Wrong width:",*argv);				if(llen > LMAX) {					llen = LMAX;					msg("Lines truncated to 200 chars.",empty);				}				break;			}		case 't':			if(wlen == 0)				llen = 100;			break;		case 'g':			if(argc >=2) {				argc--;				gap = gutter = atoi(*++argv);			}			break;		case 'i':			if(only) 				diag("Only file already given.",empty);			if (argc>=2){				argc--;				ignore++;				xfile = *++argv;			}			break;		case 'o':			if(ignore)				diag("Ignore file already given",empty);			if (argc>=2){				only++;				argc--;				xfile = *++argv;			}			break;		case 'b':			if(argc>=2) {				argc--;				bfile = *++argv;			}			break;		default:			msg("Illegal argument:",*argv);		}		argc--;		argv++;	}	if(argc>3)		diag("Too many filenames",empty);	else if(argc==3){		infile = *argv++;		outfile = *argv;		if((outptr = fopen(outfile,"w")) == NULL)			diag("Cannot open output file:",outfile);	} else if(argc==2) {		infile = *argv;		outfile = 0;	}	/* Default breaks of blank, tab and newline */	btable[' '] = SET;	btable['\t'] = SET;	btable['\n'] = SET;	if(bfile) {		if((bptr = fopen(bfile,"r")) == NULL)			diag("Cannot open break char file",bfile);		while((c = getc(bptr)) != EOF)			btable[c] = SET;	}/*	Allocate space for a buffer.  If only or ignore file present	read it into buffer. Else read in default ignore file	and put resulting words in buffer.	*/	if((strtbufp = calloc(N,BUFSIZ)) == NULL)		diag("Out of memory space",empty);	bufp = strtbufp;	endbufp = strtbufp+MAX;	if((xptr = fopen(xfile,"r")) == NULL)		diag("Cannot open  file",xfile);	while(bufp < endbufp && (c = getc(xptr)) != EOF) {		if(isabreak(c)) {			if(storeh(hash(strtbufp,bufp),strtbufp))				diag("Too many words",xfile);			*bufp++ = '\0';			strtbufp = bufp;		}		else {			*bufp++ = (isupper(c)?tolower(c):c);		}	}	if (bufp >= endbufp)		diag("Too many words in file",xfile);	endbufp = --bufp;	/* open output file for sorting */	sortfile = mktemp("/tmp/ptxsXXXXX");	if((sortptr = fopen(sortfile, "w")) == NULL)		diag("Cannot open output for sorting:",sortfile);/*	get a line of data and compare each word for	inclusion or exclusion in the sort phase*/	if (infile!=0 && (inptr = fopen(infile,"r")) == NULL)		diag("Cannot open data: ",infile);	while(pend=getline())		cmpline(pend);	fclose(sortptr);	switch (pid = fork()){	case -1:	/* cannot fork */		diag("Cannot fork",empty);	case 0:		/* child */		execl(SORT, SORT, sortopt, "+0", "-1", "+1",			sortfile, "-o", sortfile, 0);	default:	/* parent */		while(wait(&status) != pid);	}	getsort();	onintr();}msg(s,arg)char *s;char *arg;{	fprintf(stderr,"%s %s\n",s,arg);	return;}diag(s,arg)char *s, *arg;{	msg(s,arg);	exit(1);}char *getline(){	register c;	register char *linep;	char *endlinep;	endlinep= line + mlen;	linep = line;	/* Throw away leading white space */	while(isspace(c=getc(inptr)))		;	if(c==EOF)		return(0);	ungetc(c,inptr);	while(( c=getc(inptr)) != EOF) {		switch (c) {			case '\t':				if(linep<endlinep)					*linep++ = ' ';				break;			case '\n':				while(isspace(*--linep));				*++linep = '\n';				return(linep);			default:				if(linep < endlinep)					*linep++ = c;		}	}	return(0);}cmpline(pend)char *pend;{	char *pstrt, *pchar, *cp;	char **hp;	int flag;	pchar = line;	if(rflag)		while(pchar<pend&&!isspace(*pchar))			pchar++;	while(pchar<pend){	/* eliminate white space */		if(isabreak(*pchar++))			continue;		pstrt = --pchar;		flag = 1;		while(flag){			if(isabreak(*pchar)) {				hp = &hasht[hash(pstrt,pchar)];				pchar--;				while(cp = *hp++){					if(hp == &hasht[MAXT])						hp = hasht;	/* possible match */					if(cmpword(pstrt,pchar,cp)){	/* exact match */						if(!ignore && only)							putline(pstrt,pend);						flag = 0;						break;					}				}	/* no match */				if(flag){					if(ignore || !only)						putline(pstrt,pend);					flag = 0;				}			}		pchar++;		}	}}cmpword(cpp,pend,hpp)char *cpp, *pend, *hpp;{	char c;	while(*hpp != '\0'){		c = *cpp++;		if((isupper(c)?tolower(c):c) != *hpp++)			return(0);	}	if(--cpp == pend) return(1);	return(0);}putline(strt, end)char *strt, *end;{	char *cp;	for(cp=strt; cp<end; cp++)		putc(*cp, sortptr);	/* Add extra blank before TILDE to sort correctly	   with -fd option */	putc(' ',sortptr);	putc(TILDE,sortptr);	for (cp=line; cp<strt; cp++)		putc(*cp,sortptr);	putc('\n',sortptr);}getsort(){	register c;	register char *tilde, *linep, *ref;	char *p1a,*p1b,*p2a,*p2b,*p3a,*p3b,*p4a,*p4b;	int w;	char *rtrim(), *ltrim();	if((sortptr = fopen(sortfile,"r")) == NULL)		diag("Cannot open sorted data:",sortfile);	halflen = (llen-gutter)/2;	linep = line;	while((c = getc(sortptr)) != EOF) {		switch(c) {		case TILDE:			tilde = linep;			break;		case '\n':			while(isspace(linep[-1]))				linep--;			ref = tilde;			if(rflag) {				while(ref<linep&&!isspace(*ref))					ref++;				*ref++ = 0;			}		/* the -1 is an overly conservative test to leave		   space for the / that signifies truncation*/			p3b = rtrim(p3a=line,tilde,halflen-1);			if(p3b-p3a>halflen-1)				p3b = p3a+halflen-1;			p2a = ltrim(ref,p2b=linep,halflen-1);			if(p2b-p2a>halflen-1)				p2a = p2b-halflen-1;			p1b = rtrim(p1a=p3b+(isspace(p3b[0])!=0),tilde,				w=halflen-(p2b-p2a)-gap);			if(p1b-p1a>w)				p1b = p1a;			p4a = ltrim(ref,p4b=p2a-(isspace(p2a[-1])!=0),				w=halflen-(p3b-p3a)-gap);			if(p4b-p4a>w)				p4a = p4b;			fprintf(outptr,".xx \"");			putout(p1a,p1b);	/* tilde-1 to account for extra space before TILDE */			if(p1b!=(tilde-1) && p1a!=p1b)				fprintf(outptr,"/");			fprintf(outptr,"\" \"");			if(p4a==p4b && p2a!=ref && p2a!=p2b)				fprintf(outptr,"/");			putout(p2a,p2b);			fprintf(outptr,"\" \"");			putout(p3a,p3b);	/* ++p3b to account for extra blank after TILDE */	/* ++p3b to account for extra space before TILDE */			if(p1a==p1b && ++p3b!=tilde)				fprintf(outptr,"/");			fprintf(outptr,"\" \"");			if(p1a==p1b && p4a!=ref && p4a!=p4b)				fprintf(outptr,"/");			putout(p4a,p4b);			if(rflag)				fprintf(outptr,"\" %s\n",tilde);			else				fprintf(outptr,"\"\n");			linep = line;			break;		case '"':	/* put double " for "  */			*linep++ = c;		default:			*linep++ = c;		}	}}char *rtrim(a,c,d)char *a,*c;{	char *b,*x;	b = c;	for(x=a+1; x<=c&&x-a<=d; x++)		if((x==c||isspace(x[0]))&&!isspace(x[-1]))			b = x;	if(b<c&&!isspace(b[0]))		b++;	return(b);}char *ltrim(c,b,d)char *c,*b;{	char *a,*x;	a = c;	for(x=b-1; x>=c&&b-x<=d; x--)		if(!isspace(x[0])&&(x==c||isspace(x[-1])))			a = x;	if(a>c&&!isspace(a[-1]))		a--;	return(a);}putout(strt,end)char *strt, *end;{	char *cp;	cp = strt;	for(cp=strt; cp<end; cp++) {		putc(*cp,outptr);	}}onintr(){	if(*sortfile)		unlink(sortfile);	exit(1);}hash(strtp,endp)char *strtp, *endp;{	char *cp, c;	int i, j, k;	/* Return zero hash number for single letter words */	if((endp - strtp) == 1)		return(0);	cp = strtp;	c = *cp++;	i = (isupper(c)?tolower(c):c);	c = *cp;	j = (isupper(c)?tolower(c):c);	i = i*j;	cp = --endp;	c = *cp--;	k = (isupper(c)?tolower(c):c);	c = *cp;	j = (isupper(c)?tolower(c):c);	j = k*j;	k = (i ^ (j>>2)) & MASK;	return(k);}storeh(num,strtp)int num;char *strtp;{	int i;	for(i=num; i<MAXT; i++) {		if(hasht[i] == 0) {			hasht[i] = strtp;			return(0);		}	}	for(i=0; i<num; i++) {		if(hasht[i] == 0) {			hasht[i] = strtp;			return(0);		}	}	return(1);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91美女片黄在线观看91美女| 欧美激情一二三区| 精品中文字幕一区二区小辣椒| 91精品国产日韩91久久久久久| 国产成人三级在线观看| 国产精品免费aⅴ片在线观看| 欧美日韩国产小视频在线观看| 韩国女主播一区二区三区| 亚洲欧美日韩国产一区二区三区| 欧美成人免费网站| 一本大道av一区二区在线播放| 国产一区二区电影| 亚洲午夜电影网| 亚洲国产成人自拍| 精品女同一区二区| 欧美优质美女网站| 白白色 亚洲乱淫| 国产成人综合自拍| 精品一区二区av| 日本成人中文字幕| 亚洲国产精品久久人人爱蜜臀| 国产肉丝袜一区二区| 久久久久亚洲蜜桃| 国产人成亚洲第一网站在线播放| 日韩免费性生活视频播放| 在线观看91精品国产麻豆| 欧美性xxxxxxxx| 制服丝袜亚洲播放| 欧美不卡在线视频| 国产欧美日韩三级| 亚洲天堂福利av| 亚洲午夜视频在线| 首页综合国产亚洲丝袜| 精品中文av资源站在线观看| 国产乱码一区二区三区| 成人一道本在线| 欧美亚洲一区三区| 久久综合九色欧美综合狠狠| 国产精品看片你懂得 | 制服丝袜亚洲网站| 精品国产青草久久久久福利| 欧美国产成人在线| 亚洲小说春色综合另类电影| 激情综合五月婷婷| 99国内精品久久| 亚洲一区av在线| 国产精品美女久久久久久久| 午夜不卡av免费| 91影院在线免费观看| 精品少妇一区二区三区日产乱码| 国产精品色呦呦| 激情成人综合网| 6080午夜不卡| 亚洲电影在线免费观看| 成人av网站在线观看| 精品国产精品网麻豆系列| 亚洲一区二三区| 91丨porny丨国产入口| 久久久久亚洲蜜桃| 国产真实乱对白精彩久久| 欧美一区二区在线免费播放| 亚洲精品日韩专区silk| 成人综合婷婷国产精品久久 | 国产一区二区三区av电影| 欧美色中文字幕| 一区二区视频免费在线观看| 成人免费观看男女羞羞视频| 精品国产精品一区二区夜夜嗨| 日韩经典中文字幕一区| 欧美一级片免费看| 青青草成人在线观看| 欧美一区二区三区在线电影| 丝袜美腿亚洲一区二区图片| 91麻豆精品国产91久久久使用方法| 亚洲综合免费观看高清在线观看| 91免费看片在线观看| 亚洲综合色区另类av| 日韩精品一区二区三区中文精品| 久久国产精品第一页| 国产精品久久久久久户外露出 | 亚洲电影一区二区| 在线不卡一区二区| 国产suv精品一区二区883| 亚洲精品视频免费看| 欧美电影精品一区二区| 成人激情视频网站| 日本欧美加勒比视频| 欧美韩国日本一区| 欧美一区二区三区四区五区| 国产美女久久久久| 日韩国产在线观看| 亚洲日本丝袜连裤袜办公室| 欧美成人女星排名| 91行情网站电视在线观看高清版| 国产精品一区二区x88av| 午夜精品久久久久久久久| 国产精品美女久久久久av爽李琼 | 欧美大片免费久久精品三p| 91丨九色丨尤物| 国产999精品久久久久久| 青青草国产成人av片免费| 亚洲午夜日本在线观看| 国产精品久久久久久久午夜片| 欧美一级高清片| 日韩欧美在线网站| 欧美一区二区女人| 91精品国产全国免费观看| 制服丝袜亚洲色图| 精品国产一区二区国模嫣然| 欧美一级生活片| 久久久久久久久久久久久夜| 欧美精品一区二区三区在线| 国产欧美日韩久久| 国产精品久久久久aaaa樱花| 亚洲欧美综合网| 一区二区三区视频在线观看 | 日本女人一区二区三区| 青娱乐精品视频在线| 成人亚洲一区二区一| 不卡的av电影| 午夜国产精品影院在线观看| 欧美国产日韩精品免费观看| 91国模大尺度私拍在线视频| 91精品国产综合久久精品性色| 国产精品久久久久久久久动漫| 国产精品一区不卡| 久久久夜色精品亚洲| 久久精品国产久精国产| 制服视频三区第一页精品| 亚洲 欧美综合在线网络| www.在线欧美| 国产精品久久久久aaaa樱花| 精品一区二区三区免费观看| 欧美亚洲一区二区三区四区| 久久亚洲捆绑美女| 麻豆国产精品一区二区三区| 欧美人与性动xxxx| 亚洲黄色小说网站| 91麻豆文化传媒在线观看| 久久综合色婷婷| 久久99精品久久只有精品| 91国产成人在线| 一区二区三区日本| 色女孩综合影院| 一区二区三区在线免费播放| 国产成都精品91一区二区三| 久久久91精品国产一区二区三区| 国产高清久久久久| 亚洲国产高清不卡| 日本道精品一区二区三区| 一区二区在线观看不卡| 在线观看日韩国产| 亚洲国产精品久久艾草纯爱| 欧美视频一区二区三区在线观看 | 日韩一区欧美小说| 91丝袜国产在线播放| 亚洲国产综合人成综合网站| 91精品麻豆日日躁夜夜躁| 亚洲国产三级在线| 91老司机福利 在线| 亚洲成人av一区二区| 欧美日韩aaaaa| 国产91精品在线观看| 亚洲欧美在线高清| 制服视频三区第一页精品| av午夜一区麻豆| 蜜臀av性久久久久蜜臀aⅴ流畅| 欧美一二三区精品| 99久久久久免费精品国产| 免费成人在线网站| 亚洲视频在线观看三级| 精品日韩在线观看| 色哟哟一区二区三区| 久久99久久精品| 婷婷六月综合网| 亚洲免费看黄网站| 中文字幕精品综合| 日韩亚洲欧美在线| 欧美喷潮久久久xxxxx| 一本一道久久a久久精品| 懂色av中文一区二区三区| 国产专区欧美精品| 韩国av一区二区| 精品一区二区av| 国产一区二区三区精品视频| 久久精品久久99精品久久| 亚洲超丰满肉感bbw| 一区二区三区不卡在线观看 | 国产精品视频麻豆| 久久久精品一品道一区| www亚洲一区| 久久精品一级爱片| 中文字幕精品综合| 亚洲视频资源在线| 三级一区在线视频先锋| 青青草精品视频| 国产露脸91国语对白| 成人97人人超碰人人99| 色综合天天在线| 91精品国产综合久久久蜜臀图片|