X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=sympathy.git;a=blobdiff_plain;f=apps%2Fsympathy.c;h=df351f3e9111f56c40082daeeeb5655cfd2e6937;hp=29cf0ace8f1c5fffb29405b44020d99a069b554e;hb=ece1299582523fd5a339398bdddb77f525e2a2fc;hpb=590e9b4596f1caddf7c87dd767f4f57c6385c90b diff --git a/apps/sympathy.c b/apps/sympathy.c index 29cf0ac..df351f3 100644 --- a/apps/sympathy.c +++ b/apps/sympathy.c @@ -10,6 +10,15 @@ static char rcsid[] = "$Id$"; /* * $Log$ + * Revision 1.10 2008/02/20 19:44:37 james + * @@ + * + * Revision 1.9 2008/02/20 18:49:11 staffcvs + * *** empty log message *** + * + * Revision 1.8 2008/02/20 18:33:37 james + * *** empty log message *** + * * Revision 1.7 2008/02/20 18:31:44 james * *** empty log message *** * @@ -40,6 +49,9 @@ static char rcsid[] = "$Id$"; #include #include #include +#include +#include +#include #include "mainloop.h" @@ -303,11 +315,11 @@ main (int argc, char *argv[]) if (oflags['n']) { - nhistory = safe_atoi (oargs['n']); - if (nhistory < 0) + history = safe_atoi (oargs['n']); + if (history < 0) fatal_moan ("cannot parse -n %s as an integer", oargs['n']); - if (!nhistory) + if (!history) fatal_moan ("agrument to -n must be greater than zero"); } @@ -393,6 +405,11 @@ main (int argc, char *argv[]) oflags['p']++; } + if (oflags['s'] && !oflags['F']) + { + daemon (1, 0); /*incase socket is relative path, unlink then will fail */ + } + if (oflags['s'] || oflags['t']) { @@ -445,10 +462,6 @@ main (int argc, char *argv[]) } - if (oflags['s'] && !oflags['F']) - { - daemon (1, 0); /*incase socket is relative path, unlink then will fail */ - } if (oflags['c'] || oflags['t']) { @@ -464,15 +477,15 @@ main (int argc, char *argv[]) terminal_register_handlers (); ansi->terminal = terminal_open (0, 1); - ansi_reset (ansi, NULL); + ansi->reset(ansi, NULL); } } - mainloop (tty, server_socket, client_socket, ansi, log, nhistory); + mainloop (tty, server_socket, client_socket, ansi, log, history); if (ansi) { - ansi_terminal_reset (ansi); + ansi->close(ansi); terminal_atexit (); }