MCPcopy Create free account
hub / github.com/F-Stack/f-stack / cnputc

Function cnputc

freebsd/kern/kern_cons.c:495–533  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

493}
494
495void
496cnputc(int c)
497{
498 struct cn_device *cnd;
499 struct consdev *cn;
500 const char *cp;
501
502#ifdef EARLY_PRINTF
503 if (early_putc != NULL) {
504 if (c == '\n')
505 early_putc('\r');
506 early_putc(c);
507 return;
508 }
509#endif
510
511 if (cn_mute || c == '\0')
512 return;
513 STAILQ_FOREACH(cnd, &cn_devlist, cnd_next) {
514 cn = cnd->cnd_cn;
515 if (!kdb_active || !(cn->cn_flags & CN_FLAG_NODEBUG)) {
516 if (c == '\n')
517 cn->cn_ops->cn_putc(cn, '\r');
518 cn->cn_ops->cn_putc(cn, c);
519 }
520 }
521 if (console_pausing && c == '\n' && !kdb_active) {
522 for (cp = console_pausestr; *cp != '\0'; cp++)
523 cnputc(*cp);
524 cngrab();
525 if (cngetc() == '.')
526 console_pausing = 0;
527 cnungrab();
528 cnputc('\r');
529 for (cp = console_pausestr; *cp != '\0'; cp++)
530 cnputc(' ');
531 cnputc('\r');
532 }
533}
534
535void
536cnputsn(const char *p, size_t n)

Callers 12

putbufFunction · 0.85
putcharFunction · 0.85
cngetsFunction · 0.85
cnputsnFunction · 0.85
constty_clearFunction · 0.85
db_putstringFunction · 0.85
db_putncharsFunction · 0.85
db_deleteFunction · 0.85
db_inputcharFunction · 0.85
db_force_whitespaceFunction · 0.85
db_putcFunction · 0.85
db_pagerFunction · 0.85

Calls 3

cngrabFunction · 0.85
cngetcFunction · 0.85
cnungrabFunction · 0.85

Tested by

no test coverage detected