Package: optipng Version: 0.5.5-1 Severity: wishlist IMHO, optipng outputs too much useless information, e.g. lines of the form:
zc = 1 zm = 9 zs = 2 f = 5 IDAT too big so that it is more difficult to notice useful information. Such lines should not be kept on screen, i.e. OptiPNG should output a "\r" instead of a "\n" after "IDAT too big". See the attached patch (I've tried it only with upstream source). Note that: * The "IDAT too big" from the previous line is not erased (one can see that as a feature, meaning that the previous line gave "IDAT too big"). * When redirecting the output to a file, the \r will still be sent instead of \n. This makes the result consistent with what one gets on a terminal, but one may want to detect if the output is on a terminal and choose to output either a \r or a \n (however, when redirecting stdout to a file, one may prefer the -v option, for which \n is always output). -- System Information: Debian Release: lenny/sid APT prefers testing APT policy: (900, 'testing'), (900, 'stable'), (200, 'unstable') Architecture: powerpc (ppc) Kernel: Linux 2.6.18-5-powerpc Locale: LANG=POSIX, LC_CTYPE=en_US.ISO8859-1 (charmap=ISO-8859-1) Shell: /bin/sh linked to /bin/bash Versions of packages optipng depends on: ii libc6 2.7-4 GNU C Library: Shared libraries ii libpng12-0 1.2.15~beta5-3 PNG library - runtime ii zlib1g 1:1.2.3.3.dfsg-7 compression library - runtime optipng recommends no packages. -- no debconf information
--- src/optipng.c.bak 2007-01-28 18:25:00.000000000 +0100 +++ src/optipng.c 2007-12-25 14:55:18.000000000 +0100 @@ -1257,8 +1257,12 @@ { opng_printf(" ... abandoned at "); opng_progress(); + opng_printf("\n"); + } + else + { + opng_printf("\r"); } - opng_printf("\n"); continue; } opng_printf("IDAT size = %lu\n", @@ -1897,6 +1901,7 @@ int result; memset(&global, 0, sizeof(global)); + setvbuf(stdout, (char *) NULL, _IONBF, 0); Try {