diff options
Diffstat (limited to 'printf.h')
-rw-r--r-- | printf.h | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -21,11 +21,12 @@ #ifndef BFS_PRINTF_H #define BFS_PRINTF_H -#include "bftw.h" -#include "ctx.h" #include <stdbool.h> #include <stdio.h> +struct BFTW; +struct bfs_ctx; + /** * A printf command, the result of parsing a single format string. */ @@ -34,33 +35,32 @@ struct bfs_printf; /** * Parse a -printf format string. * - * @param format - * The format string to parse. * @param ctx * The bfs context. + * @param format + * The format string to parse. * @return * The parsed printf command, or NULL on failure. */ -struct bfs_printf *parse_bfs_printf(const char *format, struct bfs_ctx *ctx); +struct bfs_printf *bfs_printf_parse(const struct bfs_ctx *ctx, const char *format); /** * Evaluate a parsed format string. * * @param file * The FILE to print to. - * @param command + * @param format * The parsed printf format. * @param ftwbuf - * The bftw() data for the current file. If needs_stat is true, statbuf - * must be non-NULL. + * The bftw() data for the current file. * @return * 0 on success, -1 on failure. */ -int bfs_printf(FILE *file, const struct bfs_printf *command, const struct BFTW *ftwbuf); +int bfs_printf(FILE *file, const struct bfs_printf *format, const struct BFTW *ftwbuf); /** * Free a parsed format string. */ -void free_bfs_printf(struct bfs_printf *command); +void bfs_printf_free(struct bfs_printf *format); #endif // BFS_PRINTF_H |