コード例 #1
0
ファイル: ftextstream.cpp プロジェクト: Constellation/doxygen
int QGStringBuffer::putch( int ch )
{
  //printf("QGStringBuffer::putch(%d) m_str=%p ioIndex=%d\n",
  //    ch,m_str,ioIndex);
  m_str->enlarge(ioIndex+2);
  m_str->data()[ioIndex] = (char)ch;
  ioIndex++;
  m_str->data()[ioIndex] = '\0';
  m_str->setLen(ioIndex);
  return ch;
}
コード例 #2
0
ファイル: ftextstream.cpp プロジェクト: Constellation/doxygen
int QGStringBuffer::writeBlock( const char *p, uint len )
{
  //printf("QGStringBuffer::writeBlock(%p,%d) m_str=%p ioIndex=%d\n",p,len,
  //    m_str,ioIndex);
  m_str->enlarge(ioIndex+len+1);
  memcpy(m_str->data()+ioIndex,p,len);
  ioIndex+=len;
  m_str->data()[ioIndex]='\0';
  m_str->setLen(ioIndex);
  return len;
}