From 4b8c103d72d84e9a02aae4ea0b166a8d97913bf0 Mon Sep 17 00:00:00 2001 From: Hiroki Sato Date: Sun, 3 Jun 2007 16:39:47 +0000 Subject: Fix build when lvga256 or vgalib is enabled. Spotted by: itetcu --- print/ghostscript-gpl/files/patch-src-gdevl256.c | 17 +++++++++++++++++ print/ghostscript-gpl/files/patch-src-gdevvglb.c | 19 +++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 print/ghostscript-gpl/files/patch-src-gdevl256.c create mode 100644 print/ghostscript-gpl/files/patch-src-gdevvglb.c (limited to 'print/ghostscript-gpl/files') diff --git a/print/ghostscript-gpl/files/patch-src-gdevl256.c b/print/ghostscript-gpl/files/patch-src-gdevl256.c new file mode 100644 index 000000000000..c00c180f7f1f --- /dev/null +++ b/print/ghostscript-gpl/files/patch-src-gdevl256.c @@ -0,0 +1,17 @@ +--- src/gdevl256.c.orig Mon Jun 4 00:54:57 2007 ++++ src/gdevl256.c Mon Jun 4 01:13:56 2007 +@@ -143,9 +143,12 @@ + /* for compatibility with the older display modes: */ + /* these are indexed as 0.0.R0.G0.B0.R1.G1.B1. */ + gx_color_index +-lvga256_map_rgb_color(gx_device * dev, gx_color_value r, gx_color_value g, +- gx_color_value b) ++lvga256_map_rgb_color(gx_device * dev, const gx_color_value cv[]) + { ++ gx_color_value r = cv[0]; ++ gx_color_value g = cv[1]; ++ gx_color_value b = cv[2]; ++ + #define cv_bits(v,n) (v >> (gx_color_value_bits - n)) + ushort r5 = cv_bits(r, 5), g5 = cv_bits(g, 5), b5 = cv_bits(b, 5); + static const byte cube_bits[32] = diff --git a/print/ghostscript-gpl/files/patch-src-gdevvglb.c b/print/ghostscript-gpl/files/patch-src-gdevvglb.c new file mode 100644 index 000000000000..81abb24feb8a --- /dev/null +++ b/print/ghostscript-gpl/files/patch-src-gdevvglb.c @@ -0,0 +1,19 @@ +--- src/gdevvglb.c.orig Mon Jun 4 01:15:47 2007 ++++ src/gdevvglb.c Mon Jun 4 01:18:45 2007 +@@ -149,10 +149,13 @@ + } + + private gx_color_index +-vgalib_map_rgb_color(gx_device * dev, gx_color_value red, +- gx_color_value green, gx_color_value blue) ++vgalib_map_rgb_color(gx_device * dev, const gx_color_value cv[]) + { +- return pc_4bit_map_rgb_color(dev, red, green, blue); ++ gx_color_value r = cv[0]; ++ gx_color_value g = cv[1]; ++ gx_color_value b = cv[2]; ++ ++ return pc_4bit_map_rgb_color(dev, cv); + } + + private int -- cgit v1.2.3