MCPcopy Create free account
hub / github.com/coreutils/coreutils / finish_current_line

Function finish_current_line

src/cut.c:757–774  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

755}
756
757static inline void
758finish_current_line (uintmax_t field_idx, bool buffer_first_field,
759 idx_t *field_1_n_bytes,
760 bool found_any_selected_field, bool line_terminated)
761{
762 if (field_idx == 1 && buffer_first_field)
763 {
764 if (!suppress_non_delimited
765 && (line_terminated || *field_1_n_bytes != 0))
766 {
767 write_bytes (field_1_buffer, *field_1_n_bytes);
768 write_line_delim ();
769 }
770 *field_1_n_bytes = 0;
771 }
772 else if (field_idx != 1 || found_any_selected_field)
773 maybe_write_line_delim (found_any_selected_field, field_idx);
774}
775
776static inline void
777sync_byte_selection (uintmax_t byte_idx)

Callers 1

cut_fields_bytesearchFunction · 0.85

Calls 3

write_bytesFunction · 0.85
write_line_delimFunction · 0.85
maybe_write_line_delimFunction · 0.85

Tested by

no test coverage detected