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

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

?? rthread.c

?? 早期freebsd實(shí)現(xiàn)
?? C
?? 第 1 頁 / 共 3 頁
字號(hào):
/* $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.*/

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美撒尿777hd撒尿| 国产91精品入口| 中文字幕亚洲欧美在线不卡| 欧美一区日本一区韩国一区| av一区二区不卡| 国内精品嫩模私拍在线| 亚洲国产婷婷综合在线精品| 欧美激情中文不卡| 精品国产一区二区三区忘忧草| 91色乱码一区二区三区| 成人白浆超碰人人人人| 韩国一区二区视频| 久久精品国产精品亚洲红杏 | 国产精品一区在线| 麻豆精品新av中文字幕| 亚洲成av人片观看| 香港成人在线视频| 日本欧洲一区二区| 青青青伊人色综合久久| 日日骚欧美日韩| 日韩中文字幕亚洲一区二区va在线 | 国产不卡在线播放| 国产成人精品午夜视频免费| 岛国精品在线观看| 色天天综合久久久久综合片| 91麻豆国产福利精品| 色综合天天狠狠| 精品视频一区三区九区| 51精品视频一区二区三区| 欧美一区在线视频| 久久蜜桃一区二区| 日韩毛片精品高清免费| 亚洲综合一区在线| 九九精品视频在线看| av在线不卡观看免费观看| 欧美亚洲另类激情小说| 亚洲精品在线免费播放| 中文av一区二区| 午夜精品一区二区三区免费视频| 乱一区二区av| 99re6这里只有精品视频在线观看| 色婷婷国产精品| 久久综合狠狠综合| 亚洲欧美aⅴ...| 久热成人在线视频| 91色porny| 久久你懂得1024| 图片区小说区国产精品视频| 久久精品av麻豆的观看方式| 国产经典欧美精品| 欧美系列在线观看| 欧美国产精品一区二区| 亚洲成人高清在线| 99久久夜色精品国产网站| 日韩欧美第一区| 亚洲成在线观看| 欧美在线观看一二区| 国产亚洲精品久| 日日夜夜精品视频天天综合网| eeuss鲁一区二区三区| 日韩一区二区中文字幕| 亚洲一区二区精品视频| 成人av在线一区二区三区| 337p日本欧洲亚洲大胆色噜噜| 五月婷婷激情综合网| 91色porny| 亚洲一二三四在线| 色婷婷久久一区二区三区麻豆| 中文字幕不卡在线播放| 国产成人久久精品77777最新版本| 欧美高清精品3d| 五月开心婷婷久久| 欧美日本韩国一区二区三区视频| 亚洲精品日韩一| 欧美综合在线视频| 亚洲一级电影视频| 777午夜精品免费视频| 免费视频最近日韩| 久久免费的精品国产v∧| 丁香激情综合国产| 伊人开心综合网| 欧美乱熟臀69xxxxxx| 国产最新精品免费| 国产精品久久久一本精品| 99久精品国产| 亚洲成在线观看| 亚洲精品一区二区三区在线观看| 久久精品国产亚洲高清剧情介绍 | 欧美精品777| 韩国一区二区三区| 成人欧美一区二区三区| 色婷婷久久综合| 免费成人在线播放| 国产精品国产成人国产三级 | 免费精品视频在线| 亚洲国产高清在线观看视频| 91传媒视频在线播放| 激情久久五月天| 亚洲激情一二三区| 久久尤物电影视频在线观看| 99久久综合狠狠综合久久| 免费成人美女在线观看.| 日韩一区在线免费观看| 欧美videossexotv100| 色哟哟国产精品| 国产成人精品www牛牛影视| 国产精品不卡视频| 欧美不卡一二三| 欧美日韩精品一区二区在线播放| 成人精品小蝌蚪| 国产一区二区精品在线观看| 天天av天天翘天天综合网色鬼国产| 精品久久人人做人人爱| 91精品国产高清一区二区三区蜜臀| 97久久精品人人澡人人爽| 国产精品自拍一区| 久久精品国产第一区二区三区| 婷婷国产v国产偷v亚洲高清| 亚洲一区在线观看免费| 亚洲视频精选在线| 亚洲男人的天堂在线aⅴ视频 | 免费观看在线色综合| 亚洲成人在线网站| 首页综合国产亚洲丝袜| 午夜视频在线观看一区二区 | 久久久久亚洲综合| 欧美xxxxxxxx| 精品国产91九色蝌蚪| 国产午夜精品一区二区三区视频| 久久女同精品一区二区| 中文子幕无线码一区tr| 国产亚洲污的网站| 中文字幕 久热精品 视频在线| 国产亚洲欧美色| 亚洲美女视频在线观看| 一区二区欧美在线观看| 天堂在线亚洲视频| 久久国产尿小便嘘嘘尿| 国产91丝袜在线观看| 91激情五月电影| 欧美夫妻性生活| 久久精品一区二区三区不卡 | 亚洲精品成人悠悠色影视| 亚洲欧美在线观看| 日本v片在线高清不卡在线观看| 国产一区中文字幕| 色综合久久88色综合天天6| 欧美日韩另类一区| 国产欧美日本一区视频| 亚洲va国产va欧美va观看| 国产福利一区二区三区| 欧美中文一区二区三区| 国产日韩欧美亚洲| 亚洲不卡在线观看| 91视频国产资源| 久久久激情视频| 午夜视频一区二区三区| av福利精品导航| 精品日韩一区二区三区免费视频| 亚洲欧美激情视频在线观看一区二区三区 | 色综合久久中文综合久久牛| 日韩欧美一区电影| 亚洲国产精品一区二区久久 | 精品综合久久久久久8888| 91婷婷韩国欧美一区二区| 久久亚洲欧美国产精品乐播| 亚洲影院在线观看| 99精品一区二区| 中文字幕一区二区三区在线观看| 久久99久国产精品黄毛片色诱| 欧美日韩亚洲综合在线| 一区二区三区91| 欧美三级韩国三级日本三斤| 亚洲日本va午夜在线电影| 国产91精品露脸国语对白| 欧美videos大乳护士334| 精品一区二区精品| 精品国产一二三| 国内一区二区在线| 精品久久久久久综合日本欧美| 日产国产高清一区二区三区| 欧美一卡2卡3卡4卡| 国产精品香蕉一区二区三区| 久久久久久99精品| www.欧美日韩| 亚洲欧洲av在线| 欧美三级电影精品| 精品夜夜嗨av一区二区三区| 久久久亚洲精品一区二区三区 | 99精品偷自拍| 午夜久久久久久久久久一区二区| 日韩一二三四区| 久久爱另类一区二区小说| 国产精品网站在线| 欧美在线免费视屏| 久草精品在线观看| 亚洲欧美日韩电影| 精品国产乱子伦一区| 波多野结衣中文一区| 亚洲欧美日韩在线不卡|