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
Defined macros
pow2
defined in line
20; used 3 times
was_read
defined in line
34; 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
99,
107,
529,
559
- in /usr/src/new/rn/cheat.c line
87
- in /usr/src/new/rn/intrp.c line
788
- in /usr/src/new/rn/ng.c line
288,
294,
503,
596,
791,
809,
844
- in /usr/src/new/rn/ngstuff.c line
232,
241
Usage of this include