void ToMD5String(unsigned char* puc, char* sz) { CChars c; c.Init(); c.AppendHexLoHi(puc, 16); strcpy(sz, c.Text()); c.Kill(); }
void CChannels::Dump(int iLineLength) { int i; CChannel* psChannel; char* szTypeName; CChars c; int iRemain; c.Init(); for (i = 0; i < masChannelOffsets.NumElements(); i++) { psChannel = masChannelOffsets.Get(i); szTypeName = gcTypeNames.GetPrettyName(psChannel->eType); c.Append("Channel["); c.Append(psChannel->iChannel); c.Append("]: Type["); c.Append(szTypeName); c.Append("], ByteOffset["); c.Append(psChannel->miByteOffset); c.Append("], BitOffset["); c.Append(psChannel->miBitOffset); c.Append("]\n"); } c.Append("Number of elements["); c.Append(miSize); c.Append("], Data array size["); c.Append(mabData.NumElements()); c.Append("]\n"); c.Append("ByteStride["); c.Append(miByteStride); c.Append("]\n"); c.Append("BitStride["); c.Append(miBitStride); c.Append("]\n"); if (iLineLength != 0) { for (i = 0; i <= mabData.NumElements()/iLineLength; i++) { if (mabData.NumElements() - iLineLength*i < iLineLength) { iRemain = mabData.NumElements() - iLineLength*i; } else { iRemain = iLineLength; } c.AppendHexLoHi(mabData.Get(i*iLineLength), iRemain); c.AppendNewLine(); } } c.Dump(); c.Kill(); }