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

Function db_force_whitespace

freebsd/ddb/db_output.c:94–116  ·  view source on GitHub ↗

* Force pending whitespace. */

Source from the content-addressed store, hash-verified

92 * Force pending whitespace.
93 */
94void
95db_force_whitespace(void)
96{
97 int last_print, next_tab;
98
99 last_print = db_last_non_space;
100 while (last_print < db_output_position) {
101 next_tab = NEXT_TAB(last_print);
102 if (next_tab <= db_output_position) {
103 while (last_print < next_tab) { /* DON'T send a tab!!! */
104 cnputc(' ');
105 db_capture_writech(' ');
106 last_print++;
107 }
108 }
109 else {
110 cnputc(' ');
111 db_capture_writech(' ');
112 last_print++;
113 }
114 }
115 db_last_non_space = db_output_position;
116}
117
118/*
119 * Output character. Buffer whitespace.

Callers 3

db_readlineFunction · 0.85
db_putcFunction · 0.85
db_pagerFunction · 0.85

Calls 2

cnputcFunction · 0.85
db_capture_writechFunction · 0.85

Tested by

no test coverage detected