# 2.11BSD#431 - /usr/src/new/rn/bits.h

##### Variables

    ctlarea           X
    dmcount           X
    dmname            X
    powerof2          X

##### Macros

    ctl_clear         X
    ctl_read          X
    ctl_set           X
    pow2              X
    was_read          X

       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

- in line 36-38(3)
- in /usr/src/new/rn/bits.c line 498, 537, 608(2)
- in /usr/src/new/rn/ng.c line 513

dmcount defined in line 51; used 9 times

- in /usr/src/new/rn/art.c line 152-155(3)
- in /usr/src/new/rn/bits.c line 230, 274-275(2), 296, 487
- in /usr/src/new/rn/intrp.c line 617

dmname defined in line 50; used 6 times

- in /usr/src/new/rn/bits.c line 51, 223-225(2), 278, 289-292(2)

powerof2 defined in line 23; used 1 times

- in line 24

#### Defined macros

ctl_clear defined in line 37; used 2 times

- in /usr/src/new/rn/bits.c line 175, 613

ctl_read defined in line 38; used 4 times

- in line 40
- in /usr/src/new/rn/bits.c line 174, 192
- in /usr/src/new/rn/ng.c line 271

ctl_set defined in line 36; used 4 times

- in /usr/src/new/rn/bits.c line 193, 259, 561-565(2)

pow2 defined in line 26; used 3 times

- in line 36-38(3)

was_read defined in line 40; used 17 times

- in /usr/src/new/rn/art.c line 150
- in /usr/src/new/rn/artsrch.c line 225
- in /usr/src/new/rn/bits.c line 112, 120, 542, 572
- in /usr/src/new/rn/cheat.c line 87
- in /usr/src/new/rn/intrp.c line 748
- in /usr/src/new/rn/ng.c line 315, 321, 557, 650, 845, 863, 898
- in /usr/src/new/rn/ngstuff.c line 232, 241

#### Usage of this include

bits.h used 11 times

- in /usr/src/new/rn/art.c line 34
- in /usr/src/new/rn/artsrch.c line 15
- in /usr/src/new/rn/bits.c line 37
- in /usr/src/new/rn/cheat.c line 14
- in /usr/src/new/rn/final.c line 15
- in /usr/src/new/rn/head.c line 18
- in /usr/src/new/rn/init.c line 38
- in /usr/src/new/rn/intrp.c line 35
- in /usr/src/new/rn/kfile.c line 24
- in /usr/src/new/rn/ng.c line 40
- in /usr/src/new/rn/ngstuff.c line 20

Last modified: 1987-03-16 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 487 |