equal
deleted
inserted
replaced
578 break; |
578 break; |
579 aName[i++] = qu; |
579 aName[i++] = qu; |
580 aName.SetLength(i); |
580 aName.SetLength(i); |
581 } |
581 } |
582 |
582 |
|
583 TDes& MakePrintable(TDes& aDes) |
|
584 { |
|
585 TInt len = aDes.Length(); |
|
586 |
|
587 for (TInt i=0; i<len; i++) |
|
588 { |
|
589 if ((TUint8) aDes[i] < 0x20) |
|
590 aDes[i] = '?'; |
|
591 } |
|
592 return aDes; |
|
593 } |
|
594 |
583 GLDEF_C TBool DumpDirEntry(TInt aNum, const TUint8* aEntry) |
595 GLDEF_C TBool DumpDirEntry(TInt aNum, const TUint8* aEntry) |
584 // |
596 // |
585 // Dump a single directory entry to the log. Return false if it was end of |
597 // Dump a single directory entry to the log. Return false if it was end of |
586 // directory or an invalid entry (and don't display it). |
598 // directory or an invalid entry (and don't display it). |
587 // |
599 // |
601 { |
613 { |
602 TBuf16<15> name; |
614 TBuf16<15> name; |
603 ExtractNameString(name, aEntry); |
615 ExtractNameString(name, aEntry); |
604 TInt ord = aEntry[0]; |
616 TInt ord = aEntry[0]; |
605 if (ord & KDirLastLongEntry) |
617 if (ord & KDirLastLongEntry) |
606 RDebug::Print(_L("%5d: %-15S #%-2d LAST"), aNum, &name, ord & ~KDirLastLongEntry); |
618 RDebug::Print(_L("%5d: %-15S #%-2d LAST"), aNum, &MakePrintable(name), ord & ~KDirLastLongEntry); |
607 else |
619 else |
608 RDebug::Print(_L("%5d: %-15S #%-2d"), aNum, &name, ord & ~KDirLastLongEntry); |
620 RDebug::Print(_L("%5d: %-15S #%-2d"), aNum, &MakePrintable(name), ord & ~KDirLastLongEntry); |
609 } |
621 } |
610 else if (!IsValidDirEntry(d)) |
622 else if (!IsValidDirEntry(d)) |
611 { |
623 { |
612 if (aNum > 0) |
624 if (aNum > 0) |
613 RDebug::Print(_L("%5d: ============= INVALID ENTRY"), aNum); |
625 RDebug::Print(_L("%5d: ============= INVALID ENTRY"), aNum); |
616 else |
628 else |
617 { |
629 { |
618 TBuf<11> name; |
630 TBuf<11> name; |
619 name.Copy(d->Name()); |
631 name.Copy(d->Name()); |
620 RDebug::Print(_L("%5d: '%S' %S start %-5d size %d"), |
632 RDebug::Print(_L("%5d: '%S' %S start %-5d size %d"), |
621 aNum, &name, DirAttributes(d->Attributes()), d->StartCluster(), d->Size()); |
633 aNum, &MakePrintable(name), DirAttributes(d->Attributes()), d->StartCluster(), d->Size()); |
622 } |
634 } |
623 return ETrue; |
635 return ETrue; |
624 } |
636 } |
625 |
637 |
626 GLDEF_C void DumpDirCluster(const TUint8* aData, TInt aCluster=0) |
638 GLDEF_C void DumpDirCluster(const TUint8* aData, TInt aCluster=0) |