int thin_start(int chan);
int thin_main(void *arg);
int thin_init(int chan);
int thin_read(int chan);
int thin_read_line(int chan, char *rslt,int bfsz);
int thin_getrest(int chan, char *out);
int thin_putrest(int chan, char *out, int len);
char *find_eom(char *part, int n, char *start, int len);
int thin_cmd_check(int chan, char *mid);
int thin_cmd_takethis(int chan, char *mid, int isihave);
int thin_cmd_ihave(int chan, char *mid);
int thin_cmd_quit(int chan);
int thin_cmd_error(int chan, char *cmd);
int thin_busy(int chan);
int thin_setdebug(void);
int thin_release(void);
