* Convenience function that either append a fixed value (if one is * given) or formats a field using a format string. If it's * encode_only, then we can't skip formatting the field, since it may * be pulling arguments off the stack. */
| 3806 | * be pulling arguments off the stack. |
| 3807 | */ |
| 3808 | static inline void |
| 3809 | xo_simple_field (xo_handle_t *xop, unsigned encode_only, |
| 3810 | const char *value, ssize_t vlen, |
| 3811 | const char *fmt, ssize_t flen, xo_xff_flags_t flags) |
| 3812 | { |
| 3813 | if (encode_only) |
| 3814 | flags |= XFF_NO_OUTPUT; |
| 3815 | |
| 3816 | if (vlen == 0) |
| 3817 | xo_do_format_field(xop, NULL, fmt, flen, flags); |
| 3818 | else if (!encode_only) |
| 3819 | xo_data_append_content(xop, value, vlen, flags); |
| 3820 | } |
| 3821 | |
| 3822 | /* |
| 3823 | * Html mode: append a <div> to the output buffer contain a field |
no test coverage detected