openbsd-ports/print/foo2zjs/patches/patch-oakdecode_c
merdely f15550d688 Foo2zjs updated to latest version, some printers added,
some fixes to make it work with Ghostscript 8.60.

From Giovanni Bechis (MAINTAINER)
ok ajacoutot@
2007-11-04 15:47:45 +00:00

50 lines
1.1 KiB
Plaintext

$OpenBSD: patch-oakdecode_c,v 1.1 2007/11/04 15:47:45 merdely Exp $
--- oakdecode.c.orig Sat Nov 3 17:37:58 2007
+++ oakdecode.c Sat Nov 3 17:38:50 2007
@@ -88,19 +88,6 @@ usage(void)
exit(1);
}
-void
-swap32(void *p)
-{
- char *cp = (char *) p;
- char tmp;
- tmp = cp[0];
- cp[0] = cp[3];
- cp[3] = tmp;
- tmp = cp[1];
- cp[1] = cp[2];
- cp[2] = tmp;
-}
-
#if 0
BIH-style from foo2zjs/pbmtojbg...
@@ -489,9 +476,9 @@ decode(FILE *fp)
// inside the compressed stream itself????
if (*cp == 1)
{
- swap32(&hdr3c.bih.xd);
- swap32(&hdr3c.bih.yd);
- swap32(&hdr3c.bih.l0);
+ swap32(hdr3c.bih.xd);
+ swap32(hdr3c.bih.yd);
+ swap32(hdr3c.bih.l0);
}
if (!SupressImage || !ImageRec[plane])
if (first_bih)
@@ -501,9 +488,9 @@ decode(FILE *fp)
}
if (0 && *cp == 1)
{
- swap32(&hdr3c.bih.xd);
- swap32(&hdr3c.bih.yd);
- swap32(&hdr3c.bih.l0);
+ swap32(hdr3c.bih.xd);
+ swap32(hdr3c.bih.yd);
+ swap32(hdr3c.bih.l0);
}
if (FpRaw[plane][subplane])
fwrite(&hdr3c.bih, 1, 20, FpRaw[plane][subplane]);