Package: pcf2bdf
Version: 1.04-2
Severity: important
Tags: patch
User: [EMAIL PROTECTED]
Usertags: origin-ubuntu ubuntu-patch hardy
Trying to use pcf2bdf to open a gzipped file (e.g.
/usr/share/fonts/X11/misc/unifont.pcf.gz) just says:
pcf2bdf: failed to execute gzip
In fact, the problem is that pcf2bdf passes "rb" as the type argument to
popen. The manual page says:
The type argument is a pointer to a null-terminated string which must
be either "r" for reading or "w" for writing.
The attached patch fixes this to say "r" instead. I don't know whether
this breaks on Windows, although the _setmode that follows it should
help; in any case it seems reasonable to patch this in Debian to work
properly on Linux.
I'm running this on Ubuntu, although I don't think it matters; we don't
change popen's behaviour as far as I know.
Thanks,
--
Colin Watson [EMAIL PROTECTED]
Index: pcf2bdf.cc
===================================================================
--- pcf2bdf.cc.orig
+++ pcf2bdf.cc
@@ -595,7 +595,7 @@
fclose(ifp);
char buf[1024];
sprintf(buf, "gzip -dc %s", ifilename); // TODO
- ifp = popen(buf, "rb");
+ ifp = popen(buf, "r");
_setmode(fileno(ifp), O_BINARY);
read_bytes = 0;
if (!ifp)