]> sjero.net Git - wget/blobdiff - src/main.c
Gisle's MS-DOS support
[wget] / src / main.c
index 4f0c123c5bd1879d26cad1865c899f4002a6e019..ea3088c2e95782af3140fca915dc52da835bbcc7 100644 (file)
@@ -244,6 +244,9 @@ static struct cmdline_option option_data[] =
     { "version", 'V', OPT_FUNCALL, (void *) print_version, no_argument },
     { "wait", 'w', OPT_VALUE, "wait", -1 },
     { "waitretry", 0, OPT_VALUE, "waitretry", -1 },
+#ifdef MSDOS
+    { "wdebug", 0, OPT_BOOLEAN, "wdebug", -1 },
+#endif
   };
 
 #undef WHEN_DEBUG
@@ -386,6 +389,10 @@ Logging and input file:\n"),
 #ifdef ENABLE_DEBUG
     N_("\
   -d,  --debug               print lots of debugging information.\n"),
+#endif
+#ifdef MSDOS
+    N_("\
+       --wdebug              print Watt-32 debug output.\n"),
 #endif
     N_("\
   -q,  --quiet               quiet (no output).\n"),
@@ -680,6 +687,7 @@ There is NO WARRANTY, to the extent permitted by law.\n"), stdout);
   exit (0);
 }
 \f
+
 int
 main (int argc, char *const *argv)
 {
@@ -891,8 +899,14 @@ Can't timestamp and not clobber old files at the same time.\n"));
       exit (1);
     }
 
+#ifdef MSDOS
+  if (opt.wdebug)
+     dbug_init();
+  sock_init();
+#else
   if (opt.background)
     fork_to_background ();
+#endif
 
   /* Initialize progress.  Have to do this after the options are
      processed so we know where the log file is.  */