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

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

?? pictures.c

?? 這是一個同樣來自貝爾實驗室的和UNIX有著淵源的操作系統, 其簡潔的設計和實現易于我們學習和理解
?? C
字號:
/* * * PostScript picture inclusion routines. Support for managing in-line pictures * has been added, and works in combination with the simple picpack pre-processor * that's supplied with this package. An in-line picture begins with a special * device control command that looks like, * *		x X InlinPicture name size * * where name is the pathname of the original picture file and size is the number * of bytes in the picture, which begins immediately on the next line. When dpost * encounters the InlinePicture device control command inlinepic() is called and * that routine appends the string name and the integer size to a temporary file * (fp_pic) and then adds the next size bytes read from the current input file to * file fp_pic. All in-line pictures are saved in fp_pic and located later using * the name string and picture file size that separate pictures saved in fp_pic. * * When a picture request (ie. an "x X PI" command) is encountered picopen() is * called and it first looks for the picture file in fp_pic. If it's found there * the entire picture (ie. size bytes) is copied from fp_pic to a new temp file * and that temp file is used as the picture file. If there's nothing in fp_pic * or if the lookup failed the original route is taken. * * Support for in-line pictures is an attempt to address requirements, expressed * by several organizations, of being able to store a document as a single file * (usually troff input) that can then be sent through dpost and ultimately to * a PostScript printer. The mechanism may help some users, but the are obvious * disadvantages to this approach, and the original mechanism is the recommended * approach! Perhaps the most important problem is that troff output, with in-line * pictures included, doesn't fit the device independent language accepted by * important post-processors (like proff) and that means you won't be able to * reliably preview a packed file on your 5620 (or whatever). * */#include <u.h>#include <libc.h>#include <bio.h>#include <stdio.h>#include "ext.h"#include "common.h"#include "tr2post.h"/* PostScript file structuring comments */#include "comments.h"/* general purpose definitions *//* #include "gen.h" *//* just for TEMPDIR definition */#include "path.h"/* external variable declarations *//* #include "ext.h" */Biobuf	*bfp_pic = NULL;Biobufhdr	*Bfp_pic;Biobufhdr	*picopen(char *);#define MAXGETFIELDS	16char *fields[MAXGETFIELDS];int nfields;extern int	devres, hpos, vpos;extern int	picflag;/*****************************************************************************/voidpicture(Biobufhdr *inp, char *buf) {	int	poffset;		/* page offset */	int	indent;		/* indent */	int	length;		/* line length  */	int	totrap;		/* distance to next trap */	char	name[100];	/* picture file and page string */	char	hwo[40], *p;	/* height, width and offset strings */	char	flags[20];		/* miscellaneous stuff */	int	page = 1;		/* page number pulled from name[] */	double	frame[4];	/* height, width, y, and x offsets from hwo[] */	char	units;		/* scale indicator for frame dimensions */	int	whiteout = 0;	/* white out the box? */	int	outline = 0;	/* draw a box around the picture? */	int	scaleboth = 0;	/* scale both dimensions? */	double	adjx = 0.5;	/* left-right adjustment */	double	adjy = 0.5;	/* top-bottom adjustment */	double	rot = 0;	/* rotation in clockwise degrees */	Biobufhdr	*fp_in;	/* for *name */	int	i;			/* loop index *//* * * Called from devcntrl() after an 'x X PI' command is found. The syntax of that * command is: * *	x X PI:args * * with args separated by colons and given by: * *	poffset *	indent *	length *	totrap *	file[(page)] *	height[,width[,yoffset[,xoffset]]] *	[flags] * * poffset, indent, length, and totrap are given in machine units. height, width, * and offset refer to the picture frame in inches, unless they're followed by * the u scale indicator. flags is a string that provides a little bit of control * over the placement of the picture in the frame. Rotation of the picture, in * clockwise degrees, is set by the a flag. If it's not followed by an angle * the current rotation angle is incremented by 90 degrees, otherwise the angle * is set by the number that immediately follows the a. * */	if (!picflag)		/* skip it */		return;	endstring();	flags[0] = '\0';			/* just to be safe */	nfields = getfields(buf, fields, MAXGETFIELDS, 0, ":\n");	if (nfields < 6) {		error(WARNING, "too few arguments to specify picture");		return;	}	poffset = atoi(fields[1]);	indent = atoi(fields[2]);	length = atoi(fields[3]);	totrap = atoi(fields[4]);	strncpy(name, fields[5], sizeof(name));	strncpy(hwo, fields[6], sizeof(hwo));	if (nfields >= 6)		strncpy(flags, fields[7], sizeof(flags));	nfields = getfields(buf, fields, MAXGETFIELDS, 0, "()");	if (nfields == 2) {		strncpy(name, fields[0], sizeof(name));		page = atoi(fields[1]);	}	if ((fp_in = picopen(name)) == NULL) {		error(WARNING, "can't open picture file %s\n", name);		return;	}	frame[0] = frame[1] = -1;		/* default frame height, width */	frame[2] = frame[3] = 0;		/* and y and x offsets */	for (i = 0, p = hwo-1; i < 4 && p != NULL; i++, p = strchr(p, ','))		if (sscanf(++p, "%lf%c", &frame[i], &units) == 2)	    		if (units == 'i' || units == ',' || units == '\0')				frame[i] *= devres;	if (frame[0] <= 0)		/* check what we got for height */		frame[0] = totrap;    	if (frame[1] <= 0)		/* and width - check too big?? */		frame[1] = length - indent;	frame[3] += poffset + indent;	/* real x offset */	for (i = 0; flags[i]; i++)		switch (flags[i]) {		case 'c': adjx = adjy = 0.5; break;	/* move to the center */		case 'l': adjx = 0; break;		/* left */		case 'r': adjx = 1; break;		/* right */		case 't': adjy = 1; break;		/* top */		case 'b': adjy = 0; break;		/* or bottom justify */		case 'o': outline = 1; break;	/* outline the picture */		case 'w': whiteout = 1; break;	/* white out the box */		case 's': scaleboth = 1; break;	/* scale both dimensions */		case 'a': if ( sscanf(&flags[i+1], "%lf", &rot) != 1 )			  rot += 90;	}	/* restore(); */	endstring();	Bprint(Bstdout, "cleartomark\n");	Bprint(Bstdout, "saveobj restore\n");	ps_include(fp_in, Bstdout, page, whiteout, outline, scaleboth,		frame[3]+frame[1]/2, -vpos-frame[2]-frame[0]/2, frame[1], frame[0], adjx, adjy, -rot);	/* save(); */	Bprint(Bstdout, "/saveobj save def\n");	Bprint(Bstdout, "mark\n");	Bterm(fp_in);}/* * * Responsible for finding and opening the next picture file. If we've accumulated * any in-line pictures fp_pic won't be NULL and we'll look there first. If *path * is found in *fp_pic we create another temp file, open it for update, unlink it, * copy in the picture, seek back to the start of the new temp file, and return * the file pointer to the caller. If fp_pic is NULL or the lookup fails we just * open file *path and return the resulting file pointer to the caller. * */Biobufhdr *picopen(char *path) {/*	char	name[100];	/* pathnames *//*	long	pos;			/* current position *//*	long	total;			/* and sizes - from *fp_pic */	Biobuf *bfp;	Biobufhdr	*Bfp;		/* and pointer for the new temp file */	if ((bfp = Bopen(path, OREAD)) == 0)		error(FATAL, "can't open %s\n", path);	Bfp = &(bfp->Biobufhdr);	return(Bfp);#ifdef UNDEF	if (Bfp_pic != NULL) {		Bseek(Bfp_pic, 0L, 0);		while (Bgetfield(Bfp_pic, 's', name, 99)>0			&& Bgetfield(Bfp_pic, 'd', &total, 0)>0) {			pos = Bseek(Bfp_pic, 0L, 1);			if (strcmp(path, name) == 0) {				if (tmpnam(pictmpname) == NULL)					error(FATAL, "can't generate temp file name");				if ( (bfp = Bopen(pictmpname, ORDWR)) == NULL )					error(FATAL, "can't open %s", pictmpname);				Bfp = &(bfp->Biobufhdr);				piccopy(Bfp_pic, Bfp, total);				Bseek(Bfp, 0L, 0);				return(Bfp);	    		}			Bseek(Bfp_pic, total+pos, 0);		}	}	if ((bfp = Bopen(path, OREAD)) == 0)		Bfp = 0;	else		Bfp = &(bfp->Biobufhdr);	return(Bfp);#endif}/* * * Adds an in-line picture file to the end of temporary file *Bfp_pic. All pictures * grabbed from the input file are saved in the same temp file. Each is preceeded * by a one line header that includes the original picture file pathname and the * size of the picture in bytes. The in-line picture file is opened for update, * left open, and unlinked so it disappears when we do. * *//*	*fp;			/* current input file *//*	*buf;			/* whatever followed "x X InlinePicture" */#ifdef UNDEFvoidinlinepic(Biobufhdr *Bfp, char *buf) {	char	name[100];		/* picture file pathname */	long	total;			/* and size - both from *buf */	if (Bfp_pic == NULL ) {		tmpnam(pictmpname);		if ((bfp_pic = Bopen(pictmpname, ORDWR)) == 0)	    		error(FATAL, "can't open in-line picture file %s", ipictmpname);		unlink(pictmpname);	}	if ( sscanf(buf, "%s %ld", name, &total) != 2 )		error(FATAL, "in-line picture error");	fseek(Bfp_pic, 0L, 2);	fprintf(Bfp_pic, "%s %ld\n", name, total);	getc(fp);	fflush(fp_pic);	piccopy(fp, fp_pic, total);	ungetc('\n', fp);}#endif/* * * Copies total bytes from file fp_in to fp_out. Used to append picture files to * *fp_pic and then copy them to yet another temporary file immediately before * they're used (in picture()). * *//*	*fp_in;	input *//*	*fp_out;	and output file pointers *//*	total;		number of bytes to be copied */voidpiccopy(Biobufhdr *Bfp_in, Biobufhdr *Bfp_out, long total) {	long i;	for (i = 0; i < total; i++)		if (Bputc(Bfp_out, Bgetc(Bfp_in)) < 0)			error(FATAL, "error copying in-line picture file");	Bflush(Bfp_out);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久理论电影网| 欧美aⅴ一区二区三区视频| 欧美日产国产精品| 综合久久综合久久| 精品99999| 欧美精品一区二区三区蜜桃| 在线电影一区二区三区| 在线不卡中文字幕播放| 欧美三区在线观看| 欧美丰满美乳xxx高潮www| 欧美精品久久久久久久多人混战 | 狠狠网亚洲精品| 久久99九九99精品| 国产乱人伦偷精品视频不卡| 欧美一区二区三区日韩| 日韩av电影天堂| 亚洲欧洲精品一区二区精品久久久 | 欧美视频完全免费看| 在线视频你懂得一区二区三区| 99精品偷自拍| 欧美理论在线播放| 精品国产伦一区二区三区免费| 久久综合丝袜日本网| 亚洲欧美一区二区在线观看| 一区二区三区在线免费播放| 亚洲国产精品综合小说图片区| 日韩成人一级大片| 国产在线精品一区二区夜色| 成人18视频日本| 欧美理论片在线| 久久先锋影音av鲁色资源| 亚洲天堂久久久久久久| 奇米一区二区三区| 成人午夜视频在线观看| 欧美一级午夜免费电影| 国产福利一区二区三区视频| 丁香婷婷综合色啪| 国产无一区二区| 色综合天天综合在线视频| 亚洲福利视频三区| 精品国产一区二区三区久久久蜜月| 奇米影视7777精品一区二区| 日韩欧美视频一区| 91亚洲精品一区二区乱码| 日韩欧美一级精品久久| 久久99精品久久久久| 99免费精品在线| 91精品欧美福利在线观看| 国产精品免费免费| 免费高清视频精品| 91精品1区2区| 久久久久久久久久久久久夜| 亚洲成av人片在线观看| 成人动漫在线一区| 精品欧美黑人一区二区三区| 亚洲一区二区三区四区不卡| 国产91在线|亚洲| 91精品国产手机| 一区二区三区精品在线| 高清shemale亚洲人妖| 欧美zozozo| 日韩高清在线一区| 精品视频资源站| 一区二区欧美视频| av色综合久久天堂av综合| 2020日本不卡一区二区视频| 亚洲二区视频在线| 色偷偷88欧美精品久久久| 国产精品色哟哟| 国产99精品国产| 精品国一区二区三区| 日本不卡一二三区黄网| 欧美一区二区视频在线观看2020 | 丝袜美腿亚洲一区| 欧美视频一区二区三区| 亚洲欧美激情视频在线观看一区二区三区 | 国产精品日韩精品欧美在线| 国产成人av一区二区三区在线 | 中文字幕av一区二区三区| 五月综合激情网| 欧美日韩一区在线| 亚洲不卡一区二区三区| 欧美综合亚洲图片综合区| 亚洲卡通动漫在线| 91电影在线观看| 亚洲成人动漫av| 91.xcao| 久久精品国产第一区二区三区| 精品国产乱码久久久久久夜甘婷婷| 九九**精品视频免费播放| 一本色道久久加勒比精品| 最新高清无码专区| 欧美日韩国产一级| 一区二区三区在线高清| a级精品国产片在线观看| 国产精品日韩精品欧美在线| 91蜜桃免费观看视频| 亚洲一区二区三区四区五区黄| 欧美视频在线一区二区三区| 免费人成精品欧美精品| 久久新电视剧免费观看| 色综合视频在线观看| 丝袜诱惑亚洲看片| 久久精品亚洲麻豆av一区二区 | 久久99国产精品久久| 久久久精品综合| 91玉足脚交白嫩脚丫在线播放| 亚洲国产成人av网| ww亚洲ww在线观看国产| 99r国产精品| 美女在线观看视频一区二区| 久久精品人人爽人人爽| 91蝌蚪国产九色| 麻豆精品视频在线观看| 综合在线观看色| 日韩欧美色综合网站| 91丨porny丨国产入口| 美女视频网站黄色亚洲| 18欧美亚洲精品| 精品噜噜噜噜久久久久久久久试看 | 亚洲第一主播视频| 久久一区二区三区四区| 99精品桃花视频在线观看| 日韩av在线发布| 中文字幕五月欧美| 精品少妇一区二区三区免费观看| 99久久国产免费看| 国产一区视频导航| 亚洲高清中文字幕| 一区在线播放视频| 精品国产99国产精品| 欧美日韩精品高清| 99re热这里只有精品免费视频| 九一九一国产精品| 亚洲成人综合视频| 亚洲免费在线视频| 国产精品白丝在线| 国产日产欧产精品推荐色| 91精品欧美综合在线观看最新 | 亚洲成人精品一区二区| 欧美国产精品v| 精品sm捆绑视频| 欧美一级欧美一级在线播放| 在线观看日韩av先锋影音电影院| 成人黄色电影在线 | 欧美日韩精品一区二区三区蜜桃| 懂色av一区二区在线播放| 激情五月激情综合网| 麻豆专区一区二区三区四区五区| 性久久久久久久久| 亚洲r级在线视频| 婷婷综合五月天| 亚洲电影一级片| 亚洲不卡在线观看| 亚洲h在线观看| 日日欢夜夜爽一区| 琪琪一区二区三区| 久久国产三级精品| 国产乱码精品一区二区三区忘忧草 | 亚洲激情第一区| 玉足女爽爽91| 亚洲成人www| 美腿丝袜亚洲综合| 捆绑调教美女网站视频一区| 蜜乳av一区二区| 国产电影一区在线| 成人精品gif动图一区| 97久久精品人人做人人爽50路 | 在线成人av影院| 欧美岛国在线观看| 国产婷婷一区二区| 亚洲素人一区二区| 亚洲18女电影在线观看| 另类欧美日韩国产在线| 国产高清在线精品| 91视频精品在这里| 91精品国产欧美一区二区18 | 国产精品剧情在线亚洲| 1024精品合集| 亚洲电影你懂得| 韩国精品一区二区| 97se亚洲国产综合自在线观| 欧美日韩欧美一区二区| 日韩三级在线免费观看| 国产亚洲欧美一区在线观看| 亚洲欧美色一区| 热久久久久久久| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 午夜精品久久久久久久久| 久久国产欧美日韩精品| caoporm超碰国产精品| 91麻豆精品国产91久久久更新时间| 久久综合九色综合97_久久久| 国产精品久久久久久久久搜平片| 亚洲图片欧美色图| 九九视频精品免费| 欧美视频精品在线观看| 中文字幕乱码日本亚洲一区二区 | 美腿丝袜在线亚洲一区| 一本一本大道香蕉久在线精品 |