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

Function xo_indent

tools/libxo/libxo/libxo.c:704–718  ·  view source on GitHub ↗

* Return the number of spaces we should be indenting. If * we are pretty-printing, this is indent * indent_by. */

Source from the content-addressed store, hash-verified

702 * we are pretty-printing, this is indent * indent_by.
703 */
704static int
705xo_indent (xo_handle_t *xop)
706{
707 int rc = 0;
708
709 xop = xo_default(xop);
710
711 if (XOF_ISSET(xop, XOF_PRETTY)) {
712 rc = xop->xo_indent * xop->xo_indent_by;
713 if (XOIF_ISSET(xop, XOIF_TOP_EMITTED))
714 rc += xop->xo_indent_by;
715 }
716
717 return (rc > 0) ? rc : 0;
718}
719
720static void
721xo_buf_indent (xo_handle_t *xop, int indent)

Callers 11

xo_buf_indentFunction · 0.85
xo_emit_topFunction · 0.85
xo_do_open_containerFunction · 0.85
xo_do_close_containerFunction · 0.85
xo_do_open_listFunction · 0.85
xo_do_close_listFunction · 0.85
xo_do_open_leaf_listFunction · 0.85
xo_do_close_leaf_listFunction · 0.85
xo_do_open_instanceFunction · 0.85
xo_do_close_instanceFunction · 0.85
xo_finish_hFunction · 0.85

Calls 1

xo_defaultFunction · 0.85

Tested by

no test coverage detected