diff options
author | Owen Taylor <otaylor@redhat.com> | 2000-02-11 06:39:19 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2000-02-11 06:39:19 +0000 |
commit | 1b2e543aa5bc412062c97a9d37c4c5292604025f (patch) | |
tree | 27844df3e53bc4b3001cb36fc55b29ba4b568fdc /examples | |
parent | b1c021842d26d5674a51f802f29e2a8496767c55 (diff) | |
download | pango-1b2e543aa5bc412062c97a9d37c4c5292604025f.tar.gz |
Fix some runtime and compile-time warnings.
Thu Feb 10 20:19:39 2000 Owen Taylor <otaylor@redhat.com>
* examples/viewer.c: Fix some runtime and compile-time warnings.
* modules/hangul/hangul.c (hangul_engine_shape): Shape the
string with the unknown glyph rather than giving a warning
when the font doesn't have any of the necesary charsets.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/viewer.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/examples/viewer.c b/examples/viewer.c index 2946dd70..4fe00d2a 100644 --- a/examples/viewer.c +++ b/examples/viewer.c @@ -816,7 +816,8 @@ reload_font () font = new_font; } - gtk_widget_queue_resize (layout); + if (layout) + gtk_widget_queue_resize (layout); } void @@ -954,7 +955,8 @@ font_description_from_string (PangoFontDescription *desc, const char *name) words = g_strsplit (name, " ", -1); for (i=0; words[i]; i++) { - if (!(find_field (style_map, G_N_ELEMENTS (style_map), words[i], (int *)&desc->style) || + if (!(strcasecmp (words[i], "Normal") == 0 || + find_field (style_map, G_N_ELEMENTS (style_map), words[i], (int *)&desc->style) || find_field (variant_map, G_N_ELEMENTS (variant_map), words[i], (int *)&desc->variant) || find_field (weight_map, G_N_ELEMENTS (weight_map), words[i], (int *)&desc->weight) || find_field (stretch_map, G_N_ELEMENTS (stretch_map), words[i], (int *)&desc->stretch))) @@ -987,9 +989,9 @@ compare_font_descriptions (const PangoFontDescription *a, const PangoFontDescrip } static int -font_description_sort_func (const PangoFontDescription **a, const PangoFontDescription **b) +font_description_sort_func (const void *a, const void *b) { - return compare_font_descriptions (*a, *b); + return compare_font_descriptions (*(PangoFontDescription **)a, *(PangoFontDescription **)b); } typedef struct |