comparison nnchat.c @ 117:da05b766b8c0

Use a shorter timeout, remove usleep() definition because it is not needed.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 25 Oct 2010 01:34:27 +0300
parents 741e45592522
children 9e7f52878725
comparison
equal deleted inserted replaced
116:741e45592522 117:da05b766b8c0
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include "th_args.h" 8 #include "th_args.h"
9 #include <string.h> 9 #include <string.h>
10 #include <errno.h> 10 #include <errno.h>
11 #ifdef __WIN32 11 #ifdef __WIN32
12 #define usleep(t) Sleep((t) / 1000)
13 /* Undefine because both windows.h and curses.h #define it */ 12 /* Undefine because both windows.h and curses.h #define it */
14 #undef MOUSE_MOVED 13 #undef MOUSE_MOVED
15 #endif 14 #endif
16 #include <curses.h> 15 #include <curses.h>
17 16
18 17
19 #define SET_MAX_BACKBUF (1024) 18 #define SET_MAX_BACKBUF (1024)
20 #define SET_MAX_HISTORY (16) 19 #define SET_MAX_HISTORY (16)
21 #define SET_DELAY (15) 20 #define SET_DELAY (15)
22 #define SET_DELAY_USEC (SET_DELAY * 1000) 21 #define SET_DELAY_USEC (SET_DELAY * 250)
23 #define SET_KEEPALIVE (15*60) /* Ping/keepalive period in seconds */ 22 #define SET_KEEPALIVE (15*60) /* Ping/keepalive period in seconds */
24 23
25 char *ignoreList[] = { 24 char *ignoreList[] = {
26 "purr_rr", 25 "purr_rr",
27 "moisha", 26 "moisha",