Patch from Rosimildo DaSilva <rdasilva@connecttel.com>:

Problem:  Sometimes the output file "FOO.BT"  is smaller that the second
              image.
    Solution: Opening files, input/output,  in "binary mode".
This commit is contained in:
Joel Sherrill
1999-03-25 21:42:52 +00:00
parent 5e2fe06c7e
commit aec5da467e

View File

@@ -69,7 +69,7 @@ int main(int argc, char* argv[])
}
ofile = argv[optind];
ofp = fopen(ofile, "w");
ofp = fopen(ofile, "wb");
if(ofp == NULL)
{
fprintf(stderr, "unable to open file %s\n", ofile);
@@ -105,7 +105,7 @@ int main(int argc, char* argv[])
/* Copy the first image */
optind++;
ifile = argv[optind];
ifp = fopen(ifile,"r");
ifp = fopen(ifile,"rb");
if(ifp == NULL)
{
fprintf(stderr, "unable to open output file %s\n", ifile);
@@ -212,7 +212,7 @@ int main(int argc, char* argv[])
/* Copy Second Image */
optind++;
ifile = argv[optind];
ifp = fopen(ifile,"r");
ifp = fopen(ifile,"rb");
if(ifp == NULL)
{
fprintf(stderr, "unable to open output file %s\n", ifile);