/* Write out the record which has been filled. If MOVE_BACK_FLAG, backspace to where we started. */ static void write_record (int move_back_flag) { union block *save_record = record_start; record_start = new_record; if (acting_as_filter) { archive = STDOUT_FILENO; flush_write (); archive = STDIN_FILENO; } else { move_archive ((records_written + records_skipped) - records_read); flush_write (); } record_start = save_record; if (move_back_flag) { /* Move the tape head back to where we were. */ if (! acting_as_filter) move_archive (records_read - (records_written + records_skipped)); } new_blocks = 0; }
static void write_record (int move_back_flag) { save_record = record_start; record_start = new_record; if (archive == STDIN) { archive = STDOUT; flush_write (); archive = STDIN; } else { move_archive (-(records_read + 1)); flush_write (); } record_start = save_record; if (move_back_flag) { /* Move the tape head back to where we were. */ if (archive != STDIN) move_archive (records_read); records_read--; } blocks_needed = blocking_factor; new_blocks = 0; }