[cairo-commit] src/cairo-ps-surface.c
Behdad Esfahbod
behdad at kemper.freedesktop.org
Tue Nov 21 14:54:00 PST 2006
src/cairo-ps-surface.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
New commits:
diff-tree c6fceb6721a26d801be0fa8ed3028f9dc8b7dfed (from 75eeb889767468b374df5f0aa6fb7ba1fe6addf9)
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Tue Nov 21 17:52:58 2006 -0500
[PS] Rename n_glyphs to num_glyphs_unsigned
Follow-up on my previous commit. Use a more descriptive name to avoid
confusion between n_glyphs and num_glyphs.
diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index f9ca3a1..75fe83e 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -2146,7 +2146,7 @@ _cairo_ps_surface_show_glyphs (void
unsigned int font_id;
cairo_ps_glyph_id_t *glyph_ids;
cairo_status_t status;
- unsigned int n_glyphs, i, j, last, end;
+ unsigned int num_glyphs_unsigned, i, j, last, end;
cairo_bool_t vertical, horizontal;
cairo_output_stream_t *word_wrap;
@@ -2161,14 +2161,14 @@ _cairo_ps_surface_show_glyphs (void
if (num_glyphs <= 0)
return CAIRO_STATUS_SUCCESS;
- n_glyphs = num_glyphs;
+ num_glyphs_unsigned = num_glyphs;
emit_pattern (surface, source);
- glyph_ids = malloc (n_glyphs*sizeof (cairo_ps_glyph_id_t));
+ glyph_ids = malloc (num_glyphs_unsigned*sizeof (cairo_ps_glyph_id_t));
if (glyph_ids == NULL)
return CAIRO_STATUS_NO_MEMORY;
- for (i = 0; i < n_glyphs; i++) {
+ for (i = 0; i < num_glyphs_unsigned; i++) {
status = _cairo_scaled_font_subsets_map_glyph (surface->font_subsets,
scaled_font, glyphs[i].index,
&font_id,
@@ -2179,7 +2179,7 @@ _cairo_ps_surface_show_glyphs (void
}
i = 0;
- while (i < n_glyphs) {
+ while (i < num_glyphs_unsigned) {
if (glyph_ids[i].subset_id != current_subset_id) {
_cairo_output_stream_printf (surface->stream,
"/CairoFont-%d-%d findfont\n"
@@ -2202,7 +2202,7 @@ _cairo_ps_surface_show_glyphs (void
horizontal = TRUE;
vertical = TRUE;
- end = n_glyphs;
+ end = num_glyphs_unsigned;
if (end - i > MAX_GLYPHS_PER_SHOW)
end = i + MAX_GLYPHS_PER_SHOW;
last = end - 1;
@@ -2228,7 +2228,7 @@ _cairo_ps_surface_show_glyphs (void
if (horizontal) {
for (j = i; j < last+1; j++) {
- if (j == n_glyphs - 1)
+ if (j == num_glyphs_unsigned - 1)
_cairo_output_stream_printf (word_wrap, "0 ");
else
_cairo_output_stream_printf (word_wrap,
@@ -2237,7 +2237,7 @@ _cairo_ps_surface_show_glyphs (void
_cairo_output_stream_printf (word_wrap, "] xS\n");
} else if (vertical) {
for (j = i; j < last+1; j++) {
- if (j == n_glyphs - 1)
+ if (j == num_glyphs_unsigned - 1)
_cairo_output_stream_printf (word_wrap, "0 ");
else
_cairo_output_stream_printf (word_wrap,
@@ -2246,7 +2246,7 @@ _cairo_ps_surface_show_glyphs (void
_cairo_output_stream_printf (word_wrap, "] yS\n");
} else {
for (j = i; j < last+1; j++) {
- if (j == n_glyphs - 1)
+ if (j == num_glyphs_unsigned - 1)
_cairo_output_stream_printf (word_wrap, "0 ");
else
_cairo_output_stream_printf (word_wrap,
More information about the cairo-commit
mailing list