aboutsummaryrefslogtreecommitdiffstats
path: root/apps/sympathy.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/sympathy.c')
-rw-r--r--apps/sympathy.c32
1 files changed, 19 insertions, 13 deletions
diff --git a/apps/sympathy.c b/apps/sympathy.c
index dc9dd66..33c47e7 100644
--- a/apps/sympathy.c
+++ b/apps/sympathy.c
@@ -11,6 +11,9 @@ static char rcsid[] =
/*
* $Log$
+ * Revision 1.34 2008/03/06 16:49:39 james
+ * *** empty log message ***
+ *
* Revision 1.33 2008/03/06 16:49:05 james
* *** empty log message ***
*
@@ -436,13 +439,13 @@ get_hostname (void)
int
main (int argc, char *argv[])
{
- Context ctx_store={0},*ctx=&ctx_store;
+ Context ctx_store = { 0 }, *ctx = &ctx_store;
int c;
extern char *optarg;
extern int optind, opterr, optopt;
CRT_Pos size = { VT102_COLS_80, VT102_ROWS_24 };
- ANSI *ansi=NULL;
+ ANSI *ansi = NULL;
int csnok_pipe[2] = { 0 };
int csnok = 0;
@@ -551,7 +554,7 @@ main (int argc, char *argv[])
if (oflags['c'] && oflags['s'] && oflags['F'])
fatal_moan ("-F is incompatible with -c -s");
- if (oflags['H'] && oflags['N'])
+ if (oflags['H'] && oflags['N'])
fatal_moan ("-H is incompatible with -N");
/*implement server and client: this process forks. The parent */
@@ -620,8 +623,8 @@ main (int argc, char *argv[])
if (oflags['c'] && !oflags['k'] && !oflags['r'])
fatal_moan ("-c requires a socket to be specified with -s or -k or -r");
- if ((oflags['H'] || oflags['N'] || oflags['I'] ) && oflags['s'])
- fatal_moan("-s is incompatible with -H, -N and -I");
+ if ((oflags['H'] || oflags['N'] || oflags['I']) && oflags['s'])
+ fatal_moan ("-s is incompatible with -H, -N and -I");
if ((oflags['p'] || oflags['d'] || oflags['K'] || oflags['b'] || oflags['f']
|| oflags['L'] || oflags['R'] || oflags['P']) && oflags['c'])
@@ -806,10 +809,12 @@ main (int argc, char *argv[])
if (oflags['c'] || oflags['t'])
{
- if (oflags['N']) {
- ctx->r=rx_new_raw(0,1);
- ansi=ansi_new_raw(0,1);
- } else if (oflags['H'])
+ if (oflags['N'])
+ {
+ ctx->r = rx_new_raw (0, 1);
+ ansi = ansi_new_raw (0, 1);
+ }
+ else if (oflags['H'])
{
ansi = ansi_new_html (stdout);
}
@@ -821,16 +826,17 @@ main (int argc, char *argv[])
oflags['u'] ? 0 : 1);
ansi->reset (ansi, NULL);
}
- if (oflags['I']) {
- //FIXME ...
- }
+ if (oflags['I'])
+ {
+ //FIXME ...
+ }
}
ctx->v = vt102_new (&size);
ctx->h = history_new (history);
- mainloop (ctx,ansi, server_socket, client_socket);
+ mainloop (ctx, ansi, server_socket, client_socket);
// mainloop (tty, server_socket, client_socket, ansi, log, history, &size);