equal
deleted
inserted
replaced
21 #include <string.h> |
21 #include <string.h> |
22 #include "r_dir.h" |
22 #include "r_dir.h" |
23 #include "r_obey.h" |
23 #include "r_obey.h" |
24 #include "r_rom.h" |
24 #include "r_rom.h" |
25 #include "r_global.h" |
25 #include "r_global.h" |
|
26 #include "utf16string.h" |
26 |
27 |
27 // Generalised set handling |
28 // Generalised set handling |
28 |
29 |
29 // class SetMember |
30 // class SetMember |
30 TInt SetMember::TotalInSystem=0; |
31 TInt SetMember::TotalInSystem=0; |
87 { |
88 { |
88 TRACE(TDIR,Print(EAlways,"FiniteSet %08x Destruct, iCount=%d\n",this,iCount)); |
89 TRACE(TDIR,Print(EAlways,"FiniteSet %08x Destruct, iCount=%d\n",this,iCount)); |
89 TInt i; |
90 TInt i; |
90 for (i=0; i<iCount; i++) |
91 for (i=0; i<iCount; i++) |
91 iMembers[i]->Close(); |
92 iMembers[i]->Close(); |
92 delete[] iMembers; |
93 if(iMembers) |
|
94 delete[] iMembers; |
93 } |
95 } |
94 |
96 |
95 TInt FiniteSet::Find(const SetMember& aMember, TInt& anIndex) const |
97 TInt FiniteSet::Find(const SetMember& aMember, TInt& anIndex) const |
96 { |
98 { |
97 if (iCount==0) |
99 if (iCount==0) |
386 pE->iAddressLin=iRomNode->iRomFile->iAddresses.iRunAddr; |
388 pE->iAddressLin=iRomNode->iRomFile->iAddresses.iRunAddr; |
387 if (IsFile()) |
389 if (IsFile()) |
388 iRomNode->iRomFile->SetRomEntry(pE); |
390 iRomNode->iRomFile->SetRomEntry(pE); |
389 pE->iName[0]=0; |
391 pE->iName[0]=0; |
390 pE->iName[1]=0; |
392 pE->iName[1]=0; |
391 TInt nl=iRomNode->NameCpy((char*)pE->iName); |
393 int nameLen = strlen(iRomNode->iName); |
392 pE->iNameLength=(TUint8)nl; |
394 if(Unicode){ |
393 if (Unicode) |
395 UTF16String unistr(iRomNode->iName,nameLen); |
394 nl<<=1; |
396 pE->iNameLength = unistr.length(); |
395 anAddr+=Align4(KRomEntrySize+nl); |
397 memcpy(pE->iName,unistr.c_str(),unistr.bytes()); |
|
398 anAddr+=Align4(KRomEntrySize + unistr.bytes()); |
|
399 } |
|
400 else{ |
|
401 memcpy(pE->iName,iRomNode->iName,nameLen); |
|
402 anAddr+=Align4(KRomEntrySize + nameLen); |
|
403 pE->iNameLength = nameLen ; |
|
404 } |
|
405 |
|
406 |
396 TRACE(TDIR,DumpRomEntry(*pE)); |
407 TRACE(TDIR,DumpRomEntry(*pE)); |
397 return pE; |
408 return pE; |
398 } |
409 } |
399 |
410 |
400 const TText* Entry::Name() const |
411 const char* Entry::Name() const |
401 { |
412 { |
402 return iRomNode->iName; |
413 return iRomNode->iName; |
403 } |
414 } |
404 |
415 |
405 // class FileEntry |
416 // class FileEntry |