<commit_before>.TH TERMKEY_PUSH_BYTES 3
.SH NAME
termkey_push_bytes \- supply more bytes to the input buffer
.SH SYNOPSIS
.nf
.B #include <termkey.h>
.sp
.BI "size_t termkey_push_bytes(TermKey *" tk ", const char *" bytes ", size_t " len ");
.fi
.sp
Link with \fI-ltermkey\fP.
.SH DESCRIPTION
\fBtermkey_push_bytes\fP() allows more bytes of input to be supplied directly into the input buffer of the termkey instance. If there was no buffer space remaining, then -1 is returned with \fIerrno\fP set to \fBENOMEM\fP.
.PP
This function, along with \fBtermkey_getkey\fP(3) make it possible to use the termkey instance in an asynchronous program, or with a source of bytes other than from reading a filehandle.
.PP
For synchronous usage, \fBtermkey_waitkey\fP(3) performs the input blocking task. For use against a regular stream filehandle that supports \fBread\fP(2), see \fBtermkey_advisereadable\fP(3).
.SH "RETURN VALUE"
\fBtermkey_push_bytes\fP() the number of bytes consumed from the input (which may be smaller than the length provided, if the buffer runs out of space) or -1 cast to \fBsize_t\fP if an error occurs.
.SH "SEE ALSO"
.BR termkey_new (3),
.BR termkey_getkey (3),
.BR termkey_advise_readable (3)<commit_msg>Minor wording fixes to termkey_push_bytes.3 manpage<commit_after>.TH TERMKEY_PUSH_BYTES 3
.SH NAME
termkey_push_bytes \- supply more bytes to the input buffer
.SH SYNOPSIS
.nf
.B #include <termkey.h>
.sp
.BI "size_t termkey_push_bytes(TermKey *" tk ", const char *" bytes ", size_t " len ");
.fi
.sp
Link with \fI-ltermkey\fP.
.SH DESCRIPTION
\fBtermkey_push_bytes\fP() allows more bytes of input to be supplied directly into the input buffer of the termkey instance. If there was no buffer space remaining then -1 is returned with \fIerrno\fP set to \fBENOMEM\fP.
.PP
This function, along with \fBtermkey_getkey\fP(3), makes it possible to use the termkey instance with a source of bytes other than from reading a filehandle.
.PP
For synchronous usage, \fBtermkey_waitkey\fP(3) performs the input blocking task. For use against a regular stream filehandle that supports \fBread\fP(2), see \fBtermkey_advisereadable\fP(3).
.SH "RETURN VALUE"
\fBtermkey_push_bytes\fP() the number of bytes consumed from the input (which may be smaller than the length provided, if the buffer runs out of space) or -1 cast to \fBsize_t\fP if an error occurs.
.SH "SEE ALSO"
.BR termkey_new (3),
.BR termkey_getkey (3),
.BR termkey_advisereadable (3)
{'fraction_non_alphanumeric': 0.08309572301425662, 'fraction_numerical': 0.008553971486761711, 'mean_word_length': 4.409691629955947, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4004750', 'n_tokens_mistral': 844, 'n_tokens_neox': 819, 'n_words': 339}