From 62bbbe1a4165f63b31c68b1595ecb0e67d7af3dc Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sun, 27 Sep 2020 12:55:55 -0400 Subject: Rename struct cmdline to bfs_ctx The API remains similar, with some added accessor functions for lazy initialization of the pwcache and mtab. --- printf.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'printf.h') diff --git a/printf.h b/printf.h index 3bbbcd2..9be3b0b 100644 --- a/printf.h +++ b/printf.h @@ -1,6 +1,6 @@ /**************************************************************************** * bfs * - * Copyright (C) 2017-2019 Tavian Barnes * + * Copyright (C) 2017-2020 Tavian Barnes * * * * Permission to use, copy, modify, and/or distribute this software for any * * purpose with or without fee is hereby granted. * @@ -22,7 +22,7 @@ #define BFS_PRINTF_H #include "bftw.h" -#include "cmdline.h" +#include "ctx.h" #include #include @@ -36,11 +36,12 @@ struct bfs_printf; * * @param format * The format string to parse. - * @param cmdline - * The command line. - * @return The parsed printf command, or NULL on failure. + * @param ctx + * The bfs context. + * @return + * The parsed printf command, or NULL on failure. */ -struct bfs_printf *parse_bfs_printf(const char *format, struct cmdline *cmdline); +struct bfs_printf *parse_bfs_printf(const char *format, struct bfs_ctx *ctx); /** * Evaluate a parsed format string. @@ -52,7 +53,8 @@ struct bfs_printf *parse_bfs_printf(const char *format, struct cmdline *cmdline) * @param ftwbuf * The bftw() data for the current file. If needs_stat is true, statbuf * must be non-NULL. - * @return 0 on success, -1 on failure. + * @return + * 0 on success, -1 on failure. */ int bfs_printf(FILE *file, const struct bfs_printf *command, const struct BFTW *ftwbuf); -- cgit v1.2.3