Mercurial > hg > nnchat
comparison nnchat.c @ 89:c2d916b340bf
Change some typedef names; Add struct for user list handling.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 06 May 2009 05:05:02 +0300 |
parents | 7577eb770892 |
children | 1e0bf7b4fd41 |
comparison
equal
deleted
inserted
replaced
88:7bf0915c965e | 89:c2d916b340bf |
---|---|
39 WINDOW *mainWin = NULL, | 39 WINDOW *mainWin = NULL, |
40 *statusWin = NULL, | 40 *statusWin = NULL, |
41 *editWin = NULL; | 41 *editWin = NULL; |
42 BOOL setPrvMode = FALSE; | 42 BOOL setPrvMode = FALSE; |
43 | 43 |
44 | |
44 /* Arguments | 45 /* Arguments |
45 */ | 46 */ |
46 optarg_t optList[] = { | 47 optarg_t optList[] = { |
47 { 0, '?', "help", "Show this help", OPT_NONE }, | 48 { 0, '?', "help", "Show this help", OPT_NONE }, |
48 { 1, 'v', "verbose", "Be more verbose", OPT_NONE }, | 49 { 1, 'v', "verbose", "Be more verbose", OPT_NONE }, |
221 waddstr(statusWin, tmpStr); | 222 waddstr(statusWin, tmpStr); |
222 | 223 |
223 wrefresh(statusWin); | 224 wrefresh(statusWin); |
224 } | 225 } |
225 | 226 |
226 void printEditBuf(char *str, editbuf_t *buf) | 227 void printEditBuf(char *str, nn_editbuf_t *buf) |
227 { | 228 { |
228 if (statusWin == NULL || buf == NULL) return; | 229 if (statusWin == NULL || buf == NULL) return; |
229 | 230 |
230 buf->data[buf->len] = 0; | 231 buf->data[buf->len] = 0; |
231 werase(editWin); | 232 werase(editWin); |
598 #endif | 599 #endif |
599 insertMode = TRUE; | 600 insertMode = TRUE; |
600 struct timeval tv; | 601 struct timeval tv; |
601 fd_set sockfds; | 602 fd_set sockfds; |
602 char *tmpStr; | 603 char *tmpStr; |
603 editbuf_t *editBuf = newBuf(SET_BUFSIZE); | 604 nn_editbuf_t *editBuf = newBuf(SET_BUFSIZE); |
604 editbuf_t *histBuf[SET_MAX_HISTORY+2]; | 605 nn_editbuf_t *histBuf[SET_MAX_HISTORY+2]; |
605 int histPos = 0, histMax = 0; | 606 int histPos = 0, histMax = 0; |
606 | 607 |
607 memset(histBuf, 0, sizeof(histBuf)); | 608 memset(histBuf, 0, sizeof(histBuf)); |
608 | 609 |
609 /* Initialize */ | 610 /* Initialize */ |