X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fdevices%2Ftext.c;h=36c0e4f11d8c56175a0b4491c067780d0f20c912;hb=b93de056e0b79f57c8f8fe22985b166c7d2c3dc3;hp=d5b4bbc73399a8acd35ca1838f7cbfd3653b2036;hpb=d3fb559b6b8ca9c122b310cae1a3e8b0805f97ad;p=swftools.git diff --git a/lib/devices/text.c b/lib/devices/text.c index d5b4bbc..36c0e4f 100644 --- a/lib/devices/text.c +++ b/lib/devices/text.c @@ -60,7 +60,7 @@ void text_startpage(gfxdevice_t*dev, int width, int height) i->current_page = i->current_page->next; } i->current_page->textsize = 4096; - i->current_page->text = malloc(i->current_page->textsize); + i->current_page->text = (char*)malloc(i->current_page->textsize); i->current_page->textpos = 0; i->current_page->next = 0; i->currentx = 0; @@ -120,9 +120,10 @@ void text_drawchar(gfxdevice_t*dev, gfxfont_t*font, int glyphnr, gfxcolor_t*colo } else if(xshift > i->lastadvance*1.3 || xshift<0) { addchar(dev, 32); } + int u; if(font) { i->lastadvance = font->glyphs[glyphnr].advance*matrix->m00; - int u = font->glyphs[glyphnr].unicode; + u = font->glyphs[glyphnr].unicode; } else { u = glyphnr; i->currentx = 0;i->currenty = 0; @@ -132,7 +133,7 @@ void text_drawchar(gfxdevice_t*dev, gfxfont_t*font, int glyphnr, gfxcolor_t*colo } } -void text_drawlink(gfxdevice_t*dev, gfxline_t*line, char*action) +void text_drawlink(gfxdevice_t*dev, gfxline_t*line, const char*action) { internal_t*i = (internal_t*)dev->internal; } @@ -172,7 +173,7 @@ void*text_result_get(gfxresult_t*r, char*name) len += i->textpos; j = j->next; } - char*text = malloc(len); + char*text = (char*)malloc(len); int pos = 0; j = i; while(j) {