int main() { int argc, i; char** argv; init_toolbox(); /* put paths of all files dropped onto the app into argv */ argc = FTMac_GetArgv(&argv); if (argc < 2) { printf("Please drop one or more font files onto the app (but quit first!)\n"); exit(1); } /* move argv[1:] to argv[2:] and fill in the ppem arg */ for (i = argc; i > 1; i--) { argv[i] = argv[i-1]; } argc++; argv[1] = PPEM; /* call the original main() program */ original_main(argc, argv); }
////////////////////////////////// // The new main function to call the Ocelot tracer and the original main ////////////////////////////////// int main(int argc, char** argv) { TraceGenerator generator(argv[2], argv[1]); ocelot::addTraceGenerator(generator); original_main(argc - 2,argv + 2); return 0; }