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

Function xo_data_append_content

tools/libxo/libxo/libxo.c:3238–3256  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3236}
3237
3238static void
3239xo_data_append_content (xo_handle_t *xop, const char *str, ssize_t len,
3240 xo_xff_flags_t flags)
3241{
3242 int cols;
3243 int need_enc = xo_needed_encoding(xop);
3244 ssize_t start_offset = xo_buf_offset(&xop->xo_data);
3245
3246 cols = xo_format_string_direct(xop, &xop->xo_data, XFF_UNESCAPE | flags,
3247 NULL, str, len, -1,
3248 need_enc, XF_ENC_UTF8);
3249 if (flags & XFF_GT_FLAGS)
3250 cols = xo_format_gettext(xop, flags, start_offset, cols, need_enc);
3251
3252 if (XOF_ISSET(xop, XOF_COLUMNS))
3253 xop->xo_columns += cols;
3254 if (XOIF_ISSET(xop, XOIF_ANCHOR))
3255 xop->xo_anchor_columns += cols;
3256}
3257
3258/**
3259 * Bump one of the 'width' values in a format strings (e.g. "%40.50.60s").

Callers 2

xo_simple_fieldFunction · 0.85
xo_format_titleFunction · 0.85

Calls 4

xo_needed_encodingFunction · 0.85
xo_buf_offsetFunction · 0.85
xo_format_string_directFunction · 0.85
xo_format_gettextFunction · 0.85

Tested by

no test coverage detected