openbsd-ports/print/foo2zjs/patches/patch-foo2oak_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

76 lines
2.2 KiB
Plaintext

$OpenBSD: patch-foo2oak_c,v 1.1 2007/11/04 15:47:45 merdely Exp $
--- foo2oak.c.orig Sat Nov 3 17:20:33 2007
+++ foo2oak.c Sat Nov 3 17:38:20 2007
@@ -717,19 +717,6 @@ long JbgOptions[5] =
0
};
-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;
-}
-
static void
fill_image_plane_unknown(OAK_IMAGE_PLANE *ip)
{
@@ -883,9 +870,9 @@ cmyk_page(unsigned char *raw, int w, int h, FILE *ofp)
memcpy(&recdata.bih, chain->data, sizeof(recdata.bih));
// Oak is little-endian, but JBIG-kit is big-endian
- swap32(&recdata.bih.xd);
- swap32(&recdata.bih.yd);
- swap32(&recdata.bih.l0);
+ swap32(recdata.bih.xd);
+ swap32(recdata.bih.yd);
+ swap32(recdata.bih.l0);
recdata.datalen = chainlen;
recdata.padlen = (recdata.datalen + 15) & ~0x0f;
@@ -1014,9 +1001,9 @@ pbm_page(unsigned char *buf, int w, int h, FILE *ofp)
memcpy(&recdata.bih, chain->data, sizeof(recdata.bih));
// Oak is little-endian, but JBIG-kit is big-endian
- swap32(&recdata.bih.xd);
- swap32(&recdata.bih.yd);
- swap32(&recdata.bih.l0);
+ swap32(recdata.bih.xd);
+ swap32(recdata.bih.yd);
+ swap32(recdata.bih.l0);
recdata.datalen = chainlen;
recdata.padlen = (recdata.datalen + 15) & ~0x0f;
@@ -1155,9 +1142,9 @@ pgm_page(unsigned char *raw, int w, int h, FILE *ofp)
memcpy(&recdata.bih, chain->data, sizeof(recdata.bih));
// Oak is little-endian, but JBIG-kit is big-endian
- swap32(&recdata.bih.xd);
- swap32(&recdata.bih.yd);
- swap32(&recdata.bih.l0);
+ swap32(recdata.bih.xd);
+ swap32(recdata.bih.yd);
+ swap32(recdata.bih.l0);
recdata.datalen = chainlen;
recdata.padlen = (recdata.datalen + 15) & ~0x0f;
@@ -1332,9 +1319,9 @@ cups_page(unsigned char *raw, int w, int h, FILE *ofp)
memcpy(&recdata.bih, chain->data, sizeof(recdata.bih));
// Oak is little-endian, but JBIG-kit is big-endian
- swap32(&recdata.bih.xd);
- swap32(&recdata.bih.yd);
- swap32(&recdata.bih.l0);
+ swap32(recdata.bih.xd);
+ swap32(recdata.bih.yd);
+ swap32(recdata.bih.l0);
recdata.datalen = chainlen;
recdata.padlen = (recdata.datalen + 15) & ~0x0f;