#ifndef APFL_FORMAT_H #define APFL_FORMAT_H #ifdef __cplusplus extern "C" { #endif #include #include "apfl.h" #define FMT_TRY(x) do { if (!(x)) return false; } while (0) struct format_spec { const char *name; bool (*callback)(void *, struct apfl_io_writer, struct apfl_string_view arg); }; bool apfl_abstract_format( void *opaque, const struct format_spec *specs, struct apfl_io_writer w, struct apfl_string_view fmt ); #ifdef __cplusplus } #endif #endif