comparison mcabber/src/main.c @ 307:566818afee1c

Add headers to C files
author Mikael Berthe <mikael@lilotux.net>
date Tue, 12 Jul 2005 17:19:42 +0100
parents b2d11b11675f
children f0b7ff2df7e8 1ceb68eb2fc1
comparison
equal deleted inserted replaced
306:b2d11b11675f 307:566818afee1c
1 /*
2 * main.c
3 *
4 * Copyright (C) 2005 Mikael Berthe <bmikael@lists.lilotux.net>
5 * Parts of this file come from Cabber <cabber@ajmacias.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or (at
10 * your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20 * USA
21 */
22
1 #define _GNU_SOURCE 23 #define _GNU_SOURCE
2 #include <stdio.h> 24 #include <stdio.h>
3 #include <stdlib.h> 25 #include <stdlib.h>
4 #include <unistd.h> 26 #include <unistd.h>
5 #include <string.h> 27 #include <string.h>
222 ut_WriteLog("Ready to send/receive messages...\n"); 244 ut_WriteLog("Ready to send/receive messages...\n");
223 245
224 while (ret != 255) { 246 while (ret != 255) {
225 key = scr_Getch(); 247 key = scr_Getch();
226 248
227 // The refresh is really an ugly hack, but we need to call doupdate() 249 /* The refresh is really an ugly hack, but we need to call doupdate()
228 // from time to time to catch the RESIZE events, because getch keep 250 from time to time to catch the RESIZE events, because getch keep
229 // returning ERR until a real key is pressed :-( 251 returning ERR until a real key is pressed :-(
252 */
230 if (key != ERR) { 253 if (key != ERR) {
231 ret = process_key(key); 254 ret = process_key(key);
232 refresh = 0; 255 refresh = 0;
233 } else if (refresh++ > 1) { 256 } else if (refresh++ > 1) {
234 doupdate(); 257 doupdate();