home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1999 November / PCONLINE_11_99.ISO / filesbbs / OS2 / CDR18A24.ZIP / source / readcd.c.diff < prev    next >
Encoding:
Text File  |  1999-08-22  |  1.9 KB  |  60 lines

  1. *** d:/os2/tmp/readcd.c_a00037    Sun Aug 22 11:21:12 1999
  2. --- d:/os2/tmp/readcd.c_b00037    Sun Aug 22 11:21:12 1999
  3. ***************
  4. *** 563,569 ****
  5.           f = stdout;
  6.       else if ((f = fileopen(filename, "wcu")) == NULL)
  7.           comerr("Cannot open '%s'.\n", filename);
  8.       printf("end:  %8ld\n", end);
  9.       flush();
  10.       if (gettimeofday(&starttime, (struct timezone *)0) < 0)
  11. --- 563,572 ----
  12.           f = stdout;
  13.       else if ((f = fileopen(filename, "wcu")) == NULL)
  14.           comerr("Cannot open '%s'.\n", filename);
  15. ! #ifdef __EMX__
  16. !     if(setmode(fileno(f), O_BINARY)==-1)
  17. !        comerr("Cannot switch output to binary.\n");
  18. ! #endif
  19.       printf("end:  %8ld\n", end);
  20.       flush();
  21.       if (gettimeofday(&starttime, (struct timezone *)0) < 0)
  22. ***************
  23. *** 637,643 ****
  24.           f = stdout;
  25.       else if ((f = fileopen(filename, "rcu")) == NULL)
  26.           comerr("Cannot open '%s'.\n", filename);
  27.       printf("Notice: reading from file always starts at offset 0.\n");
  28.   
  29.       getlong("Enter starting sector for copy:", &addr, 0L, end-1);
  30. --- 640,649 ----
  31.           f = stdout;
  32.       else if ((f = fileopen(filename, "rcu")) == NULL)
  33.           comerr("Cannot open '%s'.\n", filename);
  34. ! #ifdef __EMX__
  35. !      if(setmode(fileno(f), O_BINARY)==-1)
  36. !        comerr("Cannot switch input to binary.\n");
  37. ! #endif
  38.       printf("Notice: reading from file always starts at offset 0.\n");
  39.   
  40.       getlong("Enter starting sector for copy:", &addr, 0L, end-1);
  41. ***************
  42. *** 707,713 ****
  43.       fillbytes(Sbuf, 50*2352, 0);
  44.       if (read_g1(scgp, Sbuf, 0, 50) < 0)
  45.           errmsg("read CD\n");
  46. !     f = fileopen("DDA", "wct");
  47.   /*    filewrite(f, Sbuf, 50 * 2352 - scsigetresid(scgp));*/
  48.       filewrite(f, Sbuf, 50 * 2352 );
  49.       fclose(f);
  50. --- 713,719 ----
  51.       fillbytes(Sbuf, 50*2352, 0);
  52.       if (read_g1(scgp, Sbuf, 0, 50) < 0)
  53.           errmsg("read CD\n");
  54. !     f = fileopen("DDA", "wctb");
  55.   /*    filewrite(f, Sbuf, 50 * 2352 - scsigetresid(scgp));*/
  56.       filewrite(f, Sbuf, 50 * 2352 );
  57.       fclose(f);
  58.