aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorjames <>2008-02-14 10:36:18 +0000
committerjames <>2008-02-14 10:36:18 +0000
commit63abab3ba42f94c69677fced4f8b414e59ec4a37 (patch)
tree569b931fb6b8f641fd4dd9f106ae191d88817c78 /apps
parent77c86f1e81b90ad59726ee3704a479f07c34786b (diff)
downloadsympathy-63abab3ba42f94c69677fced4f8b414e59ec4a37.tar.gz
sympathy-63abab3ba42f94c69677fced4f8b414e59ec4a37.tar.bz2
sympathy-63abab3ba42f94c69677fced4f8b414e59ec4a37.zip
*** empty log message ***
Diffstat (limited to 'apps')
-rw-r--r--apps/client.c7
-rw-r--r--apps/clients.c14
-rw-r--r--apps/clients.h28
-rw-r--r--apps/sympathyd.c25
4 files changed, 45 insertions, 29 deletions
diff --git a/apps/client.c b/apps/client.c
index 28526f2..541603b 100644
--- a/apps/client.c
+++ b/apps/client.c
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$";
/*
* $Log$
+ * Revision 1.5 2008/02/14 10:34:47 james
+ * *** empty log message ***
+ *
* Revision 1.4 2008/02/14 10:34:30 james
* *** empty log message ***
*
@@ -53,8 +56,8 @@ server_msg (IPC_Msg * m, Context * c)
vt102_parse (c, m->term.term, m->term.len);
break;
case IPC_MSG_TYPE_STATUS:
- vt102_status_line(c->v,m->status.status);
- break;
+ vt102_status_line (c->v, m->status.status);
+ break;
default:
fprintf (stderr, "Unhandeled message type %d\n", m->hdr.type);
}
diff --git a/apps/clients.c b/apps/clients.c
index cd7bcee..40713a9 100644
--- a/apps/clients.c
+++ b/apps/clients.c
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$";
/*
* $Log$
+ * Revision 1.5 2008/02/14 10:34:47 james
+ * *** empty log message ***
+ *
* Revision 1.4 2008/02/14 10:34:30 james
* *** empty log message ***
*
@@ -180,8 +183,9 @@ send_status (Clients * cs, char *msg)
Client *c;
- if (!msg) return;
- len=strlen(msg)+1;
+ if (!msg)
+ return;
+ len = strlen (msg) + 1;
if (!len)
return;
@@ -190,8 +194,8 @@ send_status (Clients * cs, char *msg)
m->size = len + sizeof (IPC_Msg_status);
m->type = IPC_MSG_TYPE_STATUS;
- strncpy(m->status,msg, IPC_MAX_BUF);
- m->status[IPC_MAX_BUF-1]=0;
+ strncpy (m->status, msg, IPC_MAX_BUF);
+ m->status[IPC_MAX_BUF - 1] = 0;
for (c = cs->head; c; c = c->next)
{
@@ -262,5 +266,3 @@ send_vt102 (VT102 * v, Client * c)
c->dead++;
}
-
-
diff --git a/apps/clients.h b/apps/clients.h
index 605b3cd..f8dd9f1 100644
--- a/apps/clients.h
+++ b/apps/clients.h
@@ -12,6 +12,9 @@
/*
* $Log$
+ * Revision 1.5 2008/02/14 10:34:47 james
+ * *** empty log message ***
+ *
* Revision 1.4 2008/02/14 10:34:30 james
* *** empty log message ***
*
@@ -44,17 +47,18 @@ typedef struct
/* clients.c */
-extern void client_free(Client *c);
-extern Client *clients_new_client(Clients *cs, Socket *s, Context *ctx);
-extern void clients_reap(Clients *cs);
-extern Clients *clients_new(void);
-extern void clients_pre_select(Clients *cs, fd_set *rfds, fd_set *wfds);
-extern void clients_post_select(Clients *cs, Context *ctx, fd_set *rfds, fd_set *wfds);
-extern void clients_shutdown(Clients *cs);
-
-extern int send_output(Clients *cs, void *buf, int len);
-extern int send_status(Clients *cs, char *msg);
-extern void send_history(History *h, Client *c);
-extern void send_vt102(VT102 *v, Client *c);
+extern void client_free (Client * c);
+extern Client *clients_new_client (Clients * cs, Socket * s, Context * ctx);
+extern void clients_reap (Clients * cs);
+extern Clients *clients_new (void);
+extern void clients_pre_select (Clients * cs, fd_set * rfds, fd_set * wfds);
+extern void clients_post_select (Clients * cs, Context * ctx, fd_set * rfds,
+ fd_set * wfds);
+extern void clients_shutdown (Clients * cs);
+
+extern int send_output (Clients * cs, void *buf, int len);
+extern int send_status (Clients * cs, char *msg);
+extern void send_history (History * h, Client * c);
+extern void send_vt102 (VT102 * v, Client * c);
#endif
diff --git a/apps/sympathyd.c b/apps/sympathyd.c
index 49dd312..352b6a9 100644
--- a/apps/sympathyd.c
+++ b/apps/sympathyd.c
@@ -11,6 +11,9 @@ static char rcsid[] =
/*
* $Log$
+ * Revision 1.9 2008/02/14 10:34:47 james
+ * *** empty log message ***
+ *
* Revision 1.8 2008/02/14 10:34:30 james
* *** empty log message ***
*
@@ -174,7 +177,7 @@ log_line_changes (Context * ctx, int old, int new)
}
static char *
-do_line (char *ptr,int lines, int line)
+do_line (char *ptr, int lines, int line)
{
char *lname;
@@ -207,8 +210,9 @@ check_status (Context * c, Clients * cs)
log_line_changes (c, old_status.lines, status.lines);
- t=c->t->name;
- if (!strncmp(t,"/dev/",5)) t+=5;
+ t = c->t->name;
+ if (!strncmp (t, "/dev/", 5))
+ t += 5;
while (*t)
*(ptr++) = *(t++);
@@ -220,12 +224,13 @@ check_status (Context * c, Clients * cs)
ptr = do_line (ptr, status.lines, TIOCM_DSR);
ptr = do_line (ptr, status.lines, TIOCM_RI);
- if (status.crtscts) {
- t=", Flow";
- while (*t)
- *(ptr++) = *(t++);
+ if (status.crtscts)
+ {
+ t = ", Flow";
+ while (*t)
+ *(ptr++) = *(t++);
}
-
+
if (status.lines & TIOCM_CD)
{
ptr +=
@@ -239,7 +244,9 @@ check_status (Context * c, Clients * cs)
status.cd_edge_sec % 60);
}
- ptr += sprintf (ptr, ", %d client%s", status.nclients,(status.nclients==1) ? "":"s");
+ ptr +=
+ sprintf (ptr, ", %d client%s", status.nclients,
+ (status.nclients == 1) ? "" : "s");
*ptr = 0;