From: handa Date: Fri, 3 Sep 2004 08:01:18 +0000 (+0000) Subject: (update_seq_area): Use malloc and free for X-Git-Tag: REL-0-9-5~117 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=f3c0b6a2de79944856c4bc181602f3ae2e3b030e;p=m17n%2Flibotf.git (update_seq_area): Use malloc and free for gstring.glyphs. --- diff --git a/example/otfview.c b/example/otfview.c index 57fcd7d..809b69c 100644 --- a/example/otfview.c +++ b/example/otfview.c @@ -297,7 +297,7 @@ update_seq_area () int unitsPerEm = face->units_per_EM; gstring.size = gstring.used = len; - gstring.glyphs = alloca (sizeof (OTF_Glyph) * len); + gstring.glyphs = malloc (sizeof (OTF_Glyph) * len); memset (gstring.glyphs, 0, sizeof (OTF_Glyph) * len); for (i = 0; i < len; i++) gstring.glyphs[i].c = gstring.glyphs[i].glyph_id = glyph_rec.glyphs[i]; @@ -433,6 +433,8 @@ update_seq_area () else base = g, base_width = advance; } + free (gstring.glyphs); + XtSetArg (arg[0], XtNbitmap, seq_pixmap); XtSetValues (seq_image, arg, 1); }