summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2008-08-26 18:41:22 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2008-08-26 23:02:41 +0100
commitde6742c5f190664556658e35f5ea5ede979671af (patch)
treea69c45d148a4663c403a42b1cbe41bd54b094c77
parent92fcb9d2f7fa143d1f6707ead7d4a85e9f739bcb (diff)
[ps] Mark the hex data as unsigned char.
Use unsigned char to avoid sign extensions issues when bit shifting.
-rw-r--r--src/cairo-output-stream-private.h2
-rw-r--r--src/cairo-output-stream.c2
-rw-r--r--src/cairo-ps-surface.c2
-rw-r--r--src/cairo-scaled-font-subsets-private.h2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/cairo-output-stream-private.h b/src/cairo-output-stream-private.h
index 9bfc53400..15cd2c03b 100644
--- a/src/cairo-output-stream-private.h
+++ b/src/cairo-output-stream-private.h
@@ -107,7 +107,7 @@ _cairo_output_stream_write (cairo_output_stream_t *stream,
cairo_private void
_cairo_output_stream_write_hex_string (cairo_output_stream_t *stream,
- const char *data,
+ const unsigned char *data,
size_t length);
cairo_private void
diff --git a/src/cairo-output-stream.c b/src/cairo-output-stream.c
index 5041f757a..206ed30bc 100644
--- a/src/cairo-output-stream.c
+++ b/src/cairo-output-stream.c
@@ -237,7 +237,7 @@ _cairo_output_stream_write (cairo_output_stream_t *stream,
void
_cairo_output_stream_write_hex_string (cairo_output_stream_t *stream,
- const char *data,
+ const unsigned char *data,
size_t length)
{
const char hex_chars[] = "0123456789abcdef";
diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index 25a8ad1c5..981f69d42 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -367,7 +367,7 @@ _cairo_ps_surface_emit_truetype_font_subset (cairo_ps_surface_t *surface,
subset.data + begin, end - begin);
_cairo_output_stream_printf (surface->final_stream,"00>\n");
begin = end;
- }
+ }
if (subset.data_length > end) {
_cairo_output_stream_printf (surface->final_stream,"<");
_cairo_output_stream_write_hex_string (surface->final_stream,
diff --git a/src/cairo-scaled-font-subsets-private.h b/src/cairo-scaled-font-subsets-private.h
index 4eb2c792a..e87731812 100644
--- a/src/cairo-scaled-font-subsets-private.h
+++ b/src/cairo-scaled-font-subsets-private.h
@@ -371,7 +371,7 @@ typedef struct _cairo_truetype_subset {
double *widths;
double x_min, y_min, x_max, y_max;
double ascent, descent;
- char *data;
+ unsigned char *data;
unsigned long data_length;
unsigned long *string_offsets;
unsigned long num_string_offsets;