static int imap_readchar (int fd, char *c)
static int imap_readchar (CONNECTION *conn, char *c)
static int imap_readchar (int fd, char *c){  static char inbuf[LONG_STRING];  static int bufpos=0, available=0;    if (bufpos>=available)  {    available = read (fd, inbuf, sizeof(inbuf));    bufpos = 0;    if (available <= 0)      return available; /* returns 0 for EOF or -1 for other error */  }  *c = inbuf[bufpos];  bufpos++;  return 1;}