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

Function xo_fix_encoding

tools/libxo/libxo/libxo.c:3670–3686  ·  view source on GitHub ↗

* Remove any numeric precision/width format from the format string by * inserting the "%" after the [0-9]+, returning the substring. */

Source from the content-addressed store, hash-verified

3668 * inserting the "%" after the [0-9]+, returning the substring.
3669 */
3670static char *
3671xo_fix_encoding (xo_handle_t *xop UNUSED, char *encoding)
3672{
3673 char *cp = encoding;
3674
3675 if (cp[0] != '%' || !isdigit((int) cp[1]))
3676 return encoding;
3677
3678 for (cp += 2; *cp; cp++) {
3679 if (!isdigit((int) *cp))
3680 break;
3681 }
3682
3683 *--cp = '%'; /* Back off and insert the '%' */
3684
3685 return cp;
3686}
3687
3688static void
3689xo_color_append_html (xo_handle_t *xop)

Callers 2

xo_buf_append_divFunction · 0.85
xo_format_valueFunction · 0.85

Calls 1

isdigitFunction · 0.85

Tested by

no test coverage detected