Lines Matching full:spaces
24 * Returns spaces from start of line, if set, or 0 if unset:
236 * bch2_printbuf_tabstop_set() - add a tabstop, n spaces from the previous tabstop
239 * @spaces: number of spaces from previous tabpstop
242 * PRINTBUF_INLINE_TABSTOPS or setting tabstops more than 255 spaces from start
245 int bch2_printbuf_tabstop_push(struct printbuf *buf, unsigned spaces) in bch2_printbuf_tabstop_push() argument
254 buf->_tabstops[buf->nr_tabstops++] = prev_tabstop + spaces; in bch2_printbuf_tabstop_push()
263 * @spaces: number of spaces to add to the current indent level
266 * of the current line, will be indented by @spaces more spaces.
268 void bch2_printbuf_indent_add(struct printbuf *buf, unsigned spaces) in bch2_printbuf_indent_add() argument
270 if (WARN_ON_ONCE(buf->indent + spaces < buf->indent)) in bch2_printbuf_indent_add()
271 spaces = 0; in bch2_printbuf_indent_add()
273 buf->indent += spaces; in bch2_printbuf_indent_add()
274 prt_chars(buf, ' ', spaces); in bch2_printbuf_indent_add()
284 * @spaces: number of spaces to add to the current indent level
286 * Subsequent lines - not the current line - will be indented by @spaces more
287 * spaces.
289 void bch2_printbuf_indent_add_nextline(struct printbuf *buf, unsigned spaces) in bch2_printbuf_indent_add_nextline() argument
291 if (WARN_ON_ONCE(buf->indent + spaces < buf->indent)) in bch2_printbuf_indent_add_nextline()
292 spaces = 0; in bch2_printbuf_indent_add_nextline()
294 buf->indent += spaces; in bch2_printbuf_indent_add_nextline()
302 * @spaces: number of spaces to subtract from the current indent level
305 * of the current line, will be indented by @spaces less spaces.
307 void bch2_printbuf_indent_sub(struct printbuf *buf, unsigned spaces) in bch2_printbuf_indent_sub() argument
309 if (WARN_ON_ONCE(spaces > buf->indent)) in bch2_printbuf_indent_sub()
310 spaces = buf->indent; in bch2_printbuf_indent_sub()
313 buf->pos -= spaces; in bch2_printbuf_indent_sub()
316 buf->indent -= spaces; in bch2_printbuf_indent_sub()
354 int spaces = max_t(int, 0, cur_tabstop(out) - printbuf_linelen(out)); in __prt_tab() local
356 prt_chars(out, ' ', spaces); in __prt_tab()
366 * Advance output to the next tabstop by printing spaces.
392 * Advance output to the next tabstop by inserting spaces immediately after the