chiark / gitweb /
remove obsolete stuff
authorian <ian>
Sun, 4 May 2008 16:01:24 +0000 (16:01 +0000)
committerian <ian>
Sun, 4 May 2008 16:01:24 +0000 (16:01 +0000)
hostside/Makefile
hostside/client.c [deleted file]
hostside/dummy-trains.c [deleted file]
hostside/multiplex.c [deleted file]
hostside/output.c [deleted file]
hostside/selectout.c [deleted file]

index 019e72427d1d062e2c979c9dc9ad50ddc698b2ac..168b18e277debd828ebc33a01646684ddd2ade20 100644 (file)
@@ -71,13 +71,6 @@ safety:              safety.o utils.o trackloc.o ../layout/ours.layout-data.o
 %:             %.gen
                ./$^ $o
 
-hostside:      hostside.o serialio.o client.o obc.o commands.o utils.o \
-                nmra.o encode.o retransmit.o output.o auproto-pic.o \
-                parseutils.o \
-                record-l.o record-y.o record.o \
-                -loop
-               $(LINK)
-
 clean:
                rm -f *.o *.d $(TARGETS) selectors.h
                rm -f auproto-pic.h *~ core proto-expanded
diff --git a/hostside/client.c b/hostside/client.c
deleted file mode 100644 (file)
index 8b3a24a..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/**/
-
-#include <stdarg.h>
-#include <string.h>
-#include <stdlib.h>
-#include <errno.h>
-
-#include "multiplex.h"
-#include "../layout/dlist.h"
-
-struct ClientList clients;
-
-static void new_client(int fd, OutBufferError error,
-                      char *desc, Selector default_selectors) {
-  Client *cl;
-  int r;
-  
-  cl= mmalloc(sizeof(*cl));
-  cl->sel= default_selectors;
-  
-  cl->ci.out.desc= desc;
-  cl->ci.out.fd= fd;
-  cl->ci.out.error= error;
-  cmdin_new(&cl->ci);
-
-  LIST_LINK_TAIL(clients, cl);
-}
-
-static void stdin_error(OutBufferChain *ch, const char *e1, const char *e2) {
-  if (!e1)
-    exit(0);
-  fprintf(stderr,"stdin: %s: %s\n", e1, e2);
-  exit(12);  
-}
-
-void stdin_client(void) {
-  new_client(0, stdin_error, (char*)"stdin", sel_picio|sel_picioh);
-}
diff --git a/hostside/dummy-trains.c b/hostside/dummy-trains.c
deleted file mode 100644 (file)
index f03295a..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- */
-
-FIXME this should go in a config file
-
-#include "realtime.h"
-
-#define NOTA_TRAIN { 0,0,0,0, "internal-error-not-a-train" }
-
-#define SPEED_MMS2INTERN(mms /* mm/s */) \
-  (((mms) * SPEED_UNIT + 999) / 1000)
-
-const TrainInfo info_trains[]= {
-  /* data here is all made up ! */
-  NOTA_TRAIN,
-  { SPEED_MMS2INTERN(1000), 20, 900, 20 },
-  { SPEED_MMS2INTERN(400), 10, 50, 10 },
-  { 0,0,0,0,0 }
-};
diff --git a/hostside/multiplex.c b/hostside/multiplex.c
deleted file mode 100644 (file)
index 1d30794..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-void vbadcmd(ParseState *ps, const char *fmt, va_list al) {
-  voerror(&ps->ci->out,fmt,al);
-}
-
diff --git a/hostside/output.c b/hostside/output.c
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/hostside/selectout.c b/hostside/selectout.c
deleted file mode 100644 (file)
index 4f470d0..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * mulitplexer daemon
- * transmissions to clients of their selected messages
- */
-
-#include <string.h>
-#include <stdarg.h>
-
-#include "multiplex.h"
-#include "auproto-pic.h"
-
-#define FOR_CLS(s) do{                         \
-    Client *cl, *next_cl;                      \
-    for (cl= clients.head;                     \
-        cl;                                    \
-        cl= next_cl) {                         \
-      OutBufferChain *ch= &cl->ch;             \
-      next_cl= cl->next;                       \
-      if (!(sel & cl->sel)) continue;          \
-      s;                                       \
-    }                                          \
-  }while(0)
-
-void sovprintf(Selector sel, const char *fmt, va_list al) {
-  FOR_CLS( ovprintf(ch, fmt, al) );
-}
-
-void soprintf(Selector sel, const char *fmt, ...)
-  { va_list al; va_start(al,fmt); sovprintf(sel,fmt,al); va_end(al); }
-
-void sowrite(Selector sel, const char *data, int l) {
-  FOR_CLS( owrite(ch, data, l) );
-}