//#include "antmessage.h"
//#include "anttypes.h"
-#define S(e) if (-1 == (e)) {perror(#e);exit(1);} else
+#define S(e) do {if (-1 == (e)) { perror(#e);exit(1);} } while (0)
#define MAXMSG 30 // SYNC,LEN,MSG,data[9+],CHKSUM
#define MAXCHAN 32
#define hexval(c) ((c >= '0' && c <= '9') ? (c-'0') : ((c&0xdf)-'A'+10))
static int fd = -1;
-static int dbg = 0;
-static pthread_t commthread;;
-static int commenabled = 1;
+static int dbg = 1;
+static pthread_t commthread;
static RESPONSE_FUNC rfn = 0;
static uchar *rbufp;