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

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

?? rthread.c

?? 早期freebsd實現
?? C
?? 第 1 頁 / 共 3 頁
字號:
/* $Id: rthread.c,v 3.0 1992/12/14 00:14:13 davison Trn $*/#include "EXTERN.h"#include "common.h"#include "intrp.h"#include "trn.h"#include "cache.h"#include "bits.h"#include "ng.h"#include "rcln.h"#include "search.h"#include "artstate.h"#include "rcstuff.h"#include "ngdata.h"#include "kfile.h"#include "head.h"#include "util.h"#include "hash.h"#include "nntp.h"#include "rt-mt.h"#include "rt-ov.h"#include "rt-page.h"#include "rt-process.h"#include "rt-select.h"#include "rt-wumpus.h"#include "INTERN.h"#include "rthread.h"HASHTABLE *msgid_hash = 0;bool try_ov = FALSE;bool try_mt = FALSE;voidthread_init(){#ifdef USE_OV    try_ov = ov_init();#endif#ifdef USE_MT    try_mt = mt_init();#endif}/* Generate the thread data we need for this group.  We must call** thread_close() before calling this again.*/voidthread_open(){    if (!msgid_hash)	msgid_hash = hashcreate(201, msgid_cmp); /*TODO: pick a better size */    if (ThreadedGroup) {	/* Parse input and use msgid_hash for quick article lookups. */	/* If cached but not threaded articles exist, set up to thread them. */	if (first_subject) {	    first_cached = firstart;	    last_cached = firstart - 1;	    parsed_art = 0;	}    }    if (sel_mode == SM_ARTICLE)	set_selector(sel_mode, sel_artsort);    else	set_selector(sel_threadmode, sel_threadsort);#ifdef USE_MT    if (try_mt && !first_subject)	if (!mt_data())	    return;#endif#ifdef USE_OV    if (try_ov && first_cached > last_cached)	if (thread_always)	    (void) ov_data(absfirst, lastart, FALSE);	else if (firstart > lastart) {	    /* If no unread articles, see if ov. exists as quick as possible */	    (void) ov_data(absfirst, absfirst, FALSE);	    first_cached = last_cached+1;	} else	    (void) ov_data(firstart, lastart, FALSE);#endif#ifdef USE_NNTP    if (!ov_opened)	setmissingbits();#endif    if (last_cached > lastart) {	toread[ng] += (ART_UNREAD)(last_cached-lastart);	/* ensure getngsize() knows the new maximum */	ngmax[ng] = lastart = last_cached;    }    thread_grow();	/* thread any new articles not yet in the database */    added_articles = 0;    sel_page_sp = 0;    sel_page_app = 0;}/* Update the group's thread info.*/voidthread_grow(){    added_articles = lastart - last_cached;    if (added_articles > 0 && thread_always)	cache_range(last_cached + 1, lastart);    count_subjects(CS_NORM);    if (artptr_list)	sort_articles();    else	sort_subjects();}static voidkill_tmp_arts(data, extra)HASHDATUM *data;int extra;{    register ARTICLE *ap = (ARTICLE*)data->dat_ptr;    if (ap)	free((char*)ap);}voidthread_close(){    curr_artp = artp = Nullart;    init_tree();			/* free any tree lines */    if (msgid_hash) {	hashwalk(msgid_hash, kill_tmp_arts, 0);	hashdestroy(msgid_hash);	msgid_hash = 0;    }    sel_page_sp = 0;    sel_page_app = 0;    sel_last_ap = 0;    sel_last_sp = 0;    selected_only = FALSE;#ifdef USE_OV    ov_close();#endif}ARTICLE *find_article(artnum)ART_NUM artnum;{    if (artp && (artp->flags & AF_TMPMEM) == AF_TMPMEM && !artnum)	return artp;    if (artnum < absfirst || artnum > lastart)	return (artp = Nullart);    return (artp = article_ptr(artnum));}voidtop_article(){    art = lastart+1;    artp = Nullart;    inc_art(selected_only, FALSE);}ARTICLE *first_art(sp)register SUBJECT *sp;{    register ARTICLE *ap = (ThreadedGroup? sp->thread : sp->articles);    if (ap && (ap->flags & AF_MISSING))	ap = next_art(ap);    return ap;}ARTICLE *last_art(sp)register SUBJECT *sp;{    register ARTICLE *ap;    if (!ThreadedGroup) {	ap = sp->articles;	while (ap->subj_next)	    ap = ap->subj_next;	return ap;    }    ap = sp->thread;    if (ap) {	for (;;) {	    if (ap->sibling)		ap = ap->sibling;	    else if (ap->child1)		ap = ap->child1;	    else		break;	}	if (ap->flags & AF_MISSING)	    ap = prev_art(ap);    }    return ap;}/* Bump art/artp to the next article, wrapping from thread to thread.** If sel_flag is TRUE, only stops at selected articles.** If rereading is FALSE, only stops at unread articles.*/voidinc_art(sel_flag, rereading)bool_int sel_flag, rereading;{    register ARTICLE *ap = artp;    int subj_mask = (sel_mode == SM_THREAD? (SF_THREAD|SF_VISIT) : SF_VISIT);    /* Use the explicit article-order if it exists */    if (artptr_list) {	ARTICLE **limit = artptr_list + article_count;	if (!ap)	    artptr = artptr_list-1;	else if (!artptr || *artptr != ap) {	    for (artptr = artptr_list; artptr < limit; artptr++) {		if (*artptr == ap)		    break;	    }	}	do {	    if (++artptr >= limit)		break;	    ap = *artptr;	} while ((!rereading && (ap->flags & AF_READ))	      || (sel_flag && !(ap->flags & AF_SEL)));	if (artptr < limit) {	    artp = *artptr;	    art = article_num(artp);	} else {	    artp = Nullart;	    art = lastart+1;	    artptr = artptr_list;	}	return;    }    /* Use subject- or thread-order when possible */    if (ThreadedGroup || srchahead) {	register SUBJECT *sp;	bool try_this_group_again = !rereading;	if (ap)	    sp = ap->subj;	else	    for (sp = first_subject; sp && (sp->flags&subj_mask) != subj_mask;)		sp = sp->next;	if (!sp)	    goto num_inc;	do {	    if (ap)		ap = next_art(ap);	    else		ap = first_art(sp);	    while (!ap) {		if (try_this_group_again)		    try_this_group_again = FALSE;		else {		    while ((sp = sp->next) != Nullsubj		        && (sp->flags & subj_mask) != subj_mask)			;		    if (!sp)			break;		}		ap = first_art(sp);	    }	} while (ap && ((!rereading && (ap->flags & AF_READ))		     || (sel_flag && !(ap->flags & AF_SEL))));	if ((artp = ap) != Nullart)	    art = article_num(ap);	else	    art = lastart+1;	return;    }    /* Otherwise, just increment through the art numbers */  num_inc:    if (!ap) {	art = firstart-1;	ap = article_ptr(art);    }    do {	if (++art > lastart) {	    ap = Nullart;	    break;	}	ap++;    } while ((!rereading && (ap->flags & AF_READ))	  || (sel_flag && !(ap->flags & AF_SEL))	  || (ap->flags & AF_MISSING));    artp = ap;}/* Bump art/artp to the previous article, wrapping from thread to thread.** If sel_flag is TRUE, only stops at selected articles.** If rereading is FALSE, only stops at unread articles.*/voiddec_art(sel_flag, rereading)bool_int sel_flag, rereading;{    register ARTICLE *ap = artp;    int subj_mask = (sel_mode == SM_THREAD? (SF_THREAD|SF_VISIT) : SF_VISIT);    /* Use the explicit article-order if it exists */    if (artptr_list) {	ARTICLE **limit = artptr_list + article_count;	if (!ap)	    artptr = limit;	else if (!artptr || *artptr != ap) {	    for (artptr = artptr_list; artptr < limit; artptr++) {		if (*artptr == ap)		    break;	    }	}	do {	    if (artptr == artptr_list)		break;	    ap = *--artptr;	} while ((!rereading && (ap->flags & AF_READ))	      || (sel_flag && !(ap->flags & AF_SEL)));	artp = *artptr;	art = article_num(artp);	return;    }    /* Use subject- or thread-order when possible */    if (ThreadedGroup || srchahead) {	register SUBJECT *sp;	if (ap)	    sp = ap->subj;	else	    for (sp = last_subject; sp && (sp->flags&subj_mask) != subj_mask;)		sp = sp->prev;	if (!sp)	    goto num_dec;	do {	    if (ap)		ap = prev_art(ap);	    else		ap = last_art(sp);	    while (!ap) {		while ((sp = sp->prev) != Nullsubj		    && (sp->flags & subj_mask) != subj_mask)		    ;		if (!sp)		    break;		ap = last_art(sp);	    }	} while (ap && ((!rereading && (ap->flags & AF_READ))		     || (sel_flag && !(ap->flags & AF_SEL))));	if ((artp = ap) != Nullart)	    art = article_num(ap);	else	    art = absfirst-1;	return;    }    /* Otherwise, just decrement through the art numbers */  num_dec:    ap = article_ptr(art);    do {	if (--art < absfirst) {	    ap = Nullart;	    break;	}	ap--;    } while ((!rereading && (ap->flags & AF_READ))	  || (sel_flag && !(ap->flags & AF_SEL))	  || (ap->flags & AF_MISSING));    artp = ap;}/* Bump the param to the next article in depth-first order.*/ARTICLE *bump_art(ap)register ARTICLE *ap;{    if (ap->child1)	return ap->child1;    while (!ap->sibling) {	if (!(ap = ap->parent))	    return Nullart;    }    return ap->sibling;}/* Bump the param to the next REAL article.  Uses subject order in a** non-threaded group; honors the breadth_first flag in a threaded one.*/ARTICLE *next_art(ap)register ARTICLE *ap;{try_again:    if (!ThreadedGroup) {	ap = ap->subj_next;	goto done;    }    if (breadth_first) {	if (ap->sibling) {	    ap = ap->sibling;	    goto done;	}	if (ap->parent)	    ap = ap->parent->child1;	else	    ap = ap->subj->thread;    }    do {	if (ap->child1) {	    ap = ap->child1;	    goto done;	}	while (!ap->sibling) {	    if (!(ap = ap->parent))		return Nullart;	}	ap = ap->sibling;    } while (breadth_first);done:    if (ap && (ap->flags & AF_MISSING))	goto try_again;    return ap;}/* Bump the param to the previous REAL article.  Uses subject order in a** non-threaded group.*/ARTICLE *prev_art(ap)register ARTICLE *ap;{    register ARTICLE *initial_ap;try_again:    initial_ap = ap;    if (!ThreadedGroup) {	if ((ap = ap->subj->articles) == initial_ap)	    ap = Nullart;	else	    while (ap->subj_next != initial_ap)		ap = ap->subj_next;	goto done;    }    ap = (ap->parent ? ap->parent->child1 : ap->subj->thread);    if (ap == initial_ap) {	ap = ap->parent;	goto done;    }    while (ap->sibling != initial_ap)	ap = ap->sibling;    while (ap->child1) {	ap = ap->child1;	while (ap->sibling)	    ap = ap->sibling;    }done:    if (ap && (ap->flags & AF_MISSING))	goto try_again;    return ap;}/* Find the next art/artp with the same subject as this one.  Returns** FALSE if no such article exists.*/boolnext_art_with_subj(){    register ARTICLE *ap = artp;    register SUBJECT *sp;    bool try_this_subj_again = TRUE;    if (!ap)	return FALSE;    sp = ap->subj;    do {	ap = ap->subj_next;	if (!ap) {	    if (try_this_subj_again) {		ap = sp->articles;		try_this_subj_again = FALSE;	    } else {		if (!art)		    art = firstart;		return FALSE;	    }	}    } while ((ap->flags & (AF_READ|AF_MISSING))	  || (selected_only && !(ap->flags & AF_SEL)));    artp = ap;    art = article_num(ap);#ifdef ARTSEARCH    srchahead = -1;#endif    return TRUE;}/* Find the previous art/artp with the same subject as this one.  Returns** FALSE if no such article exists.*/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产91精品在线观看| 欧美美女一区二区在线观看| 久久久91精品国产一区二区精品 | 91精品欧美一区二区三区综合在| 亚洲二区视频在线| 日韩视频国产视频| 国产一区二区视频在线播放| 欧美一区二区不卡视频| 国模少妇一区二区三区| 日韩一区在线播放| 欧美精品在线视频| www.日韩在线| 久久99精品国产| 亚洲高清视频在线| 亚洲国产激情av| 久久精品视频在线看| 欧美美女一区二区在线观看| 91丝袜国产在线播放| 国模娜娜一区二区三区| 天堂一区二区在线免费观看| 中文字幕日韩av资源站| 日本一区二区三级电影在线观看| 欧美精品日韩一区| 欧美视频一二三区| 日本精品一区二区三区高清| 国产精品69毛片高清亚洲| 丝袜国产日韩另类美女| 亚洲第一狼人社区| 调教+趴+乳夹+国产+精品| 艳妇臀荡乳欲伦亚洲一区| 亚洲美女一区二区三区| 亚洲精品精品亚洲| 亚洲国产综合91精品麻豆| 亚洲精品国产a| 偷拍与自拍一区| 老司机精品视频一区二区三区| 婷婷亚洲久悠悠色悠在线播放| 一区二区高清在线| 亚洲国产中文字幕在线视频综合| 亚洲国产毛片aaaaa无费看| 亚洲成人免费在线| 久久国产精品72免费观看| 国产成人免费在线视频| 色94色欧美sute亚洲13| 欧美日韩激情在线| 久久人人爽爽爽人久久久| 午夜日韩在线电影| 亚洲h在线观看| 成人综合婷婷国产精品久久蜜臀| caoporn国产精品| 777色狠狠一区二区三区| xfplay精品久久| 亚洲动漫第一页| 成人毛片视频在线观看| 欧美老人xxxx18| 亚洲色图制服诱惑| 国产美女久久久久| 欧美理论片在线| 一级做a爱片久久| 国产成人精品亚洲午夜麻豆| 欧美日韩三级在线| 一区二区三区在线免费观看| 精品在线免费观看| 日韩一级精品视频在线观看| 亚洲人精品午夜| 国产不卡高清在线观看视频| 精品国精品自拍自在线| 午夜精品一区二区三区电影天堂 | 欧美男人的天堂一二区| 亚洲精品网站在线观看| av中文字幕不卡| 国产亲近乱来精品视频| 国产乱一区二区| 久久精品亚洲麻豆av一区二区 | 欧美电影在线免费观看| 亚洲二区视频在线| 欧美精品视频www在线观看| 亚洲欧美国产三级| 91精品福利视频| 亚洲激情自拍偷拍| 972aa.com艺术欧美| 国产精品久久久久久久久久免费看 | 国产精品剧情在线亚洲| av一二三不卡影片| 亚洲一区二区在线免费看| 欧洲生活片亚洲生活在线观看| 综合久久国产九一剧情麻豆| 色香色香欲天天天影视综合网| 午夜一区二区三区在线观看| 欧美一区二区三区色| 成人毛片在线观看| 亚洲自拍都市欧美小说| 精品国免费一区二区三区| 成人激情小说乱人伦| 青青草精品视频| 国产精品进线69影院| 欧美videos大乳护士334| 成人av在线资源网站| 日本午夜一本久久久综合| 中文字幕在线观看不卡视频| 欧美一二三四区在线| 一本到不卡免费一区二区| 国产精品1区2区3区| 亚洲国产精品视频| 亚洲一区二区三区国产| 自拍偷在线精品自拍偷无码专区 | 欧美性视频一区二区三区| 国产成a人无v码亚洲福利| 国产在线视频不卡二| 美腿丝袜亚洲色图| 日韩国产高清影视| 亚洲成在人线在线播放| 一区二区三区高清| 亚洲一区二区三区激情| 亚洲女厕所小便bbb| 亚洲卡通动漫在线| 一区二区三区在线视频观看 | 色噜噜久久综合| 91免费版pro下载短视频| 97久久超碰国产精品| 成人黄色网址在线观看| 色嗨嗨av一区二区三区| 欧美视频在线不卡| 91精品国产黑色紧身裤美女| 精品国产成人在线影院| 国产精品乱人伦| 亚洲女人的天堂| 另类综合日韩欧美亚洲| 国产精品99久久久久久宅男| 91在线观看高清| 欧美精品国产精品| 欧美国产一区二区在线观看| 最新热久久免费视频| 日韩综合小视频| 国产91在线观看| 欧美日韩中文字幕一区| 精品91自产拍在线观看一区| 亚洲欧洲另类国产综合| 亚洲成人动漫av| av在线不卡网| 久久久久国产精品麻豆ai换脸 | 久久成人免费日本黄色| 99视频精品在线| 久久先锋影音av| 美女任你摸久久| 欧美日韩精品久久久| 亚洲美女免费在线| jiyouzz国产精品久久| 国产欧美综合在线观看第十页| 日韩经典一区二区| 欧美日本在线播放| 亚洲成人福利片| 欧美日韩一区二区不卡| 一区二区三区在线免费播放| 成人综合婷婷国产精品久久| 国产日韩欧美一区二区三区乱码 | 免费观看日韩av| 91精品蜜臀在线一区尤物| 亚洲图片欧美色图| 欧美日韩国产免费| 一区二区三区国产精华| 色综合久久久久网| 亚洲成人一区在线| 欧美二区乱c少妇| 久久99精品国产91久久来源| 精品国产91洋老外米糕| 国产精品中文有码| 国产精品乱人伦一区二区| 99精品久久久久久| 一区二区三区精密机械公司| 制服丝袜在线91| 国产馆精品极品| 夜夜嗨av一区二区三区| 日韩欧美亚洲另类制服综合在线| 国产麻豆精品在线| 亚洲区小说区图片区qvod| 欧美老肥妇做.爰bbww| 国产成人免费在线视频| 亚洲国产视频在线| 国产日韩欧美精品综合| 欧美裸体一区二区三区| 国产成人在线观看免费网站| 亚洲自拍都市欧美小说| 国产日韩欧美综合在线| 91麻豆精品国产91久久久| 成人av网站免费| 国模娜娜一区二区三区| 天天操天天干天天综合网| 国产精品免费人成网站| 久久香蕉国产线看观看99| 欧美日本在线一区| 欧美视频三区在线播放| 色婷婷综合久色| 国产精品夜夜嗨| 国产精品88888| 成人午夜短视频| 成人激情电影免费在线观看| 成人少妇影院yyyy| 成人午夜又粗又硬又大| 国产91清纯白嫩初高中在线观看|