comparison mcabber/src/main.c @ 1426:a64778f5f26b

Implement FIFO named command pipe
author Mikael Berthe <mikael@lilotux.net>
date Mon, 18 Feb 2008 22:59:37 +0100
parents b0cfd9ab4b9f
children 071c8170b7de
comparison
equal deleted inserted replaced
1425:b0cfd9ab4b9f 1426:a64778f5f26b
40 #include "histolog.h" 40 #include "histolog.h"
41 #include "hooks.h" 41 #include "hooks.h"
42 #include "utils.h" 42 #include "utils.h"
43 #include "pgp.h" 43 #include "pgp.h"
44 #include "otr.h" 44 #include "otr.h"
45
46 #ifdef ENABLE_FIFO
47 # include "fifo.h"
48 #endif
45 49
46 #ifdef ENABLE_HGCSET 50 #ifdef ENABLE_HGCSET
47 # include "hgcset.h" 51 # include "hgcset.h"
48 #endif 52 #endif
49 53
289 puts("Compiled with OTR support."); 293 puts("Compiled with OTR support.");
290 #endif 294 #endif
291 #ifdef WITH_ASPELL 295 #ifdef WITH_ASPELL
292 puts("Compiled with Aspell support."); 296 puts("Compiled with Aspell support.");
293 #endif 297 #endif
298 #ifdef ENABLE_FIFO
299 puts("Compiled with FIFO support.");
300 #endif
294 #ifdef ENABLE_DEBUG 301 #ifdef ENABLE_DEBUG
295 puts("Compiled with debugging support."); 302 puts("Compiled with debugging support.");
296 #endif 303 #endif
297 } 304 }
298 305
485 scr_RosterDisplay("*"); 492 scr_RosterDisplay("*");
486 } 493 }
487 494
488 chatstates_disabled = settings_opt_get_int("disable_chatstates"); 495 chatstates_disabled = settings_opt_get_int("disable_chatstates");
489 496
497 #ifdef ENABLE_FIFO
498 /* Initialize FIFO named pipe */
499 fifo_init(settings_opt_get("fifo_name"));
500 #endif
501
490 if (ret < 0) { 502 if (ret < 0) {
491 scr_LogPrint(LPRINT_NORMAL, "No configuration file has been found."); 503 scr_LogPrint(LPRINT_NORMAL, "No configuration file has been found.");
492 scr_ShowBuddyWindow(); 504 scr_ShowBuddyWindow();
493 } else { 505 } else {
494 /* Connection */ 506 /* Connection */
513 hk_mainloop(); 525 hk_mainloop();
514 } 526 }
515 } 527 }
516 528
517 scr_TerminateCurses(); 529 scr_TerminateCurses();
530 #ifdef ENABLE_FIFO
531 fifo_deinit();
532 #endif
518 #ifdef HAVE_LIBOTR 533 #ifdef HAVE_LIBOTR
519 otr_terminate(); 534 otr_terminate();
520 #endif 535 #endif
521 jb_disconnect(); 536 jb_disconnect();
522 #ifdef HAVE_GPGME 537 #ifdef HAVE_GPGME