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

Defined variables

ctlarea defined in line 9; used 8 times
dmname defined in line 43; used 6 times
powerof2 defined in line 17; used 1 times
  • in line 18

Defined macros

ctl_clear defined in line 31; used 2 times
ctl_read defined in line 32; used 4 times
ctl_set defined in line 30; used 5 times
pow2 defined in line 20; used 3 times

Usage of this include

Last modified: 1986-03-21
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1095
Valid CSS Valid XHTML 1.0 Strict