... rewind(ftmpname); if (stat(tmpname, &st_file)==-1) longjmp(Berror, (ETMPSTAT) ); tmpsize = st_file.st_size; i = 0; while (i<tmpsize) { n = fread(buf, 1, (READ_CONST), ftmpname ); write_byte(farch, buf, n); i+=n; } ... fread always returns 0. I don't know what's wrong. I do a rewind before, and it didn't help. Sorry for my English.