More formatting updates. Reduced whitespace, looks even better.
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
#include "screen.h"
|
||||
#include "widget.h"
|
||||
|
||||
|
||||
char *types[] = { "none",
|
||||
"string",
|
||||
"hbar",
|
||||
@@ -22,11 +21,9 @@ char *types[] = { "none",
|
||||
NULL,
|
||||
};
|
||||
|
||||
|
||||
static widget *widget_finder (LL * list, char *id);
|
||||
static int widget_remover (LL * list, widget * w);
|
||||
|
||||
|
||||
widget *
|
||||
widget_create ()
|
||||
{
|
||||
@@ -179,7 +176,6 @@ widget_add (screen * s, char *id, char *type, char *in, int sock)
|
||||
|
||||
debug ("widget_add(%s, %s, %s)\n", id, type, in);
|
||||
|
||||
|
||||
if (!s)
|
||||
return -1;
|
||||
if (!id)
|
||||
@@ -187,7 +183,6 @@ widget_add (screen * s, char *id, char *type, char *in, int sock)
|
||||
|
||||
list = s->widgets;
|
||||
|
||||
|
||||
if (0 == strcmp (id, "heartbeat")) {
|
||||
s->heartbeat = 1;
|
||||
return 0;
|
||||
@@ -231,10 +226,8 @@ widget_add (screen * s, char *id, char *type, char *in, int sock)
|
||||
return 2;
|
||||
}
|
||||
|
||||
|
||||
debug ("widget_add: making widget\n");
|
||||
|
||||
|
||||
// Now, make it...
|
||||
w = widget_create ();
|
||||
if (!w) {
|
||||
@@ -260,11 +253,9 @@ widget_add (screen * s, char *id, char *type, char *in, int sock)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Check for errors here?
|
||||
LL_Push (list, (void *) w);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -283,7 +274,6 @@ widget_remove (screen * s, char *id, int sock)
|
||||
|
||||
list = s->widgets;
|
||||
|
||||
|
||||
if (0 == strcmp (id, "heartbeat")) {
|
||||
s->heartbeat = 0;
|
||||
return 0;
|
||||
@@ -311,7 +301,6 @@ widget_remove (screen * s, char *id, int sock)
|
||||
// return 0;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
widget_remover (LL * list, widget * w)
|
||||
{
|
||||
@@ -325,7 +314,6 @@ widget_remover (LL * list, widget * w)
|
||||
if (!w)
|
||||
return 0;
|
||||
|
||||
|
||||
// Search through the list...
|
||||
LL_Rewind (list);
|
||||
do {
|
||||
|
||||
Reference in New Issue
Block a user