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

Function write_bytes

src/cut.c:400–413  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

398 and exit immediately upon error. */
399
400static void
401write_bytes (char const *buf, size_t n_bytes)
402{
403 if (n_bytes <= SMALL_BYTE_THRESHOLD)
404 {
405 for (size_t i = 0; i < n_bytes; i++)
406 if (putchar (buf[i]) < 0)
407 write_error ();
408 return;
409 }
410
411 if (fwrite (buf, sizeof (char), n_bytes, stdout) != n_bytes)
412 write_error ();
413}
414
415/* Like memcpy, but avoid a function call for smaller amounts. */
416

Callers 8

write_selected_itemFunction · 0.85
scan_mb_blank_fieldFunction · 0.85
scan_mb_delim_fieldFunction · 0.85
begin_field_outputFunction · 0.85
handle_field_1Function · 0.85
finish_current_lineFunction · 0.85
cut_fields_mb_anyFunction · 0.85
cut_fields_bytesearchFunction · 0.85

Calls 1

write_errorFunction · 0.85

Tested by

no test coverage detected