| 1203 | /* Copy rows from memory to file and remember position */ |
| 1204 | |
| 1205 | static int copy_rows(FILE *to, char *row, int row_nr, long start_pos) |
| 1206 | { |
| 1207 | DBUG_ENTER("copy_rows"); |
| 1208 | |
| 1209 | file_pos[row_nr]= (int) (ftell(to) - start_pos); |
| 1210 | if (fputs(row, to) == EOF || fputc('\0', to) == EOF) |
| 1211 | { |
| 1212 | fprintf(stderr, "Can't write to outputfile\n"); |
| 1213 | DBUG_RETURN(1); |
| 1214 | } |
| 1215 | |
| 1216 | DBUG_RETURN(0); |
| 1217 | } |