* Return the number of spaces we should be indenting. If * we are pretty-printing, this is indent * indent_by. */
| 702 | * we are pretty-printing, this is indent * indent_by. |
| 703 | */ |
| 704 | static int |
| 705 | xo_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 | |
| 720 | static void |
| 721 | xo_buf_indent (xo_handle_t *xop, int indent) |
no test coverage detected