X-Git-Url: https://eleni.mutantstargoat.com/git/?p=winnie;a=blobdiff_plain;f=src%2Ftext.cc;h=c58924f6f55a36590cb04af17c5d64c24c66f80d;hp=4068663469f86eaad35ee9059e55a97b7febbdec;hb=e4076629a736e957739c31cd20bbbbb70327023b;hpb=12274901ac01898b01b93e15b5b87dec3348afae diff --git a/src/text.cc b/src/text.cc index 4068663..c58924f 100644 --- a/src/text.cc +++ b/src/text.cc @@ -2,6 +2,7 @@ #include #include "gfx.h" +#include "shalloc.h" #include "text.h" #define DPI 72 @@ -21,7 +22,7 @@ static Text *text; bool init_text() { - if(!(text = (Text*)malloc(sizeof *text))) { + if(!(text = (Text*)sh_malloc(sizeof *text))) { return false; } @@ -45,6 +46,11 @@ bool init_text() return true; } +void destroy_text() +{ + sh_free(text); +} + void draw_text(const char *txt, Pixmap *pixmap) { if(!pixmap) {