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

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

?? source.c

?? <B>Digital的Unix操作系統VAX 4.2源碼</B>
?? C
字號:
/*#@(#)source.c	4.1	Ultrix	7/17/90*//* Copyright (c) 1982 Regents of the University of California */static char sccsid[] = "@(#)source.c 1.9 8/5/83";static char rcsid[] = "$Header: source.c,v 1.3 84/03/27 10:23:58 linton Exp $";/* * Source file management. */#include "defs.h"#include "source.h"#include "object.h"#include "mappings.h"#include "machine.h"#ifndef publictypedef int Lineno;String cursource;Lineno curline;Lineno cursrcline;#define LASTLINE 0		/* recognized by printlines */#include "lists.h"List sourcepath;#endifprivate Lineno lastlinenum;private String prevsource = nil;/* * Data structure for indexing source seek addresses by line number. * * The constraints are: * *  we want an array so indexing is fast and easy *  we don't want to waste space for small files *  we don't want an upper bound on # of lines in a file *  we don't know how many lines there are * * The solution is a "dirty" hash table.  We have NSLOTS pointers to * arrays of NLINESPERSLOT addresses.  To find the source address of * a particular line we find the slot, allocate space if necessary, * and then find its location within the pointed to array. */typedef long Seekaddr;#define NSLOTS 20#define NLINESPERSLOT 500#define slotno(line)    ((line) div NLINESPERSLOT)#define index(line)	((line) mod NLINESPERSLOT)#define slot_alloc()    newarr(Seekaddr, NLINESPERSLOT)#define srcaddr(line)	seektab[slotno(line)][index(line)]private File srcfp;private Seekaddr *seektab[NSLOTS];/* * Print out the given lines from the source. */public printlines(l1, l2)Lineno l1, l2;{    register int c;    register Lineno i, lb, ub;    register File f;    if (cursource == nil) {	beginerrmsg();	fprintf(stderr, "no source file\n");    } else {	if (cursource != prevsource) {	    skimsource();	}	if (lastlinenum == 0) {	    beginerrmsg();	    fprintf(stderr, "couldn't read \"%s\"\n", cursource);	} else {	    lb = (l1 == 0) ? lastlinenum : l1;	    ub = (l2 == 0) ? lastlinenum : l2;	    if (lb < 1) {		beginerrmsg();		fprintf(stderr, "line number must be positive\n");	    } else if (lb > lastlinenum) {		beginerrmsg();		if (lastlinenum == 1) {		    fprintf(stderr, "\"%s\" has only 1 line\n", cursource);		} else {		    fprintf(stderr, "\"%s\" has only %d lines\n",			cursource, lastlinenum);		}	    } else if (ub < lb) {		beginerrmsg();		fprintf(stderr, "second number must be greater than first\n");	    } else {		if (ub > lastlinenum) {		    ub = lastlinenum;		}		f = srcfp;		fseek(f, srcaddr(lb), 0);		for (i = lb; i <= ub; i++) {		    printf("%5d   ", i);		    while ((c = getc(f)) != '\n') {			putchar(c);		    }		    putchar('\n');		}		cursrcline = ub + 1;	    }	}    }}/* * Search the sourcepath for a file. */static char fileNameBuf[1024];public String findsource(filename)String filename;{    register File f;    register String src, dir;    if (filename[0] == '/') {	src = filename;    } else {	src = nil;	foreach (String, dir, sourcepath)	    sprintf(fileNameBuf, "%s/%s", dir, filename);	    f = fopen(fileNameBuf, "r");	    if (f != nil) {		fclose(f);		src = fileNameBuf;		break;	    }	endfor    }    return src;}/* * Open a source file looking in the appropriate places. */public File opensource(filename)String filename;{    String s;    File f;    s = findsource(filename);    if (s == nil) {	f = nil;    } else {	f = fopen(s, "r");    }    return f;}/* * Set the current source file. */public setsource(filename)String filename;{    if (filename != nil and filename != cursource) {	prevsource = cursource;	cursource = filename;	cursrcline = 1;    }}/* * Read the source file getting seek pointers for each line. */private skimsource(){    register int c;    register Seekaddr count;    register File f;    register Lineno linenum;    register Seekaddr lastaddr;    register int slot;    f = opensource(cursource);    if (f == nil) {	lastlinenum = 0;    } else {	if (prevsource != nil) {	    free_seektab();	    if (srcfp != nil) {		fclose(srcfp);	    }	}	prevsource = cursource;	linenum = 0;	count = 0;	lastaddr = 0;	while ((c = getc(f)) != EOF) {	    ++count;	    if (c == '\n') {		slot = slotno(++linenum);		if (slot >= NSLOTS) {		    panic("skimsource: too many lines");		}		if (seektab[slot] == nil) {		    seektab[slot] = slot_alloc();		}		seektab[slot][index(linenum)] = lastaddr;		lastaddr = count;	    }	}	lastlinenum = linenum;	srcfp = f;    }}/* * Erase information and release space in the current seektab. * This is in preparation for reading in seek pointers for a * new file.  It is possible that seek pointers for all files * should be kept around, but the current concern is space. */private free_seektab(){    register int slot;    for (slot = 0; slot < NSLOTS; slot++) {	if (seektab[slot] != nil) {	    dispose(seektab[slot]);	}    }}/* * Figure out current source position. */public getsrcpos(){    String filename;    curline = srcline(pc);    filename = srcfilename(pc);    setsource(filename);    if (curline != 0) {	cursrcline = curline;    }}/* * Print out the current source position. */public printsrcpos(){    printf("at line %d", curline);    if (nlhdr.nfiles > 1) {	printf(" in file \"%s\"", cursource);    }}#define DEF_EDITOR  "vi"/* * Invoke an editor on the given file.  Which editor to use might change * installation to installation.  For now, we use "vi".  In any event, * the environment variable "EDITOR" overrides any default. */public edit(filename)String filename;{    extern String getenv();    String ed, src, s;    Symbol f;    Address addr;    char lineno[10];    ed = getenv("EDITOR");    if (ed == nil) {	ed = DEF_EDITOR;    }    src = findsource((filename != nil) ? filename : cursource);    if (src == nil) {	f = which(identname(filename, true));	if (not isblock(f)) {	    error("can't read \"%s\"", filename);	}	addr = firstline(f);	if (addr == NOADDR) {	    error("no source for \"%s\"", filename);	}	src = srcfilename(addr);	s = findsource(src);	if (s != nil) {	    src = s;	}	sprintf(lineno, "+%d", srcline(addr));    } else {	sprintf(lineno, "+1");    }    call(ed, stdin, stdout, lineno, src, nil);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩三级中文字幕| 欧美日韩一本到| 黄色日韩网站视频| 日韩成人av影视| 丝袜亚洲另类欧美综合| 亚洲影院理伦片| 三级精品在线观看| 日韩国产欧美在线播放| 日本欧美一区二区在线观看| 日韩成人一级大片| 免费日本视频一区| 国产伦精品一区二区三区免费迷 | 91久久精品午夜一区二区| www.色精品| 在线观看视频一区二区欧美日韩| 欧美视频自拍偷拍| 欧美高清你懂得| 久久尤物电影视频在线观看| 久久久精品天堂| 综合欧美一区二区三区| 亚洲一区二区三区免费视频| 日韩精品免费专区| 国产一区二区日韩精品| 东方aⅴ免费观看久久av| 99国产欧美久久久精品| 欧美日韩不卡一区| 久久色中文字幕| 亚洲精品久久久蜜桃| 欧美a级一区二区| 成人黄色av电影| 这里是久久伊人| 久久精品亚洲麻豆av一区二区| 亚洲免费资源在线播放| 天天操天天干天天综合网| 国产精品资源网| 欧美日韩精品免费| 国产精品每日更新在线播放网址| 亚洲国产综合色| 国内精品久久久久影院薰衣草 | 国内精品国产三级国产a久久 | 91理论电影在线观看| 欧美情侣在线播放| 中文无字幕一区二区三区 | 久草这里只有精品视频| aaa欧美大片| 欧美精品一区二区三| 亚洲激情五月婷婷| 国产激情精品久久久第一区二区| 欧美日韩视频一区二区| 国产精品久久毛片a| 捆绑调教美女网站视频一区| 欧美专区亚洲专区| 国产精品女同互慰在线看| 日本亚洲免费观看| 色综合天天做天天爱| 久久久综合激的五月天| 日韩成人午夜精品| 91国产视频在线观看| 日本一区二区三区电影| 麻豆视频观看网址久久| 欧美色区777第一页| 亚洲色图在线播放| 91在线视频播放| 国产精品久久久久久久久果冻传媒 | 国产日韩v精品一区二区| 蜜桃久久av一区| 欧美日产国产精品| 亚洲影院久久精品| 精品视频在线免费| 一区二区三区日韩欧美精品| 91麻豆6部合集magnet| 国产精品少妇自拍| 国产成人免费在线观看不卡| 精品1区2区在线观看| 久久99精品久久久久婷婷| 欧美精品久久久久久久多人混战| 一区二区三区在线高清| 欧美中文字幕一区二区三区亚洲| 亚洲啪啪综合av一区二区三区| 99精品久久只有精品| 最好看的中文字幕久久| 在线观看91精品国产入口| 亚洲欧美另类在线| 欧美午夜精品电影| 日韩精品每日更新| 精品999久久久| 成人午夜电影小说| 国产精品久久看| 欧美亚洲自拍偷拍| 青青草精品视频| 久久综合狠狠综合久久综合88| 国产精品白丝av| 国产精品色在线| 欧美日韩午夜影院| 久久99久久99小草精品免视看| 26uuu久久天堂性欧美| 成人av动漫在线| 水蜜桃久久夜色精品一区的特点 | 久久国产综合精品| 久久久久久久精| 91色在线porny| 视频精品一区二区| 国产日韩欧美精品在线| 色综合天天综合网天天看片| 日本美女视频一区二区| 久久久五月婷婷| 在线免费亚洲电影| 国产主播一区二区| 亚洲免费在线观看视频| 欧美精品123区| 高清在线成人网| 亚洲成人午夜影院| 国产亚洲一区二区三区| 欧美探花视频资源| 粉嫩蜜臀av国产精品网站| 一区二区三区产品免费精品久久75| 日韩欧美电影一二三| 91农村精品一区二区在线| 美国三级日本三级久久99| 国产精品视频第一区| 日韩欧美的一区| 在线这里只有精品| 国产99精品视频| 日本中文字幕一区二区有限公司| 国产精品毛片高清在线完整版| 在线成人午夜影院| 99久久综合99久久综合网站| 毛片不卡一区二区| 亚洲午夜视频在线观看| 国产精品二三区| 国产亚洲综合av| 日韩精品一区二区三区四区| 在线亚洲+欧美+日本专区| 高潮精品一区videoshd| 九九九精品视频| 三级精品在线观看| 亚洲v日本v欧美v久久精品| 亚洲欧洲国产专区| 国产欧美一区二区精品婷婷 | 亚洲少妇屁股交4| 国产亚洲欧洲997久久综合 | 色综合久久久久久久久| 国产高清成人在线| 麻豆国产一区二区| 久久精品999| 麻豆成人综合网| 日韩不卡一区二区三区| 亚洲国产视频网站| 亚洲一区影音先锋| 依依成人综合视频| 一区二区三区在线视频观看| 亚洲精品国产第一综合99久久| 国产精品传媒在线| 国产精品成人午夜| 中文字幕一区不卡| 亚洲乱码国产乱码精品精98午夜 | 国产拍揄自揄精品视频麻豆| 欧美mv日韩mv| wwwwww.欧美系列| 国产三级一区二区| 亚洲国产成人午夜在线一区| 中文字幕+乱码+中文字幕一区| 国产精品久久久久久久久晋中 | 国产黄色精品视频| 成人黄色电影在线| 一本到不卡免费一区二区| 色嗨嗨av一区二区三区| 色悠悠久久综合| 51午夜精品国产| 久久众筹精品私拍模特| 国产精品久久夜| 亚洲在线一区二区三区| 五月婷婷久久综合| 国产精品一区二区在线观看网站 | 欧美性高清videossexo| 91精品国产丝袜白色高跟鞋| 欧美大片在线观看一区二区| 精品国产伦一区二区三区免费| 337p日本欧洲亚洲大胆色噜噜| 国产清纯白嫩初高生在线观看91| 亚洲欧洲日产国产综合网| 亚洲一区二区精品3399| 久久99久国产精品黄毛片色诱| 岛国av在线一区| 欧美色偷偷大香| 久久精品人人做人人综合 | 成人成人成人在线视频| 91在线视频在线| 91精品在线麻豆| 国产精品蜜臀在线观看| 午夜欧美2019年伦理| 国产一区二区三区四| 日本韩国欧美国产| 精品国产精品网麻豆系列| 中文字幕欧美激情一区| 免费看黄色91| 色婷婷久久久综合中文字幕| 精品91自产拍在线观看一区| 一区二区三区在线播| 国产成人一区在线|