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();

Defined variables

ctlarea defined in line 15; used 8 times
dmcount defined in line 51; used 9 times
dmname defined in line 50; used 6 times
powerof2 defined in line 23; used 1 times
  • in line 24

Defined macros

ctl_clear defined in line 37; used 2 times
ctl_read defined in line 38; used 4 times
ctl_set defined in line 36; used 4 times
pow2 defined in line 26; used 3 times

Usage of this include

Last modified: 1987-03-16
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2251
Valid CSS Valid XHTML 1.0 Strict