|
|
@@ -269,14 +269,14 @@ int caca_rotate_left(caca_canvas_t *cv) |
|
|
|
w2 = (cv->width + 1) / 2; |
|
|
|
h2 = cv->height; |
|
|
|
|
|
|
|
newchars = malloc(w2 * h2 * 2 * sizeof(uint32_t)); |
|
|
|
newchars = _caca_alloc2d(w2, h2, 2 * sizeof(uint32_t)); |
|
|
|
if(!newchars) |
|
|
|
{ |
|
|
|
seterrno(ENOMEM); |
|
|
|
return -1; |
|
|
|
} |
|
|
|
|
|
|
|
newattrs = malloc(w2 * h2 * 2 * sizeof(uint32_t)); |
|
|
|
newattrs = _caca_alloc2d(w2, h2, 2 * sizeof(uint32_t)); |
|
|
|
if(!newattrs) |
|
|
|
{ |
|
|
|
free(newchars); |
|
|
@@ -389,14 +389,14 @@ int caca_rotate_right(caca_canvas_t *cv) |
|
|
|
w2 = (cv->width + 1) / 2; |
|
|
|
h2 = cv->height; |
|
|
|
|
|
|
|
newchars = malloc(w2 * h2 * 2 * sizeof(uint32_t)); |
|
|
|
newchars = _caca_alloc2d(w2 * 2, h2, sizeof(uint32_t)); |
|
|
|
if(!newchars) |
|
|
|
{ |
|
|
|
seterrno(ENOMEM); |
|
|
|
return -1; |
|
|
|
} |
|
|
|
|
|
|
|
newattrs = malloc(w2 * h2 * 2 * sizeof(uint32_t)); |
|
|
|
newattrs = _caca_alloc2d(w2 * 2, h2, sizeof(uint32_t)); |
|
|
|
if(!newattrs) |
|
|
|
{ |
|
|
|
free(newchars); |
|
|
@@ -504,14 +504,14 @@ int caca_stretch_left(caca_canvas_t *cv) |
|
|
|
/* Save the current frame shortcuts */ |
|
|
|
_caca_save_frame_info(cv); |
|
|
|
|
|
|
|
newchars = malloc(cv->width * cv->height * sizeof(uint32_t)); |
|
|
|
newchars = _caca_alloc2d(cv->width, cv->height, sizeof(uint32_t)); |
|
|
|
if(!newchars) |
|
|
|
{ |
|
|
|
seterrno(ENOMEM); |
|
|
|
return -1; |
|
|
|
} |
|
|
|
|
|
|
|
newattrs = malloc(cv->width * cv->height * sizeof(uint32_t)); |
|
|
|
newattrs = _caca_alloc2d(cv->width, cv->height, sizeof(uint32_t)); |
|
|
|
if(!newattrs) |
|
|
|
{ |
|
|
|
free(newchars); |
|
|
@@ -597,14 +597,14 @@ int caca_stretch_right(caca_canvas_t *cv) |
|
|
|
/* Save the current frame shortcuts */ |
|
|
|
_caca_save_frame_info(cv); |
|
|
|
|
|
|
|
newchars = malloc(cv->width * cv->height * sizeof(uint32_t)); |
|
|
|
newchars = _caca_alloc2d(cv->width, cv->height, sizeof(uint32_t)); |
|
|
|
if(!newchars) |
|
|
|
{ |
|
|
|
seterrno(ENOMEM); |
|
|
|
return -1; |
|
|
|
} |
|
|
|
|
|
|
|
newattrs = malloc(cv->width * cv->height * sizeof(uint32_t)); |
|
|
|
newattrs = _caca_alloc2d(cv->width, cv->height, sizeof(uint32_t)); |
|
|
|
if(!newattrs) |
|
|
|
{ |
|
|
|
free(newchars); |
|
|
|