]> git.saurik.com Git - android/aapt.git/commitdiff
am 2e7427f3: Merge "Add LFH offset to verbose list of APK" into gingerbread
authorKenny Root <kroot@google.com>
Thu, 26 Aug 2010 00:22:01 +0000 (17:22 -0700)
committerAndroid Git Automerger <android-git-automerger@android.com>
Thu, 26 Aug 2010 00:22:01 +0000 (17:22 -0700)
Merge commit '2e7427f39ec15dcb43cc1247372b53980be11d38' into gingerbread-plus-aosp

* commit '2e7427f39ec15dcb43cc1247372b53980be11d38':
  Add LFH offset to verbose list of APK

Command.cpp
ZipEntry.h

index 35124aad19ea5089672b864bc4b084745d5b3071..b0f086bf6bc2df6eea9d5f81ac21bef633641028 100644 (file)
@@ -141,9 +141,9 @@ int doList(Bundle* bundle)
     if (bundle->getVerbose()) {
         printf("Archive:  %s\n", zipFileName);
         printf(
-            " Length   Method    Size  Ratio   Date   Time   CRC-32    Name\n");
+            " Length   Method    Size  Ratio   Offset      Date  Time  CRC-32    Name\n");
         printf(
-            "--------  ------  ------- -----   ----   ----   ------    ----\n");
+            "--------  ------  ------- -----  -------      ----  ----  ------    ----\n");
     }
 
     totalUncLen = totalCompLen = 0;
@@ -159,12 +159,13 @@ int doList(Bundle* bundle)
             strftime(dateBuf, sizeof(dateBuf), "%m-%d-%y %H:%M",
                 localtime(&when));
 
-            printf("%8ld  %-7.7s %7ld %3d%%  %s  %08lx  %s\n",
+            printf("%8ld  %-7.7s %7ld %3d%%  %8zd  %s  %08lx  %s\n",
                 (long) entry->getUncompressedLen(),
                 compressionName(entry->getCompressionMethod()),
                 (long) entry->getCompressedLen(),
                 calcPercent(entry->getUncompressedLen(),
                             entry->getCompressedLen()),
+                (size_t) entry->getLFHOffset(),
                 dateBuf,
                 entry->getCRC32(),
                 entry->getFileName());
index 7f721b46321a16a112c8ff707fd349841d9c8a21..c2f3227cf230bc92ec998adc905920b0ecf7e449 100644 (file)
@@ -71,6 +71,11 @@ public:
      */
     off_t getCompressedLen(void) const { return mCDE.mCompressedSize; }
 
+    /*
+     * Return the offset of the local file header.
+     */
+    off_t getLFHOffset(void) const { return mCDE.mLocalHeaderRelOffset; }
+
     /*
      * Return the absolute file offset of the start of the compressed or
      * uncompressed data.
@@ -185,11 +190,6 @@ protected:
      */
     void setModWhen(time_t when);
 
-    /*
-     * Return the offset of the local file header.
-     */
-    off_t getLFHOffset(void) const { return mCDE.mLocalHeaderRelOffset; }
-
     /*
      * Set the offset of the local file header, relative to the start of
      * the current file.