Mercurial > ~mikael > mcabber > hg
comparison mcabber/mcabber/main.c @ 1941:2256d0626730
Modularize fifo system (Myhailo Danylenko)
Merge patch from isbear's mcabber-experimental repository.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sun, 27 Feb 2011 17:42:27 +0100 |
parents | 7eadf86039e6 |
children | 7f7c6b87f1b1 |
comparison
equal
deleted
inserted
replaced
1940:7eadf86039e6 | 1941:2256d0626730 |
---|---|
39 #include "histolog.h" | 39 #include "histolog.h" |
40 #include "hooks.h" | 40 #include "hooks.h" |
41 #include "utils.h" | 41 #include "utils.h" |
42 #include "pgp.h" | 42 #include "pgp.h" |
43 #include "otr.h" | 43 #include "otr.h" |
44 #include "fifo.h" | |
45 #include "xmpp.h" | 44 #include "xmpp.h" |
46 #include "help.h" | 45 #include "help.h" |
47 #include "events.h" | 46 #include "events.h" |
47 | |
48 #ifndef MODULES_ENABLE | |
49 # include "fifo.h" | |
50 #endif | |
48 | 51 |
49 #ifdef MODULES_ENABLE | 52 #ifdef MODULES_ENABLE |
50 # include "compl.h" | 53 # include "compl.h" |
51 # include "modules.h" | 54 # include "modules.h" |
52 #endif | 55 #endif |
75 return ver; | 78 return ver; |
76 } | 79 } |
77 | 80 |
78 static void mcabber_terminate(const char *msg) | 81 static void mcabber_terminate(const char *msg) |
79 { | 82 { |
83 #ifndef MODULES_ENABLE | |
80 fifo_deinit(); | 84 fifo_deinit(); |
85 #endif | |
81 xmpp_disconnect(); | 86 xmpp_disconnect(); |
82 scr_terminate_curses(); | 87 scr_terminate_curses(); |
83 | 88 |
84 // Restore term settings, if needed. | 89 // Restore term settings, if needed. |
85 if (backup_termios) | 90 if (backup_termios) |
447 if (!buddylist_get_filter()) | 452 if (!buddylist_get_filter()) |
448 scr_roster_display("*"); | 453 scr_roster_display("*"); |
449 | 454 |
450 chatstates_disabled = settings_opt_get_int("disable_chatstates"); | 455 chatstates_disabled = settings_opt_get_int("disable_chatstates"); |
451 | 456 |
457 #ifndef MODULES_ENABLE | |
452 /* Initialize FIFO named pipe */ | 458 /* Initialize FIFO named pipe */ |
453 fifo_init(); | 459 fifo_init(); |
460 #endif | |
454 | 461 |
455 /* Load previous roster state */ | 462 /* Load previous roster state */ |
456 hlog_load_state(); | 463 hlog_load_state(); |
457 | 464 |
458 main_context = g_main_context_default(); | 465 main_context = g_main_context_default(); |
496 | 503 |
497 evs_deinit(); | 504 evs_deinit(); |
498 #ifdef MODULES_ENABLE | 505 #ifdef MODULES_ENABLE |
499 modules_deinit(); | 506 modules_deinit(); |
500 #endif | 507 #endif |
508 #ifndef MODULES_ENABLE | |
501 fifo_deinit(); | 509 fifo_deinit(); |
510 #endif | |
502 #ifdef HAVE_LIBOTR | 511 #ifdef HAVE_LIBOTR |
503 otr_terminate(); | 512 otr_terminate(); |
504 #endif | 513 #endif |
505 xmpp_disconnect(); | 514 xmpp_disconnect(); |
506 #ifdef HAVE_GPGME | 515 #ifdef HAVE_GPGME |