MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / ttyinq_flush

Function ttyinq_flush

components/lwp/terminal/freebsd/tty_inq.c:393–408  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

391}
392
393void ttyinq_flush(struct ttyinq *ti)
394{
395 struct ttyinq_block *tib;
396
397 ti->ti_begin = 0;
398 ti->ti_linestart = 0;
399 ti->ti_reprint = 0;
400 ti->ti_end = 0;
401
402 /* Zero all data in the input queue to get rid of passwords. */
403 if (ttyinq_flush_secure)
404 {
405 for (tib = ti->ti_firstblock; tib != NULL; tib = tib->tib_next)
406 memset(&tib->tib_data, 0, sizeof tib->tib_data);
407 }
408}
409
410int ttyinq_peekchar(struct ttyinq *ti, char *c, int *quote)
411{

Callers 2

tty_flushFunction · 0.85
ttyinq_freeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected