Added a heartbeat function to the driver code. Both the

MatrixOrbital driver and the curses driver now have their own
heartbeat functions.
This commit is contained in:
ddouthitt
2001-10-04 21:05:15 +00:00
parent a1a557a767
commit 39b84431a0
10 changed files with 95 additions and 16 deletions
+3 -2
View File
@@ -7,6 +7,7 @@
#include "screen.h"
#include "widget.h"
#include "render.h"
char *types[] = { "none",
"string",
@@ -164,7 +165,7 @@ widget_add (screen * s, char *id, char *type, char *in, int sock)
list = s->widgets;
if (0 == strcmp (id, "heartbeat")) {
s->heartbeat = 1;
s->heartbeat = HEARTBEAT_ON; // was 1
return 0;
}
@@ -260,7 +261,7 @@ widget_remove (screen * s, char *id, int sock)
list = s->widgets;
if (0 == strcmp (id, "heartbeat")) {
s->heartbeat = 0;
s->heartbeat = HEARTBEAT_OFF; // was 0
return 0;
}
// Make sure this screen *does* exist...