draw: wipe text in parser data

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-08-28 19:34:20 +02:00
parent 4301642ba3
commit 99004c3799
2 changed files with 14 additions and 16 deletions

View File

@ -43,19 +43,6 @@
#include "common/markup.h"
#include "common/xutil.h"
void
draw_parser_data_init(draw_parser_data_t *pdata)
{
p_clear(pdata, 1);
}
void
draw_parser_data_wipe(draw_parser_data_t *pdata)
{
if(pdata)
draw_image_delete(&pdata->bg_image);
}
static iconv_t iso2utf8 = (iconv_t) -1;
/** Convert text from any charset to UTF-8 using iconv.

View File

@ -198,9 +198,6 @@ typedef struct
} border;
} draw_parser_data_t;
void draw_parser_data_init(draw_parser_data_t *);
void draw_parser_data_wipe(draw_parser_data_t *);
bool draw_text_markup_expand(draw_parser_data_t *, const char *, ssize_t);
void draw_text(draw_context_t *, font_t *, area_t, const char *, ssize_t len, draw_parser_data_t *);
@ -243,5 +240,19 @@ bool xcolor_init_reply(xcb_connection_t *, xcolor_init_request_t);
void area_array_remove(area_array_t *, area_t);
static inline void
draw_parser_data_init(draw_parser_data_t *pdata)
{
p_clear(pdata, 1);
}
static inline void
draw_parser_data_wipe(draw_parser_data_t *pdata)
{
p_delete(&pdata->text);
if(pdata)
draw_image_delete(&pdata->bg_image);
}
#endif
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80