… | |
… | |
6 | * later on. |
6 | * later on. |
7 | * |
7 | * |
8 | * Copyright © 2005-2007 Atheme Project (http://www.atheme.org) |
8 | * Copyright © 2005-2007 Atheme Project (http://www.atheme.org) |
9 | */ |
9 | */ |
10 | |
10 | |
11 | static char const rcsid[] = "$Id: table.C,v 1.4 2007/08/28 17:08:12 pippijn Exp $"; |
11 | static char const rcsid[] = "$Id: table.C,v 1.5 2007/08/30 19:56:26 pippijn Exp $"; |
12 | |
12 | |
13 | #include "atheme.h" |
13 | #include "atheme.h" |
14 | |
14 | |
15 | static void |
15 | static void |
16 | table_destroy (void *obj) |
16 | table_destroy (void *obj) |
… | |
… | |
199 | { |
199 | { |
200 | table_cell_t *c = (table_cell_t *) n->data; |
200 | table_cell_t *c = (table_cell_t *) n->data; |
201 | bufsz += c->width + 1; |
201 | bufsz += c->width + 1; |
202 | } |
202 | } |
203 | |
203 | |
204 | buf = alloc<char> (bufsz); |
204 | buf = salloc<char> (bufsz); |
205 | *buf = '\0'; |
205 | *buf = '\0'; |
206 | |
206 | |
207 | /* start outputting the header. */ |
207 | /* start outputting the header. */ |
208 | callback (asobject (t)->name, data); |
208 | callback (asobject (t)->name, data); |
209 | LIST_FOREACH (n, f->cells.head) |
209 | LIST_FOREACH (n, f->cells.head) |