| 1163 | } |
| 1164 | |
| 1165 | static void |
| 1166 | copy_bytes(short inRefNum, short outRefNum) |
| 1167 | { |
| 1168 | char *buf = (char *) pIOBuf; |
| 1169 | long bufSiz = pBytes->memIOBuf; |
| 1170 | |
| 1171 | long nfrom, nto; |
| 1172 | |
| 1173 | do { |
| 1174 | nfrom = read_levelfile(inRefNum, buf, bufSiz); |
| 1175 | if (!in.Recover) |
| 1176 | return; |
| 1177 | |
| 1178 | nto = write_savefile(outRefNum, buf, nfrom); |
| 1179 | if (!in.Recover) |
| 1180 | return; |
| 1181 | |
| 1182 | if (nto != nfrom) { |
| 1183 | endRecover(); |
| 1184 | note(noErr, alidNote, "\pSorry: File Copy Error"); |
| 1185 | return; |
| 1186 | } |
| 1187 | } while (nfrom == bufSiz); |
| 1188 | } |
| 1189 | |
| 1190 | static void |
| 1191 | restore_savefile() |
no test coverage detected