X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fretr.c;h=75ae3252d1911a1ea97c8dff19701fcefdcac1f7;hp=398bc52cb0f79e503a56290a853b80abed88cf50;hb=4d352013ac8b822fd334115928527824093f83fe;hpb=a3b678e416f5f6e4c926831b731f6bb38c6c475d diff --git a/src/retr.c b/src/retr.c index 398bc52c..75ae3252 100644 --- a/src/retr.c +++ b/src/retr.c @@ -50,7 +50,6 @@ extern int errno; /* See the comment in gethttp() why this is needed. */ int global_download_count; -void logflush PARAMS ((void)); /* Flags for show_progress(). */ enum spflags { SP_NONE, SP_INIT, SP_FINISH }; @@ -198,7 +197,8 @@ show_progress (long res, long expected, enum spflags flags) } /* Temporarily disable flushing. */ - opt.no_flush = 1; + log_set_flush (0); + /* init set means initialization. If res is set, it also means that the retrieval is *not* done from the beginning. The part that was already retrieved is not shown again. */ @@ -255,11 +255,10 @@ show_progress (long res, long expected, enum spflags flags) logprintf (LOG_VERBOSE, "\n%5ldK", nrow * line_bytes / 1024); } } + /* Reenable flushing. */ - opt.no_flush = 0; - if (any_output) - /* Force flush. */ - logflush (); + log_set_flush (1); + return any_output; }