mmus2mid.diff 890 B

12345678910111213141516171819202122232425262728293031323334
  1. --- /home/pgimeno/temp/x/x/mmus2mid.c 2015-11-25 03:20:04.000000000 +0100
  2. +++ ./mmus2mid.c 2015-11-24 06:06:36.000000000 +0100
  3. @@ -782,6 +782,7 @@
  4. for (i=1;i<argc;i++)
  5. {
  6. + /*
  7. strcpy(musfile,argv[i]);
  8. p = strrchr(musfile,'.');
  9. q = strrchr(musfile,'\\');
  10. @@ -789,6 +790,13 @@
  11. strcpy(midfile,musfile);
  12. strcat(musfile,".MUS");
  13. strcat(midfile,".MID");
  14. + */
  15. + strcpy(musfile,argv[i]);
  16. + strcpy(midfile,musfile);
  17. + p = strrchr(midfile,'.');
  18. + q = strrchr(midfile,'/');
  19. + if (p && (!q || q<p)) *p='\0';
  20. + strcat(midfile,".mid");
  21. musst = fopen(musfile,"rb");
  22. if (musst)
  23. @@ -851,7 +859,7 @@
  24. else
  25. {
  26. //jff 8/3/98 use logical output routine
  27. - lprintf(LO_FATAL,"Can't open MUS file for input: %s\n", midfile);
  28. + lprintf(LO_FATAL,"Can't open MUS file for input: %s\n", musfile);
  29. exit(1);
  30. }