--- src/Configure +++ src/Configure 1995/10/09 16:05:29 @@ -1089,6 +1089,7 @@ : The metaconfig authors would also appreciate a copy... $test -f /vmunix && $test -f /usr/convex/spucmd && dflt="$dflt convexos" $test -f /irix && dflt="$dflt sgi" + $test -d /usr/src/linux && dflt="$dflt linux" $test -f /xenix && dflt="$dflt sco_xenix" $test -f /dynix && dflt="$dflt dynix" $test -f /dnix && dflt="$dflt dnix" @@ -2676,19 +2677,19 @@ : where do we get termlib routines from echo " " -xxx=`./loc libcurses.a x $libpth` +xxx=`./loc libncurses.a x $libpth` case "$xxx" in /*) ar t $xxx >grimble if $contains tputs.o grimble >/dev/null 2>&1; then - termlib='-lcurses' + termlib='-lncurses' d_havetlib="$define" echo "Terminfo library found." >&4 elif $test "x`$uname 2>/dev/null`" = xAIX; then # Ok, do the AIX shr.o fun thing /usr/ccs/bin/nm -en $xxx 2>/dev/null >grimble if $contains '^tputs .*|extern|' grimble >/dev/null 2>&1; then - termlib='-lcurses' + termlib='-lncurses' d_havetlib="$define" echo "AIX Terminfo library found." >&4 else --- src/hints/linux.sh +++ src/hints/linux.sh 1995/10/09 16:07:24 @@ -0,0 +1,18 @@ +d_nntp=define +d_xdata=define +servername=/etc/nntpserver +d_portable=define +d_mimeshow=define +acttimes=define +d_berknames=define +d_getpwent=define +libs=none +optimize='-DSCORE_THREADS -O3 -fno-strength-reduce -pipe' +ldflags='-Wl,-warn-common' +bin=/usr/bin +privlib=/usr/lib/trn +mansrc=/usr/man/man1 +mailfile='/var/spool/mail/%L' +pager=/usr/bin/less +prefshell=/bin/bash +overviewdir=/var/spool/news/over.view --- src/rcln.c +++ src/rcln.c 1995/10/09 16:05:29 @@ -81,7 +81,7 @@ register char *s, *t, *maxt = Nullch; ART_NUM min = 0, max = -1, lastnum = 0; char *mbuf; - bool morenum; + bool_int morenum; if (!artnum) return 0; --- src/rt-page.c +++ src/rt-page.c 1995/10/09 16:05:29 @@ -83,6 +83,11 @@ case 'g': sel_sort = SS_GROUPS; break; +#ifdef SCORE_THREADS + case 'x': + sel_sort = SS_SCORE; + break; +#endif default: return FALSE; } @@ -147,6 +152,11 @@ case SS_GROUPS: sel_sort_string = "SubjDate"; break; +#ifdef SCORE_THREADS + case SS_SCORE: + sel_sort_string = "score"; + break; +#endif } } --- src/rt-select.c +++ src/rt-select.c 1995/10/09 16:05:29 @@ -752,7 +752,11 @@ in_char("Order by Date, Subject, Author, Number, subject-date Groups?", 'q', "dsangDSANG"); else +#ifndef SCORE_THREADS in_char("Order by Date, Subject, or Count?", 'q', "dscDSC"); +#else + in_char("Order by Date, Subject, Score, or Count?", 'q',"dsxcDSXC"); +#endif #ifdef VERIFY printcmd(); #endif --- src/rt-select.h +++ src/rt-select.h 1995/10/09 16:05:29 @@ -23,6 +23,9 @@ #define SS_COUNT 3 #define SS_NUMBER 4 #define SS_GROUPS 5 +#ifdef SCORE_THREADS +#define SS_SCORE 6 +#endif EXT char *sel_sort_string; EXT int sel_direction INIT(1); EXT bool sel_exclusive INIT(FALSE); --- src/rthread.c +++ src/rthread.c 1995/10/09 16:05:29 @@ -1438,6 +1438,43 @@ return threadorder_date(spp1, spp2); } +#ifdef SCORE_THREADS +int +get_subj_score(sp,score) +register SUBJECT *sp; +register int score; +{ + register ARTICLE *ap; + for (ap = sp->articles; ap; ap = ap->subj_next) { + register int score1 = sc_score_art(article_num(ap),TRUE); + if (score < score1) (score = score1); + } + return score; +} + +int +threadorder_score(spp1, spp2) +SUBJECT **spp1; +SUBJECT **spp2; +{ +/* This is really bad, but I don't want to think about that now -- AW */ +#define LOWSCORE (-999999) + register int score1 = get_subj_score(*spp1,LOWSCORE); + register int score2 = get_subj_score(*spp2,LOWSCORE); + if ((*spp1)->thread != (*spp2)->thread) { + register SUBJECT *sp; + for (sp = (*spp1)->thread_link; sp != *spp1; sp = sp->thread_link) + score1=get_subj_score(sp,score1); + for (sp = (*spp2)->thread_link; sp != *spp2; sp = sp->thread_link) + score2=get_subj_score(sp,score2); + } + if (score1 != score2) + return (score2 - score1) * sel_direction; + return threadorder_date(spp1, spp2); +} + +#endif + /* Sort the subjects according to the chosen order. */ void @@ -1466,6 +1503,11 @@ sort_procedure = (sel_mode == SM_THREAD? threadorder_count : subjorder_count); break; +#ifdef SCORE_THREADS + case SS_SCORE: + sort_procedure = (sel_mode == SM_THREAD? + threadorder_score : subjorder_date); +#endif } subj_list = (SUBJECT**)safemalloc(subject_count * sizeof (SUBJECT*)); --- src/scan.h +++ src/scan.h 1995/10/09 16:05:29 @@ -63,44 +63,44 @@ /* the current values */ -long *s_ent_sort; /* sorted list of entries in the context */ -long s_ent_sort_max; /* maximum index of sorted array */ -long s_ent_sorted_max; /* maximum index *that is sorted* */ -long *s_ent_index; /* indexes into ent_sorted */ -long s_ent_index_max; /* maximum entry number added */ +EXT long *s_ent_sort; /* sorted list of entries in the context */ +EXT long s_ent_sort_max; /* maximum index of sorted array */ +EXT long s_ent_sorted_max; /* maximum index *that is sorted* */ +EXT long *s_ent_index; /* indexes into ent_sorted */ +EXT long s_ent_index_max; /* maximum entry number added */ -int s_page_size; /* number of entries allocated for page */ +EXT int s_page_size; /* number of entries allocated for page */ /* (usually fixed, > max screen lines) */ -PAGE_ENT *page_ents; /* array of entries on page */ +EXT PAGE_ENT *page_ents; /* array of entries on page */ /* -1 means not initialized for top and bottom entry */ -long s_top_ent; /* top entry on page */ -long s_bot_ent; /* bottom entry (note change) */ -bool s_refill; /* does the page need refilling? */ +EXT long s_top_ent; /* top entry on page */ +EXT long s_bot_ent; /* bottom entry (note change) */ +EXT bool s_refill; /* does the page need refilling? */ /* refresh entries */ -bool s_ref_all; /* refresh all on page */ -bool s_ref_top; /* top status bar */ -bool s_ref_bot; /* bottom status bar */ +EXT bool s_ref_all; /* refresh all on page */ +EXT bool s_ref_top; /* top status bar */ +EXT bool s_ref_bot; /* bottom status bar */ /* -1 for the next two entries means don't refresh */ -short s_ref_status; /* line to start refreshing status from */ -short s_ref_desc; /* line to start refreshing descript. from */ +EXT short s_ref_status; /* line to start refreshing status from */ +EXT short s_ref_desc; /* line to start refreshing descript. from */ /* screen sizes */ -short s_top_lines; /* lines for top status bar */ -short s_bot_lines; /* lines for bottom status bar */ -short s_status_cols; /* characters for status column */ -short s_cursor_cols; /* characters for cursor column */ -short s_desc_cols; /* characters for description column */ +EXT short s_top_lines; /* lines for top status bar */ +EXT short s_bot_lines; /* lines for bottom status bar */ +EXT short s_status_cols; /* characters for status column */ +EXT short s_cursor_cols; /* characters for cursor column */ +EXT short s_desc_cols; /* characters for description column */ /* pointer info */ -short s_ptr_page_line; /* page_ent index */ -long s_flags; /* misc. flags */ +EXT short s_ptr_page_line; /* page_ent index */ +EXT long s_flags; /* misc. flags */ -int s_num_contexts INIT(0); +EXT int s_num_contexts INIT(0); /* array of context structures */ -SCONTEXT *s_contexts INIT((SCONTEXT*)NULL); +EXT SCONTEXT *s_contexts INIT((SCONTEXT*)NULL); /* current context number */ -int s_cur_context INIT(0); +EXT int s_cur_context INIT(0); /* current context type (for fast switching) */ -int s_cur_type; +EXT int s_cur_type; void s_init_context _((int,int)); int s_new_context _((int)); --- src/score.h +++ src/score.h 1995/10/09 16:05:29 @@ -24,11 +24,11 @@ */ EXT char *scoreflags; -bool kill_thresh_active INIT(FALSE); -int kill_thresh INIT(LOWSCORE); /* KILL articles at or below this score */ +EXT bool kill_thresh_active INIT(FALSE); +EXT int kill_thresh INIT(LOWSCORE); /* KILL articles at or below this score */ -ART_NUM sc_fill_max; /* maximum art# scored by fill-routine */ -bool sc_fill_read INIT(FALSE); /* TRUE if also scoring read arts... */ +EXT ART_NUM sc_fill_max; /* maximum art# scored by fill-routine */ +EXT bool sc_fill_read INIT(FALSE); /* TRUE if also scoring read arts... */ /* has score been initialized (are we "in" scoring?) */ EXT bool sc_initialized INIT(FALSE); @@ -37,7 +37,7 @@ EXT bool sc_scoring INIT(FALSE); /* changes order of sorting (artnum comparison) when scores are equal */ -bool score_newfirst INIT(FALSE); +EXT bool score_newfirst INIT(FALSE); #ifdef NICEBG EXT bool sc_mode_nicebg INIT(TRUE);