aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorjames <>2008-02-28 16:58:49 +0000
committerjames <>2008-02-28 16:58:49 +0000
commit68f1170ace397c32f9c80a6b7cb89388d88743f2 (patch)
tree3dbafbe88e81f2ba7c8c877c91a1f31d04941864 /apps
parent57dd88f415d70356e41f2bfd5c00c250bd085723 (diff)
downloadsympathy-68f1170ace397c32f9c80a6b7cb89388d88743f2.tar.gz
sympathy-68f1170ace397c32f9c80a6b7cb89388d88743f2.tar.bz2
sympathy-68f1170ace397c32f9c80a6b7cb89388d88743f2.zip
*** empty log message ***
Diffstat (limited to 'apps')
-rw-r--r--apps/clients.c7
-rw-r--r--apps/mainloop.c5
-rw-r--r--apps/sympathy.c84
-rw-r--r--apps/usage.c6
4 files changed, 59 insertions, 43 deletions
diff --git a/apps/clients.c b/apps/clients.c
index a4b5fce..d5bd256 100644
--- a/apps/clients.c
+++ b/apps/clients.c
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$";
/*
* $Log$
+ * Revision 1.14 2008/02/28 16:57:51 james
+ * *** empty log message ***
+ *
* Revision 1.13 2008/02/28 16:37:16 james
* *** empty log message ***
*
@@ -92,10 +95,10 @@ client_msg (IPC_Msg * m, Context * c)
tty_hangup (c->t);
break;
case IPC_MSG_TYPE_SETSIZE:
- vt102_resize(c,m->setsize.winsize);
+ vt102_resize (c, m->setsize.winsize);
break;
case IPC_MSG_TYPE_RESET:
- vt102_reset(c);
+ vt102_reset (c);
break;
default:
fprintf (stderr, "Unhandeled message type %d\n", m->hdr.type);
diff --git a/apps/mainloop.c b/apps/mainloop.c
index 7c648f3..9737bd2 100644
--- a/apps/mainloop.c
+++ b/apps/mainloop.c
@@ -11,6 +11,9 @@ static char rcsid[] =
/*
* $Log$
+ * Revision 1.20 2008/02/28 16:57:51 james
+ * *** empty log message ***
+ *
* Revision 1.19 2008/02/28 16:37:16 james
* *** empty log message ***
*
@@ -449,7 +452,7 @@ mainloop (TTY * tty, Socket * server_socket, Socket * client_socket,
}
- vt102_reset(&c);
+ vt102_reset (&c);
if (server_socket)
diff --git a/apps/sympathy.c b/apps/sympathy.c
index 91f6c0c..b5bf326 100644
--- a/apps/sympathy.c
+++ b/apps/sympathy.c
@@ -11,6 +11,9 @@ static char rcsid[] =
/*
* $Log$
+ * Revision 1.23 2008/02/28 16:57:51 james
+ * *** empty log message ***
+ *
* Revision 1.22 2008/02/28 01:47:44 james
* *** empty log message ***
*
@@ -264,7 +267,7 @@ main (int argc, char *argv[])
int c;
extern char *optarg;
extern int optind, opterr, optopt;
- CRT_Pos size = { VT102_COLS_80, VT102_ROWS };
+ CRT_Pos size = { VT102_COLS_80, VT102_ROWS_24 };
int oflags[128];
char *oargs[128];
@@ -322,13 +325,14 @@ main (int argc, char *argv[])
sum += oflags['l'];
sum += oflags['v'];
- if (!sum) {
- /*If no mode is specified behave like screen */
- oflags['s']++;
- oflags['c']++;
- sum++;
- }
-
+ if (!sum)
+ {
+ /*If no mode is specified behave like screen */
+ oflags['s']++;
+ oflags['c']++;
+ sum++;
+ }
+
if (sum != 1)
fatal_moan
("specifiy exactly one of ( -c and or -s ), -t, -r, -l and -v");
@@ -367,11 +371,14 @@ main (int argc, char *argv[])
fatal_moan ("cannot parse -r %s as an integer", oargs['r']);
oflags['k']++;
- if (safe_atoi(id)>0) {
- oargs['k'] = mome ("/.sympathy/%s%d", hostname, safe_atoi(id));
- } else {
- oargs['k'] = mome ("/.sympathy/%s", id);
- }
+ if (safe_atoi (id) > 0)
+ {
+ oargs['k'] = mome ("/.sympathy/%s%d", hostname, safe_atoi (id));
+ }
+ else
+ {
+ oargs['k'] = mome ("/.sympathy/%s", id);
+ }
oflags['r'] = 0;
oflags['c']++;
}
@@ -463,7 +470,7 @@ main (int argc, char *argv[])
if ((size.x > VT102_MAX_COLS) || (size.x < 1))
fatal_moan ("-w requires a width between 1 and %d\n", VT102_MAX_COLS);
- if ((size.y > VT102_ROWS) || (size.y < 1))
+ if ((size.y > VT102_MAX_ROWS) || (size.y < 1))
fatal_moan ("-w requires a height between 1 and %d\n",
VT102_MAX_COLS);
@@ -493,30 +500,31 @@ main (int argc, char *argv[])
}
else
{
- /*HACK-- check that console=device does not occur in */
- /*/proc/cmdline*/
- if (!oargs['d'])
- fatal_moan("no argument to -d");
-
- {
- char kernel_cmdline[4096]={0};
- char search_string[1024]="console=";
- char *ptr=oargs['d'];
- int fd;
-
- if (!strncmp("/dev/",ptr,5)) ptr+=5;
-
- strcat(search_string,ptr);
-
- fd=open("/proc/cmdline",O_RDONLY);
- read(fd,kernel_cmdline,sizeof(kernel_cmdline));
- close(fd);
-
- kernel_cmdline[sizeof(kernel_cmdline)-1]=0;
-
- if (strstr(kernel_cmdline,search_string))
- fatal_moan("/proc/cmdline contains %s",search_string);
- }
+ /*HACK-- check that console=device does not occur in */
+ /*/proc/cmdline */
+ if (!oargs['d'])
+ fatal_moan ("no argument to -d");
+
+ {
+ char kernel_cmdline[4096] = { 0 };
+ char search_string[1024] = "console=";
+ char *ptr = oargs['d'];
+ int fd;
+
+ if (!strncmp ("/dev/", ptr, 5))
+ ptr += 5;
+
+ strcat (search_string, ptr);
+
+ fd = open ("/proc/cmdline", O_RDONLY);
+ read (fd, kernel_cmdline, sizeof (kernel_cmdline));
+ close (fd);
+
+ kernel_cmdline[sizeof (kernel_cmdline) - 1] = 0;
+
+ if (strstr (kernel_cmdline, search_string))
+ fatal_moan ("/proc/cmdline contains %s", search_string);
+ }
tty =
serial_open (oargs['d'],
diff --git a/apps/usage.c b/apps/usage.c
index d76f9d9..307511d 100644
--- a/apps/usage.c
+++ b/apps/usage.c
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$";
/*
* $Log$
+ * Revision 1.17 2008/02/28 16:57:51 james
+ * *** empty log message ***
+ *
* Revision 1.16 2008/02/27 18:29:49 james
* *** empty log message ***
*
@@ -120,8 +123,7 @@ usage (void)
" server, that are replayed on connexion\n"
" -u don't emit utf-8 try to use ISO-2202 to the local terminal\n"
" -w W[xH] start session with a screen of size W by H. 0<W<=132,\n"
- " 0<H<24, default 80 by 24\n"
- );
+ " 0<H<24, default 80 by 24\n");
exit (1);