]> sjero.net Git - wget/blobdiff - src/utils.c
activate itimer support.
[wget] / src / utils.c
index 509088b644a6566da06cdedb7818974c0f8c6c75..4188ced7d2ab409097b3d4a60650209255732674 100644 (file)
@@ -59,12 +59,12 @@ as that of the covered work.  */
 # 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
@@ -1825,6 +1825,17 @@ number_to_static_string (wgint number)
   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.  */