diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-04-02 20:44:59 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-04-02 20:44:59 -0600 |
commit | ff88c4cc9bfdc91c3af390ab6a7588f5a8ade40a (patch) | |
tree | ae18e6d4576fa594be94e8278877fbdedfa1d4ba /libfmt/include | |
parent | 13b8cafb7e28784f037ecd24876c225ddcf48d76 (diff) | |
parent | 8cc87f8c1f25c9d3fec00561237891650a91b47a (diff) |
Merge branch 'lukeshu/9p-logging'
Diffstat (limited to 'libfmt/include')
-rw-r--r-- | libfmt/include/libfmt/fmt.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libfmt/include/libfmt/fmt.h b/libfmt/include/libfmt/fmt.h new file mode 100644 index 0000000..4dba82f --- /dev/null +++ b/libfmt/include/libfmt/fmt.h @@ -0,0 +1,23 @@ +/* libfmt/fmt.h - Support for pico-fmt + * + * Copyright (C) 2025 Luke T. Shumaker <lukeshu@lukeshu.com> + * SPDX-License-Identifier: AGPL-3.0-or-later + */ + +#ifndef _LIBFMT_FMT_H_ +#define _LIBFMT_FMT_H_ + +#include <pico/fmt_printf.h> +#include <pico/fmt_install.h> + +#include <libobj/obj.h> + +/** + * An object that implements fmt_formatter can be printed using + * `printf("%v", boxed_obj)`. + */ +#define fmt_formatter_LO_IFACE \ + LO_FUNC(void, format, struct fmt_state *) +LO_INTERFACE(fmt_formatter) + +#endif /* _LIBFMT_FMT_H_ */ |