|
|
@@ -276,6 +276,8 @@ static void *export_utf8(cucul_canvas_t *cv, unsigned long int *bytes, int cr) |
|
|
|
} |
|
|
|
|
|
|
|
/* Crop to really used size */ |
|
|
|
debug("utf8 export: alloc %li bytes, realloc %li\n", |
|
|
|
(long int)*bytes, (long int)(uintptr_t)(cur - data)); |
|
|
|
*bytes = (uintptr_t)(cur - data); |
|
|
|
data = realloc(data, *bytes); |
|
|
|
|
|
|
@@ -354,6 +356,8 @@ static void *export_ansi(cucul_canvas_t *cv, unsigned long int *bytes) |
|
|
|
} |
|
|
|
|
|
|
|
/* Crop to really used size */ |
|
|
|
debug("ansi export: alloc %li bytes, realloc %li\n", |
|
|
|
(long int)*bytes, (long int)(uintptr_t)(cur - data)); |
|
|
|
*bytes = (uintptr_t)(cur - data); |
|
|
|
data = realloc(data, *bytes); |
|
|
|
|
|
|
@@ -428,6 +432,8 @@ static void *export_html(cucul_canvas_t *cv, unsigned long int *bytes) |
|
|
|
cur += sprintf(cur, "</div></body></html>\n"); |
|
|
|
|
|
|
|
/* Crop to really used size */ |
|
|
|
debug("html export: alloc %li bytes, realloc %li\n", |
|
|
|
(long int)*bytes, (long int)(uintptr_t)(cur - data)); |
|
|
|
*bytes = (uintptr_t)(cur - data); |
|
|
|
data = realloc(data, *bytes); |
|
|
|
|
|
|
@@ -521,6 +527,8 @@ static void *export_html3(cucul_canvas_t *cv, unsigned long int *bytes) |
|
|
|
cur += sprintf(cur, "</table>\n"); |
|
|
|
|
|
|
|
/* Crop to really used size */ |
|
|
|
debug("html3 export: alloc %li bytes, realloc %li\n", |
|
|
|
(long int)*bytes, (long int)(uintptr_t)(cur - data)); |
|
|
|
*bytes = (uintptr_t)(cur - data); |
|
|
|
data = realloc(data, *bytes); |
|
|
|
|
|
|
@@ -626,6 +634,8 @@ static void *export_irc(cucul_canvas_t *cv, unsigned long int *bytes) |
|
|
|
} |
|
|
|
|
|
|
|
/* Crop to really used size */ |
|
|
|
debug("IRC export: alloc %li bytes, realloc %li\n", |
|
|
|
(long int)*bytes, (long int)(uintptr_t)(cur - data)); |
|
|
|
*bytes = (uintptr_t)(cur - data); |
|
|
|
data = realloc(data, *bytes); |
|
|
|
|
|
|
@@ -733,6 +743,8 @@ static void *export_ps(cucul_canvas_t *cv, unsigned long int *bytes) |
|
|
|
cur += sprintf(cur, "showpage\n"); |
|
|
|
|
|
|
|
/* Crop to really used size */ |
|
|
|
debug("PS export: alloc %li bytes, realloc %li\n", |
|
|
|
(long int)*bytes, (long int)(uintptr_t)(cur - data)); |
|
|
|
*bytes = (uintptr_t)(cur - data); |
|
|
|
data = realloc(data, *bytes); |
|
|
|
|
|
|
@@ -817,6 +829,8 @@ static void *export_svg(cucul_canvas_t *cv, unsigned long int *bytes) |
|
|
|
cur += sprintf(cur, "</svg>\n"); |
|
|
|
|
|
|
|
/* Crop to really used size */ |
|
|
|
debug("SVG export: alloc %li bytes, realloc %li\n", |
|
|
|
(long int)*bytes, (long int)(uintptr_t)(cur - data)); |
|
|
|
*bytes = (uintptr_t)(cur - data); |
|
|
|
data = realloc(data, *bytes); |
|
|
|
|
|
|
|