예제 #1
0
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
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;
}
예제 #3
0
파일: msc.cpp 프로젝트: AmesianX/doxygen
QCString getMscImageMapFromFile(const QCString& inFile, const QCString& outDir,
                                const QCString& relPath,const QCString& context)
{
  QCString outFile = inFile + ".map";


  //printf("*** running:getMscImageMapFromFile \n");
  // chdir to the output dir, so dot can find the font file.
  QCString oldDir = QDir::currentDirPath().utf8();
  // go to the html output directory (i.e. path)
  QDir::setCurrent(outDir);
  //printf("Going to dir %s\n",QDir::currentDirPath().data());

  QCString mscExe = Config_getString("MSCGEN_PATH")+"mscgen"+portable_commandExtension();
  QCString mscArgs = "-T ismap -i \"";
  mscArgs+=inFile;
  QFileInfo fi(inFile);
  mscArgs+="\" -o \"";
  mscArgs+=outFile + "\"";

  int exitCode;
  portable_sysTimerStart();
  if ((exitCode=portable_system(mscExe,mscArgs,FALSE))!=0)
  {
    portable_sysTimerStop();
    QDir::setCurrent(oldDir);
    return "";
  }
  portable_sysTimerStop();
  
  QGString result;
  FTextStream tmpout(&result);
  convertMapFile(tmpout, outFile, relPath, context);
  QDir().remove(outFile);

  QDir::setCurrent(oldDir);
  return result.data();
}
예제 #4
0
void marshalQGString(StorageIntf *s,const QGString &str)
{
  uint l=str.length();
  marshalUInt(s,l);
  if (l>0) s->write(str.data(),l);
}