Example #1
0
void copyResultsBack(LPFIELDSRESULTS lpFieldsResults){
	   int i,  lenTmp;
	   lenTmp = strlen(resultTmp);
	   strcpy(lpFieldsResults->result, resultTmp);
	   strcpy(lpFieldsResults->cand2, cand2Tmp);
	   for(i=0;i<lenTmp;i++){
		   lpFieldsResults->flConf[i] = flConfTmp[i];
	   }
	   copyQuad(lpFieldsResults->flQuad, flQuadTmp, 0, lenTmp);
}
Example #2
0
PassOwnPtr<CCRenderPassDrawQuad> CCRenderPassDrawQuad::copy(const CCSharedQuadState* copiedSharedQuadState, CCRenderPass::Id copiedRenderPassId) const
{
    unsigned bytes = size();
    ASSERT(bytes);

    OwnPtr<CCRenderPassDrawQuad> copyQuad(adoptPtr(reinterpret_cast<CCRenderPassDrawQuad*>(new char[bytes])));
    memcpy(copyQuad.get(), this, bytes);
    copyQuad->setSharedQuadState(copiedSharedQuadState);
    copyQuad->m_renderPassId = copiedRenderPassId;

    return copyQuad.release();
}
Example #3
0
void replaceFirstCharsTmp(LPFIELDSRESULTS lpFieldsResults, int iStart, int iStop, int n){
	  int i, k;
	  if(n > strlen(resultTmp)) return;
      k = iStart;
	  for(i=0;i<n;i++){
		  resultTmp[i]= lpFieldsResults->result[k];
		  cand2Tmp[i]=  lpFieldsResults->cand2[k];
	      flConfTmp[i] = lpFieldsResults->flConf[k];
	      k++;
	  }
	  copyQuad(flQuadTmp, lpFieldsResults->flQuad,  iStart, iStart+n-1);

}
Example #4
0
void copyLine(LPFIELDSRESULTS lpFieldsResults, int iStart, int iStop){
	   int i, k;
	   k = 0;
	   for(i=iStart;i<=iStop;i++){
		   result[k] = lpFieldsResults->result[i];
		   cand2[k]  = lpFieldsResults->cand2[i];
		   flConf[k] = lpFieldsResults->flConf[i];
		   k++;
	   }
//	 printf("  lpFieldsResults->flQuad[1].p1X= %d, lpFieldsResults->flQuad[2].p2X= %d  \n", lpFieldsResults->flQuad[1].p1X, lpFieldsResults->flQuad[2].p2X);
	   copyQuad(flQuad, lpFieldsResults->flQuad, iStart, iStop);
//  printf("  flQuad[1].p1X= %d, flQuad[2].p2X= %d  \n", flQuad[1].p1X, flQuad[2].p2X);
	   result[k] = 0;
	   cand2[k] = 0;
}