Wrap.c 372 B

1234567891011121314151617181920212223
  1. #include <stdio.h>
  2. #ifdef __CLASSIC_C__
  3. int main(argc, argv)
  4. int argc;
  5. char ** argv;
  6. #else
  7. int main(int argc, const char* argv[])
  8. #endif
  9. {
  10. FILE* fout = fopen(argv[argc-1], "w");
  11. printf("Wrap creating \"%s\"\n", argv[argc-1]);
  12. if(fout)
  13. {
  14. fprintf(fout, "int foo() { return 0; }\n");
  15. fclose(fout);
  16. }
  17. else
  18. {
  19. return -1;
  20. }
  21. return 0;
  22. }