瀏覽代碼

* Got rid of cv->empty_line, it's now unused.

tags/v0.99.beta14
Sam Hocevar sam 19 年之前
父節點
當前提交
beda391b6b
共有 2 個檔案被更改,包括 1 行新增9 行删除
  1. +0
    -8
      cucul/cucul.c
  2. +1
    -1
      cucul/cucul_internals.h

+ 0
- 8
cucul/cucul.c 查看文件

@@ -53,7 +53,6 @@ cucul_canvas_t * cucul_create_canvas(unsigned int width, unsigned int height)
cv->width = cv->height = 0;
cv->chars = NULL;
cv->attr = NULL;
cv->empty_line = cv->scratch_line = NULL;

/* Initialise to a default size. 80x32 is arbitrary but matches AAlib's
* default X11 window. When a graphic driver attaches to us, it can set
@@ -172,7 +171,6 @@ void cucul_free_canvas(cucul_canvas_t *cv)
{
_cucul_end_dither();

free(cv->empty_line);
free(cv->scratch_line);

free(cv->chars);
@@ -278,12 +276,6 @@ void _cucul_set_canvas_size(cucul_canvas_t *cv, unsigned int width,

/* Recompute the scratch line and the empty line */
if(width != old_width)
{
cv->empty_line = realloc(cv->empty_line, width + 1);
memset(cv->empty_line, ' ', width);
cv->empty_line[width] = '\0';

cv->scratch_line = realloc(cv->scratch_line, width + 1);
}
}


+ 1
- 1
cucul/cucul_internals.h 查看文件

@@ -32,7 +32,7 @@ struct cucul_canvas

uint32_t *chars;
uint32_t *attr;
char *empty_line, *scratch_line;
char *scratch_line;

uint16_t fgcolor;
uint16_t bgcolor;


Loading…
取消
儲存