revert between 56095 -> 55830 in arch
[AROS.git] / workbench / libs / freetype2 / releaseinfoa.c
blobc350f5c4a0911e73f33212d25e63972fcc6f36d7
1 /*
2 * Based on the code from the ft2.library from MorphOS, the ttf.library by
3 * Richard Griffith and the type1.library by Amish S. Dave
4 */
5 #include "ftglyphengine.h"
6 #include "kerning.h"
8 #include <aros/libcall.h>
9 #include <proto/utility.h>
10 #include <aros/debug.h>
11 #include <utility/tagitem.h>
12 #include <diskfont/glyph.h>
13 #include <diskfont/diskfonttag.h>
15 #include LC_LIBDEFS_FILE
17 /* ReleaseInfoA, release allocated memory from ObtainInfo */
18 AROS_LH2(ULONG, ReleaseInfoA,
19 AROS_LHA(struct GlyphEngine *, ge, A0),
20 AROS_LHA(struct TagItem *, tags, A1),
21 LIBBASETYPEPTR, LIBBASE, 9, FreeType2
24 AROS_LIBFUNC_INIT
26 FT_GlyphEngine *engine = (FT_GlyphEngine *)ge;
27 Tag otagtag;
28 IPTR otagdata;
30 struct TagItem *tstate;
31 struct TagItem *tag;
32 struct GlyphMap *GMap;
34 D(bug("ReleaseInfoA engine = 0x%lx tags = 0x%lx\n",engine,tags));
36 tstate = tags;
37 while ((tag = NextTagItem(&tstate)))
39 otagtag = tag->ti_Tag;
40 otagdata = tag->ti_Data;
42 switch (otagtag)
44 case OT_GlyphMap:
45 case OT_GlyphMap8Bits:
46 case OT_GlyphMap8Bit_Old:
47 //D(bug("Release: OT_GlyphMap Data=%lx\n", otagdata));
48 GMap=(struct GlyphMap *)otagdata;
49 if(GMap->glm_BitMap) FreeVec(GMap->glm_BitMap);
50 FreeVec(GMap);
51 break;
53 case OT_WidthList:
54 //D(bug("Release: OT_WidthList Data=%lx\n", otagdata));
55 FreeWidthList(engine,(struct MinList *)otagdata);
56 break;
58 default: /* ??? */
59 D(bug("Unknown Release: Tag=%lx Data=%lx\n",(LONG)otagtag, otagdata));
60 break;
64 return 0;
66 AROS_LIBFUNC_EXIT