Write progress meter to stderr instead of stdout

This commit is contained in:
Randolph Chung 2000-12-07 03:55:35 +00:00
parent 02553a2a18
commit da7b82981b
3 changed files with 5 additions and 5 deletions

View File

@ -35,7 +35,7 @@ DOSTATIC = false
# Leave this set to `false' for production use.
# eg: `make DODEBUG=true tests'
# Do not enable this for production builds...
DODEBUG = false
DODEBUG = true
# This enables compiling with dmalloc ( http://dmalloc.com/ )
# which is an excellent public domain mem leak and malloc problem

View File

@ -424,7 +424,7 @@ progressmeter(int flag)
snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
"%02d:%02d ETA", i / 60, i % 60);
}
write(fileno(stdout), buf, strlen(buf));
write(fileno(stderr), buf, strlen(buf));
if (flag == -1) {
struct sigaction sa;
@ -475,7 +475,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.8 2000/12/07 03:53:47 tausq Exp $
* $Id: wget.c,v 1.9 2000/12/07 03:55:35 tausq Exp $
*/

4
wget.c
View File

@ -424,7 +424,7 @@ progressmeter(int flag)
snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
"%02d:%02d ETA", i / 60, i % 60);
}
write(fileno(stdout), buf, strlen(buf));
write(fileno(stderr), buf, strlen(buf));
if (flag == -1) {
struct sigaction sa;
@ -475,7 +475,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.8 2000/12/07 03:53:47 tausq Exp $
* $Id: wget.c,v 1.9 2000/12/07 03:55:35 tausq Exp $
*/