Loading ...
Sorry, an error occurred while loading the content.

This is revised version of ReadLine()

Expand Messages
  • wangxsteven
    while (buff != end) { if (m_buff == m_buffend) { if (!Readbuff()) break; } else { c = *m_buff++; if (c == r || c == n ) { if (c == r && (m_buff !=
    Message 1 of 1 , May 27 2:44 AM
    • 0 Attachment
      while (buff != end)
      {
      if (m_buff == m_buffend)
      {
      if (!Readbuff())
      break;
      }
      else
      {
      c = *m_buff++;
      if (c == '\r' || c == '\n')
      {
      if (c == '\r' && (m_buff != m_buffend
      || Readbuff()) && *m_buff == '\n')
      ++m_buff;
      *buff = 0;

      // Strip trailing space
      while ( numread > 0 && sp_isspace(*(--
      buff)))
      {
      *buff = '\0';
      numread--;
      }

      break;
      }
      else
      {
      *buff++ = c;
      ++numread;
      }
      }
      }
    Your message has been successfully submitted and would be delivered to recipients shortly.