dpkg improvements, use full package struct, avoid extracting to tmp dir, rename variable.
[oweals/busybox.git] / wget.c
diff --git a/wget.c b/wget.c
index 79f7e61cfc8c43bdd2683a50249b87c228f6d317..1c7c3b545c1ac7924e9152771135246727b35b98 100644 (file)
--- a/wget.c
+++ b/wget.c
@@ -141,7 +141,7 @@ int wget_main(int argc, char **argv)
                         * this gets interpreted as the auto-gen output filename
                         * case below  - tausq@debian.org
                         */
-                       fname_out = (strcmp(optarg, "-") == 0 ? (char *)1 : optarg);
+                       fname_out = optarg;
                        break;
                default:
                        show_usage();
@@ -188,10 +188,10 @@ int wget_main(int argc, char **argv)
        /*
         * Open the output file stream.
         */
-       if (fname_out != (char *)1) {
-               output = xfopen( fname_out, (do_continue ? "a" : "w") );
-       } else {
+       if (strcmp(fname_out, "-") == 0) {
                output = stdout;
+       } else {
+               output = xfopen(fname_out, (do_continue ? "a" : "w"));
        }
 
        /*
@@ -424,7 +424,10 @@ read_response:             if (fgets(buf, sizeof(buf), sfp) == NULL)
                        error_msg_and_die("ftp error: %s", buf+4);
                ftpcmd("QUIT", NULL, sfp, buf);
        }
-       printf("\n");
+#ifdef BB_FEATURE_WGET_STATUSBAR
+       if (quiet_flag==FALSE)
+               putc('\n', stderr);
+#endif
        exit(EXIT_SUCCESS);
 }
 
@@ -732,7 +735,7 @@ progressmeter(int flag)
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *     $Id: wget.c,v 1.32 2001/04/10 18:17:05 andersen Exp $
+ *     $Id: wget.c,v 1.35 2001/04/11 20:11:51 kraai Exp $
  */