extractHistory.c 603 B

12345678910111213141516171819202122232425262728
  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. #include "incbin.h"
  8. INCBIN(MqxliffHistory, "mqxliffHistory.xsl");
  9. void usage(const char *name) {
  10. printf("%s inputFile\n", name);
  11. }
  12. int main(int argc, char **argv) {
  13. if (argc < 2) {
  14. usage(argv[0]);
  15. return 1;
  16. }
  17. char *dot = strrchr(argv[1], '.');
  18. Stopif(!dot, return 1, "Bad input file name!\n");
  19. Stopif(!transformLoad((char*)gMqxliffHistoryData, gMqxliffHistorySize), return 1, "Can't load transform!\n");
  20. readZIP(argv[1], historyFile);
  21. transformCleanup();
  22. }