Home | History | Annotate | Download | only in zipalign

Lines Matching defs:alignment

18  * Zip alignment tool
32 fprintf(stderr, "Zip alignment utility\n");
38 " <align>: alignment in bytes, e.g. '4' provides 32-bit alignment\n");
39 fprintf(stderr, " -c: check alignment only (does not modify file)\n");
47 static int copyAndAlign(ZipFile* pZin, ZipFile* pZout, int alignment)
77 padding = (alignment - (newOffset % alignment)) % alignment;
101 int alignment, bool force)
106 // alignment, inFileName, outFileName, force);
132 int result = copyAndAlign(&zin, &zout, alignment);
141 * Verify the alignment of a zip archive.
143 static int verify(const char* fileName, int alignment, bool verbose)
149 printf("Verifying alignment of %s (%d)...\n", fileName, alignment);
168 if ((offset % alignment) != 0) {
172 offset % alignment);
200 int alignment;
243 alignment = strtol(argv[0], &endp, 10);
244 if (*endp != '\0' || alignment <= 0) {
245 fprintf(stderr, "Invalid value for alignment: %s\n", argv[0]);
251 /* check existing archive for correct alignment */
252 result = verify(argv[1], alignment, verbose);
255 result = process(argv[1], argv[2], alignment, force);
259 result = verify(argv[2], alignment, verbose);