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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? rt-wumpus.c

?? 早期freebsd實現(xiàn)
?? C
字號:
/* $Id: rt-wumpus.c,v 3.0 1992/12/14 00:14:00 davison Trn $*/#include "EXTERN.h"#include "common.h"#include "cache.h"#include "ng.h"#include "head.h"#include "util.h"#include "term.h"#include "final.h"#include "ngdata.h"#include "artio.h"#include "backpage.h"#include "rthread.h"#include "rt-select.h"#include "INTERN.h"#include "rt-wumpus.h"static char tree_indent[] = {    ' ', 0,    ' ', ' ', ' ', ' ', 0,   ' ', ' ', ' ', ' ', 0,    ' ', ' ', ' ', ' ', 0,   ' ', ' ', ' ', ' ', 0,    ' ', ' ', ' ', ' ', 0,   ' ', ' ', ' ', ' ', 0,    ' ', ' ', ' ', ' ', 0,   ' ', ' ', ' ', ' ', 0,    ' ', ' ', ' ', ' ', 0,   ' ', ' ', ' ', ' ', 0,    ' ', ' ', ' ', ' ', 0,   ' ', ' ', ' ', ' ', 0,    ' ', ' ', ' ', ' ', 0,   ' ', ' ', ' ', ' ', 0,    ' ', ' ', ' ', ' ', 0,   ' ', ' ', ' ', ' ', 0,    ' ', ' ', ' ', ' ', 0,   ' ', ' ', ' ', ' ', 0,    ' ', ' ', ' ', ' ', 0,   ' ', ' ', ' ', ' ', 0,    ' ', ' ', ' ', ' ', 0,   ' ', ' ', ' ', ' ', 0,    ' ', ' ', ' ', ' ', 0,   ' ', ' ', ' ', ' ', 0,    ' ', ' ', ' ', ' ', 0,   ' ', ' ', ' ', ' ', 0,    ' ', ' ', ' ', ' ', 0,   ' ', ' ', ' ', ' ', 0};char letters[] = "123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+";static ARTICLE *tree_article;static int max_depth, max_line = -1;static int first_depth, first_line;static int my_depth, my_line;static bool node_on_line;static int node_line_cnt;static int line_num;static int header_indent;static char *tree_lines[11];static char tree_buff[128], *str;/* Prepare tree display for inclusion in the article header.*/voidinit_tree(){    ARTICLE *thread;    SUBJECT *sp;    int num;    while (max_line >= 0)		/* free any previous tree data */	free(tree_lines[max_line--]);    if (!(tree_article = curr_artp) || !tree_article->subj)	return;    if (!(thread = tree_article->subj->thread))	return;    /* Enumerate our subjects for display */    sp = thread->subj;    num = 0;    do {	sp->misc = num++;	sp = sp->thread_link;    } while (sp != thread->subj);    max_depth = max_line = my_depth = my_line = node_line_cnt = 0;    find_depth(thread, 0);    if (max_depth <= 5) {	first_depth = 0;    } else {	if (my_depth+2 > max_depth) {	    first_depth = max_depth - 5;	} else if ((first_depth = my_depth - 3) < 0) {	    first_depth = 0;	}	max_depth = first_depth + 5;    }    if (--max_line < max_tree_lines) {	first_line = 0;    } else {	if (my_line + max_tree_lines/2 > max_line) {	    first_line = max_line - (max_tree_lines-1);	} else if ((first_line = my_line - (max_tree_lines-1)/2) < 0) {	    first_line = 0;	}	max_line = first_line + max_tree_lines-1;    }    str = tree_buff;		/* initialize first line's data */    *str++ = ' ';    node_on_line = FALSE;    line_num = 0;    /* cache our portion of the tree */    cache_tree(thread, 0, tree_indent);    max_depth = (max_depth-first_depth) * 5;	/* turn depth into char width */    max_line -= first_line;			/* turn max_line into count */    /* shorten tree if lower lines aren't visible */    if (node_line_cnt < max_line) {	max_line = node_line_cnt + 1;    }}/* A recursive routine to find the maximum tree extents and where we are.*/static voidfind_depth(article, depth)ARTICLE *article;int depth;{    if (depth > max_depth) {	max_depth = depth;    }    for (;;) {	if (article == tree_article) {	    my_depth = depth;	    my_line = max_line;	}	if (article->child1) {	    find_depth(article->child1, depth+1);	} else {	    max_line++;	}	if (!(article = article->sibling)) {	    break;	}    }}/* Place the tree display in a maximum of 11 lines x 6 nodes.*/static voidcache_tree(ap, depth, cp)ARTICLE *ap;int depth;char *cp;{    int depth_mode;    cp[1] = ' ';    if (depth >= first_depth && depth <= max_depth) {	cp += 5;	depth_mode = 1;    } else if (depth+1 == first_depth) {	depth_mode = 2;    } else {	cp = tree_indent;	depth_mode = 0;    }    for (;;) {	switch (depth_mode) {	case 1: {	    char ch;	    *str++ = ((ap->flags & AF_HAS_RE) || ap->parent) ? '-' : ' ';	    if (ap == tree_article)		*str++ = '*';	    if (ap->flags & AF_READ) {		*str++ = '(';		ch = ')';	    } else if (!selected_only || (ap->flags & AF_SEL)) {		*str++ = '[';		ch = ']';	    } else {		*str++ = '<';		ch = '>';	    }	    if (ap == recent_artp && ap != tree_article)		*str++ = '@';	    *str++ = letter(ap);	    *str++ = ch;	    if (ap->child1) {		*str++ = (ap->child1->sibling? '+' : '-');	    }	    if (ap->sibling)		*cp = '|';	    else		*cp = ' ';	    node_on_line = TRUE;	    break;	}	case 2:	    *tree_buff = (!ap->child1)? ' ' :		(ap->child1->sibling)? '+' : '-';	    break;	default:	    break;	}	if (ap->child1) {	    cache_tree(ap->child1, depth+1, cp);	    cp[1] = '\0';	} else {	    if (!node_on_line && first_line == line_num) {		first_line++;	    }	    if (line_num >= first_line) {		if (str[-1] == ' ') {		    str--;		}		*str = '\0';		tree_lines[line_num-first_line]			= safemalloc(str-tree_buff + 1);		strcpy(tree_lines[line_num - first_line], tree_buff);		if (node_on_line) {		    node_line_cnt = line_num - first_line;		}	    }	    line_num++;	    node_on_line = FALSE;	}	if (!(ap = ap->sibling) || line_num > max_line)	    break;	if (!ap->sibling)	    *cp = '\\';	if (!first_depth)	    tree_indent[5] = ' ';	strcpy(tree_buff, tree_indent+5);	str = tree_buff + strlen(tree_buff);    }}/* Output a header line with possible tree display on the right hand side.** Does automatic wrapping of lines that are too long.*/inttree_puts(orig_line, header_line, use_underline)char *orig_line;ART_LINE header_line;int use_underline;{    char *buf;    register char *line, *cp, *end;    int pad_cnt, wrap_at;    ART_LINE start_line = header_line;    int i;    char ch;    /* Make a modifiable copy of the line */    buf = safemalloc(strlen(orig_line) + 2);  /* yes, I mean "2" */    strcpy(buf, orig_line);    line = buf;    /* Change any embedded control characters to spaces */    for (end = line; *end && *end != '\n'; end++) {	if ((unsigned char)*end < ' ') {	    *end = ' ';	}    }    *end = '\0';    if (!*line) {	strcpy(line, " ");	end = line+1;    }    /* If this is the first subject line, output it with a preceeding [1] */    if (ThreadedGroup && use_underline && (unsigned char)*line > ' ') {#ifdef NOFIREWORKS	no_sofire();#endif	standout();	putchar('[');	putchar(letter(curr_artp));	putchar(']');	un_standout();	putchar(' ');	header_indent = 4;	line += 9;	i = 0;    } else {	if (*line != ' ') {	    /* A "normal" header line -- output keyword and set header_indent	    ** _except_ for the first line, which is a non-standard header.	    */	    if (!header_line || !(cp = index(line, ':')) || *++cp != ' ') {		header_indent = 0;	    } else {		*cp = '\0';		fputs(line, stdout);		putchar(' ');		header_indent = ++cp - line;		line = cp;		if (!*line) {		    *--line = ' ';		}	    }	    i = 0;	} else {	    /* Skip whitespace of continuation lines and prepare to indent */	    while (*++line == ' ') {		;	    }	    i = header_indent;	}    }    for ( ; *line; i = header_indent) {#ifdef CLEAREOL	maybe_eol();#endif	if (i) {	    putchar('+');	    while (--i) {		putchar(' ');	    }	}	/* If no (more) tree lines, wrap at COLS-1 */	if (max_line < 0 || header_line > max_line+1) {	    wrap_at = COLS-1;	} else {	    wrap_at = COLS - max_depth - 5 - 3;	}	/* Figure padding between header and tree output, wrapping long lines */	pad_cnt = wrap_at - (end - line + header_indent);	if (pad_cnt <= 0) {	    cp = line + wrap_at - header_indent - 1;	    pad_cnt = 1;	    while (cp > line && *cp != ' ') {		if (*--cp == ',' || *cp == '.' || *cp == '-' || *cp == '!') {		    cp++;		    break;		}		pad_cnt++;	    }	    if (cp == line) {		cp += wrap_at - header_indent;		pad_cnt = 0;	    }	    ch = *cp;	    *cp = '\0';	    /* keep rn's backpager happy */	    vwtary(artline, vrdary(artline - 1));	    artline++;	} else {	    cp = end;	    ch = '\0';	}	if (use_underline) {	    underprint(line);	} else {	    fputs(line, stdout);	}	*cp = ch;	/* Skip whitespace in wrapped line */	while (*cp == ' ') {	    cp++;	}	line = cp;	/* Check if we've got any tree lines to output */	if (wrap_at != COLS-1 && header_line <= max_line) {	    char *cp1, *cp2;	    do {		putchar(' ');	    } while (pad_cnt--);	    /* Check string for the '*' flagging our current node	    ** and the '@' flagging our prior node.	    */	    cp = tree_lines[header_line];	    cp1 = index(cp, '*');	    cp2 = index(cp, '@');	    if (cp1 != Nullch) {		*cp1 = '\0';	    }	    if (cp2 != Nullch) {		*cp2 = '\0';	    }	    fputs(cp, stdout);	    /* Handle standout output for '*' and '@' marked nodes, then	    ** continue with the rest of the line.	    */	    while (cp1 || cp2) {		standout();		if (cp1 && (!cp2 || cp1 < cp2)) {		    cp = cp1;		    cp1 = Nullch;		    *cp++ = '*';		    putchar(*cp++);		    putchar(*cp++);		} else {		    cp = cp2;		    cp2 = Nullch;		    *cp++ = '@';		}		putchar(*cp++);		un_standout();		if (*cp) {		    fputs(cp, stdout);		}	    }/* while */	}/* if */	putchar('\n') FLUSH;	header_line++;    }/* for remainder of line */    /* free allocated copy of line */    free(buf);    /* return number of lines displayed */    return header_line - start_line;}/* Output any parts of the tree that are left to display.  Called at the** end of each header.*/intfinish_tree(last_line)ART_LINE last_line;{    ART_LINE start_line = last_line;    while (last_line <= max_line) {	artline++;	last_line += tree_puts("+", last_line, 0);	vwtary(artline, artpos);	/* keep rn's backpager happy */    }    return last_line - start_line;}/* Output the entire article tree for the user.*/voidentire_tree(ap)ARTICLE *ap;{    ARTICLE *thread;    SUBJECT *sp;    int num;    if (!ap) {#ifdef VERBOSE	IF (verbose)	    fputs("\nNo article tree to display.\n", stdout) FLUSH;	ELSE#endif#ifdef TERSE	    fputs("\nNo tree.\n", stdout) FLUSH;#endif	return;    }    if (!ThreadedGroup) {	ThreadedGroup = TRUE;	printf("Threading the group. "), fflush(stdout);	thread_open();	if (!ThreadedGroup) {	    printf("*failed*\n") FLUSH;	    return;	}	count_subjects(CS_NORM);	putchar('\n') FLUSH;    }    if (!(ap->flags & AF_THREADED))	parseheader(article_num(ap));    if (check_page_line())	return;    putchar('\n');    thread = ap->subj->thread;    /* Enumerate our subjects for display */    sp = thread->subj;    num = 0;    do {	if (check_page_line())	    return;	printf("[%c] %s\n",letters[num>9+26+26? 9+26+26:num],sp->str+4) FLUSH;	sp->misc = num++;	sp = sp->thread_link;    } while (sp != thread->subj);    if (check_page_line())	return;    putchar('\n');    if (check_page_line())	return;    putchar(' ');    buf[3] = '\0';    display_tree(thread, tree_indent);    if (check_page_line())	return;    putchar('\n');}/* A recursive routine to output the entire article tree.*/static voiddisplay_tree(article, cp)ARTICLE *article;char *cp;{    if (cp - tree_indent > COLS || page_line < 0)	return;    cp[1] = ' ';    cp += 5;    for (;;) {	putchar(((article->flags&AF_HAS_RE) || article->parent) ? '-' : ' ');	if (article->flags & AF_READ) {	    buf[0] = '(';	    buf[2] = ')';	} else if (!selected_only || (article->flags & AF_SEL)) {	    buf[0] = '[';	    buf[2] = ']';	} else {	    buf[0] = '<';	    buf[2] = '>';	}	buf[1] = letter(article);	if (article == curr_artp) {	    standout();	    fputs(buf, stdout);	    un_standout();	} else if (article == recent_artp) {	    putchar(buf[0]);	    standout();	    putchar(buf[1]);	    un_standout();	    putchar(buf[2]);	} else {	    fputs(buf, stdout);	}	if (article->sibling) {	    *cp = '|';	} else {	    *cp = ' ';	}	if (article->child1) {	    putchar((article->child1->sibling)? '+' : '-');	    display_tree(article->child1, cp);	    cp[1] = '\0';	} else {	    putchar('\n') FLUSH;	}	if (!(article = article->sibling)) {	    break;	}	if (!article->sibling) {	    *cp = '\\';	}	tree_indent[5] = ' ';	if (check_page_line()) {	    return;	}	fputs(tree_indent+5, stdout);    }}static intcheck_page_line(){    if (page_line < 0)	return -1;    if (page_line >= LINES || int_count) {      register int cmd = -1;	if (int_count || (cmd = get_anything())) {	    page_line = -1;		/* disable further printing */	    if (cmd > 0)		pushchar(cmd);	    return cmd;	}    }    page_line++;    return 0;}/* Calculate the subject letter representation.  "Place-holder" nodes** are marked with a ' ', others get a letter in the sequence:**	' ', '1'-'9', 'A'-'Z', 'a'-'z', '+'*/static charletter(ap)register ARTICLE *ap;{    int subj = ap->subj->misc;    if (!(ap->flags & AF_CACHED)     && (absfirst < first_cached || last_cached < lastart      || !cached_all_in_range))	return '?';    if (ap->flags & AF_MISSING)	return ' ';    return letters[subj > 9+26+26 ? 9+26+26 : subj];}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线观看网站黄不卡| 亚洲成人免费视频| 色美美综合视频| 毛片av中文字幕一区二区| 国产精品国产三级国产a| 884aa四虎影成人精品一区| 成人免费毛片嘿嘿连载视频| 水野朝阳av一区二区三区| 国产精品欧美极品| 精品国产网站在线观看| 在线精品视频小说1| 国产不卡在线一区| 九一久久久久久| 五月天激情综合| 亚洲猫色日本管| 日本一区二区视频在线| 欧美xxx久久| 91精品国产一区二区| 欧美主播一区二区三区| 91亚洲国产成人精品一区二区三 | 欧美精品一级二级| 99久久精品免费| 国产高清在线精品| 久久69国产一区二区蜜臀| 日韩激情视频在线观看| 一区二区三区在线视频免费 | 精品国产在天天线2019| 欧美精品第1页| 欧美日韩视频在线一区二区| 色婷婷av一区二区| 97se亚洲国产综合自在线不卡| 国产精品一区二区三区99| 九色综合国产一区二区三区| 日本三级亚洲精品| 免费成人在线影院| 日本成人中文字幕| 蜜桃视频在线一区| 毛片不卡一区二区| 久久精品999| 九九热在线视频观看这里只有精品| 日韩影视精彩在线| 日韩精品免费视频人成| 日本中文在线一区| 美腿丝袜亚洲三区| 国产在线视频一区二区三区| 国内国产精品久久| 国产精品一区二区三区99| 国产91精品一区二区麻豆亚洲| 精品亚洲aⅴ乱码一区二区三区| 精品亚洲成a人在线观看| 国产一区二区三区精品视频| 国产精品一二三| av中文字幕亚洲| 日本乱码高清不卡字幕| 中文字幕高清一区| 国产精品亲子伦对白| 最近中文字幕一区二区三区| 一区二区三区91| 日韩国产欧美三级| 国产一区二区调教| 成人禁用看黄a在线| 91视频观看免费| 欧美日韩精品欧美日韩精品| 欧美一级专区免费大片| 久久久91精品国产一区二区精品 | 久久99久久久久| 国产精品中文字幕日韩精品| 成人一级视频在线观看| 色美美综合视频| 91精品国产色综合久久不卡蜜臀| 日韩精品专区在线影院重磅| 欧美激情艳妇裸体舞| 一区二区免费在线| 久久av中文字幕片| 9色porny自拍视频一区二区| 欧美日韩不卡在线| 国产日韩综合av| 亚洲一区二区欧美日韩| 狠狠色狠狠色综合系列| 色综合久久久久网| 91精品国产福利| 中文字幕在线一区二区三区| 亚洲v中文字幕| 成人性生交大片免费| 欧美欧美午夜aⅴ在线观看| 性做久久久久久久久| 国产精品1区二区.| 欧美老年两性高潮| 国产精品美女久久久久aⅴ国产馆| 亚洲一区二区三区在线| 国产精品夜夜爽| 精品视频一区三区九区| 日本一区二区动态图| 日韩vs国产vs欧美| 99精品1区2区| 精品国产凹凸成av人导航| 亚洲欧美日韩国产综合在线| 久久疯狂做爰流白浆xx| 欧美艳星brazzers| 国产婷婷一区二区| 免费xxxx性欧美18vr| 在线观看亚洲专区| 国产精品久久精品日日| 久久爱另类一区二区小说| 欧美午夜电影一区| 国产精品成人在线观看| 韩国精品主播一区二区在线观看 | 国产一区二区三区免费观看| 欧美色图在线观看| 国产精品天干天干在线综合| 免费视频最近日韩| 欧美日韩夫妻久久| 一区二区在线看| 99国产精品久久久久久久久久 | 国产日韩欧美电影| 全国精品久久少妇| 欧美日韩久久一区| 亚洲综合成人网| 91亚洲精品久久久蜜桃| 国产精品久久久久一区二区三区共| 狠狠色丁香婷婷综合| 91精品婷婷国产综合久久竹菊| 亚洲精品欧美激情| 91啪九色porn原创视频在线观看| 日本一区免费视频| 国产成人av一区二区三区在线观看| 欧美v日韩v国产v| 人人超碰91尤物精品国产| 欧美精品v日韩精品v韩国精品v| 一区二区三区四区在线播放| 97久久超碰精品国产| 国产精品国产三级国产aⅴ中文| 丁香亚洲综合激情啪啪综合| 精品久久久久av影院| 久久99国产精品麻豆| 精品久久久久久久人人人人传媒 | 六月丁香婷婷色狠狠久久| 911精品产国品一二三产区| 亚洲电影视频在线| 欧美三级午夜理伦三级中视频| 亚洲综合成人在线视频| 欧美在线观看18| 丝袜亚洲另类欧美| 日韩一级视频免费观看在线| 久久精品国产亚洲a| 精品女同一区二区| 精品一区二区三区免费| 久久综合av免费| 成年人网站91| 一二三四社区欧美黄| 欧美久久一区二区| 秋霞影院一区二区| 国产日韩欧美精品一区| 不卡的av网站| 亚洲一区二区三区免费视频| 欧美猛男超大videosgay| 免费黄网站欧美| 国产日韩av一区| 91免费看视频| 免费人成精品欧美精品| 久久色视频免费观看| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 欧美日韩精品一区二区三区四区 | 天天综合天天综合色| 欧美一级久久久| 国产成人鲁色资源国产91色综| 亚洲欧洲www| 7777精品久久久大香线蕉| 精品一区免费av| 中文字幕精品三区| 欧美日本一区二区三区四区| 国产原创一区二区三区| 亚洲婷婷国产精品电影人久久| 欧美日韩国产经典色站一区二区三区| 蜜臀久久99精品久久久久宅男| 中文字幕欧美区| 欧美日韩视频专区在线播放| 国产一区二区三区综合| 亚洲三级久久久| 日韩一区二区三区视频在线观看| 成人性生交大片免费| 天天综合天天综合色| 国产精品卡一卡二| 91精品国产色综合久久久蜜香臀| 成人性生交大合| 秋霞午夜鲁丝一区二区老狼| 欧美极品aⅴ影院| 91精品国产日韩91久久久久久| 成人免费毛片app| 日本麻豆一区二区三区视频| 1区2区3区欧美| 欧美va亚洲va| 欧美视频一二三区| 成人激情综合网站| 琪琪久久久久日韩精品| 亚洲欧洲制服丝袜| 国产视频不卡一区| 欧美一区二区播放| 欧美无人高清视频在线观看| 粗大黑人巨茎大战欧美成人|