chiark / gitweb /
merge changes from trunk into our branch; cvs up -j branchpoint-hostside-wip-2006...
[trains.git] / hostside / hostside.h
index db981f5284bd30951ae9926f0121324995617584..d350c070916cafcdf8be38e6db671b8efda1a899 100644 (file)
@@ -1,4 +1,5 @@
 /*
+ * OBSOLETE FILE
  * declarations for hostside controller daemon
  */
 
@@ -7,54 +8,6 @@
 
 #include "common.h"
 
-#include <oop.h>
-#include <oop-read.h>
-
-typedef struct Client Client;
-typedef struct ParseState ParseState;
-typedef struct CmdInfo CmdInfo;
-typedef struct RetransmitNode RetransmitNode;
-
-/*---------- from obc.c ----------*/
-
-typedef struct OutBuffer OutBuffer;
-typedef struct OutBufferChain OutBufferChain;
-typedef void OutBufferError(OutBufferChain*, const char *e1, const char *e2);
-
-struct OutBufferChain {
-  /* set by user: */
-  char *desc;
-  int fd;
-  OutBufferError *error;
-  /* set/used by obc_..., oprintf, etc., only */
-  int done_of_head;
-  struct { OutBuffer *head, *tail; } obs;
-};
-
-void obc_init(OutBufferChain *ch);
-
-void ovprintf(OutBufferChain *ch, const char *fmt, va_list al)
-     __attribute__((format(printf,2,0)));
-void oprintf(OutBufferChain *ch, const char *msg, ...)
-     __attribute__((format(printf,2,3)));
-void owrite(OutBufferChain *ch, const char *data, int l);
-
-/*---------- from output.c ----------*/
-
-typedef unsigned long Selector;
-#include "selectors.h"
-
-void oovprintf(Selector sel, const char *fmt, va_list al)
-     __attribute__((format(printf,2,0)));
-void ooprintf(Selector sel, const char *fmt, ...)
-     __attribute__((format(printf,2,3)));
-void oowrite(Selector sel, const char *data, int l);
-
-void serial_transmit(const PicInsn *pi);
-
-void output_hex(Selector sel, const char *work,
-               const Byte *command, int length);
-
 /*---------- from protocol.c ----------*/
 
 typedef struct OrdinaryPicMessage OrdinaryPicMessage;
@@ -64,77 +17,4 @@ struct OrdinaryPicMessage {
   int operand_bits; /* 0: no operand.  >=7, insn is a 2-byte message */
 };
      
-/*---------- from hostside.c ----------*/
-
-extern oop_source *events;
-
-/*---------- from client.c ----------*/
-
-struct ClientList { Client *head, *tail; };
-extern struct ClientList clients;
-
-struct Client {
-  OutBufferChain ch;
-  Client *back, *next;
-  Selector sel;
-  oop_read *rd;
-};
-
-struct ParseState {
-  Client *cl;
-  const char *remain;
-  const char *thisword;
-  int lthisword;
-};
-
-struct CmdInfo {
-  const char *name;
-  void (*fn)(ParseState *ps, const CmdInfo *ci);
-  int xarg;
-};
-
-int lstrstrcmp(const char *a, int la, const char *b);
-int thiswordstrcmp(ParseState *ps, const char *b);
-
-int ps_word(ParseState *ps);
-int ps_needword(ParseState *ps);
-int ps_needhextoend(ParseState *ps, Byte *dbuf, int *len_io);
-void ps_callword(ParseState *ps, const CmdInfo *infs, const char *what);
-int ps_neednumber(ParseState *ps, long *r, long min, long max, const char *wh);
-int ps_neednoargs(ParseState *ps);
-
-void vbadcmd(ParseState *ps, const char *fmt, va_list al)
-     __attribute__((format(printf,2,0)));
-void badcmd(ParseState *ps, const char *fmt, ...)
-     __attribute__((format(printf,2,3)));
-
-void stdin_client(void);
-
-extern const CmdInfo toplevel_cmds[]; /* defined in commands.c*/
-
-/*---------- from retransmit.c ----------*/
-
-struct RetransmitNode {
-  /* set by caller: */
-  PicInsn pi;
-  /* internal: */
-};
-
-void retransmit_queue(RetransmitNode *rn);
-void retransmit_cancel(RetransmitNode *rn);
-
-/*---------- macro for table lookups, with help from client.c ----------*/
-
-#define some_lookup(ps, infos)                 \
-  ((const typeof(infos[0])*)                   \
-   any_lookup((ps),(infos),sizeof((infos)[0])))
-
-#define some_needword_lookup(ps, infos, what)                  \
-  ((const typeof(infos[0])*)                                   \
-   any_needword_lookup((ps),(infos),sizeof((infos)[0]),(what)))
-
-const void *any_lookup(ParseState *ps, const void *infos, size_t infosz);
-const void *any_needword_lookup(ParseState *ps, const void *infos,
-                               size_t sz, const char *what);
-
-#endif /*HOSTSIDE_H*/
+#endif