extractHistory.c 527 B

12345678910111213141516171819202122232425
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include "transform.h"
  4. #include "zip.h"
  5. #include "stopif.h"
  6. #include "extractHistory.h"
  7. void usage(const char *name) {
  8. printf("%s inputFile\n", name);
  9. }
  10. int main(int argc, char **argv) {
  11. if (argc < 2) {
  12. usage(argv[0]);
  13. return 1;
  14. }
  15. char *dot = strrchr(argv[1], '.');
  16. Stopif(!dot, return 1, "Bad input file name!\n");
  17. Stopif(!transformLoad(mqxliffHistory, sizeof(mqxliffHistory)), return 1, "Can't load transform!\n");
  18. readZIP(argv[1], historyFile);
  19. transformCleanup();
  20. }