* Remove any numeric precision/width format from the format string by * inserting the "%" after the [0-9]+, returning the substring. */
| 3668 | * inserting the "%" after the [0-9]+, returning the substring. |
| 3669 | */ |
| 3670 | static char * |
| 3671 | xo_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 | |
| 3688 | static void |
| 3689 | xo_color_append_html (xo_handle_t *xop) |
no test coverage detected