/* Invert byte order within each 16-bits of an array.  */
TwoByteSwap(unsigned char *buf, size_t nbytes)
/* Invert byte order within each 16-bits of an array.  */
TwoByteSwap(unsigned char *buf, size_t nbytes)
{
    for ( ; nbytes >= 2; nbytes -= 2, buf += 2 )
    {
      unsigned char  c;
      c      = buf[0];
      buf[0] = buf[1];
      buf[1] = c;
    }
  }