From: Xavier Ducrohet Date: Tue, 15 Jan 2013 22:48:02 +0000 (-0800) Subject: am 6080cc5f: resolved conflicts for merge of dd52dfed to jb-mr1.1-ub-dev X-Git-Url: https://git.saurik.com/android/aapt.git/commitdiff_plain/d6ecd33ad35cff96758b2d5adf553ebbb791d95a?hp=218c8389d15ef0667eac8bc883f63eeb7133bdea am 6080cc5f: resolved conflicts for merge of dd52dfed to jb-mr1.1-ub-dev * commit '6080cc5fd7c332c79098a50605c0c37d99d4c481': Fix the single crunch command to return the right error code. --- diff --git a/Command.cpp b/Command.cpp index 0a5e590..08d6554 100644 --- a/Command.cpp +++ b/Command.cpp @@ -1839,6 +1839,25 @@ int doCrunch(Bundle* bundle) return NO_ERROR; } +/* + * Do PNG Crunching on a single flag + * -i points to a single png file + * -o points to a single png output file + */ +int doSingleCrunch(Bundle* bundle) +{ + fprintf(stdout, "Crunching single PNG file: %s\n", bundle->getSingleCrunchInputFile()); + fprintf(stdout, "\tOutput file: %s\n", bundle->getSingleCrunchOutputFile()); + + String8 input(bundle->getSingleCrunchInputFile()); + String8 output(bundle->getSingleCrunchOutputFile()); + if (preProcessImageToCache(bundle, input, output) != NO_ERROR) { + // we can't return the status_t as it gets truncate to the lower 8 bits. + return 42; + } + return NO_ERROR; +} + char CONSOLE_DATA[2925] = { 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 95, 46, 32, 32, 32, 32, 32, 32, 32, 32, 32,