s.sendptr = s.textlen = 0;
acked(void)    {  s.sendptr += s.sentlen;  s.sentlen = 0;  if(s.sendptr == s.textlen) {    switch(s.state) {    case STATE_SEND_DATA_HEADERS:      s.state = STATE_SEND_DATA_MESSAGE;      break;    case STATE_SEND_DATA_MESSAGE:      s.state = STATE_SEND_DATA_END;      break;    case STATE_SEND_DATA_END:      s.state = STATE_SEND_QUIT;      break;    case STATE_SEND_QUIT:      s.state = STATE_SEND_DONE;      smtp_done(SMTP_ERR_OK);      uip_close();      break;    }    s.sendptr = s.textlen = 0;  }}