bit_reset_chain (Bit_Chain *dat)
{
  unsigned long pos = dat->byte;
  dat->byte = 0;
  if (pos < dat->size) // not already overflowed
    dat->chain += pos;
  if (dat->size > 0)
    dat->size -= pos;
}
bit_reset_chain (Bit_Chain *dat)
{
  unsigned long pos = dat->byte;
  dat->byte = 0;
  if (pos < dat->size)  
    dat->chain += pos;
  if (dat->size > 0)
    dat->size -= pos;
}