# endif
#endif
+#include <sys/time.h>
+
#include <sys/stat.h>
/* For TIOCGWINSZ and friends: */
-#ifdef HAVE_SYS_IOCTL_H
-# include <sys/ioctl.h>
-#endif
+#include <sys/ioctl.h>
#ifdef HAVE_TERMIOS_H
# include <termios.h>
#endif
ringpos = (ringpos + 1) % RING_SIZE;
return buf;
}
+
+/* Converts the byte to bits format if --bits option is enabled
+ */
+wgint
+convert_to_bits (wgint num)
+{
+ if (opt.bits_fmt)
+ return num * 8;
+ return num;
+}
+
\f
/* Determine the width of the terminal we're running on. If that's
not possible, return 0. */