|
|
1.1 ! root 1: /* $Header: bits.h,v 4.3 85/05/01 11:36:39 lwall Exp $ ! 2: * ! 3: * $Log: bits.h,v $ ! 4: * Revision 4.3 85/05/01 11:36:39 lwall ! 5: * Baseline for release with 4.3bsd. ! 6: * ! 7: */ ! 8: ! 9: EXT char *ctlarea INIT(Nullch); /* one bit for each article in current newsgroup */ ! 10: /* with the following interpretation: */ ! 11: /* 0 => unread */ ! 12: /* 1 => read */ ! 13: ! 14: /* if subscripting is faster than shifting on your machine, define this */ ! 15: #undef USESUBSCRIPT ! 16: #ifdef USESUBSCRIPT ! 17: EXT char powerof2[] INIT({1,2,4,8,16,32,64,128}); ! 18: #define pow2(x) powerof2[x] ! 19: #else ! 20: #define pow2(x) (1 << (x)) ! 21: #endif ! 22: ! 23: #ifdef lint ! 24: EXT bool nonesuch INIT(FALSE); ! 25: #define ctl_set(a) ! 26: #define ctl_clear(a) ! 27: #define ctl_read(a) nonesuch ! 28: #define was_read(a) nonesuch ! 29: #else ! 30: #define ctl_set(a) (ctlarea[(OFFSET(a)) / BITSPERBYTE] |= pow2((OFFSET(a)) % BITSPERBYTE)) ! 31: #define ctl_clear(a) (ctlarea[(OFFSET(a)) / BITSPERBYTE] &= ~pow2((OFFSET(a)) % BITSPERBYTE)) ! 32: #define ctl_read(a) ((ctlarea[(OFFSET(a)) / BITSPERBYTE] & pow2((OFFSET(a)) % BITSPERBYTE)) != 0) ! 33: ! 34: #define was_read(a) ((a)<firstart || ctl_read(a)) ! 35: #endif lint ! 36: ! 37: EXT ART_NUM absfirst INIT(0); /* 1st real article in current newsgroup */ ! 38: EXT ART_NUM firstart INIT(0); /* minimum unread article number in newsgroup */ ! 39: EXT ART_NUM lastart INIT(0); /* maximum article number in newsgroup */ ! 40: ! 41: #ifdef DELAYMARK ! 42: EXT FILE *dmfp INIT(Nullfp); ! 43: EXT char *dmname INIT(Nullch); ! 44: EXT int dmcount INIT(0); ! 45: #endif ! 46: ! 47: void bits_init(); ! 48: void checkpoint_rc(); ! 49: void restore_ng(); ! 50: void onemore(); ! 51: void oneless(); ! 52: void unmark_as_read(); ! 53: void delay_unmark(); ! 54: void mark_as_read(); ! 55: void check_first(); ! 56: #ifdef DELAYMARK ! 57: void yankback(); ! 58: #endif ! 59: int chase_xrefs(); ! 60: int initctl(); ! 61: void grow_ctl();
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.