GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
TERMKEY_PUSH_BYTES(3) FreeBSD Library Functions Manual TERMKEY_PUSH_BYTES(3)

termkey_push_bytes - supply more bytes to the input buffer

#include <termkey.h>

size_t termkey_push_bytes(TermKey *tk, const char *bytes, size_t len);

Link with -ltermkey.

termkey_push_bytes() allows more bytes of input to be supplied directly into the input buffer of the termkey(7) instance. If there was no buffer space remaining then -1 is returned with errno set to ENOMEM.

This function, along with termkey_getkey(3), makes it possible to use the termkey instance with a source of bytes other than from reading a filehandle.

For synchronous usage, termkey_waitkey(3) performs the input blocking task. For use against a regular stream filehandle that supports read(2), see termkey_advisereadable(3).

termkey_push_bytes() 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 size_t if an error occurs, in which case errno is set accordingly.

termkey_getkey(3), termkey_advisereadable(3), termkey(7)

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.