Mercurial > hg > nnchat
diff util.c @ 466:796508f828f6
Refactor much of the "windowing" UI code into a new module, ui.[ch]
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 26 May 2012 06:56:18 +0300 |
parents | 35d67bd0613b |
children | 607bd4491e79 |
line wrap: on
line diff
--- a/util.c Sat May 26 06:18:19 2012 +0300 +++ b/util.c Sat May 26 06:56:18 2012 +0300 @@ -683,36 +683,6 @@ } -nn_window_t *nn_window_new(const char *id) -{ - nn_window_t *res = th_calloc(1, sizeof(nn_window_t)); - - if (res == NULL) return NULL; - - res->data = th_ringbuf_new(NN_BACKBUF_LEN, th_free); - if (res->data == NULL) - { - th_free(res); - return NULL; - } - - res->id = th_strdup(id); - - return res; -} - - -void nn_window_free(nn_window_t *win) -{ - if (win != NULL) - { - th_ringbuf_free(win->data); - th_free(win->id); - th_free(win); - } -} - - nn_strtuple_t *nn_strtuple_new(size_t len, char *str) { nn_strtuple_t *tuple = th_calloc(1, sizeof(nn_strtuple_t));