33 pcanvas = malloc(
sizeof *pcanvas);
34 pcanvas->width = width;
35 pcanvas->height = height;
36 pcanvas->
canvas = (
char*)malloc(width * height + height);
55 memset(c->
canvas,
'.', c->height * (c->width+1));
56 for(i=0, end=c->
canvas; i < c->height; i++) {
57 end[c->width]=
'\0'; end += c->width + 1;
68 for(i=0, line=c->
canvas; i< c->height; i++) {
canvas * canvas_create(int width, int height)
int canvas_get_point(canvas *c, int x, int y)
void canvas_draw_rect(canvas *c, int x, int y, int width, int height, char ch)
void canvas_print(canvas *c)
void canvas_set_point(canvas *c, int x, int y, char character)
void canvas_output(canvas *c, FILE *f)
void canvas_clear(canvas *c)