"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "mcat.c" between
mtools-4.0.35.tar.bz2 and mtools-4.0.36.tar.bz2

About: Mtools is a collection of utilities to access MS-DOS disks from Unix without mounting them.

mcat.c  (mtools-4.0.35.tar.bz2):mcat.c  (mtools-4.0.36.tar.bz2)
skipping to change at line 134 skipping to change at line 134
size_t len; size_t len;
mt_off_t size=0; mt_off_t size=0;
if(chs_to_totsectors(&out_dev, errmsg) < 0 || if(chs_to_totsectors(&out_dev, errmsg) < 0 ||
check_if_sectors_fit(out_dev.tot_sectors, check_if_sectors_fit(out_dev.tot_sectors,
maxSize, 512, errmsg)) maxSize, 512, errmsg))
goto exit_1; goto exit_1;
size = 512 * (mt_off_t) out_dev.tot_sectors; size = 512 * (mt_off_t) out_dev.tot_sectors;
while ((len = fread(buf, 1, while ((len = fread(buf, 1,
bufLen(BUF_SIZE, size, address), bufLen(BUF_SIZE, size, address),
stdin)) > 0) { stdin)) > 0) {
ssize_t r = WRITES(Stream, buf, address, len); ssize_t r = PWRITES(Stream, buf, address, len);
fprintf(stderr, "Wrote to %d\n", (int) address); fprintf(stderr, "Wrote to %d\n", (int) address);
if(r < 0) if(r < 0)
break; break;
address += len; address += len;
} }
} else { } else {
ssize_t len; ssize_t len;
while ((len = READS(Stream, buf, address, BUF_SIZE)) > 0) { while ((len = PREADS(Stream, buf, address, BUF_SIZE)) > 0) {
fwrite(buf, 1, (size_t) len, stdout); fwrite(buf, 1, (size_t) len, stdout);
address += (size_t) len; address += (size_t) len;
} }
} }
FREE(&Stream); FREE(&Stream);
exit(0); exit(0);
exit_1: exit_1:
FREE(&Stream); FREE(&Stream);
fprintf(stderr,"%s\n",errmsg); fprintf(stderr,"%s\n",errmsg);
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)