tin  2.4.4
About: TIN is a threaded NNTP and spool based UseNet newsreader.
  Fossies Dox: tin-2.4.4.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

newsrc.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define NBITS   8
 
#define NMAXBIT   7
 
#define NBITPOS   3
 
#define NBITSON   0xff
 
#define NBITNEG1   0xfe
 
#define NOFFSET(b)   ((b) >> NBITPOS)
 
#define NBITIDX(b)   ((b) & NMAXBIT)
 
#define NBITMASK(beg, end)   (unsigned char) ~(((1 << (((NMAXBIT - beg) - (NMAXBIT - end)) + 1)) - 1) << (NMAXBIT - end))
 
#define NTEST(n, b)   (n[NOFFSET(b)] & (1 << NBITIDX(b)))
 
#define NSETBLK1(n, i)   (memset(n, NBITSON, (size_t) NOFFSET(i) + 1))
 
#define NSETBLK0(n, i)   (memset(n, 0, (size_t) NOFFSET(i) + 1))
 
#define NSET1(n, b)   (n[NOFFSET(b)] |= (1 << NBITIDX(b)))
 
#define NSET0(n, b)   (n[NOFFSET(b)] &= ~(1 << NBITIDX(b)))
 
#define BIT_OR(n, b, mask)   n[NOFFSET(b)] |= mask
 
#define BIT_AND(n, b, mask)   n[NOFFSET(b)] &= mask
 
#define BITS_TO_BYTES(n)   ((size_t) ((n + NBITS - 1) / NBITS))
 

Macro Definition Documentation

◆ BIT_AND

#define BIT_AND (   n,
  b,
  mask 
)    n[NOFFSET(b)] &= mask

Definition at line 138 of file newsrc.h.

◆ BIT_OR

#define BIT_OR (   n,
  b,
  mask 
)    n[NOFFSET(b)] |= mask

Definition at line 137 of file newsrc.h.

◆ BITS_TO_BYTES

#define BITS_TO_BYTES (   n)    ((size_t) ((n + NBITS - 1) / NBITS))

Definition at line 141 of file newsrc.h.

◆ NBITIDX

#define NBITIDX (   b)    ((b) & NMAXBIT)

Definition at line 118 of file newsrc.h.

◆ NBITMASK

#define NBITMASK (   beg,
  end 
)    (unsigned char) ~(((1 << (((NMAXBIT - beg) - (NMAXBIT - end)) + 1)) - 1) << (NMAXBIT - end))

Definition at line 120 of file newsrc.h.

◆ NBITNEG1

#define NBITNEG1   0xfe

Definition at line 116 of file newsrc.h.

◆ NBITPOS

#define NBITPOS   3

Definition at line 114 of file newsrc.h.

◆ NBITS

#define NBITS   8

Definition at line 112 of file newsrc.h.

◆ NBITSON

#define NBITSON   0xff

Definition at line 115 of file newsrc.h.

◆ NMAXBIT

#define NMAXBIT   7

Definition at line 113 of file newsrc.h.

◆ NOFFSET

#define NOFFSET (   b)    ((b) >> NBITPOS)

Definition at line 117 of file newsrc.h.

◆ NSET0

#define NSET0 (   n,
 
)    (n[NOFFSET(b)] &= ~(1 << NBITIDX(b)))

Definition at line 136 of file newsrc.h.

◆ NSET1

#define NSET1 (   n,
 
)    (n[NOFFSET(b)] |= (1 << NBITIDX(b)))

Definition at line 135 of file newsrc.h.

◆ NSETBLK0

#define NSETBLK0 (   n,
 
)    (memset(n, 0, (size_t) NOFFSET(i) + 1))

Definition at line 125 of file newsrc.h.

◆ NSETBLK1

#define NSETBLK1 (   n,
 
)    (memset(n, NBITSON, (size_t) NOFFSET(i) + 1))

Definition at line 124 of file newsrc.h.

◆ NTEST

#define NTEST (   n,
 
)    (n[NOFFSET(b)] & (1 << NBITIDX(b)))

Definition at line 122 of file newsrc.h.