Annotation of 43BSDTahoe/new/rn/bits.h, revision 1.1.1.1

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

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.