From 8cad7c0a1b8126c9cb54b2eb5588dfa88a28dbed Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 3 Apr 2006 15:19:59 +0000 Subject: =?UTF-8?q?Bug=20337029=20=E2=80=93=20pango/fonts.c:=20Illegal=20s?= =?UTF-8?q?tructure=20initialization?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2006-04-03 Behdad Esfahbod Bug 337029 – pango/fonts.c: Illegal structure initialization * pango/fonts.c: Change NULL's to ""'s after previous change, and fix code to follow. --- ChangeLog | 7 +++++++ pango/fonts.c | 10 +++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 32157d5a..74f714d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-04-03 Behdad Esfahbod + + Bug 337029 – pango/fonts.c: Illegal structure initialization + + * pango/fonts.c: Change NULL's to ""'s after previous change, and fix + code to follow. + 2006-03-31 Behdad Esfahbod * pango/fonts.c: diff --git a/pango/fonts.c b/pango/fonts.c index 10bb10b0..57dbec8b 100644 --- a/pango/fonts.c +++ b/pango/fonts.c @@ -757,20 +757,20 @@ typedef struct } FieldMap; static const FieldMap style_map[] = { - { PANGO_STYLE_NORMAL, NULL }, + { PANGO_STYLE_NORMAL, "" }, { PANGO_STYLE_OBLIQUE, "Oblique" }, { PANGO_STYLE_ITALIC, "Italic" } }; static const FieldMap variant_map[] = { - { PANGO_VARIANT_NORMAL, NULL }, + { PANGO_VARIANT_NORMAL, "" }, { PANGO_VARIANT_SMALL_CAPS, "Small-Caps" } }; static const FieldMap weight_map[] = { { PANGO_WEIGHT_ULTRALIGHT, "Ultra-Light" }, { PANGO_WEIGHT_LIGHT, "Light" }, - { PANGO_WEIGHT_NORMAL, NULL }, + { PANGO_WEIGHT_NORMAL, "" }, { 500, "Medium" }, { PANGO_WEIGHT_SEMIBOLD, "Semi-Bold" }, { PANGO_WEIGHT_BOLD, "Bold" }, @@ -783,7 +783,7 @@ static const FieldMap stretch_map[] = { { PANGO_STRETCH_EXTRA_CONDENSED, "Extra-Condensed" }, { PANGO_STRETCH_CONDENSED, "Condensed" }, { PANGO_STRETCH_SEMI_CONDENSED, "Semi-Condensed" }, - { PANGO_STRETCH_NORMAL, NULL }, + { PANGO_STRETCH_NORMAL, "" }, { PANGO_STRETCH_SEMI_EXPANDED, "Semi-Expanded" }, { PANGO_STRETCH_EXPANDED, "Expanded" }, { PANGO_STRETCH_EXTRA_EXPANDED, "Extra-Expanded" }, @@ -964,7 +964,7 @@ append_field (GString *str, const FieldMap *map, int n_elements, int val) { if (map[i].value == val) { - if (map[i].str) + if (map[i].str && map[i].str[0]) { if (str->len > 0 && str->str[str->len -1] != ' ') g_string_append_c (str, ' '); -- cgit v1.2.1