X-Git-Url: https://git.saurik.com/android/aapt.git/blobdiff_plain/65e6371ed104cb80ea8a0cee0f31c07362bc1fff..96e6f4ca1e3d6173051ffaac931129e6a60cbdd5:/StringPool.cpp diff --git a/StringPool.cpp b/StringPool.cpp index 51afc0a..9a0a1c4 100644 --- a/StringPool.cpp +++ b/StringPool.cpp @@ -8,6 +8,14 @@ #include +#if HAVE_PRINTF_ZD +# define ZD "%zd" +# define ZD_TYPE ssize_t +#else +# define ZD "%ld" +# define ZD_TYPE long +#endif + #define NOISY(x) //x void strcpy16_htod(uint16_t* dst, const uint16_t* src) @@ -25,8 +33,12 @@ void printStringPool(const ResStringPool* pool) const size_t NS = pool->size(); for (size_t s=0; sstringAt(s, &len)).string()); + const char *str = (const char*)pool->string8At(s, &len); + if (str == NULL) { + str = String8(pool->stringAt(s, &len)).string(); + } + + printf("String #" ZD ": %s\n", (ZD_TYPE) s, str); } }